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 @@
{"version":3,"file":"flask-round.js","sources":["../../../src/icons/flask-round.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlaskRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMnY3LjMxIiAvPgogIDxwYXRoIGQ9Ik0xNCA5LjNWMS45OSIgLz4KICA8cGF0aCBkPSJNOC41IDJoNyIgLz4KICA8cGF0aCBkPSJNMTQgOS4zYTYuNSA2LjUgMCAxIDEtNCAwIiAvPgogIDxwYXRoIGQ9Ik01LjUyIDE2aDEyLjk2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/flask-round\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 FlaskRound = createLucideIcon('FlaskRound', [\n ['path', { d: 'M10 2v7.31', key: '5d1hyh' }],\n ['path', { d: 'M14 9.3V1.99', key: '14k4l0' }],\n ['path', { d: 'M8.5 2h7', key: 'csnxdl' }],\n ['path', { d: 'M14 9.3a6.5 6.5 0 1 1-4 0', key: '1r8fvy' }],\n ['path', { d: 'M5.52 16h12.96', key: '46hh1i' }],\n]);\n\nexport default FlaskRound;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,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,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,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,352 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { formatDate } from '@payloadcms/ui/shared';
import { getClientConfig } from '@payloadcms/ui/utilities/getClientConfig';
import { getClientSchemaMap } from '@payloadcms/ui/utilities/getClientSchemaMap';
import { getSchemaMap } from '@payloadcms/ui/utilities/getSchemaMap';
import { notFound } from 'next/navigation.js';
import { hasDraftsEnabled } from 'payload/shared';
import React from 'react';
import { DefaultVersionView } from './Default/index.js';
import { fetchLatestVersion, fetchVersion, fetchVersions } from './fetchVersions.js';
import { RenderDiff } from './RenderFieldsToDiff/index.js';
import { getVersionLabel } from './VersionPillLabel/getVersionLabel.js';
import { VersionPillLabel } from './VersionPillLabel/VersionPillLabel.js';
export async function VersionView(props) {
const {
hasPublishedDoc,
i18n,
initPageResult,
routeSegments,
searchParams
} = props;
const {
collectionConfig,
docID: id,
globalConfig,
permissions,
req,
req: {
payload,
payload: {
config,
config: {
localization
}
} = {},
user
} = {}
} = initPageResult;
const versionToID = routeSegments[routeSegments.length - 1];
const collectionSlug = collectionConfig?.slug;
const globalSlug = globalConfig?.slug;
const draftsEnabled = hasDraftsEnabled(collectionConfig || globalConfig);
// Resolve user's current locale for version label comparison (not 'all')
const userLocale = searchParams.locale || (req.locale !== 'all' ? req.locale : localization && localization.defaultLocale);
const localeCodesFromParams = searchParams.localeCodes ? JSON.parse(searchParams.localeCodes) : null;
const versionFromIDFromParams = searchParams.versionFrom;
const modifiedOnly = searchParams.modifiedOnly === 'false' ? false : true;
const docPermissions = collectionSlug ? permissions.collections[collectionSlug] : permissions.globals[globalSlug];
const versionTo = await fetchVersion({
id: versionToID,
collectionSlug,
depth: 1,
globalSlug,
locale: 'all',
overrideAccess: false,
req,
user
});
if (!versionTo) {
return notFound();
}
const [previousVersionResult, versionFromResult, currentlyPublishedVersion, latestDraftVersion, previousPublishedVersionResult] = await Promise.all([
// Previous version (the one before the versionTo)
fetchVersions({
collectionSlug,
// If versionFromIDFromParams is provided, the previous version is only used in the version comparison dropdown => depth 0 is enough.
// If it's not provided, this is used as `versionFrom` in the comparison, which expects populated data => depth 1 is needed.
depth: versionFromIDFromParams ? 0 : 1,
draft: true,
globalSlug,
limit: 1,
locale: 'all',
overrideAccess: false,
parentID: id,
req,
sort: '-updatedAt',
user,
where: {
and: [{
updatedAt: {
less_than: versionTo.updatedAt
}
}]
}
}),
// Version from ID from params
versionFromIDFromParams ? fetchVersion({
id: versionFromIDFromParams,
collectionSlug,
depth: 1,
globalSlug,
locale: 'all',
overrideAccess: false,
req,
user
}) : Promise.resolve(null),
// Currently published version - do note: currently published != latest published, as an unpublished version can be the latest published
hasPublishedDoc ? fetchLatestVersion({
collectionSlug,
depth: 0,
globalSlug,
locale: req.locale,
overrideAccess: false,
parentID: id,
req,
status: 'published',
user
}) : Promise.resolve(null),
// Latest draft version
draftsEnabled ? fetchLatestVersion({
collectionSlug,
depth: 0,
globalSlug,
locale: 'all',
overrideAccess: false,
parentID: id,
req,
status: 'draft',
user
}) : Promise.resolve(null),
// Previous published version
// Only query for published versions if drafts are enabled (since _status field only exists with drafts)
draftsEnabled ? fetchVersions({
collectionSlug,
depth: 0,
draft: true,
globalSlug,
limit: 1,
locale: 'all',
overrideAccess: false,
parentID: id,
req,
sort: '-updatedAt',
user,
where: {
and: [{
updatedAt: {
less_than: versionTo.updatedAt
}
}, {
'version._status': {
equals: 'published'
}
}]
}
}) : Promise.resolve(null)]);
const previousVersion = previousVersionResult?.docs?.[0] ?? null;
const versionFrom = versionFromResult ||
// By default, we'll compare the previous version. => versionFrom = version previous to versionTo
previousVersion;
// Previous published version before the versionTo
const previousPublishedVersion = previousPublishedVersionResult?.docs?.[0] ?? null;
let selectedLocales = [];
if (localization) {
let locales = [];
if (localeCodesFromParams) {
for (const code of localeCodesFromParams) {
const locale = localization.locales.find(locale => locale.code === code);
if (!locale) {
continue;
}
locales.push(locale);
}
} else {
locales = localization.locales;
}
if (localization.filterAvailableLocales) {
locales = (await localization.filterAvailableLocales({
locales,
req
})) || [];
}
selectedLocales = locales.map(locale => locale.code);
}
const schemaMap = getSchemaMap({
collectionSlug,
config,
globalSlug,
i18n
});
const clientSchemaMap = getClientSchemaMap({
collectionSlug,
config: getClientConfig({
config: payload.config,
i18n,
importMap: payload.importMap,
user
}),
globalSlug,
i18n,
payload,
schemaMap
});
const RenderedDiff = RenderDiff({
clientSchemaMap,
customDiffComponents: {},
entitySlug: collectionSlug || globalSlug,
fields: (collectionConfig || globalConfig)?.fields,
fieldsPermissions: docPermissions?.fields,
i18n,
modifiedOnly,
parentIndexPath: '',
parentIsLocalized: false,
parentPath: '',
parentSchemaPath: '',
req,
selectedLocales,
versionFromSiblingData: {
...versionFrom?.version,
updatedAt: versionFrom?.updatedAt
},
versionToSiblingData: {
...versionTo.version,
updatedAt: versionTo.updatedAt
}
});
const versionToCreatedAtFormatted = versionTo.updatedAt ? formatDate({
date: typeof versionTo.updatedAt === 'string' ? new Date(versionTo.updatedAt) : versionTo.updatedAt,
i18n,
pattern: config.admin.dateFormat
}) : '';
const formatPill = ({
doc,
labelOverride,
labelStyle,
labelSuffix
}) => {
return /*#__PURE__*/_jsx(VersionPillLabel, {
currentlyPublishedVersion: currentlyPublishedVersion,
doc: doc,
labelFirst: true,
labelOverride: labelOverride,
labelStyle: labelStyle ?? 'text',
labelSuffix: labelSuffix,
latestDraftVersion: latestDraftVersion
}, doc.id);
};
// SelectComparison Options:
//
// Previous version: always, unless doesn't exist. Can be the same as previously published
// Latest draft: only if no newer published exists (latestDraftVersion)
// Currently published: always, if exists
// Previously published: if there is a prior published version older than versionTo
// Specific Version: only if not already present under other label (= versionFrom)
let versionFromOptions = [];
// Previous version
if (previousVersion?.id) {
versionFromOptions.push({
doc: previousVersion,
labelOverride: i18n.t('version:previousVersion'),
updatedAt: new Date(previousVersion.updatedAt),
value: previousVersion.id
});
}
// Latest Draft
const publishedNewerThanDraft = currentlyPublishedVersion?.updatedAt > latestDraftVersion?.updatedAt;
if (latestDraftVersion && !publishedNewerThanDraft) {
versionFromOptions.push({
doc: latestDraftVersion,
updatedAt: new Date(latestDraftVersion.updatedAt),
value: latestDraftVersion.id
});
}
// Currently Published
if (currentlyPublishedVersion) {
versionFromOptions.push({
doc: currentlyPublishedVersion,
updatedAt: new Date(currentlyPublishedVersion.updatedAt),
value: currentlyPublishedVersion.id
});
}
// Previous Published
if (previousPublishedVersion && currentlyPublishedVersion?.id !== previousPublishedVersion.id) {
versionFromOptions.push({
doc: previousPublishedVersion,
labelOverride: i18n.t('version:previouslyPublished'),
updatedAt: new Date(previousPublishedVersion.updatedAt),
value: previousPublishedVersion.id
});
}
// Specific Version
if (versionFrom?.id && !versionFromOptions.some(option => option.value === versionFrom.id)) {
// Only add "specific version" if it is not already in the options
versionFromOptions.push({
doc: versionFrom,
labelOverride: i18n.t('version:specificVersion'),
updatedAt: new Date(versionFrom.updatedAt),
value: versionFrom.id
});
}
versionFromOptions = versionFromOptions.sort((a, b) => {
// Sort by updatedAt, newest first
if (a && b) {
return b.updatedAt.getTime() - a.updatedAt.getTime();
}
return 0;
});
const versionToIsVersionFrom = versionFrom?.id === versionTo.id;
const versionFromComparisonOptions = [];
for (const option of versionFromOptions) {
const isVersionTo = option.value === versionTo.id;
if (isVersionTo && !versionToIsVersionFrom) {
continue;
}
const alreadyAdded = versionFromComparisonOptions.some(existingOption => existingOption.value === option.value);
if (alreadyAdded) {
continue;
}
const otherOptionsWithSameID = versionFromOptions.filter(existingOption => existingOption.value === option.value && existingOption !== option);
// Merge options with same ID to the same option
const labelSuffix = otherOptionsWithSameID?.length ? /*#__PURE__*/_jsxs("span", {
children: [' (', otherOptionsWithSameID.map((optionWithSameID, index) => {
const label = optionWithSameID.labelOverride || getVersionLabel({
currentLocale: userLocale,
currentlyPublishedVersion,
latestDraftVersion,
t: i18n.t,
version: optionWithSameID.doc
}).label;
return /*#__PURE__*/_jsxs(React.Fragment, {
children: [index > 0 ? ', ' : '', label]
}, `${optionWithSameID.value}-${index}`);
}), ')']
}, `${option.value}-suffix`) : undefined;
versionFromComparisonOptions.push({
label: formatPill({
doc: option.doc,
labelOverride: option.labelOverride,
labelSuffix
}),
value: option.value
});
}
return /*#__PURE__*/_jsx(DefaultVersionView, {
canUpdate: docPermissions?.update,
modifiedOnly: modifiedOnly,
RenderedDiff: RenderedDiff,
selectedLocales: selectedLocales,
versionFromCreatedAt: versionFrom?.createdAt,
versionFromID: versionFrom?.id,
versionFromOptions: versionFromComparisonOptions,
versionToCreatedAt: versionTo.createdAt,
versionToCreatedAtFormatted: versionToCreatedAtFormatted,
VersionToCreatedAtLabel: formatPill({
doc: versionTo,
labelStyle: 'pill'
}),
versionToID: versionTo.id,
versionToStatus: versionTo.version?._status
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,19 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _getScrollAccessor = _interopRequireDefault(require("./getScrollAccessor"));
/**
* Gets or sets the scroll top position of a given element.
*
* @param node the element
* @param val the position to set
*/
var _default = (0, _getScrollAccessor.default)('pageYOffset');
exports.default = _default;
module.exports = exports["default"];

View File

@@ -0,0 +1,10 @@
import type { SQLiteDatabase, SQLiteRunResult } from 'expo-sqlite';
import { entityKind } from "../entity.cjs";
import { BaseSQLiteDatabase } from "../sqlite-core/db.cjs";
import type { DrizzleConfig } from "../utils.cjs";
export declare class ExpoSQLiteDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends BaseSQLiteDatabase<'sync', SQLiteRunResult, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(client: SQLiteDatabase, config?: DrizzleConfig<TSchema>): ExpoSQLiteDatabase<TSchema> & {
$client: SQLiteDatabase;
};

View File

@@ -0,0 +1,583 @@
(() => {
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/he/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05E9\u05E0\u05D9\u05D9\u05D4",
two: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05E9\u05EA\u05D9 \u05E9\u05E0\u05D9\u05D5\u05EA",
other: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05BE{{count}} \u05E9\u05E0\u05D9\u05D5\u05EA"
},
xSeconds: {
one: "\u05E9\u05E0\u05D9\u05D9\u05D4",
two: "\u05E9\u05EA\u05D9 \u05E9\u05E0\u05D9\u05D5\u05EA",
other: "{{count}} \u05E9\u05E0\u05D9\u05D5\u05EA"
},
halfAMinute: "\u05D7\u05E6\u05D9 \u05D3\u05E7\u05D4",
lessThanXMinutes: {
one: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05D3\u05E7\u05D4",
two: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05E9\u05EA\u05D9 \u05D3\u05E7\u05D5\u05EA",
other: "\u05E4\u05D7\u05D5\u05EA \u05DE\u05BE{{count}} \u05D3\u05E7\u05D5\u05EA"
},
xMinutes: {
one: "\u05D3\u05E7\u05D4",
two: "\u05E9\u05EA\u05D9 \u05D3\u05E7\u05D5\u05EA",
other: "{{count}} \u05D3\u05E7\u05D5\u05EA"
},
aboutXHours: {
one: "\u05DB\u05E9\u05E2\u05D4",
two: "\u05DB\u05E9\u05E2\u05EA\u05D9\u05D9\u05DD",
other: "\u05DB\u05BE{{count}} \u05E9\u05E2\u05D5\u05EA"
},
xHours: {
one: "\u05E9\u05E2\u05D4",
two: "\u05E9\u05E2\u05EA\u05D9\u05D9\u05DD",
other: "{{count}} \u05E9\u05E2\u05D5\u05EA"
},
xDays: {
one: "\u05D9\u05D5\u05DD",
two: "\u05D9\u05D5\u05DE\u05D9\u05D9\u05DD",
other: "{{count}} \u05D9\u05DE\u05D9\u05DD"
},
aboutXWeeks: {
one: "\u05DB\u05E9\u05D1\u05D5\u05E2",
two: "\u05DB\u05E9\u05D1\u05D5\u05E2\u05D9\u05D9\u05DD",
other: "\u05DB\u05BE{{count}} \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA"
},
xWeeks: {
one: "\u05E9\u05D1\u05D5\u05E2",
two: "\u05E9\u05D1\u05D5\u05E2\u05D9\u05D9\u05DD",
other: "{{count}} \u05E9\u05D1\u05D5\u05E2\u05D5\u05EA"
},
aboutXMonths: {
one: "\u05DB\u05D7\u05D5\u05D3\u05E9",
two: "\u05DB\u05D7\u05D5\u05D3\u05E9\u05D9\u05D9\u05DD",
other: "\u05DB\u05BE{{count}} \u05D7\u05D5\u05D3\u05E9\u05D9\u05DD"
},
xMonths: {
one: "\u05D7\u05D5\u05D3\u05E9",
two: "\u05D7\u05D5\u05D3\u05E9\u05D9\u05D9\u05DD",
other: "{{count}} \u05D7\u05D5\u05D3\u05E9\u05D9\u05DD"
},
aboutXYears: {
one: "\u05DB\u05E9\u05E0\u05D4",
two: "\u05DB\u05E9\u05E0\u05EA\u05D9\u05D9\u05DD",
other: "\u05DB\u05BE{{count}} \u05E9\u05E0\u05D9\u05DD"
},
xYears: {
one: "\u05E9\u05E0\u05D4",
two: "\u05E9\u05E0\u05EA\u05D9\u05D9\u05DD",
other: "{{count}} \u05E9\u05E0\u05D9\u05DD"
},
overXYears: {
one: "\u05D9\u05D5\u05EA\u05E8 \u05DE\u05E9\u05E0\u05D4",
two: "\u05D9\u05D5\u05EA\u05E8 \u05DE\u05E9\u05E0\u05EA\u05D9\u05D9\u05DD",
other: "\u05D9\u05D5\u05EA\u05E8 \u05DE\u05BE{{count}} \u05E9\u05E0\u05D9\u05DD"
},
almostXYears: {
one: "\u05DB\u05DE\u05E2\u05D8 \u05E9\u05E0\u05D4",
two: "\u05DB\u05DE\u05E2\u05D8 \u05E9\u05E0\u05EA\u05D9\u05D9\u05DD",
other: "\u05DB\u05DE\u05E2\u05D8 {{count}} \u05E9\u05E0\u05D9\u05DD"
}
};
var formatDistance = function formatDistance(token, count, options) {
if (token === "xDays" && options !== null && options !== void 0 && options.addSuffix && count <= 2) {
if (options.comparison && options.comparison > 0) {
return count === 1 ? "\u05DE\u05D7\u05E8" : "\u05DE\u05D7\u05E8\u05EA\u05D9\u05D9\u05DD";
}
return count === 1 ? "\u05D0\u05EA\u05DE\u05D5\u05DC" : "\u05E9\u05DC\u05E9\u05D5\u05DD";
}
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2) {
result = tokenValue.two;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u05D1\u05E2\u05D5\u05D3 " + result;
} else {
return "\u05DC\u05E4\u05E0\u05D9 " + result;
}
}
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/he/_lib/formatLong.js
var dateFormats = {
full: "EEEE, d \u05D1MMMM y",
long: "d \u05D1MMMM y",
medium: "d \u05D1MMM y",
short: "d.M.y"
};
var timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm"
};
var dateTimeFormats = {
full: "{{date}} '\u05D1\u05E9\u05E2\u05D4' {{time}}",
long: "{{date}} '\u05D1\u05E9\u05E2\u05D4' {{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/he/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "eeee '\u05E9\u05E2\u05D1\u05E8 \u05D1\u05E9\u05E2\u05D4' p",
yesterday: "'\u05D0\u05EA\u05DE\u05D5\u05DC \u05D1\u05E9\u05E2\u05D4' p",
today: "'\u05D4\u05D9\u05D5\u05DD \u05D1\u05E9\u05E2\u05D4' p",
tomorrow: "'\u05DE\u05D7\u05E8 \u05D1\u05E9\u05E2\u05D4' p",
nextWeek: "eeee '\u05D1\u05E9\u05E2\u05D4' 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/he/_lib/localize.js
var eraValues = {
narrow: ["\u05DC\u05E4\u05E0\u05D4\u05F4\u05E1", "\u05DC\u05E1\u05E4\u05D9\u05E8\u05D4"],
abbreviated: ["\u05DC\u05E4\u05E0\u05D4\u05F4\u05E1", "\u05DC\u05E1\u05E4\u05D9\u05E8\u05D4"],
wide: ["\u05DC\u05E4\u05E0\u05D9 \u05D4\u05E1\u05E4\u05D9\u05E8\u05D4", "\u05DC\u05E1\u05E4\u05D9\u05E8\u05D4"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["\u05E8\u05D1\u05E2\u05D5\u05DF 1", "\u05E8\u05D1\u05E2\u05D5\u05DF 2", "\u05E8\u05D1\u05E2\u05D5\u05DF 3", "\u05E8\u05D1\u05E2\u05D5\u05DF 4"]
};
var monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"\u05D9\u05E0\u05D5\u05F3",
"\u05E4\u05D1\u05E8\u05F3",
"\u05DE\u05E8\u05E5",
"\u05D0\u05E4\u05E8\u05F3",
"\u05DE\u05D0\u05D9",
"\u05D9\u05D5\u05E0\u05D9",
"\u05D9\u05D5\u05DC\u05D9",
"\u05D0\u05D5\u05D2\u05F3",
"\u05E1\u05E4\u05D8\u05F3",
"\u05D0\u05D5\u05E7\u05F3",
"\u05E0\u05D5\u05D1\u05F3",
"\u05D3\u05E6\u05DE\u05F3"],
wide: [
"\u05D9\u05E0\u05D5\u05D0\u05E8",
"\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8",
"\u05DE\u05E8\u05E5",
"\u05D0\u05E4\u05E8\u05D9\u05DC",
"\u05DE\u05D0\u05D9",
"\u05D9\u05D5\u05E0\u05D9",
"\u05D9\u05D5\u05DC\u05D9",
"\u05D0\u05D5\u05D2\u05D5\u05E1\u05D8",
"\u05E1\u05E4\u05D8\u05DE\u05D1\u05E8",
"\u05D0\u05D5\u05E7\u05D8\u05D5\u05D1\u05E8",
"\u05E0\u05D5\u05D1\u05DE\u05D1\u05E8",
"\u05D3\u05E6\u05DE\u05D1\u05E8"]
};
var dayValues = {
narrow: ["\u05D0\u05F3", "\u05D1\u05F3", "\u05D2\u05F3", "\u05D3\u05F3", "\u05D4\u05F3", "\u05D5\u05F3", "\u05E9\u05F3"],
short: ["\u05D0\u05F3", "\u05D1\u05F3", "\u05D2\u05F3", "\u05D3\u05F3", "\u05D4\u05F3", "\u05D5\u05F3", "\u05E9\u05F3"],
abbreviated: [
"\u05D9\u05D5\u05DD \u05D0\u05F3",
"\u05D9\u05D5\u05DD \u05D1\u05F3",
"\u05D9\u05D5\u05DD \u05D2\u05F3",
"\u05D9\u05D5\u05DD \u05D3\u05F3",
"\u05D9\u05D5\u05DD \u05D4\u05F3",
"\u05D9\u05D5\u05DD \u05D5\u05F3",
"\u05E9\u05D1\u05EA"],
wide: [
"\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF",
"\u05D9\u05D5\u05DD \u05E9\u05E0\u05D9",
"\u05D9\u05D5\u05DD \u05E9\u05DC\u05D9\u05E9\u05D9",
"\u05D9\u05D5\u05DD \u05E8\u05D1\u05D9\u05E2\u05D9",
"\u05D9\u05D5\u05DD \u05D7\u05DE\u05D9\u05E9\u05D9",
"\u05D9\u05D5\u05DD \u05E9\u05D9\u05E9\u05D9",
"\u05D9\u05D5\u05DD \u05E9\u05D1\u05EA"]
};
var dayPeriodValues = {
narrow: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D0\u05D7\u05E8 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05E2\u05E8\u05D1",
night: "\u05DC\u05D9\u05DC\u05D4"
},
abbreviated: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D0\u05D7\u05E8 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05E2\u05E8\u05D1",
night: "\u05DC\u05D9\u05DC\u05D4"
},
wide: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D0\u05D7\u05E8 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05E2\u05E8\u05D1",
night: "\u05DC\u05D9\u05DC\u05D4"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D1\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05D1\u05E2\u05E8\u05D1",
night: "\u05D1\u05DC\u05D9\u05DC\u05D4"
},
abbreviated: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D0\u05D7\u05E8 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05D1\u05E2\u05E8\u05D1",
night: "\u05D1\u05DC\u05D9\u05DC\u05D4"
},
wide: {
am: "\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",
pm: "\u05D0\u05D7\u05D4\u05F4\u05E6",
midnight: "\u05D7\u05E6\u05D5\u05EA",
noon: "\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
morning: "\u05D1\u05D1\u05D5\u05E7\u05E8",
afternoon: "\u05D0\u05D7\u05E8 \u05D4\u05E6\u05D4\u05E8\u05D9\u05D9\u05DD",
evening: "\u05D1\u05E2\u05E8\u05D1",
night: "\u05D1\u05DC\u05D9\u05DC\u05D4"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
if (number <= 0 || number > 10)
return String(number);
var unit = String(options === null || options === void 0 ? void 0 : options.unit);
var isFemale = ["year", "hour", "minute", "second"].indexOf(unit) >= 0;
var male = [
"\u05E8\u05D0\u05E9\u05D5\u05DF",
"\u05E9\u05E0\u05D9",
"\u05E9\u05DC\u05D9\u05E9\u05D9",
"\u05E8\u05D1\u05D9\u05E2\u05D9",
"\u05D7\u05DE\u05D9\u05E9\u05D9",
"\u05E9\u05D9\u05E9\u05D9",
"\u05E9\u05D1\u05D9\u05E2\u05D9",
"\u05E9\u05DE\u05D9\u05E0\u05D9",
"\u05EA\u05E9\u05D9\u05E2\u05D9",
"\u05E2\u05E9\u05D9\u05E8\u05D9"];
var female = [
"\u05E8\u05D0\u05E9\u05D5\u05E0\u05D4",
"\u05E9\u05E0\u05D9\u05D9\u05D4",
"\u05E9\u05DC\u05D9\u05E9\u05D9\u05EA",
"\u05E8\u05D1\u05D9\u05E2\u05D9\u05EA",
"\u05D7\u05DE\u05D9\u05E9\u05D9\u05EA",
"\u05E9\u05D9\u05E9\u05D9\u05EA",
"\u05E9\u05D1\u05D9\u05E2\u05D9\u05EA",
"\u05E9\u05DE\u05D9\u05E0\u05D9\u05EA",
"\u05EA\u05E9\u05D9\u05E2\u05D9\u05EA",
"\u05E2\u05E9\u05D9\u05E8\u05D9\u05EA"];
var index = number - 1;
return isFemale ? female[index] : male[index];
};
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/he/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+|(ראשון|שני|שלישי|רביעי|חמישי|שישי|שביעי|שמיני|תשיעי|עשירי|ראשונה|שנייה|שלישית|רביעית|חמישית|שישית|שביעית|שמינית|תשיעית|עשירית))/i;
var parseOrdinalNumberPattern = /^(\d+|רא|שנ|של|רב|ח|שי|שב|שמ|ת|ע)/i;
var matchEraPatterns = {
narrow: /^ל(ספירה|פנה״ס)/i,
abbreviated: /^ל(ספירה|פנה״ס)/i,
wide: /^ל(פני ה)?ספירה/i
};
var parseEraPatterns = {
any: [/^לפ/i, /^לס/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^רבעון [1234]/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^\d+/i,
abbreviated: /^(ינו|פבר|מרץ|אפר|מאי|יוני|יולי|אוג|ספט|אוק|נוב|דצמ)׳?/i,
wide: /^(ינואר|פברואר|מרץ|אפריל|מאי|יוני|יולי|אוגוסט|ספטמבר|אוקטובר|נובמבר|דצמבר)/i
};
var parseMonthPatterns = {
narrow: [
/^1$/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i],
any: [
/^ינ/i,
/^פ/i,
/^מר/i,
/^אפ/i,
/^מא/i,
/^יונ/i,
/^יול/i,
/^אוג/i,
/^ס/i,
/^אוק/i,
/^נ/i,
/^ד/i]
};
var matchDayPatterns = {
narrow: /^[אבגדהוש]׳/i,
short: /^[אבגדהוש]׳/i,
abbreviated: /^(שבת|יום (א|ב|ג|ד|ה|ו)׳)/i,
wide: /^יום (ראשון|שני|שלישי|רביעי|חמישי|שישי|שבת)/i
};
var parseDayPatterns = {
abbreviated: [/א׳$/i, /ב׳$/i, /ג׳$/i, /ד׳$/i, /ה׳$/i, /ו׳$/i, /^ש/i],
wide: [/ן$/i, /ני$/i, /לישי$/i, /עי$/i, /מישי$/i, /שישי$/i, /ת$/i],
any: [/^א/i, /^ב/i, /^ג/i, /^ד/i, /^ה/i, /^ו/i, /^ש/i]
};
var matchDayPeriodPatterns = {
any: /^(אחר ה|ב)?(חצות|צהריים|בוקר|ערב|לילה|אחה״צ|לפנה״צ)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^לפ/i,
pm: /^אחה/i,
midnight: /^ח/i,
noon: /^צ/i,
morning: /בוקר/i,
afternoon: /בצ|אחר/i,
evening: /ערב/i,
night: /לילה/i
}
};
var ordinalName = ["\u05E8\u05D0", "\u05E9\u05E0", "\u05E9\u05DC", "\u05E8\u05D1", "\u05D7", "\u05E9\u05D9", "\u05E9\u05D1", "\u05E9\u05DE", "\u05EA", "\u05E2"];
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {
var number = parseInt(value, 10);
return isNaN(number) ? ordinalName.indexOf(value) + 1 : number;
}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: 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/he.js
var he = {
code: "he",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/he/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), {}, {
he: he }) });
//# debugId=79737C2841483B4564756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,74 @@
import type { LangGraphOptions } from '@sentry/core';
export declare const instrumentLangGraph: ((options?: LangGraphOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for LangGraph.
*
* This integration is enabled by default.
*
* When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* integrations: [Sentry.langGraphIntegration()],
* });
* ```
*
* ## Options
*
* - `recordInputs`: Whether to record input messages (default: respects `sendDefaultPii` client option)
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
*
* ### Default Behavior
*
* By default, the integration will:
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
*
* @example
* ```javascript
* // Record inputs and outputs when sendDefaultPii is false
* Sentry.init({
* integrations: [
* Sentry.langGraphIntegration({
* recordInputs: true,
* recordOutputs: true
* })
* ],
* });
*
* // Never record inputs/outputs regardless of sendDefaultPii
* Sentry.init({
* sendDefaultPii: true,
* integrations: [
* Sentry.langGraphIntegration({
* recordInputs: false,
* recordOutputs: false
* })
* ],
* });
* ```
*
* ## Captured Operations
*
* The integration captures the following LangGraph operations:
* - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span
* - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span
*
* ## Captured Data
*
* When `recordInputs` and `recordOutputs` are enabled, the integration captures:
* - Input messages from the graph state
* - Output messages and LLM responses
* - Tool calls made during agent execution
* - Agent and graph names
* - Available tools configured in the graph
*
*/
export declare const langGraphIntegration: (options?: LangGraphOptions | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,106 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var array_exports = {};
__export(array_exports, {
makePgArray: () => makePgArray,
parsePgArray: () => parsePgArray,
parsePgNestedArray: () => parsePgNestedArray
});
module.exports = __toCommonJS(array_exports);
function parsePgArrayValue(arrayString, startFrom, inQuotes) {
for (let i = startFrom; i < arrayString.length; i++) {
const char = arrayString[i];
if (char === "\\") {
i++;
continue;
}
if (char === '"') {
return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i + 1];
}
if (inQuotes) {
continue;
}
if (char === "," || char === "}") {
return [arrayString.slice(startFrom, i).replace(/\\/g, ""), i];
}
}
return [arrayString.slice(startFrom).replace(/\\/g, ""), arrayString.length];
}
function parsePgNestedArray(arrayString, startFrom = 0) {
const result = [];
let i = startFrom;
let lastCharIsComma = false;
while (i < arrayString.length) {
const char = arrayString[i];
if (char === ",") {
if (lastCharIsComma || i === startFrom) {
result.push("");
}
lastCharIsComma = true;
i++;
continue;
}
lastCharIsComma = false;
if (char === "\\") {
i += 2;
continue;
}
if (char === '"') {
const [value2, startFrom2] = parsePgArrayValue(arrayString, i + 1, true);
result.push(value2);
i = startFrom2;
continue;
}
if (char === "}") {
return [result, i + 1];
}
if (char === "{") {
const [value2, startFrom2] = parsePgNestedArray(arrayString, i + 1);
result.push(value2);
i = startFrom2;
continue;
}
const [value, newStartFrom] = parsePgArrayValue(arrayString, i, false);
result.push(value);
i = newStartFrom;
}
return [result, i];
}
function parsePgArray(arrayString) {
const [result] = parsePgNestedArray(arrayString, 1);
return result;
}
function makePgArray(array) {
return `{${array.map((item) => {
if (Array.isArray(item)) {
return makePgArray(item);
}
if (typeof item === "string") {
return `"${item.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
}
return `${item}`;
}).join(",")}}`;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
makePgArray,
parsePgArray,
parsePgNestedArray
});
//# sourceMappingURL=array.cjs.map

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompactSign = void 0;
const sign_js_1 = require("../flattened/sign.js");
class CompactSign {
_flattened;
constructor(payload) {
this._flattened = new sign_js_1.FlattenedSign(payload);
}
setProtectedHeader(protectedHeader) {
this._flattened.setProtectedHeader(protectedHeader);
return this;
}
async sign(key, options) {
const jws = await this._flattened.sign(key, options);
if (jws.payload === undefined) {
throw new TypeError('use the flattened module for creating JWS with b64: false');
}
return `${jws.protected}.${jws.payload}.${jws.signature}`;
}
}
exports.CompactSign = CompactSign;

View File

@@ -0,0 +1,195 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var cache_exports = {};
__export(cache_exports, {
UpstashCache: () => UpstashCache,
upstashCache: () => upstashCache
});
module.exports = __toCommonJS(cache_exports);
var import_redis = require("@upstash/redis");
var import_core = require("../core/index.cjs");
var import_entity = require("../../entity.cjs");
var import__ = require("../../index.cjs");
const getByTagScript = `
local tagsMapKey = KEYS[1] -- tags map key
local tag = ARGV[1] -- tag
local compositeTableName = redis.call('HGET', tagsMapKey, tag)
if not compositeTableName then
return nil
end
local value = redis.call('HGET', compositeTableName, tag)
return value
`;
const onMutateScript = `
local tagsMapKey = KEYS[1] -- tags map key
local tables = {} -- initialize tables array
local tags = ARGV -- tags array
for i = 2, #KEYS do
tables[#tables + 1] = KEYS[i] -- add all keys except the first one to tables
end
if #tags > 0 then
for _, tag in ipairs(tags) do
if tag ~= nil and tag ~= '' then
local compositeTableName = redis.call('HGET', tagsMapKey, tag)
if compositeTableName then
redis.call('HDEL', compositeTableName, tag)
end
end
end
redis.call('HDEL', tagsMapKey, unpack(tags))
end
local keysToDelete = {}
if #tables > 0 then
local compositeTableNames = redis.call('SUNION', unpack(tables))
for _, compositeTableName in ipairs(compositeTableNames) do
keysToDelete[#keysToDelete + 1] = compositeTableName
end
for _, table in ipairs(tables) do
keysToDelete[#keysToDelete + 1] = table
end
redis.call('DEL', unpack(keysToDelete))
end
`;
class UpstashCache extends import_core.Cache {
constructor(redis, config, useGlobally) {
super();
this.redis = redis;
this.useGlobally = useGlobally;
this.internalConfig = this.toInternalConfig(config);
this.luaScripts = {
getByTagScript: this.redis.createScript(getByTagScript, { readonly: true }),
onMutateScript: this.redis.createScript(onMutateScript)
};
}
static [import_entity.entityKind] = "UpstashCache";
/**
* Prefix for sets which denote the composite table names for each unique table
*
* Example: In the composite table set of "table1", you may find
* `${compositeTablePrefix}table1,table2` and `${compositeTablePrefix}table1,table3`
*/
static compositeTableSetPrefix = "__CTS__";
/**
* Prefix for hashes which map hash or tags to cache values
*/
static compositeTablePrefix = "__CT__";
/**
* Key which holds the mapping of tags to composite table names
*
* Using this tagsMapKey, you can find the composite table name for a given tag
* and get the cache value for that tag:
*
* ```ts
* const compositeTable = redis.hget(tagsMapKey, 'tag1')
* console.log(compositeTable) // `${compositeTablePrefix}table1,table2`
*
* const cachevalue = redis.hget(compositeTable, 'tag1')
*/
static tagsMapKey = "__tagsMap__";
/**
* Queries whose auto invalidation is false aren't stored in their respective
* composite table hashes because those hashes are deleted when a mutation
* occurs on related tables.
*
* Instead, they are stored in a separate hash with the prefix
* `__nonAutoInvalidate__` to prevent them from being deleted when a mutation
*/
static nonAutoInvalidateTablePrefix = "__nonAutoInvalidate__";
luaScripts;
internalConfig;
strategy() {
return this.useGlobally ? "all" : "explicit";
}
toInternalConfig(config) {
return config ? {
seconds: config.ex,
hexOptions: config.hexOptions
} : {
seconds: 1
};
}
async get(key, tables, isTag = false, isAutoInvalidate) {
if (!isAutoInvalidate) {
const result2 = await this.redis.hget(UpstashCache.nonAutoInvalidateTablePrefix, key);
return result2 === null ? void 0 : result2;
}
if (isTag) {
const result2 = await this.luaScripts.getByTagScript.exec([UpstashCache.tagsMapKey], [key]);
return result2 === null ? void 0 : result2;
}
const compositeKey = this.getCompositeKey(tables);
const result = (await this.redis.hget(compositeKey, key)) ?? void 0;
return result === null ? void 0 : result;
}
async put(key, response, tables, isTag = false, config) {
const isAutoInvalidate = tables.length !== 0;
const pipeline = this.redis.pipeline();
const ttlSeconds = config && config.ex ? config.ex : this.internalConfig.seconds;
const hexOptions = config && config.hexOptions ? config.hexOptions : this.internalConfig?.hexOptions;
if (!isAutoInvalidate) {
if (isTag) {
pipeline.hset(UpstashCache.tagsMapKey, { [key]: UpstashCache.nonAutoInvalidateTablePrefix });
pipeline.hexpire(UpstashCache.tagsMapKey, key, ttlSeconds, hexOptions);
}
pipeline.hset(UpstashCache.nonAutoInvalidateTablePrefix, { [key]: response });
pipeline.hexpire(UpstashCache.nonAutoInvalidateTablePrefix, key, ttlSeconds, hexOptions);
await pipeline.exec();
return;
}
const compositeKey = this.getCompositeKey(tables);
pipeline.hset(compositeKey, { [key]: response });
pipeline.hexpire(compositeKey, key, ttlSeconds, hexOptions);
if (isTag) {
pipeline.hset(UpstashCache.tagsMapKey, { [key]: compositeKey });
pipeline.hexpire(UpstashCache.tagsMapKey, key, ttlSeconds, hexOptions);
}
for (const table of tables) {
pipeline.sadd(this.addTablePrefix(table), compositeKey);
}
await pipeline.exec();
}
async onMutate(params) {
const tags = Array.isArray(params.tags) ? params.tags : params.tags ? [params.tags] : [];
const tables = Array.isArray(params.tables) ? params.tables : params.tables ? [params.tables] : [];
const tableNames = tables.map((table) => (0, import_entity.is)(table, import__.Table) ? table[import__.OriginalName] : table);
const compositeTableSets = tableNames.map((table) => this.addTablePrefix(table));
await this.luaScripts.onMutateScript.exec([UpstashCache.tagsMapKey, ...compositeTableSets], tags);
}
addTablePrefix = (table) => `${UpstashCache.compositeTableSetPrefix}${table}`;
getCompositeKey = (tables) => `${UpstashCache.compositeTablePrefix}${tables.sort().join(",")}`;
}
function upstashCache({ url, token, config, global = false }) {
const redis = new import_redis.Redis({
url,
token
});
return new UpstashCache(redis, config, global);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
UpstashCache,
upstashCache
});
//# sourceMappingURL=cache.cjs.map

View File

@@ -0,0 +1,32 @@
"use strict";
exports.previousFriday = previousFriday;
var _index = require("./previousDay.cjs");
/**
* The {@link previousFriday} function options.
*/
/**
* @name previousFriday
* @category Weekday Helpers
* @summary When is the previous Friday?
*
* @description
* When is the previous Friday?
*
* @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 start counting from
* @param options - The options
*
* @returns The previous Friday
*
* @example
* // When is the previous Friday before Jun, 19, 2021?
* const result = previousFriday(new Date(2021, 5, 19))
* //=> Fri June 18 2021 00:00:00
*/
function previousFriday(date, options) {
return (0, _index.previousDay)(date, 5, options);
}

View File

@@ -0,0 +1,9 @@
import getServerTranslator from '../server/react-server/getServerTranslator.js';
import useConfig from './useConfig.js';
function useTranslations(...[namespace]) {
const config = useConfig('useTranslations');
return getServerTranslator(config, namespace);
}
export { useTranslations as default };

View File

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

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, d בMMMM y",
long: "d בMMMM y",
medium: "d בMMM y",
short: "d.M.y",
};
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}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,7 @@
import { Logger } from './types/Logger';
import { LogRecord } from './types/LogRecord';
export declare class NoopLogger implements Logger {
emit(_logRecord: LogRecord): void;
}
export declare const NOOP_LOGGER: NoopLogger;
//# sourceMappingURL=NoopLogger.d.ts.map

