fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,2 @@
import { GraphQLScalarType } from 'graphql';
export declare const GraphQLLocalEndTime: GraphQLScalarType<any, any>;
@@ -0,0 +1,23 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { GelColumn } from "./common.cjs";
import { GelIntColumnBaseBuilder } from "./int.common.cjs";
export type GelIntegerBuilderInitial<TName extends string> = GelIntegerBuilder<{
name: TName;
dataType: 'number';
columnType: 'GelInteger';
data: number;
driverParam: number;
enumValues: undefined;
}>;
export declare class GelIntegerBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelInteger'>> extends GelIntColumnBaseBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelInteger<T extends ColumnBaseConfig<'number', 'GelInteger'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function integer(): GelIntegerBuilderInitial<''>;
export declare function integer<TName extends string>(name: TName): GelIntegerBuilderInitial<TName>;
@@ -0,0 +1,82 @@
import { Meter } from './Meter';
import { BatchObservableCallback, Counter, Gauge, Histogram, MetricAttributes, MetricOptions, Observable, ObservableCallback, ObservableCounter, ObservableGauge, ObservableUpDownCounter, UpDownCounter } from './Metric';
/**
* NoopMeter is a noop implementation of the {@link Meter} interface. It reuses
* constant NoopMetrics for all of its methods.
*/
export declare class NoopMeter implements Meter {
constructor();
/**
* @see {@link Meter.createGauge}
*/
createGauge(_name: string, _options?: MetricOptions): Gauge;
/**
* @see {@link Meter.createHistogram}
*/
createHistogram(_name: string, _options?: MetricOptions): Histogram;
/**
* @see {@link Meter.createCounter}
*/
createCounter(_name: string, _options?: MetricOptions): Counter;
/**
* @see {@link Meter.createUpDownCounter}
*/
createUpDownCounter(_name: string, _options?: MetricOptions): UpDownCounter;
/**
* @see {@link Meter.createObservableGauge}
*/
createObservableGauge(_name: string, _options?: MetricOptions): ObservableGauge;
/**
* @see {@link Meter.createObservableCounter}
*/
createObservableCounter(_name: string, _options?: MetricOptions): ObservableCounter;
/**
* @see {@link Meter.createObservableUpDownCounter}
*/
createObservableUpDownCounter(_name: string, _options?: MetricOptions): ObservableUpDownCounter;
/**
* @see {@link Meter.addBatchObservableCallback}
*/
addBatchObservableCallback(_callback: BatchObservableCallback, _observables: Observable[]): void;
/**
* @see {@link Meter.removeBatchObservableCallback}
*/
removeBatchObservableCallback(_callback: BatchObservableCallback): void;
}
export declare class NoopMetric {
}
export declare class NoopCounterMetric extends NoopMetric implements Counter {
add(_value: number, _attributes: MetricAttributes): void;
}
export declare class NoopUpDownCounterMetric extends NoopMetric implements UpDownCounter {
add(_value: number, _attributes: MetricAttributes): void;
}
export declare class NoopGaugeMetric extends NoopMetric implements Gauge {
record(_value: number, _attributes: MetricAttributes): void;
}
export declare class NoopHistogramMetric extends NoopMetric implements Histogram {
record(_value: number, _attributes: MetricAttributes): void;
}
export declare class NoopObservableMetric {
addCallback(_callback: ObservableCallback): void;
removeCallback(_callback: ObservableCallback): void;
}
export declare class NoopObservableCounterMetric extends NoopObservableMetric implements ObservableCounter {
}
export declare class NoopObservableGaugeMetric extends NoopObservableMetric implements ObservableGauge {
}
export declare class NoopObservableUpDownCounterMetric extends NoopObservableMetric implements ObservableUpDownCounter {
}
export declare const NOOP_METER: NoopMeter;
export declare const NOOP_COUNTER_METRIC: NoopCounterMetric;
export declare const NOOP_GAUGE_METRIC: NoopGaugeMetric;
export declare const NOOP_HISTOGRAM_METRIC: NoopHistogramMetric;
export declare const NOOP_UP_DOWN_COUNTER_METRIC: NoopUpDownCounterMetric;
export declare const NOOP_OBSERVABLE_COUNTER_METRIC: NoopObservableCounterMetric;
export declare const NOOP_OBSERVABLE_GAUGE_METRIC: NoopObservableGaugeMetric;
export declare const NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC: NoopObservableUpDownCounterMetric;
/**
* Create a no-op Meter
*/
export declare function createNoopMeter(): Meter;
//# sourceMappingURL=NoopMeter.d.ts.map
@@ -0,0 +1,6 @@
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
export type JTDEnumError = ErrorObject<"enum", {
allowedValues: string[];
}, string[]>;
declare const def: CodeKeywordDefinition;
export default def;
@@ -0,0 +1,64 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const CaseSensitiveModulesWarning = require("./CaseSensitiveModulesWarning");
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./NormalModule")} NormalModule */
const PLUGIN_NAME = "WarnCaseSensitiveModulesPlugin";
class WarnCaseSensitiveModulesPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
compilation.hooks.seal.tap(PLUGIN_NAME, () => {
/** @type {Map<string, Map<string, Module>>} */
const moduleWithoutCase = new Map();
for (const module of compilation.modules) {
const identifier = module.identifier();
// Ignore `data:` URLs, because it's not a real path
if (
/** @type {NormalModule} */
(module).resourceResolveData !== undefined &&
/** @type {NormalModule} */
(module).resourceResolveData.encodedContent !== undefined
) {
continue;
}
const lowerIdentifier = identifier.toLowerCase();
let map = moduleWithoutCase.get(lowerIdentifier);
if (map === undefined) {
map = new Map();
moduleWithoutCase.set(lowerIdentifier, map);
}
map.set(identifier, module);
}
for (const pair of moduleWithoutCase) {
const map = pair[1];
if (map.size > 1) {
compilation.warnings.push(
new CaseSensitiveModulesWarning(
map.values(),
compilation.moduleGraph
)
);
}
}
});
});
}
}
module.exports = WarnCaseSensitiveModulesPlugin;
@@ -0,0 +1 @@
{"version":3,"file":"logs.js","sources":["../../../src/icons/logs.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Logs\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgMTJoOCIgLz4KICA8cGF0aCBkPSJNMTMgMThoOCIgLz4KICA8cGF0aCBkPSJNMTMgNmg4IiAvPgogIDxwYXRoIGQ9Ik0zIDEyaDEiIC8+CiAgPHBhdGggZD0iTTMgMThoMSIgLz4KICA8cGF0aCBkPSJNMyA2aDEiIC8+CiAgPHBhdGggZD0iTTggMTJoMSIgLz4KICA8cGF0aCBkPSJNOCAxOGgxIiAvPgogIDxwYXRoIGQ9Ik04IDZoMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/logs\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 Logs = createLucideIcon('Logs', [\n ['path', { d: 'M13 12h8', key: 'h98zly' }],\n ['path', { d: 'M13 18h8', key: 'oe0vm4' }],\n ['path', { d: 'M13 6h8', key: '15sg57' }],\n ['path', { d: 'M3 12h1', key: 'lp3yf2' }],\n ['path', { d: 'M3 18h1', key: '1eiwyy' }],\n ['path', { d: 'M3 6h1', key: 'rgxa97' }],\n ['path', { d: 'M8 12h1', key: '1con00' }],\n ['path', { d: 'M8 18h1', key: '13wk12' }],\n ['path', { d: 'M8 6h1', key: 'tn6mkg' }],\n]);\n\nexport default Logs;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,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,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,21 @@
/**
* @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 Drum = createLucideIcon("Drum", [
["path", { d: "m2 2 8 8", key: "1v6059" }],
["path", { d: "m22 2-8 8", key: "173r8a" }],
["ellipse", { cx: "12", cy: "9", rx: "10", ry: "5", key: "liohsx" }],
["path", { d: "M7 13.4v7.9", key: "1yi6u9" }],
["path", { d: "M12 14v8", key: "1tn2tj" }],
["path", { d: "M17 13.4v7.9", key: "eqz2v3" }],
["path", { d: "M2 9v8a10 5 0 0 0 20 0V9", key: "1750ul" }]
]);
export { Drum as default };
//# sourceMappingURL=drum.js.map
@@ -0,0 +1,126 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.printSimpleTable = exports.renderSimpleTable = exports.renderTable = void 0;
const colored_console_line_1 = __importDefault(require("../utils/colored-console-line"));
const string_utils_1 = require("../utils/string-utils");
const table_constants_1 = require("../utils/table-constants");
const table_helpers_1 = require("../utils/table-helpers");
const internal_table_1 = __importDefault(require("./internal-table"));
const table_pre_processors_1 = require("./table-pre-processors");
// ║ Index ║ ║ ║
const renderOneLine = (tableStyle, columns, currentLineIndex, widthLimitedColumnsArray, isHeader, row, colorMap, charLength) => {
const line = new colored_console_line_1.default(colorMap);
line.addCharsWithColor('', tableStyle.vertical); // dont Color the Column borders
columns.forEach((column) => {
const thisLineHasText = currentLineIndex < widthLimitedColumnsArray[column.name].length;
const textForThisLine = thisLineHasText
? (0, table_helpers_1.cellText)(widthLimitedColumnsArray[column.name][currentLineIndex])
: '';
line.addCharsWithColor(table_constants_1.DEFAULT_ROW_FONT_COLOR, ' ');
line.addCharsWithColor((isHeader && table_constants_1.DEFAULT_HEADER_FONT_COLOR) || column.color || row.color, (0, string_utils_1.textWithPadding)(textForThisLine, column.alignment || table_constants_1.DEFAULT_ROW_ALIGNMENT, column.length || table_constants_1.DEFAULT_COLUMN_LEN, charLength));
line.addCharsWithColor('', ` ${tableStyle.vertical}`); // dont Color the Column borders
});
return line.renderConsole();
};
// ║ Bold ║ text ║ value ║
// ║ Index ║ ║ ║
const renderWidthLimitedLines = (tableStyle, columns, row, colorMap, isHeader, charLength) => {
// { col1: ['How', 'Is', 'Going'], col2: ['I am', 'Tom'], }
const widthLimitedColumnsArray = (0, table_helpers_1.getWidthLimitedColumnsArray)(columns, row, charLength);
const totalLines = Object.values(widthLimitedColumnsArray).reduce((a, b) => Math.max(a, b.length), 0);
const ret = [];
for (let currentLineIndex = 0; currentLineIndex < totalLines; currentLineIndex += 1) {
const singleLine = renderOneLine(tableStyle, columns, currentLineIndex, widthLimitedColumnsArray, isHeader, row, colorMap, charLength);
ret.push(singleLine);
}
return ret;
};
// ║ 1 ║ I would like some red wine please ║ 10.212 ║
const renderRow = (table, row) => {
let ret = [];
ret = ret.concat(renderWidthLimitedLines(table.tableStyle, table.columns, row, table.colorMap, undefined, table.charLength));
return ret;
};
/*
The analysis Result
╔═══════╦═══════════════════════════════════════╦════════╗
*/
const renderTableTitle = (table) => {
const ret = [];
if (table.title === undefined) {
return ret;
}
const getTableWidth = () => {
const reducer = (accumulator, currentValue) =>
// ║ cell ║, 2 spaces + cellTextSize + one border on the left
accumulator + currentValue + 2 + 1;
return table.columns
.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)
.reduce(reducer, 1);
};
const titleWithPadding = (0, string_utils_1.textWithPadding)(table.title, table_constants_1.DEFAULT_HEADER_ALIGNMENT, getTableWidth());
const styledText = new colored_console_line_1.default(table.colorMap);
styledText.addCharsWithColor(table_constants_1.DEFAULT_HEADER_FONT_COLOR, titleWithPadding);
// The analysis Result
ret.push(styledText.renderConsole());
return ret;
};
/*
╔═══════╦═══════════════════════════════════════╦════════╗
║ index ║ text ║ value ║
╟═══════╬═══════════════════════════════════════╬════════╢
*/
const renderTableHeaders = (table) => {
let ret = [];
// ╔═══════╦═══════════════════════════════════════╦════════╗
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.headerTop, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
// ║ index ║ text ║ value ║
const row = (0, table_helpers_1.createHeaderAsRow)(table_helpers_1.createRow, table.columns);
ret = ret.concat(renderWidthLimitedLines(table.tableStyle, table.columns, row, table.colorMap, true));
// ╟═══════╬═══════════════════════════════════════╬════════╢
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.headerBottom, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
return ret;
};
const renderTableEnding = (table) => {
const ret = [];
// ╚═══════╩═══════════════════════════════════════╩════════╝
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.tableBottom, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
return ret;
};
const renderRowSeparator = (table, row) => {
const ret = [];
const lastRowIndex = table.rows.length - 1;
const currentRowIndex = table.rows.indexOf(row);
if (currentRowIndex !== lastRowIndex && row.separator) {
// ╟═══════╬═══════════════════════════════════════╬════════╢
ret.push((0, table_helpers_1.renderTableHorizontalBorders)(table.tableStyle.rowSeparator, table.columns.map((m) => m.length || table_constants_1.DEFAULT_COLUMN_LEN)));
}
return ret;
};
const renderTable = (table) => {
(0, table_pre_processors_1.preProcessColumns)(table); // enable / disable cols, find maxLn of each col/ computed Columns
(0, table_pre_processors_1.preProcessRows)(table); // sort and filter
const ret = [];
renderTableTitle(table).forEach((row) => ret.push(row));
renderTableHeaders(table).forEach((row) => ret.push(row));
table.rows.forEach((row) => {
renderRow(table, row).forEach((row_) => ret.push(row_));
renderRowSeparator(table, row).forEach((row_) => ret.push(row_));
});
renderTableEnding(table).forEach((row) => ret.push(row));
return ret.join('\n');
};
exports.renderTable = renderTable;
const renderSimpleTable = (rows) => {
const table = new internal_table_1.default();
table.addRows(rows);
return (0, exports.renderTable)(table);
};
exports.renderSimpleTable = renderSimpleTable;
const printSimpleTable = (rows) => {
console.log((0, exports.renderSimpleTable)(rows));
};
exports.printSimpleTable = printSimpleTable;
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './square-play.js';
//# sourceMappingURL=play-square.js.map
@@ -0,0 +1,26 @@
function formatMessage(message) {
return `\n[next-intl] ${message}\n`;
}
function throwError(message) {
throw new Error(formatMessage(message));
}
function warn(message) {
console.warn(formatMessage(message));
}
/**
* Returns a function that runs the provided callback only once per process.
* Next.js can call the config multiple times - this ensures we only run once.
* Uses an environment variable to track execution across config loads.
*/
function once(namespace) {
return function runOnce(fn) {
if (process.env[namespace] === '1') {
return;
}
process.env[namespace] = '1';
fn();
};
}
export { once, throwError, warn };
@@ -0,0 +1,7 @@
export declare const differenceInCalendarMonthsWithOptions: import("./types.js").FPFn3<
number,
| import("../differenceInCalendarMonths.js").DifferenceInCalendarMonthsOptions
| undefined,
string | number | Date,
string | number | Date
>;
@@ -0,0 +1,7 @@
/** Only exposed for testing */
export declare function _resetErrorsInstrumented(): void;
/**
* Ensure that global errors automatically set the active span status.
*/
export declare function registerSpanErrorInstrumentation(): void;
//# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,10 @@
"use strict";
exports.previousDay = void 0;
var _index = require("../previousDay.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const previousDay = (exports.previousDay = (0, _index2.convertToFP)(
_index.previousDay,
2,
));
@@ -0,0 +1,9 @@
import type { TypeError } from "../compile/validate/dataType";
import type { ApplicatorKeywordError } from "./applicator";
import type { ValidationKeywordError } from "./validation";
import type { FormatError } from "./format/format";
import type { UnevaluatedPropertiesError } from "./unevaluated/unevaluatedProperties";
import type { UnevaluatedItemsError } from "./unevaluated/unevaluatedItems";
import type { DependentRequiredError } from "./validation/dependentRequired";
import type { DiscriminatorError } from "./discriminator";
export type DefinedError = TypeError | ApplicatorKeywordError | ValidationKeywordError | FormatError | UnevaluatedPropertiesError | UnevaluatedItemsError | DependentRequiredError | DiscriminatorError;
@@ -0,0 +1 @@
{"version":3,"file":"copy-plus.js","sources":["../../../src/icons/copy-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CopyPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMTUiIHgyPSIxNSIgeTE9IjEyIiB5Mj0iMTgiIC8+CiAgPGxpbmUgeDE9IjEyIiB4Mj0iMTgiIHkxPSIxNSIgeTI9IjE1IiAvPgogIDxyZWN0IHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgeD0iOCIgeT0iOCIgcng9IjIiIHJ5PSIyIiAvPgogIDxwYXRoIGQ9Ik00IDE2Yy0xLjEgMC0yLS45LTItMlY0YzAtMS4xLjktMiAyLTJoMTBjMS4xIDAgMiAuOSAyIDIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/copy-plus\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 CopyPlus = createLucideIcon('CopyPlus', [\n ['line', { x1: '15', x2: '15', y1: '12', y2: '18', key: '1p7wdc' }],\n ['line', { x1: '12', x2: '18', y1: '15', y2: '15', key: '1nscbv' }],\n ['rect', { width: '14', height: '14', x: '8', y: '8', rx: '2', ry: '2', key: '17jyea' }],\n ['path', { d: 'M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2', key: 'zix9uf' }],\n]);\n\nexport default CopyPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2D,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;AAC1F,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,30 @@
import { formatDistance } from "./ro/_lib/formatDistance.js";
import { formatLong } from "./ro/_lib/formatLong.js";
import { formatRelative } from "./ro/_lib/formatRelative.js";
import { localize } from "./ro/_lib/localize.js";
import { match } from "./ro/_lib/match.js";
/**
* @category Locales
* @summary Romanian locale.
* @language Romanian
* @iso-639-2 ron
* @author Sergiu Munteanu [@jsergiu](https://github.com/jsergiu)
* @author Adrian Ocneanu [@aocneanu](https://github.com/aocneanu)
* @author Mihai Ocneanu [@gandesc](https://github.com/gandesc)
*/
export const ro = {
code: "ro",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ro;
@@ -0,0 +1,8 @@
var regeneratorAsyncGen = require("./regeneratorAsyncGen.js");
function _regeneratorAsync(n, e, r, t, o) {
var a = regeneratorAsyncGen(n, e, r, t, o);
return a.next().then(function (n) {
return n.done ? n.value : a.next();
});
}
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,36 @@
import { DirectusFlow } from "../../../schema/flow.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/update/flows.d.ts
type UpdateFlowOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFlow<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Update multiple existing flows.
* @param keys
* @param item
* @param query
* @returns Returns the flow objects for the updated flows.
* @throws Will throw if keys is empty
*/
declare const updateFlows: <Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(keys: DirectusFlow<Schema>["id"][], item: NestedPartial<DirectusFlow<Schema>>, query?: TQuery) => RestCommand<UpdateFlowOutput<Schema, TQuery>[], Schema>;
/**
* Update multiple flows as batch.
* @param items
* @param query
* @returns Returns the flow objects for the updated flows.
*/
declare const updateFlowsBatch: <Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(items: NestedPartial<DirectusFlow<Schema>>[], query?: TQuery) => RestCommand<UpdateFlowOutput<Schema, TQuery>[], Schema>;
/**
* Update an existing flow.
* @param key
* @param item
* @param query
* @returns Returns the flow object for the updated flow.
* @throws Will throw if key is empty
*/
declare const updateFlow: <Schema, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(key: DirectusFlow<Schema>["id"], item: NestedPartial<DirectusFlow<Schema>>, query?: TQuery) => RestCommand<UpdateFlowOutput<Schema, TQuery>, Schema>;
//#endregion
export { UpdateFlowOutput, updateFlow, updateFlows, updateFlowsBatch };
//# sourceMappingURL=flows.d.cts.map
@@ -0,0 +1 @@
{"version":3,"names":["_assertClassBrand","require","_classPrivateMethodGet","receiver","privateSet","fn","assertClassBrand"],"sources":["../../src/helpers/classPrivateMethodGet.js"],"sourcesContent":["/* @minVersion 7.1.6 */\n/* @onlyBabel7 */\n\nimport assertClassBrand from \"assertClassBrand\";\nexport default function _classPrivateMethodGet(receiver, privateSet, fn) {\n assertClassBrand(privateSet, receiver);\n return fn;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,iBAAA,GAAAC,OAAA;AACe,SAASC,sBAAsBA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,EAAE,EAAE;EACvEC,iBAAgB,CAACF,UAAU,EAAED,QAAQ,CAAC;EACtC,OAAOE,EAAE;AACX","ignoreList":[]}
@@ -0,0 +1,34 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link differenceInISOWeekYears} function options.
*/
export interface DifferenceInISOWeekYearsOptions extends ContextOptions<Date> {}
/**
* @name differenceInISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Get the number of full ISO week-numbering years between the given dates.
*
* @description
* Get the number of full ISO week-numbering years between the given dates.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - The options
*
* @returns The number of full ISO week-numbering years
*
* @example
* // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?
* const result = differenceInISOWeekYears(
* new Date(2012, 0, 1),
* new Date(2010, 0, 1)
* )
* // => 1
*/
export declare function differenceInISOWeekYears(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInISOWeekYearsOptions | undefined,
): number;
@@ -0,0 +1,60 @@
'use strict';
const fill = require('fill-range');
const utils = require('./utils');
const compile = (ast, options = {}) => {
const walk = (node, parent = {}) => {
const invalidBlock = utils.isInvalidBrace(parent);
const invalidNode = node.invalid === true && options.escapeInvalid === true;
const invalid = invalidBlock === true || invalidNode === true;
const prefix = options.escapeInvalid === true ? '\\' : '';
let output = '';
if (node.isOpen === true) {
return prefix + node.value;
}
if (node.isClose === true) {
console.log('node.isClose', prefix, node.value);
return prefix + node.value;
}
if (node.type === 'open') {
return invalid ? prefix + node.value : '(';
}
if (node.type === 'close') {
return invalid ? prefix + node.value : ')';
}
if (node.type === 'comma') {
return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
}
if (node.value) {
return node.value;
}
if (node.nodes && node.ranges > 0) {
const args = utils.reduce(node.nodes);
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
if (range.length !== 0) {
return args.length > 1 && range.length > 1 ? `(${range})` : range;
}
}
if (node.nodes) {
for (const child of node.nodes) {
output += walk(child, node);
}
}
return output;
};
return walk(ast);
};
module.exports = compile;
@@ -0,0 +1,34 @@
{
"name": "streamsearch",
"version": "1.1.0",
"author": "Brian White <mscdex@mscdex.net>",
"description": "Streaming Boyer-Moore-Horspool searching for node.js",
"main": "./lib/sbmh.js",
"engines": {
"node": ">=10.0.0"
},
"devDependencies": {
"@mscdex/eslint-config": "^1.1.0",
"eslint": "^7.32.0"
},
"scripts": {
"test": "node test/test.js",
"lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test",
"lint:fix": "npm run lint -- --fix"
},
"keywords": [
"stream",
"horspool",
"boyer-moore-horspool",
"boyer-moore",
"search"
],
"licenses": [{
"type": "MIT",
"url": "http://github.com/mscdex/streamsearch/raw/master/LICENSE"
}],
"repository": {
"type": "git",
"url": "http://github.com/mscdex/streamsearch.git"
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/elements/Status.ts"],"sourcesContent":["import type { CustomComponent } from '../../config/types.js'\n\nexport type CustomStatus = CustomComponent\n"],"names":[],"mappings":"AAEA,WAA0C"}
@@ -0,0 +1 @@
{"version":3,"file":"deepProperties.js","sourceRoot":"","sources":["../../src/keywords/deepProperties.ts"],"names":[],"mappings":";;;;;AACA,mFAAkD;AAGlD,MAAM,cAAc,GAA8B,CAAC,GAAG,EAAE,IAAwB,EAAE,EAAE,CAClF,GAAG,CAAC,UAAU,CAAC,IAAA,wBAAM,EAAC,IAAI,CAAC,CAAC,CAAA;AAE9B,kBAAe,cAAc,CAAA;AAC7B,MAAM,CAAC,OAAO,GAAG,cAAc,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"OrderableRow.js","names":["OrderableRow","cellMap","columns","dragAttributes","dragListeners","rowId","rest","_jsx","map","col","colIndex","accessor","cell","renderedCells","className"],"sources":["../../../src/elements/Table/OrderableRow.tsx"],"sourcesContent":["import type { DraggableSyntheticListeners } from '@dnd-kit/core'\nimport type { Column } from 'payload'\nimport type { HTMLAttributes, Ref } from 'react'\n\nexport type Props = {\n readonly cellMap: Record<string, number>\n readonly columns: Column[]\n readonly dragAttributes?: HTMLAttributes<unknown>\n readonly dragListeners?: DraggableSyntheticListeners\n readonly ref?: Ref<HTMLTableRowElement>\n readonly rowId: number | string\n} & HTMLAttributes<HTMLTableRowElement>\n\nexport const OrderableRow = ({\n cellMap,\n columns,\n dragAttributes = {},\n dragListeners = {},\n rowId,\n ...rest\n}: Props) => (\n <tr {...rest}>\n {columns.map((col, colIndex) => {\n const { accessor } = col\n\n // Use the cellMap to find which index in the renderedCells to use\n const cell = col.renderedCells[cellMap[rowId]]\n\n // For drag handles, wrap in div with drag attributes\n if (accessor === '_dragHandle') {\n return (\n <td className={`cell-${accessor}`} key={colIndex}>\n <div {...dragAttributes} {...dragListeners}>\n {cell}\n </div>\n </td>\n )\n }\n\n return (\n <td className={`cell-${accessor}`} key={colIndex}>\n {cell}\n </td>\n )\n })}\n </tr>\n)\n"],"mappings":";AAaA,OAAO,MAAMA,YAAA,GAAeA,CAAC;EAC3BC,OAAO;EACPC,OAAO;EACPC,cAAA,GAAiB,CAAC,CAAC;EACnBC,aAAA,GAAgB,CAAC,CAAC;EAClBC,KAAK;EACL,GAAGC;AAAA,CACG,kBACNC,IAAA,CAAC;EAAI,GAAGD,IAAI;YACTJ,OAAA,CAAQM,GAAG,CAAC,CAACC,GAAA,EAAKC,QAAA;IACjB,MAAM;MAAEC;IAAQ,CAAE,GAAGF,GAAA;IAErB;IACA,MAAMG,IAAA,GAAOH,GAAA,CAAII,aAAa,CAACZ,OAAO,CAACI,KAAA,CAAM,CAAC;IAE9C;IACA,IAAIM,QAAA,KAAa,eAAe;MAC9B,oBACEJ,IAAA,CAAC;QAAGO,SAAA,EAAW,QAAQH,QAAA,EAAU;kBAC/B,aAAAJ,IAAA,CAAC;UAAK,GAAGJ,cAAc;UAAG,GAAGC,aAAa;oBACvCQ;;SAFmCF,QAAA;IAM5C;IAEA,oBACEH,IAAA,CAAC;MAAGO,SAAA,EAAW,QAAQH,QAAA,EAAU;gBAC9BC;OADqCF,QAAA;EAI5C","ignoreList":[]}
@@ -0,0 +1,135 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(b|a)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(before christ|before common era|anno domini|common era)/i,
};
const parseEraPatterns = {
any: [/^b/i, /^(a|c)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](th|st|nd|rd)? quarter/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^may/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(su|mo|tu|we|th|fr|sa)/i,
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
@@ -0,0 +1 @@
{"version":3,"file":"eventUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/eventUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAqB/D"}
@@ -0,0 +1 @@
{"version":3,"file":"word-break.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/word-break.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,mCAAqB,CAAA;AACzB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAEY,QAAA,SAAS,GAA8C;IAChE,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,QAAQ;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,SAAiB;QACxC,QAAQ,SAAS,EAAE;YACf,KAAK,WAAW;gBACZ,OAAO,UAAU,CAAC,SAAS,CAAC;YAChC,KAAK,UAAU;gBACX,OAAO,UAAU,CAAC,QAAQ,CAAC;YAC/B,KAAK,QAAQ,CAAC;YACd;gBACI,OAAO,UAAU,CAAC,MAAM,CAAC;SAChC;IACL,CAAC;CACJ,CAAC"}
@@ -0,0 +1,3 @@
import type { Vocabulary } from "../../types";
declare const format: Vocabulary;
export default format;
@@ -0,0 +1,24 @@
import { APIError } from '../../../errors/index.js';
import { createLocalReq } from '../../../utilities/createLocalReq.js';
import { restoreVersionOperation } from '../restoreVersion.js';
export async function restoreVersionLocal(payload, options) {
const { id, collection: collectionSlug, depth, overrideAccess = true, populate, select, showHiddenFields } = options;
const collection = payload.collections[collectionSlug];
if (!collection) {
throw new APIError(`The collection with slug ${String(collectionSlug)} can't be found. Restore Version Operation.`);
}
const args = {
id,
collection,
depth,
overrideAccess,
payload,
populate,
req: await createLocalReq(options, payload),
select,
showHiddenFields
};
return restoreVersionOperation(args);
}
//# sourceMappingURL=restoreVersion.js.map
@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/creatable/index.js"
@@ -0,0 +1,70 @@
"use strict";
exports.eachYearOfInterval = eachYearOfInterval;
var _index = require("./_lib/normalizeInterval.cjs");
var _index2 = require("./constructFrom.cjs");
/**
* The {@link eachYearOfInterval} function options.
*/
/**
* The {@link eachYearOfInterval} 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 eachYearOfInterval
* @category Interval Helpers
* @summary Return the array of yearly timestamps within the specified time interval.
*
* @description
* Return the array of yearly timestamps 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 yearly timestamps from the month of the interval start to the month of the interval end
*
* @example
* // Each year between 6 February 2014 and 10 August 2017:
* const result = eachYearOfInterval({
* start: new Date(2014, 1, 6),
* end: new Date(2017, 7, 10)
* })
* //=> [
* // Wed Jan 01 2014 00:00:00,
* // Thu Jan 01 2015 00:00:00,
* // Fri Jan 01 2016 00:00:00,
* // Sun Jan 01 2017 00:00:00
* // ]
*/
function eachYearOfInterval(interval, options) {
const { start, end } = (0, _index.normalizeInterval)(options?.in, interval);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
const date = reversed ? end : start;
date.setHours(0, 0, 0, 0);
date.setMonth(0, 1);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push((0, _index2.constructFrom)(start, date));
date.setFullYear(date.getFullYear() + step);
}
return reversed ? dates.reverse() : dates;
}
@@ -0,0 +1,45 @@
export function reducer(state, action) {
switch (action.type) {
case 'ADD_LOADED':
{
const newState = {
...state
};
if (typeof newState[action.relationTo] !== 'object') {
newState[action.relationTo] = {};
}
const unreturnedIDs = [...action.idsToLoad];
if (Array.isArray(action.docs)) {
action.docs.forEach(doc => {
unreturnedIDs.splice(unreturnedIDs.indexOf(doc.id), 1);
newState[action.relationTo][doc.id] = doc;
});
}
unreturnedIDs.forEach(id => {
newState[action.relationTo][id] = false;
});
return newState;
}
case 'REQUEST':
{
const newState = {
...state
};
action.docs.forEach(({
relationTo,
value
}) => {
if (typeof newState[relationTo] !== 'object') {
newState[relationTo] = {};
}
newState[relationTo][value] = null;
});
return newState;
}
default:
{
return state;
}
}
}
//# sourceMappingURL=reducer.js.map
@@ -0,0 +1,59 @@
import { OpenAiOptions } from '@sentry/core';
export declare const instrumentOpenAi: ((options?: OpenAiOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the OpenAI SDK.
*
* This integration is enabled by default.
*
* When configured, this integration automatically instruments OpenAI SDK client instances
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* integrations: [Sentry.openAIIntegration()],
* });
* ```
*
* ## Options
*
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
*
* ### Default Behavior
*
* By default, the integration will:
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
*
* @example
* ```javascript
* // Record inputs and outputs when sendDefaultPii is false
* Sentry.init({
* integrations: [
* Sentry.openAIIntegration({
* recordInputs: true,
* recordOutputs: true
* })
* ],
* });
*
* // Never record inputs/outputs regardless of sendDefaultPii
* Sentry.init({
* sendDefaultPii: true,
* integrations: [
* Sentry.openAIIntegration({
* recordInputs: false,
* recordOutputs: false
* })
* ],
* });
* ```
*
*/
export declare const openAIIntegration: (options?: OpenAiOptions | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,344 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { formatAdminURL, getFieldPermissions } from 'payload/shared';
import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
import { toast } from 'sonner';
import { Button } from '../../../elements/Button/index.js';
import { EmailAndUsernameFields } from '../../../elements/EmailAndUsername/index.js';
import { CheckboxField } from '../../../fields/Checkbox/index.js';
import { ConfirmPasswordField } from '../../../fields/ConfirmPassword/index.js';
import { PasswordField } from '../../../fields/Password/index.js';
import { useFormFields, useFormModified } from '../../../forms/Form/context.js';
import { useConfig } from '../../../providers/Config/index.js';
import { useDocumentInfo } from '../../../providers/DocumentInfo/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import './index.scss';
import { APIKey } from './APIKey.js';
const baseClass = 'auth-fields';
export const Auth = props => {
const $ = _c(21);
const {
className,
collectionSlug,
disableLocalStrategy,
email,
loginWithUsername,
operation,
readOnly,
requirePassword,
setValidateBeforeSubmit,
useAPIKey,
username,
verify
} = props;
const [changingPassword, setChangingPassword] = useState(requirePassword);
const enableAPIKey = useFormFields(_temp);
const dispatchFields = useFormFields(_temp2);
const modified = useFormModified();
const {
i18n,
t
} = useTranslation();
const {
docPermissions,
isEditing,
isInitializing,
isTrashed
} = useDocumentInfo();
const {
config: t0
} = useConfig();
const {
routes: t1
} = t0;
const {
api
} = t1;
let showPasswordFields = true;
let showUnlock = true;
const hasPasswordFieldOverride = typeof docPermissions.fields === "object" && "password" in docPermissions.fields;
const hasLoginFieldOverride = typeof docPermissions.fields === "object" && ("username" in docPermissions.fields || "email" in docPermissions.fields);
if (hasPasswordFieldOverride) {
const {
permissions: passwordPermissions
} = getFieldPermissions({
field: {
name: "password",
type: "text"
},
operation,
parentName: "",
permissions: docPermissions?.fields
});
if (operation === "create") {
showPasswordFields = passwordPermissions === true || typeof passwordPermissions === "object" && passwordPermissions.create;
} else {
showPasswordFields = passwordPermissions === true || typeof passwordPermissions === "object" && passwordPermissions.update;
}
}
if (hasLoginFieldOverride) {
const hasEmailAndUsernameFields = loginWithUsername && (loginWithUsername.requireEmail || loginWithUsername.allowEmailLogin);
let t2;
if ($[0] !== docPermissions.fields) {
t2 = getFieldPermissions({
field: {
name: "email",
type: "text"
},
operation: "read",
parentName: "",
permissions: docPermissions?.fields
});
$[0] = docPermissions.fields;
$[1] = t2;
} else {
t2 = $[1];
}
const {
operation: emailPermission
} = t2;
let t3;
if ($[2] !== docPermissions.fields) {
t3 = getFieldPermissions({
field: {
name: "username",
type: "text"
},
operation: "read",
parentName: "",
permissions: docPermissions?.fields
});
$[2] = docPermissions.fields;
$[3] = t3;
} else {
t3 = $[3];
}
const {
operation: usernamePermission
} = t3;
if (hasEmailAndUsernameFields) {
showUnlock = usernamePermission || emailPermission;
} else {
if (loginWithUsername && !hasEmailAndUsernameFields) {
showUnlock = usernamePermission;
} else {
showUnlock = emailPermission;
}
}
}
const enableFields = (!disableLocalStrategy || typeof disableLocalStrategy === "object" && disableLocalStrategy.enableFields === true) && (showUnlock || showPasswordFields);
const disabled = readOnly || isInitializing || isTrashed;
const apiKeyPermissions = docPermissions?.fields === true ? true : docPermissions?.fields?.enableAPIKey;
const apiKeyReadOnly = readOnly || apiKeyPermissions === true || apiKeyPermissions && typeof apiKeyPermissions === "object" && !apiKeyPermissions?.update;
const enableAPIKeyReadOnly = readOnly || apiKeyPermissions !== true && !apiKeyPermissions?.update;
const canReadApiKey = apiKeyPermissions === true || apiKeyPermissions?.read;
let t2;
bb0: {
if (docPermissions) {
t2 = Boolean("unlock" in docPermissions ? docPermissions.unlock : undefined);
break bb0;
}
t2 = false;
}
const hasPermissionToUnlock = t2;
let t3;
if ($[4] !== dispatchFields || $[5] !== setValidateBeforeSubmit || $[6] !== t) {
t3 = changingPassword_0 => {
if (changingPassword_0) {
setValidateBeforeSubmit(true);
dispatchFields({
type: "UPDATE",
errorMessage: t("validation:required"),
path: "password",
valid: false
});
dispatchFields({
type: "UPDATE",
errorMessage: t("validation:required"),
path: "confirm-password",
valid: false
});
} else {
setValidateBeforeSubmit(false);
dispatchFields({
type: "REMOVE",
path: "password"
});
dispatchFields({
type: "REMOVE",
path: "confirm-password"
});
}
setChangingPassword(changingPassword_0);
};
$[4] = dispatchFields;
$[5] = setValidateBeforeSubmit;
$[6] = t;
$[7] = t3;
} else {
t3 = $[7];
}
const handleChangePassword = t3;
let t4;
if ($[8] !== api || $[9] !== collectionSlug || $[10] !== email || $[11] !== i18n || $[12] !== loginWithUsername || $[13] !== t || $[14] !== username) {
t4 = async () => {
const url = formatAdminURL({
apiRoute: api,
path: `/${collectionSlug}/unlock`
});
const response = await fetch(url, {
body: loginWithUsername && username ? JSON.stringify({
username
}) : JSON.stringify({
email
}),
credentials: "include",
headers: {
"Accept-Language": i18n.language,
"Content-Type": "application/json"
},
method: "post"
});
if (response.status === 200) {
toast.success(t("authentication:successfullyUnlocked"));
} else {
toast.error(t("authentication:failedToUnlock"));
}
};
$[8] = api;
$[9] = collectionSlug;
$[10] = email;
$[11] = i18n;
$[12] = loginWithUsername;
$[13] = t;
$[14] = username;
$[15] = t4;
} else {
t4 = $[15];
}
const unlock = t4;
let t5;
let t6;
if ($[16] !== modified) {
t5 = () => {
if (!modified) {
setChangingPassword(false);
}
};
t6 = [modified];
$[16] = modified;
$[17] = t5;
$[18] = t6;
} else {
t5 = $[17];
t6 = $[18];
}
useEffect(t5, t6);
const showAuthBlock = enableFields;
const showAPIKeyBlock = useAPIKey && canReadApiKey;
const showVerifyBlock = verify && isEditing;
if (!(showAuthBlock || showAPIKeyBlock || showVerifyBlock)) {
return null;
}
let t7;
if ($[19] !== className) {
t7 = [baseClass, className].filter(Boolean);
$[19] = className;
$[20] = t7;
} else {
t7 = $[20];
}
return _jsxs("div", {
className: t7.join(" "),
children: [enableFields && _jsxs(React.Fragment, {
children: [_jsx(EmailAndUsernameFields, {
loginWithUsername,
operation,
permissions: docPermissions?.fields,
readOnly: readOnly || isTrashed,
t
}), (changingPassword || requirePassword) && (!disableLocalStrategy || !enableFields) && _jsxs("div", {
className: `${baseClass}__changing-password`,
children: [_jsx(PasswordField, {
autoComplete: "new-password",
field: {
name: "password",
label: t("authentication:newPassword"),
required: true
},
indexPath: "",
parentPath: "",
parentSchemaPath: "",
path: "password",
schemaPath: "password"
}), _jsx(ConfirmPasswordField, {
disabled: readOnly || isTrashed
})]
}), _jsxs("div", {
className: `${baseClass}__controls`,
children: [changingPassword && !requirePassword && _jsx(Button, {
buttonStyle: "secondary",
disabled,
id: "cancel-change-password",
onClick: () => handleChangePassword(false),
size: "medium",
children: t("general:cancel")
}), !changingPassword && !requirePassword && !disableLocalStrategy && showPasswordFields && _jsx(Button, {
buttonStyle: "secondary",
disabled,
id: "change-password",
onClick: () => handleChangePassword(true),
size: "medium",
children: t("authentication:changePassword")
}), !changingPassword && operation === "update" && hasPermissionToUnlock && _jsx(Button, {
buttonStyle: "secondary",
disabled: disabled || !showUnlock,
id: "force-unlock",
onClick: () => void unlock(),
size: "medium",
children: t("authentication:forceUnlock")
})]
})]
}), useAPIKey && _jsx("div", {
className: `${baseClass}__api-key`,
children: canReadApiKey && _jsxs(Fragment, {
children: [_jsx(CheckboxField, {
field: {
name: "enableAPIKey",
admin: {
disabled,
readOnly: enableAPIKeyReadOnly
},
label: t("authentication:enableAPIKey")
},
path: "enableAPIKey",
schemaPath: `${collectionSlug}.enableAPIKey`
}), _jsx(APIKey, {
enabled: !!enableAPIKey?.value,
readOnly: apiKeyReadOnly
})]
})
}), verify && isEditing && _jsx(CheckboxField, {
field: {
name: "_verified",
admin: {
disabled,
readOnly
},
label: t("authentication:verified")
},
path: "_verified",
schemaPath: `${collectionSlug}._verified`
})]
});
};
function _temp(t0) {
const [fields] = t0;
return fields && fields?.enableAPIKey || null;
}
function _temp2(reducer) {
return reducer[1];
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
import { DirectusError } from "../types/error.cjs";
//#region src/utils/is-directus-error.d.ts
/**
* A type guard to check if an error is a Directus API error
*/
declare function isDirectusError<R = Response>(error: unknown): error is DirectusError<R>;
//#endregion
export { isDirectusError };
//# sourceMappingURL=is-directus-error.d.cts.map
@@ -0,0 +1,3 @@
// This is an empty module that is served up when outside of a workerd environment
// See the `exports` field in package.json
export default {}
@@ -0,0 +1 @@
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e,t=Prism.util.currentScript(),n=[],r=Prism.plugins.filterHighlightAll={add:function(e){n.push((function(t){return e({element:t,language:Prism.util.getLanguage(t)})}))},addSelector:function(e){n.push((function(t){return t.matches(e)}))},reject:{add:function(e){n.push((function(t){return!e({element:t,language:Prism.util.getLanguage(t)})}))},addSelector:function(e){n.push((function(t){return!t.matches(e)}))}},filterKnown:!!t&&t.hasAttribute("data-filter-known")};r.add((function(e){return!r.filterKnown||"object"==typeof Prism.languages[e.language]})),t&&((e=t.getAttribute("data-filter-selector"))&&r.addSelector(e),(e=t.getAttribute("data-reject-selector"))&&r.reject.addSelector(e)),Prism.hooks.add("before-all-elements-highlight",(function(e){e.elements=e.elements.filter(i)}))}function i(e){for(var t=0,r=n.length;t<r;t++)if(!n[t](e))return!1;return!0}}();
@@ -0,0 +1,140 @@
function isRelativeHref(href) {
const pathname = typeof href === 'object' ? href.pathname : href;
return pathname != null && !pathname.startsWith('/');
}
function isLocalHref(href) {
if (typeof href === 'object') {
return href.host == null && href.hostname == null;
} else {
const hasProtocol = /^[a-z]+:/i.test(href);
return !hasProtocol;
}
}
function isLocalizableHref(href) {
return isLocalHref(href) && !isRelativeHref(href);
}
function unprefixPathname(pathname, prefix) {
return pathname.replace(new RegExp(`^${prefix}`), '') || '/';
}
function prefixPathname(prefix, pathname) {
let localizedHref = prefix;
// Avoid trailing slashes
if (/^\/(\?.*)?$/.test(pathname)) {
pathname = pathname.slice(1);
}
localizedHref += pathname;
return localizedHref;
}
function hasPathnamePrefixed(prefix, pathname) {
return pathname === prefix || pathname.startsWith(`${prefix}/`);
}
function hasTrailingSlash() {
try {
// Provided via `env` setting in `next.config.js` via the plugin
return process.env._next_intl_trailing_slash === 'true';
} catch {
return false;
}
}
function getLocalizedTemplate(pathnameConfig, locale, internalTemplate) {
return typeof pathnameConfig === 'string' ? pathnameConfig : pathnameConfig[locale] || internalTemplate;
}
function normalizeTrailingSlash(pathname) {
const trailingSlash = hasTrailingSlash();
const [path, ...hashParts] = pathname.split('#');
const hash = hashParts.join('#');
let normalizedPath = path;
if (normalizedPath !== '/') {
const pathnameEndsWithSlash = normalizedPath.endsWith('/');
if (trailingSlash && !pathnameEndsWithSlash) {
normalizedPath += '/';
} else if (!trailingSlash && pathnameEndsWithSlash) {
normalizedPath = normalizedPath.slice(0, -1);
}
}
if (hash) {
normalizedPath += '#' + hash;
}
return normalizedPath;
}
function matchesPathname(/** E.g. `/users/[userId]-[userName]` */
template, /** E.g. `/users/23-jane` */
pathname) {
const normalizedTemplate = normalizeTrailingSlash(template);
const normalizedPathname = normalizeTrailingSlash(pathname);
const regex = templateToRegex(normalizedTemplate);
return regex.test(normalizedPathname);
}
function getLocalePrefix(locale, localePrefix) {
return localePrefix.mode !== 'never' && localePrefix.prefixes?.[locale] ||
// We return a prefix even if `mode: 'never'`. It's up to the consumer
// to decide to use it or not.
getLocaleAsPrefix(locale);
}
function getLocaleAsPrefix(locale) {
return '/' + locale;
}
function templateToRegex(template) {
const regexPattern = template
// Replace optional catchall ('[[...slug]]')
.replace(/\/\[\[(\.\.\.[^\]]+)\]\]/g, '(?:/(.*))?') // With leading slash
.replace(/\[\[(\.\.\.[^\]]+)\]\]/g, '(?:/(.*))?') // Without leading slash
// Replace catchall ('[...slug]')
.replace(/\[(\.\.\.[^\]]+)\]/g, '(.+)')
// Replace regular parameter ('[slug]')
.replace(/\[([^\]]+)\]/g, '([^/]+)');
return new RegExp(`^${regexPattern}$`);
}
function isOptionalCatchAllSegment(pathname) {
return pathname.includes('[[...');
}
function isCatchAllSegment(pathname) {
return pathname.includes('[...');
}
function isDynamicSegment(pathname) {
return pathname.includes('[');
}
function comparePathnamePairs(a, b) {
const pathA = a.split('/');
const pathB = b.split('/');
const maxLength = Math.max(pathA.length, pathB.length);
for (let i = 0; i < maxLength; i++) {
const segmentA = pathA[i];
const segmentB = pathB[i];
// If one of the paths ends, prioritize the shorter path
if (!segmentA && segmentB) return -1;
if (segmentA && !segmentB) return 1;
if (!segmentA && !segmentB) continue;
// Prioritize static segments over dynamic segments
if (!isDynamicSegment(segmentA) && isDynamicSegment(segmentB)) return -1;
if (isDynamicSegment(segmentA) && !isDynamicSegment(segmentB)) return 1;
// Prioritize non-catch-all segments over catch-all segments
if (!isCatchAllSegment(segmentA) && isCatchAllSegment(segmentB)) return -1;
if (isCatchAllSegment(segmentA) && !isCatchAllSegment(segmentB)) return 1;
// Prioritize non-optional catch-all segments over optional catch-all segments
if (!isOptionalCatchAllSegment(segmentA) && isOptionalCatchAllSegment(segmentB)) {
return -1;
}
if (isOptionalCatchAllSegment(segmentA) && !isOptionalCatchAllSegment(segmentB)) {
return 1;
}
if (segmentA === segmentB) continue;
}
// Both pathnames are completely static
return 0;
}
function getSortedPathnames(pathnames) {
return pathnames.sort(comparePathnamePairs);
}
function isPromise(value) {
// https://github.com/amannn/next-intl/issues/1711
return typeof value.then === 'function';
}
export { getLocaleAsPrefix, getLocalePrefix, getLocalizedTemplate, getSortedPathnames, hasPathnamePrefixed, isLocalizableHref, isPromise, matchesPathname, normalizeTrailingSlash, prefixPathname, templateToRegex, unprefixPathname };
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCompound = exports.isPrimitive = exports.isBoolean = exports.getRootSchema = exports.Intersection = exports.Types = exports.Parent = void 0;
const lodash_1 = require("lodash");
exports.Parent = Symbol('Parent');
exports.Types = Symbol('Types');
exports.Intersection = Symbol('Intersection');
exports.getRootSchema = (0, lodash_1.memoize)((schema) => {
const parent = schema[exports.Parent];
if (!parent) {
return schema;
}
return (0, exports.getRootSchema)(parent);
});
function isBoolean(schema) {
return schema === true || schema === false;
}
exports.isBoolean = isBoolean;
function isPrimitive(schema) {
return !(0, lodash_1.isPlainObject)(schema);
}
exports.isPrimitive = isPrimitive;
function isCompound(schema) {
return Array.isArray(schema.type) || 'anyOf' in schema || 'oneOf' in schema;
}
exports.isCompound = isCompound;
//# sourceMappingURL=JSONSchema.js.map
@@ -0,0 +1,706 @@
'use strict';
const { Writable } = require('stream');
const PerMessageDeflate = require('./permessage-deflate');
const {
BINARY_TYPES,
EMPTY_BUFFER,
kStatusCode,
kWebSocket
} = require('./constants');
const { concat, toArrayBuffer, unmask } = require('./buffer-util');
const { isValidStatusCode, isValidUTF8 } = require('./validation');
const FastBuffer = Buffer[Symbol.species];
const GET_INFO = 0;
const GET_PAYLOAD_LENGTH_16 = 1;
const GET_PAYLOAD_LENGTH_64 = 2;
const GET_MASK = 3;
const GET_DATA = 4;
const INFLATING = 5;
const DEFER_EVENT = 6;
/**
* HyBi Receiver implementation.
*
* @extends Writable
*/
class Receiver extends Writable {
/**
* Creates a Receiver instance.
*
* @param {Object} [options] Options object
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
* multiple times in the same tick
* @param {String} [options.binaryType=nodebuffer] The type for binary data
* @param {Object} [options.extensions] An object containing the negotiated
* extensions
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
* client or server mode
* @param {Number} [options.maxPayload=0] The maximum allowed message length
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
* not to skip UTF-8 validation for text and close messages
*/
constructor(options = {}) {
super();
this._allowSynchronousEvents =
options.allowSynchronousEvents !== undefined
? options.allowSynchronousEvents
: true;
this._binaryType = options.binaryType || BINARY_TYPES[0];
this._extensions = options.extensions || {};
this._isServer = !!options.isServer;
this._maxPayload = options.maxPayload | 0;
this._skipUTF8Validation = !!options.skipUTF8Validation;
this[kWebSocket] = undefined;
this._bufferedBytes = 0;
this._buffers = [];
this._compressed = false;
this._payloadLength = 0;
this._mask = undefined;
this._fragmented = 0;
this._masked = false;
this._fin = false;
this._opcode = 0;
this._totalPayloadLength = 0;
this._messageLength = 0;
this._fragments = [];
this._errored = false;
this._loop = false;
this._state = GET_INFO;
}
/**
* Implements `Writable.prototype._write()`.
*
* @param {Buffer} chunk The chunk of data to write
* @param {String} encoding The character encoding of `chunk`
* @param {Function} cb Callback
* @private
*/
_write(chunk, encoding, cb) {
if (this._opcode === 0x08 && this._state == GET_INFO) return cb();
this._bufferedBytes += chunk.length;
this._buffers.push(chunk);
this.startLoop(cb);
}
/**
* Consumes `n` bytes from the buffered data.
*
* @param {Number} n The number of bytes to consume
* @return {Buffer} The consumed bytes
* @private
*/
consume(n) {
this._bufferedBytes -= n;
if (n === this._buffers[0].length) return this._buffers.shift();
if (n < this._buffers[0].length) {
const buf = this._buffers[0];
this._buffers[0] = new FastBuffer(
buf.buffer,
buf.byteOffset + n,
buf.length - n
);
return new FastBuffer(buf.buffer, buf.byteOffset, n);
}
const dst = Buffer.allocUnsafe(n);
do {
const buf = this._buffers[0];
const offset = dst.length - n;
if (n >= buf.length) {
dst.set(this._buffers.shift(), offset);
} else {
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
this._buffers[0] = new FastBuffer(
buf.buffer,
buf.byteOffset + n,
buf.length - n
);
}
n -= buf.length;
} while (n > 0);
return dst;
}
/**
* Starts the parsing loop.
*
* @param {Function} cb Callback
* @private
*/
startLoop(cb) {
this._loop = true;
do {
switch (this._state) {
case GET_INFO:
this.getInfo(cb);
break;
case GET_PAYLOAD_LENGTH_16:
this.getPayloadLength16(cb);
break;
case GET_PAYLOAD_LENGTH_64:
this.getPayloadLength64(cb);
break;
case GET_MASK:
this.getMask();
break;
case GET_DATA:
this.getData(cb);
break;
case INFLATING:
case DEFER_EVENT:
this._loop = false;
return;
}
} while (this._loop);
if (!this._errored) cb();
}
/**
* Reads the first two bytes of a frame.
*
* @param {Function} cb Callback
* @private
*/
getInfo(cb) {
if (this._bufferedBytes < 2) {
this._loop = false;
return;
}
const buf = this.consume(2);
if ((buf[0] & 0x30) !== 0x00) {
const error = this.createError(
RangeError,
'RSV2 and RSV3 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_2_3'
);
cb(error);
return;
}
const compressed = (buf[0] & 0x40) === 0x40;
if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
this._fin = (buf[0] & 0x80) === 0x80;
this._opcode = buf[0] & 0x0f;
this._payloadLength = buf[1] & 0x7f;
if (this._opcode === 0x00) {
if (compressed) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
if (!this._fragmented) {
const error = this.createError(
RangeError,
'invalid opcode 0',
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
this._opcode = this._fragmented;
} else if (this._opcode === 0x01 || this._opcode === 0x02) {
if (this._fragmented) {
const error = this.createError(
RangeError,
`invalid opcode ${this._opcode}`,
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
this._compressed = compressed;
} else if (this._opcode > 0x07 && this._opcode < 0x0b) {
if (!this._fin) {
const error = this.createError(
RangeError,
'FIN must be set',
true,
1002,
'WS_ERR_EXPECTED_FIN'
);
cb(error);
return;
}
if (compressed) {
const error = this.createError(
RangeError,
'RSV1 must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_RSV_1'
);
cb(error);
return;
}
if (
this._payloadLength > 0x7d ||
(this._opcode === 0x08 && this._payloadLength === 1)
) {
const error = this.createError(
RangeError,
`invalid payload length ${this._payloadLength}`,
true,
1002,
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
);
cb(error);
return;
}
} else {
const error = this.createError(
RangeError,
`invalid opcode ${this._opcode}`,
true,
1002,
'WS_ERR_INVALID_OPCODE'
);
cb(error);
return;
}
if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
this._masked = (buf[1] & 0x80) === 0x80;
if (this._isServer) {
if (!this._masked) {
const error = this.createError(
RangeError,
'MASK must be set',
true,
1002,
'WS_ERR_EXPECTED_MASK'
);
cb(error);
return;
}
} else if (this._masked) {
const error = this.createError(
RangeError,
'MASK must be clear',
true,
1002,
'WS_ERR_UNEXPECTED_MASK'
);
cb(error);
return;
}
if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
else this.haveLength(cb);
}
/**
* Gets extended payload length (7+16).
*
* @param {Function} cb Callback
* @private
*/
getPayloadLength16(cb) {
if (this._bufferedBytes < 2) {
this._loop = false;
return;
}
this._payloadLength = this.consume(2).readUInt16BE(0);
this.haveLength(cb);
}
/**
* Gets extended payload length (7+64).
*
* @param {Function} cb Callback
* @private
*/
getPayloadLength64(cb) {
if (this._bufferedBytes < 8) {
this._loop = false;
return;
}
const buf = this.consume(8);
const num = buf.readUInt32BE(0);
//
// The maximum safe integer in JavaScript is 2^53 - 1. An error is returned
// if payload length is greater than this number.
//
if (num > Math.pow(2, 53 - 32) - 1) {
const error = this.createError(
RangeError,
'Unsupported WebSocket frame: payload length > 2^53 - 1',
false,
1009,
'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
);
cb(error);
return;
}
this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
this.haveLength(cb);
}
/**
* Payload length has been read.
*
* @param {Function} cb Callback
* @private
*/
haveLength(cb) {
if (this._payloadLength && this._opcode < 0x08) {
this._totalPayloadLength += this._payloadLength;
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
const error = this.createError(
RangeError,
'Max payload size exceeded',
false,
1009,
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
);
cb(error);
return;
}
}
if (this._masked) this._state = GET_MASK;
else this._state = GET_DATA;
}
/**
* Reads mask bytes.
*
* @private
*/
getMask() {
if (this._bufferedBytes < 4) {
this._loop = false;
return;
}
this._mask = this.consume(4);
this._state = GET_DATA;
}
/**
* Reads data bytes.
*
* @param {Function} cb Callback
* @private
*/
getData(cb) {
let data = EMPTY_BUFFER;
if (this._payloadLength) {
if (this._bufferedBytes < this._payloadLength) {
this._loop = false;
return;
}
data = this.consume(this._payloadLength);
if (
this._masked &&
(this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0
) {
unmask(data, this._mask);
}
}
if (this._opcode > 0x07) {
this.controlMessage(data, cb);
return;
}
if (this._compressed) {
this._state = INFLATING;
this.decompress(data, cb);
return;
}
if (data.length) {
//
// This message is not compressed so its length is the sum of the payload
// length of all fragments.
//
this._messageLength = this._totalPayloadLength;
this._fragments.push(data);
}
this.dataMessage(cb);
}
/**
* Decompresses data.
*
* @param {Buffer} data Compressed data
* @param {Function} cb Callback
* @private
*/
decompress(data, cb) {
const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
perMessageDeflate.decompress(data, this._fin, (err, buf) => {
if (err) return cb(err);
if (buf.length) {
this._messageLength += buf.length;
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
const error = this.createError(
RangeError,
'Max payload size exceeded',
false,
1009,
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
);
cb(error);
return;
}
this._fragments.push(buf);
}
this.dataMessage(cb);
if (this._state === GET_INFO) this.startLoop(cb);
});
}
/**
* Handles a data message.
*
* @param {Function} cb Callback
* @private
*/
dataMessage(cb) {
if (!this._fin) {
this._state = GET_INFO;
return;
}
const messageLength = this._messageLength;
const fragments = this._fragments;
this._totalPayloadLength = 0;
this._messageLength = 0;
this._fragmented = 0;
this._fragments = [];
if (this._opcode === 2) {
let data;
if (this._binaryType === 'nodebuffer') {
data = concat(fragments, messageLength);
} else if (this._binaryType === 'arraybuffer') {
data = toArrayBuffer(concat(fragments, messageLength));
} else if (this._binaryType === 'blob') {
data = new Blob(fragments);
} else {
data = fragments;
}
if (this._allowSynchronousEvents) {
this.emit('message', data, true);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit('message', data, true);
this._state = GET_INFO;
this.startLoop(cb);
});
}
} else {
const buf = concat(fragments, messageLength);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
const error = this.createError(
Error,
'invalid UTF-8 sequence',
true,
1007,
'WS_ERR_INVALID_UTF8'
);
cb(error);
return;
}
if (this._state === INFLATING || this._allowSynchronousEvents) {
this.emit('message', buf, false);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit('message', buf, false);
this._state = GET_INFO;
this.startLoop(cb);
});
}
}
}
/**
* Handles a control message.
*
* @param {Buffer} data Data to handle
* @return {(Error|RangeError|undefined)} A possible error
* @private
*/
controlMessage(data, cb) {
if (this._opcode === 0x08) {
if (data.length === 0) {
this._loop = false;
this.emit('conclude', 1005, EMPTY_BUFFER);
this.end();
} else {
const code = data.readUInt16BE(0);
if (!isValidStatusCode(code)) {
const error = this.createError(
RangeError,
`invalid status code ${code}`,
true,
1002,
'WS_ERR_INVALID_CLOSE_CODE'
);
cb(error);
return;
}
const buf = new FastBuffer(
data.buffer,
data.byteOffset + 2,
data.length - 2
);
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
const error = this.createError(
Error,
'invalid UTF-8 sequence',
true,
1007,
'WS_ERR_INVALID_UTF8'
);
cb(error);
return;
}
this._loop = false;
this.emit('conclude', code, buf);
this.end();
}
this._state = GET_INFO;
return;
}
if (this._allowSynchronousEvents) {
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
this._state = GET_INFO;
} else {
this._state = DEFER_EVENT;
setImmediate(() => {
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
this._state = GET_INFO;
this.startLoop(cb);
});
}
}
/**
* Builds an error object.
*
* @param {function(new:Error|RangeError)} ErrorCtor The error constructor
* @param {String} message The error message
* @param {Boolean} prefix Specifies whether or not to add a default prefix to
* `message`
* @param {Number} statusCode The status code
* @param {String} errorCode The exposed error code
* @return {(Error|RangeError)} The error
* @private
*/
createError(ErrorCtor, message, prefix, statusCode, errorCode) {
this._loop = false;
this._errored = true;
const err = new ErrorCtor(
prefix ? `Invalid WebSocket frame: ${message}` : message
);
Error.captureStackTrace(err, this.createError);
err.code = errorCode;
err[kStatusCode] = statusCode;
return err;
}
}
module.exports = Receiver;
@@ -0,0 +1,3 @@
import type { SendEmailOptions } from './types.js';
export declare const getStringifiedToAddress: (message: SendEmailOptions) => string | undefined;
//# sourceMappingURL=getStringifiedToAddress.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore-core/view-base.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { ColumnsSelection } from '~/sql/sql.ts';\nimport { View } from '~/sql/sql.ts';\n\nexport abstract class SingleStoreViewBase<\n\tTName extends string = string,\n\tTExisting extends boolean = boolean,\n\tTSelectedFields extends ColumnsSelection = ColumnsSelection,\n> extends View<TName, TExisting, TSelectedFields> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreViewBase';\n\n\tdeclare readonly _: View<TName, TExisting, TSelectedFields>['_'] & {\n\t\treadonly viewBrand: 'SingleStoreViewBase';\n\t};\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AAEd,MAAe,4BAIZ,KAAwC;AAAA,EACjD,QAA0B,UAAU,IAAY;AAKjD;","names":[]}
@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, MMMM do, yyyy",
long: "MMMM do, yyyy",
medium: "MMM d, yyyy",
short: "yyyy-MM-dd",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'at' {{time}}",
long: "{{date}} 'at' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/postgres/predefinedMigrations/v2-v3/traverseFields.ts"],"sourcesContent":["import type { FlattenedField, Payload } from 'payload'\n\nimport toSnakeCase from 'to-snake-case'\n\nimport type { BasePostgresAdapter, PostgresDB } from '../../types.js'\nimport type { PathsToQuery } from './types.js'\n\ntype Args = {\n adapter: BasePostgresAdapter\n collectionSlug?: string\n columnPrefix: string\n db: PostgresDB\n disableNotNull: boolean\n fields: FlattenedField[]\n globalSlug?: string\n isVersions: boolean\n newTableName: string\n parentTableName: string\n path: string\n pathsToQuery: PathsToQuery\n payload: Payload\n rootTableName: string\n}\n\nexport const traverseFields = (args: Args) => {\n args.fields.forEach((field) => {\n switch (field.type) {\n case 'array': {\n const newTableName = args.adapter.tableNameMap.get(\n `${args.newTableName}_${toSnakeCase(field.name)}`,\n )\n\n return traverseFields({\n ...args,\n columnPrefix: '',\n fields: field.flattenedFields,\n newTableName,\n parentTableName: newTableName,\n path: `${args.path ? `${args.path}.` : ''}${field.name}.%`,\n })\n }\n\n case 'blocks': {\n return field.blocks.forEach((block) => {\n // Can ignore string blocks, as those were added in v3 and don't need to be migrated\n if (typeof block === 'string') {\n return\n }\n\n const newTableName = args.adapter.tableNameMap.get(\n `${args.rootTableName}_blocks_${toSnakeCase(block.slug)}`,\n )\n\n traverseFields({\n ...args,\n columnPrefix: '',\n fields: block.flattenedFields,\n newTableName,\n parentTableName: newTableName,\n path: `${args.path ? `${args.path}.` : ''}${field.name}.%`,\n })\n })\n }\n\n case 'group':\n case 'tab': {\n let newTableName = `${args.newTableName}_${toSnakeCase(field.name)}`\n\n if (field.localized && args.payload.config.localization) {\n newTableName += args.adapter.localesSuffix\n }\n\n return traverseFields({\n ...args,\n columnPrefix: `${args.columnPrefix}${toSnakeCase(field.name)}_`,\n fields: field.flattenedFields,\n newTableName,\n path: `${args.path ? `${args.path}.` : ''}${field.name}`,\n })\n }\n\n case 'relationship':\n case 'upload': {\n if (typeof field.relationTo === 'string') {\n if (field.type === 'upload' || !field.hasMany) {\n args.pathsToQuery.add(`${args.path ? `${args.path}.` : ''}${field.name}`)\n }\n }\n\n return null\n }\n }\n })\n}\n"],"names":["toSnakeCase","traverseFields","args","fields","forEach","field","type","newTableName","adapter","tableNameMap","get","name","columnPrefix","flattenedFields","parentTableName","path","blocks","block","rootTableName","slug","localized","payload","config","localization","localesSuffix","relationTo","hasMany","pathsToQuery","add"],"mappings":"AAEA,OAAOA,iBAAiB,gBAAe;AAsBvC,OAAO,MAAMC,iBAAiB,CAACC;IAC7BA,KAAKC,MAAM,CAACC,OAAO,CAAC,CAACC;QACnB,OAAQA,MAAMC,IAAI;YAChB,KAAK;gBAAS;oBACZ,MAAMC,eAAeL,KAAKM,OAAO,CAACC,YAAY,CAACC,GAAG,CAChD,GAAGR,KAAKK,YAAY,CAAC,CAAC,EAAEP,YAAYK,MAAMM,IAAI,GAAG;oBAGnD,OAAOV,eAAe;wBACpB,GAAGC,IAAI;wBACPU,cAAc;wBACdT,QAAQE,MAAMQ,eAAe;wBAC7BN;wBACAO,iBAAiBP;wBACjBQ,MAAM,GAAGb,KAAKa,IAAI,GAAG,GAAGb,KAAKa,IAAI,CAAC,CAAC,CAAC,GAAG,KAAKV,MAAMM,IAAI,CAAC,EAAE,CAAC;oBAC5D;gBACF;YAEA,KAAK;gBAAU;oBACb,OAAON,MAAMW,MAAM,CAACZ,OAAO,CAAC,CAACa;wBAC3B,oFAAoF;wBACpF,IAAI,OAAOA,UAAU,UAAU;4BAC7B;wBACF;wBAEA,MAAMV,eAAeL,KAAKM,OAAO,CAACC,YAAY,CAACC,GAAG,CAChD,GAAGR,KAAKgB,aAAa,CAAC,QAAQ,EAAElB,YAAYiB,MAAME,IAAI,GAAG;wBAG3DlB,eAAe;4BACb,GAAGC,IAAI;4BACPU,cAAc;4BACdT,QAAQc,MAAMJ,eAAe;4BAC7BN;4BACAO,iBAAiBP;4BACjBQ,MAAM,GAAGb,KAAKa,IAAI,GAAG,GAAGb,KAAKa,IAAI,CAAC,CAAC,CAAC,GAAG,KAAKV,MAAMM,IAAI,CAAC,EAAE,CAAC;wBAC5D;oBACF;gBACF;YAEA,KAAK;YACL,KAAK;gBAAO;oBACV,IAAIJ,eAAe,GAAGL,KAAKK,YAAY,CAAC,CAAC,EAAEP,YAAYK,MAAMM,IAAI,GAAG;oBAEpE,IAAIN,MAAMe,SAAS,IAAIlB,KAAKmB,OAAO,CAACC,MAAM,CAACC,YAAY,EAAE;wBACvDhB,gBAAgBL,KAAKM,OAAO,CAACgB,aAAa;oBAC5C;oBAEA,OAAOvB,eAAe;wBACpB,GAAGC,IAAI;wBACPU,cAAc,GAAGV,KAAKU,YAAY,GAAGZ,YAAYK,MAAMM,IAAI,EAAE,CAAC,CAAC;wBAC/DR,QAAQE,MAAMQ,eAAe;wBAC7BN;wBACAQ,MAAM,GAAGb,KAAKa,IAAI,GAAG,GAAGb,KAAKa,IAAI,CAAC,CAAC,CAAC,GAAG,KAAKV,MAAMM,IAAI,EAAE;oBAC1D;gBACF;YAEA,KAAK;YACL,KAAK;gBAAU;oBACb,IAAI,OAAON,MAAMoB,UAAU,KAAK,UAAU;wBACxC,IAAIpB,MAAMC,IAAI,KAAK,YAAY,CAACD,MAAMqB,OAAO,EAAE;4BAC7CxB,KAAKyB,YAAY,CAACC,GAAG,CAAC,GAAG1B,KAAKa,IAAI,GAAG,GAAGb,KAAKa,IAAI,CAAC,CAAC,CAAC,GAAG,KAAKV,MAAMM,IAAI,EAAE;wBAC1E;oBACF;oBAEA,OAAO;gBACT;QACF;IACF;AACF,EAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"toKebabCase.d.ts","sourceRoot":"","sources":["../../src/utilities/toKebabCase.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YAAa,MAAM,uBAIzB,CAAA"}
@@ -0,0 +1,56 @@
import { IfNever, UnpackList } from "./utils.cjs";
import { ItemType, RelationalFields, RemoveRelationships } from "./schema.cjs";
import { FunctionFields } from "./functions.cjs";
import { ExtractItem } from "./query.cjs";
//#region src/types/fields.d.ts
/**
* Fields querying, including nested relational fields
*/
type QueryFields<Schema, Item> = WrapQueryFields<Schema, Item, QueryFieldsRelational<Schema, UnpackList<Item>>>;
/**
* Wrap array of fields
*/
type WrapQueryFields<Schema, Item, NestedFields> = readonly ('*' | keyof UnpackList<Item> | NestedFields | FunctionFields<Schema, UnpackList<Item>>)[];
/**
* Object of nested relational fields in a given Item with it's own fields available for selection
*/
type QueryFieldsRelational<Schema, Item> = IfNever<RelationalFields<Schema, Item>, never, { [Key in RelationalFields<Schema, Item>]?: Extract<Item[Key], ItemType<Schema>> extends infer RelatedCollection ? RelatedCollection extends any[] ? HasManyToAnyRelation<RelatedCollection> extends never ? QueryFields<Schema, RelatedCollection> : ManyToAnyFields<Schema, RelatedCollection> : QueryFields<Schema, RelatedCollection> : never }>;
/**
* Deal with many-to-any relational fields
*/
type ManyToAnyFields<Schema, Item> = ExtractItem<Schema, Item> extends infer TItem ? TItem extends object ? 'collection' extends keyof TItem ? 'item' extends keyof TItem ? WrapQueryFields<Schema, TItem, Omit<QueryFieldsRelational<Schema, UnpackList<Item>>, 'item'> & {
item?: { [Collection in keyof Schema as Collection extends TItem['collection'] ? Collection : never]?: QueryFields<Schema, Schema[Collection]> };
}> : never : never : never : never;
/**
* Determine whether a field definition has a many-to-any relation
* TODO try making this dynamic somehow instead of relying on "item" as key
*/
type HasManyToAnyRelation<Item> = UnpackList<Item> extends infer TItem ? TItem extends object ? 'collection' extends keyof TItem ? 'item' extends keyof TItem ? true : never : never : never : never;
/**
* Returns true if the Fields has any nested field
*/
type HasNestedFields<Fields> = UnpackList<Fields> extends infer Field ? (Field extends object ? true : never) : never;
/**
* Return all keys if Fields is undefined or contains '*'
*/
type FieldsWildcard<Item extends object, Fields> = unknown extends Fields ? keyof Item : UnpackList<Fields> extends infer Field ? Field extends undefined ? keyof Item : Field extends '*' ? keyof Item : Field extends string ? Field : never : never;
/**
* Returns the relational fields from the fields list
*/
type PickRelationalFields<Fields> = MergeRelations<UnpackList<Fields> extends infer Field ? (Field extends object ? Field : never) : never>;
type MergeRelations<RelationalFields$1 extends object | never> = { [Key in AllKeys<RelationalFields$1>]: PickType<RelationalFields$1, Key> };
type PickType<T, K extends AllKeys<T>> = T extends { [k in K]?: any } ? T[K] : undefined;
type AllKeys<T> = T extends any ? keyof T : never;
/**
* Extract the required fields from an item
*/
type PickFlatFields<Schema, Item, Fields> = Extract<Fields, keyof Item> extends never ? never : Pick<RemoveRelationships<Schema, Item>, Extract<Fields, keyof Item>>;
/**
* Extract a specific literal type from a collection
*/
type LiteralFields<Item, Type extends string> = { [Key in keyof Item]: Extract<Item[Key], Type>[] extends never[] ? never : Key }[keyof Item];
//#endregion
export { FieldsWildcard, HasManyToAnyRelation, HasNestedFields, LiteralFields, ManyToAnyFields, PickFlatFields, PickRelationalFields, QueryFields, QueryFieldsRelational, WrapQueryFields };
//# sourceMappingURL=fields.d.cts.map
@@ -0,0 +1,71 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const browserUtils = require('@sentry-internal/browser-utils');
const DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE = 40;
/**
* Creates a Transport that uses the Fetch API to send events to Sentry.
*/
function makeFetchTransport(
options,
nativeFetch = browserUtils.getNativeImplementation('fetch'),
) {
let pendingBodySize = 0;
let pendingCount = 0;
async function makeRequest(request) {
const requestSize = request.body.length;
pendingBodySize += requestSize;
pendingCount++;
const requestOptions = {
body: request.body,
method: 'POST',
referrerPolicy: 'strict-origin',
headers: options.headers,
// Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to
// fetch" error and sending a "network_error" client-outcome - in Chrome, the request status shows "(cancelled)".
// The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're
// frequently sending events right before the user is switching pages (eg. when finishing navigation transactions).
// Gotchas:
// - `keepalive` isn't supported by Firefox
// - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):
// If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.
// We will therefore only activate the flag when we're below that limit.
// There is also a limit of requests that can be open at the same time, so we also limit this to 15
// See https://github.com/getsentry/sentry-javascript/pull/7553 for details
keepalive: pendingBodySize <= 60000 && pendingCount < 15,
...options.fetchOptions,
};
try {
// Note: We do not need to suppress tracing here, because we are using the native fetch, instead of our wrapped one.
const response = await nativeFetch(options.url, requestOptions);
return {
statusCode: response.status,
headers: {
'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
'retry-after': response.headers.get('Retry-After'),
},
};
} catch (e) {
browserUtils.clearCachedImplementation('fetch');
throw e;
} finally {
pendingBodySize -= requestSize;
pendingCount--;
}
}
return core.createTransport(
options,
makeRequest,
core.makePromiseBuffer(options.bufferSize || DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE),
);
}
exports.makeFetchTransport = makeFetchTransport;
//# sourceMappingURL=fetch.js.map
@@ -0,0 +1,6 @@
var _typeof = require("./typeof.js")["default"];
function _checkInRHS(e) {
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null"));
return e;
}
module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, do MMMM, y", // CLDR #1787
long: "do MMMM, y", // CLDR #1788
medium: "d MMM, y", // CLDR #1789
short: "dd/MM/yyyy", // CLDR #1790
};
const timeFormats = {
full: "h:mm:ss a zzzz", // CLDR #1791
long: "h:mm:ss a z", // CLDR #1792
medium: "h:mm:ss a", // CLDR #1793
short: "h:mm a", // CLDR #1794
};
const dateTimeFormats = {
full: "{{date}} 'को' {{time}}", // CLDR #1795
long: "{{date}} 'को' {{time}}", // CLDR #1796
medium: "{{date}}, {{time}}", // CLDR #1797
short: "{{date}}, {{time}}", // CLDR #1798
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1,180 @@
import * as React from 'react'
import {
EmotionCache,
getRegisteredStyles,
insertStyles,
registerStyles,
SerializedStyles
} from '@emotion/utils'
import { CSSInterpolation, serializeStyles } from '@emotion/serialize'
import isDevelopment from '#is-development'
import { withEmotionCache } from './context'
import { Theme, ThemeContext } from './theming'
import { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks'
import isBrowser from '#is-browser'
export interface ArrayClassNamesArg extends Array<ClassNamesArg> {}
export type ClassNamesArg =
| undefined
| null
| string
| boolean
| { [className: string]: boolean | null | undefined }
| ArrayClassNamesArg
let classnames = (args: ArrayClassNamesArg): string => {
let len = args.length
let i = 0
let cls = ''
for (; i < len; i++) {
let arg = args[i]
if (arg == null) continue
let toAdd
switch (typeof arg) {
case 'boolean':
break
case 'object': {
if (Array.isArray(arg)) {
toAdd = classnames(arg)
} else {
if (
isDevelopment &&
arg.styles !== undefined &&
arg.name !== undefined
) {
console.error(
'You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' +
'`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.'
)
}
toAdd = ''
for (const k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ')
toAdd += k
}
}
}
break
}
default: {
toAdd = arg
}
}
if (toAdd) {
cls && (cls += ' ')
cls += toAdd
}
}
return cls
}
function merge(
registered: EmotionCache['registered'],
css: ClassNamesContent['css'],
className: string
) {
const registeredStyles: string[] = []
const rawClassName = getRegisteredStyles(
registered,
registeredStyles,
className
)
if (registeredStyles.length < 2) {
return className
}
return rawClassName + css(registeredStyles)
}
const Insertion = ({
cache,
serializedArr
}: {
cache: EmotionCache
serializedArr: SerializedStyles[]
}) => {
let rules = useInsertionEffectAlwaysWithSyncFallback(() => {
let rules = ''
for (let i = 0; i < serializedArr.length; i++) {
let res = insertStyles(cache, serializedArr[i], false)
if (!isBrowser && res !== undefined) {
rules += res
}
}
if (!isBrowser) {
return rules
}
})
if (!isBrowser && rules!.length !== 0) {
return (
<style
{...{
[`data-emotion`]: `${cache.key} ${serializedArr
.map(serialized => serialized.name)
.join(' ')}`,
dangerouslySetInnerHTML: { __html: rules! },
nonce: cache.sheet.nonce
}}
/>
)
}
return null
}
export interface ClassNamesContent {
css(template: TemplateStringsArray, ...args: Array<CSSInterpolation>): string
css(...args: Array<CSSInterpolation>): string
cx(...args: Array<ClassNamesArg>): string
theme: Theme
}
export interface ClassNamesProps {
children(content: ClassNamesContent): React.ReactNode
}
export const ClassNames = /* #__PURE__ */ withEmotionCache<ClassNamesProps>(
(props, cache) => {
let hasRendered = false
let serializedArr: SerializedStyles[] = []
let css: ClassNamesContent['css'] = (...args) => {
if (hasRendered && isDevelopment) {
throw new Error('css can only be used during render')
}
let serialized = serializeStyles(args, cache.registered)
serializedArr.push(serialized)
// registration has to happen here as the result of this might get consumed by `cx`
registerStyles(cache, serialized, false)
return `${cache.key}-${serialized.name}`
}
let cx = (...args: Array<ClassNamesArg>) => {
if (hasRendered && isDevelopment) {
throw new Error('cx can only be used during render')
}
return merge(cache.registered, css, classnames(args))
}
let content = {
css,
cx,
theme: React.useContext(ThemeContext)
}
let ele = props.children(content)
hasRendered = true
return (
<>
<Insertion cache={cache} serializedArr={serializedArr} />
{ele}
</>
)
}
)
if (isDevelopment) {
ClassNames.displayName = 'EmotionClassNames'
}
@@ -0,0 +1 @@
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAAO,CAAC;AAElD,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AA8BF,mCAAmC;AACnC,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,qBAAqB,GAAG,cAAc,CAAC,GACjE,WAAW,EAAE,CAqBf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,gBAAgB,CAW/F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,IAAI,CAOxF;AAED,mCAAmC;AACnC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAkCnH;AAED,wDAAwD;AACxD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAS7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,aAAa,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,WAAW,CAE5G"}
@@ -0,0 +1 @@
{"version":3,"file":"list-checks.js","sources":["../../../src/icons/list-checks.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ListChecks\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMyAxNyAyIDIgNC00IiAvPgogIDxwYXRoIGQ9Im0zIDcgMiAyIDQtNCIgLz4KICA8cGF0aCBkPSJNMTMgNmg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxMmg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxOGg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/list-checks\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 ListChecks = createLucideIcon('ListChecks', [\n ['path', { d: 'm3 17 2 2 4-4', key: '1jhpwq' }],\n ['path', { d: 'm3 7 2 2 4-4', key: '1obspn' }],\n ['path', { d: 'M13 6h8', key: '15sg57' }],\n ['path', { d: 'M13 12h8', key: 'h98zly' }],\n ['path', { d: 'M13 18h8', key: 'oe0vm4' }],\n]);\n\nexport default ListChecks;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,17 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultErrorMap = void 0;
exports.setErrorMap = setErrorMap;
exports.getErrorMap = getErrorMap;
const en_js_1 = __importDefault(require("./locales/en.cjs"));
exports.defaultErrorMap = en_js_1.default;
let overrideErrorMap = en_js_1.default;
function setErrorMap(map) {
overrideErrorMap = map;
}
function getErrorMap() {
return overrideErrorMap;
}
@@ -0,0 +1,13 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
export const TextareaCell = ({
cellData
}) => {
const textToShow = cellData?.length > 100 ? `${cellData.substring(0, 100)}\u2026` : cellData;
return /*#__PURE__*/_jsx("span", {
children: textToShow
});
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,533 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/zh-TW/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u5C11\u65BC 1 \u79D2",
other: "\u5C11\u65BC {{count}} \u79D2"
},
xSeconds: {
one: "1 \u79D2",
other: "{{count}} \u79D2"
},
halfAMinute: "\u534A\u5206\u9418",
lessThanXMinutes: {
one: "\u5C11\u65BC 1 \u5206\u9418",
other: "\u5C11\u65BC {{count}} \u5206\u9418"
},
xMinutes: {
one: "1 \u5206\u9418",
other: "{{count}} \u5206\u9418"
},
xHours: {
one: "1 \u5C0F\u6642",
other: "{{count}} \u5C0F\u6642"
},
aboutXHours: {
one: "\u5927\u7D04 1 \u5C0F\u6642",
other: "\u5927\u7D04 {{count}} \u5C0F\u6642"
},
xDays: {
one: "1 \u5929",
other: "{{count}} \u5929"
},
aboutXWeeks: {
one: "\u5927\u7D04 1 \u500B\u661F\u671F",
other: "\u5927\u7D04 {{count}} \u500B\u661F\u671F"
},
xWeeks: {
one: "1 \u500B\u661F\u671F",
other: "{{count}} \u500B\u661F\u671F"
},
aboutXMonths: {
one: "\u5927\u7D04 1 \u500B\u6708",
other: "\u5927\u7D04 {{count}} \u500B\u6708"
},
xMonths: {
one: "1 \u500B\u6708",
other: "{{count}} \u500B\u6708"
},
aboutXYears: {
one: "\u5927\u7D04 1 \u5E74",
other: "\u5927\u7D04 {{count}} \u5E74"
},
xYears: {
one: "1 \u5E74",
other: "{{count}} \u5E74"
},
overXYears: {
one: "\u8D85\u904E 1 \u5E74",
other: "\u8D85\u904E {{count}} \u5E74"
},
almostXYears: {
one: "\u5C07\u8FD1 1 \u5E74",
other: "\u5C07\u8FD1 {{count}} \u5E74"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "\u5167";
} else {
return result + "\u524D";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/zh-TW/_lib/formatLong.js
var dateFormats = {
full: "y'\u5E74'M'\u6708'd'\u65E5' EEEE",
long: "y'\u5E74'M'\u6708'd'\u65E5'",
medium: "yyyy-MM-dd",
short: "yy-MM-dd"
};
var timeFormats = {
full: "zzzz a h:mm:ss",
long: "z a h:mm:ss",
medium: "a h:mm:ss",
short: "a h:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/zh-TW/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\u4E0A\u500B'eeee p",
yesterday: "'\u6628\u5929' p",
today: "'\u4ECA\u5929' p",
tomorrow: "'\u660E\u5929' p",
nextWeek: "'\u4E0B\u500B'eeee p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/zh-TW/_lib/localize.js
var eraValues = {
narrow: ["\u524D", "\u516C\u5143"],
abbreviated: ["\u524D", "\u516C\u5143"],
wide: ["\u516C\u5143\u524D", "\u516C\u5143"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u7B2C\u4E00\u523B", "\u7B2C\u4E8C\u523B", "\u7B2C\u4E09\u523B", "\u7B2C\u56DB\u523B"],
wide: ["\u7B2C\u4E00\u523B\u9418", "\u7B2C\u4E8C\u523B\u9418", "\u7B2C\u4E09\u523B\u9418", "\u7B2C\u56DB\u523B\u9418"]
};
var monthValues = {
narrow: [
"\u4E00",
"\u4E8C",
"\u4E09",
"\u56DB",
"\u4E94",
"\u516D",
"\u4E03",
"\u516B",
"\u4E5D",
"\u5341",
"\u5341\u4E00",
"\u5341\u4E8C"],
abbreviated: [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"],
wide: [
"\u4E00\u6708",
"\u4E8C\u6708",
"\u4E09\u6708",
"\u56DB\u6708",
"\u4E94\u6708",
"\u516D\u6708",
"\u4E03\u6708",
"\u516B\u6708",
"\u4E5D\u6708",
"\u5341\u6708",
"\u5341\u4E00\u6708",
"\u5341\u4E8C\u6708"]
};
var dayValues = {
narrow: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
short: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
abbreviated: ["\u9031\u65E5", "\u9031\u4E00", "\u9031\u4E8C", "\u9031\u4E09", "\u9031\u56DB", "\u9031\u4E94", "\u9031\u516D"],
wide: ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"]
};
var dayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u51CC\u6668",
noon: "\u5348",
morning: "\u65E9",
afternoon: "\u4E0B\u5348",
evening: "\u665A",
night: "\u591C"
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u51CC\u6668",
noon: "\u4E2D\u5348",
morning: "\u65E9\u6668",
afternoon: "\u4E2D\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u9593"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u51CC\u6668",
noon: "\u4E2D\u5348",
morning: "\u65E9\u6668",
afternoon: "\u4E2D\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u9593"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u51CC\u6668",
noon: "\u5348",
morning: "\u65E9",
afternoon: "\u4E0B\u5348",
evening: "\u665A",
night: "\u591C"
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u51CC\u6668",
noon: "\u4E2D\u5348",
morning: "\u65E9\u6668",
afternoon: "\u4E2D\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u9593"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u51CC\u6668",
noon: "\u4E2D\u5348",
morning: "\u65E9\u6668",
afternoon: "\u4E2D\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u9593"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
switch (options === null || options === void 0 ? void 0 : options.unit) {
case "date":
return number + "\u65E5";
case "hour":
return number + "\u6642";
case "minute":
return number + "\u5206";
case "second":
return number + "\u79D2";
default:
return "\u7B2C " + number;
}
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/zh-TW/_lib/match.js
var matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(前)/i,
abbreviated: /^(前)/i,
wide: /^(公元前|公元)/i
};
var parseEraPatterns = {
any: [/^(前)/i, /^(公元)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^第[一二三四]刻/i,
wide: /^第[一二三四]刻鐘/i
};
var parseQuarterPatterns = {
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
};
var matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
};
var parseMonthPatterns = {
narrow: [
/^一/i,
/^二/i,
/^三/i,
/^四/i,
/^五/i,
/^六/i,
/^七/i,
/^八/i,
/^九/i,
/^十(?!(一|二))/i,
/^十一/i,
/^十二/i],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i]
};
var matchDayPatterns = {
narrow: /^[一二三四五六日]/i,
short: /^[一二三四五六日]/i,
abbreviated: /^週[一二三四五六日]/i,
wide: /^星期[一二三四五六日]/i
};
var parseDayPatterns = {
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
};
var matchDayPeriodPatterns = {
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^上午?/i,
pm: /^下午?/i,
midnight: /^午夜/i,
noon: /^[中正]午/i,
morning: /^早上/i,
afternoon: /^下午/i,
evening: /^晚上?/i,
night: /^凌晨/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/zh-TW.js
var zhTW = {
code: "zh-TW",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/zh-TW/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
zhTW: zhTW }) });
//# debugId=CD03D70ACF44E1C864756E2164756E21
//# sourceMappingURL=cdn.js.map
})();
@@ -0,0 +1,7 @@
import { ReactJSX } from "./jsx-namespace.js";
/**
* @desc Utility type for getting props type of React component.
* It takes `defaultProps` into an account - making props with defaults optional.
*/
export type PropsOf<C extends keyof ReactJSX.IntrinsicElements | React.JSXElementConstructor<any>> = ReactJSX.LibraryManagedAttributes<C, React.ComponentProps<C>>;
export type DistributiveOmit<T, U> = T extends any ? Pick<T, Exclude<keyof T, U>> : never;
@@ -0,0 +1,21 @@
import type { DateArg } from "./types.js";
/**
* @name isThisMinute
* @category Minute Helpers
* @summary Is the given date in the same minute as the current date?
* @pure false
*
* @description
* Is the given date in the same minute as the current date?
*
* @param date - The date to check
*
* @returns The date is in this minute
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:30:00 in this minute?
* const result = isThisMinute(new Date(2014, 8, 25, 18, 30))
* //=> true
*/
export declare function isThisMinute(date: DateArg<Date> & {}): boolean;
@@ -0,0 +1 @@
!function(e){var r=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;e.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+r.source+"\\s*\\(\\s*)[a-zA-Z]\\w*"),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,r],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},e.languages.stan.constraint.inside.expression.inside=e.languages.stan}(Prism);
@@ -0,0 +1 @@
{"version":3,"file":"addOriginToSpan.js","sources":["../../../src/utils/addOriginToSpan.ts"],"sourcesContent":["import type { Span } from '@opentelemetry/api';\nimport type { SpanOrigin } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';\n\n/** Adds an origin to an OTEL Span. */\nexport function addOriginToSpan(span: Span, origin: SpanOrigin): void {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);\n}\n"],"names":["SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN"],"mappings":";;;;AAIA;AACO,SAAS,eAAe,CAAC,IAAI,EAAQ,MAAM,EAAoB;AACtE,EAAE,IAAI,CAAC,YAAY,CAACA,qCAAgC,EAAE,MAAM,CAAC;AAC7D;;;;"}
@@ -0,0 +1,27 @@
import { entityKind } from "../../entity.cjs";
import type { GelDialect } from "../dialect.cjs";
import type { GelPreparedQuery, GelQueryResultHKT, GelQueryResultKind, GelSession, PreparedQueryConfig } from "../session.cjs";
import type { GelMaterializedView } from "../view.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import type { RunnableQuery } from "../../runnable-query.cjs";
import type { Query, SQLWrapper } from "../../sql/sql.cjs";
export interface GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>>, RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
readonly _: {
readonly dialect: 'gel';
readonly result: GelQueryResultKind<TQueryResult, never>;
};
}
export declare class GelRefreshMaterializedView<TQueryResult extends GelQueryResultHKT> extends QueryPromise<GelQueryResultKind<TQueryResult, never>> implements RunnableQuery<GelQueryResultKind<TQueryResult, never>, 'gel'>, SQLWrapper {
private session;
private dialect;
static readonly [entityKind]: string;
private config;
constructor(view: GelMaterializedView, session: GelSession, dialect: GelDialect);
concurrently(): this;
withNoData(): this;
toSQL(): Query;
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
execute: GelQueryResultKind<TQueryResult, never>;
}>;
execute: ReturnType<this['prepare']>['execute'];
}
@@ -0,0 +1,36 @@
import { fieldAffectsData } from 'payload/shared';
const getRemainingColumns = (fields, useAsTitle) => fields?.reduce((remaining, field) => {
if (fieldAffectsData(field) && field.name === useAsTitle) {
return remaining;
}
if (!fieldAffectsData(field) && 'fields' in field) {
return [...remaining, ...getRemainingColumns(field.fields, useAsTitle)];
}
if (field.type === 'tabs' && 'tabs' in field) {
return [...remaining, ...field.tabs.reduce((tabFieldColumns, tab) => [...tabFieldColumns, ...('name' in tab ? [tab.name] : getRemainingColumns(tab.fields, useAsTitle))], [])];
}
return [...remaining, field.name];
}, []);
/**
* Returns the initial columns to display in the table based on the following criteria:
* 1. If `defaultColumns` is set in the collection config, use those columns
* 2. Otherwise take `useAtTitle, if set, and the next 3 fields that are not hidden or disabled
*/
export const getInitialColumns = (fields, useAsTitle, defaultColumns) => {
let initialColumns = [];
if (Array.isArray(defaultColumns) && defaultColumns.length >= 1) {
initialColumns = defaultColumns;
} else {
if (useAsTitle) {
initialColumns.push(useAsTitle);
}
const remainingColumns = getRemainingColumns(fields, useAsTitle);
initialColumns = initialColumns.concat(remainingColumns);
initialColumns = initialColumns.slice(0, 4);
}
return initialColumns.map(column => ({
accessor: column,
active: true
}));
};
//# sourceMappingURL=getInitialColumns.js.map
@@ -0,0 +1,9 @@
/**
* The span name SHOULD be set to a low cardinality value
* representing the statement executed on the database.
*
* @returns Operation executed on Tedious Connection. Does not map to SQL statement in any way.
*/
export declare function getSpanName(operation: string, db: string | undefined, sql: string | undefined, bulkLoadTable: string | undefined): string;
export declare const once: (fn: Function) => (...args: unknown[]) => any;
//# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,45 @@
const namedEdges = {
start: 0,
center: 0.5,
end: 1,
};
function resolveEdge(edge, length, inset = 0) {
let delta = 0;
/**
* If we have this edge defined as a preset, replace the definition
* with the numerical value.
*/
if (edge in namedEdges) {
edge = namedEdges[edge];
}
/**
* Handle unit values
*/
if (typeof edge === "string") {
const asNumber = parseFloat(edge);
if (edge.endsWith("px")) {
delta = asNumber;
}
else if (edge.endsWith("%")) {
edge = asNumber / 100;
}
else if (edge.endsWith("vw")) {
delta = (asNumber / 100) * document.documentElement.clientWidth;
}
else if (edge.endsWith("vh")) {
delta = (asNumber / 100) * document.documentElement.clientHeight;
}
else {
edge = asNumber;
}
}
/**
* If the edge is defined as a number, handle as a progress value.
*/
if (typeof edge === "number") {
delta = length * edge;
}
return inset + delta;
}
export { namedEdges, resolveEdge };
@@ -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 9 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 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 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":"0C VC 4C 5C","33":"J"},D:{"1":"0 1 2 3 4 5 6 7 8 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 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"},E:{"1":"J bB K D E F A B C L M G 7C 8C 9C AD cC PC QC 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 ID","2":"6C bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 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":"F B C JD KD LD MD PC xC ND","132":"QC"},G:{"2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD 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:2,C:"CSS resize property",D:true};
@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
export type GelUUIDBuilderInitial<TName extends string> = GelUUIDBuilder<{
name: TName;
dataType: 'string';
columnType: 'GelUUID';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class GelUUIDBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelUUID'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelUUID<T extends ColumnBaseConfig<'string', 'GelUUID'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function uuid(): GelUUIDBuilderInitial<''>;
export declare function uuid<TName extends string>(name: TName): GelUUIDBuilderInitial<TName>;
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/query-builders/index.ts"],"sourcesContent":["/* export * from './attach.ts';\nexport * from './branch.ts';\nexport * from './createMilestone.ts'; */\nexport * from './delete.ts';\n/* export * from './detach.ts'; */\nexport * from './insert.ts';\n/* export * from './optimizeTable.ts'; */\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n"],"mappings":"AAGA,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,68 @@
"use client";
import { jsx } from 'react/jsx-runtime';
import { useState, useRef, useEffect } from 'react';
import { LazyContext } from '../../context/LazyContext.mjs';
import { loadFeatures } from '../../motion/features/load-features.mjs';
/**
* Used in conjunction with the `m` component to reduce bundle size.
*
* `m` is a version of the `motion` component that only loads functionality
* critical for the initial render.
*
* `LazyMotion` can then be used to either synchronously or asynchronously
* load animation and gesture support.
*
* ```jsx
* // Synchronous loading
* import { LazyMotion, m, domAnimation } from "framer-motion"
*
* function App() {
* return (
* <LazyMotion features={domAnimation}>
* <m.div animate={{ scale: 2 }} />
* </LazyMotion>
* )
* }
*
* // Asynchronous loading
* import { LazyMotion, m } from "framer-motion"
*
* function App() {
* return (
* <LazyMotion features={() => import('./path/to/domAnimation')}>
* <m.div animate={{ scale: 2 }} />
* </LazyMotion>
* )
* }
* ```
*
* @public
*/
function LazyMotion({ children, features, strict = false }) {
const [, setIsLoaded] = useState(!isLazyBundle(features));
const loadedRenderer = useRef(undefined);
/**
* If this is a synchronous load, load features immediately
*/
if (!isLazyBundle(features)) {
const { renderer, ...loadedFeatures } = features;
loadedRenderer.current = renderer;
loadFeatures(loadedFeatures);
}
useEffect(() => {
if (isLazyBundle(features)) {
features().then(({ renderer, ...loadedFeatures }) => {
loadFeatures(loadedFeatures);
loadedRenderer.current = renderer;
setIsLoaded(true);
});
}
}, []);
return (jsx(LazyContext.Provider, { value: { renderer: loadedRenderer.current, strict }, children: children }));
}
function isLazyBundle(features) {
return typeof features === "function";
}
export { LazyMotion };
@@ -0,0 +1,26 @@
import toSnakeCase from 'to-snake-case';
import { buildQuery } from './queries/buildQuery.js';
import { getTransaction } from './utilities/getTransaction.js';
export const count = async function count({ collection, locale, req, where: whereArg }) {
const collectionConfig = this.payload.collections[collection].config;
const tableName = this.tableNameMap.get(toSnakeCase(collectionConfig.slug));
const { joins, where } = buildQuery({
adapter: this,
fields: collectionConfig.flattenedFields,
locale,
tableName,
where: whereArg
});
const db = await getTransaction(this, req);
const countResult = await this.countDistinct({
db,
joins,
tableName,
where
});
return {
totalDocs: countResult
};
};
//# sourceMappingURL=count.js.map
@@ -0,0 +1 @@
{"version":3,"file":"isSentryRequestUrl.d.ts","sourceRoot":"","sources":["../../../src/utils/isSentryRequestUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAIxC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAInF"}
@@ -0,0 +1,11 @@
"use strict";
exports.areIntervalsOverlappingWithOptions = void 0;
var _index = require("../areIntervalsOverlapping.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const areIntervalsOverlappingWithOptions =
(exports.areIntervalsOverlappingWithOptions = (0, _index2.convertToFP)(
_index.areIntervalsOverlapping,
3,
));
@@ -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","322":"M","8196":"G N O P"},C:{"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 0B 1B 4C 5C","4162":"2B 3B 4B 5B WC 6B XC 7B 8B 9B AC","16452":"0 1 2 3 4 5 6 7 8 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"},D:{"1":"0 1 2 3 4 5 6 7 8 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 uB vB wB xB yB zB","194":"0B 1B 2B 3B 4B 5B","1090":"WC 6B","8196":"XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC"},E:{"1":"L M G QC 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 ID","2":"J bB K D E F 6C bC 7C 8C 9C AD","514":"A B cC","8196":"C PC"},F:{"1":"0 1 2 3 4 5 6 7 8 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 hB iB jB kB lB mB JD KD LD MD PC xC ND QC","194":"nB oB pB qB rB sB tB uB","8196":"vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC"},G:{"1":"aD bD cD dD 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","2":"E bC OD yC PD QD RD SD TD UD","514":"VD WD XD","8196":"YD ZD"},H:{"2":"mD"},I:{"2":"VC J I nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"2049":"I"},M:{"2":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB zD 0D 1D 2D SC TC UC 3D","2":"J","8196":"tD uD vD wD xD cC yD"},Q:{"8196":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:2,C:"Payment Request API",D:true};
@@ -0,0 +1,3 @@
import type { PayloadHandler } from '../../config/types.js';
export declare const getFileHandler: PayloadHandler;
//# sourceMappingURL=getFile.d.ts.map
@@ -0,0 +1,5 @@
export {
Fragment,
jsx,
jsxs
} from "./emotion-react-jsx-runtime.cjs.js";
@@ -0,0 +1,28 @@
import { relations } from 'drizzle-orm';
export const buildDrizzleRelations = ({ adapter })=>{
for(const tableName in adapter.rawRelations){
const rawRelations = adapter.rawRelations[tableName];
adapter.relations[`relations_${tableName}`] = relations(adapter.tables[tableName], ({ many, one })=>{
const result = {};
for(const key in rawRelations){
const relation = rawRelations[key];
if (relation.type === 'one') {
result[key] = one(adapter.tables[relation.to], {
fields: relation.fields.map((field)=>adapter.tables[field.table][field.name]),
references: relation.references.map((reference)=>adapter.tables[relation.to][reference]),
relationName: relation.relationName
});
} else {
if (adapter.tables[relation.to]) {
result[key] = many(adapter.tables[relation.to], {
relationName: relation.relationName
});
}
}
}
return result;
});
}
};
//# sourceMappingURL=buildDrizzleRelations.js.map
@@ -0,0 +1,33 @@
"use strict";
exports.getDaysInYear = getDaysInYear;
var _index = require("./isLeapYear.js");
var _index2 = require("./toDate.js");
/**
* @name getDaysInYear
* @category Year Helpers
* @summary Get the number of days in a year of the given date.
*
* @description
* Get the number of days in a year of 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 given date
*
* @returns The number of days in a year
*
* @example
* // How many days are in 2012?
* const result = getDaysInYear(new Date(2012, 0, 1))
* //=> 366
*/
function getDaysInYear(date) {
const _date = (0, _index2.toDate)(date);
if (String(new Date(_date)) === "Invalid Date") {
return NaN;
}
return (0, _index.isLeapYear)(_date) ? 366 : 365;
}
@@ -0,0 +1,199 @@
import type { DrizzleSnapshotJSON } from 'drizzle-kit/api';
import type { ColumnBaseConfig, ColumnDataType, DrizzleConfig, Relation, Relations, SQL } from 'drizzle-orm';
import type { NodePgDatabase } from 'drizzle-orm/node-postgres';
import type { ForeignKeyBuilder, IndexBuilder, PgColumn, PgEnum, pgEnum, PgInsertOnConflictDoUpdateConfig, PgSchema, PgTableWithColumns, UniqueConstraintBuilder } from 'drizzle-orm/pg-core';
import type { PgTableFn } from 'drizzle-orm/pg-core/table';
import type { SQLiteColumn } from 'drizzle-orm/sqlite-core';
import type { Payload, PayloadRequest } from 'payload';
import type { ClientConfig, QueryResult } from 'pg';
import type { extendDrizzleTable, Operators } from '../index.js';
import type { BuildQueryJoinAliases, DrizzleAdapter, TransactionPg } from '../types.js';
export type BaseExtraConfig = Record<string, (cols: GenericColumns) => ForeignKeyBuilder | IndexBuilder | UniqueConstraintBuilder>;
export type RelationMap = Map<string, {
localized: boolean;
relationName?: string;
target: string;
type: 'many' | 'one';
}>;
export type GenericColumn = PgColumn<ColumnBaseConfig<ColumnDataType, string>, Record<string, unknown>>;
export type GenericColumns = {
[x: string]: GenericColumn;
};
export type GenericTable = PgTableWithColumns<{
columns: GenericColumns;
dialect: string;
name: string;
schema: string;
}>;
export type GenericEnum = PgEnum<[string, ...string[]]>;
export type GenericRelation = Relations<string, Record<string, Relation<string>>>;
export type PostgresDB = NodePgDatabase<Record<string, unknown>>;
export type CountDistinct = (args: {
column?: PgColumn<any> | SQLiteColumn<any>;
db: PostgresDB | TransactionPg;
joins: BuildQueryJoinAliases;
tableName: string;
where: SQL;
}) => Promise<number>;
export type DeleteWhere = (args: {
db: PostgresDB | TransactionPg;
tableName: string;
where: SQL;
}) => Promise<void>;
export type DropDatabase = (args: {
adapter: BasePostgresAdapter;
}) => Promise<void>;
export type Execute<T> = (args: {
db?: PostgresDB | TransactionPg;
drizzle?: PostgresDB;
raw?: string;
sql?: SQL<unknown>;
}) => Promise<QueryResult<Record<string, T>>>;
export type Insert = (args: {
db: PostgresDB | TransactionPg;
onConflictDoUpdate?: PgInsertOnConflictDoUpdateConfig<any>;
tableName: string;
values: Record<string, unknown> | Record<string, unknown>[];
}) => Promise<Record<string, unknown>[]>;
export type CreateDatabase = (args?: {
/**
* Name of a database, defaults to the current one
*/
name?: string;
/**
* Schema to create in addition to 'public'. Defaults from adapter.schemaName if exists.
*/
schemaName?: string;
}) => Promise<boolean>;
type Schema = {
enum: typeof pgEnum;
table: PgTableFn<string>;
} | PgSchema;
type PostgresSchema = {
enums: Record<string, GenericEnum>;
relations: Record<string, GenericRelation>;
tables: Record<string, PgTableWithColumns<any>>;
};
type PostgresSchemaHookArgs = {
adapter: PostgresDrizzleAdapter;
extendTable: typeof extendDrizzleTable;
schema: PostgresSchema;
};
export type PostgresSchemaHook = (args: PostgresSchemaHookArgs) => PostgresSchema | Promise<PostgresSchema>;
export type BasePostgresAdapter = {
afterSchemaInit: PostgresSchemaHook[];
beforeSchemaInit: PostgresSchemaHook[];
countDistinct: CountDistinct;
createDatabase: CreateDatabase;
createExtensions: () => Promise<void>;
defaultDrizzleSnapshot: DrizzleSnapshotJSON;
deleteWhere: DeleteWhere;
disableCreateDatabase: boolean;
drizzle: PostgresDB;
dropDatabase: DropDatabase;
enums: Record<string, GenericEnum>;
execute: Execute<unknown>;
extensions: Record<string, boolean>;
/**
* An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name
* Used for returning properly formed errors from unique fields
*/
fieldConstraints: Record<string, Record<string, string>>;
idType: 'serial' | 'uuid';
initializing: Promise<void>;
insert: Insert;
localesSuffix?: string;
logger: DrizzleConfig['logger'];
operators: Operators;
pgSchema: Schema;
poolOptions?: ClientConfig;
prodMigrations?: {
down: (args: MigrateDownArgs) => Promise<void>;
name: string;
up: (args: MigrateUpArgs) => Promise<void>;
}[];
push: boolean;
readReplicaOptions?: string[];
rejectInitializing: () => void;
relations: Record<string, GenericRelation>;
relationshipsSuffix?: string;
resolveInitializing: () => void;
schemaName?: string;
sessions: {
[id: string]: {
db: PostgresDB | TransactionPg;
reject: () => Promise<void>;
resolve: () => Promise<void>;
};
};
tableNameMap: Map<string, string>;
tables: Record<string, GenericTable>;
tablesFilter?: string[];
versionsSuffix?: string;
} & PostgresDrizzleAdapter;
export type PostgresDrizzleAdapter = Omit<DrizzleAdapter, 'countDistinct' | 'deleteWhere' | 'drizzle' | 'dropDatabase' | 'execute' | 'insert' | 'operators' | 'relations'>;
export type IDType = 'integer' | 'numeric' | 'uuid' | 'varchar';
export type MigrateUpArgs = {
/**
* The Postgres Drizzle instance that you can use to execute SQL directly within the current transaction.
* @example
* ```ts
* import { type MigrateUpArgs, sql } from '@payloadcms/db-postgres'
*
* export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
* const { rows: posts } = await db.execute(sql`SELECT * FROM posts`)
* }
* ```
*/
db: PostgresDB;
/**
* The Payload instance that you can use to execute Local API methods
* To use the current transaction you must pass `req` to arguments
* @example
* ```ts
* import { type MigrateUpArgs, sql } from '@payloadcms/db-postgres'
*
* export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
* const posts = await payload.find({ collection: 'posts', req })
* }
* ```
*/
payload: Payload;
/**
* The `PayloadRequest` object that contains the current transaction
*/
req: PayloadRequest;
};
export type MigrateDownArgs = {
/**
* The Postgres Drizzle instance that you can use to execute SQL directly within the current transaction.
* @example
* ```ts
* import { type MigrateDownArgs, sql } from '@payloadcms/db-postgres'
*
* export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
* const { rows: posts } = await db.execute(sql`SELECT * FROM posts`)
* }
* ```
*/
db: PostgresDB;
/**
* The Payload instance that you can use to execute Local API methods
* To use the current transaction you must pass `req` to arguments
* @example
* ```ts
* import { type MigrateDownArgs } from '@payloadcms/db-postgres'
*
* export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
* const posts = await payload.find({ collection: 'posts', req })
* }
* ```
*/
payload: Payload;
/**
* The `PayloadRequest` object that contains the current transaction
*/
req: PayloadRequest;
};
export {};
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,37 @@
import { constructFrom } from "./constructFrom.js";
import { constructNow } from "./constructNow.js";
import { isSameDay } from "./isSameDay.js";
import { subDays } from "./subDays.js";
/**
* The {@link isYesterday} function options.
*/
/**
* @name isYesterday
* @category Day Helpers
* @summary Is the given date yesterday?
* @pure false
*
* @description
* Is the given date yesterday?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is yesterday
*
* @example
* // If today is 6 October 2014, is 5 October 14:00:00 yesterday?
* const result = isYesterday(new Date(2014, 9, 5, 14, 0))
* //=> true
*/
export function isYesterday(date, options) {
return isSameDay(
constructFrom(options?.in || date, date),
subDays(constructNow(options?.in || date), 1),
);
}
// Fallback for modularized imports:
export default isYesterday;
@@ -0,0 +1,21 @@
/**
* @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 Aperture = createLucideIcon("Aperture", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m14.31 8 5.74 9.94", key: "1y6ab4" }],
["path", { d: "M9.69 8h11.48", key: "1wxppr" }],
["path", { d: "m7.38 12 5.74-9.94", key: "1grp0k" }],
["path", { d: "M9.69 16 3.95 6.06", key: "libnyf" }],
["path", { d: "M14.31 16H2.83", key: "x5fava" }],
["path", { d: "m16.62 12-5.74 9.94", key: "1vwawt" }]
]);
export { Aperture as default };
//# sourceMappingURL=aperture.js.map
@@ -0,0 +1,247 @@
/*
Copyright (C) 2015 Yusuke Suzuki <utatane.tea@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
"use strict";
/* eslint-disable no-underscore-dangle */
const Scope = require("./scope");
const assert = require("assert");
const GlobalScope = Scope.GlobalScope;
const CatchScope = Scope.CatchScope;
const WithScope = Scope.WithScope;
const ModuleScope = Scope.ModuleScope;
const ClassScope = Scope.ClassScope;
const SwitchScope = Scope.SwitchScope;
const FunctionScope = Scope.FunctionScope;
const ForScope = Scope.ForScope;
const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope;
const BlockScope = Scope.BlockScope;
/**
* @class ScopeManager
*/
class ScopeManager {
constructor(options) {
this.scopes = [];
this.globalScope = null;
this.__nodeToScope = new WeakMap();
this.__currentScope = null;
this.__options = options;
this.__declaredVariables = new WeakMap();
}
__useDirective() {
return this.__options.directive;
}
__isOptimistic() {
return this.__options.optimistic;
}
__ignoreEval() {
return this.__options.ignoreEval;
}
__isNodejsScope() {
return this.__options.nodejsScope;
}
isModule() {
return this.__options.sourceType === "module";
}
isImpliedStrict() {
return this.__options.impliedStrict;
}
isStrictModeSupported() {
return this.__options.ecmaVersion >= 5;
}
// Returns appropriate scope for this node.
__get(node) {
return this.__nodeToScope.get(node);
}
/**
* Get variables that are declared by the node.
*
* "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`.
* If the node declares nothing, this method returns an empty array.
* CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details.
*
* @param {Espree.Node} node - a node to get.
* @returns {Variable[]} variables that declared by the node.
*/
getDeclaredVariables(node) {
return this.__declaredVariables.get(node) || [];
}
/**
* acquire scope from node.
* @method ScopeManager#acquire
* @param {Espree.Node} node - node for the acquired scope.
* @param {boolean=} inner - look up the most inner scope, default value is false.
* @returns {Scope?} Scope from node
*/
acquire(node, inner) {
/**
* predicate
* @param {Scope} testScope - scope to test
* @returns {boolean} predicate
*/
function predicate(testScope) {
if (testScope.type === "function" && testScope.functionExpressionScope) {
return false;
}
return true;
}
const scopes = this.__get(node);
if (!scopes || scopes.length === 0) {
return null;
}
// Heuristic selection from all scopes.
// If you would like to get all scopes, please use ScopeManager#acquireAll.
if (scopes.length === 1) {
return scopes[0];
}
if (inner) {
for (let i = scopes.length - 1; i >= 0; --i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
} else {
for (let i = 0, iz = scopes.length; i < iz; ++i) {
const scope = scopes[i];
if (predicate(scope)) {
return scope;
}
}
}
return null;
}
/**
* acquire all scopes from node.
* @method ScopeManager#acquireAll
* @param {Espree.Node} node - node for the acquired scope.
* @returns {Scopes?} Scope array
*/
acquireAll(node) {
return this.__get(node);
}
/**
* release the node.
* @method ScopeManager#release
* @param {Espree.Node} node - releasing node.
* @param {boolean=} inner - look up the most inner scope, default value is false.
* @returns {Scope?} upper scope for the node.
*/
release(node, inner) {
const scopes = this.__get(node);
if (scopes && scopes.length) {
const scope = scopes[0].upper;
if (!scope) {
return null;
}
return this.acquire(scope.block, inner);
}
return null;
}
attach() { } // eslint-disable-line class-methods-use-this
detach() { } // eslint-disable-line class-methods-use-this
__nestScope(scope) {
if (scope instanceof GlobalScope) {
assert(this.__currentScope === null);
this.globalScope = scope;
}
this.__currentScope = scope;
return scope;
}
__nestGlobalScope(node) {
return this.__nestScope(new GlobalScope(this, node));
}
__nestBlockScope(node) {
return this.__nestScope(new BlockScope(this, this.__currentScope, node));
}
__nestFunctionScope(node, isMethodDefinition) {
return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition));
}
__nestForScope(node) {
return this.__nestScope(new ForScope(this, this.__currentScope, node));
}
__nestCatchScope(node) {
return this.__nestScope(new CatchScope(this, this.__currentScope, node));
}
__nestWithScope(node) {
return this.__nestScope(new WithScope(this, this.__currentScope, node));
}
__nestClassScope(node) {
return this.__nestScope(new ClassScope(this, this.__currentScope, node));
}
__nestSwitchScope(node) {
return this.__nestScope(new SwitchScope(this, this.__currentScope, node));
}
__nestModuleScope(node) {
return this.__nestScope(new ModuleScope(this, this.__currentScope, node));
}
__nestFunctionExpressionNameScope(node) {
return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node));
}
__isES6() {
return this.__options.ecmaVersion >= 6;
}
}
module.exports = ScopeManager;
/* vim: set sw=4 ts=4 et tw=80 : */
@@ -0,0 +1,13 @@
export interface ServerReference {
$$typeof: symbol;
$$id: string;
}
export type ServerFunction = ServerReference & ((...args: unknown[]) => Promise<unknown>);
/**
* Check if the function is a use cache function.
*
* @param value - The function to check.
* @returns true if the function is a use cache function, false otherwise.
*/
export declare function isUseCacheFunction<T>(value: T & Partial<ServerReference>): value is T & ServerFunction;
//# sourceMappingURL=isUseCacheFunction.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"pause-circle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,6 @@
import React from 'react';
import './index.scss';
export declare const RowField: React.FC<Omit<import("payload").FieldPaths, "path"> & Pick<import("payload").ClientComponentProps, "forceRender"> & {
readonly field: Omit<import("payload").RowFieldClient, "type"> & Partial<Pick<import("payload").RowFieldClient, "type">>;
} & Omit<import("payload").ClientComponentProps, "customComponents" | "field">>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
export declare const LANGGRAPH_INTEGRATION_NAME = "LangGraph";
export declare const LANGGRAPH_ORIGIN = "auto.ai.langgraph";
//# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('forInRight', require('../forInRight'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,19 @@
export const buildIndexName = ({ name, adapter, appendSuffix = true, number = 0 })=>{
let indexName = `${name}${number ? `_${number}` : ''}${appendSuffix ? '_idx' : ''}`;
if (indexName.length > 60) {
const suffix = `${number ? `_${number}` : ''}${appendSuffix ? '_idx' : ''}`;
indexName = `${name.slice(0, 60 - suffix.length)}${suffix}`;
}
if (!adapter.indexes.has(indexName) && !(indexName in adapter.rawTables)) {
adapter.indexes.add(indexName);
return indexName;
}
return buildIndexName({
name,
adapter,
appendSuffix,
number: number + 1
});
};
//# sourceMappingURL=buildIndexName.js.map
@@ -0,0 +1,21 @@
import { DirectusCollection } from "../../../schema/collection.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/collections.d.ts
type ReadCollectionOutput<Schema, Item extends object = DirectusCollection<Schema>> = ApplyQueryFields<Schema, Item, '*'>;
/**
* List the available collections.
* @returns An array of collection objects.
*/
declare const readCollections: <Schema>() => RestCommand<ReadCollectionOutput<Schema>[], Schema>;
/**
* Retrieve a single collection by table name.
* @param collection The collection name
* @returns A collection object.
* @throws Will throw if collection is empty
*/
declare const readCollection: <Schema>(collection: DirectusCollection<Schema>["collection"]) => RestCommand<ReadCollectionOutput<Schema>, Schema>;
//#endregion
export { ReadCollectionOutput, readCollection, readCollections };
//# sourceMappingURL=collections.d.cts.map
@@ -0,0 +1,3 @@
import type { ColumnToCodeConverter } from '../types.js';
export declare const columnToCodeConverter: ColumnToCodeConverter;
//# sourceMappingURL=columnToCodeConverter.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"pilcrow-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,3 @@
import type { Field } from './config/types.js';
export declare const mergeBaseFields: (fields: Field[], baseFields: Field[]) => Field[];
//# sourceMappingURL=mergeBaseFields.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"anr.js","sources":["../../../src/utils/anr.ts"],"sourcesContent":["import type { StackFrame } from '../types-hoist/stackframe';\nimport { filenameIsInApp } from './node-stack-trace';\nimport { UNKNOWN_FUNCTION } from './stacktrace';\n\ntype WatchdogReturn = {\n /** Resets the watchdog timer */\n poll: () => void;\n /** Enables or disables the watchdog timer */\n enabled: (state: boolean) => void;\n};\n\ntype CreateTimerImpl = () => { getTimeMs: () => number; reset: () => void };\n\n/**\n * A node.js watchdog timer\n * @param pollInterval The interval that we expect to get polled at\n * @param anrThreshold The threshold for when we consider ANR\n * @param callback The callback to call for ANR\n * @returns An object with `poll` and `enabled` functions {@link WatchdogReturn}\n */\nexport function watchdogTimer(\n createTimer: CreateTimerImpl,\n pollInterval: number,\n anrThreshold: number,\n callback: () => void,\n): WatchdogReturn {\n const timer = createTimer();\n let triggered = false;\n let enabled = true;\n\n setInterval(() => {\n const diffMs = timer.getTimeMs();\n\n if (triggered === false && diffMs > pollInterval + anrThreshold) {\n triggered = true;\n if (enabled) {\n callback();\n }\n }\n\n if (diffMs < pollInterval + anrThreshold) {\n triggered = false;\n }\n }, 20);\n\n return {\n poll: () => {\n timer.reset();\n },\n enabled: (state: boolean) => {\n enabled = state;\n },\n };\n}\n\n// types copied from inspector.d.ts\ninterface Location {\n scriptId: string;\n lineNumber: number;\n columnNumber?: number;\n}\n\ninterface CallFrame {\n functionName: string;\n location: Location;\n url: string;\n}\n\n/**\n * Converts Debugger.CallFrame to Sentry StackFrame\n */\nexport function callFrameToStackFrame(\n frame: CallFrame,\n url: string | undefined,\n getModuleFromFilename: (filename: string | undefined) => string | undefined,\n): StackFrame {\n const filename = url ? url.replace(/^file:\\/\\//, '') : undefined;\n\n // CallFrame row/col are 0 based, whereas StackFrame are 1 based\n const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined;\n const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined;\n\n return {\n filename,\n module: getModuleFromFilename(filename),\n function: frame.functionName || UNKNOWN_FUNCTION,\n colno,\n lineno,\n in_app: filename ? filenameIsInApp(filename) : undefined,\n };\n}\n"],"names":["UNKNOWN_FUNCTION","filenameIsInApp"],"mappings":";;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa;AAC7B,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAkB;AAClB,EAAE,MAAM,KAAA,GAAQ,WAAW,EAAE;AAC7B,EAAE,IAAI,SAAA,GAAY,KAAK;AACvB,EAAE,IAAI,OAAA,GAAU,IAAI;;AAEpB,EAAE,WAAW,CAAC,MAAM;AACpB,IAAI,MAAM,MAAA,GAAS,KAAK,CAAC,SAAS,EAAE;;AAEpC,IAAI,IAAI,SAAA,KAAc,KAAA,IAAS,MAAA,GAAS,YAAA,GAAe,YAAY,EAAE;AACrE,MAAM,SAAA,GAAY,IAAI;AACtB,MAAM,IAAI,OAAO,EAAE;AACnB,QAAQ,QAAQ,EAAE;AAClB,MAAM;AACN,IAAI;;AAEJ,IAAI,IAAI,MAAA,GAAS,YAAA,GAAe,YAAY,EAAE;AAC9C,MAAM,SAAA,GAAY,KAAK;AACvB,IAAI;AACJ,EAAE,CAAC,EAAE,EAAE,CAAC;;AAER,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,MAAM,KAAK,CAAC,KAAK,EAAE;AACnB,IAAI,CAAC;AACL,IAAI,OAAO,EAAE,CAAC,KAAK,KAAc;AACjC,MAAM,OAAA,GAAU,KAAK;AACrB,IAAI,CAAC;AACL,GAAG;AACH;;AAEA;;AAaA;AACA;AACA;AACO,SAAS,qBAAqB;AACrC,EAAE,KAAK;AACP,EAAE,GAAG;AACL,EAAE,qBAAqB;AACvB,EAAc;AACd,EAAE,MAAM,QAAA,GAAW,GAAA,GAAM,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAA,GAAI,SAAS;;AAElE;AACA,EAAE,MAAM,KAAA,GAAQ,KAAK,CAAC,QAAQ,CAAC,YAAA,GAAe,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAA,GAAI,SAAS;AACzF,EAAE,MAAM,MAAA,GAAS,KAAK,CAAC,QAAQ,CAAC,UAAA,GAAa,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAA,GAAI,SAAS;;AAEtF,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC;AAC3C,IAAI,QAAQ,EAAE,KAAK,CAAC,YAAA,IAAgBA,2BAAgB;AACpD,IAAI,KAAK;AACT,IAAI,MAAM;AACV,IAAI,MAAM,EAAE,QAAA,GAAWC,8BAAe,CAAC,QAAQ,CAAA,GAAI,SAAS;AAC5D,GAAG;AACH;;;;;"}
@@ -0,0 +1,179 @@
#!/usr/bin/env python3
import argparse
import base64
import hashlib
import os.path
import shutil
import tempfile
import zipfile
from typing import NamedTuple
class Wheel(NamedTuple):
src: str
plat: str
exe: str = 'sentry-cli'
WHEELS = (
Wheel(
src='sentry-cli-Darwin-arm64',
plat='macosx_11_0_arm64',
),
Wheel(
src='sentry-cli-Darwin-universal',
plat='macosx_11_0_universal2',
),
Wheel(
src='sentry-cli-Darwin-x86_64',
plat='macosx_10_15_x86_64',
),
Wheel(
src='sentry-cli-Linux-aarch64',
plat='manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_2_aarch64',
),
Wheel(
src='sentry-cli-Linux-armv7',
plat='manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_2_armv7l',
),
Wheel(
src='sentry-cli-Linux-i686',
plat='manylinux_2_17_i686.manylinux2014_i686.musllinux_1_2_i686',
),
Wheel(
src='sentry-cli-Linux-x86_64',
plat='manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_2_x86_64',
),
Wheel(
src='sentry-cli-Windows-i686.exe',
plat='win32',
exe='sentry-cli.exe',
),
Wheel(
src='sentry-cli-Windows-x86_64.exe',
plat='win_amd64',
exe='sentry-cli.exe',
),
Wheel(
src='sentry-cli-Windows-aarch64.exe',
plat='win_arm64',
exe='sentry-cli.exe',
),
)
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument('--binaries', required=True)
parser.add_argument('--base', required=True)
parser.add_argument('--dest', required=True)
args = parser.parse_args()
expected = {wheel.src for wheel in WHEELS}
received = set(os.listdir(args.binaries))
if expected < received:
raise SystemExit(
f'Unexpected binaries:\n\n'
f'- extra: {", ".join(sorted(received - expected))}\n'
f'- missing: {", ".join(sorted(expected - received))}'
)
sdist_path = wheel_path = None
for fname in os.listdir(args.base):
if fname.endswith('.tar.gz'):
sdist_path = os.path.join(args.base, fname)
elif fname.endswith('.whl'):
wheel_path = os.path.join(args.base, fname)
else:
raise SystemExit(f'unexpected file in `--base`: {fname}')
if sdist_path is None or wheel_path is None:
raise SystemExit('expected wheel and sdist in `--base`')
os.makedirs(args.dest, exist_ok=True)
shutil.copy(sdist_path, args.dest)
for wheel in WHEELS:
binary_src = os.path.join(args.binaries, wheel.src)
binary_size = os.stat(binary_src).st_size
with open(binary_src, 'rb') as bf:
digest = hashlib.sha256(bf.read()).digest()
digest_b64 = base64.urlsafe_b64encode(digest).rstrip(b'=').decode()
basename = os.path.basename(wheel_path)
wheelname, _ = os.path.splitext(basename)
name, version, py, abi, plat = wheelname.split('-')
with tempfile.TemporaryDirectory() as tmp:
with zipfile.ZipFile(wheel_path) as zipf:
zipf.extractall(tmp)
distinfo = os.path.join(tmp, f'{name}-{version}.dist-info')
scripts = os.path.join(tmp, f'{name}-{version}.data', 'scripts')
# replace the script binary with our copy
os.remove(os.path.join(scripts, 'sentry-cli'))
shutil.copy(binary_src, os.path.join(scripts, wheel.exe))
# rewrite RECORD to include the new file
record_fname = os.path.join(distinfo, 'RECORD')
with open(record_fname) as f:
record_lines = list(f)
record = f'{name}-{version}.data/scripts/sentry-cli,'
for i, line in enumerate(record_lines):
if line.startswith(record):
record_lines[i] = (
f'{name}-{version}.data/scripts/{wheel.exe},'
f'sha256={digest_b64},'
f'{binary_size}\n'
)
break
else:
raise SystemExit(f'could not find {record!r} in RECORD')
with open(record_fname, 'w') as f:
f.writelines(record_lines)
# rewrite WHEEL to have the new tags
wheel_fname = os.path.join(distinfo, 'WHEEL')
with open(wheel_fname) as f:
wheel_lines = list(f)
for i, line in enumerate(wheel_lines):
if line.startswith('Tag: '):
wheel_lines[i:i + 1] = [
f'Tag: {py}-{abi}-{plat}\n'
for plat in wheel.plat.split('.')
]
break
else:
raise SystemExit("could not find 'Tag: ' in WHEEL")
with open(wheel_fname, 'w') as f:
f.writelines(wheel_lines)
# write out the final zip
new_basename = f'{name}-{version}-{py}-{abi}-{wheel.plat}.whl'
tmp_new_wheel = os.path.join(tmp, new_basename)
fnames = sorted(
os.path.join(root, fname)
for root, _, fnames in os.walk(tmp)
for fname in fnames
)
with zipfile.ZipFile(tmp_new_wheel, 'w') as zipf:
for fname in fnames:
zinfo = zipfile.ZipInfo(os.path.relpath(fname, tmp))
if '/scripts/' in zinfo.filename:
zinfo.external_attr = 0o100755 << 16
with open(fname, 'rb') as fb:
zipf.writestr(zinfo, fb.read())
# move into dest
shutil.move(tmp_new_wheel, args.dest)
return 0
if __name__ == '__main__':
raise SystemExit(main())
@@ -0,0 +1,133 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
var common = require('./common');
var assert = require('assert');
var events = require('../');
var test = require('tape');
function expect(expected) {
var actual = [];
test.onFinish(function() {
var sortedActual = actual.sort();
var sortedExpected = expected.sort();
assert.strictEqual(sortedActual.length, sortedExpected.length);
for (var index = 0; index < sortedActual.length; index++) {
var value = sortedActual[index];
assert.strictEqual(value, sortedExpected[index]);
}
});
function listener(name) {
actual.push(name);
}
return common.mustCall(listener, expected.length);
}
{
var ee = new events.EventEmitter();
var noop = common.mustNotCall();
ee.on('foo', noop);
ee.on('bar', noop);
ee.on('baz', noop);
ee.on('baz', noop);
var fooListeners = ee.listeners('foo');
var barListeners = ee.listeners('bar');
var bazListeners = ee.listeners('baz');
ee.on('removeListener', expect(['bar', 'baz', 'baz']));
ee.removeAllListeners('bar');
ee.removeAllListeners('baz');
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 1);
assert.strictEqual(listeners[0], noop);
listeners = ee.listeners('bar');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
listeners = ee.listeners('baz');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
// After calling removeAllListeners(),
// the old listeners array should stay unchanged.
assert.strictEqual(fooListeners.length, 1);
assert.strictEqual(fooListeners[0], noop);
assert.strictEqual(barListeners.length, 1);
assert.strictEqual(barListeners[0], noop);
assert.strictEqual(bazListeners.length, 2);
assert.strictEqual(bazListeners[0], noop);
assert.strictEqual(bazListeners[1], noop);
// After calling removeAllListeners(),
// new listeners arrays is different from the old.
assert.notStrictEqual(ee.listeners('bar'), barListeners);
assert.notStrictEqual(ee.listeners('baz'), bazListeners);
}
{
var ee = new events.EventEmitter();
ee.on('foo', common.mustNotCall());
ee.on('bar', common.mustNotCall());
// Expect LIFO order
ee.on('removeListener', expect(['foo', 'bar', 'removeListener']));
ee.on('removeListener', expect(['foo', 'bar']));
ee.removeAllListeners();
var listeners = ee.listeners('foo');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
listeners = ee.listeners('bar');
assert.ok(Array.isArray(listeners));
assert.strictEqual(listeners.length, 0);
}
{
var ee = new events.EventEmitter();
ee.on('removeListener', common.mustNotCall());
// Check for regression where removeAllListeners() throws when
// there exists a 'removeListener' listener, but there exists
// no listeners for the provided event type.
assert.doesNotThrow(function () { ee.removeAllListeners(ee, 'foo') });
}
{
var ee = new events.EventEmitter();
var expectLength = 2;
ee.on('removeListener', function() {
assert.strictEqual(expectLength--, this.listeners('baz').length);
});
ee.on('baz', common.mustNotCall());
ee.on('baz', common.mustNotCall());
ee.on('baz', common.mustNotCall());
assert.strictEqual(ee.listeners('baz').length, expectLength + 1);
ee.removeAllListeners('baz');
assert.strictEqual(ee.listeners('baz').length, 0);
}
{
var ee = new events.EventEmitter();
assert.strictEqual(ee, ee.removeAllListeners());
}
{
var ee = new events.EventEmitter();
ee._events = undefined;
assert.strictEqual(ee, ee.removeAllListeners());
}
@@ -0,0 +1,138 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern =
/^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i;
const parseOrdinalNumberPattern = /^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i;
const matchEraPatterns = {
narrow: /^ל(ספירה|פנה״ס)/i,
abbreviated: /^ל(ספירה|פנה״ס)/i,
wide: /^ל(פני ה)?ספירה/i,
};
const parseEraPatterns = {
any: [/^לפ/i, /^לס/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^רבעון [1234]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^\d+/i,
abbreviated: /^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,
wide: /^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i,
};
const parseMonthPatterns = {
narrow: [
/^1$/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i,
],
any: [
/^ינ/i,
/^פ/i,
/^מר/i,
/^אפ/i,
/^מא/i,
/^יונ/i,
/^יול/i,
/^אוג/i,
/^ס/i,
/^אוק/i,
/^נ/i,
/^ד/i,
],
};
const matchDayPatterns = {
narrow: /^[אבגדהוש]׳/i,
short: /^[אבגדהוש]׳/i,
abbreviated: /^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,
wide: /^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i,
};
const parseDayPatterns = {
abbreviated: [/א׳$/i, /ב׳$/i, /ג׳$/i, /ד׳$/i, /ה׳$/i, /ו׳$/i, /^ש/i],
wide: [/ן$/i, /ני$/i, /לישי$/i, /עי$/i, /מישי$/i, /שישי$/i, /ת$/i],
any: [/^א/i, /^ב/i, /^ג/i, /^ד/i, /^ה/i, /^ו/i, /^ש/i],
};
const matchDayPeriodPatterns = {
any: /^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^לפ/i,
pm: /^אחה/i,
midnight: /^ח/i,
noon: /^צ/i,
morning: /בוקר/i,
afternoon: /בצ|אחר/i,
evening: /ערב/i,
night: /לילה/i,
},
};
const ordinalName = ["רא", "שנ", "של", "רב", "ח", "שי", "שב", "שמ", "ת", "ע"];
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => {
const number = parseInt(value, 10);
return isNaN(number) ? ordinalName.indexOf(value) + 1 : number;
},
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

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