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

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

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​មុនម៉ោង' p",
yesterday: "'ម្សិលមិញនៅម៉ោង' p",
today: "'ថ្ងៃនេះម៉ោង' p",
tomorrow: "'ថ្ងៃស្អែកម៉ោង' p",
nextWeek: "'ថ្ងៃ'eeee'ស​ប្តា​ហ៍​ក្រោយម៉ោង' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1,7 @@
{
"name": "dom-helpers/addClass",
"private": true,
"main": "../cjs/addClass.js",
"module": "../esm/addClass.js",
"types": "../esm/addClass.d.ts"
}

View File

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

View File

@@ -0,0 +1,25 @@
import { Span as WriteableSpan, SpanKind, Tracer } from '@opentelemetry/api';
import { BasicTracerProvider, ReadableSpan } from '@opentelemetry/sdk-trace-base';
import { Scope, Span, StartSpanOptions } from '@sentry/core';
export interface OpenTelemetryClient {
tracer: Tracer;
traceProvider: BasicTracerProvider | undefined;
}
export interface OpenTelemetrySpanContext extends StartSpanOptions {
kind?: SpanKind;
}
/**
* The base `Span` type is basically a `WriteableSpan`.
* There are places where we basically want to allow passing _any_ span,
* so in these cases we type this as `AbstractSpan` which could be either a regular `Span` or a `ReadableSpan`.
* You'll have to make sure to check relevant fields before accessing them.
*
* Note that technically, the `Span` exported from `@opentelemetry/sdk-trace-base` matches this,
* but we cannot be 100% sure that we are actually getting such a span, so this type is more defensive.
*/
export type AbstractSpan = WriteableSpan | ReadableSpan | Span;
export interface CurrentScopes {
scope: Scope;
isolationScope: Scope;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ruler.js","sources":["../../../src/icons/ruler.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Ruler\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMyAxNS4zYTIuNCAyLjQgMCAwIDEgMCAzLjRsLTIuNiAyLjZhMi40IDIuNCAwIDAgMS0zLjQgMEwyLjcgOC43YTIuNDEgMi40MSAwIDAgMSAwLTMuNGwyLjYtMi42YTIuNDEgMi40MSAwIDAgMSAzLjQgMFoiIC8+CiAgPHBhdGggZD0ibTE0LjUgMTIuNSAyLTIiIC8+CiAgPHBhdGggZD0ibTExLjUgOS41IDItMiIgLz4KICA8cGF0aCBkPSJtOC41IDYuNSAyLTIiIC8+CiAgPHBhdGggZD0ibTE3LjUgMTUuNSAyLTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/ruler\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 Ruler = createLucideIcon('Ruler', [\n [\n 'path',\n {\n d: 'M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z',\n key: 'icamh8',\n },\n ],\n ['path', { d: 'm14.5 12.5 2-2', key: 'inckbg' }],\n ['path', { d: 'm11.5 9.5 2-2', key: 'fmmyf7' }],\n ['path', { d: 'm8.5 6.5 2-2', key: 'vc6u1g' }],\n ['path', { d: 'm17.5 15.5 2-2', key: 'wo5hmg' }],\n]);\n\nexport default Ruler;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,31 @@
{
"name": "@babel/helper-validator-identifier",
"version": "7.28.5",
"description": "Validate identifier/keywords name",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-validator-identifier"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"devDependencies": {
"@unicode/unicode-17.0.0": "^1.6.10",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}

View File

@@ -0,0 +1,219 @@
const definitions = require("../src/definitions");
const flatMap = require("array.prototype.flatmap");
const {
typeSignature,
iterateProps,
mapProps,
filterProps,
unique,
} = require("./util");
const stdout = process.stdout;
const jsTypes = ["string", "number", "boolean"];
const quote = (value) => `"${value}"`;
function params(fields) {
const optionalDefault = (field) =>
field.default ? ` = ${field.default}` : "";
return mapProps(fields)
.map((field) => `${typeSignature(field)}${optionalDefault(field)}`)
.join(",");
}
function assertParamType({ assertNodeType, array, name, type }) {
if (array) {
// TODO - assert contents of array?
return `assert(typeof ${name} === "object" && typeof ${name}.length !== "undefined")\n`;
} else {
if (jsTypes.includes(type)) {
return `assert(
typeof ${name} === "${type}",
"Argument ${name} must be of type ${type}, given: " + typeof ${name}
)`;
}
if (assertNodeType === true) {
return `assert(
${name}.type === "${type}",
"Argument ${name} must be of type ${type}, given: " + ${name}.type
)`;
}
return "";
}
}
function assertParam(meta) {
const paramAssertion = assertParamType(meta);
if (paramAssertion === "") {
return "";
}
if (meta.maybe || meta.optional) {
return `
if (${meta.name} !== null && ${meta.name} !== undefined) {
${paramAssertion};
}
`;
} else {
return paramAssertion;
}
}
function assertParams(fields) {
return mapProps(fields).map(assertParam).join("\n");
}
function buildObject(typeDef) {
const optionalField = (meta) => {
if (meta.array) {
// omit optional array properties if the constructor function was supplied
// with an empty array
return `
if (typeof ${meta.name} !== "undefined" && ${meta.name}.length > 0) {
node.${meta.name} = ${meta.name};
}
`;
} else if (meta.type === "Object") {
// omit optional object properties if they have no keys
return `
if (typeof ${meta.name} !== "undefined" && Object.keys(${meta.name}).length !== 0) {
node.${meta.name} = ${meta.name};
}
`;
} else if (meta.type === "boolean") {
// omit optional boolean properties if they are not true
return `
if (${meta.name} === true) {
node.${meta.name} = true;
}
`;
} else {
return `
if (typeof ${meta.name} !== "undefined") {
node.${meta.name} = ${meta.name};
}
`;
}
};
const fields = mapProps(typeDef.fields)
.filter((f) => !f.optional && !f.constant)
.map((f) => f.name);
const constants = mapProps(typeDef.fields)
.filter((f) => f.constant)
.map((f) => `${f.name}: "${f.value}"`);
return `
const node: ${typeDef.flowTypeName || typeDef.name} = {
type: "${typeDef.name}",
${constants.concat(fields).join(",")}
}
${mapProps(typeDef.fields)
.filter((f) => f.optional)
.map(optionalField)
.join("")}
`;
}
function lowerCamelCase(name) {
return name.substring(0, 1).toLowerCase() + name.substring(1);
}
function generate() {
stdout.write(`
// @flow
// THIS FILE IS AUTOGENERATED
// see scripts/generateNodeUtils.js
import { assert } from "mamacro";
function isTypeOf(t: string) {
return (n: Node) => n.type === t;
}
function assertTypeOf(t: string) {
return (n: Node) => assert(n.type === t);
}
`);
// Node builders
iterateProps(definitions, (typeDefinition) => {
stdout.write(`
export function ${lowerCamelCase(typeDefinition.name)} (
${params(filterProps(typeDefinition.fields, (f) => !f.constant))}
): ${typeDefinition.name} {
${assertParams(filterProps(typeDefinition.fields, (f) => !f.constant))}
${buildObject(typeDefinition)}
return node;
}
`);
});
// Node testers
iterateProps(definitions, (typeDefinition) => {
stdout.write(`
export const is${typeDefinition.name}: ((n: Node) => boolean) =
isTypeOf("${typeDefinition.name}");
`);
});
// Node union type testers
const unionTypes = unique(
flatMap(
mapProps(definitions).filter((d) => d.unionType),
(d) => d.unionType
)
);
unionTypes.forEach((unionType) => {
stdout.write(
`
export const is${unionType} = (node: Node): boolean => ` +
mapProps(definitions)
.filter((d) => d.unionType && d.unionType.includes(unionType))
.map((d) => `is${d.name}(node) `)
.join("||") +
";\n\n"
);
});
// Node assertion
iterateProps(definitions, (typeDefinition) => {
stdout.write(`
export const assert${typeDefinition.name}: ((n: Node) => void) =
assertTypeOf("${typeDefinition.name}");
`);
});
// a map from node type to its set of union types
stdout.write(
`
export const unionTypesMap = {` +
mapProps(definitions)
.filter((d) => d.unionType)
.map((t) => `"${t.name}": [${t.unionType.map(quote).join(",")}]\n`) +
`};
`
);
// an array of all node and union types
stdout.write(
`
export const nodeAndUnionTypes = [` +
mapProps(definitions)
.map((t) => `"${t.name}"`)
.concat(unionTypes.map(quote))
.join(",") +
`];`
);
}
generate();

View File

@@ -0,0 +1,242 @@
import { fieldShouldBeLocalized, groupHasName } from 'payload/shared';
import { fieldHasChanges } from './fieldHasChanges.js';
import { getFieldsForRowComparison } from './getFieldsForRowComparison.js';
/**
* Recursively counts the number of changed fields between comparison and
* version data for a given set of fields.
*/
export function countChangedFields({
config,
fields,
locales,
parentIsLocalized,
valueFrom,
valueTo
}) {
let count = 0;
fields.forEach(field => {
// Don't count the id field since it is not displayed in the UI
if ('name' in field && field.name === 'id') {
return;
}
const fieldType = field.type;
switch (fieldType) {
// Iterable fields are arrays and blocks fields. We iterate over each row and
// count the number of changed fields in each.
case 'array':
case 'blocks':
{
if (locales && fieldShouldBeLocalized({
field,
parentIsLocalized
})) {
locales.forEach(locale => {
const valueFromRows = valueFrom?.[field.name]?.[locale] ?? [];
const valueToRows = valueTo?.[field.name]?.[locale] ?? [];
count += countChangedFieldsInRows({
config,
field,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFromRows,
valueToRows
});
});
} else {
const valueFromRows = valueFrom?.[field.name] ?? [];
const valueToRows = valueTo?.[field.name] ?? [];
count += countChangedFieldsInRows({
config,
field,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFromRows,
valueToRows
});
}
break;
}
// Regular fields without nested fields.
case 'checkbox':
case 'code':
case 'date':
case 'email':
case 'join':
case 'json':
case 'number':
case 'point':
case 'radio':
case 'relationship':
case 'richText':
case 'select':
case 'text':
case 'textarea':
case 'upload':
{
// Fields that have a name and contain data. We can just check if the data has changed.
if (locales && fieldShouldBeLocalized({
field,
parentIsLocalized
})) {
locales.forEach(locale => {
if (fieldHasChanges(valueTo?.[field.name]?.[locale], valueFrom?.[field.name]?.[locale])) {
count++;
}
});
} else if (fieldHasChanges(valueTo?.[field.name], valueFrom?.[field.name])) {
count++;
}
break;
}
// Fields that have nested fields, but don't nest their fields' data.
case 'collapsible':
case 'row':
{
count += countChangedFields({
config,
fields: field.fields,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFrom,
valueTo
});
break;
}
// Fields that have nested fields and nest their fields' data.
case 'group':
{
if (groupHasName(field)) {
if (locales && fieldShouldBeLocalized({
field,
parentIsLocalized
})) {
locales.forEach(locale => {
count += countChangedFields({
config,
fields: field.fields,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFrom: valueFrom?.[field.name]?.[locale],
valueTo: valueTo?.[field.name]?.[locale]
});
});
} else {
count += countChangedFields({
config,
fields: field.fields,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFrom: valueFrom?.[field.name],
valueTo: valueTo?.[field.name]
});
}
} else {
// Unnamed group field: data is NOT nested under `field.name`
count += countChangedFields({
config,
fields: field.fields,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFrom,
valueTo
});
}
break;
}
// Each tab in a tabs field has nested fields. The fields data may be
// nested or not depending on the existence of a name property.
case 'tabs':
{
field.tabs.forEach(tab => {
if ('name' in tab && locales && tab.localized) {
// Named localized tab
locales.forEach(locale => {
count += countChangedFields({
config,
fields: tab.fields,
locales,
parentIsLocalized: parentIsLocalized || tab.localized,
valueFrom: valueFrom?.[tab.name]?.[locale],
valueTo: valueTo?.[tab.name]?.[locale]
});
});
} else if ('name' in tab) {
// Named tab
count += countChangedFields({
config,
fields: tab.fields,
locales,
parentIsLocalized: parentIsLocalized || tab.localized,
valueFrom: valueFrom?.[tab.name],
valueTo: valueTo?.[tab.name]
});
} else {
// Unnamed tab
count += countChangedFields({
config,
fields: tab.fields,
locales,
parentIsLocalized: parentIsLocalized || tab.localized,
valueFrom,
valueTo
});
}
});
break;
}
// UI fields don't have data and are not displayed in the version view
// so we can ignore them.
case 'ui':
{
break;
}
default:
{
const _exhaustiveCheck = fieldType;
throw new Error(`Unexpected field.type in countChangedFields : ${String(fieldType)}`);
}
}
});
return count;
}
export function countChangedFieldsInRows({
config,
field,
locales,
parentIsLocalized,
valueFromRows = [],
valueToRows = []
}) {
let count = 0;
let i = 0;
while (valueFromRows[i] || valueToRows[i]) {
const valueFromRow = valueFromRows?.[i] || {};
const valueToRow = valueToRows?.[i] || {};
const {
fields: rowFields
} = getFieldsForRowComparison({
baseVersionField: {
type: 'text',
fields: [],
path: '',
schemaPath: ''
},
config,
field,
row: i,
valueFromRow,
valueToRow
});
count += countChangedFields({
config,
fields: rowFields,
locales,
parentIsLocalized: parentIsLocalized || field.localized,
valueFrom: valueFromRow,
valueTo: valueToRow
});
i++;
}
return count;
}
//# sourceMappingURL=countChangedFields.js.map

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "y 'оны' MMMM'ын' d, EEEE 'гараг'",
long: "y 'оны' MMMM'ын' d",
medium: "y 'оны' MMM'ын' d",
short: "y.MM.dd",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
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",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P 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"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 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 4C 5C","4":"0C"},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 6C bC 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"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 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 KD LD MD PC xC ND QC","2":"F","4":"JD"},G:{"1":"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:{"1":"mD"},I:{"1":"VC J I nD oD pD qD yC rD sD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:2,C:"CSS3 Colors",D:true};

View File

@@ -0,0 +1,3 @@
import type { PayloadHandler } from '../../config/types.js';
export declare const docAccessHandler: PayloadHandler;
//# sourceMappingURL=docAccess.d.ts.map

View File

@@ -0,0 +1,123 @@
import { SpanStatusCode } from '@opentelemetry/api';
import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql';
import { spanToJSON, getRootSpan, defineIntegration } from '@sentry/core';
import { generateInstrumentOnce, addOriginToSpan } from '@sentry/node-core';
import { SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION } from '@sentry/opentelemetry';
const INTEGRATION_NAME = 'Graphql';
const instrumentGraphql = generateInstrumentOnce(
INTEGRATION_NAME,
GraphQLInstrumentation,
(_options) => {
const options = getOptionsWithDefaults(_options);
return {
...options,
responseHook(span, result) {
addOriginToSpan(span, 'auto.graphql.otel.graphql');
// We want to ensure spans are marked as errored if there are errors in the result
// We only do that if the span is not already marked with a status
const resultWithMaybeError = result ;
if (resultWithMaybeError.errors?.length && !spanToJSON(span).status) {
span.setStatus({ code: SpanStatusCode.ERROR });
}
const attributes = spanToJSON(span).data;
// If operation.name is not set, we fall back to use operation.type only
const operationType = attributes['graphql.operation.type'];
const operationName = attributes['graphql.operation.name'];
if (options.useOperationNameForRootSpan && operationType) {
const rootSpan = getRootSpan(span);
const rootSpanAttributes = spanToJSON(rootSpan).data;
const existingOperations = rootSpanAttributes[SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION] || [];
const newOperation = operationName ? `${operationType} ${operationName}` : `${operationType}`;
// We keep track of each operation on the root span
// This can either be a string, or an array of strings (if there are multiple operations)
if (Array.isArray(existingOperations)) {
(existingOperations ).push(newOperation);
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, existingOperations);
} else if (typeof existingOperations === 'string') {
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, [existingOperations, newOperation]);
} else {
rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION, newOperation);
}
if (!spanToJSON(rootSpan).data['original-description']) {
rootSpan.setAttribute('original-description', spanToJSON(rootSpan).description);
}
// Important for e.g. @sentry/aws-serverless because this would otherwise overwrite the name again
rootSpan.updateName(
`${spanToJSON(rootSpan).data['original-description']} (${getGraphqlOperationNamesFromAttribute(
existingOperations,
)})`,
);
}
},
};
},
);
const _graphqlIntegration = ((options = {}) => {
return {
name: INTEGRATION_NAME,
setupOnce() {
// We set defaults here, too, because otherwise we'd update the instrumentation config
// to the config without defaults, as `generateInstrumentOnce` automatically calls `setConfig(options)`
// when being called the second time
instrumentGraphql(getOptionsWithDefaults(options));
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [graphql](https://www.npmjs.com/package/graphql) library.
*
* For more information, see the [`graphqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/graphql/).
*
* @param {GraphqlOptions} options Configuration options for the GraphQL integration.
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.graphqlIntegration()],
* });
*/
const graphqlIntegration = defineIntegration(_graphqlIntegration);
function getOptionsWithDefaults(options) {
return {
ignoreResolveSpans: true,
ignoreTrivialResolveSpans: true,
useOperationNameForRootSpan: true,
...options,
};
}
// copy from packages/opentelemetry/utils
function getGraphqlOperationNamesFromAttribute(attr) {
if (Array.isArray(attr)) {
const sorted = attr.slice().sort();
// Up to 5 items, we just add all of them
if (sorted.length <= 5) {
return sorted.join(', ');
} else {
// Else, we add the first 5 and the diff of other operations
return `${sorted.slice(0, 5).join(', ')}, +${sorted.length - 5}`;
}
}
return `${attr}`;
}
export { graphqlIntegration, instrumentGraphql };
//# sourceMappingURL=graphql.js.map

View File

@@ -0,0 +1,29 @@
"use strict";
exports.isSameYear = isSameYear;
var _index = require("./toDate.js");
/**
* @name isSameYear
* @category Year Helpers
* @summary Are the given dates in the same year?
*
* @description
* Are the given dates in the same year?
*
* @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 dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same year
*
* @example
* // Are 2 September 2014 and 25 September 2014 in the same year?
* const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))
* //=> true
*/
function isSameYear(dateLeft, dateRight) {
const _dateLeft = (0, _index.toDate)(dateLeft);
const _dateRight = (0, _index.toDate)(dateRight);
return _dateLeft.getFullYear() === _dateRight.getFullYear();
}

View File

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

View File

@@ -0,0 +1,17 @@
'use strict';
var b;
var l;
if (process.env.NODE_ENV === 'production') {
b = require('./cjs/react-dom-server.bun.production.js');
l = require('./cjs/react-dom-server-legacy.browser.production.js');
} else {
b = require('./cjs/react-dom-server.bun.development.js');
l = require('./cjs/react-dom-server-legacy.browser.development.js');
}
exports.version = b.version;
exports.renderToReadableStream = b.renderToReadableStream;
exports.resume = b.resume;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;

View File

@@ -0,0 +1 @@
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;QAC7B,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;QACtC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IAIxE,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACrC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,OAAO,EAAE,QAAQ,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAC;IACnE,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,WAAW,CAAC,4BAA4B,CAAC,CAAC"}

View File

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

View File

@@ -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 './circle-alert.js';
//# sourceMappingURL=alert-circle.js.map

View File

@@ -0,0 +1,43 @@
import { bigint } from "./bigint.cjs";
import { bigintT } from "./bigintT.cjs";
import { boolean } from "./boolean.cjs";
import { bytes } from "./bytes.cjs";
import { customType } from "./custom.cjs";
import { dateDuration } from "./date-duration.cjs";
import { decimal } from "./decimal.cjs";
import { doublePrecision } from "./double-precision.cjs";
import { duration } from "./duration.cjs";
import { integer } from "./integer.cjs";
import { json } from "./json.cjs";
import { localDate } from "./localdate.cjs";
import { localTime } from "./localtime.cjs";
import { real } from "./real.cjs";
import { relDuration } from "./relative-duration.cjs";
import { smallint } from "./smallint.cjs";
import { text } from "./text.cjs";
import { timestamp } from "./timestamp.cjs";
import { timestamptz } from "./timestamptz.cjs";
import { uuid } from "./uuid.cjs";
export declare function getGelColumnBuilders(): {
localDate: typeof localDate;
localTime: typeof localTime;
decimal: typeof decimal;
dateDuration: typeof dateDuration;
bigintT: typeof bigintT;
duration: typeof duration;
relDuration: typeof relDuration;
bytes: typeof bytes;
customType: typeof customType;
bigint: typeof bigint;
boolean: typeof boolean;
doublePrecision: typeof doublePrecision;
integer: typeof integer;
json: typeof json;
real: typeof real;
smallint: typeof smallint;
text: typeof text;
timestamptz: typeof timestamptz;
uuid: typeof uuid;
timestamp: typeof timestamp;
};
export type GelColumnsBuilders = ReturnType<typeof getGelColumnBuilders>;

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { intervalToDuration as fn } from "../intervalToDuration.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const intervalToDuration = convertToFP(fn, 1);
// Fallback for modularized imports:
export default intervalToDuration;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../src/elements/ClipboardAction/types.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\nimport type { ClientBlock, ClientField, FormStateWithoutComponents } from 'payload'\n\nexport type ClipboardCopyBlocksSchema = {\n schemaBlocks: ClientBlock[]\n}\n\nexport type ClipboardCopyBlocksData = {\n blocks: ClientBlock[]\n type: 'blocks'\n}\n\nexport type ClipboardCopyFieldsSchema = {\n schemaFields: ClientField[]\n}\n\nexport type ClipboardCopyFieldsData = {\n fields: ClientField[]\n type: 'array'\n}\n\nexport type ClipboardCopyData = {\n path: string\n rowIndex?: number\n} & (ClipboardCopyBlocksData | ClipboardCopyFieldsData)\n\nexport type ClipboardCopyActionArgs = {\n getDataToCopy: () => FormStateWithoutComponents\n t: TFunction\n} & ClipboardCopyData\n\nexport type ClipboardPasteData = {\n data: FormStateWithoutComponents\n path: string\n rowIndex?: number\n} & (ClipboardCopyBlocksData | ClipboardCopyFieldsData)\n\nexport type OnPasteFn = (data: ClipboardPasteData) => void\n\nexport type ClipboardPasteActionArgs = {\n onPaste: OnPasteFn\n path: string\n t: TFunction\n} & (ClipboardCopyBlocksSchema | ClipboardCopyFieldsSchema)\n\nexport type ClipboardPasteActionValidateArgs = {\n fieldPath: string\n} & (\n | {\n schemaBlocks: ClientBlock[]\n type: 'blocks'\n }\n | {\n schemaFields: ClientField[]\n type: 'array'\n }\n) &\n ClipboardPasteData\n"],"mappings":"AA6CA","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"culturecontext.js","sources":["../../../../../src/integrations/culturecontext.ts"],"sourcesContent":["import type { CultureContext, IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers';\n\nconst INTEGRATION_NAME = 'CultureContext';\n\nconst _cultureContextIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event) {\n const culture = getCultureContext();\n\n if (culture) {\n event.contexts = {\n ...event.contexts,\n culture: { ...culture, ...event.contexts?.culture },\n };\n }\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Captures culture context from the browser.\n *\n * Enabled by default.\n *\n * @example\n * ```js\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n * integrations: [Sentry.cultureContextIntegration()],\n * });\n * ```\n */\nexport const cultureContextIntegration = defineIntegration(_cultureContextIntegration);\n\n/**\n * Returns the culture context from the browser's Intl API.\n */\nfunction getCultureContext(): CultureContext | undefined {\n try {\n const intl = (WINDOW as { Intl?: typeof Intl }).Intl;\n if (!intl) {\n return undefined;\n }\n\n const options = intl.DateTimeFormat().resolvedOptions();\n\n return {\n locale: options.locale,\n timezone: options.timeZone,\n calendar: options.calendar,\n };\n } catch {\n // Ignore errors\n return undefined;\n }\n}\n"],"names":[],"mappings":";;;AAIA,MAAM,gBAAA,GAAmB,gBAAgB;;AAEzC,MAAM,0BAAA,IAA8B,MAAM;AAC1C,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,eAAe,CAAC,KAAK,EAAE;AAC3B,MAAM,MAAM,OAAA,GAAU,iBAAiB,EAAE;;AAEzC,MAAM,IAAI,OAAO,EAAE;AACnB,QAAQ,KAAK,CAAC,QAAA,GAAW;AACzB,UAAU,GAAG,KAAK,CAAC,QAAQ;AAC3B,UAAU,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,OAAA,EAAS;AAC7D,SAAS;AACT,MAAM;AACN,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,yBAAA,GAA4B,iBAAiB,CAAC,0BAA0B;;AAErF;AACA;AACA;AACA,SAAS,iBAAiB,GAA+B;AACzD,EAAE,IAAI;AACN,IAAI,MAAM,IAAA,GAAO,CAAC,MAAA,GAAkC,IAAI;AACxD,IAAI,IAAI,CAAC,IAAI,EAAE;AACf,MAAM,OAAO,SAAS;AACtB,IAAI;;AAEJ,IAAI,MAAM,OAAA,GAAU,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE;;AAE3D,IAAI,OAAO;AACX,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM;AAC5B,MAAM,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAChC,MAAM,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAChC,KAAK;AACL,EAAE,EAAE,MAAM;AACV;AACA,IAAI,OAAO,SAAS;AACpB,EAAE;AACF;;;;"}

View File

@@ -0,0 +1,27 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;
const trace_flags_1 = require("./trace_flags");
exports.INVALID_SPANID = '0000000000000000';
exports.INVALID_TRACEID = '00000000000000000000000000000000';
exports.INVALID_SPAN_CONTEXT = {
traceId: exports.INVALID_TRACEID,
spanId: exports.INVALID_SPANID,
traceFlags: trace_flags_1.TraceFlags.NONE,
};
//# sourceMappingURL=invalid-span-constants.js.map

View File

@@ -0,0 +1,110 @@
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { createLocalReq } from '../../utilities/createLocalReq.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { getMigrations } from './getMigrations.js';
import { readMigrationFiles } from './readMigrationFiles.js';
/**
* Run all migration down functions before running up
*/ export async function migrateRefresh() {
const { payload } = this;
const migrationFiles = await readMigrationFiles({
payload
});
const { existingMigrations } = await getMigrations({
payload
});
const req = await createLocalReq({}, payload);
if (existingMigrations?.length) {
payload.logger.info({
msg: `Rolling back all ${existingMigrations.length} migration(s).`
});
// Reverse order of migrations to rollback
existingMigrations.reverse();
for (const migration of existingMigrations){
try {
const migrationFile = migrationFiles.find((m)=>m.name === migration.name);
if (!migrationFile) {
throw new Error(`Migration ${migration.name} not found locally.`);
}
payload.logger.info({
msg: `Migrating down: ${migration.name}`
});
const start = Date.now();
await initTransaction(req);
const session = payload.db.sessions?.[await req.transactionID];
await migrationFile.down({
payload,
req,
session
});
payload.logger.info({
msg: `Migrated down: ${migration.name} (${Date.now() - start}ms)`
});
await payload.delete({
collection: 'payload-migrations',
req,
where: {
name: {
equals: migration.name
}
}
});
} catch (err) {
await killTransaction(req);
let msg = `Error running migration ${migration.name}. Rolling back.`;
if (err instanceof Error) {
msg += ` ${err.message}`;
}
payload.logger.error({
err,
msg
});
process.exit(1);
}
}
} else {
payload.logger.info({
msg: 'No migrations to rollback.'
});
}
// Run all migrate up
for (const migration of migrationFiles){
payload.logger.info({
msg: `Migrating: ${migration.name}`
});
try {
const start = Date.now();
await initTransaction(req);
await migration.up({
payload,
req
});
await payload.create({
collection: 'payload-migrations',
data: {
name: migration.name,
executed: true
},
req
});
await commitTransaction(req);
payload.logger.info({
msg: `Migrated: ${migration.name} (${Date.now() - start}ms)`
});
} catch (err) {
await killTransaction(req);
let msg = `Error running migration ${migration.name}. Rolling back.`;
if (err instanceof Error) {
msg += ` ${err.message}`;
}
payload.logger.error({
err,
msg
});
process.exit(1);
}
}
}
//# sourceMappingURL=migrateRefresh.js.map

View File

@@ -0,0 +1,71 @@
export type ArrayRowToInsert = {
arrays: {
[tableName: string]: ArrayRowToInsert[];
};
arraysToPush: {
[tableName: string]: ArrayRowToInsert[];
};
locales: {
[locale: string]: Record<string, unknown>;
};
row: Record<string, unknown>;
};
export type BlockRowToInsert = {
arrays: {
[tableName: string]: ArrayRowToInsert[];
};
arraysToPush: {
[tableName: string]: ArrayRowToInsert[];
};
locales: {
[locale: string]: Record<string, unknown>;
};
row: Record<string, unknown>;
};
export type RelationshipToDelete = {
itemToRemove?: any;
locale?: string;
path: string;
relationTo?: string;
};
export type RelationshipToAppend = {
locale?: string;
path: string;
relationTo?: string;
value: any;
};
export type TextToDelete = {
locale?: string;
path: string;
};
export type NumberToDelete = {
locale?: string;
path: string;
};
export type RowToInsert = {
arrays: {
[tableName: string]: ArrayRowToInsert[];
};
arraysToPush: {
[tableName: string]: ArrayRowToInsert[];
};
blocks: {
[tableName: string]: BlockRowToInsert[];
};
blocksToDelete: Set<string>;
locales: {
[locale: string]: Record<string, unknown>;
};
numbers: Record<string, unknown>[];
numbersToDelete: NumberToDelete[];
relationships: Record<string, unknown>[];
relationshipsToAppend: RelationshipToAppend[];
relationshipsToDelete: RelationshipToDelete[];
row: Record<string, unknown>;
selects: {
[tableName: string]: Record<string, unknown>[];
};
texts: Record<string, unknown>[];
textsToDelete: TextToDelete[];
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","getTranslation","FieldLabel","useConfig","useTranslation","useListDrawerContext","ReactSelect","listHeaderClass","drawerBaseClass","DrawerRelationshipSelect","$","i18n","t","config","t0","getEntityConfig","collections","enabledCollections","selectedOption","setSelectedOption","t1","Symbol","for","t2","t3","slug","includes","enabledCollectionConfigs","filter","length","activeCollectionConfig","collectionSlug","value","coll","label","labels","singular","_jsxs","className","children","_jsx","isClearable","onChange","options","map"],"sources":["../../../../src/elements/ListHeader/DrawerRelationshipSelect/index.tsx"],"sourcesContent":["'use client'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { FieldLabel } from '../../../fields/FieldLabel/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { useListDrawerContext } from '../../ListDrawer/Provider.js'\nimport { ReactSelect } from '../../ReactSelect/index.js'\nimport { listHeaderClass } from '../index.js'\n\nconst drawerBaseClass = 'list-drawer'\n\nexport const DrawerRelationshipSelect = () => {\n const { i18n, t } = useTranslation()\n const {\n config: { collections },\n getEntityConfig,\n } = useConfig()\n const { enabledCollections, selectedOption, setSelectedOption } = useListDrawerContext()\n const enabledCollectionConfigs = collections.filter(({ slug }) =>\n enabledCollections.includes(slug),\n )\n if (enabledCollectionConfigs.length > 1) {\n const activeCollectionConfig = getEntityConfig({ collectionSlug: selectedOption.value })\n\n return (\n <div className={`${drawerBaseClass}__select-collection-wrap`}>\n <FieldLabel label={t('upload:selectCollectionToBrowse')} />\n <ReactSelect\n className={`${listHeaderClass}__select-collection`}\n isClearable={false}\n onChange={setSelectedOption}\n options={enabledCollectionConfigs.map((coll) => ({\n label: getTranslation(coll.labels.singular, i18n),\n value: coll.slug,\n }))}\n value={{\n label: getTranslation(activeCollectionConfig?.labels.singular, i18n),\n value: activeCollectionConfig?.slug,\n }}\n />\n </div>\n )\n }\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,SAASC,cAAc,QAAQ;AAE/B,SAASC,UAAU,QAAQ;AAC3B,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ;AACrC,SAASC,WAAW,QAAQ;AAC5B,SAASC,eAAe,QAAQ;AAEhC,MAAMC,eAAA,GAAkB;AAExB,OAAO,MAAMC,wBAAA,GAA2BA,CAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EACtC;IAAAW,IAAA;IAAAC;EAAA,IAAoBR,cAAA;EACpB;IAAAS,MAAA,EAAAC,EAAA;IAAAC;EAAA,IAGIZ,SAAA;EAFM;IAAAa;EAAA,IAAAF,EAAe;EAGzB;IAAAG,kBAAA;IAAAC,cAAA;IAAAC;EAAA,IAAkEd,oBAAA;EAAA,IAAAe,EAAA;EAAA,IAAAV,CAAA,QAAAM,WAAA,IAAAN,CAAA,QAAAO,kBAAA,IAAAP,CAAA,QAAAK,eAAA,IAAAL,CAAA,QAAAC,IAAA,IAAAD,CAAA,QAAAQ,cAAA,IAAAR,CAAA,QAAAS,iBAAA,IAAAT,CAAA,QAAAE,CAAA;IAQ9DQ,EAAA,GAAAC,MAAA,CAAAC,GAAA,8B;;;;QAPgDC,EAAA,GAAAC,EAAA;UAAC;YAAAC;UAAA,IAAAD,EAAQ;UAAA,OAC3DP,kBAAA,CAAAS,QAAA,CAA4BD,IAAA;QAAA;QAAAf,CAAA,MAAAO,kBAAA;QAAAP,CAAA,MAAAa,EAAA;MAAA;QAAAA,EAAA,GAAAb,CAAA;MAAA;MAD9B,MAAAiB,wBAAA,GAAiCX,WAAA,CAAAY,MAAA,CAAmBL,EACtB;MAAA,IAE1BI,wBAAA,CAAAE,MAAA,IAAkC;QACpC,MAAAC,sBAAA,GAA+Bf,eAAA;UAAAgB,cAAA,EAAkCb,cAAA,CAAAc;QAAA,CAAqB;QAAA,IAAAR,EAAA;QAAA,IAAAd,CAAA,SAAAC,IAAA;UAS1Ca,EAAA,GAAAS,IAAA;YAAAC,KAAA,EAC7BjC,cAAA,CAAegC,IAAA,CAAAE,MAAA,CAAAC,QAAA,EAAsBzB,IAAA;YAAAqB,KAAA,EACrCC,IAAA,CAAAR;UAAA;UACTf,CAAA,OAAAC,IAAA;UAAAD,CAAA,OAAAc,EAAA;QAAA;UAAAA,EAAA,GAAAd,CAAA;QAAA;QATJU,EAAA,GAAAiB,KAAA,CAAC;UAAAC,SAAA,EAAe,GAAA9B,eAAA,0BAA4C;UAAA+B,QAAA,GAC1DC,IAAA,CAAAtC,UAAA;YAAAgC,KAAA,EAAmBtB,CAAA,CAAE;UAAA,C,GACrB4B,IAAA,CAAAlC,WAAA;YAAAgC,SAAA,EACa,GAAA/B,eAAA,qBAAuC;YAAAkC,WAAA;YAAAC,QAAA,EAExCvB,iBAAA;YAAAwB,OAAA,EACDhB,wBAAA,CAAAiB,GAAA,CAA6BpB,EAGtC;YAAAQ,KAAA;cAAAE,KAAA,EAESjC,cAAA,CAAe6B,sBAAA,EAAAK,MAAA,CAAAC,QAAA,EAAyCzB,IAAA;cAAAqB,KAAA,EACxDF,sBAAA,EAAAL;YAAA;UAAA,C;;;;;;;;;;;;;;;;;;;;CAOnB","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"MissingEditorProp.d.ts","sourceRoot":"","sources":["../../src/errors/MissingEditorProp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,KAAK,EAAE,KAAK;CAKzB"}

View File

@@ -0,0 +1,240 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());
})(this, (function () { 'use strict';
// Matches the scheme of a URL, eg "http://"
const schemeRegex = /^[\w+.-]+:\/\//;
/**
* Matches the parts of a URL:
* 1. Scheme, including ":", guaranteed.
* 2. User/password, including "@", optional.
* 3. Host, guaranteed.
* 4. Port, including ":", optional.
* 5. Path, including "/", optional.
* 6. Query, including "?", optional.
* 7. Hash, including "#", optional.
*/
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
/**
* File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
* with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
*
* 1. Host, optional.
* 2. Path, which may include "/", guaranteed.
* 3. Query, including "?", optional.
* 4. Hash, including "#", optional.
*/
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
function isAbsoluteUrl(input) {
return schemeRegex.test(input);
}
function isSchemeRelativeUrl(input) {
return input.startsWith('//');
}
function isAbsolutePath(input) {
return input.startsWith('/');
}
function isFileUrl(input) {
return input.startsWith('file:');
}
function isRelative(input) {
return /^[.?#]/.test(input);
}
function parseAbsoluteUrl(input) {
const match = urlRegex.exec(input);
return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
}
function parseFileUrl(input) {
const match = fileRegex.exec(input);
const path = match[2];
return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
}
function makeUrl(scheme, user, host, port, path, query, hash) {
return {
scheme,
user,
host,
port,
path,
query,
hash,
type: 7 /* Absolute */,
};
}
function parseUrl(input) {
if (isSchemeRelativeUrl(input)) {
const url = parseAbsoluteUrl('http:' + input);
url.scheme = '';
url.type = 6 /* SchemeRelative */;
return url;
}
if (isAbsolutePath(input)) {
const url = parseAbsoluteUrl('http://foo.com' + input);
url.scheme = '';
url.host = '';
url.type = 5 /* AbsolutePath */;
return url;
}
if (isFileUrl(input))
return parseFileUrl(input);
if (isAbsoluteUrl(input))
return parseAbsoluteUrl(input);
const url = parseAbsoluteUrl('http://foo.com/' + input);
url.scheme = '';
url.host = '';
url.type = input
? input.startsWith('?')
? 3 /* Query */
: input.startsWith('#')
? 2 /* Hash */
: 4 /* RelativePath */
: 1 /* Empty */;
return url;
}
function stripPathFilename(path) {
// If a path ends with a parent directory "..", then it's a relative path with excess parent
// paths. It's not a file, so we can't strip it.
if (path.endsWith('/..'))
return path;
const index = path.lastIndexOf('/');
return path.slice(0, index + 1);
}
function mergePaths(url, base) {
normalizePath(base, base.type);
// If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
// path).
if (url.path === '/') {
url.path = base.path;
}
else {
// Resolution happens relative to the base path's directory, not the file.
url.path = stripPathFilename(base.path) + url.path;
}
}
/**
* The path can have empty directories "//", unneeded parents "foo/..", or current directory
* "foo/.". We need to normalize to a standard representation.
*/
function normalizePath(url, type) {
const rel = type <= 4 /* RelativePath */;
const pieces = url.path.split('/');
// We need to preserve the first piece always, so that we output a leading slash. The item at
// pieces[0] is an empty string.
let pointer = 1;
// Positive is the number of real directories we've output, used for popping a parent directory.
// Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
let positive = 0;
// We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
// generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
// real directory, we won't need to append, unless the other conditions happen again.
let addTrailingSlash = false;
for (let i = 1; i < pieces.length; i++) {
const piece = pieces[i];
// An empty directory, could be a trailing slash, or just a double "//" in the path.
if (!piece) {
addTrailingSlash = true;
continue;
}
// If we encounter a real directory, then we don't need to append anymore.
addTrailingSlash = false;
// A current directory, which we can always drop.
if (piece === '.')
continue;
// A parent directory, we need to see if there are any real directories we can pop. Else, we
// have an excess of parents, and we'll need to keep the "..".
if (piece === '..') {
if (positive) {
addTrailingSlash = true;
positive--;
pointer--;
}
else if (rel) {
// If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
// URL, protocol relative URL, or an absolute path, we don't need to keep excess.
pieces[pointer++] = piece;
}
continue;
}
// We've encountered a real directory. Move it to the next insertion pointer, which accounts for
// any popped or dropped directories.
pieces[pointer++] = piece;
positive++;
}
let path = '';
for (let i = 1; i < pointer; i++) {
path += '/' + pieces[i];
}
if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
path += '/';
}
url.path = path;
}
/**
* Attempts to resolve `input` URL/path relative to `base`.
*/
function resolve(input, base) {
if (!input && !base)
return '';
const url = parseUrl(input);
let inputType = url.type;
if (base && inputType !== 7 /* Absolute */) {
const baseUrl = parseUrl(base);
const baseType = baseUrl.type;
switch (inputType) {
case 1 /* Empty */:
url.hash = baseUrl.hash;
// fall through
case 2 /* Hash */:
url.query = baseUrl.query;
// fall through
case 3 /* Query */:
case 4 /* RelativePath */:
mergePaths(url, baseUrl);
// fall through
case 5 /* AbsolutePath */:
// The host, user, and port are joined, you can't copy one without the others.
url.user = baseUrl.user;
url.host = baseUrl.host;
url.port = baseUrl.port;
// fall through
case 6 /* SchemeRelative */:
// The input doesn't have a schema at least, so we need to copy at least that over.
url.scheme = baseUrl.scheme;
}
if (baseType > inputType)
inputType = baseType;
}
normalizePath(url, inputType);
const queryHash = url.query + url.hash;
switch (inputType) {
// This is impossible, because of the empty checks at the start of the function.
// case UrlType.Empty:
case 2 /* Hash */:
case 3 /* Query */:
return queryHash;
case 4 /* RelativePath */: {
// The first char is always a "/", and we need it to be relative.
const path = url.path.slice(1);
if (!path)
return queryHash || '.';
if (isRelative(base || input) && !isRelative(path)) {
// If base started with a leading ".", or there is no base and input started with a ".",
// then we need to ensure that the relative path starts with a ".". We don't know if
// relative starts with a "..", though, so check before prepending.
return './' + path + queryHash;
}
return path + queryHash;
}
case 5 /* AbsolutePath */:
return url.path + queryHash;
default:
return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
}
}
return resolve;
}));
//# sourceMappingURL=resolve-uri.umd.js.map

View File

@@ -0,0 +1,9 @@
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
/** Adds an origin to an OTEL Span. */
function addOriginToSpan(span, origin) {
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
}
export { addOriginToSpan };
//# sourceMappingURL=addOriginToSpan.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["getTranslation","React","useForm","useEditDepth","useLocale","useTranslation","generateFieldID","FieldLabel","props","as","t0","hideLocale","t1","htmlFor","htmlForFromProps","label","localized","t2","path","required","t3","unstyled","t4","ElementFromProps","undefined","uuid","editDepth","i18n","code","localLabel","Element","_jsxs","className","children","_jsx"],"sources":["../../../src/fields/FieldLabel/index.tsx"],"sourcesContent":["'use client'\n\nimport type { GenericLabelProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useForm } from '../../forms/Form/context.js'\nimport { useEditDepth } from '../../providers/EditDepth/index.js'\nimport { useLocale } from '../../providers/Locale/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { generateFieldID } from '../../utilities/generateFieldID.js'\nimport './index.scss'\n\nexport const FieldLabel: React.FC<GenericLabelProps> = (props) => {\n const {\n as: ElementFromProps = 'label',\n hideLocale = false,\n htmlFor: htmlForFromProps,\n label,\n localized = false,\n path,\n required = false,\n unstyled = false,\n } = props\n\n const { uuid } = useForm()\n const editDepth = useEditDepth()\n\n const htmlFor = htmlForFromProps || generateFieldID(path, editDepth, uuid)\n\n const { i18n } = useTranslation()\n const { code, label: localLabel } = useLocale()\n\n const Element =\n ElementFromProps === 'label' ? (htmlFor ? 'label' : 'span') : ElementFromProps || 'span'\n\n if (label) {\n return (\n <Element className={`field-label${unstyled ? ' unstyled' : ''}`} htmlFor={htmlFor}>\n {getTranslation(label, i18n)}\n {required && !unstyled && <span className=\"required\">*</span>}\n {localized && !hideLocale && (\n <span className=\"localized\">\n &mdash; {typeof localLabel === 'string' ? localLabel : code}\n </span>\n )}\n </Element>\n )\n }\n\n return null\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,OAAO,QAAQ;AACxB,SAASC,YAAY,QAAQ;AAC7B,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,eAAe,QAAQ;AAChC,OAAO;AAEP,OAAO,MAAMC,UAAA,GAA0CC,KAAA;EACrD;IAAAC,EAAA,EAAAC,EAAA;IAAAC,UAAA,EAAAC,EAAA;IAAAC,OAAA,EAAAC,gBAAA;IAAAC,KAAA;IAAAC,SAAA,EAAAC,EAAA;IAAAC,IAAA;IAAAC,QAAA,EAAAC,EAAA;IAAAC,QAAA,EAAAC;EAAA,IASId,KAAA;EARE,MAAAe,gBAAA,GAAAb,EAA0B,KAAAc,SAAA,GAAP,OAAO,GAA1Bd,EAA0B;EAC9B,MAAAC,UAAA,GAAAC,EAAkB,KAAAY,SAAA,WAAlBZ,EAAkB;EAGlB,MAAAI,SAAA,GAAAC,EAAiB,KAAAO,SAAA,WAAjBP,EAAiB;EAEjB,MAAAE,QAAA,GAAAC,EAAgB,KAAAI,SAAA,WAAhBJ,EAAgB;EAChB,MAAAC,QAAA,GAAAC,EAAgB,KAAAE,SAAA,WAAhBF,EAAgB;EAGlB;IAAAG;EAAA,IAAiBvB,OAAA;EACjB,MAAAwB,SAAA,GAAkBvB,YAAA;EAElB,MAAAU,OAAA,GAAgBC,gBAAA,IAAoBR,eAAA,CAAgBY,IAAA,EAAMQ,SAAA,EAAWD,IAAA;EAErE;IAAAE;EAAA,IAAiBtB,cAAA;EACjB;IAAAuB,IAAA;IAAAb,KAAA,EAAAc;EAAA,IAAoCzB,SAAA;EAEpC,MAAA0B,OAAA,GACEP,gBAAA,KAAqB,UAAWV,OAAA,GAAU,UAAU,SAAUU,gBAAA,IAAoB;EAAA,IAEhFR,KAAA;IAAA,OAEAgB,KAAA,CAACD,OAAA;MAAAE,SAAA,EAAmB,cAAcX,QAAA,GAAW,cAAc,IAAI;MAAAR,OAAA;MAAAoB,QAAA,GAC5DjC,cAAA,CAAee,KAAA,EAAOY,IAAA,GACtBR,QAAA,KAAaE,QAAA,IAAYa,IAAA,CAAC;QAAAF,SAAA,EAAe;QAAAC,QAAA,EAAW;MAAA,C,GACpDjB,SAAA,KAAcL,UAAA,IACboB,KAAA,CAAC;QAAAC,SAAA,EAAe;QAAAC,QAAA,GAAY,WACjB,OAAOJ,UAAA,KAAe,WAAWA,UAAA,GAAaD,IAAA;MAAA,C;;;;CAQnE","ignoreList":[]}

View File

@@ -0,0 +1,22 @@
import * as api from '@opentelemetry/api';
/**
* TraceState must be a class and not a simple object type because of the spec
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
*
* Here is the list of allowed mutations:
* - New key-value pair should be added into the beginning of the list
* - The value of any key can be updated. Modified keys MUST be moved to the
* beginning of the list.
*/
export declare class TraceState implements api.TraceState {
private _internalState;
constructor(rawTraceState?: string);
set(key: string, value: string): TraceState;
unset(key: string): TraceState;
get(key: string): string | undefined;
serialize(): string;
private _parse;
private _keys;
private _clone;
}
//# sourceMappingURL=TraceState.d.ts.map

View File

@@ -0,0 +1,31 @@
import type { ColumnBuilderBaseConfig, GeneratedColumnConfig, HasGenerated } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { SQL } from "../../sql/index.cjs";
import { type Writable } from "../../utils.cjs";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.cjs";
export type SingleStoreEnumColumnBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = SingleStoreEnumColumnBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreEnumColumn';
data: TEnum[number];
driverParam: string;
enumValues: TEnum;
generated: undefined;
}>;
export declare class SingleStoreEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreEnumColumn'>> extends SingleStoreColumnBuilder<T, {
enumValues: T['enumValues'];
}> {
generatedAlwaysAs(as: SQL<unknown> | (() => SQL) | T['data'], config?: Partial<GeneratedColumnConfig<unknown>>): HasGenerated<this, {}>;
static readonly [entityKind]: string;
constructor(name: T['name'], values: T['enumValues']);
}
export declare class SingleStoreEnumColumn<T extends ColumnBaseConfig<'string', 'SingleStoreEnumColumn'>> extends SingleStoreColumn<T, {
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export declare function singlestoreEnum<U extends string, T extends Readonly<[U, ...U[]]>>(values: T | Writable<T>): SingleStoreEnumColumnBuilderInitial<'', Writable<T>>;
export declare function singlestoreEnum<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, values: T | Writable<T>): SingleStoreEnumColumnBuilderInitial<TName, Writable<T>>;

View File

@@ -0,0 +1,45 @@
export declare function repeat(s: string, times: number): string;
export declare function setInternalSlot<
Instance extends object,
Internal extends object,
Field extends keyof Internal
>(map: WeakMap<Instance, Internal>, pl: Instance, field: Field, value: NonNullable<Internal>[Field]): void;
export declare function setMultiInternalSlots<
Instance extends object,
Internal extends object,
K extends keyof Internal
>(map: WeakMap<Instance, Internal>, pl: Instance, props: Pick<NonNullable<Internal>, K>): void;
export declare function getInternalSlot<
Instance extends object,
Internal extends object,
Field extends keyof Internal
>(map: WeakMap<Instance, Internal>, pl: Instance, field: Field): Internal[Field];
export declare function getMultiInternalSlots<
Instance extends object,
Internal extends object,
Field extends keyof Internal
>(map: WeakMap<Instance, Internal>, pl: Instance, ...fields: Field[]): Pick<Internal, Field>;
export interface LiteralPart {
type: "literal";
value: string;
}
export declare function isLiteralPart(patternPart: LiteralPart | {
type: string;
value?: string;
}): patternPart is LiteralPart;
export declare function defineProperty<T extends object>(target: T, name: string | symbol, { value }: {
value: any;
} & ThisType<any>): void;
/**
* 7.3.5 CreateDataProperty
* @param target
* @param name
* @param value
*/
export declare function createDataProperty<T extends object>(target: T, name: string | symbol, value: any): void;
export declare const UNICODE_EXTENSION_SEQUENCE_REGEX: RegExp;
export declare function invariant(condition: boolean, message: string, Err?: any): asserts condition;
export declare const createMemoizedNumberFormat: (...args: ConstructorParameters<typeof Intl.NumberFormat>) => Intl.NumberFormat;
export declare const createMemoizedPluralRules: (...args: ConstructorParameters<typeof Intl.PluralRules>) => Intl.PluralRules;
export declare const createMemoizedLocale: (...args: ConstructorParameters<typeof Intl.Locale>) => Intl.Locale;
export declare const createMemoizedListFormat: (...args: ConstructorParameters<typeof Intl.ListFormat>) => Intl.ListFormat;

View File

@@ -0,0 +1,70 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { HISTORY_MERGE_TAG } from 'lexical';
import { useLayoutEffect, useEffect } from 'react';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function OnChangePlugin({
ignoreHistoryMergeTagChange = true,
ignoreSelectionChange = false,
onChange
}) {
const [editor] = useLexicalComposerContext();
useLayoutEffectImpl(() => {
if (onChange) {
return editor.registerUpdateListener(({
editorState,
dirtyElements,
dirtyLeaves,
prevEditorState,
tags
}) => {
if (ignoreSelectionChange && dirtyElements.size === 0 && dirtyLeaves.size === 0 || ignoreHistoryMergeTagChange && tags.has(HISTORY_MERGE_TAG) || prevEditorState.isEmpty()) {
return;
}
onChange(editorState, editor, tags);
});
}
}, [editor, ignoreHistoryMergeTagChange, ignoreSelectionChange, onChange]);
return null;
}
export { OnChangePlugin };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/uploads/image-resizing/generateImageSizeFilename.ts"],"sourcesContent":["/**\n * Create a new image name based on the output image name, the dimensions and\n * the extension.\n *\n * Ignore the fact that duplicate names could happen if the there is one\n * size with `width AND height` and one with only `height OR width`. Because\n * space is expensive, we will reuse the same image for both sizes.\n *\n * @param outputImageName - the sanitized image name\n * @param bufferInfo - the buffer info\n * @param extension - the extension to use\n * @returns the new image name that is not taken\n */\ntype CreateImageNameArgs = {\n extension: string\n height: number\n outputImageName: string\n width: number\n}\nexport const generateImageSizeFilename = ({\n extension,\n height,\n outputImageName,\n width,\n}: CreateImageNameArgs): string => {\n return `${outputImageName}-${width}x${height}.${extension}`\n}\n"],"names":["generateImageSizeFilename","extension","height","outputImageName","width"],"mappings":"AAAA;;;;;;;;;;;;CAYC,GAOD,OAAO,MAAMA,4BAA4B,CAAC,EACxCC,SAAS,EACTC,MAAM,EACNC,eAAe,EACfC,KAAK,EACe;IACpB,OAAO,GAAGD,gBAAgB,CAAC,EAAEC,MAAM,CAAC,EAAEF,OAAO,CAAC,EAAED,WAAW;AAC7D,EAAC"}

View File

@@ -0,0 +1,45 @@
import { toDate } from "./toDate.mjs";
/**
* @name max
* @category Common Helpers
* @summary Return the latest of the given dates.
*
* @description
* Return the latest of the given dates.
*
* @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 dates - The dates to compare
*
* @returns The latest of the dates
*
* @example
* // Which of these dates is the latest?
* const result = max([
* new Date(1989, 6, 10),
* new Date(1987, 1, 11),
* new Date(1995, 6, 2),
* new Date(1990, 0, 1)
* ])
* //=> Sun Jul 02 1995 00:00:00
*/
export function max(dates) {
let result;
dates.forEach(function (dirtyDate) {
const currentDate = toDate(dirtyDate);
if (
result === undefined ||
result < currentDate ||
isNaN(Number(currentDate))
) {
result = currentDate;
}
});
return result || new Date(NaN);
}
// Fallback for modularized imports:
export default max;

View File

@@ -0,0 +1,530 @@
(() => {
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/en-US/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'last' eeee 'at' p",
yesterday: "'yesterday at' p",
today: "'today at' p",
tomorrow: "'tomorrow at' p",
nextWeek: "eeee 'at' 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/en-US/_lib/localize.js
var eraValues = {
narrow: ["B", "A"],
abbreviated: ["BC", "AD"],
wide: ["Before Christ", "Anno Domini"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
};
var monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"],
wide: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"]
};
var dayValues = {
narrow: ["S", "M", "T", "W", "T", "F", "S"],
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
wide: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "st";
case 2:
return number + "nd";
case 3:
return number + "rd";
}
}
return number + "th";
};
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/en-US/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var 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
};
var parseEraPatterns = {
any: [/^b/i, /^(a|c)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](th|st|nd|rd)? quarter/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var 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
};
var 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]
};
var 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
};
var 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]
};
var 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
};
var 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
}
};
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/en-CA/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "less than a second",
other: "less than {{count}} seconds"
},
xSeconds: {
one: "a second",
other: "{{count}} seconds"
},
halfAMinute: "half a minute",
lessThanXMinutes: {
one: "less than a minute",
other: "less than {{count}} minutes"
},
xMinutes: {
one: "a minute",
other: "{{count}} minutes"
},
aboutXHours: {
one: "about an hour",
other: "about {{count}} hours"
},
xHours: {
one: "an hour",
other: "{{count}} hours"
},
xDays: {
one: "a day",
other: "{{count}} days"
},
aboutXWeeks: {
one: "about a week",
other: "about {{count}} weeks"
},
xWeeks: {
one: "a week",
other: "{{count}} weeks"
},
aboutXMonths: {
one: "about a month",
other: "about {{count}} months"
},
xMonths: {
one: "a month",
other: "{{count}} months"
},
aboutXYears: {
one: "about a year",
other: "about {{count}} years"
},
xYears: {
one: "a year",
other: "{{count}} years"
},
overXYears: {
one: "over a year",
other: "over {{count}} years"
},
almostXYears: {
one: "almost a year",
other: "almost {{count}} years"
}
};
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}}", count.toString());
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "in " + result;
} else {
return result + " ago";
}
}
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/en-CA/_lib/formatLong.js
var dateFormats = {
full: "EEEE, MMMM do, yyyy",
long: "MMMM do, yyyy",
medium: "MMM d, yyyy",
short: "yyyy-MM-dd"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} 'at' {{time}}",
long: "{{date}} 'at' {{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/en-CA.js
var enCA = {
code: "en-CA",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/en-CA/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), {}, {
enCA: enCA }) });
//# debugId=B9A68712FFB8E78764756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,135 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern =
/^(\d+)(-?(е|я|га|і|ы|ае|ая|яя|шы|гі|ці|ты|мы))?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^((да )?н\.?\s?э\.?)/i,
abbreviated: /^((да )?н\.?\s?э\.?)/i,
wide: /^(да нашай эры|нашай эры|наша эра)/i,
};
const parseEraPatterns = {
any: [/^д/i, /^н/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234](-?[ыі]?)? кв.?/i,
wide: /^[1234](-?[ыі]?)? квартал/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[слкмчжв]/i,
abbreviated:
/^(студз|лют|сак|крас|ма[йя]|чэрв|ліп|жн|вер|кастр|ліст|снеж)\.?/i,
wide: /^(студзен[ья]|лют(ы|ага)|сакавіка?|красавіка?|ма[йя]|чэрвен[ья]|ліпен[ья]|жні(вень|ўня)|верас(ень|ня)|кастрычніка?|лістапада?|снеж(ань|ня))/i,
};
const parseMonthPatterns = {
narrow: [
/^с/i,
/^л/i,
/^с/i,
/^к/i,
/^м/i,
/^ч/i,
/^л/i,
/^ж/i,
/^в/i,
/^к/i,
/^л/i,
/^с/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 = {
narrow: [/^н/i, /^п/i, /^а/i, /^с/i, /^ч/i, /^п/i, /^с/i],
any: [/^н/i, /^п[ан]/i, /^а/i, /^с[ер]/i, /^ч/i, /^п[ят]/i, /^с[уб]/i],
};
const matchDayPeriodPatterns = {
narrow: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
abbreviated: /^([дп]п|поўн\.?|поўд\.?|ран\.?|дзень|дня|веч\.?|ночы?)/i,
wide: /^([дп]п|поўнач|поўдзень|раніц[аы]|дзень|дня|вечара?|ночы?)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^дп/i,
pm: /^пп/i,
midnight: /^поўн/i,
noon: /^поўд/i,
morning: /^р/i,
afternoon: /^д[зн]/i,
evening: /^в/i,
night: /^н/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
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: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,152 @@
# sonic-boom
[![NPM Package Version](https://img.shields.io/npm/v/sonic-boom)](https://www.npmjs.com/package/sonic-boom)
[![Build Status](https://github.com/pinojs/sonic-boom/workflows/CI/badge.svg)](https://github.com/pinojs/sonic-boom/actions?query=workflow%3ACI)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
Extremely fast utf8-only stream implementation to write to files and
file descriptors.
This implementation is partial, but support backpressure and `.pipe()` in is here.
However, it is 2-3x faster than Node Core `fs.createWriteStream()`:
```
benchSonic*1000: 1916.904ms
benchSonicSync*1000: 8605.265ms
benchSonic4k*1000: 1965.231ms
benchSonicSync4k*1000: 1588.224ms
benchCore*1000: 5851.959ms
benchConsole*1000: 7605.713ms
```
Note that sync mode without buffering is _slower_ than a Node Core WritableStream, however
this mode matches the expected behavior of `console.log()`.
Note that if this is used to log to a windows terminal (`cmd.exe` or
powershell), it is needed to run `chcp 65001` in the terminal to
correctly display utf-8 characters, see
[chcp](https://ss64.com/nt/chcp.html) for more details.
## Install
```
npm i sonic-boom
```
## Example
```js
'use strict'
const SonicBoom = require('sonic-boom')
const sonic = new SonicBoom({ fd: process.stdout.fd }) // or { dest: '/path/to/destination' }
for (let i = 0; i < 10; i++) {
sonic.write('hello sonic\n')
}
```
## API
### SonicBoom(opts)
Creates a new instance of SonicBoom.
The options are:
* `fd`: a file descriptor, something that is returned by `fs.open` or
`fs.openSync`.
* `dest`: a string that is a path to a file to be written to (mode controlled by the `append` option).
* `minLength`: the minimum length of the internal buffer that is
required to be full before flushing.
* `maxLength`: the maximum length of the internal buffer. If a write operation would cause the buffer
to exceed `maxLength`, the data written is dropped and a `drop` event is emitted with the dropped data
* `maxWrite`: the maximum number of bytes that can be written; default: 16384
* `periodicFlush`: calls `flush` every x`ms`.
* `sync`: perform writes synchronously (similar to `console.log`).
* `fsync`: perform a [fsyncSync](https://nodejs.org/api/fs.html#fsfsyncsyncfd) every time a write is completed.
* `append`: appends writes to dest file instead of truncating it (default `true`).
* `mode`: specify the creating file `mode` (see [fs.open()](https://nodejs.org/api/fs.html#fsopenpath-flags-mode-callback) from Node.js core).
* `mkdir`: ensure directory for dest file exists when `true` (default `false`).
* `retryEAGAIN(err, writeBufferLen, remainingBufferLen)`: a function that will be called when sonic-boom
write/writeSync/flushSync encounters a EAGAIN or EBUSY error. If the return value is
true sonic-boom will retry the operation, otherwise it will bubble the
error. `err` is the error that caused this function to be called,
`writeBufferLen` is the length of the buffer sonic-boom tried to write, and
`remainingBufferLen` is the length of the remaining buffer sonic-boom didn't try to write.
For `sync:false` a `SonicBoom` instance will emit the `'ready'` event when a file descriptor is available.
For `sync:true` this is not relevant because the `'ready'` event will be fired when the `SonicBoom` instance is created, before it can be subscribed to.
### SonicBoom#write(string)
Writes the string to the file.
It will return false to signal the producer to slow down.
### SonicBoom#flush([cb])
Writes the current buffer to the file if a write was not in progress.
Do nothing if `minLength` is zero or if it is already writing.
call the callback when the flush operation is completed. when failed the callback is called with an error.
### SonicBoom#reopen([file])
Reopen the file in place, useful for log rotation.
Example:
```js
const stream = new SonicBoom('./my.log')
process.on('SIGUSR2', function () {
stream.reopen()
})
```
### SonicBoom#flushSync()
Flushes the buffered data synchronously. This is a costly operation.
### SonicBoom#end()
Closes the stream, the data will be flushed down asynchronously
### SonicBoom#destroy()
Closes the stream immediately, the data is not flushed.
### Events
#### SonicBoom#close
See [Stream#close](https://nodejs.org/api/stream.html#event-close). The `'close'` event when the instance has been closed.
#### SonicBoom#drain
See [Stream#drain](https://nodejs.org/api/stream.html#event-drain). The `'drain'` event is emitted when source can resume sending data.
#### SonicBoom#drop <any>
When destination file maximal length is reached, the `'drop'` event is emitted with data that could not be written.
#### SonicBoom#error <Error>
The `'error'` event is emitted when the destination file can not be opened, or written.
#### SonicBoom#finish
See [Stream#finish](https://nodejs.org/api/stream.html#event-finish). The `'finish'` event after calling `end()` method and when all data was written.
#### SonicBoom#ready
The `'ready'` event occurs when the created instance is ready to process input.
#### SonicBoom#write <number>
The `'write'` event occurs every time data is written to the underlying file. It emits the number of written bytes.
## License
MIT

View File

@@ -0,0 +1 @@
{"version":3,"file":"haze.js","sources":["../../../src/icons/haze.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Haze\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNS4yIDYuMiAxLjQgMS40IiAvPgogIDxwYXRoIGQ9Ik0yIDEzaDIiIC8+CiAgPHBhdGggZD0iTTIwIDEzaDIiIC8+CiAgPHBhdGggZD0ibTE3LjQgNy42IDEuNC0xLjQiIC8+CiAgPHBhdGggZD0iTTIyIDE3SDIiIC8+CiAgPHBhdGggZD0iTTIyIDIxSDIiIC8+CiAgPHBhdGggZD0iTTE2IDEzYTQgNCAwIDAgMC04IDAiIC8+CiAgPHBhdGggZD0iTTEyIDVWMi41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/haze\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 Haze = createLucideIcon('Haze', [\n ['path', { d: 'm5.2 6.2 1.4 1.4', key: '17imol' }],\n ['path', { d: 'M2 13h2', key: '13gyu8' }],\n ['path', { d: 'M20 13h2', key: '16rner' }],\n ['path', { d: 'm17.4 7.6 1.4-1.4', key: 't4xlah' }],\n ['path', { d: 'M22 17H2', key: '1gtaj3' }],\n ['path', { d: 'M22 21H2', key: '1gy6en' }],\n ['path', { d: 'M16 13a4 4 0 0 0-8 0', key: '1dyczq' }],\n ['path', { d: 'M12 5V2.5', key: '1vytko' }],\n]);\n\nexport default Haze;\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,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,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,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClD,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,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,36 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link addWeeks} function options.
*/
export interface AddWeeksOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name addWeeks
* @category Week Helpers
* @summary Add the specified number of weeks to the given date.
*
* @description
* Add the specified number of weeks to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of weeks to be added.
* @param options - An object with options
*
* @returns The new date with the weeks added
*
* @example
* // Add 4 weeks to 1 September 2014:
* const result = addWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Sep 29 2014 00:00:00
*/
export declare function addWeeks<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
amount: number,
options?: AddWeeksOptions<ResultDate> | undefined,
): ResultDate;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.bundle.tracing.replay.feedback.logs.metrics.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.tracing.replay.feedback.logs.metrics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,MAAM,EACN,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,wBAAwB,IAAI,mBAAmB,EAAE,CAAC;AAEjH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}

View File

@@ -0,0 +1,2 @@
export * from './SemanticAttributes';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,602 @@
export const ruTranslations = {
authentication: {
account: 'Аккаунт',
accountOfCurrentUser: 'Аккаунт текущего пользователя',
accountVerified: 'Учетная запись успешно подтверждена.',
alreadyActivated: 'Уже активирован',
alreadyLoggedIn: 'Уже вошли в систему',
apiKey: 'API ключ',
authenticated: 'Аутентифицирован',
backToLogin: 'Вернуться к входу',
beginCreateFirstUser: 'Чтобы начать - создайте первого пользователя.',
changePassword: 'Сменить пароль',
checkYourEmailForPasswordReset: 'Если указанный адрес электронной почты связан с аккаунтом, вы скоро получите инструкции по сбросу пароля. Пожалуйста, проверьте папку со спамом или нежелательной почтой, если вы не видите письма во входящих.',
confirmGeneration: 'Подтвердить генерацию',
confirmPassword: 'Подтверждение пароля',
createFirstUser: 'Создание первого пользователя',
emailNotValid: 'Указанный адрес электронной почты неверен',
emailOrUsername: 'Электронная почта или Имя пользователя',
emailSent: 'Email отправлен',
emailVerified: 'Электронная почта успешно подтверждена.',
enableAPIKey: 'Активировать API ключ',
failedToUnlock: 'Не удалось разблокировать',
forceUnlock: 'Принудительная разблокировка',
forgotPassword: 'Забыли пароль',
forgotPasswordEmailInstructions: 'Пожалуйста, введите ваш email. Вы получите письмо с инструкцией по восстановлению пароля.',
forgotPasswordQuestion: 'Забыли пароль?',
forgotPasswordUsernameInstructions: 'Пожалуйста, введите ваше имя пользователя ниже. Инструкции по сбросу вашего пароля будут отправлены на адрес электронной почты, связанный с вашим именем пользователя.',
generate: 'Сгенерировать',
generateNewAPIKey: 'Сгенерировать новый API ключ',
generatingNewAPIKeyWillInvalidate: 'Генерация нового API ключа приведёт к <1>недействительности</1> предыдущего ключа. Вы уверены, что хотите продолжить?',
lockUntil: 'Заблокировать до',
logBackIn: 'Войти снова',
loggedIn: 'Чтобы войти в другую учетную запись, сначала <0>выйдите</0>.',
loggedInChangePassword: 'Чтобы изменить пароль, зайдите в свой <0>аккаунт</0> и измените пароль там.',
loggedOutInactivity: 'Вы вышли из системы из-за неактивности.',
loggedOutSuccessfully: 'Вы успешно вышли из системы.',
loggingOut: 'Выход из системы...',
login: 'Войти',
loginAttempts: 'Попытки входа',
loginUser: 'Вход пользователя в систему',
loginWithAnotherUser: 'Чтобы войти в систему под другим пользователем, необходимо сначала <0>выйти</0>.',
logOut: 'Выйти',
logout: 'Выйти',
logoutSuccessful: 'Выход выполнен успешно.',
logoutUser: 'Вход из системы',
newAccountCreated: 'Новый аккаунт был создан для доступа к <a href="{{serverURL}}">{{serverURL}}</a> Пожалуйста, кликните по следующей ссылке или вставьте в адресную строку браузера чтобы подтвердить email: <a href="{{verificationURL}}">{{verificationURL}}</a><br> После подтверждения вашего email, вы сможете успешно войти в систему.',
newAPIKeyGenerated: 'Новый API ключ сгенерирован.',
newPassword: 'Новый пароль',
passed: 'Аутентификация пройдена',
passwordResetSuccessfully: 'Сброс пароля успешно выполнен.',
resetPassword: 'Сброс пароля',
resetPasswordExpiration: 'Сброс пароля по истечении срока действия',
resetPasswordToken: 'Токен сброса пароля',
resetYourPassword: 'Сброс вашего пароля',
stayLoggedIn: 'Остаться в системе',
successfullyRegisteredFirstUser: 'Успешно зарегистрирован первый пользователь.',
successfullyUnlocked: 'Успешно разблокирован',
tokenRefreshSuccessful: 'Обновление токена прошло успешно.',
unableToVerify: 'Невозможно подтвердить',
username: 'Имя пользователя',
usernameNotValid: 'Предоставленное имя пользователя недействительно.',
verified: 'Подтверждено',
verifiedSuccessfully: 'Успешно подтверждено',
verify: 'Подтвердить',
verifyUser: 'Подтвердить пользователя',
verifyYourEmail: 'Подтвердить ваш email',
youAreInactive: 'Вы не были активны в течение некоторого времени и скоро автоматически выйдете из системы в целях вашей безопасности. Вы хотите остаться в системе?',
youAreReceivingResetPassword: 'Вы получили это сообщение, потому что вы (или кто-то другой) запросили сброс пароля для вашей учетной записи. Пожалуйста, нажмите на следующую ссылку или вставьте ее в браузер, чтобы завершить процесс:',
youDidNotRequestPassword: 'Если вы не запрашивали этого, пожалуйста, проигнорируйте это письмо, и ваш пароль останется неизменным.'
},
dashboard: {
addWidget: 'Добавить виджет',
deleteWidget: 'Удалить виджет {{id}}',
searchWidgets: 'Поиск виджетов...'
},
error: {
accountAlreadyActivated: 'Этот аккаунт уже был активирован.',
autosaving: 'При автосохранении этого документа возникла проблема.',
correctInvalidFields: 'Пожалуйста, исправьте неправильные поля.',
deletingFile: 'Произошла ошибка при удалении файла.',
deletingTitle: 'При удалении {{title}} произошла ошибка. Пожалуйста, проверьте соединение и повторите попытку.',
documentNotFound: 'Документ с ID {{id}} не удалось найти. Возможно, он был удален или никогда не существовал, или у вас нет доступа к нему.',
emailOrPasswordIncorrect: 'Указанный email или пароль неверен.',
followingFieldsInvalid_one: 'Следующее поле недействительно:',
followingFieldsInvalid_other: 'Следующие поля недействительны:',
incorrectCollection: 'Неправильная Коллекция',
insufficientClipboardPermissions: 'Доступ к буферу обмена отклонен. Проверьте разрешения буфера обмена.',
invalidClipboardData: 'Неверные данные в буфере обмена.',
invalidFileType: 'Недопустимый тип файла',
invalidFileTypeValue: 'Недопустимый тип файла: {{value}}',
invalidRequestArgs: 'В запрос переданы недопустимые аргументы: {{args}}',
loadingDocument: 'Возникла проблема при загрузке документа с ID {{id}}.',
localesNotSaved_one: 'Следующую локализацию не удалось сохранить:',
localesNotSaved_other: 'Следующие локализации не удалось сохранить:',
logoutFailed: 'Выход не удался.',
missingEmail: 'Отсутствует email.',
missingIDOfDocument: 'Отсутствующий ID документа для обновления.',
missingIDOfVersion: 'Отсутствует ID версии.',
missingRequiredData: 'Отсутствуют необходимые данные.',
noFilesUploaded: 'Не было загружено ни одного файла.',
noMatchedField: 'Не найдено подходящего поля для "{{label}}"',
notAllowedToAccessPage: 'Вы не имеете права доступа к этой странице.',
notAllowedToPerformAction: 'У вас нет права на выполнение этого действия.',
notFound: 'Запрашиваемый ресурс не найден.',
noUser: 'Нет Пользователя',
previewing: 'При предварительном просмотре этого документа возникла проблема.',
problemUploadingFile: 'Возникла проблема при загрузке файла.',
restoringTitle: 'Произошла ошибка при восстановлении {{title}}. Пожалуйста, проверьте свое соединение и попробуйте снова.',
revertingDocument: 'Возникла проблема при возврате этого документа.',
tokenInvalidOrExpired: 'Токен либо недействителен, либо срок его действия истек.',
tokenNotProvided: 'Токен не предоставлен.',
unableToCopy: 'Не удалось скопировать.',
unableToDeleteCount: 'Не удалось удалить {{count}} из {{total}} {{label}}.',
unableToReindexCollection: 'Ошибка при переиндексации коллекции {{collection}}. Операция прервана.',
unableToUpdateCount: 'Не удалось обновить {{count}} из {{total}} {{label}}.',
unauthorized: 'Нет доступа, вы должны войти, чтобы сделать этот запрос.',
unauthorizedAdmin: 'Нет доступа, этот пользователь не имеет доступа к панели администратора.',
unknown: 'Произошла неизвестная ошибка.',
unPublishingDocument: 'При отмене публикации этого документа возникла проблема.',
unspecific: 'Произошла ошибка.',
unverifiedEmail: 'Пожалуйста, подтвердите свою электронную почту перед входом.',
userEmailAlreadyRegistered: 'Пользователь с указанным email уже зарегистрирован.',
userLocked: 'Этот пользователь заблокирован из-за слишком большого количества неудачных попыток входа.',
usernameAlreadyRegistered: 'Пользователь с данным именем пользователя уже зарегистрирован.',
usernameOrPasswordIncorrect: 'Указанное имя пользователя или пароль неверны.',
valueMustBeUnique: 'Значение должно быть уникальным',
verificationTokenInvalid: 'Проверочный токен недействителен.'
},
fields: {
addLabel: 'Добавить {{label}}',
addLink: 'Добавить ссылку',
addNew: 'Добавить новый',
addNewLabel: 'Добавить {{label}}',
addRelationship: 'Добавить Отношения',
addUpload: 'Добавить загрузку',
block: 'Блок',
blocks: 'Блоки',
blockType: 'Тип Блока',
chooseBetweenCustomTextOrDocument: 'Выберите между вводом пользовательского текстового URL и ссылкой на другой документ.',
chooseDocumentToLink: 'Выберите документ для ссылки',
chooseFromExisting: 'Выбрать из существующих',
chooseLabel: 'Выбрать {{label}}',
collapseAll: 'Свернуть все',
customURL: 'Пользовательский URL',
editLabelData: 'Редактировать данные {{label}}',
editLink: 'Редактировать ссылку',
editRelationship: 'Редактировать Отношения',
enterURL: 'Введите URL',
internalLink: 'Внутренняя ссылка',
itemsAndMore: '{{items}} и ещё {{count}}',
labelRelationship: '{{label}} Отношения',
latitude: 'Широта',
linkedTo: 'Связано с <0>{{label}}</0>',
linkType: 'Тип ссылки',
longitude: 'Долгота',
newLabel: 'Новый {{label}}',
openInNewTab: 'Открывать в новой вкладке',
passwordsDoNotMatch: 'Пароли не совпадают.',
relatedDocument: 'Связанный документ',
relationTo: 'Отношение к',
removeRelationship: 'Удалить связь',
removeUpload: 'Удалить загруженное',
saveChanges: 'Сохранить изменения',
searchForBlock: 'Найти Блок',
searchForLanguage: 'Поиск языка',
selectExistingLabel: 'Выберите существующий {{label}}',
selectFieldsToEdit: 'Выберите поля для редактирования',
showAll: 'Показать все',
swapRelationship: 'Поменять отношения',
swapUpload: 'Заменить загруженное',
textToDisplay: 'Текст для отображения',
toggleBlock: 'Переключить Блок',
uploadNewLabel: 'Загрузить новый {{label}}'
},
folder: {
browseByFolder: 'Просмотр по папкам',
byFolder: 'По папке',
deleteFolder: 'Удалить папку',
folderName: 'Название папки',
folders: 'Папки',
folderTypeDescription: 'Выберите, какие типы документов коллекции должны быть разрешены в этой папке.',
itemHasBeenMoved: '{{title}} был перемещен в {{folderName}}',
itemHasBeenMovedToRoot: '{{title}} был перемещен в корневую папку',
itemsMovedToFolder: '{{title}} перемещен в {{folderName}}',
itemsMovedToRoot: '{{title}} перемещен в корневую папку',
moveFolder: 'Переместить папку',
moveItemsToFolderConfirmation: 'Вы собираетесь переместить <1>{{count}} {{label}}</1> в <2>{{toFolder}}</2>. Вы уверены?',
moveItemsToRootConfirmation: 'Вы собираетесь перенести <1>{{count}} {{label}}</1> в корневую папку. Вы уверены?',
moveItemToFolderConfirmation: 'Вы собираетесь переместить <1>{{title}}</1> в <2>{{toFolder}}</2>. Вы уверены?',
moveItemToRootConfirmation: 'Вы собираетесь переместить <1>{{title}}</1> в корневую папку. Вы уверены?',
movingFromFolder: 'Перемещение {{title}} из {{fromFolder}}',
newFolder: 'Новая папка',
noFolder: 'Нет папки',
renameFolder: 'Переименовать папку',
searchByNameInFolder: 'Поиск по имени в {{folderName}}',
selectFolderForItem: 'Выберите папку для {{title}}'
},
general: {
name: 'Имя',
aboutToDelete: 'Вы собираетесь удалить {{label}} <1>{{title}}</1>. Вы уверены?',
aboutToDeleteCount_many: 'Вы собираетесь удалить {{count}} {{label}}',
aboutToDeleteCount_one: 'Вы собираетесь удалить {{count}} {{label}}',
aboutToDeleteCount_other: 'Вы собираетесь удалить {{count}} {{label}}',
aboutToPermanentlyDelete: 'Вы собираетесь навсегда удалить {{label}} <1>{{title}}</1>. Вы уверены?',
aboutToPermanentlyDeleteTrash: 'Вы собираетесь навсегда удалить <0>{{count}}</0> <1>{{label}}</1> из корзины. Вы уверены?',
aboutToRestore: 'Вы собираетесь восстановить {{label}} <1>{{title}}</1>. Вы уверены?',
aboutToRestoreAsDraft: 'Вы собираетесь восстановить {{label}} <1>{{title}}</1> как черновик. Вы уверены?',
aboutToRestoreAsDraftCount: 'Вы собираетесь восстановить {{count}} {{label}} как черновик',
aboutToRestoreCount: 'Вы собираетесь восстановить {{count}} {{label}}',
aboutToTrash: 'Вы собираетесь переместить {{label}} <1>{{title}}</1> в корзину. Вы уверены?',
aboutToTrashCount: 'Вы собираетесь переместить {{count}} {{label}} в корзину',
addBelow: 'Добавить ниже',
addFilter: 'Добавить фильтр',
adminTheme: 'Тема Панели',
all: 'Все',
allCollections: 'Все Коллекции',
allLocales: 'Все локали',
and: 'А также',
anotherUser: 'Другой пользователь',
anotherUserTakenOver: 'Другой пользователь взял на себя редактирование этого документа.',
applyChanges: 'Применить изменения',
ascending: 'Восходящий',
automatic: 'Автоматически',
backToDashboard: 'Назад к Панели',
cancel: 'Отмена',
changesNotSaved: 'Ваши изменения не были сохранены. Если вы сейчас уйдете, то потеряете свои изменения.',
clear: 'Четкий',
clearAll: 'Очистить все',
close: 'Закрыть',
collapse: 'Свернуть',
collections: 'Коллекции',
columns: 'Колонки',
columnToSort: 'Колонка для сортировки',
confirm: 'Подтвердить',
confirmCopy: 'Подтвердить копирование',
confirmDeletion: 'Подтвердить удаление',
confirmDuplication: 'Подтвердить копирование',
confirmMove: 'Подтвердите перемещение',
confirmReindex: 'Переиндексировать все {{collections}}?',
confirmReindexAll: 'Переиндексировать все коллекции?',
confirmReindexDescription: 'Это удалит существующие индексы и переиндексирует документы в коллекциях {{collections}}.',
confirmReindexDescriptionAll: 'Это удалит существующие индексы и переиндексирует документы во всех коллекциях.',
confirmRestoration: 'Подтвердите восстановление',
copied: 'Скопировано',
copy: 'Скопировать',
copyField: 'Копировать поле',
copying: 'Копирование',
copyRow: 'Копировать строку',
copyWarning: 'Вы собираетесь перезаписать {{to}} на {{from}} для {{label}} {{title}}. Вы уверены?',
create: 'Создать',
created: 'Создано',
createdAt: 'Дата создания',
createNew: 'Создать',
createNewLabel: 'Создать новый {{label}}',
creating: 'Создание',
creatingNewLabel: 'Создание нового {{label}}',
currentlyEditing: 'в настоящее время редактирует этот документ. Если вы возьмете на себя, они будут заблокированы от продолжения редактирования и могут потерять несохраненные изменения.',
custom: 'Обычай',
dark: 'Тёмная',
dashboard: 'Панель',
delete: 'Удалить',
deleted: 'Удалено',
deletedAt: 'Удалено В',
deletedCountSuccessfully: 'Удалено {{count}} {{label}} успешно.',
deletedSuccessfully: 'Удален успешно.',
deleteLabel: 'Удалить {{label}}',
deletePermanently: 'Пропустить корзину и удалить навсегда',
deleting: 'Удаление...',
depth: 'Глубина',
descending: 'Уменьшение',
deselectAllRows: 'Снять выделение со всех строк',
document: 'Документ',
documentIsTrashed: 'Этот {{label}} находится в корзине и доступен только для чтения.',
documentLocked: 'Документ заблокирован',
documents: 'Документы',
duplicate: 'Дублировать',
duplicateWithoutSaving: 'Дублирование без сохранения изменений',
edit: 'Редактировать',
editAll: 'Редактировать все',
editedSince: 'Отредактировано с',
editing: 'Редактирование',
editingLabel_many: 'Редактирование {{count}} {{label}}',
editingLabel_one: 'Редактирование {{count}} {{label}}',
editingLabel_other: 'Редактирование {{count}} {{label}}',
editingTakenOver: 'Редактирование взято под контроль',
editLabel: 'Редактировать {{label}}',
email: 'Email',
emailAddress: 'Email',
emptyTrash: 'Очистить корзину',
emptyTrashLabel: 'Очистить корзину для {{label}}',
enterAValue: 'Введите значение',
error: 'Ошибка',
errors: 'Ошибки',
exitLivePreview: 'Выйти из режима прямого просмотра',
export: 'Экспорт',
fallbackToDefaultLocale: 'Возврат к локали по умолчанию',
false: 'Ложь',
filter: 'Фильтр',
filters: 'Фильтры',
filterWhere: 'Где фильтровать',
globals: 'Глобальные',
goBack: 'Назад',
groupByLabel: 'Группировать по {{label}}',
import: 'Импорт',
isEditing: 'редактирует',
item: 'Предмет',
items: 'предметы',
language: 'Язык',
lastModified: 'Последнее изменение',
layout: 'Макет',
leaveAnyway: 'Все равно уйти',
leaveWithoutSaving: 'Выход без сохранения',
light: 'Светлая',
livePreview: 'Предпросмотр',
loading: 'Загрузка',
locale: 'Локаль',
locales: 'Локали',
lock: 'Замок',
menu: 'Меню',
moreOptions: 'Больше вариантов',
move: 'Переместить',
moveConfirm: 'Вы собираетесь переместить {{count}} {{label}} в <1>{{destination}}</1>. Вы уверены?',
moveCount: 'Переместить {{count}} {{label}}',
moveDown: 'Сдвинуть вниз',
moveUp: 'Сдвинуть вверх',
moving: 'Переезд',
movingCount: 'Перемещение {{count}} {{label}}',
newLabel: 'Новый {{label}}',
newPassword: 'Новый пароль',
next: 'Следующий',
no: 'Нет',
noDateSelected: 'Дата не выбрана',
noFiltersSet: 'Фильтры не установлены',
noLabel: 'Без метки',
none: 'Никто',
noOptions: 'Нет вариантов',
noResults: 'Ничего не найдено. Возможно, {{label}} еще не существует или не соответствует указанным фильтрам.',
noResultsDescription: 'Либо они не существуют, либо не соответствуют указанным вами фильтрам выше.',
noResultsFound: 'Результатов не найдено.',
notFound: 'Не найдено',
nothingFound: 'Ничего не найдено',
noTrashResults: 'Нет {{label}} в корзине.',
noUpcomingEventsScheduled: 'Нет запланированных предстоящих событий.',
noValue: 'Нет значения',
of: 'из',
only: 'Только',
open: 'Открыть',
or: 'Или же',
order: 'Порядок',
overwriteExistingData: 'Перезаписать существующие данные поля',
pageNotFound: 'Страница не найдена',
password: 'Пароль',
pasteField: 'Вставить поле',
pasteRow: 'Вставить строку',
payloadSettings: 'Настройки Payload',
permanentlyDelete: 'Удалить Навсегда',
permanentlyDeletedCountSuccessfully: 'Успешно удалено {{count}} {{label}} навсегда.',
perPage: 'На странице: {{limit}}',
previous: 'Предыдущий',
reindex: 'Переиндексировать',
reindexingAll: 'Переиндексирование всех {{collections}}.',
remove: 'Удалить',
rename: 'Переименовать',
reset: 'Сброс',
resetPreferences: 'Сбросить настройки',
resetPreferencesDescription: 'Это сбросит все ваши настройки до значений по умолчанию.',
resettingPreferences: 'Сброс настроек.',
restore: 'Восстановить',
restoreAsPublished: 'Восстановить как опубликованную версию',
restoredCountSuccessfully: 'Восстановлено успешно {{count}} {{label}}.',
restoring: 'Восстановление...',
row: 'Строка',
rows: 'Строки',
save: 'Сохранить',
saveChanges: 'Сохранить изменения',
saving: 'Сохранение...',
schedulePublishFor: 'Запланировать публикацию для {{title}}',
searchBy: 'Искать по',
select: 'Выбрать',
selectAll: 'Выбрать все {{count}} {{label}}',
selectAllRows: 'Выбрать все строки',
selectedCount: '{{count}} {{label}} выбрано',
selectLabel: 'Выберите {{label}}',
selectValue: 'Выбрать значение',
showAllLabel: 'Показать все {{label}}',
sorryNotFound: 'К сожалению, ничего подходящего под ваш запрос нет.',
sort: 'Сортировать',
sortByLabelDirection: 'Сортировать по {{label}} {{direction}}',
stayOnThisPage: 'Остаться на этой странице',
submissionSuccessful: 'Успешно отправлено.',
submit: 'Отправить',
submitting: 'Отправка...',
success: 'Успешно',
successfullyCreated: '{{label}} успешно создан.',
successfullyDuplicated: '{{label}} успешно продублирован.',
successfullyReindexed: 'Успешно переиндексировано {{count}} из {{total}} документов из {{collections}}, пропущено {{skips}} черновиков.',
takeOver: 'Взять на себя',
thisLanguage: 'Русский',
time: 'Время',
timezone: 'Часовой пояс',
titleDeleted: '{{label}} {{title}} успешно удалено.',
titleRestored: '{{label}} "{{title}}" успешно восстановлен.',
titleTrashed: '{{label}} "{{title}}" перемещен в корзину.',
trash: 'Мусор',
trashedCountSuccessfully: '{{count}} {{label}} перемещено в корзину.',
true: 'Правда',
unauthorized: 'Нет доступа',
unlock: 'Разблокировать',
unsavedChanges: 'У вас есть несохраненные изменения. Сохраните или отмените их перед продолжением.',
unsavedChangesDuplicate: 'У вас есть несохраненные изменения. Вы хотите продолжить дублирование?',
untitled: 'Без названия',
upcomingEvents: 'Предстоящие события',
updatedAt: 'Дата правки',
updatedCountSuccessfully: 'Обновлено {{count}} {{label}} успешно.',
updatedLabelSuccessfully: 'Успешно обновлено {{label}}.',
updatedSuccessfully: 'Успешно Обновлено.',
updateForEveryone: 'Обновление для всех',
updating: 'Обновление',
uploading: 'Загрузка',
uploadingBulk: 'Загрузка {{current}} из {{total}}',
user: 'пользователь',
username: 'Имя пользователя',
users: 'пользователи',
value: 'Значение',
viewing: 'Просмотр',
viewReadOnly: 'Просмотр только для чтения',
welcome: 'Добро пожаловать',
yes: 'Да'
},
localization: {
cannotCopySameLocale: 'Невозможно скопировать в ту же локаль',
copyFrom: 'Скопировать из',
copyFromTo: 'Копирование из {{from}} в {{to}}',
copyTo: 'Копировать в',
copyToLocale: 'Копировать в локаль',
localeToPublish: 'Локаль для публикации',
selectedLocales: 'Выбранные локали',
selectLocaleToCopy: 'Выберите локаль для копирования',
selectLocaleToDuplicate: 'Выберите локали для дублирования'
},
operators: {
contains: 'содержит',
equals: 'равно',
exists: 'существует',
intersects: 'пересекает',
isGreaterThan: 'больше чем',
isGreaterThanOrEqualTo: 'больше или равно',
isIn: 'находится',
isLessThan: 'меньше чем',
isLessThanOrEqualTo: 'меньше или равно',
isLike: 'похоже',
isNotEqualTo: 'не равно',
isNotIn: 'нет в',
isNotLike: 'не похож',
near: 'рядом',
within: 'в пределах'
},
upload: {
addFile: 'Добавить файл',
addFiles: 'Добавить файлы',
bulkUpload: 'Массовая загрузка',
crop: 'Обрезать',
cropToolDescription: 'Перетащите углы выбранной области, нарисуйте новую область или отрегулируйте значения ниже.',
download: 'Скачать',
dragAndDrop: 'Перетащите файл',
dragAndDropHere: 'или перетащите файл сюда',
editImage: 'Редактировать изображение',
fileName: 'Имя файла',
fileSize: 'Размер файла',
filesToUpload: 'Файлы для загрузки',
fileToUpload: 'Файл для загрузки',
focalPoint: 'Центральная точка',
focalPointDescription: 'Перетащите фокусное расстояние прямо на предварительный просмотр или отрегулируйте значения ниже.',
height: 'Высота',
lessInfo: 'Меньше информации',
moreInfo: 'Больше информации',
noFile: 'Нет файла',
pasteURL: 'Вставить URL',
previewSizes: 'Предварительный просмотр размеров',
selectCollectionToBrowse: 'Выберите Коллекцию для просмотра',
selectFile: 'Выберите файл',
setCropArea: 'Установите область обрезки',
setFocalPoint: 'Установить фокусное расстояние',
sizes: 'Размеры',
sizesFor: 'Размеры для {{label}}',
width: 'Ширина'
},
validation: {
emailAddress: 'Пожалуйста, введите корректный адрес email.',
enterNumber: 'Пожалуйста, введите корректный номер.',
fieldHasNo: 'У этого поля нет {{label}}',
greaterThanMax: '{{value}} больше максимально допустимого значения {{label}} {{max}}.',
invalidBlock: 'Блок "{{block}}" не разрешен.',
invalidBlocks: 'В этом поле содержатся блоки, которые больше не разрешены: {{blocks}}.',
invalidInput: 'Это поле имеет недопустимое значение.',
invalidSelection: 'В этом поле выбран недопустимый вариант.',
invalidSelections: "'Это поле содержит следующие неправильные варианты:'",
latitudeOutOfBounds: 'Широта должна быть между -90 и 90.',
lessThanMin: '{{value}} меньше минимально допустимого значения {{label}} {{min}}.',
limitReached: 'Достигнут лимит, можно добавить только {{max}} элементов.',
longerThanMin: 'Это значение должно быть больше минимальной длины символов: {{minLength}}.',
longitudeOutOfBounds: 'Долгота должна быть между -180 и 180.',
notValidDate: '"{{value}}" это не действительная дата.',
required: 'Это обязательное поле.',
requiresAtLeast: 'Это поле требует не менее {{count}} {{label}}',
requiresNoMoreThan: 'Это поле требует не более {{count}} {{label}}',
requiresTwoNumbers: 'В этом поле требуется два числа.',
shorterThanMax: 'Это значение должно быть короче максимальной длины символов {{maxLength}}.',
timezoneRequired: 'Требуется указать часовой пояс.',
trueOrFalse: 'Это поле может быть равно только true или false.',
username: 'Пожалуйста, введите действительное имя пользователя. Может содержать буквы, цифры, дефисы, точки и подчёркивания.',
validUploadID: "'Это поле не является действительным ID загрузки.'"
},
version: {
type: 'Тип',
aboutToPublishSelection: 'Вы собираетесь опубликовать все {{label}} в выборе. Вы уверены?',
aboutToRestore: 'Вы собираетесь восстановить этот документ {{label}} в состояние, в котором он находился {{versionDate}}.',
aboutToRestoreGlobal: 'Вы собираетесь восстановить глобальную запись {{label}} в состояние, в котором она находилась {{versionDate}}.',
aboutToRevertToPublished: 'Вы собираетесь вернуть изменения этого документа к его опубликованному состоянию. Вы уверены?',
aboutToUnpublish: 'Вы собираетесь отменить публикацию этого документа. Вы уверены?',
aboutToUnpublishIn: 'Вы собираетесь снять с публикации этот документ на {{locale}}. Вы уверены?',
aboutToUnpublishSelection: 'Вы собираетесь отменить публикацию всех выбранных {{label}}. Вы уверены?',
autosave: 'Автосохранение',
autosavedSuccessfully: 'Автосохранение успешно.',
autosavedVersion: 'Автоматически сохраненная версия',
changed: 'Изменено',
changedFieldsCount_one: '{{count}} изменил поле',
changedFieldsCount_other: '{{count}} измененных полей',
compareVersion: 'Сравнить версию с:',
compareVersions: 'Сравнить версии',
comparingAgainst: 'Сравнивая с',
confirmPublish: 'Подтвердить публикацию',
confirmRevertToSaved: 'Подтвердить возврат к сохраненному',
confirmUnpublish: 'Подтвердить отмену публикации',
confirmVersionRestoration: 'Подтвердить восстановление версии',
currentDocumentStatus: 'Текущий статус {{docStatus}} документа',
currentDraft: 'Текущий проект',
currentlyPublished: 'В настоящее время опубликовано',
currentlyViewing: 'В настоящее время просматривается',
currentPublishedVersion: 'Текущая опубликованная версия',
draft: 'Черновик',
draftHasPublishedVersion: 'Черновик (имеет опубликованную версию)',
draftSavedSuccessfully: 'Черновик успешно сохранен.',
lastSavedAgo: 'Последний раз сохранено {{distance}} назад',
modifiedOnly: 'Модифицирован только',
moreVersions: 'Больше версий...',
noFurtherVersionsFound: 'Другие версии не найдены',
noLabelGroup: 'Неименованная Группа',
noRowsFound: 'Не найдено {{label}}',
noRowsSelected: 'Не выбран {{label}}',
preview: 'Предпросмотр',
previouslyDraft: 'Ранее был черновик',
previouslyPublished: 'Ранее опубликовано',
previousVersion: 'Предыдущая версия',
problemRestoringVersion: 'Возникла проблема с восстановлением этой версии',
publish: 'Публиковать',
publishAllLocales: 'Опубликовать все локали',
publishChanges: 'Опубликовать изменения',
published: 'Опубликовано',
publishIn: 'Опубликовать на {{locale}}',
publishing: 'Публикация',
restoreAsDraft: 'Восстановить как черновик',
restoredSuccessfully: 'Восстановлен успешно.',
restoreThisVersion: 'Восстановить эту версию',
restoring: 'Восстановление...',
reverting: 'Возврат...',
revertToPublished: 'Вернуться к опубликованному',
revertUnsuccessful: 'Откат не удался. Ранее опубликованная версия не найдена.',
saveDraft: 'Сохранить черновик',
scheduledSuccessfully: 'Успешно запланировано.',
schedulePublish: 'Планирование публикации',
selectLocales: 'Выберите локали для отображения',
selectVersionToCompare: 'Выбрать версию для сравнения',
showingVersionsFor: 'Показаны версии для:',
showLocales: 'Показать локали:',
specificVersion: 'Конкретная версия',
status: 'Статус',
unpublish: 'Отменить публикацию',
unpublished: 'Неопубликованный',
unpublishedSuccessfully: 'Успешно снято с публикации.',
unpublishIn: 'Отменить публикацию на {{locale}}',
unpublishing: 'Отмена публикации...',
version: 'Версия',
versionAgo: '{{distance}} назад',
versionCount_many: '{{count}} версий найдено',
versionCount_none: 'Версий не найдено',
versionCount_one: '{{count}} версия найдена',
versionCount_other: 'Найдено {{count}} версий',
versionID: 'ID версии',
versions: 'Версии',
viewingVersion: 'Просмотр версии для {{entityLabel}} {{documentTitle}}',
viewingVersionGlobal: '`Просмотр версии для глобальной Коллекции {{entityLabel}}',
viewingVersions: 'Просмотр версий для {{entityLabel}} {{documentTitle}}',
viewingVersionsGlobal: '`Просмотр версии для глобальной Коллекции {{entityLabel}}'
}
};
export const ru = {
dateFNSKey: 'ru',
translations: ruTranslations
};
//# sourceMappingURL=ru.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAA+B,MAAM,cAAc,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAYpD,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,+BAA+B,EAAE,MAAM,+CAA+C,CAAC;AAGhG,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAezF,qEAAqE;AACrE,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAwEhE;AAiCD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,sBAAsB,EAAE,CAAC,GAAG,CAAC,CAEhE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,wCAAwC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.54.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-connect';\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/LivePreview/DeviceContainer/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CA+CA,CAAA"}

View File

@@ -0,0 +1,31 @@
/// <reference types="node" />
import { HandlerOptions as HttpHandlerOptions } from './http.mjs';
import { OperationContext } from '../handler.mjs';
/**
* Handler options when using the node adapter.
*
* @category Server/node
*
* @deprecated Please use {@link use/http.HandlerOptions | http} or {@link use/http2.HandlerOptions | http2} adapters instead.
*/
export type HandlerOptions<Context extends OperationContext = undefined> = HttpHandlerOptions<Context>;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the Node environment.
*
* ```js
* import http from 'http';
* import { createHandler } from 'graphql-http/lib/use/node';
* import { schema } from './my-graphql-schema/index.mjs';
*
* const server = http.createServer(createHandler({ schema }));
*
* server.listen(4000);
* console.log('Listening to port 4000');
* ```
*
* @category Server/node
*
* @deprecated Please use {@link use/http.createHandler | http} or {@link use/http2.createHandler | http2} adapters instead.
*/
export declare function createHandler<Context extends OperationContext = undefined>(options: HandlerOptions<Context>): (req: import("http").IncomingMessage, res: import("http").ServerResponse<import("http").IncomingMessage>) => Promise<void>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAkB,EAClB,CAAkB,EAClB,GAAW,EACX,EAAE;IACF,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,GAAG,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEvD,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IAEzD,OAAO,CACL,CAAC,IAAI;QACH,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACX,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACT,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;KAClC,CACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IAC9C,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,CAAS,EACT,CAAS,EACT,GAAW,EACmB,EAAE;IAChC,IAAI,IAAc,EAChB,GAAuB,EACvB,IAAY,EACZ,KAAK,GAAuB,SAAS,EACrC,MAAoC,CAAA;IACtC,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,IAAI,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;QACjB,CAAC;QACD,IAAI,GAAG,EAAE,CAAA;QACT,IAAI,GAAG,GAAG,CAAC,MAAM,CAAA;QAEjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACZ,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;iBAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBACpB,IAAI,CAAC,KAAK,SAAS;oBAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;YACvC,CAAC;iBAAM,CAAC;gBACN,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;gBAChB,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,GAAG,IAAI,EAAE,CAAC;oBACpC,IAAI,GAAG,GAAG,CAAA;oBACV,KAAK,GAAG,EAAE,CAAA;gBACZ,CAAC;gBAED,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAC5B,CAAC;YAED,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QAClC,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"names":["ReferencedIdentifier","exports","ReferencedMemberExpression","BindingIdentifier","Statement","Expression","Scope","Referenced","BlockScoped","Var","User","Generated","Pure","Flow","RestProperty","SpreadProperty","ExistentialTypeParam","NumericLiteralTypeAnnotation","ForAwaitStatement"],"sources":["../../../src/path/lib/virtual-types.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\n\nexport interface VirtualTypeAliases {\n BindingIdentifier: t.Identifier;\n BlockScoped:\n | t.FunctionDeclaration\n | t.ClassDeclaration\n | t.VariableDeclaration;\n ExistentialTypeParam: t.ExistsTypeAnnotation;\n Expression: t.Expression;\n Flow: t.Flow | t.ImportDeclaration | t.ExportDeclaration | t.ImportSpecifier;\n ForAwaitStatement: t.ForOfStatement;\n Generated: t.Node;\n NumericLiteralTypeAnnotation: t.NumberLiteralTypeAnnotation;\n Pure: t.Node;\n Referenced: t.Node;\n ReferencedIdentifier: t.Identifier | t.JSXIdentifier;\n ReferencedMemberExpression: t.MemberExpression;\n RestProperty: t.RestElement;\n Scope: t.Scopable | t.Pattern;\n SpreadProperty: t.RestElement;\n Statement: t.Statement;\n User: t.Node;\n Var: t.VariableDeclaration;\n}\n\ntype VirtualTypeMapping = readonly (t.Node[\"type\"] | keyof t.Aliases)[] | null;\n\nexport const ReferencedIdentifier: VirtualTypeMapping = [\n \"Identifier\",\n \"JSXIdentifier\",\n] as const;\n\nexport const ReferencedMemberExpression: VirtualTypeMapping = [\n \"MemberExpression\",\n] as const;\n\nexport const BindingIdentifier: VirtualTypeMapping = [\"Identifier\"] as const;\n\nexport const Statement: VirtualTypeMapping = [\"Statement\"] as const;\n\nexport const Expression: VirtualTypeMapping = [\"Expression\"] as const;\n\nexport const Scope: VirtualTypeMapping = [\"Scopable\", \"Pattern\"] as const;\n\nexport const Referenced: VirtualTypeMapping = null;\n\nexport const BlockScoped: VirtualTypeMapping = [\n \"FunctionDeclaration\",\n \"ClassDeclaration\",\n \"VariableDeclaration\",\n] as const;\n\nexport const Var: VirtualTypeMapping = [\"VariableDeclaration\"];\n\nexport const User: VirtualTypeMapping = null;\n\nexport const Generated: VirtualTypeMapping = null;\n\nexport const Pure: VirtualTypeMapping = null;\n\nexport const Flow: VirtualTypeMapping = [\n \"Flow\",\n \"ImportDeclaration\",\n \"ExportDeclaration\",\n \"ImportSpecifier\",\n] as const;\n\n// TODO: 7.0 Backwards Compat\nexport const RestProperty: VirtualTypeMapping = [\"RestElement\"] as const;\n\nexport const SpreadProperty: VirtualTypeMapping = [\"RestElement\"] as const;\n\nexport const ExistentialTypeParam: VirtualTypeMapping = [\n \"ExistsTypeAnnotation\",\n] as const;\n\nexport const NumericLiteralTypeAnnotation: VirtualTypeMapping = [\n \"NumberLiteralTypeAnnotation\",\n] as const;\n\nexport const ForAwaitStatement: VirtualTypeMapping = [\n \"ForOfStatement\",\n] as const;\n"],"mappings":";;;;;;AA4BO,MAAMA,oBAAwC,GAAAC,OAAA,CAAAD,oBAAA,GAAG,CACtD,YAAY,EACZ,eAAe,CACP;AAEH,MAAME,0BAA8C,GAAAD,OAAA,CAAAC,0BAAA,GAAG,CAC5D,kBAAkB,CACV;AAEH,MAAMC,iBAAqC,GAAAF,OAAA,CAAAE,iBAAA,GAAG,CAAC,YAAY,CAAU;AAErE,MAAMC,SAA6B,GAAAH,OAAA,CAAAG,SAAA,GAAG,CAAC,WAAW,CAAU;AAE5D,MAAMC,UAA8B,GAAAJ,OAAA,CAAAI,UAAA,GAAG,CAAC,YAAY,CAAU;AAE9D,MAAMC,KAAyB,GAAAL,OAAA,CAAAK,KAAA,GAAG,CAAC,UAAU,EAAE,SAAS,CAAU;AAElE,MAAMC,UAA8B,GAAAN,OAAA,CAAAM,UAAA,GAAG,IAAI;AAE3C,MAAMC,WAA+B,GAAAP,OAAA,CAAAO,WAAA,GAAG,CAC7C,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,CACb;AAEH,MAAMC,GAAuB,GAAAR,OAAA,CAAAQ,GAAA,GAAG,CAAC,qBAAqB,CAAC;AAEvD,MAAMC,IAAwB,GAAAT,OAAA,CAAAS,IAAA,GAAG,IAAI;AAErC,MAAMC,SAA6B,GAAAV,OAAA,CAAAU,SAAA,GAAG,IAAI;AAE1C,MAAMC,IAAwB,GAAAX,OAAA,CAAAW,IAAA,GAAG,IAAI;AAErC,MAAMC,IAAwB,GAAAZ,OAAA,CAAAY,IAAA,GAAG,CACtC,MAAM,EACN,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,CACT;AAGH,MAAMC,YAAgC,GAAAb,OAAA,CAAAa,YAAA,GAAG,CAAC,aAAa,CAAU;AAEjE,MAAMC,cAAkC,GAAAd,OAAA,CAAAc,cAAA,GAAG,CAAC,aAAa,CAAU;AAEnE,MAAMC,oBAAwC,GAAAf,OAAA,CAAAe,oBAAA,GAAG,CACtD,sBAAsB,CACd;AAEH,MAAMC,4BAAgD,GAAAhB,OAAA,CAAAgB,4BAAA,GAAG,CAC9D,6BAA6B,CACrB;AAEH,MAAMC,iBAAqC,GAAAjB,OAAA,CAAAiB,iBAAA,GAAG,CACnD,gBAAgB,CACR","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {\n getStringFromEnv,\n getBooleanFromEnv,\n getNumberFromEnv,\n getStringListFromEnv,\n} from './environment';\nexport { _globalThis } from '../../common/globalThis';\nexport { SDK_INFO } from './sdk-info';\n\n/**\n * @deprecated Use performance directly.\n */\nexport const otperformance = performance;\n"]}