View File

@@ -0,0 +1,3 @@
export type { WindowInfoProviderProps, Breakpoints } from './WindowInfoProvider/index.js';
export type { WindowInfoProps } from './WindowInfo/index.js';
export type { IWindowInfoContext } from './WindowInfoProvider/context.js';

View File

@@ -0,0 +1,17 @@
/**
* @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 ZoomOut = createLucideIcon("ZoomOut", [
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
]);
export { ZoomOut as default };
//# sourceMappingURL=zoom-out.js.map

View File

@@ -0,0 +1,22 @@
/**
* @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 Club = createLucideIcon("Club", [
[
"path",
{
d: "M17.28 9.05a5.5 5.5 0 1 0-10.56 0A5.5 5.5 0 1 0 12 17.66a5.5 5.5 0 1 0 5.28-8.6Z",
key: "27yuqz"
}
],
["path", { d: "M12 17.66L12 22", key: "ogfahf" }]
]);
export { Club as default };
//# sourceMappingURL=club.js.map

View File

@@ -0,0 +1,17 @@
/**
* @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 Archive = createLucideIcon("Archive", [
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
["path", { d: "M10 12h4", key: "a56b0p" }]
]);
export { Archive as default };
//# sourceMappingURL=archive.js.map

View File

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

View File

@@ -0,0 +1,120 @@
[![Node.js CI](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml/badge.svg?branch=master)](https://github.com/Borewit/token-types/actions/workflows/nodejs-ci.yml?query=branch%3Amaster)
[![NPM version](https://badge.fury.io/js/token-types.svg)](https://npmjs.org/package/token-types)
[![npm downloads](http://img.shields.io/npm/dm/token-types.svg)](https://npmcharts.com/compare/token-types,strtok3?start=1200&interval=30)
[![coveralls](https://coveralls.io/repos/github/Borewit/token-types/badge.svg?branch=master)](https://coveralls.io/github/Borewit/token-types?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4723ce4613fc49cda8db5eed29f18834)](https://www.codacy.com/app/Borewit/token-types?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/token-types&amp;utm_campaign=Badge_Grade)
[![DeepScan grade](https://deepscan.io/api/teams/5165/projects/6940/branches/61852/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5165&pid=6940&bid=61852)
[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/token-types/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/token-types?targetFile=package.json)
# token-types
A primitive token library used to read and write from a `Uint8Array`.
Although it is possible to use this module directly, it is primarily designed to be used with [strtok3 tokenizer](https://github.com/Borewit/strtok3).
## Compatibility
Module: version 5 migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
JavaScript is compliant with [ECMAScript 2019 (ES10)](https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_%E2%80%93_ECMAScript_2019).
## Installation
```sh
npm install --save token-types
```
Usually in combination with [strtok3](https://github.com/Borewit/strtok3):
```sh
npm install --save strtok3
```
Using TypeScript you should also install [@tokenizer/token](https://github.com/Borewit/tokenizer-token) as a development
dependency:
```shell
npm install --save-dev @tokenizer/token
```
## Example
```js
import * as strtok3 from 'strtok3';
import * as token from 'token-types';
(async () => {
const tokenizer = await strtok3.fromFile("somefile.bin");
try {
const myNumber = await tokenizer.readToken(token.Float32_BE);
console.log(`My number: ${myNumber}`);
} finally {
tokenizer.close(); // Close the file
}
})();
```
## Tokens
### Numeric tokens
`token-types` supports a wide variety of numeric tokens out of the box:
| Token | Number | Bits | Endianness |
|---------------|------------------|------|----------------|
| `UINT8` | Unsigned integer | 8 | n/a |
| `UINT16_BE` | Unsigned integer | 16 | big endian |
| `UINT16_LE` | Unsigned integer | 16 | little endian |
| `UINT24_BE` | Unsigned integer | 24 | big endian |
| `UINT24_LE` | Unsigned integer | 24 | little endian |
| `UINT32_BE` | Unsigned integer | 32 | big endian |
| `UINT32_LE` | Unsigned integer | 32 | little endian |
| `UINT64_BE` | Unsigned integer | 64 | big endian |
| `UINT64_LE`* | Unsigned integer | 64 | little endian |
| `INT8` | Signed integer | 8 | n/a |
| `INT16_BE` | Signed integer | 16 | big endian |
| `INT16_LE` | Signed integer | 16 | little endian |
| `INT24_BE` | Signed integer | 24 | big endian |
| `INT24_LE` | Signed integer | 24 | little endian |
| `INT32_BE` | Signed integer | 32 | big endian |
| `INT32_LE` | Signed integer | 32 | little endian |
| `INT64_BE` | Signed integer | 64 | big endian |
| `INT64_LE`* | Signed integer | 64 | little endian |
| `Float16_BE` | IEEE 754 float | 16 | big endian |
| `Float16_LE` | IEEE 754 float | 16 | little endian |
| `Float32_BE` | IEEE 754 float | 32 | big endian |
| `Float32_LE` | IEEE 754 float | 32 | little endian |
| `Float64_BE` | IEEE 754 float | 64 | big endian |
| `Float64_LE` | IEEE 754 float | 64 | little endian |
| `Float80_BE`* | IEEE 754 float | 80 | big endian |
| `Float80_LE`* | IEEE 754 float | 80 | little endian |
(*) The tokens exceed the JavaScript IEEE 754 64-bit Floating Point precision, decoding and encoding is best effort based.
### String tokens
StringType decoding is using [@borewit/text-codec](https://github.com/Borewit/text-codec).
### Custom tokens
Custom tokens can be added, suitable for reading binary files or network messages:
```js
ExtendedHeader = {
len: 10,
get: (buf, off) => {
return {
// Extended header size
size: Token.UINT32_BE.get(buf, off),
// Extended Flags
extendedFlags: Token.UINT16_BE.get(buf, off + 4),
// Size of padding
sizeOfPadding: Token.UINT32_BE.get(buf, off + 6),
// CRC data present
crcDataPresent: common.strtokBITSET.get(buf, off + 4, 31)
};
}
};
```
## Licence
This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_iterable_to_array.js";

View File

@@ -0,0 +1 @@
{"version":3,"file":"items.js","names":[],"sources":["../../../../src/rest/commands/create/items.ts"],"sourcesContent":["import type { ApplyQueryFields, CollectionType, NestedPartial, Query, UnpackList } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { isSystemCollection } from '../../utils/is-system-collection.js';\n\nexport type CreateItemOutput<\n\tSchema,\n\tCollection extends keyof Schema,\n\tTQuery extends Query<Schema, Schema[Collection]>,\n> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;\n\n/**\n * Create new items in the given collection.\n *\n * @param collection The collection of the item\n * @param items The items to create\n * @param query Optional return data query\n *\n * @returns Returns the item objects of the item that were created.\n */\nexport const createItems =\n\t<Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>>(\n\t\tcollection: Collection,\n\t\titems: NestedPartial<UnpackList<Schema[Collection]>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateItemOutput<Schema, Collection, TQuery>[], Schema> =>\n\t() => {\n\t\tconst _collection = String(collection);\n\n\t\tif (isSystemCollection(_collection)) {\n\t\t\tthrow new Error('Cannot use createItems for core collections');\n\t\t}\n\n\t\treturn {\n\t\t\tpath: `/items/${_collection}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(items),\n\t\t\tmethod: 'POST',\n\t\t};\n\t};\n\n/**\n * Create a new item in the given collection.\n *\n * @param collection The collection of the item\n * @param item The item to create\n * @param query Optional return data query\n *\n * @returns Returns the item objects of the item that were created.\n */\nexport const createItem =\n\t<Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>>(\n\t\tcollection: Collection,\n\t\titem: NestedPartial<UnpackList<Schema[Collection]>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateItemOutput<Schema, Collection, TQuery>, Schema> =>\n\t() => {\n\t\tconst _collection = String(collection);\n\n\t\tif (isSystemCollection(_collection)) {\n\t\t\tthrow new Error('Cannot use createItem for core collections');\n\t\t}\n\n\t\treturn {\n\t\t\tpath: `/items/${_collection}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'POST',\n\t\t};\n\t};\n"],"mappings":"yEAmBA,MAAa,GAEX,EACA,EACA,QAEK,CACL,IAAM,EAAc,OAAO,EAAW,CAEtC,GAAI,EAAmB,EAAY,CAClC,MAAU,MAAM,8CAA8C,CAG/D,MAAO,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAYU,GAEX,EACA,EACA,QAEK,CACL,IAAM,EAAc,OAAO,EAAW,CAEtC,GAAI,EAAmB,EAAY,CAClC,MAAU,MAAM,6CAA6C,CAG9D,MAAO,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_iterableToArrayLimit","arr","i","iterator","Symbol","_arr","iteratorNormalCompletion","didIteratorError","step","iteratorError","next","_return","call","Object","done","push","value","length","err"],"sources":["../../src/helpers/iterableToArrayLimit.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _iterableToArrayLimit<T>(arr: Iterable<T>, i: number) {\n // this is an expanded form of \\`for...of\\` that properly supports abrupt completions of\n // iterators etc.\n\n var iterator: Iterator<T> =\n arr == null\n ? null\n : (typeof Symbol !== \"undefined\" && arr[Symbol.iterator]) ||\n (arr as any)[\"@@iterator\"];\n if (iterator == null) return;\n\n var _arr: T[] = [];\n var iteratorNormalCompletion = true;\n var didIteratorError = false;\n var step, iteratorError, next, _return;\n try {\n next = (iterator = (iterator as unknown as Function).call(arr)).next;\n if (i === 0) {\n if (Object(iterator) !== iterator) return;\n iteratorNormalCompletion = false;\n } else {\n for (\n ;\n !(iteratorNormalCompletion = (step = next.call(iterator)).done);\n iteratorNormalCompletion = true\n ) {\n _arr.push(step.value);\n if (_arr.length === i) break;\n }\n }\n } catch (err) {\n didIteratorError = true;\n iteratorError = err;\n } finally {\n try {\n if (!iteratorNormalCompletion && iterator[\"return\"] != null) {\n _return = iterator[\"return\"]();\n // eslint-disable-next-line no-unsafe-finally\n if (Object(_return) !== _return) return;\n }\n } finally {\n // eslint-disable-next-line no-unsafe-finally\n if (didIteratorError) throw iteratorError;\n }\n }\n return _arr;\n}\n"],"mappings":";;;;;;AAEe,SAASA,qBAAqBA,CAAIC,GAAgB,EAAEC,CAAS,EAAE;EAI5E,IAAIC,QAAqB,GACvBF,GAAG,IAAI,IAAI,GACP,IAAI,GACH,OAAOG,MAAM,KAAK,WAAW,IAAIH,GAAG,CAACG,MAAM,CAACD,QAAQ,CAAC,IACrDF,GAAG,CAAS,YAAY,CAAC;EAChC,IAAIE,QAAQ,IAAI,IAAI,EAAE;EAEtB,IAAIE,IAAS,GAAG,EAAE;EAClB,IAAIC,wBAAwB,GAAG,IAAI;EACnC,IAAIC,gBAAgB,GAAG,KAAK;EAC5B,IAAIC,IAAI,EAAEC,aAAa,EAAEC,IAAI,EAAEC,OAAO;EACtC,IAAI;IACFD,IAAI,GAAG,CAACP,QAAQ,GAAIA,QAAQ,CAAyBS,IAAI,CAACX,GAAG,CAAC,EAAES,IAAI;IACpE,IAAIR,CAAC,KAAK,CAAC,EAAE;MACX,IAAIW,MAAM,CAACV,QAAQ,CAAC,KAAKA,QAAQ,EAAE;MACnCG,wBAAwB,GAAG,KAAK;IAClC,CAAC,MAAM;MACL,OAEE,EAAEA,wBAAwB,GAAG,CAACE,IAAI,GAAGE,IAAI,CAACE,IAAI,CAACT,QAAQ,CAAC,EAAEW,IAAI,CAAC,EAC/DR,wBAAwB,GAAG,IAAI,EAC/B;QACAD,IAAI,CAACU,IAAI,CAACP,IAAI,CAACQ,KAAK,CAAC;QACrB,IAAIX,IAAI,CAACY,MAAM,KAAKf,CAAC,EAAE;MACzB;IACF;EACF,CAAC,CAAC,OAAOgB,GAAG,EAAE;IACZX,gBAAgB,GAAG,IAAI;IACvBE,aAAa,GAAGS,GAAG;EACrB,CAAC,SAAS;IACR,IAAI;MACF,IAAI,CAACZ,wBAAwB,IAAIH,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE;QAC3DQ,OAAO,GAAGR,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE9B,IAAIU,MAAM,CAACF,OAAO,CAAC,KAAKA,OAAO,EAAE;MACnC;IACF,CAAC,SAAS;MAER,IAAIJ,gBAAgB,EAAE,MAAME,aAAa;IAC3C;EACF;EACA,OAAOJ,IAAI;AACb","ignoreList":[]}

View File

@@ -0,0 +1,23 @@
{
"name": "@webassemblyjs/leb128",
"version": "1.13.2",
"description": "LEB128 decoder and encoder",
"license": "Apache-2.0",
"main": "lib/index.js",
"module": "esm/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/xtuc/webassemblyjs.git",
"directory": "packages/leb128"
},
"dependencies": {
"@xtuc/long": "4.2.2"
},
"publishConfig": {
"access": "public"
},
"gitHead": "897aeb784f042a46a00626f1d1cca96159aa5db3"
}

View File

@@ -0,0 +1,18 @@
/**
* @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 SmartphoneNfc = createLucideIcon("SmartphoneNfc", [
["rect", { width: "7", height: "12", x: "2", y: "6", rx: "1", key: "5nje8w" }],
["path", { d: "M13 8.32a7.43 7.43 0 0 1 0 7.36", key: "1g306n" }],
["path", { d: "M16.46 6.21a11.76 11.76 0 0 1 0 11.58", key: "uqvjvo" }],
["path", { d: "M19.91 4.1a15.91 15.91 0 0 1 .01 15.8", key: "ujntz3" }]
]);
export { SmartphoneNfc as default };
//# sourceMappingURL=smartphone-nfc.js.map

View File

@@ -0,0 +1,18 @@
/**
* @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 Maximize = createLucideIcon("Maximize", [
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
]);
export { Maximize as default };
//# sourceMappingURL=maximize.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/formatOptions.ts"],"sourcesContent":["import type { RadioField, SelectField } from 'payload'\n\nimport { formatName } from './formatName.js'\n\nexport const formatOptions = (field: RadioField | SelectField) => {\n return field.options.reduce((values, option) => {\n if (typeof option === 'object') {\n return {\n ...values,\n [formatName(option.value)]: {\n value: option.value,\n },\n }\n }\n\n return {\n ...values,\n [formatName(option)]: {\n value: option,\n },\n }\n }, {})\n}\n"],"names":["formatName","formatOptions","field","options","reduce","values","option","value"],"mappings":"AAEA,SAASA,UAAU,QAAQ,kBAAiB;AAE5C,OAAO,MAAMC,gBAAgB,CAACC;IAC5B,OAAOA,MAAMC,OAAO,CAACC,MAAM,CAAC,CAACC,QAAQC;QACnC,IAAI,OAAOA,WAAW,UAAU;YAC9B,OAAO;gBACL,GAAGD,MAAM;gBACT,CAACL,WAAWM,OAAOC,KAAK,EAAE,EAAE;oBAC1BA,OAAOD,OAAOC,KAAK;gBACrB;YACF;QACF;QAEA,OAAO;YACL,GAAGF,MAAM;YACT,CAACL,WAAWM,QAAQ,EAAE;gBACpBC,OAAOD;YACT;QACF;IACF,GAAG,CAAC;AACN,EAAC"}

View File

@@ -0,0 +1,134 @@
'use strict'
const nocolor = input => input
const plain = {
default: nocolor,
60: nocolor,
50: nocolor,
40: nocolor,
30: nocolor,
20: nocolor,
10: nocolor,
message: nocolor,
greyMessage: nocolor,
property: nocolor
}
const { createColors } = require('colorette')
const getLevelLabelData = require('./utils/get-level-label-data')
const availableColors = createColors({ useColor: true })
const { white, bgRed, red, yellow, green, blue, gray, cyan, magenta } = availableColors
const colored = {
default: white,
60: bgRed,
50: red,
40: yellow,
30: green,
20: blue,
10: gray,
message: cyan,
greyMessage: gray,
property: magenta
}
function resolveCustomColoredColorizer (customColors) {
return customColors.reduce(
function (agg, [level, color]) {
agg[level] = typeof availableColors[color] === 'function' ? availableColors[color] : white
return agg
},
{ default: white, message: cyan, greyMessage: gray, property: magenta }
)
}
function colorizeLevel (useOnlyCustomProps) {
return function (level, colorizer, { customLevels, customLevelNames } = {}) {
const [levelStr, levelNum] = getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames)(level)
return Object.prototype.hasOwnProperty.call(colorizer, levelNum) ? colorizer[levelNum](levelStr) : colorizer.default(levelStr)
}
}
function plainColorizer (useOnlyCustomProps) {
const newPlainColorizer = colorizeLevel(useOnlyCustomProps)
const customColoredColorizer = function (level, opts) {
return newPlainColorizer(level, plain, opts)
}
customColoredColorizer.message = plain.message
customColoredColorizer.greyMessage = plain.greyMessage
customColoredColorizer.property = plain.property
customColoredColorizer.colors = createColors({ useColor: false })
return customColoredColorizer
}
function coloredColorizer (useOnlyCustomProps) {
const newColoredColorizer = colorizeLevel(useOnlyCustomProps)
const customColoredColorizer = function (level, opts) {
return newColoredColorizer(level, colored, opts)
}
customColoredColorizer.message = colored.message
customColoredColorizer.property = colored.property
customColoredColorizer.greyMessage = colored.greyMessage
customColoredColorizer.colors = availableColors
return customColoredColorizer
}
function customColoredColorizerFactory (customColors, useOnlyCustomProps) {
const onlyCustomColored = resolveCustomColoredColorizer(customColors)
const customColored = useOnlyCustomProps ? onlyCustomColored : Object.assign({}, colored, onlyCustomColored)
const colorizeLevelCustom = colorizeLevel(useOnlyCustomProps)
const customColoredColorizer = function (level, opts) {
return colorizeLevelCustom(level, customColored, opts)
}
customColoredColorizer.colors = availableColors
customColoredColorizer.message = customColoredColorizer.message || customColored.message
customColoredColorizer.property = customColoredColorizer.property || customColored.property
customColoredColorizer.greyMessage = customColoredColorizer.greyMessage || customColored.greyMessage
return customColoredColorizer
}
/**
* Applies colorization, if possible, to a string representing the passed in
* `level`. For example, the default colorizer will return a "green" colored
* string for the "info" level.
*
* @typedef {function} ColorizerFunc
* @param {string|number} level In either case, the input will map to a color
* for the specified level or to the color for `USERLVL` if the level is not
* recognized.
* @property {function} message Accepts one string parameter that will be
* colorized to a predefined color.
* @property {Colorette.Colorette} colors Available color functions based on `useColor` (or `colorize`) context
*/
/**
* Factory function get a function to colorized levels. The returned function
* also includes a `.message(str)` method to colorize strings.
*
* @param {boolean} [useColors=false] When `true` a function that applies standard
* terminal colors is returned.
* @param {array[]} [customColors] Tuple where first item of each array is the
* level index and the second item is the color
* @param {boolean} [useOnlyCustomProps] When `true`, only use the provided
* custom colors provided and not fallback to default
*
* @returns {ColorizerFunc} `function (level) {}` has a `.message(str)` method to
* apply colorization to a string. The core function accepts either an integer
* `level` or a `string` level. The integer level will map to a known level
* string or to `USERLVL` if not known. The string `level` will map to the same
* colors as the integer `level` and will also default to `USERLVL` if the given
* string is not a recognized level name.
*/
module.exports = function getColorizer (useColors = false, customColors, useOnlyCustomProps) {
if (useColors && customColors !== undefined) {
return customColoredColorizerFactory(customColors, useOnlyCustomProps)
} else if (useColors) {
return coloredColorizer(useOnlyCustomProps)
}
return plainColorizer(useOnlyCustomProps)
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P"},C:{"2":"0 1 2 3 4 5 6 7 8 9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 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"},D:{"1":"0 1 2 3 4 5 6 7 8 IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC","132":"GC HC"},E:{"2":"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 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB 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 JD KD LD MD PC xC ND QC"},G:{"2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"2":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB yD zD 0D 1D 2D SC TC UC 3D","2":"J tD uD vD wD xD cC"},Q:{"1":"4D"},R:{"1":"5D"},S:{"2":"6D 7D"}},B:6,C:"Signed HTTP Exchanges (SXG)",D:true};

View File

@@ -0,0 +1,17 @@
/**
* @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 SquareUserRound = createLucideIcon("SquareUserRound", [
["path", { d: "M18 21a6 6 0 0 0-12 0", key: "kaz2du" }],
["circle", { cx: "12", cy: "11", r: "4", key: "1gt34v" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { SquareUserRound as default };
//# sourceMappingURL=square-user-round.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/TrashBanner/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAiB/B,CAAA"}

View File

@@ -0,0 +1,40 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { generateExpiredPayloadCookie } from '../cookies.js';
import { logoutOperation } from '../operations/logout.js';
export const logoutHandler = async (req)=>{
const collection = getRequestCollection(req);
const { searchParams, t } = req;
const result = await logoutOperation({
allSessions: searchParams.get('allSessions') === 'true',
collection,
req
});
const headers = headersWithCors({
headers: new Headers(),
req
});
if (!result) {
return Response.json({
message: t('error:logoutFailed')
}, {
headers,
status: httpStatus.BAD_REQUEST
});
}
const expiredCookie = generateExpiredPayloadCookie({
collectionAuthConfig: collection.config.auth,
config: req.payload.config,
cookiePrefix: req.payload.config.cookiePrefix
});
headers.set('Set-Cookie', expiredCookie);
return Response.json({
message: t('authentication:logoutSuccessful')
}, {
headers,
status: httpStatus.OK
});
};
//# sourceMappingURL=logout.js.map

View File

@@ -0,0 +1,134 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var lexical = require('lexical');
var react = require('react');
var jsxRuntime = require('react/jsx-runtime');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? react.useLayoutEffect : react.useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const HISTORY_MERGE_OPTIONS = {
tag: lexical.HISTORY_MERGE_TAG
};
function LexicalComposer({
initialConfig,
children
}) {
const composerContext = react.useMemo(() => {
const {
theme,
namespace,
nodes,
onError,
editorState: initialEditorState,
html
} = initialConfig;
const context = LexicalComposerContext.createLexicalComposerContext(null, theme);
const editor = lexical.createEditor({
editable: initialConfig.editable,
html,
namespace,
nodes,
onError: error => onError(error, editor),
theme
});
initializeEditor(editor, initialEditorState);
return [editor, context];
},
// We only do this for init
// eslint-disable-next-line react-hooks/exhaustive-deps
[]);
useLayoutEffectImpl(() => {
const isEditable = initialConfig.editable;
const [editor] = composerContext;
editor.setEditable(isEditable !== undefined ? isEditable : true);
// We only do this for init
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return /*#__PURE__*/jsxRuntime.jsx(LexicalComposerContext.LexicalComposerContext.Provider, {
value: composerContext,
children: children
});
}
function initializeEditor(editor, initialEditorState) {
if (initialEditorState === null) {
return;
} else if (initialEditorState === undefined) {
editor.update(() => {
const root = lexical.$getRoot();
if (root.isEmpty()) {
const paragraph = lexical.$createParagraphNode();
root.append(paragraph);
const activeElement = CAN_USE_DOM ? document.activeElement : null;
if (lexical.$getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {
paragraph.select();
}
}
}, HISTORY_MERGE_OPTIONS);
} else if (initialEditorState !== null) {
switch (typeof initialEditorState) {
case 'string':
{
const parsedEditorState = editor.parseEditorState(initialEditorState);
editor.setEditorState(parsedEditorState, HISTORY_MERGE_OPTIONS);
break;
}
case 'object':
{
editor.setEditorState(initialEditorState, HISTORY_MERGE_OPTIONS);
break;
}
case 'function':
{
editor.update(() => {
const root = lexical.$getRoot();
if (root.isEmpty()) {
initialEditorState(editor);
}
}, HISTORY_MERGE_OPTIONS);
break;
}
}
}
}
exports.LexicalComposer = LexicalComposer;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').forEachLimit;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/uploads/fetchAPI-multipart/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAqBnD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACpE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,8BAA8B,GAAG;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAA;CACtD,CAAA;AAED,KAAK,kBAAkB,GAAG,CAAC,IAAI,EAAE;IAC/B,OAAO,CAAC,EAAE,yBAAyB,CAAA;IACnC,OAAO,EAAE,OAAO,CAAA;CACjB,KAAK,OAAO,CAAC,0BAA0B,CAAC,CAAA;AAEzC,eAAO,MAAM,wBAAwB,EAAE,kBAiBtC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"NestProviders.js","names":["RenderServerComponent","React","NestProviders","children","importMap","providers","serverProps","clientProps","length","_jsx","slice","Component"],"sources":["../../../src/layouts/Root/NestProviders.tsx"],"sourcesContent":["import type { Config, ImportMap, ServerProps } from 'payload'\n\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport '@payloadcms/ui/scss/app.scss'\nimport React from 'react'\n\ntype Args = {\n readonly children: React.ReactNode\n readonly importMap: ImportMap\n readonly providers: Config['admin']['components']['providers']\n readonly serverProps: ServerProps\n}\n\nexport function NestProviders({\n children,\n importMap,\n providers,\n serverProps,\n}: Args): React.ReactNode {\n return RenderServerComponent({\n clientProps: {\n children:\n providers.length > 1 ? (\n <NestProviders\n importMap={importMap}\n providers={providers.slice(1)}\n serverProps={serverProps}\n >\n {children}\n </NestProviders>\n ) : (\n children\n ),\n },\n Component: providers[0],\n importMap,\n serverProps,\n })\n}\n"],"mappings":";AAEA,SAASA,qBAAqB,QAAQ;AAEtC,OAAOC,KAAA,MAAW;AASlB,OAAO,SAASC,cAAc;EAC5BC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC;AAAW,CACN;EACL,OAAON,qBAAA,CAAsB;IAC3BO,WAAA,EAAa;MACXJ,QAAA,EACEE,SAAA,CAAUG,MAAM,GAAG,iBACjBC,IAAA,CAACP,aAAA;QACCE,SAAA,EAAWA,SAAA;QACXC,SAAA,EAAWA,SAAA,CAAUK,KAAK,CAAC;QAC3BJ,WAAA,EAAaA,WAAA;kBAEZH;WAGHA;IAEN;IACAQ,SAAA,EAAWN,SAAS,CAAC,EAAE;IACvBD,SAAA;IACAE;EACF;AACF","ignoreList":[]}

View File

@@ -0,0 +1,22 @@
import { TraceState } from '../trace_state';
/**
* 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 TraceStateImpl implements TraceState {
private _internalState;
constructor(rawTraceState?: string);
set(key: string, value: string): TraceStateImpl;
unset(key: string): TraceStateImpl;
get(key: string): string | undefined;
serialize(): string;
private _parse;
private _keys;
private _clone;
}
//# sourceMappingURL=tracestate-impl.d.ts.map

View File

@@ -0,0 +1,8 @@
import { ElementContainer } from '../element-container';
import { Context } from '../../core/context';
export declare class CanvasElementContainer extends ElementContainer {
canvas: HTMLCanvasElement;
intrinsicWidth: number;
intrinsicHeight: number;
constructor(context: Context, canvas: HTMLCanvasElement);
}

View File

@@ -0,0 +1,46 @@
import { getCurrentScope } from './currentScopes.js';
import { DEBUG_BUILD } from './debug-build.js';
import { debug, consoleSandbox } from './utils/debug-logger.js';
/** A class object that can instantiate Client objects. */
/**
* Internal function to create a new SDK client instance. The client is
* installed and then bound to the current scope.
*
* @param clientClass The client class to instantiate.
* @param options Options to pass to the client.
*/
function initAndBind(
clientClass,
options,
) {
if (options.debug === true) {
if (DEBUG_BUILD) {
debug.enable();
} else {
// use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
});
}
}
const scope = getCurrentScope();
scope.update(options.initialScope);
const client = new clientClass(options);
setCurrentClient(client);
client.init();
return client;
}
/**
* Make the given client the current client.
*/
function setCurrentClient(client) {
getCurrentScope().setClient(client);
}
export { initAndBind, setCurrentClient };
//# sourceMappingURL=sdk.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"stripUnselectedFields.d.ts","sourceRoot":"","sources":["../../src/utilities/stripUnselectedFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAI/D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,+CAK/B;IACD,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,MAAM,EAAE,UAAU,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,IAAI,CAAA;CACjB,KAAG,OAoBH,CAAA"}