View File

@@ -0,0 +1,51 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isValidTraceId } from '@opentelemetry/api';
import { SamplingDecision } from '../Sampler';
/** Sampler that samples a given fraction of traces based of trace id deterministically. */
export class TraceIdRatioBasedSampler {
_ratio;
_upperBound;
constructor(ratio = 0) {
this._ratio = this._normalize(ratio);
this._upperBound = Math.floor(this._ratio * 0xffffffff);
}
shouldSample(context, traceId) {
return {
decision: isValidTraceId(traceId) && this._accumulate(traceId) < this._upperBound
? SamplingDecision.RECORD_AND_SAMPLED
: SamplingDecision.NOT_RECORD,
};
}
toString() {
return `TraceIdRatioBased{${this._ratio}}`;
}
_normalize(ratio) {
if (typeof ratio !== 'number' || isNaN(ratio))
return 0;
return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;
}
_accumulate(traceId) {
let accumulation = 0;
for (let i = 0; i < traceId.length / 8; i++) {
const pos = i * 8;
const part = parseInt(traceId.slice(pos, pos + 8), 16);
accumulation = (accumulation ^ part) >>> 0;
}
return accumulation;
}
}
//# sourceMappingURL=TraceIdRatioBasedSampler.js.map

View File

@@ -0,0 +1,4 @@
/*#__NO_SIDE_EFFECTS__*/
const noop = (any) => any;
export { noop };

View File

@@ -0,0 +1,24 @@
/**
* @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 HardDrive = createLucideIcon("HardDrive", [
["line", { x1: "22", x2: "2", y1: "12", y2: "12", key: "1y58io" }],
[
"path",
{
d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",
key: "oot6mr"
}
],
["line", { x1: "6", x2: "6.01", y1: "16", y2: "16", key: "sgf278" }],
["line", { x1: "10", x2: "10.01", y1: "16", y2: "16", key: "1l4acy" }]
]);
export { HardDrive as default };
//# sourceMappingURL=hard-drive.js.map

View File

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

View File

@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLLatitude = void 0;
// Inspired by Geolib: https://github.com/manuelbieh/geolib
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
// Minimum latitude
const MIN_LAT = -90.0;
// Maximum latitude
const MAX_LAT = 90.0;
// See https://en.wikipedia.org/wiki/Decimal_degrees#Precision
const MAX_PRECISION = 8;
const validate = (value, ast) => {
// Check if value is a string or a number
if ((typeof value !== 'string' && typeof value !== 'number') ||
value === null ||
typeof value === 'undefined' ||
Number.isNaN(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is neither a number nor a string: ${value}`, ast ? { nodes: ast } : undefined);
}
if ((0, utilities_js_1.isDecimal)(value)) {
const decimalValue = typeof value === 'string' ? Number.parseFloat(value) : value;
if (decimalValue < MIN_LAT || decimalValue > MAX_LAT) {
throw (0, error_js_1.createGraphQLError)(`Value must be between ${MIN_LAT} and ${MAX_LAT}: ${value}`, ast ? { nodes: ast } : undefined);
}
return Number.parseFloat(decimalValue.toFixed(MAX_PRECISION));
}
if ((0, utilities_js_1.isSexagesimal)(value)) {
return validate((0, utilities_js_1.sexagesimalToDecimal)(value));
}
throw (0, error_js_1.createGraphQLError)(`Value is not a valid latitude: ${value}`, ast ? { nodes: ast } : undefined);
};
exports.GraphQLLatitude = new graphql_1.GraphQLScalarType({
name: `Latitude`,
description: `A field whose value is a valid decimal degrees latitude number (53.471): https://en.wikipedia.org/wiki/Latitude`,
serialize(value) {
return validate(value);
},
parseValue(value) {
return validate(value);
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.FLOAT && ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate floats or strings as latitude but got a: ${ast.kind}`, {
nodes: [ast],
});
}
return validate(ast.value, ast);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'Latitude',
type: 'number',
minimum: MIN_LAT,
maximum: MAX_LAT,
},
},
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,mEAIiC;AAH/B,wDAAA,oBAAoB,CAAA"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P 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"},C:{"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 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 5C","2":"0C VC 4C"},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 6C bC 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"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 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 LD MD PC xC ND QC","2":"F JD KD"},G:{"1":"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:{"1":"mD"},I:{"1":"VC J I nD oD pD qD yC rD sD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"CSS3 Multiple backgrounds",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"file":"sanitizePermissions.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizePermissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAKV,WAAW,EAIX,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AAsKzB,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,IAAI,CAUpF;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAU5E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,YAAY,CAAC,WAAW,EAAE,gBAAgB,CAAC,GAChD,oBAAoB,CAiBtB"}

View File

@@ -0,0 +1,46 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
/** @typedef {import("../Module").BuildInfo} BuildInfo */
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../javascript/JavascriptParser").JavascriptParserState} JavascriptParserState */
/** @type {WeakMap<JavascriptParserState, boolean>} */
const parserStateExportsState = new WeakMap();
/**
* @param {JavascriptParserState} parserState parser state
* @param {boolean} isStrictHarmony strict harmony mode should be enabled
* @returns {void}
*/
module.exports.enable = (parserState, isStrictHarmony) => {
const value = parserStateExportsState.get(parserState);
if (value === false) return;
parserStateExportsState.set(parserState, true);
if (value !== true) {
const buildMeta = /** @type {BuildMeta} */ (parserState.module.buildMeta);
buildMeta.exportsType = "namespace";
const buildInfo = /** @type {BuildInfo} */ (parserState.module.buildInfo);
buildInfo.strict = true;
buildInfo.exportsArgument = RuntimeGlobals.exports;
if (isStrictHarmony) {
buildMeta.strictHarmonyModule = true;
buildInfo.moduleArgument = "__webpack_module__";
}
}
};
/**
* @param {JavascriptParserState} parserState parser state
* @returns {boolean} true, when enabled
*/
module.exports.isEnabled = (parserState) => {
const value = parserStateExportsState.get(parserState);
return value === true;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Logo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2BtC,CAAA"}

View File

@@ -0,0 +1,4 @@
import { ALIGNMENT, CharLengthDict } from '../models/common';
export declare const splitTextIntoTextsOfMinLen: (inpStr: string, width: number, charLength?: CharLengthDict) => string[];
export declare const textWithPadding: (text: string, alignment: ALIGNMENT, columnLen: number, charLength?: CharLengthDict) => string;
export declare const biggestWordInSentence: (inpStr: string, charLength?: CharLengthDict) => number;

View File

@@ -0,0 +1,8 @@
/**
* Should be called in `i18n/request.ts` to create the configuration for the current request.
*/
function getRequestConfig(createRequestConfig) {
return createRequestConfig;
}
export { getRequestConfig as default };

View File

@@ -0,0 +1,143 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
file: { unit: "បៃ", verb: "គួរមាន" },
array: { unit: "ធាតុ", verb: "គួរមាន" },
set: { unit: "ធាតុ", verb: "គួរមាន" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
}
case "object": {
if (Array.isArray(data)) {
return "អារេ (Array)";
}
if (data === null) {
return "គ្មានតម្លៃ (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ទិន្នន័យបញ្ចូល",
email: "អាសយដ្ឋានអ៊ីមែល",
url: "URL",
emoji: "សញ្ញាអារម្មណ៍",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
date: "កាលបរិច្ឆេទ ISO",
time: "ម៉ោង ISO",
duration: "រយៈពេល ISO",
ipv4: "អាសយដ្ឋាន IPv4",
ipv6: "អាសយដ្ឋាន IPv6",
cidrv4: "ដែនអាសយដ្ឋាន IPv4",
cidrv6: "ដែនអាសយដ្ឋាន IPv6",
base64: "ខ្សែអក្សរអ៊ិកូដ base64",
base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
json_string: "ខ្សែអក្សរ JSON",
e164: "លេខ E.164",
jwt: "JWT",
template_literal: "ទិន្នន័យបញ្ចូល",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
if (_issue.format === "includes")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
if (_issue.format === "regex")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
case "unrecognized_keys":
return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
case "invalid_union":
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
case "invalid_element":
return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
default:
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,22 @@
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeHTML(data: string): string;
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export declare function encodeNonAsciiHTML(data: string): string;
//# sourceMappingURL=encode.d.ts.map

View File

@@ -0,0 +1,102 @@
export declare function _resetHasWarned(): void;
type BrowserVersion = {
browser: string;
version: string;
release_date?: string;
engine?: string;
engine_version?: string;
};
interface AllBrowsersBrowserVersion extends BrowserVersion {
year: number | string;
supports?: string;
wa_compatible?: boolean;
}
type NestedBrowserVersions = {
[browser: string]: {
[version: string]: AllBrowsersBrowserVersion;
};
};
type Options = {
/**
* Whether to include only the minimum compatible browser versions or all compatible versions.
* Defaults to `false`.
*/
listAllCompatibleVersions?: boolean;
/**
* Whether to include browsers that use the same engines as a core Baseline browser.
* Defaults to `false`.
*/
includeDownstreamBrowsers?: boolean;
/**
* Pass a date in the format 'YYYY-MM-DD' to get versions compatible with Widely available on the specified date.
* If left undefined and a `targetYear` is not passed, defaults to Widely available as of the current date.
* > NOTE: cannot be used with `targetYear`.
*/
widelyAvailableOnDate?: string | number;
/**
* Pass a year between 2015 and the current year to get browser versions compatible with all
* Newly Available features as of the end of the year specified.
* > NOTE: cannot be used with `widelyAvailableOnDate`.
*/
targetYear?: number;
/**
* Pass a boolean that determines whether KaiOS is included in browser mappings. KaiOS implements
* the Gecko engine used in Firefox. However, KaiOS also has a different interaction paradigm to
* other browsers and requires extra consideration beyond simple feature compatibility to provide
* an optimal user experience. Defaults to `false`.
*/
includeKaiOS?: boolean;
overrideLastUpdated?: number;
/**
* Pass a boolean to suppress the warning about stale data.
* Defaults to `false`.
*/
suppressWarnings?: boolean;
};
/**
* Returns browser versions compatible with specified Baseline targets.
* Defaults to returning the minimum versions of the core browser set that support Baseline Widely available.
* Takes an optional configuration `Object` with four optional properties:
* - `listAllCompatibleVersions`: `false` (default) or `false`
* - `includeDownstreamBrowsers`: `false` (default) or `false`
* - `widelyAvailableOnDate`: date in format `YYYY-MM-DD`
* - `targetYear`: year in format `YYYY`
*/
export declare function getCompatibleVersions(userOptions?: Options): BrowserVersion[];
type AllVersionsOptions = {
/**
* Whether to return the output as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
* Defaults to `"array"`.
*/
outputFormat?: string;
/**
* Whether to include browsers that use the same engines as a core Baseline browser.
* Defaults to `false`.
*/
includeDownstreamBrowsers?: boolean;
/**
* Whether to use the new "supports" property in place of "wa_compatible"
* Defaults to `false`
*/
useSupports?: boolean;
/**
* Whether to include KaiOS in the output. KaiOS implements the Gecko engine used in Firefox.
* However, KaiOS also has a different interaction paradigm to other browsers and requires extra
* consideration beyond simple feature compatibility to provide an optimal user experience.
*/
includeKaiOS?: boolean;
/**
* Pass a boolean to suppress the warning about old data.
* Defaults to `false`.
*/
suppressWarnings?: boolean;
};
/**
* Returns all browser versions known to this module with their level of Baseline support as a JavaScript `Array` (`"array"`), `Object` (`"object"`) or a CSV string (`"csv"`).
* Takes an optional configuration `Object` with three optional properties:
* - `includeDownstreamBrowsers`: `true` (default) or `false`
* - `outputFormat`: `"array"` (default), `"object"` or `"csv"`
* - `useSupports`: `false` (default) or `true`, replaces `wa_compatible` property with optional `supports` property which returns `widely` or `newly` available when present.
*/
export declare function getAllVersions(userOptions?: AllVersionsOptions): AllBrowsersBrowserVersion[] | NestedBrowserVersions | string;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/BrowseByFolder/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAEpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAI5D,eAAO,MAAM,8BAA8B,SACnC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KACxC,OAAO,CAAC,QAAQ,CAclB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"globalThis.js","sourceRoot":"","sources":["../../../../src/platform/browser/globalThis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,6EAA6E;AAE7E;;;;;;GAMG;AAEH,gEAAgE;AAChE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,WAAW,GACtB,OAAO,UAAU,KAAK,QAAQ;IAC5B,CAAC,CAAC,UAAU;IACZ,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ;QAC1B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;YAC5B,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;gBAC5B,CAAC,CAAC,MAAM;gBACR,CAAC,CAAE,EAAwB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Updates to this file should also be replicated to @opentelemetry/core too.\n\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - <object> (When all else fails)\n */\n\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport const _globalThis: typeof globalThis =\n typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : ({} as typeof globalThis);\n"]}

View File

@@ -0,0 +1,3 @@
import { FeedbackModalIntegration } from '@sentry/core';
export declare const feedbackModalIntegration: () => FeedbackModalIntegration;
//# sourceMappingURL=integration.d.ts.map

View File

@@ -0,0 +1,154 @@
'use strict';
// streams through a message body and calculates relaxed body hash
const Transform = require('stream').Transform;
const crypto = require('crypto');
class RelaxedBody extends Transform {
constructor(options) {
super();
options = options || {};
this.chunkBuffer = [];
this.chunkBufferLen = 0;
this.bodyHash = crypto.createHash(options.hashAlgo || 'sha1');
this.remainder = '';
this.byteLength = 0;
this.debug = options.debug;
this._debugBody = options.debug ? [] : false;
}
updateHash(chunk) {
let bodyStr;
// find next remainder
let nextRemainder = '';
// This crux finds and removes the spaces from the last line and the newline characters after the last non-empty line
// If we get another chunk that does not match this description then we can restore the previously processed data
let state = 'file';
for (let i = chunk.length - 1; i >= 0; i--) {
let c = chunk[i];
if (state === 'file' && (c === 0x0a || c === 0x0d)) {
// do nothing, found \n or \r at the end of chunk, stil end of file
} else if (state === 'file' && (c === 0x09 || c === 0x20)) {
// switch to line ending mode, this is the last non-empty line
state = 'line';
} else if (state === 'line' && (c === 0x09 || c === 0x20)) {
// do nothing, found ' ' or \t at the end of line, keep processing the last non-empty line
} else if (state === 'file' || state === 'line') {
// non line/file ending character found, switch to body mode
state = 'body';
if (i === chunk.length - 1) {
// final char is not part of line end or file end, so do nothing
break;
}
}
if (i === 0) {
// reached to the beginning of the chunk, check if it is still about the ending
// and if the remainder also matches
if (
(state === 'file' && (!this.remainder || /[\r\n]$/.test(this.remainder))) ||
(state === 'line' && (!this.remainder || /[ \t]$/.test(this.remainder)))
) {
// keep everything
this.remainder += chunk.toString('binary');
return;
} else if (state === 'line' || state === 'file') {
// process existing remainder as normal line but store the current chunk
nextRemainder = chunk.toString('binary');
chunk = false;
break;
}
}
if (state !== 'body') {
continue;
}
// reached first non ending byte
nextRemainder = chunk.slice(i + 1).toString('binary');
chunk = chunk.slice(0, i + 1);
break;
}
let needsFixing = !!this.remainder;
if (chunk && !needsFixing) {
// check if we even need to change anything
for (let i = 0, len = chunk.length; i < len; i++) {
if (i && chunk[i] === 0x0a && chunk[i - 1] !== 0x0d) {
// missing \r before \n
needsFixing = true;
break;
} else if (i && chunk[i] === 0x0d && chunk[i - 1] === 0x20) {
// trailing WSP found
needsFixing = true;
break;
} else if (i && chunk[i] === 0x20 && chunk[i - 1] === 0x20) {
// multiple spaces found, needs to be replaced with just one
needsFixing = true;
break;
} else if (chunk[i] === 0x09) {
// TAB found, needs to be replaced with a space
needsFixing = true;
break;
}
}
}
if (needsFixing) {
bodyStr = this.remainder + (chunk ? chunk.toString('binary') : '');
this.remainder = nextRemainder;
bodyStr = bodyStr
.replace(/\r?\n/g, '\n') // use js line endings
.replace(/[ \t]*$/gm, '') // remove line endings, rtrim
.replace(/[ \t]+/gm, ' ') // single spaces
.replace(/\n/g, '\r\n'); // restore rfc822 line endings
chunk = Buffer.from(bodyStr, 'binary');
} else if (nextRemainder) {
this.remainder = nextRemainder;
}
if (this.debug) {
this._debugBody.push(chunk);
}
this.bodyHash.update(chunk);
}
_transform(chunk, encoding, callback) {
if (!chunk || !chunk.length) {
return callback();
}
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding);
}
this.updateHash(chunk);
this.byteLength += chunk.length;
this.push(chunk);
callback();
}
_flush(callback) {
// generate final hash and emit it
if (/[\r\n]$/.test(this.remainder) && this.byteLength > 2) {
// add terminating line end
this.bodyHash.update(Buffer.from('\r\n'));
}
if (!this.byteLength) {
// emit empty line buffer to keep the stream flowing
this.push(Buffer.from('\r\n'));
// this.bodyHash.update(Buffer.from('\r\n'));
}
this.emit('hash', this.bodyHash.digest('base64'), this.debug ? Buffer.concat(this._debugBody) : false);
callback();
}
}
module.exports = RelaxedBody;