View File

@@ -0,0 +1,17 @@
import type { Transform } from '@dnd-kit/utilities';
import type { Active, Over } from '../store';
import type { ClientRect } from '../types';
export declare type Modifier = (args: {
activatorEvent: Event | null;
active: Active | null;
activeNodeRect: ClientRect | null;
draggingNodeRect: ClientRect | null;
containerNodeRect: ClientRect | null;
over: Over | null;
overlayNodeRect: ClientRect | null;
scrollableAncestors: Element[];
scrollableAncestorRects: ClientRect[];
transform: Transform;
windowRect: ClientRect | null;
}) => Transform;
export declare type Modifiers = Modifier[];

View File

@@ -0,0 +1 @@
{"version":3,"file":"piiFiltering.js","sources":["../../../../src/integrations/mcp-server/piiFiltering.ts"],"sourcesContent":["/**\n * PII filtering for MCP server spans\n *\n * Removes network-level sensitive data when sendDefaultPii is false.\n * Input/output data (request arguments, tool/prompt results) is controlled\n * separately via recordInputs/recordOutputs options.\n */\nimport type { SpanAttributeValue } from '../../types-hoist/span';\nimport { CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE } from './attributes';\n\n/**\n * Network PII attributes that should be removed when sendDefaultPii is false\n * @internal\n */\nconst NETWORK_PII_ATTRIBUTES = new Set([CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE]);\n\n/**\n * Checks if an attribute key should be considered network PII.\n *\n * Returns true for:\n * - client.address (IP address)\n * - client.port (port number)\n * - mcp.resource.uri (potentially sensitive URIs)\n *\n * @param key - Attribute key to evaluate\n * @returns true if the attribute should be filtered out (is network PII), false if it should be preserved\n * @internal\n */\nfunction isNetworkPiiAttribute(key: string): boolean {\n return NETWORK_PII_ATTRIBUTES.has(key);\n}\n\n/**\n * Removes network PII attributes from span data when sendDefaultPii is false\n * @param spanData - Raw span attributes\n * @param sendDefaultPii - Whether to include PII data\n * @returns Filtered span attributes\n */\nexport function filterMcpPiiFromSpanData(\n spanData: Record<string, unknown>,\n sendDefaultPii: boolean,\n): Record<string, SpanAttributeValue> {\n if (sendDefaultPii) {\n return spanData as Record<string, SpanAttributeValue>;\n }\n\n return Object.entries(spanData).reduce(\n (acc, [key, value]) => {\n if (!isNetworkPiiAttribute(key)) {\n acc[key] = value as SpanAttributeValue;\n }\n return acc;\n },\n {} as Record<string, SpanAttributeValue>,\n );\n}\n"],"names":["CLIENT_ADDRESS_ATTRIBUTE","CLIENT_PORT_ATTRIBUTE","MCP_RESOURCE_URI_ATTRIBUTE"],"mappings":";;;;AAUA;AACA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI,GAAG,CAAC,CAACA,mCAAwB,EAAEC,gCAAqB,EAAEC,qCAA0B,CAAC,CAAC;;AAErH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,GAAG,EAAmB;AACrD,EAAE,OAAO,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB;AACxC,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,EAAsC;AACtC,EAAE,IAAI,cAAc,EAAE;AACtB,IAAI,OAAO,QAAA;AACX,EAAE;;AAEF,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM;AACxC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK;AAC3B,MAAM,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE;AACvC,QAAQ,GAAG,CAAC,GAAG,CAAA,GAAI,KAAA;AACnB,MAAM;AACN,MAAM,OAAO,GAAG;AAChB,IAAI,CAAC;AACL,IAAI,EAAC;AACL,GAAG;AACH;;;;"}

View File

@@ -0,0 +1,725 @@
declare module "Tokens" {
export type Token = (Tokens.Space | Tokens.Code | Tokens.Heading | Tokens.Table | Tokens.Hr | Tokens.Blockquote | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.HTML | Tokens.Text | Tokens.Def | Tokens.Escape | Tokens.Tag | Tokens.Image | Tokens.Link | Tokens.Strong | Tokens.Em | Tokens.Codespan | Tokens.Br | Tokens.Del | Tokens.Generic);
export namespace Tokens {
interface Space {
type: 'space';
raw: string;
}
interface Code {
type: 'code';
raw: string;
codeBlockStyle?: 'indented' | undefined;
lang?: string | undefined;
text: string;
escaped?: boolean;
}
interface Heading {
type: 'heading';
raw: string;
depth: number;
text: string;
tokens: Token[];
}
interface Table {
type: 'table';
raw: string;
align: Array<'center' | 'left' | 'right' | null>;
header: TableCell[];
rows: TableCell[][];
}
interface TableCell {
text: string;
tokens: Token[];
}
interface Hr {
type: 'hr';
raw: string;
}
interface Blockquote {
type: 'blockquote';
raw: string;
text: string;
tokens: Token[];
}
interface List {
type: 'list';
raw: string;
ordered: boolean;
start: number | '';
loose: boolean;
items: ListItem[];
}
interface ListItem {
type: 'list_item';
raw: string;
task: boolean;
checked?: boolean | undefined;
loose: boolean;
text: string;
tokens: Token[];
}
interface Paragraph {
type: 'paragraph';
raw: string;
pre?: boolean | undefined;
text: string;
tokens: Token[];
}
interface HTML {
type: 'html';
raw: string;
pre: boolean;
text: string;
block: boolean;
}
interface Text {
type: 'text';
raw: string;
text: string;
tokens?: Token[];
}
interface Def {
type: 'def';
raw: string;
tag: string;
href: string;
title: string;
}
interface Escape {
type: 'escape';
raw: string;
text: string;
}
interface Tag {
type: 'text' | 'html';
raw: string;
inLink: boolean;
inRawBlock: boolean;
text: string;
block: boolean;
}
interface Link {
type: 'link';
raw: string;
href: string;
title?: string | null;
text: string;
tokens: Token[];
}
interface Image {
type: 'image';
raw: string;
href: string;
title: string | null;
text: string;
}
interface Strong {
type: 'strong';
raw: string;
text: string;
tokens: Token[];
}
interface Em {
type: 'em';
raw: string;
text: string;
tokens: Token[];
}
interface Codespan {
type: 'codespan';
raw: string;
text: string;
}
interface Br {
type: 'br';
raw: string;
}
interface Del {
type: 'del';
raw: string;
text: string;
tokens: Token[];
}
interface Generic {
[index: string]: any;
type: string;
raw: string;
tokens?: Token[] | undefined;
}
}
export type Links = Record<string, Pick<Tokens.Link | Tokens.Image, 'href' | 'title'>>;
export type TokensList = Token[] & {
links: Links;
};
}
declare module "Tokenizer" {
import type { _Lexer } from "Lexer";
import type { Links, Tokens } from "Tokens";
import type { MarkedOptions } from "MarkedOptions";
/**
* Tokenizer
*/
export class _Tokenizer {
options: MarkedOptions;
rules: any;
lexer: _Lexer;
constructor(options?: MarkedOptions);
space(src: string): Tokens.Space | undefined;
code(src: string): Tokens.Code | undefined;
fences(src: string): Tokens.Code | undefined;
heading(src: string): Tokens.Heading | undefined;
hr(src: string): Tokens.Hr | undefined;
blockquote(src: string): Tokens.Blockquote | undefined;
list(src: string): Tokens.List | undefined;
html(src: string): Tokens.HTML | Tokens.Paragraph | undefined;
def(src: string): Tokens.Def | undefined;
table(src: string): Tokens.Table | undefined;
lheading(src: string): Tokens.Heading | undefined;
paragraph(src: string): Tokens.Paragraph | undefined;
text(src: string): Tokens.Text | undefined;
escape(src: string): Tokens.Escape | undefined;
tag(src: string): Tokens.Tag | undefined;
link(src: string): Tokens.Link | Tokens.Image | undefined;
reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
codespan(src: string): Tokens.Codespan | undefined;
br(src: string): Tokens.Br | undefined;
del(src: string): Tokens.Del | undefined;
autolink(src: string, mangle: (cap: string) => string): Tokens.Link | undefined;
url(src: string, mangle: (cap: string) => string): Tokens.Link | undefined;
inlineText(src: string, smartypants: (cap: string) => string): Tokens.Text | undefined;
}
}
declare module "rules" {
export type Rule = RegExp | string;
export interface Rules {
[ruleName: string]: Pick<RegExp, 'exec'> | Rule | Rules;
}
type BlockRuleNames = 'newline' | 'code' | 'fences' | 'hr' | 'heading' | 'blockquote' | 'list' | 'html' | 'def' | 'lheading' | '_paragraph' | 'text' | '_label' | '_title' | 'bullet' | 'listItemStart' | '_tag' | '_comment' | 'paragraph' | 'uote';
type BlockSubRuleNames = 'normal' | 'gfm' | 'pedantic';
type InlineRuleNames = 'escape' | 'autolink' | 'tag' | 'link' | 'reflink' | 'nolink' | 'reflinkSearch' | 'code' | 'br' | 'text' | '_punctuation' | 'punctuation' | 'blockSkip' | 'escapedEmSt' | '_comment' | '_escapes' | '_scheme' | '_email' | '_attribute' | '_label' | '_href' | '_title' | 'strong' | '_extended_email' | '_backpedal';
type InlineSubRuleNames = 'gfm' | 'emStrong' | 'normal' | 'pedantic' | 'breaks';
/**
* Block-Level Grammar
*/
export const block: Record<BlockRuleNames, Rule> & Record<BlockSubRuleNames, Rules> & Rules;
/**
* Inline-Level Grammar
*/
export const inline: Record<InlineRuleNames, Rule> & Record<InlineSubRuleNames, Rules> & Rules;
}
declare module "Lexer" {
import type { Token, TokensList } from "Tokens";
import type { MarkedOptions } from "MarkedOptions";
import type { Rules } from "rules";
/**
* Block Lexer
*/
export class _Lexer {
tokens: TokensList;
options: MarkedOptions;
state: {
inLink: boolean;
inRawBlock: boolean;
top: boolean;
};
private tokenizer;
private inlineQueue;
constructor(options?: MarkedOptions);
/**
* Expose Rules
*/
static get rules(): Rules;
/**
* Static Lex Method
*/
static lex(src: string, options?: MarkedOptions): TokensList;
/**
* Static Lex Inline Method
*/
static lexInline(src: string, options?: MarkedOptions): Token[];
/**
* Preprocessing
*/
lex(src: string): TokensList;
/**
* Lexing
*/
blockTokens(src: string, tokens?: Token[]): Token[];
blockTokens(src: string, tokens?: TokensList): TokensList;
inline(src: string, tokens?: Token[]): Token[];
/**
* Lexing/Compiling
*/
inlineTokens(src: string, tokens?: Token[]): Token[];
}
}
declare module "TextRenderer" {
/**
* TextRenderer
* returns only the textual part of the token
*/
export class _TextRenderer {
strong(text: string): string;
em(text: string): string;
codespan(text: string): string;
del(text: string): string;
html(text: string): string;
text(text: string): string;
link(href: string, title: string | null | undefined, text: string): string;
image(href: string, title: string | null, text: string): string;
br(): string;
}
}
declare module "Slugger" {
import type { SluggerOptions } from "MarkedOptions";
/**
* Slugger generates header id
*/
export class _Slugger {
seen: {
[slugValue: string]: number;
};
constructor();
serialize(value: string): string;
/**
* Finds the next safe (unique) slug to use
*/
getNextSafeSlug(originalSlug: string, isDryRun: boolean | undefined): string;
/**
* Convert string to unique id
*/
slug(value: string, options?: SluggerOptions): string;
}
}
declare module "Instance" {
import { _Lexer } from "Lexer";
import { _Parser } from "Parser";
import { _Hooks } from "Hooks";
import { _Renderer } from "Renderer";
import { _Tokenizer } from "Tokenizer";
import { _TextRenderer } from "TextRenderer";
import { _Slugger } from "Slugger";
import type { MarkedExtension, MarkedOptions } from "MarkedOptions";
import type { Token, TokensList } from "Tokens";
export type ResultCallback = (error: Error | null, parseResult?: string) => undefined | void;
export class Marked {
#private;
defaults: MarkedOptions;
options: (opt: MarkedOptions) => this;
parse: (src: string, optOrCallback?: MarkedOptions | ResultCallback | undefined | null, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined;
parseInline: (src: string, optOrCallback?: MarkedOptions | ResultCallback | undefined | null, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined;
Parser: typeof _Parser;
parser: typeof _Parser.parse;
Renderer: typeof _Renderer;
TextRenderer: typeof _TextRenderer;
Lexer: typeof _Lexer;
lexer: typeof _Lexer.lex;
Tokenizer: typeof _Tokenizer;
Slugger: typeof _Slugger;
Hooks: typeof _Hooks;
constructor(...args: MarkedExtension[]);
/**
* Run callback for every token
*/
walkTokens<T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]): T[];
use(...args: MarkedExtension[]): this;
setOptions(opt: MarkedOptions): this;
}
}
declare module "helpers" {
import type { MarkedOptions } from "MarkedOptions";
import type { ResultCallback } from "Instance";
import type { Rule } from "rules";
export function escape(html: string, encode?: boolean): string;
export function unescape(html: string): string;
export function edit(regex: Rule, opt?: string): {
replace: (name: string | RegExp, val: string | RegExp) => any;
getRegex: () => RegExp;
};
export function cleanUrl(sanitize: boolean | undefined, base: string | undefined | null, href: string): string | null;
export function resolveUrl(base: string, href: string): string;
export const noopTest: {
exec: () => null;
};
export function splitCells(tableRow: string, count?: number): string[];
/**
* Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').
* /c*$/ is vulnerable to REDOS.
*
* @param str
* @param c
* @param invert Remove suffix of non-c chars instead. Default falsey.
*/
export function rtrim(str: string, c: string, invert?: boolean): string;
export function findClosingBracket(str: string, b: string): number;
export function checkDeprecations(opt: MarkedOptions, callback?: ResultCallback): void;
}
declare module "Renderer" {
import type { MarkedOptions } from "MarkedOptions";
import type { _Slugger } from "Slugger";
/**
* Renderer
*/
export class _Renderer {
options: MarkedOptions;
constructor(options?: MarkedOptions);
code(code: string, infostring: string | undefined, escaped: boolean): string;
blockquote(quote: string): string;
html(html: string, block?: boolean): string;
heading(text: string, level: number, raw: string, slugger: _Slugger): string;
hr(): string;
list(body: string, ordered: boolean, start: number | ''): string;
listitem(text: string, task: boolean, checked: boolean): string;
checkbox(checked: boolean): string;
paragraph(text: string): string;
table(header: string, body: string): string;
tablerow(content: string): string;
tablecell(content: string, flags: {
header: boolean;
align: 'center' | 'left' | 'right' | null;
}): string;
/**
* span level renderer
*/
strong(text: string): string;
em(text: string): string;
codespan(text: string): string;
br(): string;
del(text: string): string;
link(href: string, title: string | null | undefined, text: string): string;
image(href: string, title: string | null, text: string): string;
text(text: string): string;
}
}
declare module "Parser" {
import { _Renderer } from "Renderer";
import { _TextRenderer } from "TextRenderer";
import { _Slugger } from "Slugger";
import type { Token } from "Tokens";
import type { MarkedOptions } from "MarkedOptions";
/**
* Parsing & Compiling
*/
export class _Parser {
options: MarkedOptions;
renderer: _Renderer;
textRenderer: _TextRenderer;
slugger: _Slugger;
constructor(options?: MarkedOptions);
/**
* Static Parse Method
*/
static parse(tokens: Token[], options?: MarkedOptions): string;
/**
* Static Parse Inline Method
*/
static parseInline(tokens: Token[], options?: MarkedOptions): string;
/**
* Parse Loop
*/
parse(tokens: Token[], top?: boolean): string;
/**
* Parse Inline Tokens
*/
parseInline(tokens: Token[], renderer?: _Renderer | _TextRenderer): string;
}
}
declare module "MarkedOptions" {
import type { Token, Tokens, TokensList } from "Tokens";
import type { _Parser } from "Parser";
import type { _Lexer } from "Lexer";
import type { _Renderer } from "Renderer";
import type { _Tokenizer } from "Tokenizer";
export interface SluggerOptions {
/** Generates the next unique slug without updating the internal accumulator. */
dryrun?: boolean;
}
export interface TokenizerThis {
lexer: _Lexer;
}
export type TokenizerExtensionFunction = (this: TokenizerThis, src: string, tokens: Token[] | TokensList) => Tokens.Generic | undefined;
export type TokenizerStartFunction = (this: TokenizerThis, src: string) => number | void;
export interface TokenizerExtension {
name: string;
level: 'block' | 'inline';
start?: TokenizerStartFunction | undefined;
tokenizer: TokenizerExtensionFunction;
childTokens?: string[] | undefined;
}
export interface RendererThis {
parser: _Parser;
}
export type RendererExtensionFunction = (this: RendererThis, token: Tokens.Generic) => string | false | undefined;
export interface RendererExtension {
name: string;
renderer: RendererExtensionFunction;
}
export type TokenizerAndRendererExtension = TokenizerExtension | RendererExtension | (TokenizerExtension & RendererExtension);
type RendererApi = Omit<_Renderer, 'constructor' | 'options'>;
type RendererObject = {
[K in keyof RendererApi]?: (...args: Parameters<RendererApi[K]>) => ReturnType<RendererApi[K]> | false;
};
type TokenizerApi = Omit<_Tokenizer, 'constructor' | 'options' | 'rules' | 'lexer'>;
type TokenizerObject = {
[K in keyof TokenizerApi]?: (...args: Parameters<TokenizerApi[K]>) => ReturnType<TokenizerApi[K]> | false;
};
export interface MarkedExtension {
/**
* True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
*/
async?: boolean;
/**
* A prefix URL for any relative link.
* @deprecated Deprecated in v5.0.0 use marked-base-url to prefix url for any relative link.
*/
baseUrl?: string | undefined | null;
/**
* Enable GFM line breaks. This option requires the gfm option to be true.
*/
breaks?: boolean | undefined;
/**
* Add tokenizers and renderers to marked
*/
extensions?: TokenizerAndRendererExtension[] | undefined | null;
/**
* Enable GitHub flavored markdown.
*/
gfm?: boolean | undefined;
/**
* Include an id attribute when emitting headings.
* @deprecated Deprecated in v5.0.0 use marked-gfm-heading-id to include an id attribute when emitting headings (h1, h2, h3, etc).
*/
headerIds?: boolean | undefined;
/**
* Set the prefix for header tag ids.
* @deprecated Deprecated in v5.0.0 use marked-gfm-heading-id to add a string to prefix the id attribute when emitting headings (h1, h2, h3, etc).
*/
headerPrefix?: string | undefined;
/**
* A function to highlight code blocks. The function can either be
* synchronous (returning a string) or asynchronous (callback invoked
* with an error if any occurred during highlighting and a string
* if highlighting was successful)
* @deprecated Deprecated in v5.0.0 use marked-highlight to add highlighting to code blocks.
*/
highlight?: ((code: string, lang: string | undefined, callback?: (error: Error, code?: string) => void) => string | void) | null;
/**
* Hooks are methods that hook into some part of marked.
* preprocess is called to process markdown before sending it to marked.
* postprocess is called to process html after marked has finished parsing.
*/
hooks?: {
preprocess: (markdown: string) => string | Promise<string>;
postprocess: (html: string) => string | Promise<string>;
options?: MarkedOptions;
} | null;
/**
* Set the prefix for code block classes.
* @deprecated Deprecated in v5.0.0 use marked-highlight to prefix the className in a <code> block. Useful for syntax highlighting.
*/
langPrefix?: string | undefined;
/**
* Mangle autolinks (<email@domain.com>).
* @deprecated Deprecated in v5.0.0 use marked-mangle to mangle email addresses.
*/
mangle?: boolean | undefined;
/**
* Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
*/
pedantic?: boolean | undefined;
/**
* Type: object Default: new Renderer()
*
* An object containing functions to render tokens to HTML.
*/
renderer?: RendererObject | undefined | null;
/**
* Sanitize the output. Ignore any HTML that has been input. If true, sanitize the HTML passed into markdownString with the sanitizer function.
* @deprecated Warning: This feature is deprecated and it should NOT be used as it cannot be considered secure. Instead use a sanitize library, like DOMPurify (recommended), sanitize-html or insane on the output HTML!
*/
sanitize?: boolean | undefined;
/**
* Optionally sanitize found HTML with a sanitizer function.
* @deprecated A function to sanitize the HTML passed into markdownString.
*/
sanitizer?: ((html: string) => string) | null;
/**
* Shows an HTML error message when rendering fails.
*/
silent?: boolean | undefined;
/**
* Use smarter list behavior than the original markdown. May eventually be default with the old behavior moved into pedantic.
*/
smartLists?: boolean | undefined;
/**
* Use "smart" typograhic punctuation for things like quotes and dashes.
* @deprecated Deprecated in v5.0.0 use marked-smartypants to use "smart" typographic punctuation for things like quotes and dashes.
*/
smartypants?: boolean | undefined;
/**
* The tokenizer defines how to turn markdown text into tokens.
*/
tokenizer?: TokenizerObject | undefined | null;
/**
* The walkTokens function gets called with every token.
* Child tokens are called before moving on to sibling tokens.
* Each token is passed by reference so updates are persisted when passed to the parser.
* The return value of the function is ignored.
*/
walkTokens?: ((token: Token) => void | unknown | Promise<void>) | undefined | null;
/**
* Generate closing slash for self-closing tags (<br/> instead of <br>)
* @deprecated Deprecated in v5.0.0 use marked-xhtml to emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.
*/
xhtml?: boolean | undefined;
}
export interface MarkedOptions extends Omit<MarkedExtension, 'renderer' | 'tokenizer' | 'extensions' | 'walkTokens'> {
/**
* Type: object Default: new Renderer()
*
* An object containing functions to render tokens to HTML.
*/
renderer?: _Renderer | undefined | null;
/**
* The tokenizer defines how to turn markdown text into tokens.
*/
tokenizer?: _Tokenizer | undefined | null;
/**
* Custom extensions
*/
extensions?: null | {
renderers: {
[name: string]: RendererExtensionFunction;
};
childTokens: {
[name: string]: string[];
};
inline?: TokenizerExtensionFunction[];
block?: TokenizerExtensionFunction[];
startInline?: TokenizerStartFunction[];
startBlock?: TokenizerStartFunction[];
};
/**
* walkTokens function returns array of values for Promise.all
*/
walkTokens?: null | ((token: Token) => void | (unknown | Promise<void>)[]);
}
}
declare module "defaults" {
import type { MarkedOptions } from "MarkedOptions";
/**
* Gets the original marked default options.
*/
export function _getDefaults(): MarkedOptions;
export let _defaults: MarkedOptions;
export function changeDefaults(newDefaults: MarkedOptions): void;
}
declare module "Hooks" {
import type { MarkedOptions } from "MarkedOptions";
export class _Hooks {
options: MarkedOptions;
constructor(options?: MarkedOptions);
static passThroughHooks: Set<string>;
/**
* Process markdown before marked
*/
preprocess(markdown: string): string;
/**
* Process HTML after marked is finished
*/
postprocess(html: string): string;
}
}
declare module "marked" {
import { _Lexer } from "Lexer";
import { _Parser } from "Parser";
import { _Tokenizer } from "Tokenizer";
import { _Renderer } from "Renderer";
import { _TextRenderer } from "TextRenderer";
import { _Slugger } from "Slugger";
import { _Hooks } from "Hooks";
import { _getDefaults } from "defaults";
import type { MarkedExtension, MarkedOptions } from "MarkedOptions";
import type { Token, TokensList } from "Tokens";
import type { ResultCallback } from "Instance";
/**
* Compiles markdown to HTML asynchronously.
*
* @param src String of markdown source to be compiled
* @param options Hash of options, having async: true
* @return Promise of string of compiled HTML
*/
export function marked(src: string, options: MarkedOptions & {
async: true;
}): Promise<string>;
/**
* Compiles markdown to HTML synchronously.
*
* @param src String of markdown source to be compiled
* @param options Optional hash of options
* @return String of compiled HTML
*/
export function marked(src: string, options?: MarkedOptions): string;
/**
* Compiles markdown to HTML asynchronously with a callback.
*
* @param src String of markdown source to be compiled
* @param callback Function called when the markdownString has been fully parsed when using async highlighting
*/
export function marked(src: string, callback: ResultCallback): void;
/**
* Compiles markdown to HTML asynchronously with a callback.
*
* @param src String of markdown source to be compiled
* @param options Hash of options
* @param callback Function called when the markdownString has been fully parsed when using async highlighting
*/
export function marked(src: string, options: MarkedOptions, callback: ResultCallback): void;
/**
* Compiles markdown to HTML asynchronously with a callback.
*
* @param src String of markdown source to be compiled
* @param options Hash of options
* @param callback Function called when the markdownString has been fully parsed when using async highlighting
*/
export namespace marked {
var options: (options: MarkedOptions) => typeof marked;
var setOptions: (options: MarkedOptions) => typeof marked;
var getDefaults: typeof _getDefaults;
var defaults: MarkedOptions;
var use: (...args: MarkedExtension[]) => typeof marked;
var walkTokens: <T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]) => T[];
var parseInline: (src: string, optOrCallback?: MarkedOptions | ResultCallback | null | undefined, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined;
var Parser: typeof _Parser;
var parser: typeof _Parser.parse;
var Renderer: typeof _Renderer;
var TextRenderer: typeof _TextRenderer;
var Lexer: typeof _Lexer;
var lexer: typeof _Lexer.lex;
var Tokenizer: typeof _Tokenizer;
var Slugger: typeof _Slugger;
var Hooks: typeof _Hooks;
var parse: typeof marked;
}
export const options: (options: MarkedOptions) => typeof marked;
export const setOptions: (options: MarkedOptions) => typeof marked;
export const use: (...args: MarkedExtension[]) => typeof marked;
export const walkTokens: <T = void>(tokens: Token[] | TokensList, callback: (token: Token) => T | T[]) => T[];
export const parseInline: (src: string, optOrCallback?: MarkedOptions | ResultCallback | null | undefined, callback?: ResultCallback | undefined) => string | Promise<string | undefined> | undefined;
export const parse: typeof marked;
export const parser: typeof _Parser.parse;
export const lexer: typeof _Lexer.lex;
export { _defaults as defaults, _getDefaults as getDefaults } from "defaults";
export { _Lexer as Lexer } from "Lexer";
export { _Parser as Parser } from "Parser";
export { _Tokenizer as Tokenizer } from "Tokenizer";
export { _Renderer as Renderer } from "Renderer";
export { _TextRenderer as TextRenderer } from "TextRenderer";
export { _Slugger as Slugger } from "Slugger";
export { _Hooks as Hooks } from "Hooks";
export { Marked } from "Instance";
export type * from "MarkedOptions";
export type * from "rules";
export type * from "Tokens";
}