View File

@@ -0,0 +1,2 @@
import type { Locale } from '../core.js';
export default function useLocale(): Locale;

View File

@@ -0,0 +1,43 @@
import { DirectusFolder } from "./folder.cjs";
import { MergeCoreCollection } from "../types/schema.cjs";
//#region src/schema/settings.d.ts
type DirectusSettings<Schema = any> = MergeCoreCollection<Schema, 'directus_settings', {
id: 1;
project_name: string;
project_url: string;
report_error_url: string | null;
report_bug_url: string | null;
report_feature_url: string | null;
project_color: string | null;
project_logo: string | null;
public_foreground: string | null;
public_background: {
id: string;
type: string;
} | null;
public_note: string | null;
auth_login_attempts: number;
auth_password_policy: string | null;
storage_asset_transform: 'all' | 'none' | 'presets';
storage_asset_presets: {
fit: string;
height: number;
width: number;
quality: number;
key: string;
withoutEnlargement: boolean;
}[] | null;
custom_css: string | null;
storage_default_folder: DirectusFolder<Schema> | string | null;
basemaps: Record<string, any> | null;
mapbox_key: string | null;
module_bar: 'json' | null;
project_descriptor: string | null;
default_language: string;
custom_aspect_ratios: Record<string, any> | null;
project_id: string | null;
}>;
//#endregion
export { DirectusSettings };
//# sourceMappingURL=settings.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"collections.js","names":[],"sources":["../../../../src/rest/commands/delete/collections.ts"],"sourcesContent":["import type { DirectusCollection } from '../../../schema/collection.js';\nimport type { RestCommand } from '../../types.js';\n\n/**\n * Delete a collection.\n * @param collection\n * @returns\n */\nexport const deleteCollection =\n\t<Schema>(collection: DirectusCollection<Schema>['collection']): RestCommand<void, Schema> =>\n\t() => ({\n\t\tpath: `/collections/${collection}`,\n\t\tmethod: 'DELETE',\n\t});\n"],"mappings":"AAQA,MAAa,EACH,QACF,CACN,KAAM,gBAAgB,IACtB,OAAQ,SACR"}