View File

@@ -0,0 +1,76 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const DllModuleFactory = require("./DllModuleFactory");
const DllEntryDependency = require("./dependencies/DllEntryDependency");
const EntryDependency = require("./dependencies/EntryDependency");
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */
/** @typedef {string[]} Entries */
/** @typedef {EntryOptions & { name: string }} Options */
const PLUGIN_NAME = "DllEntryPlugin";
class DllEntryPlugin {
/**
* @param {string} context context
* @param {Entries} entries entry names
* @param {Options} options options
*/
constructor(context, entries, options) {
this.context = context;
this.entries = entries;
this.options = options;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
const dllModuleFactory = new DllModuleFactory();
compilation.dependencyFactories.set(
DllEntryDependency,
dllModuleFactory
);
compilation.dependencyFactories.set(
EntryDependency,
normalModuleFactory
);
}
);
compiler.hooks.make.tapAsync(PLUGIN_NAME, (compilation, callback) => {
compilation.addEntry(
this.context,
new DllEntryDependency(
this.entries.map((e, idx) => {
const dep = new EntryDependency(e);
dep.loc = {
name: this.options.name,
index: idx
};
return dep;
}),
this.options.name
),
this.options,
(error) => {
if (error) return callback(error);
callback();
}
);
});
}
}
module.exports = DllEntryPlugin;