View File

@@ -0,0 +1,95 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const instrument = require('./instrument.js');
const utils = require('./utils.js');
/**
* Starts tracking the Cumulative Layout Shift on the current page and collects the value once
*
* - the page visibility is hidden
* - a navigation span is started (to stop CLS measurement for SPA soft navigations)
*
* Once either of these events triggers, the CLS value is sent as a standalone span and we stop
* measuring CLS.
*/
function trackClsAsStandaloneSpan(client) {
let standaloneCLsValue = 0;
let standaloneClsEntry;
if (!utils.supportsWebVital('layout-shift')) {
return;
}
const cleanupClsHandler = instrument.addClsInstrumentationHandler(({ metric }) => {
const entry = metric.entries[metric.entries.length - 1] ;
if (!entry) {
return;
}
standaloneCLsValue = metric.value;
standaloneClsEntry = entry;
}, true);
utils.listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {
_sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId, reportEvent);
cleanupClsHandler();
});
}
/**
* Exported only for testing!
*/
function _sendStandaloneClsSpan(
clsValue,
entry,
pageloadSpanId,
reportEvent,
) {
debugBuild.DEBUG_BUILD && core.debug.log(`Sending CLS span (${clsValue})`);
const startTime = entry ? utils.msToSec((core.browserPerformanceTimeOrigin() || 0) + entry.startTime) : core.timestampInSeconds();
const routeName = core.getCurrentScope().getScopeData().transactionName;
const name = entry ? core.htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';
const attributes = {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',
[core.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,
// attach the pageload span id to the CLS span so that we can link them in the UI
'sentry.pageload.span_id': pageloadSpanId,
// describes what triggered the web vital to be reported
'sentry.report_event': reportEvent,
};
// Add CLS sources as span attributes to help with debugging layout shifts
// See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift/sources
if (entry?.sources) {
entry.sources.forEach((source, index) => {
attributes[`cls.source.${index + 1}`] = core.htmlTreeAsString(source.node);
});
}
const span = utils.startStandaloneWebVitalSpan({
name,
transaction: routeName,
attributes,
startTime,
});
if (span) {
span.addEvent('cls', {
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,
});
// LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here
// see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration
span.end(startTime);
}
}
exports._sendStandaloneClsSpan = _sendStandaloneClsSpan;
exports.trackClsAsStandaloneSpan = trackClsAsStandaloneSpan;
//# sourceMappingURL=cls.js.map

View File

@@ -0,0 +1,27 @@
import React from "react";
interface CalendarIconProps {
icon?: string | React.ReactNode;
className?: string;
onClick?: (event: React.MouseEvent) => void;
}
/**
* `CalendarIcon` is a React component that renders an icon for a calendar.
* The icon can be a string representing a CSS class, a React node, or a default SVG icon.
*
* @component
* @prop icon - The icon to be displayed. This can be a string representing a CSS class or a React node.
* @prop className - An optional string representing additional CSS classes to be applied to the icon.
* @prop onClick - An optional function to be called when the icon is clicked.
*
* @example
* // To use a CSS class as the icon
* <CalendarIcon icon="my-icon-class" onClick={myClickHandler} />
*
* @example
* // To use a React node as the icon
* <CalendarIcon icon={<MyIconComponent />} onClick={myClickHandler} />
*
* @returns The `CalendarIcon` component.
*/
declare const CalendarIcon: React.FC<CalendarIconProps>;
export default CalendarIcon;

View File

@@ -0,0 +1,131 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["f.K.", "n.K."],
abbreviated: ["f.Kr.", "n.Kr."],
wide: ["foar Kristus", "nei Kristus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1e fearnsjier", "2e fearnsjier", "3e fearnsjier", "4e fearnsjier"],
};
const monthValues = {
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"jan.",
"feb.",
"mrt.",
"apr.",
"mai.",
"jun.",
"jul.",
"aug.",
"sep.",
"okt.",
"nov.",
"des.",
],
wide: [
"jannewaris",
"febrewaris",
"maart",
"april",
"maaie",
"juny",
"july",
"augustus",
"septimber",
"oktober",
"novimber",
"desimber",
],
};
const dayValues = {
narrow: ["s", "m", "t", "w", "t", "f", "s"],
short: ["si", "mo", "ti", "wo", "to", "fr", "so"],
abbreviated: ["snein", "moa", "tii", "woa", "ton", "fre", "sneon"],
wide: [
"snein",
"moandei",
"tiisdei",
"woansdei",
"tongersdei",
"freed",
"sneon",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "jûns",
night: "nachts",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "jûns",
night: "nachts",
},
wide: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "jûns",
night: "nachts",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "e";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
}),
});

View File

@@ -0,0 +1,19 @@
# @babel/helpers
> Collection of helper functions used by Babel transforms.
See our website [@babel/helpers](https://babeljs.io/docs/babel-helpers) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/helpers
```
or using yarn:
```sh
yarn add @babel/helpers --dev
```

View File

@@ -0,0 +1,169 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var hashtag = require('@lexical/hashtag');
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var useLexicalTextEntity = require('@lexical/react/useLexicalTextEntity');
var react = require('react');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function getHashtagRegexStringChars() {
// Latin accented characters
// Excludes 0xd7 from the range
// (the multiplication sign, confusable with "x").
// Also excludes 0xf7, the division sign
const latinAccents = '\xc0-\xd6' + '\xd8-\xf6' + '\xf8-\xff' + '\u0100-\u024f' + '\u0253-\u0254' + '\u0256-\u0257' + '\u0259' + '\u025b' + '\u0263' + '\u0268' + '\u026f' + '\u0272' + '\u0289' + '\u028b' + '\u02bb' + '\u0300-\u036f' + '\u1e00-\u1eff';
// Cyrillic (Russian, Ukrainian, etc.)
const nonLatinChars = '\u0400-\u04ff' +
// Cyrillic
'\u0500-\u0527' +
// Cyrillic Supplement
'\u2de0-\u2dff' +
// Cyrillic Extended A
'\ua640-\ua69f' +
// Cyrillic Extended B
'\u0591-\u05bf' +
// Hebrew
'\u05c1-\u05c2' + '\u05c4-\u05c5' + '\u05c7' + '\u05d0-\u05ea' + '\u05f0-\u05f4' + '\ufb12-\ufb28' +
// Hebrew Presentation Forms
'\ufb2a-\ufb36' + '\ufb38-\ufb3c' + '\ufb3e' + '\ufb40-\ufb41' + '\ufb43-\ufb44' + '\ufb46-\ufb4f' + '\u0610-\u061a' +
// Arabic
'\u0620-\u065f' + '\u066e-\u06d3' + '\u06d5-\u06dc' + '\u06de-\u06e8' + '\u06ea-\u06ef' + '\u06fa-\u06fc' + '\u06ff' + '\u0750-\u077f' +
// Arabic Supplement
'\u08a0' +
// Arabic Extended A
'\u08a2-\u08ac' + '\u08e4-\u08fe' + '\ufb50-\ufbb1' +
// Arabic Pres. Forms A
'\ufbd3-\ufd3d' + '\ufd50-\ufd8f' + '\ufd92-\ufdc7' + '\ufdf0-\ufdfb' + '\ufe70-\ufe74' +
// Arabic Pres. Forms B
'\ufe76-\ufefc' + '\u200c-\u200c' +
// Zero-Width Non-Joiner
'\u0e01-\u0e3a' +
// Thai
'\u0e40-\u0e4e' +
// Hangul (Korean)
'\u1100-\u11ff' +
// Hangul Jamo
'\u3130-\u3185' +
// Hangul Compatibility Jamo
'\uA960-\uA97F' +
// Hangul Jamo Extended-A
'\uAC00-\uD7AF' +
// Hangul Syllables
'\uD7B0-\uD7FF' +
// Hangul Jamo Extended-B
'\uFFA1-\uFFDC'; // Half-width Hangul
const charCode = String.fromCharCode;
const cjkChars = '\u30A1-\u30FA\u30FC-\u30FE' +
// Katakana (full-width)
'\uFF66-\uFF9F' +
// Katakana (half-width)
'\uFF10-\uFF19\uFF21-\uFF3A' + '\uFF41-\uFF5A' +
// Latin (full-width)
'\u3041-\u3096\u3099-\u309E' +
// Hiragana
'\u3400-\u4DBF' +
// Kanji (CJK Extension A)
'\u4E00-\u9FFF' +
// Kanji (Unified)
// Disabled as it breaks the Regex.
// charCode(0x20000) + '-' + charCode(0x2A6DF) + // Kanji (CJK Extension B)
charCode(0x2a700) + '-' + charCode(0x2b73f) +
// Kanji (CJK Extension C)
charCode(0x2b740) + '-' + charCode(0x2b81f) +
// Kanji (CJK Extension D)
charCode(0x2f800) + '-' + charCode(0x2fa1f) + '\u3003\u3005\u303B'; // Kanji (CJK supplement)
const otherChars = latinAccents + nonLatinChars + cjkChars;
// equivalent of \p{L}
const unicodeLetters = '\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6' + '\u00F8-\u0241\u0250-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EE\u037A\u0386' + '\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03F5\u03F7-\u0481' + '\u048A-\u04CE\u04D0-\u04F9\u0500-\u050F\u0531-\u0556\u0559\u0561-\u0587' + '\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0640-\u064A\u066E-\u066F' + '\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710' + '\u0712-\u072F\u074D-\u076D\u0780-\u07A5\u07B1\u0904-\u0939\u093D\u0950' + '\u0958-\u0961\u097D\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0' + '\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1' + '\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33' + '\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D' + '\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD' + '\u0AD0\u0AE0-\u0AE1\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30' + '\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83' + '\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F' + '\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10' + '\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C' + '\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE' + '\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39' + '\u0D60-\u0D61\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6' + '\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88' + '\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7' + '\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6' + '\u0EDC-\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6A\u0F88-\u0F8B\u1000-\u1021' + '\u1023-\u1027\u1029-\u102A\u1050-\u1055\u10A0-\u10C5\u10D0-\u10FA\u10FC' + '\u1100-\u1159\u115F-\u11A2\u11A8-\u11F9\u1200-\u1248\u124A-\u124D' + '\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0' + '\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310' + '\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C' + '\u166F-\u1676\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711' + '\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7' + '\u17DC\u1820-\u1877\u1880-\u18A8\u1900-\u191C\u1950-\u196D\u1970-\u1974' + '\u1980-\u19A9\u19C1-\u19C7\u1A00-\u1A16\u1D00-\u1DBF\u1E00-\u1E9B' + '\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D' + '\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC' + '\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC' + '\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u2094\u2102\u2107' + '\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D' + '\u212F-\u2131\u2133-\u2139\u213C-\u213F\u2145-\u2149\u2C00-\u2C2E' + '\u2C30-\u2C5E\u2C80-\u2CE4\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96' + '\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6' + '\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3006\u3031-\u3035' + '\u303B-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF' + '\u3105-\u312C\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400-\u4DB5' + '\u4E00-\u9FBB\uA000-\uA48C\uA800-\uA801\uA803-\uA805\uA807-\uA80A' + '\uA80C-\uA822\uAC00-\uD7A3\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9' + '\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C' + '\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F' + '\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A' + '\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7' + '\uFFDA-\uFFDC';
// equivalent of \p{Mn}\p{Mc}
const unicodeAccents = '\u0300-\u036F\u0483-\u0486\u0591-\u05B9\u05BB-\u05BD\u05BF' + '\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u0615\u064B-\u065E\u0670' + '\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A' + '\u07A6-\u07B0\u0901-\u0903\u093C\u093E-\u094D\u0951-\u0954\u0962-\u0963' + '\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7' + '\u09E2-\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D' + '\u0A70-\u0A71\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD' + '\u0AE2-\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B43\u0B47-\u0B48\u0B4B-\u0B4D' + '\u0B56-\u0B57\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7' + '\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56' + '\u0C82-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6' + '\u0D02-\u0D03\u0D3E-\u0D43\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D82-\u0D83' + '\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A' + '\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19' + '\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F90-\u0F97' + '\u0F99-\u0FBC\u0FC6\u102C-\u1032\u1036-\u1039\u1056-\u1059\u135F' + '\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B6-\u17D3\u17DD' + '\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8-\u19C9' + '\u1A17-\u1A1B\u1DC0-\u1DC3\u20D0-\u20DC\u20E1\u20E5-\u20EB\u302A-\u302F' + '\u3099-\u309A\uA802\uA806\uA80B\uA823-\uA827\uFB1E\uFE00-\uFE0F' + '\uFE20-\uFE23';
// equivalent of \p{Dn}
const unicodeDigits = '\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u0966-\u096F\u09E6-\u09EF' + '\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F' + '\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29' + '\u1040-\u1049\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9' + '\uFF10-\uFF19';
// An alpha char is a unicode chars excluding unicode combining marks
// but including other chars, a hashtag must start with one of these,
// it does not make sense to have a combining mark before a base character.
const alpha = unicodeLetters + otherChars;
// A numeric character is any with the number digit property, or
// underscore. These characters can be included in hashtags, but a hashtag
// cannot have only these characters.
const numeric = unicodeDigits + '_';
// Alphanumeric char is any alpha char or a unicode char with decimal
// number property \p{Nd}
const alphanumeric = alpha + unicodeAccents + numeric;
const hashChars = '#\\uFF03'; // normal '#' or full-width '#'
return {
alpha,
alphanumeric,
hashChars
};
}
function getHashtagRegexString() {
const {
alpha,
alphanumeric,
hashChars
} = getHashtagRegexStringChars();
const hashtagAlpha = '[' + alpha + ']';
const hashtagAlphanumeric = '[' + alphanumeric + ']';
const hashtagBoundary = '^|$|[^&/' + alphanumeric + ']';
const hashCharList = '[' + hashChars + ']';
// A hashtag contains characters, numbers and underscores,
// but not all numbers.
const hashtag = '(' + hashtagBoundary + ')(' + hashCharList + ')(' + hashtagAlphanumeric + '*' + hashtagAlpha + hashtagAlphanumeric + '*)';
return hashtag;
}
const REGEX = new RegExp(getHashtagRegexString(), 'i');
function HashtagPlugin() {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
react.useEffect(() => {
if (!editor.hasNodes([hashtag.HashtagNode])) {
throw new Error('HashtagPlugin: HashtagNode not registered on editor');
}
}, [editor]);
const $createHashtagNode_ = react.useCallback(textNode => {
return hashtag.$createHashtagNode(textNode.getTextContent());
}, []);
const getHashtagMatch = react.useCallback(text => {
const matchArr = REGEX.exec(text);
if (matchArr === null) {
return null;
}
const hashtagLength = matchArr[3].length + 1;
const startOffset = matchArr.index + matchArr[1].length;
const endOffset = startOffset + hashtagLength;
return {
end: endOffset,
start: startOffset
};
}, []);
useLexicalTextEntity.useLexicalTextEntity(getHashtagMatch, hashtag.HashtagNode, $createHashtagNode_);
return null;
}
exports.HashtagPlugin = HashtagPlugin;

View File

@@ -0,0 +1,36 @@
/**
* An exported enum describing the different kinds of tokens that the
* lexer emits.
*/
declare enum TokenKind {
SOF = '<SOF>',
EOF = '<EOF>',
BANG = '!',
DOLLAR = '$',
AMP = '&',
PAREN_L = '(',
PAREN_R = ')',
DOT = '.',
SPREAD = '...',
COLON = ':',
EQUALS = '=',
AT = '@',
BRACKET_L = '[',
BRACKET_R = ']',
BRACE_L = '{',
PIPE = '|',
BRACE_R = '}',
NAME = 'Name',
INT = 'Int',
FLOAT = 'Float',
STRING = 'String',
BLOCK_STRING = 'BlockString',
COMMENT = 'Comment',
}
export { TokenKind };
/**
* The enum type representing the token kinds values.
*
* @deprecated Please use `TokenKind`. Will be remove in v17.
*/
export declare type TokenKindEnum = typeof TokenKind;

View File

@@ -0,0 +1,118 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "llai na eiliad",
other: "llai na {{count}} eiliad",
},
xSeconds: {
one: "1 eiliad",
other: "{{count}} eiliad",
},
halfAMinute: "hanner munud",
lessThanXMinutes: {
one: "llai na munud",
two: "llai na 2 funud",
other: "llai na {{count}} munud",
},
xMinutes: {
one: "1 munud",
two: "2 funud",
other: "{{count}} munud",
},
aboutXHours: {
one: "tua 1 awr",
other: "tua {{count}} awr",
},
xHours: {
one: "1 awr",
other: "{{count}} awr",
},
xDays: {
one: "1 diwrnod",
two: "2 ddiwrnod",
other: "{{count}} diwrnod",
},
aboutXWeeks: {
one: "tua 1 wythnos",
two: "tua pythefnos",
other: "tua {{count}} wythnos",
},
xWeeks: {
one: "1 wythnos",
two: "pythefnos",
other: "{{count}} wythnos",
},
aboutXMonths: {
one: "tua 1 mis",
two: "tua 2 fis",
other: "tua {{count}} mis",
},
xMonths: {
one: "1 mis",
two: "2 fis",
other: "{{count}} mis",
},
aboutXYears: {
one: "tua 1 flwyddyn",
two: "tua 2 flynedd",
other: "tua {{count}} mlynedd",
},
xYears: {
one: "1 flwyddyn",
two: "2 flynedd",
other: "{{count}} mlynedd",
},
overXYears: {
one: "dros 1 flwyddyn",
two: "dros 2 flynedd",
other: "dros {{count}} mlynedd",
},
almostXYears: {
one: "bron 1 flwyddyn",
two: "bron 2 flynedd",
other: "bron {{count}} mlynedd",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2 && !!tokenValue.two) {
result = tokenValue.two;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "mewn " + result;
} else {
return result + " yn ôl";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,13 @@
import { TracerProvider, MeterProvider } from '@opentelemetry/api';
import { Instrumentation } from './types';
import { LoggerProvider } from '@opentelemetry/api-logs';
export interface AutoLoaderResult {
instrumentations: Instrumentation[];
}
export interface AutoLoaderOptions {
instrumentations?: (Instrumentation | Instrumentation[])[];
tracerProvider?: TracerProvider;
meterProvider?: MeterProvider;
loggerProvider?: LoggerProvider;
}
//# sourceMappingURL=types_internal.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/utilities/languages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAsB,MAAM,aAAa,CAAA;AAExE,eAAO,MAAM,YAAY,6BAA8B,CAAA;AAEvD,eAAO,MAAM,iBAAiB,oTAmIpB,CAAA;AAkBV,wBAAgB,qBAAqB,CAAC,oBAAoB,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAYjG"}

View File

@@ -0,0 +1,2 @@
import { findLastIndexFrom } from "../fp";
export = findLastIndexFrom;

View File

@@ -0,0 +1,271 @@
import type { ClientField, Data, FormField, FormState, Row, TypedUser, ValidationFieldError } from 'payload';
import type React from 'react';
import type { Dispatch } from 'react';
import type { AcceptValues } from './mergeServerFormState.js';
export type Preferences = {
[key: string]: unknown;
};
export type FormOnSuccess<T = unknown, C = Record<string, unknown>> = (json: T, ctx?: {
/**
* Arbitrary context passed to the onSuccess callback.
*/
context?: C;
/**
* The form state that was sent with the request when retrieving the `json` arg.
*/
formState?: FormState;
}) => Promise<FormState | void> | void;
export type FormProps = {
beforeSubmit?: ((args: {
formState: FormState;
}) => Promise<FormState>)[];
children?: React.ReactNode;
className?: string;
disabled?: boolean;
disableSuccessStatus?: boolean;
/**
* If you would like to solely leverage server-side validation on submit,
* you can disable checks that the form makes before it submits
*/
disableValidationOnSubmit?: boolean;
/**
* If you don't want the form to be a <form> element, you can pass a string here to use as the wrapper element.
*/
el?: string;
/**
* By default, the form will get the field schema (not data) from the current document. If you pass this in, you can override that behavior.
* This is very useful for sub-forms, where the form's field schema is not necessarily the field schema of the current document (e.g. for the Blocks
* feature of the Lexical Rich Text field)
*/
fields?: ClientField[];
handleResponse?: (res: Response, successToast: (value: string) => void, errorToast: (value: string) => void) => void;
initialState?: FormState;
/**
* Determines if this Form is the main, top-level Form of a document. If set to true, the
* Form's children will be wrapped in a DocumentFormContext, which lets you access this document
* Form's data and fields from any child component - even if that child component is wrapped in a child
* Form (e.g. a lexical block).
*/
isDocumentForm?: boolean;
isInitializing?: boolean;
log?: boolean;
onChange?: ((args: {
formState: FormState;
submitted?: boolean;
}) => Promise<FormState>)[];
onSubmit?: (fields: FormState, data: Data) => void;
onSuccess?: FormOnSuccess;
redirect?: string;
submitted?: boolean;
uuid?: string;
validationOperation?: 'create' | 'update';
waitForAutocomplete?: boolean;
} & ({
action: (formData: FormData) => Promise<void>;
} | {
action?: string;
method?: 'DELETE' | 'GET' | 'PATCH' | 'POST';
});
export type SubmitOptions<C = Record<string, unknown>> = {
acceptValues?: AcceptValues;
action?: string;
/**
* If you want to pass additional data to the onSuccess callback, you can use this context object.
*
* @experimental This property is experimental and may change in the future.
*/
context?: C;
/**
* When true, will disable the form while it is processing.
* @default true
*/
disableFormWhileProcessing?: boolean;
/**
* When true, will disable the success toast after form submission.
* @default false
*/
disableSuccessStatus?: boolean;
method?: string;
overrides?: ((formState: any) => FormData) | Record<string, unknown>;
/**
* When true, will skip validation before submitting the form.
* @default false
*/
skipValidation?: boolean;
};
export type DispatchFields = React.Dispatch<any>;
export type Submit = <T extends Response, C extends Record<string, unknown>>(options?: SubmitOptions<C>, e?: React.FormEvent<HTMLFormElement>) => Promise</**
* Returns the form state and the response from the server.
*
* @experimental - Note: the `{ res: ... }` return type is experimental and may change in the future. Use at your own risk.
*/ /**
* Returns the form state and the response from the server.
*
* @experimental - Note: the `{ res: ... }` return type is experimental and may change in the future. Use at your own risk.
*/ {
formState?: FormState;
res: T;
} | void>;
export type ValidateForm = () => Promise<boolean>;
export type CreateFormData = (overrides?: Record<string, unknown>,
/**
* If mergeOverrideData true, the data will be merged with the existing data in the form state.
* @default true
*/
options?: {
/**
* If provided, will use this instead of of derived data from the current form state.
*/
data?: Data;
mergeOverrideData?: boolean;
}) => FormData | Promise<FormData>;
export type GetFields = () => FormState;
export type GetField = (path: string) => FormField;
export type GetData = () => Data;
export type GetSiblingData = (path: string) => Data;
export type GetDataByPath = <T = unknown>(path: string) => T;
export type SetModified = (modified: boolean) => void;
export type SetSubmitted = (submitted: boolean) => void;
export type SetProcessing = (processing: boolean) => void;
export type Reset = (data: unknown) => Promise<void>;
export type REPLACE_STATE = {
optimize?: boolean;
/**
* If `sanitize` is true, default values will be set for form field properties that are not present in the incoming state.
* For example, `valid` will be set to true if it is not present in the incoming state.
*/
sanitize?: boolean;
state: FormState;
type: 'REPLACE_STATE';
};
export type REMOVE = {
path: string;
type: 'REMOVE';
};
export type MODIFY_CONDITION = {
path: string;
result: boolean;
type: 'MODIFY_CONDITION';
user: TypedUser;
};
export type UPDATE = {
path: string;
type: 'UPDATE';
} & Partial<FormField>;
export type UPDATE_MANY = {
formState: FormState;
type: 'UPDATE_MANY';
};
export type REMOVE_ROW = {
path: string;
rowIndex: number;
type: 'REMOVE_ROW';
};
export type ADD_ROW = {
blockType?: string;
path: string;
rowIndex?: number;
subFieldState?: FormState;
type: 'ADD_ROW';
};
export type MERGE_SERVER_STATE = {
acceptValues?: AcceptValues;
prevStateRef: React.RefObject<FormState>;
serverState: FormState;
type: 'MERGE_SERVER_STATE';
};
export type REPLACE_ROW = {
blockType?: string;
path: string;
rowIndex: number;
subFieldState?: FormState;
type: 'REPLACE_ROW';
};
export type DUPLICATE_ROW = {
path: string;
rowIndex: number;
type: 'DUPLICATE_ROW';
};
export type MOVE_ROW = {
moveFromIndex: number;
moveToIndex: number;
path: string;
type: 'MOVE_ROW';
};
export type ADD_SERVER_ERRORS = {
errors: ValidationFieldError[];
type: 'ADD_SERVER_ERRORS';
};
export type SET_ROW_COLLAPSED = {
path: string;
type: 'SET_ROW_COLLAPSED';
updatedRows: Row[];
};
export type SET_ALL_ROWS_COLLAPSED = {
path: string;
type: 'SET_ALL_ROWS_COLLAPSED';
updatedRows: Row[];
};
export type FieldAction = ADD_ROW | ADD_SERVER_ERRORS | DUPLICATE_ROW | MERGE_SERVER_STATE | MODIFY_CONDITION | MOVE_ROW | REMOVE | REMOVE_ROW | REPLACE_ROW | REPLACE_STATE | SET_ALL_ROWS_COLLAPSED | SET_ROW_COLLAPSED | UPDATE | UPDATE_MANY;
export type FormFieldsContext = [FormState, Dispatch<FieldAction>];
export type Context = {
addFieldRow: ({ blockType, path, rowIndex, schemaPath, subFieldState, }: {
blockType?: string;
path: string;
rowIndex?: number;
schemaPath: string;
subFieldState?: FormState;
}) => void;
buildRowErrors: () => void;
createFormData: CreateFormData;
disabled: boolean;
dispatchFields: Dispatch<FieldAction>;
/**
* Form context fields may be outdated and should not be relied on. Instead, prefer `useFormFields`.
*/
fields: FormState;
formRef: React.RefObject<HTMLFormElement>;
getData: GetData;
getDataByPath: GetDataByPath;
getField: GetField;
getFields: GetFields;
getSiblingData: GetSiblingData;
initializing: boolean;
/**
* Tracks wether the form state passes validation.
* For example the state could be submitted but invalid as field errors have been returned.
*/
isValid: boolean;
moveFieldRow: ({ moveFromIndex, moveToIndex, path, }: {
moveFromIndex: number;
moveToIndex: number;
path: string;
}) => void;
removeFieldRow: ({ path, rowIndex }: {
path: string;
rowIndex: number;
}) => void;
replaceFieldRow: ({ blockType, path, rowIndex, schemaPath, subFieldState, }: {
blockType?: string;
path: string;
rowIndex: number;
schemaPath: string;
subFieldState?: FormState;
}) => void;
replaceState: (state: FormState) => void;
reset: Reset;
/**
* If the form has started processing in the background (e.g.
* if autosave is running), this will be true.
*/
setBackgroundProcessing: SetProcessing;
setDisabled: (disabled: boolean) => void;
setIsValid: (processing: boolean) => void;
setModified: SetModified;
setProcessing: SetProcessing;
setSubmitted: SetSubmitted;
submit: Submit;
uuid?: string;
validateForm: ValidateForm;
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Autosave/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAUzE,OAAO,KAAwD,MAAM,OAAO,CAAA;AAoB5E,OAAO,cAAc,CAAA;AAMrB,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,CAAC,EAAE,sBAAsB,CAAA;IACnC,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,qBAAqB,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6MpC,CAAA"}

View File

@@ -0,0 +1,73 @@
import { captureException } from '../../exports.js';
import { SPAN_STATUS_ERROR } from '../spanstatus.js';
import { GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, GEN_AI_INPUT_MESSAGES_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
import { extractSystemInstructions, getTruncatedJsonString } from '../ai/utils.js';
import { ANTHROPIC_AI_INSTRUMENTED_METHODS } from './constants.js';
/**
* Check if a method path should be instrumented
*/
function shouldInstrument(methodPath) {
return ANTHROPIC_AI_INSTRUMENTED_METHODS.includes(methodPath );
}
/**
* Set the messages and messages original length attributes.
* Extracts system instructions before truncation.
*/
function setMessagesAttribute(span, messages) {
if (Array.isArray(messages) && messages.length === 0) {
return;
}
const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);
if (systemInstructions) {
span.setAttributes({
[GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE]: systemInstructions,
});
}
const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 1;
span.setAttributes({
[GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: getTruncatedJsonString(filteredMessages),
[GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength,
});
}
/**
* Capture error information from the response
* @see https://docs.anthropic.com/en/api/errors#error-shapes
*/
function handleResponseError(span, response) {
if (response.error) {
span.setStatus({ code: SPAN_STATUS_ERROR, message: response.error.type || 'internal_error' });
captureException(response.error, {
mechanism: {
handled: false,
type: 'auto.ai.anthropic.anthropic_error',
},
});
}
}
/**
* Include the system prompt in the messages list, if available
*/
function messagesFromParams(params) {
const { system, messages, input } = params;
const systemMessages = typeof system === 'string' ? [{ role: 'system', content: params.system }] : [];
const inputParamMessages = Array.isArray(input) ? input : input != null ? [input] : undefined;
const messagesParamMessages = Array.isArray(messages) ? messages : messages != null ? [messages] : [];
const userMessages = inputParamMessages ?? messagesParamMessages;
return [...systemMessages, ...userMessages];
}
export { handleResponseError, messagesFromParams, setMessagesAttribute, shouldInstrument };
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Tickets = createLucideIcon("Tickets", [
["path", { d: "m4.5 8 10.58-5.06a1 1 0 0 1 1.342.488L18.5 8", key: "12lg5p" }],
["path", { d: "M6 10V8", key: "1y41hn" }],
["path", { d: "M6 14v1", key: "cao2tf" }],
["path", { d: "M6 19v2", key: "1loha6" }],
["rect", { x: "2", y: "8", width: "20", height: "13", rx: "2", key: "p3bz5l" }]
]);
export { Tickets as default };
//# sourceMappingURL=tickets.js.map

View File

@@ -0,0 +1,285 @@
'use strict'
const { test } = require('tap')
const { join } = require('path')
const { readFile } = require('fs')
const { file } = require('./helper')
const ThreadStream = require('..')
const { MessageChannel } = require('worker_threads')
const { once } = require('events')
test('base sync=true', function (t) {
t.plan(15)
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: true
})
t.same(stream.writableObjectMode, false)
t.same(stream.writableFinished, false)
stream.on('finish', () => {
t.same(stream.writableFinished, true)
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data, 'hello world\nsomething else\n')
})
})
t.same(stream.closed, false)
stream.on('close', () => {
t.same(stream.closed, true)
t.notOk(stream.writable)
t.pass('close emitted')
})
t.same(stream.writableNeedDrain, false)
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
t.ok(stream.writable)
t.same(stream.writableEnded, false)
stream.end()
t.same(stream.writableEnded, true)
})
test('overflow sync=true', function (t) {
t.plan(3)
const dest = file()
const stream = new ThreadStream({
bufferSize: 128,
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: true
})
let count = 0
// Write 10 chars, 20 times
function write () {
if (count++ === 20) {
stream.end()
return
}
stream.write('aaaaaaaaaa')
// do not wait for drain event
setImmediate(write)
}
write()
stream.on('finish', () => {
t.pass('finish emitted')
})
stream.on('close', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data.length, 200)
})
})
})
test('overflow sync=false', function (t) {
const dest = file()
const stream = new ThreadStream({
bufferSize: 128,
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: false
})
let count = 0
t.same(stream.writableNeedDrain, false)
// Write 10 chars, 20 times
function write () {
if (count++ === 20) {
t.pass('end sent')
stream.end()
return
}
if (!stream.write('aaaaaaaaaa')) {
t.same(stream.writableNeedDrain, true)
}
// do not wait for drain event
setImmediate(write)
}
write()
stream.on('drain', () => {
t.same(stream.writableNeedDrain, false)
t.pass('drain')
})
stream.on('finish', () => {
t.pass('finish emitted')
})
stream.on('close', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data.length, 200)
t.end()
})
})
})
test('over the bufferSize at startup', function (t) {
t.plan(6)
const dest = file()
const stream = new ThreadStream({
bufferSize: 10,
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: true
})
stream.on('finish', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data, 'hello world\nsomething else\n')
})
})
stream.on('close', () => {
t.pass('close emitted')
})
t.ok(stream.write('hello'))
t.ok(stream.write(' world\n'))
t.ok(stream.write('something else\n'))
stream.end()
})
test('over the bufferSize at startup (async)', function (t) {
t.plan(6)
const dest = file()
const stream = new ThreadStream({
bufferSize: 10,
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: false
})
t.ok(stream.write('hello'))
t.notOk(stream.write(' world\n'))
t.notOk(stream.write('something else\n'))
stream.end()
stream.on('finish', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data, 'hello world\nsomething else\n')
})
})
stream.on('close', () => {
t.pass('close emitted')
})
})
test('flushSync sync=false', function (t) {
const dest = file()
const stream = new ThreadStream({
bufferSize: 128,
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: false
})
stream.on('drain', () => {
t.pass('drain')
stream.end()
})
stream.on('finish', () => {
t.pass('finish emitted')
})
stream.on('close', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data.length, 200)
t.end()
})
})
for (let count = 0; count < 20; count++) {
stream.write('aaaaaaaaaa')
}
stream.flushSync()
})
test('pass down MessagePorts', async function (t) {
t.plan(3)
const { port1, port2 } = new MessageChannel()
const stream = new ThreadStream({
filename: join(__dirname, 'port.js'),
workerData: { port: port1 },
workerOpts: {
transferList: [port1]
},
sync: false
})
t.teardown(() => {
stream.end()
})
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
const [strings] = await once(port2, 'message')
t.equal(strings, 'hello world\nsomething else\n')
})
test('destroy does not error', function (t) {
t.plan(5)
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest },
sync: false
})
stream.on('ready', () => {
t.pass('ready emitted')
stream.worker.terminate()
})
stream.on('error', (err) => {
t.equal(err.message, 'the worker thread exited')
stream.flush((err) => {
t.equal(err.message, 'the worker has exited')
})
t.doesNotThrow(() => stream.flushSync())
t.doesNotThrow(() => stream.end())
})
})
test('syntax error', function (t) {
t.plan(1)
const stream = new ThreadStream({
filename: join(__dirname, 'syntax-error.mjs')
})
stream.on('error', (err) => {
t.equal(err.message, 'Unexpected end of input')
})
})

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