View File

@@ -0,0 +1,59 @@
🎉️ **NEW**: [date-fns v3 is out!](https://blog.date-fns.org/v3-is-out/)
<img alt="date-fns" title="date-fns" src="https://raw.githubusercontent.com/date-fns/date-fns/master/docs/logotype.svg" width="150" />
date-fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js
👉 [Documentation](https://date-fns.org/)
👉 [Blog](https://blog.date-fns.org/)
<hr>
It's like [Lodash](https://lodash.com) for dates
- It has [**200+ functions** for all occasions](https://date-fns.org/docs/Getting-Started/).
- **Modular**: Pick what you need. Works with webpack, Browserify, or Rollup and also supports tree-shaking.
- **Native dates**: Uses existing native type. It doesn't extend core objects for safety's sake.
- **Immutable & Pure**: Built using pure functions and always returns a new date instance.
- **TypeScript**: The library is 100% TypeScript with brand-new handcrafted types.
- **I18n**: Dozens of locales. Include only what you need.
- [and many more benefits](https://date-fns.org/)
```js
import { compareAsc, format } from "date-fns";
format(new Date(2014, 1, 11), "yyyy-MM-dd");
//=> '2014-02-11'
const dates = [
new Date(1995, 6, 2),
new Date(1987, 1, 11),
new Date(1989, 6, 10),
];
dates.sort(compareAsc);
//=> [
// Wed Feb 11 1987 00:00:00,
// Mon Jul 10 1989 00:00:00,
// Sun Jul 02 1995 00:00:00
// ]
```
The library is available as an [npm package](https://www.npmjs.com/package/date-fns).
To install the package run:
```bash
npm install date-fns --save
```
## Docs
[See date-fns.org](https://date-fns.org/) for more details, API,
and other docs.
<br />
<!-- END OF README-JOB SECTION -->
## License
[MIT © Sasha Koss](https://kossnocorp.mit-license.org/)

View File

@@ -0,0 +1,230 @@
import { APIError, createArrayFromCommaDelineated } from 'payload';
import { fieldAffectsData } from 'payload/shared';
import { validate as uuidValidate } from 'uuid';
import { getCollectionIdType } from '../utilities/getCollectionIdType.js';
import { isPolymorphicRelationship } from '../utilities/isPolymorphicRelationship.js';
import { isRawConstraint } from '../utilities/rawConstraint.js';
export const sanitizeQueryValue = ({ adapter, columns, field, isUUID, operator: operatorArg, relationOrPath, val })=>{
let operator = operatorArg;
let formattedValue = val;
let formattedColumns;
if (!fieldAffectsData(field)) {
return {
operator,
value: formattedValue
};
}
if (isRawConstraint(val)) {
return {
operator,
value: val.value
};
}
if ((field.type === 'relationship' || field.type === 'upload') && !relationOrPath.endsWith('relationTo') && Array.isArray(formattedValue)) {
const allPossibleIDTypes = [];
formattedValue.forEach((val)=>{
if (adapter.idType !== 'uuid' && typeof val === 'string') {
allPossibleIDTypes.push(val, parseInt(val));
} else if (typeof val === 'string') {
allPossibleIDTypes.push(val);
} else {
allPossibleIDTypes.push(val, String(val));
}
});
formattedValue = allPossibleIDTypes;
}
// Cast incoming values as proper searchable types
if (field.type === 'checkbox' && typeof val === 'string') {
if (val.toLowerCase() === 'true') {
formattedValue = true;
}
if (val.toLowerCase() === 'false') {
formattedValue = false;
}
}
if ([
'all',
'in',
'not_in'
].includes(operator)) {
if (typeof formattedValue === 'string') {
formattedValue = createArrayFromCommaDelineated(formattedValue);
if (field.type === 'number') {
formattedValue = formattedValue.map((arrayVal)=>parseFloat(arrayVal));
}
} else if (typeof formattedValue === 'number') {
formattedValue = [
formattedValue
];
}
if (!Array.isArray(formattedValue)) {
return null;
}
}
if (field.type === 'number' && typeof formattedValue === 'string') {
formattedValue = Number(val);
if (Number.isNaN(formattedValue)) {
formattedValue = null;
}
}
if (isUUID && typeof formattedValue === 'string') {
if (!uuidValidate(val)) {
formattedValue = null;
}
}
// Helper function to convert a single date value to ISO string
const convertDateToISO = (item)=>{
if (typeof item === 'string') {
if (item === 'null' || item === '') {
return null;
}
const date = new Date(item);
return Number.isNaN(date.getTime()) ? undefined : date.toISOString();
} else if (typeof item === 'number') {
return new Date(item).toISOString();
} else if (item instanceof Date) {
return item.toISOString();
}
return item;
};
if (field.type === 'date' && operator !== 'exists') {
if (Array.isArray(formattedValue)) {
// Handle arrays of dates for 'in' and 'not_in' operators
formattedValue = formattedValue.map(convertDateToISO).filter((item)=>item !== undefined);
} else {
const converted = convertDateToISO(val);
if (converted === undefined) {
return {
operator,
value: undefined
};
}
formattedValue = converted;
}
}
if (field.type === 'relationship' || field.type === 'upload') {
if (val === 'null') {
formattedValue = null;
} else if (!(formattedValue === null || typeof formattedValue === 'boolean')) {
// convert the value to the idType of the relationship
let idType;
if (typeof field.relationTo === 'string') {
idType = getCollectionIdType({
adapter,
collection: adapter.payload.collections[field.relationTo]
});
} else {
if (isPolymorphicRelationship(val)) {
if (operator !== 'equals') {
throw new APIError(`Only 'equals' operator is supported for polymorphic relationship object notation. Given - ${operator}`);
}
idType = getCollectionIdType({
adapter,
collection: adapter.payload.collections[val.relationTo]
});
if (isRawConstraint(val.value)) {
return {
operator,
value: val.value.value
};
}
return {
operator,
value: idType === 'number' ? Number(val.value) : String(val.value)
};
}
formattedColumns = columns.map(({ idType, rawColumn })=>{
let formattedValue;
if (Array.isArray(val)) {
formattedValue = val.map((eachVal)=>{
let formattedValue;
if (idType === 'number') {
formattedValue = Number(eachVal);
if (Number.isNaN(formattedValue)) {
return null;
}
} else {
if (idType === 'uuid' && !uuidValidate(eachVal)) {
return null;
}
formattedValue = String(eachVal);
}
return formattedValue;
}).filter(Boolean);
} else if (idType === 'number') {
formattedValue = Number(val);
if (Number.isNaN(formattedValue)) {
return null;
}
} else {
formattedValue = String(val);
}
return {
rawColumn,
value: formattedValue
};
}).filter(Boolean);
}
if (Array.isArray(formattedValue)) {
formattedValue = formattedValue.map((value)=>{
if (idType === 'number') {
return Number(value);
}
if (idType === 'text') {
return String(value);
}
return value;
});
} else {
if (idType === 'number') {
formattedValue = Number(val);
}
if (idType === 'text') {
formattedValue = String(val);
}
}
}
}
// For hasMany relationship/upload fields, contains should use equals operator
if ('hasMany' in field && field.hasMany && operator === 'contains' && (field.type === 'relationship' || field.type === 'upload')) {
operator = 'equals';
}
if (operator === 'near' && field.type === 'point' && typeof formattedValue === 'string') {
const [lng, lat, maxDistance, minDistance] = formattedValue.split(',');
formattedValue = [
Number(lng),
Number(lat),
Number(maxDistance),
Number(minDistance)
];
}
if (operator === 'contains') {
// Handle array values for hasMany text/number/select fields
if (Array.isArray(formattedValue) && 'hasMany' in field && field.hasMany && [
'number',
'select',
'text'
].includes(field.type)) {
// For hasMany text/number/select fields with array values, wrap each element with % for LIKE matching
formattedValue = formattedValue.map((val)=>`%${val}%`);
} else if (!Array.isArray(formattedValue)) {
// For non-array values, wrap with % for LIKE matching
formattedValue = `%${formattedValue}%`;
}
}
if (operator === 'exists') {
formattedValue = val === 'true' || val === true;
if (formattedValue) {
operator = 'exists';
} else {
operator = 'isNull';
}
}
return {
columns: formattedColumns,
operator,
value: formattedValue
};
};
//# sourceMappingURL=sanitizeQueryValue.js.map

View File

@@ -0,0 +1,53 @@
import type { StackFrame } from '../types-hoist/stackframe';
type StackFrameIteratee = (frame: StackFrame) => StackFrame;
interface RewriteFramesOptions {
/**
* Root path (the beginning of the path) that will be stripped from the frames' filename.
*
* This option has slightly different behaviour in the browser and on servers:
* - In the browser, the value you provide in `root` will be stripped from the beginning stack frames' paths (if the path started with the value).
* - On the server, the root value will only replace the beginning of stack frame filepaths, when the path is absolute. If no `root` value is provided and the path is absolute, the frame will be reduced to only the filename and the provided `prefix` option.
*
* Browser example:
* - Original frame: `'http://example.com/my/path/static/asset.js'`
* - `root: 'http://example.com/my/path'`
* - `assetPrefix: 'app://'`
* - Resulting frame: `'app:///static/asset.js'`
*
* Server example:
* - Original frame: `'/User/local/my/path/static/asset.js'`
* - `root: '/User/local/my/path'`
* - `assetPrefix: 'app://'`
* - Resulting frame: `'app:///static/asset.js'`
*/
root?: string;
/**
* A custom prefix that stack frames will be prepended with.
*
* Default: `'app://'`
*
* This option has slightly different behaviour in the browser and on servers:
* - In the browser, the value you provide in `prefix` will prefix the resulting filename when the value you provided in `root` was applied. Effectively replacing whatever `root` matched in the beginning of the frame with `prefix`.
* - On the server, the prefix is applied to all stackframes with absolute paths. On Windows, the drive identifier (e.g. "C://") is replaced with the prefix.
*/
prefix?: string;
/**
* Defines an iterator that is used to iterate through all of the stack frames for modification before being sent to Sentry.
* Setting this option will effectively disable both the `root` and the `prefix` options.
*/
iteratee?: StackFrameIteratee;
}
/**
* Rewrite event frames paths.
*/
export declare const rewriteFramesIntegration: (options?: RewriteFramesOptions | undefined) => import("..").Integration;
/**
* Exported only for tests.
*/
export declare function generateIteratee({ isBrowser, root, prefix, }: {
isBrowser: boolean;
root?: string;
prefix: string;
}): StackFrameIteratee;
export {};
//# sourceMappingURL=rewriteframes.d.ts.map

View File

@@ -0,0 +1,3 @@
import type { EmailAdapter } from './types.js';
export declare const consoleEmailAdapter: EmailAdapter<void>;
//# sourceMappingURL=consoleEmailAdapter.d.ts.map

View File

@@ -0,0 +1,38 @@
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
// We need to be careful not to inject anything before any `"use strict";`s or "use client"s or really any other directive.
// As an additional complication directives may come after any number of comments.
// This regex is shamelessly stolen from: https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/7f984482c73e4284e8b12a08dfedf23b5a82f0af/packages/bundler-plugin-core/src/index.ts#L535-L539
const SKIP_COMMENT_AND_DIRECTIVE_REGEX =
// Note: CodeQL complains that this regex potentially has n^2 runtime. This likely won't affect realistic files.
new RegExp('^(?:\\s*|/\\*(?:.|\\r|\\n)*?\\*/|//.*[\\n\\r])*(?:"[^"]*";?|\'[^\']*\';?)?');
/**
* Set values on the global/window object at the start of a module.
*
* Options:
* - `values`: An object where the keys correspond to the keys of the global values to set and the values
* correspond to the values of the values on the global object. Values must be JSON serializable.
*/
function valueInjectionLoader( userCode) {
// We know one or the other will be defined, depending on the version of webpack being used
const { values } = 'getOptions' in this ? this.getOptions() : this.query;
// We do not want to cache injected values across builds
this.cacheable(false);
// Not putting any newlines in the generated code will decrease the likelihood of sourcemaps breaking
const injectedCode =
// eslint-disable-next-line prefer-template
';' +
Object.entries(values)
.map(([key, value]) => `globalThis["${key}"] = ${JSON.stringify(value)};`)
.join('');
return userCode.replace(SKIP_COMMENT_AND_DIRECTIVE_REGEX, match => {
return match + injectedCode;
});
}
exports.default = valueInjectionLoader;
//# sourceMappingURL=valueInjectionLoader.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../src/fields/validations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,WAAW,EACX,aAAa,EACb,SAAS,EACT,WAAW,EACX,QAAQ,EAET,MAAM,mBAAmB,CAAA;AAK1B,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAE/E,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAErF,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAErF,eAAO,MAAM,IAAI,EAAE,mBA0DlB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAEnF,eAAO,MAAM,QAAQ,EAAE,uBAkCtB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,QAAQ,CACnD,MAAM,EACN,OAAO,EACP;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,EACpB,SAAS,CACV,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,8BAa7B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,UAAU,CAAC,CAAA;AAE/F,eAAO,MAAM,KAAK,EAAE,oBA6CnB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,SAAS,CAAC,CAAA;AAE9F,eAAO,MAAM,QAAQ,EAAE,uBA2CtB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAA;AAEvF,eAAO,MAAM,QAAQ,EAAE,uBAiCtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAE/E,eAAO,MAAM,IAAI,EAAE,mBAMlB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,MAAM,EACN,OAAO,EACP,OAAO,EACP;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CACnC,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,mBAoElB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAA;AAExF,eAAO,MAAM,QAAQ,EAAE,uBAMtB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;AAE7E,eAAO,MAAM,IAAI,EAAE,mBA8BlB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAA;AAEvF,eAAO,MAAM,QAAQ,EAAE,uBAWtB,CAAA;AAkCD,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAE9F,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEzF,eAAO,MAAM,MAAM,EAAE,qBAwCpB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;AAEpF,eAAO,MAAM,KAAK,EAAE,oBAEnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEpF;;;;;;GAMG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,EAAE,EACF,IAAI,EACJ,aAAa,EACb,GAAG,EACH,WAAW,EACX,KAAK,GACN,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,IAAI,CACvD,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EACpC,MAAM,GAAG,eAAe,GAAG,IAAI,GAAG,KAAK,GAAG,aAAa,CACxD,GAAG,OAAO,CAAC;IACV;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IACvC;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACxC,CAAC,CAuCD;AACD,eAAO,MAAM,MAAM,EAAE,qBAwBpB,CAAA;AAyID,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEpF,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAE1F,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAE1F,eAAO,MAAM,MAAM,EAAE,qBAgFpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAChD,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,iBAAiB,CAClB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG,QAAQ,CACpD,qBAAqB,EACrB,OAAO,EACP,OAAO,EACP,iBAAiB,CAClB,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG,QAAQ,CACtD,uBAAuB,EACvB,OAAO,EACP,OAAO,EACP,iBAAiB,CAClB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,2BAgF1B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAE9F,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEzF,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;AAEzF,eAAO,MAAM,MAAM,EAAE,qBAsEpB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAA;AAElF,eAAO,MAAM,KAAK,EAAE,oBASnB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC;IAAC,MAAM,GAAG,MAAM;IAAE,MAAM,GAAG,MAAM;CAAC,EAClC,OAAO,EACP,OAAO,EACP,UAAU,CACX,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,oBAoCnB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAmBvB,CAAA"}

View File

@@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgBooleanBuilder extends PgColumnBuilder {
static [entityKind] = "PgBooleanBuilder";
constructor(name) {
super(name, "boolean", "PgBoolean");
}
/** @internal */
build(table) {
return new PgBoolean(table, this.config);
}
}
class PgBoolean extends PgColumn {
static [entityKind] = "PgBoolean";
getSQLType() {
return "boolean";
}
}
function boolean(name) {
return new PgBooleanBuilder(name ?? "");
}
export {
PgBoolean,
PgBooleanBuilder,
boolean
};
//# sourceMappingURL=boolean.js.map

View File

@@ -0,0 +1,171 @@
import {JSONSchema4Type} from 'json-schema'
export type AST_TYPE = AST['type']
export type AST =
| TAny
| TArray
| TBoolean
| TEnum
| TInterface
| TNamedInterface
| TIntersection
| TLiteral
| TNever
| TNumber
| TNull
| TObject
| TReference
| TString
| TTuple
| TUnion
| TUnknown
| TCustomType
export interface AbstractAST {
comment?: string
keyName?: string
standaloneName?: string
type: AST_TYPE
deprecated?: boolean
}
export type ASTWithComment = AST & {comment: string}
export type ASTWithName = AST & {keyName: string}
export type ASTWithStandaloneName = AST & {standaloneName: string}
export function hasComment(ast: AST): ast is ASTWithComment {
return (
('comment' in ast && ast.comment != null && ast.comment !== '') ||
// Compare to true because ast.deprecated might be undefined
('deprecated' in ast && ast.deprecated === true)
)
}
export function hasStandaloneName(ast: AST): ast is ASTWithStandaloneName {
return 'standaloneName' in ast && ast.standaloneName != null && ast.standaloneName !== ''
}
//////////////////////////////////////////// types
export interface TAny extends AbstractAST {
type: 'ANY'
}
export interface TArray extends AbstractAST {
type: 'ARRAY'
params: AST
}
export interface TBoolean extends AbstractAST {
type: 'BOOLEAN'
}
export interface TEnum extends AbstractAST {
standaloneName: string
type: 'ENUM'
params: TEnumParam[]
}
export interface TEnumParam {
ast: AST
keyName: string
}
export interface TInterface extends AbstractAST {
type: 'INTERFACE'
params: TInterfaceParam[]
superTypes: TNamedInterface[]
}
export interface TNamedInterface extends AbstractAST {
standaloneName: string
type: 'INTERFACE'
params: TInterfaceParam[]
superTypes: TNamedInterface[]
}
export interface TNever extends AbstractAST {
type: 'NEVER'
}
export interface TInterfaceParam {
ast: AST
keyName: string
isRequired: boolean
isPatternProperty: boolean
isUnreachableDefinition: boolean
}
export interface TIntersection extends AbstractAST {
type: 'INTERSECTION'
params: AST[]
}
export interface TLiteral extends AbstractAST {
params: JSONSchema4Type
type: 'LITERAL'
}
export interface TNumber extends AbstractAST {
type: 'NUMBER'
}
export interface TNull extends AbstractAST {
type: 'NULL'
}
export interface TObject extends AbstractAST {
type: 'OBJECT'
}
export interface TReference extends AbstractAST {
type: 'REFERENCE'
params: string
}
export interface TString extends AbstractAST {
type: 'STRING'
}
export interface TTuple extends AbstractAST {
type: 'TUPLE'
params: AST[]
spreadParam?: AST
minItems: number
maxItems?: number
}
export interface TUnion extends AbstractAST {
type: 'UNION'
params: AST[]
}
export interface TUnknown extends AbstractAST {
type: 'UNKNOWN'
}
export interface TCustomType extends AbstractAST {
type: 'CUSTOM_TYPE'
params: string
}
//////////////////////////////////////////// literals
export const T_ANY: TAny = {
type: 'ANY',
}
export const T_ANY_ADDITIONAL_PROPERTIES: TAny & ASTWithName = {
keyName: '[k: string]',
type: 'ANY',
}
export const T_UNKNOWN: TUnknown = {
type: 'UNKNOWN',
}
export const T_UNKNOWN_ADDITIONAL_PROPERTIES: TUnknown & ASTWithName = {
keyName: '[k: string]',
type: 'UNKNOWN',
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.bundle.logs.metrics.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.logs.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAE5C,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EACL,6BAA6B,IAAI,yBAAyB,EAC1D,uBAAuB,IAAI,wBAAwB,EACnD,uBAAuB,IAAI,mBAAmB,EAC9C,qBAAqB,IAAI,iBAAiB,GAC3C,CAAC"}

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, d MMMM yyyy",
long: "d MMMM yyyy",
medium: "d MMM yyyy",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'am' {{time}}",
long: "{{date}} 'am' {{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,62 @@
"use strict";
exports.eachHourOfInterval = eachHourOfInterval;
var _index = require("./addHours.js");
var _index2 = require("./toDate.js");
/**
* The {@link eachHourOfInterval} function options.
*/
/**
* @name eachHourOfInterval
* @category Interval Helpers
* @summary Return the array of hours within the specified time interval.
*
* @description
* Return the array of hours within the specified time interval.
*
* @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 interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of hours from the hour of the interval start to the hour of the interval end
*
* @example
* // Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00
* const result = eachHourOfInterval({
* start: new Date(2014, 9, 6, 12),
* end: new Date(2014, 9, 6, 15)
* })
* //=> [
* // Mon Oct 06 2014 12:00:00,
* // Mon Oct 06 2014 13:00:00,
* // Mon Oct 06 2014 14:00:00,
* // Mon Oct 06 2014 15:00:00
* // ]
*/
function eachHourOfInterval(interval, options) {
const startDate = (0, _index2.toDate)(interval.start);
const endDate = (0, _index2.toDate)(interval.end);
let reversed = +startDate > +endDate;
const endTime = reversed ? +startDate : +endDate;
let currentDate = reversed ? endDate : startDate;
currentDate.setMinutes(0, 0, 0);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+currentDate <= endTime) {
dates.push((0, _index2.toDate)(currentDate));
currentDate = (0, _index.addHours)(currentDate, step);
}
return reversed ? dates.reverse() : dates;
}

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function scrollIntoViewIfNeeded(element: HTMLElement | null | undefined, measure?: (node: HTMLElement) => ClientRect): void;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-proxy/driver.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { PgDatabase } from '~/pg-core/db.ts';\nimport { PgDialect } from '~/pg-core/dialect.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { type PgRemoteQueryResultHKT, PgRemoteSession } from './session.ts';\n\nexport class PgRemoteDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> extends PgDatabase<PgRemoteQueryResultHKT, TSchema> {\n\tstatic override readonly [entityKind]: string = 'PgRemoteDatabase';\n}\n\nexport type RemoteCallback = (\n\tsql: string,\n\tparams: any[],\n\tmethod: 'all' | 'execute',\n\ttypings?: any[],\n) => Promise<{ rows: any[] }>;\n\nexport function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(\n\tcallback: RemoteCallback,\n\tconfig: DrizzleConfig<TSchema> = {},\n\t_dialect: () => PgDialect = () => new PgDialect({ casing: config.casing }),\n): PgRemoteDatabase<TSchema> {\n\tconst dialect = _dialect();\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new PgRemoteSession(callback, dialect, schema, { logger, cache: config.cache });\n\tconst db = new PgRemoteDatabase(dialect, session, schema as any) as PgRemoteDatabase<TSchema>;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db;\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,OAGM;AAEP,SAAsC,uBAAuB;AAEtD,MAAM,yBAEH,WAA4C;AAAA,EACrD,QAA0B,UAAU,IAAY;AACjD;AASO,SAAS,QACf,UACA,SAAiC,CAAC,GAClC,WAA4B,MAAM,IAAI,UAAU,EAAE,QAAQ,OAAO,OAAO,CAAC,GAC7C;AAC5B,QAAM,UAAU,SAAS;AACzB,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,eAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,gBAAgB,UAAU,SAAS,QAAQ,EAAE,QAAQ,OAAO,OAAO,MAAM,CAAC;AAC9F,QAAM,KAAK,IAAI,iBAAiB,SAAS,SAAS,MAAa;AAC/D,EAAO,GAAI,SAAS,OAAO;AAC3B,MAAW,GAAI,QAAQ;AACtB,IAAO,GAAI,OAAO,YAAY,IAAI,OAAO,OAAO;AAAA,EACjD;AAEA,SAAO;AACR;","names":[]}

View File

@@ -0,0 +1,18 @@
import type { Localize } from "../../locale/types.js";
import type {
FirstWeekContainsDateOptions,
LocalizedOptions,
WeekOptions,
} from "../../types.js";
type Formatter = (
date: Date,
token: string,
localize: Localize,
options: Required<
LocalizedOptions<"options"> & WeekOptions & FirstWeekContainsDateOptions
>,
) => string;
export declare const formatters: {
[token: string]: Formatter;
};
export {};

View File

@@ -0,0 +1,36 @@
Prism.languages.supercollider = {
'comment': {
pattern: /\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,
greedy: true
},
'string': {
pattern: /(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,
lookbehind: true,
greedy: true
},
'char': {
pattern: /\$(?:[^\\\r\n]|\\.)/,
greedy: true
},
'symbol': {
pattern: /(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,
lookbehind: true,
greedy: true
},
'keyword': /\b(?:_|arg|classvar|const|nil|var|while)\b/,
'boolean': /\b(?:false|true)\b/,
'label': {
pattern: /\b[a-z_]\w*(?=\s*:)/,
alias: 'property'
},
'number': /\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,
'class-name': /\b[A-Z]\w*\b/,
'operator': /\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,
'punctuation': /[{}()[\].:,;]|#[[{]/
};
Prism.languages.sclang = Prism.languages.supercollider;

View File

@@ -0,0 +1,42 @@
{
"name": "object-assign",
"version": "4.1.1",
"description": "ES2015 `Object.assign()` ponyfill",
"license": "MIT",
"repository": "sindresorhus/object-assign",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "xo && ava",
"bench": "matcha bench.js"
},
"files": [
"index.js"
],
"keywords": [
"object",
"assign",
"extend",
"properties",
"es2015",
"ecmascript",
"harmony",
"ponyfill",
"prollyfill",
"polyfill",
"shim",
"browser"
],
"devDependencies": {
"ava": "^0.16.0",
"lodash": "^4.16.4",
"matcha": "^0.7.0",
"xo": "^0.16.0"
}
}

View File

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

View File

@@ -0,0 +1,9 @@
/**
* 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 e=require("lexical"),t=require("@lexical/utils");const r=[];class s extends e.ElementNode{static getType(){return"mark"}static clone(e){return new s(e.__ids,e.__key)}static importDOM(){return null}static importJSON(e){return n().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIDs(e.ids)}exportJSON(){return{...super.exportJSON(),ids:this.getIDs()}}constructor(e=r,t){super(t),this.__ids=e}createDOM(e){const r=document.createElement("mark");return t.addClassNamesToElement(r,e.theme.mark),this.__ids.length>1&&t.addClassNamesToElement(r,e.theme.markOverlap),r}updateDOM(e,r,s){const n=e.__ids,i=this.__ids,o=n.length,a=i.length,l=s.theme.markOverlap;return o!==a&&(1===o?2===a&&t.addClassNamesToElement(r,l):1===a&&t.removeClassNamesFromElement(r,l)),!1}hasID(e){return this.getIDs().includes(e)}getIDs(){return Array.from(this.getLatest().__ids)}setIDs(e){const t=this.getWritable();return t.__ids=e,t}addID(e){const t=this.getWritable();return t.__ids.includes(e)?t:t.setIDs([...t.__ids,e])}deleteID(e){const t=this.getWritable(),r=t.__ids.indexOf(e);if(-1===r)return t;const s=Array.from(t.__ids);return s.splice(r,1),t.setIDs(s)}insertNewAfter(e,t=!0){const r=n(this.__ids);return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,s){if(!e.$isRangeSelection(r)||"html"===s)return!1;const n=r.anchor,i=r.focus,o=n.getNode(),a=i.getNode(),l=r.isBackward()?n.offset-i.offset:i.offset-n.offset;return this.isParentOf(o)&&this.isParentOf(a)&&this.getTextContent().length===l}excludeFromCopy(e){return"clone"!==e}}function n(t=r){return e.$applyNodeReplacement(new s(t))}function i(e){return e instanceof s}exports.$createMarkNode=n,exports.$getMarkIDs=function(t,r){let s=t;for(;null!==s;){if(i(s))return s.getIDs();if(e.$isTextNode(s)&&r===s.getTextContentSize()){const e=s.getNextSibling();if(i(e))return e.getIDs()}s=s.getParent()}return null},exports.$isMarkNode=i,exports.$unwrapMarkNode=function(e){const t=e.getChildren();let r=null;for(let s=0;s<t.length;s++){const n=t[s];null===r?e.insertBefore(n):r.insertAfter(n),r=n}e.remove()},exports.$wrapSelectionInMarkNode=function(t,r,s,o){const a=e.$createRangeSelection(),[l,c]=t.isBackward()?[t.focus,t.anchor]:[t.anchor,t.focus];let u,d;a.anchor.set(l.key,l.offset,l.type),a.focus.set(c.key,c.offset,c.type);const f=a.extract();for(const t of f){if(e.$isElementNode(d)&&d.isParentOf(t))continue;let r=null;if(e.$isTextNode(t))r=t;else{if(i(t))continue;(e.$isElementNode(t)||e.$isDecoratorNode(t))&&t.isInline()&&(r=t)}if(null!==r){if(r&&r.is(u))continue;const e=r.getParent();if(null!=e&&e.is(u)||(d=void 0),u=e,void 0===d){d=(o||n)([s]),r.insertBefore(d)}d.append(r)}else u=void 0,d=void 0}e.$isElementNode(d)&&(r?d.selectStart():d.selectEnd())},exports.MarkNode=s;

View File

@@ -0,0 +1,13 @@
import type { ContextFn, DateArg } from "../types.js";
export declare function normalizeDates(
context: ContextFn<Date> | undefined,
...dates: [DateArg<Date>, DateArg<Date>, DateArg<Date>]
): [Date, Date, Date];
export declare function normalizeDates(
context: ContextFn<Date> | undefined,
...dates: [DateArg<Date>, DateArg<Date>]
): [Date, Date];
export declare function normalizeDates(
context: ContextFn<Date> | undefined,
...dates: Array<DateArg<Date> & {}>
): Date[];

View File

@@ -0,0 +1,100 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var driver_exports = {};
__export(driver_exports, {
BetterSQLite3Database: () => BetterSQLite3Database,
drizzle: () => drizzle
});
module.exports = __toCommonJS(driver_exports);
var import_better_sqlite3 = __toESM(require("better-sqlite3"), 1);
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_relations = require("../relations.cjs");
var import_db = require("../sqlite-core/db.cjs");
var import_dialect = require("../sqlite-core/dialect.cjs");
var import_utils = require("../utils.cjs");
var import_session = require("./session.cjs");
class BetterSQLite3Database extends import_db.BaseSQLiteDatabase {
static [import_entity.entityKind] = "BetterSQLite3Database";
}
function construct(client, config = {}) {
const dialect = new import_dialect.SQLiteSyncDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new import_logger.DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = (0, import_relations.extractTablesRelationalConfig)(
config.schema,
import_relations.createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new import_session.BetterSQLiteSession(client, dialect, schema, { logger });
const db = new BetterSQLite3Database("sync", dialect, session, schema);
db.$client = client;
return db;
}
function drizzle(...params) {
if (params[0] === void 0 || typeof params[0] === "string") {
const instance = params[0] === void 0 ? new import_better_sqlite3.default() : new import_better_sqlite3.default(params[0]);
return construct(instance, params[1]);
}
if ((0, import_utils.isConfig)(params[0])) {
const { connection, client, ...drizzleConfig } = params[0];
if (client) return construct(client, drizzleConfig);
if (typeof connection === "object") {
const { source, ...options } = connection;
const instance2 = new import_better_sqlite3.default(source, options);
return construct(instance2, drizzleConfig);
}
const instance = new import_better_sqlite3.default(connection);
return construct(instance, drizzleConfig);
}
return construct(params[0], params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BetterSQLite3Database,
drizzle
});
//# sourceMappingURL=driver.cjs.map

View File

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

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"global-error-handler.js","sourceRoot":"","sources":["../../../src/common/global-error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,wCAAwC;AACxC,IAAI,eAAe,GAAG,mBAAmB,EAAE,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAqB;IACzD,eAAe,GAAG,OAAO,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAa;IAC9C,IAAI;QACF,eAAe,CAAC,EAAE,CAAC,CAAC;KACrB;IAAC,MAAM,GAAE,CAAC,+BAA+B;AAC5C,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\nimport { Exception } from '@opentelemetry/api';\nimport { loggingErrorHandler } from './logging-error-handler';\nimport { ErrorHandler } from './types';\n\n/** The global error handler delegate */\nlet delegateHandler = loggingErrorHandler();\n\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler: ErrorHandler): void {\n delegateHandler = handler;\n}\n\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex: Exception): void {\n try {\n delegateHandler(ex);\n } catch {} // eslint-disable-line no-empty\n}\n"]}

View File

@@ -0,0 +1,10 @@
import type { CustomComponent, EditConfig, SanitizedCollectionConfig, SanitizedGlobalConfig } from 'payload';
export declare function getViewActions({ editConfig, viewKey, }: {
editConfig: EditConfig;
viewKey: keyof EditConfig;
}): CustomComponent[];
export declare function getSubViewActions({ collectionOrGlobal, viewKeyArg, }: {
collectionOrGlobal: SanitizedCollectionConfig | SanitizedGlobalConfig;
viewKeyArg?: keyof EditConfig;
}): CustomComponent[];
//# sourceMappingURL=attachViewActions.d.ts.map

View File

@@ -0,0 +1,6 @@
import type { JoinField } from '../fields/config/types.js';
import { APIError } from './APIError.js';
export declare class InvalidFieldJoin extends APIError {
constructor(field: JoinField);
}
//# sourceMappingURL=InvalidFieldJoin.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,mCAAiE;AAEjE,2DAAwD;AAExD,8EAAsE;AAE/D,MAAM,qBAAqB,GAAG,CACnC,OAAmB,EACnB,KAAoB,EACpB,QAAiB,EACjB,SAA2B,EAI3B,EAAE;IACF,IAAI,QAAQ,EAAE;QACZ,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,+BAAc,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE;gBAChD,CAAC,+BAAc,CAAC,QAAQ,CAAC,EAAE,oBAAY,CAAC,MAAM;gBAC9C,CAAC,sCAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE;aACzC;YACD,IAAI,EAAE,OAAO,CAAC,iBAAiB,IAAI,YAAY,SAAS,EAAE;SAC3D,CAAC;KACH;SAAM;QACL,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,+BAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,IAAI,YAAY;gBACrD,CAAC,+BAAc,CAAC,QAAQ,CAAC,EAAE,oBAAY,CAAC,UAAU;aACnD;YACD,IAAI,EAAE,gBAAgB,KAAK,CAAC,IAAI,EAAE;SACnC,CAAC;KACH;AACH,CAAC,CAAC;AA3BW,QAAA,qBAAqB,yBA2BhC;AAEF;;;;;GAKG;AACI,MAAM,cAAc,GAAG,CAC5B,IAAkB,EAClB,MAAiC,EACxB,EAAE;IACX,OAAO,CAAC,CAAC,CACP,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC;QACvC,MAAM,EAAE,gBAAgB,EAAE,QAAQ,CAAC,IAAI,CAAC,CACzC,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB","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 */\nimport { KoaLayerType, KoaInstrumentationConfig } from './types';\nimport { KoaContext, KoaMiddleware } from './internal-types';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { Attributes } from '@opentelemetry/api';\nimport { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\n\nexport const getMiddlewareMetadata = (\n context: KoaContext,\n layer: KoaMiddleware,\n isRouter: boolean,\n layerPath?: string | RegExp\n): {\n attributes: Attributes;\n name: string;\n} => {\n if (isRouter) {\n return {\n attributes: {\n [AttributeNames.KOA_NAME]: layerPath?.toString(),\n [AttributeNames.KOA_TYPE]: KoaLayerType.ROUTER,\n [ATTR_HTTP_ROUTE]: layerPath?.toString(),\n },\n name: context._matchedRouteName || `router - ${layerPath}`,\n };\n } else {\n return {\n attributes: {\n [AttributeNames.KOA_NAME]: layer.name ?? 'middleware',\n [AttributeNames.KOA_TYPE]: KoaLayerType.MIDDLEWARE,\n },\n name: `middleware - ${layer.name}`,\n };\n }\n};\n\n/**\n * Check whether the given request is ignored by configuration\n * @param [list] List of ignore patterns\n * @param [onException] callback for doing something when an exception has\n * occurred\n */\nexport const isLayerIgnored = (\n type: KoaLayerType,\n config?: KoaInstrumentationConfig\n): boolean => {\n return !!(\n Array.isArray(config?.ignoreLayersType) &&\n config?.ignoreLayersType?.includes(type)\n );\n};\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"notifications.cjs","names":[],"sources":["../../../../src/rest/commands/create/notifications.ts"],"sourcesContent":["import type { DirectusNotification } from '../../../schema/notification.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateNotificationOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusNotification<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new notifications.\n *\n * @param items The notifications to create\n * @param query Optional return data query\n *\n * @returns Returns the notification object for the created notification.\n */\nexport const createNotifications =\n\t<Schema, const TQuery extends Query<Schema, DirectusNotification<Schema>>>(\n\t\titems: NestedPartial<DirectusNotification<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateNotificationOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/notifications`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new notification.\n *\n * @param item The notification to create\n * @param query Optional return data query\n *\n * @returns Returns the notification object for the created notification.\n */\nexport const createNotification =\n\t<Schema, const TQuery extends Query<Schema, DirectusNotification<Schema>>>(\n\t\titem: NestedPartial<DirectusNotification<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateNotificationOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/notifications`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,iBACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,iBACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1,34 @@
// This alphabet uses `A-Za-z0-9_-` symbols.
// The order of characters is optimized for better gzip and brotli compression.
// References to the same file (works both for gzip and brotli):
// `'use`, `andom`, and `rict'`
// References to the brotli default dictionary:
// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let customAlphabet = (alphabet, defaultSize = 21) => {
return (size = defaultSize) => {
let id = ''
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size | 0
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += alphabet[(Math.random() * alphabet.length) | 0]
}
return id
}
}
let nanoid = (size = 21) => {
let id = ''
// A compact alternative for `for (var i = 0; i < step; i++)`.
let i = size | 0
while (i--) {
// `| 0` is more compact and faster than `Math.floor()`.
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
}
module.exports = { nanoid, customAlphabet }

View File

@@ -0,0 +1 @@
{"version":3,"file":"bluetooth-connected.js","sources":["../../../src/icons/bluetooth-connected.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BluetoothConnected\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNyA3IDEwIDEwLTUgNVYybDUgNUw3IDE3IiAvPgogIDxsaW5lIHgxPSIxOCIgeDI9IjIxIiB5MT0iMTIiIHkyPSIxMiIgLz4KICA8bGluZSB4MT0iMyIgeDI9IjYiIHkxPSIxMiIgeTI9IjEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bluetooth-connected\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 BluetoothConnected = createLucideIcon('BluetoothConnected', [\n ['path', { d: 'm7 7 10 10-5 5V2l5 5L7 17', key: '1q5490' }],\n ['line', { x1: '18', x2: '21', y1: '12', y2: '12', key: '1rsjjs' }],\n ['line', { x1: '3', x2: '6', y1: '12', y2: '12', key: '11yl8c' }],\n]);\n\nexport default BluetoothConnected;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"canUseDOM.js","names":["canUseDOM","window","document","createElement"],"sources":["../../src/utilities/canUseDOM.ts"],"sourcesContent":["export const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n)\n"],"mappings":"AAAA,OAAO,MAAMA,SAAA,GAAY,CAAC,EACxB,OAAOC,MAAA,KAAW,eAClBA,MAAA,CAAOC,QAAQ,IACfD,MAAA,CAAOC,QAAQ,CAACC,aAAa,CAAD","ignoreList":[]}

View File

@@ -0,0 +1,30 @@
import { toDate } from "./toDate.js";
/**
* The {@link isFriday} function options.
*/
/**
* @name isFriday
* @category Weekday Helpers
* @summary Is the given date Friday?
*
* @description
* Is the given date Friday?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is Friday
*
* @example
* // Is 26 September 2014 Friday?
* const result = isFriday(new Date(2014, 8, 26))
* //=> true
*/
export function isFriday(date, options) {
return toDate(date, options?.in).getDay() === 5;
}
// Fallback for modularized imports:
export default isFriday;

View File

@@ -0,0 +1,31 @@
"use strict";
exports.addMinutes = addMinutes;
var _index = require("./addMilliseconds.js");
var _index2 = require("./constants.js");
/**
* @name addMinutes
* @category Minute Helpers
* @summary Add the specified number of minutes to the given date.
*
* @description
* Add the specified number of minutes to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of minutes to be added.
*
* @returns The new date with the minutes added
*
* @example
* // Add 30 minutes to 10 July 2014 12:00:00:
* const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)
* //=> Thu Jul 10 2014 12:30:00
*/
function addMinutes(date, amount) {
return (0, _index.addMilliseconds)(
date,
amount * _index2.millisecondsInMinute,
);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaultUpdateJobs.d.ts","sourceRoot":"","sources":["../../src/database/defaultUpdateJobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAI5C,eAAO,MAAM,iBAAiB,EAAE,UA8C/B,CAAA"}

View File

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

View File

@@ -0,0 +1,10 @@
"use strict";
function _get_prototype_of(o) {
exports._ = _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _get_prototype_of(o);
}
exports._ = _get_prototype_of;

View File

@@ -0,0 +1,33 @@
import OverloadYield from "./OverloadYield.js";
import regeneratorDefine from "./regeneratorDefine.js";
function AsyncIterator(t, e) {
function n(r, o, i, f) {
try {
var c = t[r](o),
u = c.value;
return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
n("next", t, i, f);
}, function (t) {
n("throw", t, i, f);
}) : e.resolve(u).then(function (t) {
c.value = t, i(c);
}, function (t) {
return n("throw", t, i, f);
});
} catch (t) {
f(t);
}
}
var r;
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
return this;
})), regeneratorDefine(this, "_invoke", function (t, o, i) {
function f() {
return new e(function (e, r) {
n(t, i, e, r);
});
}
return r = r ? r.then(f, f) : f();
}, !0);
}
export { AsyncIterator as default };

View File

@@ -0,0 +1,128 @@
import { describe, expect, it } from "vitest";
import ru from "../../../locales/ru.js";
describe("Russian localization", () => {
const localeError = ru().localeError;
describe("pluralization rules", () => {
for (const { type, cases } of TEST_CASES) {
describe(`${type} pluralization`, () => {
for (const { count, expected } of cases) {
it(`correctly pluralizes ${count} ${type}`, () => {
const error = localeError({
code: "too_small",
minimum: count,
type: "number",
inclusive: true,
path: [],
origin: type,
input: count - 1,
});
expect(error).toContain(expected);
});
}
});
}
it("handles negative numbers correctly", () => {
const error = localeError({
code: "too_small",
minimum: -2,
type: "number",
inclusive: true,
path: [],
origin: "array",
input: -3,
});
expect(error).toContain("-2 элемента");
});
it("handles zero correctly", () => {
const error = localeError({
code: "too_small",
minimum: 0,
type: "number",
inclusive: true,
path: [],
origin: "array",
input: -1,
});
expect(error).toContain("0 элементов");
});
it("handles bigint values correctly", () => {
const error = localeError({
code: "too_small",
minimum: BigInt(21),
type: "number",
inclusive: true,
path: [],
origin: "array",
input: BigInt(20),
});
expect(error).toContain("21 элемент");
});
});
});
const TEST_CASES = [
{
type: "array",
cases: [
{ count: 1, expected: "1 элемент" },
{ count: 2, expected: "2 элемента" },
{ count: 5, expected: "5 элементов" },
{ count: 11, expected: "11 элементов" },
{ count: 21, expected: "21 элемент" },
{ count: 22, expected: "22 элемента" },
{ count: 25, expected: "25 элементов" },
{ count: 101, expected: "101 элемент" },
{ count: 111, expected: "111 элементов" },
],
},
{
type: "set",
cases: [
{ count: 1, expected: "1 элемент" },
{ count: 2, expected: "2 элемента" },
{ count: 5, expected: "5 элементов" },
{ count: 11, expected: "11 элементов" },
{ count: 21, expected: "21 элемент" },
{ count: 22, expected: "22 элемента" },
{ count: 25, expected: "25 элементов" },
{ count: 101, expected: "101 элемент" },
{ count: 111, expected: "111 элементов" },
],
},
{
type: "string",
cases: [
{ count: 1, expected: "1 символ" },
{ count: 2, expected: "2 символа" },
{ count: 5, expected: "5 символов" },
{ count: 11, expected: "11 символов" },
{ count: 21, expected: "21 символ" },
{ count: 22, expected: "22 символа" },
{ count: 25, expected: "25 символов" },
],
},
{
type: "file",
cases: [
{ count: 0, expected: "0 байт" },
{ count: 1, expected: "1 байт" },
{ count: 2, expected: "2 байта" },
{ count: 5, expected: "5 байт" },
{ count: 11, expected: "11 байт" },
{ count: 21, expected: "21 байт" },
{ count: 22, expected: "22 байта" },
{ count: 25, expected: "25 байт" },
{ count: 101, expected: "101 байт" },
{ count: 110, expected: "110 байт" },
],
},
] as const;

View File

@@ -0,0 +1 @@
{"version":3,"file":"soup.js","sources":["../../../src/icons/soup.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Soup\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjFhOSA5IDAgMCAwIDktOUgzYTkgOSAwIDAgMCA5IDlaIiAvPgogIDxwYXRoIGQ9Ik03IDIxaDEwIiAvPgogIDxwYXRoIGQ9Ik0xOS41IDEyIDIyIDYiIC8+CiAgPHBhdGggZD0iTTE2LjI1IDNjLjI3LjEuOC41My43NSAxLjM2LS4wNi44My0uOTMgMS4yLTEgMi4wMi0uMDUuNzguMzQgMS4yNC43MyAxLjYyIiAvPgogIDxwYXRoIGQ9Ik0xMS4yNSAzYy4yNy4xLjguNTMuNzQgMS4zNi0uMDUuODMtLjkzIDEuMi0uOTggMi4wMi0uMDYuNzguMzMgMS4yNC43MiAxLjYyIiAvPgogIDxwYXRoIGQ9Ik02LjI1IDNjLjI3LjEuOC41My43NSAxLjM2LS4wNi44My0uOTMgMS4yLTEgMi4wMi0uMDUuNzguMzQgMS4yNC43NCAxLjYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/soup\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 Soup = createLucideIcon('Soup', [\n ['path', { d: 'M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z', key: '4rw317' }],\n ['path', { d: 'M7 21h10', key: '1b0cd5' }],\n ['path', { d: 'M19.5 12 22 6', key: 'shfsr5' }],\n [\n 'path',\n {\n d: 'M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62',\n key: 'rpc6vp',\n },\n ],\n [\n 'path',\n {\n d: 'M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62',\n key: '1lf63m',\n },\n ],\n [\n 'path',\n { d: 'M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62', key: '97tijn' },\n ],\n]);\n\nexport default Soup;\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,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACtE,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,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,CAC9C,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;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,CACA,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;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,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,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,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,4 @@
export declare const startOfISOWeek: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,29 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/*
* Copyright 2020 Google LLC
*
* 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.
*/
/**
* Performantly generate a unique, 30-char string by combining a version
* number, the current timestamp with a 13-digit number integer.
* @return {string}
*/
const generateUniqueID = () => {
return `v5-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
};
exports.generateUniqueID = generateUniqueID;
//# sourceMappingURL=generateUniqueID.js.map

View File

@@ -0,0 +1,16 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { RedisInstrumentationConfig } from '../types';
export declare class RedisInstrumentationV2_V3 extends InstrumentationBase<RedisInstrumentationConfig> {
static readonly COMPONENT = "redis";
private _semconvStability;
constructor(config?: RedisInstrumentationConfig);
setConfig(config?: RedisInstrumentationConfig): void;
protected init(): InstrumentationNodeModuleDefinition[];
/**
* Patch internal_send_command(...) to trace requests
*/
private _getPatchInternalSendCommand;
private _getPatchCreateClient;
private _getPatchCreateStream;
}
//# sourceMappingURL=instrumentation.d.ts.map

View File

@@ -0,0 +1,19 @@
import type { Field } from '../fields/config/types.js';
import type { SanitizedConfig } from '../index.js';
import type { JsonObject } from '../types/index.js';
type FilterDataToSelectedLocalesArgs = {
configBlockReferences: SanitizedConfig['blocks'];
docWithLocales: JsonObject;
fields: Field[];
parentIsLocalized?: boolean;
selectedLocales: string[];
};
/**
* Filters localized field data to only include specified locales.
* For non-localized fields, returns all data as-is.
* For localized fields, if selectedLocales is provided, returns only those locales.
* If selectedLocales is not provided and field is localized, returns all locales.
*/
export declare function filterDataToSelectedLocales({ configBlockReferences, docWithLocales, fields, parentIsLocalized, selectedLocales, }: FilterDataToSelectedLocalesArgs): JsonObject;
export {};
//# sourceMappingURL=filterDataToSelectedLocales.d.ts.map

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