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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,8 @@
import { invariant } from "./utils.js";
export function CanonicalizeUValue(ukey, uvalue) {
// TODO: Implement algorithm for CanonicalizeUValue per https://tc39.es/ecma402/#sec-canonicalizeuvalue
let lowerValue = uvalue.toLowerCase();
invariant(ukey !== undefined, `ukey must be defined`);
let canonicalized = lowerValue;
return canonicalized;
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore-proxy/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,sCAAc,wBAAd;AACA,sCAAc,yBADd;","names":[]}
@@ -0,0 +1,17 @@
import { time } from '../../../frameloop/sync-time.mjs';
import { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';
const frameloopDriver = (update) => {
const passTimestamp = ({ timestamp }) => update(timestamp);
return {
start: () => frame.update(passTimestamp, true),
stop: () => cancelFrame(passTimestamp),
/**
* If we're processing this frame we can use the
* framelocked timestamp to keep things in sync.
*/
now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),
};
};
export { frameloopDriver };
@@ -0,0 +1,30 @@
import { constructNow } from "./constructNow.mjs";
import { isSameDay } from "./isSameDay.mjs";
import { subDays } from "./subDays.mjs";
/**
* @name isYesterday
* @category Day Helpers
* @summary Is the given date yesterday?
* @pure false
*
* @description
* Is the given date yesterday?
*
* @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 check
*
* @returns The date is yesterday
*
* @example
* // If today is 6 October 2014, is 5 October 14:00:00 yesterday?
* const result = isYesterday(new Date(2014, 9, 5, 14, 0))
* //=> true
*/
export function isYesterday(date) {
return isSameDay(date, subDays(constructNow(date), 1));
}
// Fallback for modularized imports:
export default isYesterday;
@@ -0,0 +1,10 @@
import toPropertyKey from "./toPropertyKey.js";
function _defineProperty(e, r, t) {
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
export { _defineProperty as default };
@@ -0,0 +1,44 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrument = require('./metrics/instrument.js');
const browserMetrics = require('./metrics/browserMetrics.js');
const elementTiming = require('./metrics/elementTiming.js');
const utils = require('./metrics/utils.js');
const dom = require('./instrument/dom.js');
const history = require('./instrument/history.js');
const getNativeImplementation = require('./getNativeImplementation.js');
const xhr = require('./instrument/xhr.js');
const networkUtils = require('./networkUtils.js');
const resourceTiming = require('./metrics/resourceTiming.js');
const inp = require('./metrics/inp.js');
exports.addClsInstrumentationHandler = instrument.addClsInstrumentationHandler;
exports.addInpInstrumentationHandler = instrument.addInpInstrumentationHandler;
exports.addLcpInstrumentationHandler = instrument.addLcpInstrumentationHandler;
exports.addPerformanceInstrumentationHandler = instrument.addPerformanceInstrumentationHandler;
exports.addTtfbInstrumentationHandler = instrument.addTtfbInstrumentationHandler;
exports.addPerformanceEntries = browserMetrics.addPerformanceEntries;
exports.startTrackingInteractions = browserMetrics.startTrackingInteractions;
exports.startTrackingLongAnimationFrames = browserMetrics.startTrackingLongAnimationFrames;
exports.startTrackingLongTasks = browserMetrics.startTrackingLongTasks;
exports.startTrackingWebVitals = browserMetrics.startTrackingWebVitals;
exports.startTrackingElementTiming = elementTiming.startTrackingElementTiming;
exports.extractNetworkProtocol = utils.extractNetworkProtocol;
exports.addClickKeypressInstrumentationHandler = dom.addClickKeypressInstrumentationHandler;
exports.addHistoryInstrumentationHandler = history.addHistoryInstrumentationHandler;
exports.clearCachedImplementation = getNativeImplementation.clearCachedImplementation;
exports.fetch = getNativeImplementation.fetch;
exports.getNativeImplementation = getNativeImplementation.getNativeImplementation;
exports.setTimeout = getNativeImplementation.setTimeout;
exports.SENTRY_XHR_DATA_KEY = xhr.SENTRY_XHR_DATA_KEY;
exports.addXhrInstrumentationHandler = xhr.addXhrInstrumentationHandler;
exports.getBodyString = networkUtils.getBodyString;
exports.getFetchRequestArgBody = networkUtils.getFetchRequestArgBody;
exports.parseXhrResponseHeaders = networkUtils.parseXhrResponseHeaders;
exports.serializeFormData = networkUtils.serializeFormData;
exports.resourceTimingToSpanAttributes = resourceTiming.resourceTimingToSpanAttributes;
exports.registerInpInteractionListener = inp.registerInpInteractionListener;
exports.startTrackingINP = inp.startTrackingINP;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,921 @@
import { GraphQLBoolean, GraphQLEnumType, GraphQLFloat, GraphQLInt, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLString, GraphQLUnionType } from 'graphql';
import { DateTimeResolver, EmailAddressResolver } from 'graphql-scalars';
import { combineQueries, createDataloaderCacheKey, MissingEditorProp, toWords } from 'payload';
import { fieldAffectsData, tabHasName } from 'payload/shared';
import { GraphQLJSON } from '../packages/graphql-type-json/index.js';
import { combineParentName } from '../utilities/combineParentName.js';
import { formatName } from '../utilities/formatName.js';
import { formatOptions } from '../utilities/formatOptions.js';
import { resolveSelect } from '../utilities/select.js';
import { buildObjectType } from './buildObjectType.js';
import { isFieldNullable } from './isFieldNullable.js';
import { withNullableType } from './withNullableType.js';
function formattedNameResolver({ field, ...rest }) {
if ('name' in field) {
if (formatName(field.name) !== field.name) {
return {
...rest,
extensions: {
...rest.extensions,
field
},
resolve: (parent)=>parent[field.name]
};
}
}
return rest;
}
export const fieldToSchemaMap = {
array: ({ config, field, forceNullable, graphqlResult, objectTypeConfig, parentIsLocalized, parentName })=>{
const interfaceName = field?.interfaceName || combineParentName(parentName, toWords(field.name, true));
if (!graphqlResult.types.arrayTypes[interfaceName]) {
const objectType = buildObjectType({
name: interfaceName,
config,
fields: field.fields,
forceNullable: isFieldNullable({
field,
forceNullable,
parentIsLocalized
}),
graphqlResult,
parentIsLocalized: field.localized || parentIsLocalized,
parentName: interfaceName
});
if (Object.keys(objectType.getFields()).length) {
graphqlResult.types.arrayTypes[interfaceName] = objectType;
}
}
if (!graphqlResult.types.arrayTypes[interfaceName]) {
return objectTypeConfig;
}
const arrayType = new GraphQLList(new GraphQLNonNull(graphqlResult.types.arrayTypes[interfaceName]));
return {
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: arrayType,
field,
parentIsLocalized
}),
field
})
};
},
blocks: ({ config, field, forceNullable, graphqlResult, objectTypeConfig, parentIsLocalized, parentName })=>{
const blockTypes = (field.blockReferences ?? field.blocks).reduce((acc, _block)=>{
const blockSlug = typeof _block === 'string' ? _block : _block.slug;
if (!graphqlResult.types.blockTypes[blockSlug]) {
// TODO: iterate over blocks mapped to block slug in v4, or pass through payload.blocks
const block = typeof _block === 'string' ? config.blocks.find((b)=>b.slug === _block) : _block;
const interfaceName = block?.interfaceName || block?.graphQL?.singularName || toWords(block.slug, true);
const objectType = buildObjectType({
name: interfaceName,
config,
fields: [
...block.fields,
{
name: 'blockType',
type: 'text'
}
],
forceNullable,
graphqlResult,
parentIsLocalized,
parentName: interfaceName
});
if (Object.keys(objectType.getFields()).length) {
// Store block slug in extensions for use in select building
objectType.extensions = {
...objectType.extensions,
blockSlug: block.slug
};
graphqlResult.types.blockTypes[block.slug] = objectType;
}
}
if (graphqlResult.types.blockTypes[blockSlug]) {
acc.push(graphqlResult.types.blockTypes[blockSlug]);
}
return acc;
}, []);
if (blockTypes.length === 0) {
return objectTypeConfig;
}
const fullName = combineParentName(parentName, toWords(field.name, true));
const type = new GraphQLList(new GraphQLNonNull(new GraphQLUnionType({
name: fullName,
resolveType: (data)=>graphqlResult.types.blockTypes[data.blockType].name,
types: blockTypes
})));
return {
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type,
field,
parentIsLocalized
}),
field
})
};
},
checkbox: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: GraphQLBoolean,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
code: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: GraphQLString,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
collapsible: ({ collectionSlug, config, field, forceNullable, graphqlResult, newlyCreatedBlockType, objectTypeConfig, parentIsLocalized, parentName })=>field.fields.reduce((objectTypeConfigWithCollapsibleFields, subField)=>{
const addSubField = fieldToSchemaMap[subField.type];
if (addSubField) {
return addSubField({
collectionSlug,
config,
field: subField,
forceNullable,
graphqlResult,
newlyCreatedBlockType,
objectTypeConfig: objectTypeConfigWithCollapsibleFields,
parentIsLocalized,
parentName
});
}
return objectTypeConfigWithCollapsibleFields;
}, objectTypeConfig),
date: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: DateTimeResolver,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
email: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: EmailAddressResolver,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
group: ({ collectionSlug, config, field, forceNullable, graphqlResult, newlyCreatedBlockType, objectTypeConfig, parentIsLocalized, parentName })=>{
if (fieldAffectsData(field)) {
const interfaceName = field?.interfaceName || combineParentName(parentName, toWords(field.name, true));
if (!graphqlResult.types.groupTypes[interfaceName]) {
const objectType = buildObjectType({
name: interfaceName,
config,
fields: field.fields,
forceNullable: isFieldNullable({
field,
forceNullable,
parentIsLocalized
}),
graphqlResult,
parentIsLocalized: field.localized || parentIsLocalized,
parentName: interfaceName
});
if (Object.keys(objectType.getFields()).length) {
graphqlResult.types.groupTypes[interfaceName] = objectType;
}
}
if (!graphqlResult.types.groupTypes[interfaceName]) {
return objectTypeConfig;
}
return {
...objectTypeConfig,
[formatName(field.name)]: {
type: graphqlResult.types.groupTypes[interfaceName],
extensions: {
field
},
resolve: (parent, args, context)=>{
return {
...parent[field.name],
_id: parent._id ?? parent.id
};
}
}
};
} else {
return field.fields.reduce((objectTypeConfigWithCollapsibleFields, subField)=>{
const addSubField = fieldToSchemaMap[subField.type];
if (addSubField) {
return addSubField({
collectionSlug,
config,
field: subField,
forceNullable,
graphqlResult,
newlyCreatedBlockType,
objectTypeConfig: objectTypeConfigWithCollapsibleFields,
parentIsLocalized,
parentName
});
}
return objectTypeConfigWithCollapsibleFields;
}, objectTypeConfig);
}
},
join: ({ collectionSlug, field, graphqlResult, objectTypeConfig, parentName })=>{
const joinName = combineParentName(parentName, toWords(field.name, true));
const joinType = {
type: new GraphQLObjectType({
name: joinName,
fields: {
docs: {
type: new GraphQLNonNull(Array.isArray(field.collection) ? GraphQLJSON : new GraphQLList(new GraphQLNonNull(graphqlResult.collections[field.collection].graphQL.type)))
},
hasNextPage: {
type: new GraphQLNonNull(GraphQLBoolean)
},
totalDocs: {
type: GraphQLInt
}
}
}),
args: {
count: {
type: GraphQLBoolean
},
limit: {
type: GraphQLInt
},
page: {
type: GraphQLInt
},
sort: {
type: GraphQLString
},
where: {
type: Array.isArray(field.collection) ? GraphQLJSON : graphqlResult.collections[field.collection].graphQL.whereInputType
}
},
extensions: {
complexity: typeof field?.graphQL?.complexity === 'number' ? field.graphQL.complexity : 10,
field
},
async resolve (parent, args, context, info) {
const { collection } = field;
const { count = false, limit, page, sort, where } = args;
const { req } = context;
const draft = Boolean(args.draft ?? context.req.query?.draft);
const select = resolveSelect(info, context.select);
const targetField = field.targetField;
const fullWhere = combineQueries(where, Array.isArray(targetField.relationTo) ? {
[field.on]: {
equals: {
relationTo: collectionSlug,
value: parent._id ?? parent.id
}
}
} : {
[field.on]: {
equals: parent._id ?? parent.id
}
});
if (Array.isArray(collection)) {
throw new Error('GraphQL with array of join.field.collection is not implemented');
}
if (count && limit === 0) {
return await req.payload.count({
collection,
overrideAccess: false,
req,
where: fullWhere
});
}
const { docs, totalDocs } = await req.payload.find({
collection,
depth: 0,
draft,
fallbackLocale: req.fallbackLocale,
// Fetch one extra document to determine if there are more documents beyond the requested limit (used for hasNextPage calculation).
limit: typeof limit === 'number' && limit > 0 ? limit + 1 : 0,
locale: req.locale,
overrideAccess: false,
page,
pagination: count ? true : false,
req,
select,
sort,
where: fullWhere
});
let shouldSlice = false;
if (typeof limit === 'number' && limit !== 0 && limit < docs.length) {
shouldSlice = true;
}
return {
docs: shouldSlice ? docs.slice(0, -1) : docs,
hasNextPage: limit === 0 ? false : limit < docs.length,
...count ? {
totalDocs
} : {}
};
}
};
return {
...objectTypeConfig,
[formatName(field.name)]: joinType
};
},
json: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: GraphQLJSON,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
number: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>{
const type = field?.name === 'id' ? GraphQLInt : GraphQLFloat;
return {
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: field?.hasMany === true ? new GraphQLList(new GraphQLNonNull(type)) : type,
field,
forceNullable,
parentIsLocalized
}),
field
})
};
},
point: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: new GraphQLList(new GraphQLNonNull(GraphQLFloat)),
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
radio: ({ field, forceNullable, objectTypeConfig, parentIsLocalized, parentName })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: new GraphQLEnumType({
name: combineParentName(parentName, field.name),
values: formatOptions(field)
}),
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
relationship: ({ config, field, forceNullable, graphqlResult, newlyCreatedBlockType, objectTypeConfig, parentIsLocalized, parentName })=>{
const { relationTo } = field;
const isRelatedToManyCollections = Array.isArray(relationTo);
const hasManyValues = field.hasMany;
const relationshipName = combineParentName(parentName, toWords(field.name, true));
let type;
let relationToType = null;
const graphQLCollections = config.collections.filter((collectionConfig)=>collectionConfig.graphQL !== false);
if (Array.isArray(relationTo)) {
relationToType = new GraphQLEnumType({
name: `${relationshipName}_RelationTo`,
values: relationTo.filter((relation)=>graphQLCollections.some((collection)=>collection.slug === relation)).reduce((relations, relation)=>({
...relations,
[formatName(relation)]: {
value: relation
}
}), {})
});
// Only pass collections that are GraphQL enabled
const types = relationTo.filter((relation)=>graphQLCollections.some((collection)=>collection.slug === relation)).map((relation)=>graphqlResult.collections[relation]?.graphQL.type);
type = new GraphQLObjectType({
name: `${relationshipName}_Relationship`,
fields: {
relationTo: {
type: relationToType
},
value: {
type: new GraphQLUnionType({
name: relationshipName,
resolveType (data) {
return graphqlResult.collections[data.collection].graphQL.type.name;
},
types
})
}
}
});
} else {
;
({ type } = graphqlResult.collections[relationTo].graphQL);
}
// If the relationshipType is undefined at this point,
// it can be assumed that this blockType can have a relationship
// to itself. Therefore, we set the relationshipType equal to the blockType
// that is currently being created.
type = type || newlyCreatedBlockType;
const relationshipArgs = {};
const relationsUseDrafts = (Array.isArray(relationTo) ? relationTo : [
relationTo
]).filter((relation)=>graphQLCollections.some((collection)=>collection.slug === relation)).some((relation)=>graphqlResult.collections[relation].config.versions?.drafts);
if (relationsUseDrafts) {
relationshipArgs.draft = {
type: GraphQLBoolean
};
}
if (config.localization) {
relationshipArgs.locale = {
type: graphqlResult.types.localeInputType
};
relationshipArgs.fallbackLocale = {
type: graphqlResult.types.fallbackLocaleInputType
};
}
const relationship = {
type: withNullableType({
type: hasManyValues ? new GraphQLList(new GraphQLNonNull(type)) : type,
field,
forceNullable,
parentIsLocalized
}),
args: relationshipArgs,
extensions: {
complexity: typeof field?.graphQL?.complexity === 'number' ? field.graphQL.complexity : 10,
field
},
async resolve (parent, args, context, info) {
const value = parent[field.name];
const locale = args.locale || context.req.locale;
const fallbackLocale = args.fallbackLocale || context.req.fallbackLocale;
let relatedCollectionSlug = field.relationTo;
const draft = Boolean(args.draft ?? context.req.query?.draft);
const select = resolveSelect(info, context.select);
if (hasManyValues) {
const results = [];
const resultPromises = [];
const createPopulationPromise = async (relatedDoc, i)=>{
let id = relatedDoc;
let collectionSlug = field.relationTo;
const isValidGraphQLCollection = isRelatedToManyCollections ? graphQLCollections.some((collection)=>collectionSlug.includes(collection.slug)) : graphQLCollections.some((collection)=>collectionSlug === collection.slug);
if (isValidGraphQLCollection) {
if (isRelatedToManyCollections) {
collectionSlug = relatedDoc.relationTo;
id = relatedDoc.value;
}
const result = await context.req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug: collectionSlug,
currentDepth: 0,
depth: 0,
docID: id,
draft,
fallbackLocale,
locale,
overrideAccess: false,
select,
showHiddenFields: false,
transactionID: context.req.transactionID
}));
if (result) {
if (isRelatedToManyCollections) {
results.push({
relationTo: collectionSlug,
value: {
...result,
collection: collectionSlug
}
});
} else {
results.push(result);
}
}
}
};
if (value) {
value.forEach((relatedDoc, i)=>{
resultPromises.push(createPopulationPromise(relatedDoc, i));
});
}
await Promise.all(resultPromises);
return results;
}
let id = value;
if (isRelatedToManyCollections && value) {
id = value.value;
relatedCollectionSlug = value.relationTo;
}
if (id) {
if (graphQLCollections.some((collection)=>collection.slug === relatedCollectionSlug)) {
const relatedDocument = await context.req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug: relatedCollectionSlug,
currentDepth: 0,
depth: 0,
docID: id,
draft,
fallbackLocale,
locale,
overrideAccess: false,
select,
showHiddenFields: false,
transactionID: context.req.transactionID
}));
if (relatedDocument) {
if (isRelatedToManyCollections) {
return {
relationTo: relatedCollectionSlug,
value: {
...relatedDocument,
collection: relatedCollectionSlug
}
};
}
return relatedDocument;
}
}
return null;
}
return null;
}
};
return {
...objectTypeConfig,
[formatName(field.name)]: relationship
};
},
richText: ({ config, field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: {
type: withNullableType({
type: GraphQLJSON,
field,
forceNullable,
parentIsLocalized
}),
args: {
depth: {
type: GraphQLInt
}
},
extensions: {
field
},
async resolve (parent, args, context) {
let depth = config.defaultDepth;
if (typeof args.depth !== 'undefined') {
depth = args.depth;
}
if (!field?.editor) {
throw new MissingEditorProp(field) // while we allow disabling editor functionality, you should not have any richText fields defined if you do not have an editor
;
}
if (typeof field?.editor === 'function') {
throw new Error('Attempted to access unsanitized rich text editor.');
}
const editor = field?.editor;
// RichText fields have their own depth argument in GraphQL.
// This is why the populationPromise (which populates richtext fields like uploads and relationships)
// is run here again, with the provided depth.
// In the graphql find.ts resolver, the depth is then hard-coded to 0.
// Effectively, this means that the populationPromise for GraphQL is only run here, and not in the find.ts resolver / normal population promise.
if (editor?.graphQLPopulationPromises) {
const fieldPromises = [];
const populationPromises = [];
const populateDepth = field?.maxDepth !== undefined && field?.maxDepth < depth ? field?.maxDepth : depth;
editor?.graphQLPopulationPromises({
context,
depth: populateDepth,
draft: args.draft,
field,
fieldPromises,
findMany: false,
flattenLocales: false,
overrideAccess: false,
parentIsLocalized,
populationPromises,
req: context.req,
showHiddenFields: false,
siblingDoc: parent
});
await Promise.all(fieldPromises);
await Promise.all(populationPromises);
}
return parent[field.name];
}
}
}),
row: ({ field, objectTypeConfig, ...rest })=>field.fields.reduce((objectTypeConfigWithRowFields, subField)=>{
const addSubField = fieldToSchemaMap[subField.type];
if (addSubField) {
return addSubField({
field: subField,
objectTypeConfig: objectTypeConfigWithRowFields,
...rest
});
}
return objectTypeConfigWithRowFields;
}, objectTypeConfig),
select: ({ field, forceNullable, objectTypeConfig, parentIsLocalized, parentName })=>{
const fullName = combineParentName(parentName, field.name);
let type = new GraphQLEnumType({
name: fullName,
values: formatOptions(field)
});
type = field.hasMany ? new GraphQLList(new GraphQLNonNull(type)) : type;
type = withNullableType({
type,
field,
forceNullable,
parentIsLocalized
});
return {
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type,
field
})
};
},
tabs: ({ collectionSlug, config, field, forceNullable, graphqlResult, newlyCreatedBlockType, objectTypeConfig, parentIsLocalized, parentName })=>field.tabs.reduce((tabSchema, tab)=>{
if (tabHasName(tab)) {
const interfaceName = tab?.interfaceName || combineParentName(parentName, toWords(tab.name, true));
if (!graphqlResult.types.groupTypes[interfaceName]) {
const objectType = buildObjectType({
name: interfaceName,
collectionSlug,
config,
fields: tab.fields,
forceNullable,
graphqlResult,
parentIsLocalized: tab.localized || parentIsLocalized,
parentName: interfaceName
});
if (Object.keys(objectType.getFields()).length) {
graphqlResult.types.groupTypes[interfaceName] = objectType;
}
}
if (!graphqlResult.types.groupTypes[interfaceName]) {
return tabSchema;
}
return {
...tabSchema,
[tab.name]: {
type: graphqlResult.types.groupTypes[interfaceName],
resolve (parent, args, context) {
return {
...parent[tab.name],
_id: parent._id ?? parent.id
};
}
}
};
}
return {
...tabSchema,
...tab.fields.reduce((subFieldSchema, subField)=>{
const addSubField = fieldToSchemaMap[subField.type];
if (addSubField) {
return addSubField({
collectionSlug,
config,
field: subField,
forceNullable,
graphqlResult,
newlyCreatedBlockType,
objectTypeConfig: subFieldSchema,
parentIsLocalized,
parentName
});
}
return subFieldSchema;
}, tabSchema)
};
}, objectTypeConfig),
text: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: field.hasMany === true ? new GraphQLList(new GraphQLNonNull(GraphQLString)) : GraphQLString,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
textarea: ({ field, forceNullable, objectTypeConfig, parentIsLocalized })=>({
...objectTypeConfig,
[formatName(field.name)]: formattedNameResolver({
type: withNullableType({
type: GraphQLString,
field,
forceNullable,
parentIsLocalized
}),
field
})
}),
upload: ({ config, field, forceNullable, graphqlResult, newlyCreatedBlockType, objectTypeConfig, parentIsLocalized, parentName })=>{
const { relationTo } = field;
const isRelatedToManyCollections = Array.isArray(relationTo);
const hasManyValues = field.hasMany;
const relationshipName = combineParentName(parentName, toWords(field.name, true));
let type;
let relationToType = null;
const graphQLCollections = config.collections.filter((collectionConfig)=>collectionConfig.graphQL !== false);
if (Array.isArray(relationTo)) {
relationToType = new GraphQLEnumType({
name: `${relationshipName}_RelationTo`,
values: relationTo.reduce((relations, relation)=>({
...relations,
[formatName(relation)]: {
value: relation
}
}), {})
});
const types = relationTo.map((relation)=>graphqlResult.collections[relation].graphQL.type);
type = new GraphQLObjectType({
name: `${relationshipName}_Relationship`,
fields: {
relationTo: {
type: relationToType
},
value: {
type: new GraphQLUnionType({
name: relationshipName,
resolveType (data) {
return graphqlResult.collections[data.collection].graphQL.type.name;
},
types
})
}
}
});
} else {
;
({ type } = graphqlResult.collections[relationTo].graphQL);
}
// If the relationshipType is undefined at this point,
// it can be assumed that this blockType can have a relationship
// to itself. Therefore, we set the relationshipType equal to the blockType
// that is currently being created.
type = type || newlyCreatedBlockType;
const relationshipArgs = {};
const relationsUseDrafts = (Array.isArray(relationTo) ? relationTo : [
relationTo
]).some((relation)=>graphqlResult.collections[relation].config.versions?.drafts);
if (relationsUseDrafts) {
relationshipArgs.draft = {
type: GraphQLBoolean
};
}
if (config.localization) {
relationshipArgs.locale = {
type: graphqlResult.types.localeInputType
};
relationshipArgs.fallbackLocale = {
type: graphqlResult.types.fallbackLocaleInputType
};
}
const relationship = {
type: withNullableType({
type: hasManyValues ? new GraphQLList(new GraphQLNonNull(type)) : type,
field,
forceNullable,
parentIsLocalized
}),
args: relationshipArgs,
extensions: {
complexity: typeof field?.graphQL?.complexity === 'number' ? field.graphQL.complexity : 10,
field
},
async resolve (parent, args, context, info) {
const value = parent[field.name];
const locale = args.locale || context.req.locale;
const fallbackLocale = args.fallbackLocale || context.req.fallbackLocale;
let relatedCollectionSlug = field.relationTo;
const draft = Boolean(args.draft ?? context.req.query?.draft);
const select = resolveSelect(info, context.select);
if (hasManyValues) {
const results = [];
const resultPromises = [];
const createPopulationPromise = async (relatedDoc, i)=>{
let id = relatedDoc;
let collectionSlug = field.relationTo;
const isValidGraphQLCollection = isRelatedToManyCollections ? graphQLCollections.some((collection)=>collectionSlug.includes(collection.slug)) : graphQLCollections.some((collection)=>collectionSlug === collection.slug);
if (isValidGraphQLCollection) {
if (isRelatedToManyCollections) {
collectionSlug = relatedDoc.relationTo;
id = relatedDoc.value;
}
const result = await context.req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug: collectionSlug,
currentDepth: 0,
depth: 0,
docID: id,
draft,
fallbackLocale,
locale,
overrideAccess: false,
select,
showHiddenFields: false,
transactionID: context.req.transactionID
}));
if (result) {
if (isRelatedToManyCollections) {
results.push({
relationTo: collectionSlug,
value: {
...result,
collection: collectionSlug
}
});
} else {
results.push(result);
}
}
}
};
if (value) {
value.forEach((relatedDoc, i)=>{
resultPromises.push(createPopulationPromise(relatedDoc, i));
});
}
await Promise.all(resultPromises);
return results;
}
let id = value;
if (isRelatedToManyCollections && value) {
id = value.value;
relatedCollectionSlug = value.relationTo;
}
if (id) {
if (graphQLCollections.some((collection)=>collection.slug === relatedCollectionSlug)) {
const relatedDocument = await context.req.payloadDataLoader.load(createDataloaderCacheKey({
collectionSlug: relatedCollectionSlug,
currentDepth: 0,
depth: 0,
docID: id,
draft,
fallbackLocale,
locale,
overrideAccess: false,
select,
showHiddenFields: false,
transactionID: context.req.transactionID
}));
if (relatedDocument) {
if (isRelatedToManyCollections) {
return {
relationTo: relatedCollectionSlug,
value: {
...relatedDocument,
collection: relatedCollectionSlug
}
};
}
return relatedDocument;
}
}
return null;
}
return null;
}
};
return {
...objectTypeConfig,
[formatName(field.name)]: relationship
};
}
};
//# sourceMappingURL=fieldToSchemaMap.js.map
@@ -0,0 +1,57 @@
"use strict";
exports.closestTo = closestTo;
var _index = require("./_lib/normalizeDates.cjs");
var _index2 = require("./closestIndexTo.cjs");
var _index3 = require("./constructFrom.cjs");
/**
* The {@link closestTo} function options.
*/
/**
* The {@link closestTo} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
/**
* @name closestTo
* @category Common Helpers
* @summary Return a date from the array closest to the given date.
*
* @description
* Return a date from the array closest to the given date.
*
* @typeParam DateToCompare - Date to compare argument type.
* @typeParam DatesType - Dates array argument type.
* @typeParam Options - Options type.
*
* @param dateToCompare - The date to compare with
* @param dates - The array to search
*
* @returns The date from the array closest to the given date or undefined if no valid value is given
*
* @example
* // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?
* const dateToCompare = new Date(2015, 8, 6)
* const result = closestTo(dateToCompare, [
* new Date(2000, 0, 1),
* new Date(2030, 0, 1)
* ])
* //=> Tue Jan 01 2030 00:00:00
*/
function closestTo(dateToCompare, dates, options) {
const [dateToCompare_, ...dates_] = (0, _index.normalizeDates)(
options?.in,
dateToCompare,
...dates,
);
const index = (0, _index2.closestIndexTo)(dateToCompare_, dates_);
if (typeof index === "number" && isNaN(index))
return (0, _index3.constructFrom)(dateToCompare_, NaN);
if (index !== undefined) return dates_[index];
}
@@ -0,0 +1,29 @@
import { expectType } from "tsd";
import pino from '../../pino';
import P, { pino as pinoNamed } from "../../pino";
import * as pinoStar from "../../pino";
import pinoCjsImport = require ("../../pino");
const pinoCjs = require("../../pino");
const { P: pinoCjsNamed } = require('pino')
const log = pino();
expectType<P.LogFn>(log.info);
expectType<P.LogFn>(log.error);
expectType<pino.Logger>(pinoNamed());
expectType<P.Logger>(pinoNamed());
expectType<pino.Logger>(pinoStar.default());
expectType<pino.Logger>(pinoStar.pino());
// expectType<pino.Logger>(pinoCjsImport.default());
expectType<pino.Logger>(pinoCjsImport.pino());
expectType<any>(pinoCjsNamed());
expectType<any>(pinoCjs());
const levelChangeEventListener: P.LevelChangeEventListener = (
lvl: P.LevelWithSilent | string,
val: number,
prevLvl: P.LevelWithSilent | string,
prevVal: number,
) => {}
expectType<P.LevelChangeEventListener>(levelChangeEventListener)
@@ -0,0 +1,8 @@
"use strict";
exports.differenceInDaysWithOptions = void 0;
var _index = require("../differenceInDays.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const differenceInDaysWithOptions = (exports.differenceInDaysWithOptions = (0,
_index2.convertToFP)(_index.differenceInDays, 3));
@@ -0,0 +1,229 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.render = void 0;
/*
* Module dependencies
*/
var ElementType = __importStar(require("domelementtype"));
var entities_1 = require("entities");
/**
* Mixed-case SVG and MathML tags & attributes
* recognized by the HTML parser.
*
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
*/
var foreignNames_js_1 = require("./foreignNames.js");
var unencodedElements = new Set([
"style",
"script",
"xmp",
"iframe",
"noembed",
"noframes",
"plaintext",
"noscript",
]);
function replaceQuotes(value) {
return value.replace(/"/g, "&quot;");
}
/**
* Format attributes
*/
function formatAttributes(attributes, opts) {
var _a;
if (!attributes)
return;
var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false
? replaceQuotes
: opts.xmlMode || opts.encodeEntities !== "utf8"
? entities_1.encodeXML
: entities_1.escapeAttribute;
return Object.keys(attributes)
.map(function (key) {
var _a, _b;
var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case attribute names */
key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
}
if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
return key;
}
return "".concat(key, "=\"").concat(encode(value), "\"");
})
.join(" ");
}
/**
* Self-enclosing tags
*/
var singleTag = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
/**
* Renders a DOM node or an array of DOM nodes to a string.
*
* Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
*
* @param node Node to be rendered.
* @param options Changes serialization behavior
*/
function render(node, options) {
if (options === void 0) { options = {}; }
var nodes = "length" in node ? node : [node];
var output = "";
for (var i = 0; i < nodes.length; i++) {
output += renderNode(nodes[i], options);
}
return output;
}
exports.render = render;
exports.default = render;
function renderNode(node, options) {
switch (node.type) {
case ElementType.Root:
return render(node.children, options);
// @ts-expect-error We don't use `Doctype` yet
case ElementType.Doctype:
case ElementType.Directive:
return renderDirective(node);
case ElementType.Comment:
return renderComment(node);
case ElementType.CDATA:
return renderCdata(node);
case ElementType.Script:
case ElementType.Style:
case ElementType.Tag:
return renderTag(node, options);
case ElementType.Text:
return renderText(node, options);
}
}
var foreignModeIntegrationPoints = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignObject",
"desc",
"title",
]);
var foreignElements = new Set(["svg", "math"]);
function renderTag(elem, opts) {
var _a;
// Handle SVG / MathML in HTML
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case element names */
elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
/* Exit foreign mode at integration points */
if (elem.parent &&
foreignModeIntegrationPoints.has(elem.parent.name)) {
opts = __assign(__assign({}, opts), { xmlMode: false });
}
}
if (!opts.xmlMode && foreignElements.has(elem.name)) {
opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
}
var tag = "<".concat(elem.name);
var attribs = formatAttributes(elem.attribs, opts);
if (attribs) {
tag += " ".concat(attribs);
}
if (elem.children.length === 0 &&
(opts.xmlMode
? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
opts.selfClosingTags !== false
: // User explicitly asked for self-closing tags, even in HTML mode
opts.selfClosingTags && singleTag.has(elem.name))) {
if (!opts.xmlMode)
tag += " ";
tag += "/>";
}
else {
tag += ">";
if (elem.children.length > 0) {
tag += render(elem.children, opts);
}
if (opts.xmlMode || !singleTag.has(elem.name)) {
tag += "</".concat(elem.name, ">");
}
}
return tag;
}
function renderDirective(elem) {
return "<".concat(elem.data, ">");
}
function renderText(elem, opts) {
var _a;
var data = elem.data || "";
// If entities weren't decoded, no need to encode them back
if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&
!(!opts.xmlMode &&
elem.parent &&
unencodedElements.has(elem.parent.name))) {
data =
opts.xmlMode || opts.encodeEntities !== "utf8"
? (0, entities_1.encodeXML)(data)
: (0, entities_1.escapeText)(data);
}
return data;
}
function renderCdata(elem) {
return "<![CDATA[".concat(elem.children[0].data, "]]>");
}
function renderComment(elem) {
return "<!--".concat(elem.data, "-->");
}
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLPositiveFloat = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
exports.GraphQLPositiveFloat = new graphql_1.GraphQLScalarType({
name: 'PositiveFloat',
description: 'Floats that will have a value greater than 0.',
serialize(value) {
return (0, utilities_js_1.processValue)(value, 'PositiveFloat');
},
parseValue(value) {
return (0, utilities_js_1.processValue)(value, 'PositiveFloat');
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.FLOAT && ast.kind !== graphql_1.Kind.INT) {
throw (0, error_js_1.createGraphQLError)(`Can only validate floating point numbers as positive floating point numbers but got a: ${ast.kind}`, { nodes: ast });
}
return (0, utilities_js_1.processValue)(ast.value, 'PositiveFloat');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'PositiveFloat',
type: 'number',
minimum: 0,
},
},
});
@@ -0,0 +1,9 @@
import * as React from 'react';
import { ReactElement } from 'react';
import { TransitionProps } from 'react-transition-group/Transition';
import { MultiValueProps } from '../components/MultiValue';
import { GroupBase } from '../types';
export declare type MultiValueComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => ReactElement;
export declare type AnimatedMultiValueProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = MultiValueProps<Option, IsMulti, Group> & Partial<TransitionProps>;
declare const AnimatedMultiValue: (WrappedComponent: MultiValueComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ in: inProp, onExited, ...props }: AnimatedMultiValueProps<Option, IsMulti, Group>) => React.JSX.Element;
export default AnimatedMultiValue;
@@ -0,0 +1,137 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(લ|જ|થ|ઠ્ઠ|મ)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ઈસપૂ|ઈસ)/i,
abbreviated: /^(ઈ\.સ\.પૂર્વે|ઈ\.સ\.)/i,
wide: /^(ઈસવીસન\sપૂર્વે|ઈસવીસન)/i,
};
const parseEraPatterns = {
any: [/^ઈસપૂ/i, /^ઈસ/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](લો|જો|થો)? ત્રિમાસ/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
// eslint-disable-next-line no-misleading-character-class
narrow: /^[જાફેમાએમેજૂજુઓસઓનડિ]/i,
abbreviated:
/^(જાન્યુ|ફેબ્રુ|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઈ|ઑગસ્ટ|સપ્ટે|ઓક્ટો|નવે|ડિસે)/i,
wide: /^(જાન્યુઆરી|ફેબ્રુઆરી|માર્ચ|એપ્રિલ|મે|જૂન|જુલાઇ|ઓગસ્ટ|સપ્ટેમ્બર|ઓક્ટોબર|નવેમ્બર|ડિસેમ્બર)/i,
};
const parseMonthPatterns = {
narrow: [
/^જા/i,
/^ફે/i,
/^મા/i,
/^એ/i,
/^મે/i,
/^જૂ/i,
/^જુ/i,
/^ઑગ/i,
/^સ/i,
/^ઓક્ટો/i,
/^ન/i,
/^ડિ/i,
],
any: [
/^જા/i,
/^ફે/i,
/^મા/i,
/^એ/i,
/^મે/i,
/^જૂ/i,
/^જુ/i,
/^ઑગ/i,
/^સ/i,
/^ઓક્ટો/i,
/^ન/i,
/^ડિ/i,
],
};
const matchDayPatterns = {
narrow: /^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,
short: /^(ર|સો|મં|બુ|ગુ|શુ|શ)/i,
abbreviated: /^(રવિ|સોમ|મંગળ|બુધ|ગુરુ|શુક્ર|શનિ)/i,
wide: /^(રવિવાર|સોમવાર|મંગળવાર|બુધવાર|ગુરુવાર|શુક્રવાર|શનિવાર)/i,
};
const parseDayPatterns = {
narrow: [/^ર/i, /^સો/i, /^મં/i, /^બુ/i, /^ગુ/i, /^શુ/i, /^શ/i],
any: [/^ર/i, /^સો/i, /^મં/i, /^બુ/i, /^ગુ/i, /^શુ/i, /^શ/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|મ\.?|સ|બ|સાં|રા)/i,
any: /^(a|p|મ\.?|સ|બ|સાં|રા)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^મ\.?/i,
noon: /^બ/i,
morning: /સ/i,
afternoon: /બ/i,
evening: /સાં/i,
night: /રા/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/libsql/sqlite3/index.ts"],"sourcesContent":["import { type Client, type Config, createClient } from '@libsql/client/sqlite3';\nimport { type DrizzleConfig, isConfig } from '~/utils.ts';\nimport { construct, type LibSQLDatabase } from '../driver-core.ts';\n\nexport function drizzle<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTClient extends Client = Client,\n>(\n\t...params: [\n\t\tTClient | string,\n\t] | [\n\t\tTClient | string,\n\t\tDrizzleConfig<TSchema>,\n\t] | [\n\t\t(\n\t\t\t& DrizzleConfig<TSchema>\n\t\t\t& ({\n\t\t\t\tconnection: string | Config;\n\t\t\t} | {\n\t\t\t\tclient: TClient;\n\t\t\t})\n\t\t),\n\t]\n): LibSQLDatabase<TSchema> & {\n\t$client: TClient;\n} {\n\tif (typeof params[0] === 'string') {\n\t\tconst instance = createClient({\n\t\t\turl: params[0],\n\t\t});\n\n\t\treturn construct(instance, params[1]) as any;\n\t}\n\n\tif (isConfig(params[0])) {\n\t\tconst { connection, client, ...drizzleConfig } = params[0] as\n\t\t\t& { connection?: Config; client?: TClient }\n\t\t\t& DrizzleConfig<TSchema>;\n\n\t\tif (client) return construct(client, drizzleConfig) as any;\n\n\t\tconst instance = typeof connection === 'string' ? createClient({ url: connection }) : createClient(connection!);\n\n\t\treturn construct(instance, drizzleConfig) as any;\n\t}\n\n\treturn construct(params[0] as TClient, params[1] as DrizzleConfig<TSchema> | undefined) as any;\n}\n\nexport namespace drizzle {\n\texport function mock<TSchema extends Record<string, unknown> = Record<string, never>>(\n\t\tconfig?: DrizzleConfig<TSchema>,\n\t): LibSQLDatabase<TSchema> & {\n\t\t$client: '$client is not available on drizzle.mock()';\n\t} {\n\t\treturn construct({} as any, config) as any;\n\t}\n}\n"],"mappings":"AAAA,SAAmC,oBAAoB;AACvD,SAA6B,gBAAgB;AAC7C,SAAS,iBAAsC;AAExC,SAAS,WAIZ,QAiBF;AACD,MAAI,OAAO,OAAO,CAAC,MAAM,UAAU;AAClC,UAAM,WAAW,aAAa;AAAA,MAC7B,KAAK,OAAO,CAAC;AAAA,IACd,CAAC;AAED,WAAO,UAAU,UAAU,OAAO,CAAC,CAAC;AAAA,EACrC;AAEA,MAAI,SAAS,OAAO,CAAC,CAAC,GAAG;AACxB,UAAM,EAAE,YAAY,QAAQ,GAAG,cAAc,IAAI,OAAO,CAAC;AAIzD,QAAI,OAAQ,QAAO,UAAU,QAAQ,aAAa;AAElD,UAAM,WAAW,OAAO,eAAe,WAAW,aAAa,EAAE,KAAK,WAAW,CAAC,IAAI,aAAa,UAAW;AAE9G,WAAO,UAAU,UAAU,aAAa;AAAA,EACzC;AAEA,SAAO,UAAU,OAAO,CAAC,GAAc,OAAO,CAAC,CAAuC;AACvF;AAAA,CAEO,CAAUA,aAAV;AACC,WAAS,KACf,QAGC;AACD,WAAO,UAAU,CAAC,GAAU,MAAM;AAAA,EACnC;AANO,EAAAA,SAAS;AAAA,GADA;","names":["drizzle"]}
@@ -0,0 +1 @@
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
@@ -0,0 +1,73 @@
import { type Cache } from "../cache/core/cache.cjs";
import type { WithCacheConfig } from "../cache/core/types.cjs";
import { entityKind } from "../entity.cjs";
import type { TablesRelationalConfig } from "../relations.cjs";
import type { PreparedQuery } from "../session.cjs";
import { type Query, type SQL } from "../sql/index.cjs";
import type { NeonAuthToken } from "../utils.cjs";
import { PgDatabase } from "./db.cjs";
import type { PgDialect } from "./dialect.cjs";
import type { SelectedFieldsOrdered } from "./query-builders/select.types.cjs";
export interface PreparedQueryConfig {
execute: unknown;
all: unknown;
values: unknown;
}
export declare abstract class PgPreparedQuery<T extends PreparedQueryConfig> implements PreparedQuery {
protected query: Query;
private cache;
private queryMetadata;
private cacheConfig?;
constructor(query: Query, cache: Cache | undefined, queryMetadata: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined, cacheConfig?: WithCacheConfig | undefined);
protected authToken?: NeonAuthToken;
getQuery(): Query;
mapResult(response: unknown, _isFromBatch?: boolean): unknown;
static readonly [entityKind]: string;
abstract execute(placeholderValues?: Record<string, unknown>): Promise<T['execute']>;
}
export interface PgTransactionConfig {
isolationLevel?: 'read uncommitted' | 'read committed' | 'repeatable read' | 'serializable';
accessMode?: 'read only' | 'read write';
deferrable?: boolean;
}
export declare abstract class PgSession<TQueryResult extends PgQueryResultHKT = PgQueryResultHKT, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = Record<string, never>> {
protected dialect: PgDialect;
static readonly [entityKind]: string;
constructor(dialect: PgDialect);
abstract prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(query: Query, fields: SelectedFieldsOrdered | undefined, name: string | undefined, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => T['execute'], queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
}, cacheConfig?: WithCacheConfig): PgPreparedQuery<T>;
execute<T>(query: SQL): Promise<T>;
all<T = unknown>(query: SQL): Promise<T[]>;
count(sql: SQL): Promise<number>;
abstract transaction<T>(transaction: (tx: PgTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>, config?: PgTransactionConfig): Promise<T>;
}
export declare abstract class PgTransaction<TQueryResult extends PgQueryResultHKT, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = Record<string, never>> extends PgDatabase<TQueryResult, TFullSchema, TSchema> {
protected schema: {
fullSchema: Record<string, unknown>;
schema: TSchema;
tableNamesMap: Record<string, string>;
} | undefined;
protected readonly nestedIndex: number;
static readonly [entityKind]: string;
constructor(dialect: PgDialect, session: PgSession<any, any, any>, schema: {
fullSchema: Record<string, unknown>;
schema: TSchema;
tableNamesMap: Record<string, string>;
} | undefined, nestedIndex?: number);
rollback(): never;
setTransaction(config: PgTransactionConfig): Promise<void>;
abstract transaction<T>(transaction: (tx: PgTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export interface PgQueryResultHKT {
readonly $brand: 'PgQueryResultHKT';
readonly row: unknown;
readonly type: unknown;
}
export type PgQueryResultKind<TKind extends PgQueryResultHKT, TRow> = (TKind & {
readonly row: TRow;
})['type'];
@@ -0,0 +1 @@
{"version":3,"file":"triangle-right.js","sources":["../../../src/icons/triangle-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TriangleRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMThhMiAyIDAgMCAxLTIgMkgzYy0xLjEgMC0xLjMtLjYtLjQtMS4zTDIwLjQgNC4zYy45LS43IDEuNi0uNCAxLjYuN1oiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/triangle-right\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 TriangleRight = createLucideIcon('TriangleRight', [\n [\n 'path',\n {\n d: 'M22 18a2 2 0 0 1-2 2H3c-1.1 0-1.3-.6-.4-1.3L20.4 4.3c.9-.7 1.6-.4 1.6.7Z',\n key: '183wce',\n },\n ],\n]);\n\nexport default TriangleRight;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CACtD,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;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,10 @@
"use strict";
exports.constructFrom = void 0;
var _index = require("../constructFrom.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const constructFrom = (exports.constructFrom = (0, _index2.convertToFP)(
_index.constructFrom,
2,
));
@@ -0,0 +1 @@
{"version":3,"file":"dataloader.d.ts","sourceRoot":"","sources":["../../src/collections/dataloader.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AA0JnD,eAAO,MAAM,aAAa,QAAS,cAAc;;0CAgBhD,CAAA;AA4CD,KAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,mBAAmB,CAAA;IACnC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,gBAAgB,EAAE,OAAO,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;CAC1D,CAAA;AACD,eAAO,MAAM,wBAAwB,sJAalC,kBAAkB,KAAG,MAcpB,CAAA"}
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/folders/hooks/reparentChildFolder.ts"],"sourcesContent":["import type { CollectionAfterChangeHook, Payload } from '../../index.js'\n\nimport { extractID } from '../../utilities/extractID.js'\n\ntype Args = {\n folderCollectionSlug: string\n folderFieldName: string\n folderID: number | string\n parentIDToFind: number | string\n payload: Payload\n}\n\n/**\n * Determines if a child folder belongs to a parent folder by\n * recursively checking upwards through the folder hierarchy.\n */\nasync function isChildOfFolder({\n folderCollectionSlug,\n folderFieldName,\n folderID,\n parentIDToFind,\n payload,\n}: Args): Promise<boolean> {\n const parentFolder = await payload.findByID({\n id: folderID,\n collection: folderCollectionSlug,\n })\n\n const parentFolderID = parentFolder[folderFieldName]\n ? extractID(parentFolder[folderFieldName])\n : undefined\n\n if (!parentFolderID) {\n // made it to the root\n return false\n }\n\n if (parentFolderID === parentIDToFind) {\n // found match, would be cyclic\n return true\n }\n\n return isChildOfFolder({\n folderCollectionSlug,\n folderFieldName,\n folderID: parentFolderID,\n parentIDToFind,\n payload,\n })\n}\n\n/**\n * If a parent is moved into a child folder, we need to re-parent the child\n * \n * @example\n * \n * ```ts\n → F1\n → F2\n → F2A\n → F3\n\n Moving F1 → F2A becomes:\n\n → F2A\n → F1\n → F2\n → F3\n ```\n */\nexport const reparentChildFolder = ({\n folderFieldName,\n}: {\n folderFieldName: string\n}): CollectionAfterChangeHook => {\n return async ({ doc, previousDoc, req }) => {\n if (\n previousDoc[folderFieldName] !== doc[folderFieldName] &&\n doc[folderFieldName] &&\n req.payload.config.folders\n ) {\n const newParentFolderID = extractID(doc[folderFieldName])\n const isMovingToChild = newParentFolderID\n ? await isChildOfFolder({\n folderCollectionSlug: req.payload.config.folders.slug,\n folderFieldName,\n folderID: newParentFolderID,\n parentIDToFind: doc.id,\n payload: req.payload,\n })\n : false\n\n if (isMovingToChild) {\n // if the folder was moved into a child folder, the child folder needs\n // to be re-parented with the parent of the folder that was moved\n await req.payload.update({\n id: newParentFolderID,\n collection: req.payload.config.folders.slug,\n data: {\n [folderFieldName]: previousDoc[folderFieldName]\n ? extractID(previousDoc[folderFieldName])\n : null,\n },\n req,\n })\n }\n }\n }\n}\n"],"names":["extractID","isChildOfFolder","folderCollectionSlug","folderFieldName","folderID","parentIDToFind","payload","parentFolder","findByID","id","collection","parentFolderID","undefined","reparentChildFolder","doc","previousDoc","req","config","folders","newParentFolderID","isMovingToChild","slug","update","data"],"mappings":"AAEA,SAASA,SAAS,QAAQ,+BAA8B;AAUxD;;;CAGC,GACD,eAAeC,gBAAgB,EAC7BC,oBAAoB,EACpBC,eAAe,EACfC,QAAQ,EACRC,cAAc,EACdC,OAAO,EACF;IACL,MAAMC,eAAe,MAAMD,QAAQE,QAAQ,CAAC;QAC1CC,IAAIL;QACJM,YAAYR;IACd;IAEA,MAAMS,iBAAiBJ,YAAY,CAACJ,gBAAgB,GAChDH,UAAUO,YAAY,CAACJ,gBAAgB,IACvCS;IAEJ,IAAI,CAACD,gBAAgB;QACnB,sBAAsB;QACtB,OAAO;IACT;IAEA,IAAIA,mBAAmBN,gBAAgB;QACrC,+BAA+B;QAC/B,OAAO;IACT;IAEA,OAAOJ,gBAAgB;QACrBC;QACAC;QACAC,UAAUO;QACVN;QACAC;IACF;AACF;AAEA;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,MAAMO,sBAAsB,CAAC,EAClCV,eAAe,EAGhB;IACC,OAAO,OAAO,EAAEW,GAAG,EAAEC,WAAW,EAAEC,GAAG,EAAE;QACrC,IACED,WAAW,CAACZ,gBAAgB,KAAKW,GAAG,CAACX,gBAAgB,IACrDW,GAAG,CAACX,gBAAgB,IACpBa,IAAIV,OAAO,CAACW,MAAM,CAACC,OAAO,EAC1B;YACA,MAAMC,oBAAoBnB,UAAUc,GAAG,CAACX,gBAAgB;YACxD,MAAMiB,kBAAkBD,oBACpB,MAAMlB,gBAAgB;gBACpBC,sBAAsBc,IAAIV,OAAO,CAACW,MAAM,CAACC,OAAO,CAACG,IAAI;gBACrDlB;gBACAC,UAAUe;gBACVd,gBAAgBS,IAAIL,EAAE;gBACtBH,SAASU,IAAIV,OAAO;YACtB,KACA;YAEJ,IAAIc,iBAAiB;gBACnB,sEAAsE;gBACtE,iEAAiE;gBACjE,MAAMJ,IAAIV,OAAO,CAACgB,MAAM,CAAC;oBACvBb,IAAIU;oBACJT,YAAYM,IAAIV,OAAO,CAACW,MAAM,CAACC,OAAO,CAACG,IAAI;oBAC3CE,MAAM;wBACJ,CAACpB,gBAAgB,EAAEY,WAAW,CAACZ,gBAAgB,GAC3CH,UAAUe,WAAW,CAACZ,gBAAgB,IACtC;oBACN;oBACAa;gBACF;YACF;QACF;IACF;AACF,EAAC"}
@@ -0,0 +1,46 @@
# `@img/sharp-libvips-linuxmusl-arm64`
Prebuilt libvips and dependencies for use with sharp on Linux (musl) 64-bit ARM.
## Licensing
This software contains third-party libraries
used under the terms of the following licences:
| Library | Used under the terms of |
|---------------|-----------------------------------------------------------------------------------------------------------|
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
| cairo | Mozilla Public License 2.0 |
| cgif | MIT Licence |
| expat | MIT Licence |
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
| fribidi | LGPLv3 |
| glib | LGPLv3 |
| harfbuzz | MIT Licence |
| highway | Apache-2.0 License, BSD 3-Clause |
| lcms | MIT Licence |
| libarchive | BSD 2-Clause |
| libexif | LGPLv3 |
| libffi | MIT Licence |
| libheif | LGPLv3 |
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
| libnsgif | MIT Licence |
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
| librsvg | LGPLv3 |
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
| libvips | LGPLv3 |
| libwebp | New BSD License |
| libxml2 | MIT Licence |
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
| pango | LGPLv3 |
| pixman | MIT Licence |
| proxy-libintl | LGPLv3 |
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
Use of libraries under the terms of the LGPLv3 is via the
"any later version" clause of the LGPLv2 or LGPLv2.1.
Please report any errors or omissions via
https://github.com/lovell/sharp-libvips/issues/new
@@ -0,0 +1,21 @@
import type { DateArg } from "./types.js";
/**
* @name isThisSecond
* @category Second Helpers
* @summary Is the given date in the same second as the current date?
* @pure false
*
* @description
* Is the given date in the same second as the current date?
*
* @param date - The date to check
*
* @returns The date is in this second
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:30:15.000 in this second?
* const result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))
* //=> true
*/
export declare function isThisSecond(date: DateArg<Date> & {}): boolean;
@@ -0,0 +1,2 @@
import { curryRight } from "./index";
export = curryRight;
@@ -0,0 +1,19 @@
interface SentryTrpcMiddlewareOptions {
/** Whether to include procedure inputs in reported events. Defaults to `false`. */
attachRpcInput?: boolean;
forceTransaction?: boolean;
}
export interface SentryTrpcMiddlewareArguments<T> {
path?: unknown;
type?: unknown;
next: () => T;
rawInput?: unknown;
getRawInput?: () => Promise<unknown>;
}
type SentryTrpcMiddleware<T> = T extends Promise<unknown> ? T : Promise<T>;
/**
* Sentry tRPC middleware that captures errors and creates spans for tRPC procedures.
*/
export declare function trpcMiddleware(options?: SentryTrpcMiddlewareOptions): <T>(opts: SentryTrpcMiddlewareArguments<T>) => SentryTrpcMiddleware<T>;
export {};
//# sourceMappingURL=trpc.d.ts.map
@@ -0,0 +1,34 @@
import type { ClientFieldSchemaMap, Data, DocumentPreferences, Field, FieldSchemaMap, FieldState, FormState, Operation, PayloadRequest, SanitizedFieldPermissions } from 'payload';
export type RenderFieldArgs = {
clientFieldSchemaMap?: ClientFieldSchemaMap;
collectionSlug: string;
data: Data;
fieldConfig: Field;
fieldSchemaMap: FieldSchemaMap;
fieldState: FieldState;
/**
* If set to true, it will force creating a clientField based on the passed fieldConfig instead of pulling
* the client field from the clientFieldSchemaMap. This is useful if the passed fieldConfig differs from the one in the schema map,
* e.g. when calling the render-field server function and passing a field config override.
*/
forceCreateClientField?: boolean;
formState: FormState;
id?: number | string;
indexPath: string;
lastRenderedPath: string;
mockRSCs?: boolean;
operation: Operation;
parentPath: string;
parentSchemaPath: string;
path: string;
permissions: SanitizedFieldPermissions;
preferences: DocumentPreferences;
previousFieldState: FieldState;
readOnly?: boolean;
renderAllFields: boolean;
req: PayloadRequest;
schemaPath: string;
siblingData: Data;
};
export type RenderFieldMethod = (args: RenderFieldArgs) => void;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,85 @@
import { calculateDefaultValues } from './calculateDefaultValues/index.js';
import { iterateFields } from './iterateFields.js';
export const fieldSchemasToFormState = async ({
id,
clientFieldSchemaMap,
collectionSlug,
data = {},
documentData,
fields,
fieldSchemaMap,
initialBlockData,
mockRSCs,
operation,
permissions,
preferences,
previousFormState,
readOnly,
renderAllFields,
renderFieldFn,
req,
schemaPath,
select,
selectMode,
skipValidation
}) => {
if (!clientFieldSchemaMap && renderFieldFn) {
// eslint-disable-next-line no-console
console.warn('clientFieldSchemaMap is not passed to fieldSchemasToFormState - this will reduce performance');
}
if (fields && fields.length) {
const state = {};
const dataWithDefaultValues = {
...data
};
await calculateDefaultValues({
id,
data: dataWithDefaultValues,
fields,
locale: req.locale,
req,
select,
selectMode,
siblingData: dataWithDefaultValues,
user: req.user
});
let fullData = dataWithDefaultValues;
if (documentData) {
// By the time this function is used to get form state for nested forms, their default values should have already been calculated
// => no need to run calculateDefaultValues here
fullData = documentData;
}
await iterateFields({
id,
addErrorPathToParent: null,
blockData: initialBlockData,
clientFieldSchemaMap,
collectionSlug,
data: dataWithDefaultValues,
fields,
fieldSchemaMap,
fullData,
mockRSCs,
operation,
parentIndexPath: '',
parentPassesCondition: true,
parentPath: '',
parentSchemaPath: schemaPath,
permissions,
preferences,
previousFormState,
readOnly,
renderAllFields,
renderFieldFn,
req,
select,
selectMode,
skipValidation,
state
});
return state;
}
return {};
};
export { iterateFields };
//# sourceMappingURL=index.js.map
@@ -0,0 +1,92 @@
import { debug, browserPerformanceTimeOrigin, timestampInSeconds, getCurrentScope, htmlTreeAsString, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
import { addClsInstrumentationHandler } from './instrument.js';
import { supportsWebVital, listenForWebVitalReportEvents, msToSec, startStandaloneWebVitalSpan } from './utils.js';
/**
* Starts tracking the Cumulative Layout Shift on the current page and collects the value once
*
* - the page visibility is hidden
* - a navigation span is started (to stop CLS measurement for SPA soft navigations)
*
* Once either of these events triggers, the CLS value is sent as a standalone span and we stop
* measuring CLS.
*/
function trackClsAsStandaloneSpan(client) {
let standaloneCLsValue = 0;
let standaloneClsEntry;
if (!supportsWebVital('layout-shift')) {
return;
}
const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {
const entry = metric.entries[metric.entries.length - 1] ;
if (!entry) {
return;
}
standaloneCLsValue = metric.value;
standaloneClsEntry = entry;
}, true);
listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {
_sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId, reportEvent);
cleanupClsHandler();
});
}
/**
* Exported only for testing!
*/
function _sendStandaloneClsSpan(
clsValue,
entry,
pageloadSpanId,
reportEvent,
) {
DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);
const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();
const routeName = getCurrentScope().getScopeData().transactionName;
const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';
const attributes = {
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',
[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,
// attach the pageload span id to the CLS span so that we can link them in the UI
'sentry.pageload.span_id': pageloadSpanId,
// describes what triggered the web vital to be reported
'sentry.report_event': reportEvent,
};
// Add CLS sources as span attributes to help with debugging layout shifts
// See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift/sources
if (entry?.sources) {
entry.sources.forEach((source, index) => {
attributes[`cls.source.${index + 1}`] = htmlTreeAsString(source.node);
});
}
const span = startStandaloneWebVitalSpan({
name,
transaction: routeName,
attributes,
startTime,
});
if (span) {
span.addEvent('cls', {
[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',
[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,
});
// LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here
// see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration
span.end(startTime);
}
}
export { _sendStandaloneClsSpan, trackClsAsStandaloneSpan };
//# sourceMappingURL=cls.js.map
@@ -0,0 +1,2 @@
export declare const VERSION = "2.5.0";
//# sourceMappingURL=version.d.ts.map
@@ -0,0 +1,27 @@
import { nextDay } from "./nextDay.mjs";
/**
* @name nextSaturday
* @category Weekday Helpers
* @summary When is the next Saturday?
*
* @description
* When is the next Saturday?
*
* @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 start counting from
*
* @returns The next Saturday
*
* @example
* // When is the next Saturday after Mar, 22, 2020?
* const result = nextSaturday(new Date(2020, 2, 22))
* //=> Sat Mar 28 2020 00:00:00
*/
export function nextSaturday(date) {
return nextDay(date, 6);
}
// Fallback for modularized imports:
export default nextSaturday;
@@ -0,0 +1,34 @@
/**
* This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case.
* https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js
* It had the following license:
*
* (The MIT License)
*
* Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
* Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* Parses a cookie string
*/
export declare function parseCookie(str: string): Record<string, string>;
//# sourceMappingURL=cookie.d.ts.map
@@ -0,0 +1,46 @@
{
"name": "has-flag",
"version": "4.0.0",
"description": "Check if argv has a specific flag",
"license": "MIT",
"repository": "sindresorhus/has-flag",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"has",
"check",
"detect",
"contains",
"find",
"flag",
"cli",
"command-line",
"argv",
"process",
"arg",
"args",
"argument",
"arguments",
"getopt",
"minimist",
"optimist"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"hasSavePermission.js","names":["hasSavePermission","args","collectionSlug","docPermissions","globalSlug","isEditing","Boolean","update","create"],"sources":["../../src/utilities/hasSavePermission.ts"],"sourcesContent":["import type {\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedGlobalPermission,\n} from 'payload'\n\nexport const hasSavePermission = (args: {\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n collectionSlug?: string\n docPermissions: SanitizedDocumentPermissions\n /*\n * Pass either `collectionSlug` or `globalSlug`\n */\n globalSlug?: string\n isEditing: boolean\n}) => {\n const { collectionSlug, docPermissions, globalSlug, isEditing } = args\n\n if (collectionSlug) {\n return Boolean(\n (isEditing && docPermissions?.update) ||\n (!isEditing && (docPermissions as SanitizedCollectionPermission)?.create),\n )\n }\n\n if (globalSlug) {\n return Boolean((docPermissions as SanitizedGlobalPermission)?.update)\n }\n\n return false\n}\n"],"mappings":"AAMA,OAAO,MAAMA,iBAAA,GAAqBC,IAAA;EAYhC,MAAM;IAAEC,cAAc;IAAEC,cAAc;IAAEC,UAAU;IAAEC;EAAS,CAAE,GAAGJ,IAAA;EAElE,IAAIC,cAAA,EAAgB;IAClB,OAAOI,OAAA,CACLD,SAAC,IAAaF,cAAA,EAAgBI,MAAA,IAC3B,CAACF,SAAA,IAAcF,cAAA,EAAkDK,MAAA;EAExE;EAEA,IAAIJ,UAAA,EAAY;IACd,OAAOE,OAAA,CAASH,cAAA,EAA8CI,MAAA;EAChE;EAEA,OAAO;AACT","ignoreList":[]}
@@ -0,0 +1,527 @@
'use strict'
const util = require('../../core/util')
const {
ReadableStreamFrom,
readableStreamClose,
fullyReadBody,
extractMimeType
} = require('./util')
const { FormData, setFormDataState } = require('./formdata')
const { webidl } = require('../webidl')
const assert = require('node:assert')
const { isErrored, isDisturbed } = require('node:stream')
const { isArrayBuffer } = require('node:util/types')
const { serializeAMimeType } = require('./data-url')
const { multipartFormDataParser } = require('./formdata-parser')
const { createDeferredPromise } = require('../../util/promise')
const { parseJSONFromBytes } = require('../infra')
const { utf8DecodeBytes } = require('../../encoding')
const { runtimeFeatures } = require('../../util/runtime-features.js')
const random = runtimeFeatures.has('crypto')
? require('node:crypto').randomInt
: (max) => Math.floor(Math.random() * max)
const textEncoder = new TextEncoder()
function noop () {}
const streamRegistry = new FinalizationRegistry((weakRef) => {
const stream = weakRef.deref()
if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) {
stream.cancel('Response object has been garbage collected').catch(noop)
}
})
/**
* Extract a body with type from a byte sequence or BodyInit object
*
* @param {import('../../../types').BodyInit} object - The BodyInit object to extract from
* @param {boolean} [keepalive=false] - If true, indicates that the body
* @returns {[{stream: ReadableStream, source: any, length: number | null}, string | null]} - Returns a tuple containing the body and its type
*
* @see https://fetch.spec.whatwg.org/#concept-bodyinit-extract
*/
function extractBody (object, keepalive = false) {
// 1. Let stream be null.
let stream = null
// 2. If object is a ReadableStream object, then set stream to object.
if (webidl.is.ReadableStream(object)) {
stream = object
} else if (webidl.is.Blob(object)) {
// 3. Otherwise, if object is a Blob object, set stream to the
// result of running object’s get stream.
stream = object.stream()
} else {
// 4. Otherwise, set stream to a new ReadableStream object, and set
// up stream with byte reading support.
stream = new ReadableStream({
pull (controller) {
const buffer = typeof source === 'string' ? textEncoder.encode(source) : source
if (buffer.byteLength) {
controller.enqueue(buffer)
}
queueMicrotask(() => readableStreamClose(controller))
},
start () {},
type: 'bytes'
})
}
// 5. Assert: stream is a ReadableStream object.
assert(webidl.is.ReadableStream(stream))
// 6. Let action be null.
let action = null
// 7. Let source be null.
let source = null
// 8. Let length be null.
let length = null
// 9. Let type be null.
let type = null
// 10. Switch on object:
if (typeof object === 'string') {
// Set source to the UTF-8 encoding of object.
// Note: setting source to a Uint8Array here breaks some mocking assumptions.
source = object
// Set type to `text/plain;charset=UTF-8`.
type = 'text/plain;charset=UTF-8'
} else if (webidl.is.URLSearchParams(object)) {
// URLSearchParams
// spec says to run application/x-www-form-urlencoded on body.list
// this is implemented in Node.js as apart of an URLSearchParams instance toString method
// See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490
// and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100
// Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.
source = object.toString()
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
type = 'application/x-www-form-urlencoded;charset=UTF-8'
} else if (webidl.is.BufferSource(object)) {
source = isArrayBuffer(object)
? new Uint8Array(object.slice())
: new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
} else if (webidl.is.FormData(object)) {
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
const formdataEscape = (str) =>
str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22')
const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n')
// Set action to this step: run the multipart/form-data
// encoding algorithm, with object’s entry list and UTF-8.
// - This ensures that the body is immutable and can't be changed afterwords
// - That the content-length is calculated in advance.
// - And that all parts are pre-encoded and ready to be sent.
const blobParts = []
const rn = new Uint8Array([13, 10]) // '\r\n'
length = 0
let hasUnknownSizeValue = false
for (const [name, value] of object) {
if (typeof value === 'string') {
const chunk = textEncoder.encode(prefix +
`; name="${formdataEscape(normalizeLinefeeds(name))}"` +
`\r\n\r\n${normalizeLinefeeds(value)}\r\n`)
blobParts.push(chunk)
length += chunk.byteLength
} else {
const chunk = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` +
(value.name ? `; filename="${formdataEscape(value.name)}"` : '') + '\r\n' +
`Content-Type: ${
value.type || 'application/octet-stream'
}\r\n\r\n`)
blobParts.push(chunk, value, rn)
if (typeof value.size === 'number') {
length += chunk.byteLength + value.size + rn.byteLength
} else {
hasUnknownSizeValue = true
}
}
}
// CRLF is appended to the body to function with legacy servers and match other implementations.
// https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030
// https://github.com/form-data/form-data/issues/63
const chunk = textEncoder.encode(`--${boundary}--\r\n`)
blobParts.push(chunk)
length += chunk.byteLength
if (hasUnknownSizeValue) {
length = null
}
// Set source to object.
source = object
action = async function * () {
for (const part of blobParts) {
if (part.stream) {
yield * part.stream()
} else {
yield part
}
}
}
// Set type to `multipart/form-data; boundary=`,
// followed by the multipart/form-data boundary string generated
// by the multipart/form-data encoding algorithm.
type = `multipart/form-data; boundary=${boundary}`
} else if (webidl.is.Blob(object)) {
// Blob
// Set source to object.
source = object
// Set length to object’s size.
length = object.size
// If object’s type attribute is not the empty byte sequence, set
// type to its value.
if (object.type) {
type = object.type
}
} else if (typeof object[Symbol.asyncIterator] === 'function') {
// If keepalive is true, then throw a TypeError.
if (keepalive) {
throw new TypeError('keepalive')
}
// If object is disturbed or locked, then throw a TypeError.
if (util.isDisturbed(object) || object.locked) {
throw new TypeError(
'Response body object should not be disturbed or locked'
)
}
stream =
webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object)
}
// 11. If source is a byte sequence, then set action to a
// step that returns source and length to source’s length.
if (typeof source === 'string' || util.isBuffer(source)) {
length = Buffer.byteLength(source)
}
// 12. If action is non-null, then run these steps in in parallel:
if (action != null) {
// Run action.
let iterator
stream = new ReadableStream({
start () {
iterator = action(object)[Symbol.asyncIterator]()
},
pull (controller) {
return iterator.next().then(({ value, done }) => {
if (done) {
// When running action is done, close stream.
queueMicrotask(() => {
controller.close()
controller.byobRequest?.respond(0)
})
} else {
// Whenever one or more bytes are available and stream is not errored,
// enqueue a Uint8Array wrapping an ArrayBuffer containing the available
// bytes into stream.
if (!isErrored(stream)) {
const buffer = new Uint8Array(value)
if (buffer.byteLength) {
controller.enqueue(buffer)
}
}
}
return controller.desiredSize > 0
})
},
cancel (reason) {
return iterator.return()
},
type: 'bytes'
})
}
// 13. Let body be a body whose stream is stream, source is source,
// and length is length.
const body = { stream, source, length }
// 14. Return (body, type).
return [body, type]
}
/**
* @typedef {object} ExtractBodyResult
* @property {ReadableStream<Uint8Array<ArrayBuffer>>} stream - The ReadableStream containing the body data
* @property {any} source - The original source of the body data
* @property {number | null} length - The length of the body data, or null
*/
/**
* Safely extract a body with type from a byte sequence or BodyInit object.
*
* @param {import('../../../types').BodyInit} object - The BodyInit object to extract from
* @param {boolean} [keepalive=false] - If true, indicates that the body
* @returns {[ExtractBodyResult, string | null]} - Returns a tuple containing the body and its type
*
* @see https://fetch.spec.whatwg.org/#bodyinit-safely-extract
*/
function safelyExtractBody (object, keepalive = false) {
// To safely extract a body and a `Content-Type` value from
// a byte sequence or BodyInit object object, run these steps:
// 1. If object is a ReadableStream object, then:
if (webidl.is.ReadableStream(object)) {
// Assert: object is neither disturbed nor locked.
assert(!util.isDisturbed(object), 'The body has already been consumed.')
assert(!object.locked, 'The stream is locked.')
}
// 2. Return the results of extracting object.
return extractBody(object, keepalive)
}
function cloneBody (body) {
// To clone a body body, run these steps:
// https://fetch.spec.whatwg.org/#concept-body-clone
// 1. Let « out1, out2 » be the result of teeing body’s stream.
const { 0: out1, 1: out2 } = body.stream.tee()
// 2. Set body’s stream to out1.
body.stream = out1
// 3. Return a body whose stream is out2 and other members are copied from body.
return {
stream: out2,
length: body.length,
source: body.source
}
}
function bodyMixinMethods (instance, getInternalState) {
const methods = {
blob () {
// The blob() method steps are to return the result of
// running consume body with this and the following step
// given a byte sequence bytes: return a Blob whose
// contents are bytes and whose type attribute is this’s
// MIME type.
return consumeBody(this, (bytes) => {
let mimeType = bodyMimeType(getInternalState(this))
if (mimeType === null) {
mimeType = ''
} else if (mimeType) {
mimeType = serializeAMimeType(mimeType)
}
// Return a Blob whose contents are bytes and type attribute
// is mimeType.
return new Blob([bytes], { type: mimeType })
}, instance, getInternalState)
},
arrayBuffer () {
// The arrayBuffer() method steps are to return the result
// of running consume body with this and the following step
// given a byte sequence bytes: return a new ArrayBuffer
// whose contents are bytes.
return consumeBody(this, (bytes) => {
return new Uint8Array(bytes).buffer
}, instance, getInternalState)
},
text () {
// The text() method steps are to return the result of running
// consume body with this and UTF-8 decode.
return consumeBody(this, utf8DecodeBytes, instance, getInternalState)
},
json () {
// The json() method steps are to return the result of running
// consume body with this and parse JSON from bytes.
return consumeBody(this, parseJSONFromBytes, instance, getInternalState)
},
formData () {
// The formData() method steps are to return the result of running
// consume body with this and the following step given a byte sequence bytes:
return consumeBody(this, (value) => {
// 1. Let mimeType be the result of get the MIME type with this.
const mimeType = bodyMimeType(getInternalState(this))
// 2. If mimeType is non-null, then switch on mimeType’s essence and run
// the corresponding steps:
if (mimeType !== null) {
switch (mimeType.essence) {
case 'multipart/form-data': {
// 1. ... [long step]
// 2. If that fails for some reason, then throw a TypeError.
const parsed = multipartFormDataParser(value, mimeType)
// 3. Return a new FormData object, appending each entry,
// resulting from the parsing operation, to its entry list.
const fd = new FormData()
setFormDataState(fd, parsed)
return fd
}
case 'application/x-www-form-urlencoded': {
// 1. Let entries be the result of parsing bytes.
const entries = new URLSearchParams(value.toString())
// 2. If entries is failure, then throw a TypeError.
// 3. Return a new FormData object whose entry list is entries.
const fd = new FormData()
for (const [name, value] of entries) {
fd.append(name, value)
}
return fd
}
}
}
// 3. Throw a TypeError.
throw new TypeError(
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
)
}, instance, getInternalState)
},
bytes () {
// The bytes() method steps are to return the result of running consume body
// with this and the following step given a byte sequence bytes: return the
// result of creating a Uint8Array from bytes in this’s relevant realm.
return consumeBody(this, (bytes) => {
return new Uint8Array(bytes)
}, instance, getInternalState)
}
}
return methods
}
function mixinBody (prototype, getInternalState) {
Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState))
}
/**
* @see https://fetch.spec.whatwg.org/#concept-body-consume-body
* @param {any} object internal state
* @param {(value: unknown) => unknown} convertBytesToJSValue
* @param {any} instance
* @param {(target: any) => any} getInternalState
*/
function consumeBody (object, convertBytesToJSValue, instance, getInternalState) {
try {
webidl.brandCheck(object, instance)
} catch (e) {
return Promise.reject(e)
}
const state = getInternalState(object)
// 1. If object is unusable, then return a promise rejected
// with a TypeError.
if (bodyUnusable(state)) {
return Promise.reject(new TypeError('Body is unusable: Body has already been read'))
}
if (state.aborted) {
return Promise.reject(new DOMException('The operation was aborted.', 'AbortError'))
}
// 2. Let promise be a new promise.
const promise = createDeferredPromise()
// 3. Let errorSteps given error be to reject promise with error.
const errorSteps = promise.reject
// 4. Let successSteps given a byte sequence data be to resolve
// promise with the result of running convertBytesToJSValue
// with data. If that threw an exception, then run errorSteps
// with that exception.
const successSteps = (data) => {
try {
promise.resolve(convertBytesToJSValue(data))
} catch (e) {
errorSteps(e)
}
}
// 5. If object’s body is null, then run successSteps with an
// empty byte sequence.
if (state.body == null) {
successSteps(Buffer.allocUnsafe(0))
return promise.promise
}
// 6. Otherwise, fully read object’s body given successSteps,
// errorSteps, and object’s relevant global object.
fullyReadBody(state.body, successSteps, errorSteps)
// 7. Return promise.
return promise.promise
}
/**
* @see https://fetch.spec.whatwg.org/#body-unusable
* @param {any} object internal state
*/
function bodyUnusable (object) {
const body = object.body
// An object including the Body interface mixin is
// said to be unusable if its body is non-null and
// its body’s stream is disturbed or locked.
return body != null && (body.stream.locked || util.isDisturbed(body.stream))
}
/**
* @see https://fetch.spec.whatwg.org/#concept-body-mime-type
* @param {any} requestOrResponse internal state
*/
function bodyMimeType (requestOrResponse) {
// 1. Let headers be null.
// 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list.
// 3. Otherwise, set headers to requestOrResponse’s response’s header list.
/** @type {import('./headers').HeadersList} */
const headers = requestOrResponse.headersList
// 4. Let mimeType be the result of extracting a MIME type from headers.
const mimeType = extractMimeType(headers)
// 5. If mimeType is failure, then return null.
if (mimeType === 'failure') {
return null
}
// 6. Return mimeType.
return mimeType
}
module.exports = {
extractBody,
safelyExtractBody,
cloneBody,
mixinBody,
streamRegistry,
bodyUnusable
}
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/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}} 'کاتژمێر' {{time}}",
long: "{{date}} 'کاتژمێر' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-chart-gantt.js';
//# sourceMappingURL=gantt-chart-square.js.map
@@ -0,0 +1 @@
{"version":3,"file":"lv.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/lv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}
@@ -0,0 +1,10 @@
import { TraceState } from '@opentelemetry/core';
import { DynamicSamplingContext } from '@sentry/core';
/**
* Generate a TraceState for the given data.
*/
export declare function makeTraceState({ dsc, sampled, }: {
dsc?: Partial<DynamicSamplingContext>;
sampled?: boolean;
}): TraceState;
//# sourceMappingURL=makeTraceState.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"docAccess.d.ts","sourceRoot":"","sources":["../../../src/resolvers/globals/docAccess.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,SAAS,CAAA;AAMhB,MAAM,MAAM,QAAQ,GAAG,CACrB,CAAC,EAAE,OAAO,EACV,OAAO,EAAE;IACP,GAAG,EAAE,cAAc,CAAA;CACpB,KACE,OAAO,CAAC,6BAA6B,GAAG,yBAAyB,CAAC,CAAA;AAEvE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,QAAQ,CASzE"}
@@ -0,0 +1,15 @@
import type { ASTVisitor } from '../../../language/visitor';
import type { ValidationContext } from '../../ValidationContext';
/**
* No deprecated
*
* A GraphQL document is only valid if all selected fields and all used enum values have not been
* deprecated.
*
* Note: This rule is optional and is not part of the Validation section of the GraphQL
* Specification. The main purpose of this rule is detection of deprecated usages and not
* necessarily to forbid their use when querying a service.
*/
export declare function NoDeprecatedCustomRule(
context: ValidationContext,
): ASTVisitor;
@@ -0,0 +1,126 @@
import { executeAccess } from '../../auth/executeAccess.js';
import { combineQueries } from '../../database/combineQueries.js';
import { Forbidden, NotFound } from '../../errors/index.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { deepCopyObjectSimple } from '../../utilities/deepCopyObject.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { buildVersionGlobalFields } from '../../versions/buildGlobalFields.js';
import { getQueryDraftsSelect } from '../../versions/drafts/getQueryDraftsSelect.js';
export const findVersionByIDOperation = async (args)=>{
const { id, currentDepth, depth, disableErrors, globalConfig, overrideAccess, populate, req: { fallbackLocale, locale, payload }, req, select: incomingSelect, showHiddenFields } = args;
try {
// /////////////////////////////////////
// Access
// /////////////////////////////////////
const accessResults = !overrideAccess ? await executeAccess({
id,
disableErrors,
req
}, globalConfig.access.readVersions) : true;
// If errors are disabled, and access returns false, return null
if (accessResults === false) {
return null;
}
const hasWhereAccess = typeof accessResults === 'object';
const select = sanitizeSelect({
fields: buildVersionGlobalFields(payload.config, globalConfig, true),
forceSelect: getQueryDraftsSelect({
select: globalConfig.forceSelect
}),
select: incomingSelect,
versions: true
});
const findGlobalVersionsArgs = {
global: globalConfig.slug,
limit: 1,
locale: locale,
req,
select,
where: combineQueries({
id: {
equals: id
}
}, accessResults)
};
// /////////////////////////////////////
// Find by ID
// /////////////////////////////////////
if (!findGlobalVersionsArgs.where?.and?.[0]?.id) {
throw new NotFound(req.t);
}
const { docs: results } = await payload.db.findGlobalVersions(findGlobalVersionsArgs);
if (!results || results?.length === 0) {
if (!disableErrors) {
if (!hasWhereAccess) {
throw new NotFound(req.t);
}
if (hasWhereAccess) {
throw new Forbidden(req.t);
}
}
return null;
}
// Clone the result - it may have come back memoized
let result = deepCopyObjectSimple(results[0]);
if (!result.version) {
result.version = {};
}
// Patch globalType onto version doc
result.version.globalType = globalConfig.slug;
// /////////////////////////////////////
// beforeRead - Collection
// /////////////////////////////////////
if (globalConfig.hooks?.beforeRead?.length) {
for (const hook of globalConfig.hooks.beforeRead){
result = await hook({
context: req.context,
doc: result.version,
global: globalConfig,
overrideAccess,
req
}) || result.version;
}
}
// /////////////////////////////////////
// afterRead - Fields
// /////////////////////////////////////
result.version = await afterRead({
collection: null,
context: req.context,
currentDepth,
depth: depth,
doc: result.version,
draft: undefined,
fallbackLocale: fallbackLocale,
global: globalConfig,
locale: locale,
overrideAccess: overrideAccess,
populate,
req,
select: typeof select?.version === 'object' ? select.version : undefined,
showHiddenFields: showHiddenFields
});
// /////////////////////////////////////
// afterRead - Global
// /////////////////////////////////////
if (globalConfig.hooks?.afterRead?.length) {
for (const hook of globalConfig.hooks.afterRead){
result.version = await hook({
context: req.context,
doc: result.version,
global: globalConfig,
overrideAccess,
query: findGlobalVersionsArgs.where,
req
}) || result.version;
}
}
return result;
} catch (error) {
await killTransaction(req);
throw error;
}
};
//# sourceMappingURL=findVersionByID.js.map
@@ -0,0 +1 @@
{"version":3,"file":"flows.js","names":[],"sources":["../../../../src/rest/commands/utils/flows.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n// TODO better options for ouput typing\n\n/**\n * Trigger a flow\n * @param method\n * @param id\n * @param data\n * @returns Result of the flow, if any.\n */\nexport const triggerFlow =\n\t<Schema>(method: 'GET' | 'POST', id: string, data?: Record<string, string>): RestCommand<unknown, Schema> =>\n\t() => {\n\t\tif (method === 'GET') {\n\t\t\treturn {\n\t\t\t\tpath: `/flows/trigger/${id}`,\n\t\t\t\tparams: data ?? {},\n\t\t\t\tmethod: 'GET',\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tpath: `/flows/trigger/${id}`,\n\t\t\tbody: JSON.stringify(data ?? {}),\n\t\t\tmethod: 'POST',\n\t\t};\n\t};\n"],"mappings":"AAWA,MAAa,GACH,EAAwB,EAAY,QAExC,IAAW,MACP,CACN,KAAM,kBAAkB,IACxB,OAAQ,GAAQ,EAAE,CAClB,OAAQ,MACR,CAGK,CACN,KAAM,kBAAkB,IACxB,KAAM,KAAK,UAAU,GAAQ,EAAE,CAAC,CAChC,OAAQ,OACR"}
@@ -0,0 +1,17 @@
/**
* Implement a practical max duration for keyframe generation
* to prevent infinite loops
*/
const maxGeneratorDuration = 20000;
function calcGeneratorDuration(generator) {
let duration = 0;
const timeStep = 50;
let state = generator.next(duration);
while (!state.done && duration < maxGeneratorDuration) {
duration += timeStep;
state = generator.next(duration);
}
return duration >= maxGeneratorDuration ? Infinity : duration;
}
export { calcGeneratorDuration, maxGeneratorDuration };
@@ -0,0 +1,45 @@
var baseIteratee = require('./_baseIteratee'),
baseWhile = require('./_baseWhile');
/**
* Creates a slice of `array` with elements taken from the end. Elements are
* taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.takeRightWhile(users, function(o) { return !o.active; });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeRightWhile(users, ['active', false]);
* // => objects for ['fred', 'pebbles']
*
* // The `_.property` iteratee shorthand.
* _.takeRightWhile(users, 'active');
* // => []
*/
function takeRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, baseIteratee(predicate, 3), false, true)
: [];
}
module.exports = takeRightWhile;
@@ -0,0 +1,39 @@
"use strict";
exports.startOfYesterday = startOfYesterday;
var _index = require("./constructNow.cjs");
/**
* The {@link startOfYesterday} function options.
*/
/**
* @name startOfYesterday
* @category Day Helpers
* @summary Return the start of yesterday.
* @pure false
*
* @typeParam ContextDate - The `Date` type of the context function.
*
* @param options - An object with options
*
* @description
* Return the start of yesterday.
*
* @returns The start of yesterday
*
* @example
* // If today is 6 October 2014:
* const result = startOfYesterday()
* //=> Sun Oct 5 2014 00:00:00
*/
function startOfYesterday(options) {
const now = (0, _index.constructNow)(options?.in);
const year = now.getFullYear();
const month = now.getMonth();
const day = now.getDate();
const date = (0, _index.constructNow)(options?.in);
date.setFullYear(year, month, day - 1);
date.setHours(0, 0, 0, 0);
return date;
}
@@ -0,0 +1,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ArrayPushCallbackChunkFormatPlugin = require("../javascript/ArrayPushCallbackChunkFormatPlugin");
const EnableChunkLoadingPlugin = require("../javascript/EnableChunkLoadingPlugin");
const JsonpChunkLoadingRuntimeModule = require("./JsonpChunkLoadingRuntimeModule");
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Compiler")} Compiler */
class JsonpTemplatePlugin {
/**
* @deprecated use JsonpChunkLoadingRuntimeModule.getCompilationHooks instead
* @param {Compilation} compilation the compilation
* @returns {JsonpChunkLoadingRuntimeModule.JsonpCompilationPluginHooks} hooks
*/
static getCompilationHooks(compilation) {
return JsonpChunkLoadingRuntimeModule.getCompilationHooks(compilation);
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.options.output.chunkLoading = "jsonp";
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
new EnableChunkLoadingPlugin("jsonp").apply(compiler);
}
}
module.exports = JsonpTemplatePlugin;
@@ -0,0 +1,15 @@
# `@img/colour`
The latest version of the
[color](https://www.npmjs.com/package/color)
package is now ESM-only,
however some JavaScript runtimes do not yet support this,
which includes versions of Node.js prior to 20.19.0.
This package converts the `color` package and its dependencies,
all of which are MIT-licensed, to CommonJS.
- [color](https://www.npmjs.com/package/color)
- [color-convert](https://www.npmjs.com/package/color-convert)
- [color-string](https://www.npmjs.com/package/color-string)
- [color-name](https://www.npmjs.com/package/color-name)
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"square-power.js","sources":["../../../src/icons/square-power.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquarePower\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgN3Y0IiAvPgogIDxwYXRoIGQ9Ik03Ljk5OCA5LjAwM2E1IDUgMCAxIDAgOC0uMDA1IiAvPgogIDxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-power\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 SquarePower = createLucideIcon('SquarePower', [\n ['path', { d: 'M12 7v4', key: 'xawao1' }],\n ['path', { d: 'M7.998 9.003a5 5 0 1 0 8-.005', key: '1pek45' }],\n ['rect', { x: '3', y: '3', width: '18', height: '18', rx: '2', key: 'h1oib' }],\n]);\n\nexport default SquarePower;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const invalid_span_constants_1 = require("./invalid-span-constants");
const NonRecordingSpan_1 = require("./NonRecordingSpan");
const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
function isValidTraceId(traceId) {
return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
}
exports.isValidTraceId = isValidTraceId;
function isValidSpanId(spanId) {
return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;
}
exports.isValidSpanId = isValidSpanId;
/**
* Returns true if this {@link SpanContext} is valid.
* @return true if this {@link SpanContext} is valid.
*/
function isSpanContextValid(spanContext) {
return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));
}
exports.isSpanContextValid = isSpanContextValid;
/**
* Wrap the given {@link SpanContext} in a new non-recording {@link Span}
*
* @param spanContext span context to be wrapped
* @returns a new non-recording {@link Span} with the provided context
*/
function wrapSpanContext(spanContext) {
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
}
exports.wrapSpanContext = wrapSpanContext;
//# sourceMappingURL=spancontext-utils.js.map
@@ -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 ArrowLeftRight = createLucideIcon("ArrowLeftRight", [
["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
["path", { d: "M4 7h16", key: "6tx8e3" }],
["path", { d: "m16 21 4-4-4-4", key: "siv7j2" }],
["path", { d: "M20 17H4", key: "h6l3hr" }]
]);
export { ArrowLeftRight as default };
//# sourceMappingURL=arrow-left-right.js.map
@@ -0,0 +1,29 @@
var baseNth = require('./_baseNth'),
toInteger = require('./toInteger');
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth
* element from the end is returned.
*
* @static
* @memberOf _
* @since 4.11.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=0] The index of the element to return.
* @returns {*} Returns the nth element of `array`.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
*
* _.nth(array, 1);
* // => 'b'
*
* _.nth(array, -2);
* // => 'c';
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
}
module.exports = nth;
@@ -0,0 +1,11 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
# insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oBAAY,WAAW;IACnB,8CAA8C;IAC9C,IAAI,SAAS;IACb,oBAAoB;IACpB,IAAI,SAAS;IACb,yBAAyB;IACzB,SAAS,cAAc;IACvB,4BAA4B;IAC5B,OAAO,YAAY;IACnB,6BAA6B;IAC7B,MAAM,WAAW;IACjB,4BAA4B;IAC5B,KAAK,UAAU;IACf,uBAAuB;IACvB,GAAG,QAAQ;IACX,iCAAiC;IACjC,KAAK,UAAU;IACf,8BAA8B;IAC9B,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM1D;AAGD,8CAA8C;AAC9C,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,oBAAoB;AACpB,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,yBAAyB;AACzB,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAC/C,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAC3C,6BAA6B;AAC7B,eAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,4BAA4B;AAC5B,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,uBAAuB;AACvB,eAAO,MAAM,GAAG,kBAAkB,CAAC;AACnC,iCAAiC;AACjC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,8BAA8B;AAC9B,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,19 @@
'use strict';
var resolveSeq = require('./resolveSeq-d03cb037.js');
var PlainValue = require('./PlainValue-ec8e588e.js');
exports.findPair = resolveSeq.findPair;
exports.parseMap = resolveSeq.resolveMap;
exports.parseSeq = resolveSeq.resolveSeq;
exports.stringifyNumber = resolveSeq.stringifyNumber;
exports.stringifyString = resolveSeq.stringifyString;
exports.toJSON = resolveSeq.toJSON;
exports.Type = PlainValue.Type;
exports.YAMLError = PlainValue.YAMLError;
exports.YAMLReferenceError = PlainValue.YAMLReferenceError;
exports.YAMLSemanticError = PlainValue.YAMLSemanticError;
exports.YAMLSyntaxError = PlainValue.YAMLSyntaxError;
exports.YAMLWarning = PlainValue.YAMLWarning;
@@ -0,0 +1,54 @@
{
"name": "uint8array-extras",
"version": "1.5.0",
"description": "Useful utilities for working with Uint8Array (and Buffer)",
"license": "MIT",
"repository": "sindresorhus/uint8array-extras",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsc index.d.ts"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"uint8array",
"uint8",
"typedarray",
"buffer",
"typedarray",
"arraybuffer",
"is",
"assert",
"concat",
"equals",
"compare",
"base64",
"string",
"atob",
"btoa",
"hex",
"hexadecimal"
],
"devDependencies": {
"ava": "^6.0.1",
"typescript": "^5.3.3",
"xo": "^0.56.0",
"benchmark": "2.1.4"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,eAAO,MAAM,MAAM,EAAiB,OAAO,UAAU,GAAG,MAAM,CAAC;AAC/D,eAAO,MAAM,QAAQ,UAAkB,CAAC;AACxC,eAAO,MAAM,SAAS;;;aAAmB,CAAC;AAE1C,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAC5C,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,UAAU,iBAAiB,CAAC;AACzC,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAC1D,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAC1E,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAC5C,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,oBAAoB,+BAA+B,CAAC;AACjE,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,eAAO,MAAM,uBAAuB,OAAO,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"rocket.js","sources":["../../../src/icons/rocket.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Rocket\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNC41IDE2LjVjLTEuNSAxLjI2LTIgNS0yIDVzMy43NC0uNSA1LTJjLjcxLS44NC43LTIuMTMtLjA5LTIuOTFhMi4xOCAyLjE4IDAgMCAwLTIuOTEtLjA5eiIgLz4KICA8cGF0aCBkPSJtMTIgMTUtMy0zYTIyIDIyIDAgMCAxIDItMy45NUExMi44OCAxMi44OCAwIDAgMSAyMiAyYzAgMi43Mi0uNzggNy41LTYgMTFhMjIuMzUgMjIuMzUgMCAwIDEtNCAyeiIgLz4KICA8cGF0aCBkPSJNOSAxMkg0cy41NS0zLjAzIDItNGMxLjYyLTEuMDggNSAwIDUgMCIgLz4KICA8cGF0aCBkPSJNMTIgMTV2NXMzLjAzLS41NSA0LTJjMS4wOC0xLjYyIDAtNSAwLTUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/rocket\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 Rocket = createLucideIcon('Rocket', [\n [\n 'path',\n {\n d: 'M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z',\n key: 'm3kijz',\n },\n ],\n [\n 'path',\n {\n d: 'm12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z',\n key: '1fmvmk',\n },\n ],\n ['path', { d: 'M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0', key: '1f8sc4' }],\n ['path', { d: 'M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5', key: 'qeys4' }],\n]);\n\nexport default Rocket;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,SAAS,CAAA;AACzE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,27 @@
/**
* @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 TreePalm = createLucideIcon("TreePalm", [
["path", { d: "M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4", key: "foxbe7" }],
[
"path",
{ d: "M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3", key: "18arnh" }
],
[
"path",
{
d: "M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",
key: "ywahnh"
}
],
["path", { d: "M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14", key: "ft0feo" }]
]);
export { TreePalm as default };
//# sourceMappingURL=tree-palm.js.map
@@ -0,0 +1,41 @@
module.exports = isexe
isexe.sync = sync
var fs = require('fs')
function isexe (path, options, cb) {
fs.stat(path, function (er, stat) {
cb(er, er ? false : checkStat(stat, options))
})
}
function sync (path, options) {
return checkStat(fs.statSync(path), options)
}
function checkStat (stat, options) {
return stat.isFile() && checkMode(stat, options)
}
function checkMode (stat, options) {
var mod = stat.mode
var uid = stat.uid
var gid = stat.gid
var myUid = options.uid !== undefined ?
options.uid : process.getuid && process.getuid()
var myGid = options.gid !== undefined ?
options.gid : process.getgid && process.getgid()
var u = parseInt('100', 8)
var g = parseInt('010', 8)
var o = parseInt('001', 8)
var ug = u | g
var ret = (mod & o) ||
(mod & g) && gid === myGid ||
(mod & u) && uid === myUid ||
(mod & ug) && myUid === 0
return ret
}
@@ -0,0 +1 @@
module.exports={C:{"78":0.02413,"115":0.02895,"124":0.00483,"125":0.00483,"128":0.00483,"133":0.00483,"135":0.00483,"136":0.00483,"140":0.01448,"142":0.00483,"143":0.00483,"144":0.00965,"145":0.2509,"146":0.39565,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 126 127 129 130 131 132 134 137 138 139 141 147 148 149 3.5 3.6"},D:{"39":0.02413,"40":0.02895,"41":0.02413,"42":0.02413,"43":0.02413,"44":0.02413,"45":0.02413,"46":0.02413,"47":0.02413,"48":0.02413,"49":0.02413,"50":0.02413,"51":0.02413,"52":0.02413,"53":0.02895,"54":0.02413,"55":0.02895,"56":0.02895,"57":0.02895,"58":0.02413,"59":0.02413,"60":0.02413,"71":0.00483,"78":0.00483,"79":0.00483,"85":0.26055,"86":0.00483,"87":0.00483,"91":0.01448,"97":0.00965,"98":0.00483,"99":0.00483,"101":0.00965,"103":0.06755,"104":0.06273,"105":0.20748,"106":0.06273,"107":0.06273,"108":0.06273,"109":0.18335,"110":0.0579,"111":0.0579,"112":0.12545,"113":0.00483,"114":0.01448,"115":0.00965,"116":0.13993,"117":0.08685,"118":0.00483,"119":0.00965,"120":0.1158,"121":0.02895,"122":0.02895,"123":0.02413,"124":0.07238,"125":0.06273,"126":0.02895,"127":0.0386,"128":0.08685,"129":0.02413,"130":0.10615,"131":0.20748,"132":0.04343,"133":0.13993,"134":0.43425,"135":0.04825,"136":0.05308,"137":1.5054,"138":0.10133,"139":21.423,"140":0.14475,"141":0.41978,"142":4.48243,"143":6.71158,"144":0.01448,"145":0.01448,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 77 80 81 83 84 88 89 90 92 93 94 95 96 100 102 146"},F:{"85":0.00483,"92":0.00965,"93":0.18335,"95":0.02413,"114":0.00483,"119":0.00483,"122":0.02413,"123":0.01448,"124":0.42943,"125":0.19783,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00483,"109":0.00965,"120":0.00483,"122":0.00483,"126":0.00483,"127":0.00483,"128":0.00483,"130":0.00483,"131":0.00965,"132":0.00483,"133":0.00965,"134":0.00483,"135":0.01448,"136":0.00483,"137":0.00483,"138":0.01448,"139":0.00965,"140":0.01448,"141":0.02895,"142":0.55005,"143":1.3703,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 121 123 124 125 129"},E:{"14":0.00483,"15":0.00483,_:"0 4 5 6 7 8 9 10 11 12 13 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.2 26.3","13.1":0.00483,"14.1":0.00483,"15.5":0.00483,"15.6":0.02413,"16.0":0.00965,"16.1":0.00483,"16.3":0.00483,"16.4":0.00483,"16.5":0.00483,"16.6":0.04825,"17.0":0.00965,"17.1":0.02413,"17.2":0.00965,"17.3":0.00483,"17.4":0.00483,"17.5":0.01448,"17.6":0.04825,"18.0":0.00483,"18.1":0.0193,"18.2":0.00483,"18.3":0.01448,"18.4":0.01448,"18.5-18.6":0.04825,"26.0":0.03378,"26.1":0.17853,"26.2":0.06273},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00173,"5.0-5.1":0,"6.0-6.1":0.00346,"7.0-7.1":0.0026,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00692,"10.0-10.2":0.00087,"10.3":0.01211,"11.0-11.2":0.14882,"11.3-11.4":0.00433,"12.0-12.1":0.00346,"12.2-12.5":0.03894,"13.0-13.1":0.00087,"13.2":0.00606,"13.3":0.00173,"13.4-13.7":0.00606,"14.0-14.4":0.01211,"14.5-14.8":0.01298,"15.0-15.1":0.01384,"15.2-15.3":0.01038,"15.4":0.01125,"15.5":0.01211,"15.6-15.8":0.18776,"16.0":0.02163,"16.1":0.04153,"16.2":0.02163,"16.3":0.03894,"16.4":0.00952,"16.5":0.01644,"16.6-16.7":0.244,"17.0":0.01384,"17.1":0.0225,"17.2":0.01644,"17.3":0.02509,"17.4":0.0424,"17.5":0.08306,"17.6-17.7":0.19209,"18.0":0.04326,"18.1":0.08999,"18.2":0.04759,"18.3":0.15488,"18.4":0.0796,"18.5-18.7":5.71591,"26.0":0.11162,"26.1":0.92842,"26.2":0.17651,"26.3":0.00779},P:{"24":0.01041,"26":0.01041,"27":0.01041,"28":0.03122,"29":1.86266,_:"4 20 21 22 23 25 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":16.79701,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00336,"4.4":0,"4.4.3-4.4.4":0.01346},A:{"9":0.12215,"11":0.05638,_:"6 7 8 10 5.5"},K:{"0":0.89528,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.0414},O:{"0":0.09315},H:{"0":0},L:{"0":25.90758},R:{_:"0"},M:{"0":0.4554}};
@@ -0,0 +1 @@
{"version":3,"file":"align-horizontal-justify-start.js","sources":["../../../src/icons/align-horizontal-justify-start.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignHorizontalJustifyStart\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNiIgaGVpZ2h0PSIxNCIgeD0iNiIgeT0iNSIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjYiIGhlaWdodD0iMTAiIHg9IjE2IiB5PSI3IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMiAydjIwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/align-horizontal-justify-start\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 AlignHorizontalJustifyStart = createLucideIcon('AlignHorizontalJustifyStart', [\n ['rect', { width: '6', height: '14', x: '6', y: '5', rx: '2', key: 'hsirpf' }],\n ['rect', { width: '6', height: '10', x: '16', y: '7', rx: '2', key: '13zkjt' }],\n ['path', { d: 'M2 2v20', key: '1ivd8o' }],\n]);\n\nexport default AlignHorizontalJustifyStart;\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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B,iBAAiB,6BAA+B,CAAA,CAAA,CAAA;AAAA,CAAA,CAClF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.client.js","names":["c","_c","toast","useRouteTransition","useRouter","React","useEffect","ToastAndRedirect","t0","$","message","redirectTo","router","startRouteTransition","hasToastedRef","useRef","t1","t2","timeoutID","current","push","clearTimeout"],"sources":["../../../src/views/Verify/index.client.tsx"],"sourcesContent":["'use client'\nimport { toast, useRouteTransition } from '@payloadcms/ui'\nimport { useRouter } from 'next/navigation.js'\nimport React, { useEffect } from 'react'\n\ntype Props = {\n message: string\n redirectTo: string\n}\nexport function ToastAndRedirect({ message, redirectTo }: Props) {\n const router = useRouter()\n const { startRouteTransition } = useRouteTransition()\n const hasToastedRef = React.useRef(false)\n\n useEffect(() => {\n let timeoutID\n\n if (toast) {\n timeoutID = setTimeout(() => {\n toast.success(message)\n hasToastedRef.current = true\n startRouteTransition(() => router.push(redirectTo))\n }, 100)\n }\n\n return () => {\n if (timeoutID) {\n clearTimeout(timeoutID)\n }\n }\n }, [router, redirectTo, message, startRouteTransition])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AACA,SAASC,KAAK,EAAEC,kBAAkB,QAAQ;AAC1C,SAASC,SAAS,QAAQ;AAC1B,OAAOC,KAAA,IAASC,SAAS,QAAQ;AAMjC,OAAO,SAAAC,iBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EAA0B;IAAAS,OAAA;IAAAC;EAAA,IAAAH,EAA8B;EAC7D,MAAAI,MAAA,GAAeR,SAAA;EACf;IAAAS;EAAA,IAAiCV,kBAAA;EACjC,MAAAW,aAAA,GAAsBT,KAAA,CAAAU,MAAA,MAAa;EAAA,IAAAC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAR,CAAA,QAAAC,OAAA,IAAAD,CAAA,QAAAE,UAAA,IAAAF,CAAA,QAAAG,MAAA,IAAAH,CAAA,QAAAI,oBAAA;IAEzBG,EAAA,GAAAA,CAAA;MACJE,GAAA,CAAAA,SAAA;MAAA,IAAAhB,KAAA;QAGFgB,SAAA,CAAAA,CAAA,CAAYA,aAAA,CAAAA,EAAA,CAAAA;UACVA,cAAcR,OAAA;UACdI,aAAA,CAAAK,OAAA;UACAN,oBAAA,OAA2BD,MAAA,CAAAQ,IAAA,CAAYT,UAAA;QAAA,MACtC;MAJH;MAAA;QAAA,IAQIO,SAAA;UACFG,YAAA,CAAaH,SAAA;QAAA;MAAA;IAAA;IAGhBD,EAAA,IAACL,MAAA,EAAQD,UAAA,EAAYD,OAAA,EAASG,oBAAA;IAAqBJ,CAAA,MAAAC,OAAA;IAAAD,CAAA,MAAAE,UAAA;IAAAF,CAAA,MAAAG,MAAA;IAAAH,CAAA,MAAAI,oBAAA;IAAAJ,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAQ,EAAA;EAAA;IAAAD,EAAA,GAAAP,CAAA;IAAAQ,EAAA,GAAAR,CAAA;EAAA;EAhBtDH,SAAA,CAAUU,EAgBV,EAAGC,EAAmD;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,588 @@
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);}(function (_window$dateFns) {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/ca/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "menys d'un segon",
eleven: "menys d'onze segons",
other: "menys de {{count}} segons"
},
xSeconds: {
one: "1 segon",
other: "{{count}} segons"
},
halfAMinute: "mig minut",
lessThanXMinutes: {
one: "menys d'un minut",
eleven: "menys d'onze minuts",
other: "menys de {{count}} minuts"
},
xMinutes: {
one: "1 minut",
other: "{{count}} minuts"
},
aboutXHours: {
one: "aproximadament una hora",
other: "aproximadament {{count}} hores"
},
xHours: {
one: "1 hora",
other: "{{count}} hores"
},
xDays: {
one: "1 dia",
other: "{{count}} dies"
},
aboutXWeeks: {
one: "aproximadament una setmana",
other: "aproximadament {{count}} setmanes"
},
xWeeks: {
one: "1 setmana",
other: "{{count}} setmanes"
},
aboutXMonths: {
one: "aproximadament un mes",
other: "aproximadament {{count}} mesos"
},
xMonths: {
one: "1 mes",
other: "{{count}} mesos"
},
aboutXYears: {
one: "aproximadament un any",
other: "aproximadament {{count}} anys"
},
xYears: {
one: "1 any",
other: "{{count}} anys"
},
overXYears: {
one: "m\xE9s d'un any",
eleven: "m\xE9s d'onze anys",
other: "m\xE9s de {{count}} anys"
},
almostXYears: {
one: "gaireb\xE9 un any",
other: "gaireb\xE9 {{count}} anys"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 11 && tokenValue.eleven) {
result = tokenValue.eleven;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "en " + result;
} else {
return "fa " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
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/ca/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, d 'de' MMMM y",
long: "d 'de' MMMM y",
medium: "d MMM y",
short: "dd/MM/y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'a les' {{time}}",
long: "{{date}} 'a les' {{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/ca/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'el' eeee 'passat a la' LT",
yesterday: "'ahir a la' p",
today: "'avui a la' p",
tomorrow: "'dem\xE0 a la' p",
nextWeek: "eeee 'a la' p",
other: "P"
};
var formatRelativeLocalePlural = {
lastWeek: "'el' eeee 'passat a les' p",
yesterday: "'ahir a les' p",
today: "'avui a les' p",
tomorrow: "'dem\xE0 a les' p",
nextWeek: "eeee 'a les' p",
other: "P"
};
var formatRelative = function formatRelative(token, date, _baseDate, _options) {
if (date.getHours() !== 1) {
return formatRelativeLocalePlural[token];
}
return formatRelativeLocale[token];
};
// lib/locale/_lib/buildLocalizeFn.mjs
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/ca/_lib/localize.mjs
var eraValues = {
narrow: ["aC", "dC"],
abbreviated: ["a. de C.", "d. de C."],
wide: ["abans de Crist", "despr\xE9s de Crist"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1r trimestre", "2n trimestre", "3r trimestre", "4t trimestre"]
};
var monthValues = {
narrow: [
"GN",
"FB",
"M\xC7",
"AB",
"MG",
"JN",
"JL",
"AG",
"ST",
"OC",
"NV",
"DS"],
abbreviated: [
"gen.",
"febr.",
"mar\xE7",
"abr.",
"maig",
"juny",
"jul.",
"ag.",
"set.",
"oct.",
"nov.",
"des."],
wide: [
"gener",
"febrer",
"mar\xE7",
"abril",
"maig",
"juny",
"juliol",
"agost",
"setembre",
"octubre",
"novembre",
"desembre"]
};
var dayValues = {
narrow: ["dg.", "dl.", "dt.", "dm.", "dj.", "dv.", "ds."],
short: ["dg.", "dl.", "dt.", "dm.", "dj.", "dv.", "ds."],
abbreviated: ["dg.", "dl.", "dt.", "dm.", "dj.", "dv.", "ds."],
wide: [
"diumenge",
"dilluns",
"dimarts",
"dimecres",
"dijous",
"divendres",
"dissabte"]
};
var dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "mitjanit",
noon: "migdia",
morning: "mat\xED",
afternoon: "tarda",
evening: "vespre",
night: "nit"
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "mitjanit",
noon: "migdia",
morning: "mat\xED",
afternoon: "tarda",
evening: "vespre",
night: "nit"
},
wide: {
am: "ante meridiem",
pm: "post meridiem",
midnight: "mitjanit",
noon: "migdia",
morning: "mat\xED",
afternoon: "tarda",
evening: "vespre",
night: "nit"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "de la mitjanit",
noon: "del migdia",
morning: "del mat\xED",
afternoon: "de la tarda",
evening: "del vespre",
night: "de la nit"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "de la mitjanit",
noon: "del migdia",
morning: "del mat\xED",
afternoon: "de la tarda",
evening: "del vespre",
night: "de la nit"
},
wide: {
am: "ante meridiem",
pm: "post meridiem",
midnight: "de la mitjanit",
noon: "del migdia",
morning: "del mat\xED",
afternoon: "de la tarda",
evening: "del vespre",
night: "de la nit"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "r";
case 2:
return number + "n";
case 3:
return number + "r";
case 4:
return number + "t";
}
}
return number + "\xE8";
};
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.mjs
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 };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
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/ca/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(è|r|n|r|t)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(aC|dC)/i,
abbreviated: /^(a. de C.|d. de C.)/i,
wide: /^(abans de Crist|despr[eé]s de Crist)/i
};
var parseEraPatterns = {
narrow: [/^aC/i, /^dC/i],
abbreviated: [/^(a. de C.)/i, /^(d. de C.)/i],
wide: [/^(abans de Crist)/i, /^(despr[eé]s de Crist)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](è|r|n|r|t)? trimestre/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,
abbreviated: /^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,
wide: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i
};
var parseMonthPatterns = {
narrow: [
/^GN/i,
/^FB/i,
/^MÇ/i,
/^AB/i,
/^MG/i,
/^JN/i,
/^JL/i,
/^AG/i,
/^ST/i,
/^OC/i,
/^NV/i,
/^DS/i],
abbreviated: [
/^gen./i,
/^febr./i,
/^març/i,
/^abr./i,
/^maig/i,
/^juny/i,
/^jul./i,
/^ag./i,
/^set./i,
/^oct./i,
/^nov./i,
/^des./i],
wide: [
/^gener/i,
/^febrer/i,
/^març/i,
/^abril/i,
/^maig/i,
/^juny/i,
/^juliol/i,
/^agost/i,
/^setembre/i,
/^octubre/i,
/^novembre/i,
/^desembre/i]
};
var matchDayPatterns = {
narrow: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
short: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
abbreviated: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
wide: /^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i
};
var parseDayPatterns = {
narrow: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
abbreviated: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
wide: [
/^diumenge/i,
/^dilluns/i,
/^dimarts/i,
/^dimecres/i,
/^dijous/i,
/^divendres/i,
/^disssabte/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,
abbreviated: /^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
wide: /^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mitjanit/i,
noon: /^migdia/i,
morning: /matí/i,
afternoon: /tarda/i,
evening: /vespre/i,
night: /nit/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "wide"
}),
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: "wide"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ca.mjs
var ca = {
code: "ca",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/ca/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
ca: ca }) });
//# debugId=03DC9410A82E379164756e2164756e21
})();
//# sourceMappingURL=cdn.js.map
@@ -0,0 +1,6 @@
import type { UriResolver } from "../types";
export default class MissingRefError extends Error {
readonly missingRef: string;
readonly missingSchema: string;
constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string);
}
@@ -0,0 +1,17 @@
/**
* An interface describing a user of an application or a handled request.
*/
export interface User {
[key: string]: any;
id?: string | number;
ip_address?: string | null;
email?: string;
username?: string;
geo?: GeoLocation;
}
export interface GeoLocation {
country_code?: string;
region?: string;
city?: string;
}
//# sourceMappingURL=user.d.ts.map
@@ -0,0 +1,8 @@
export declare const isWithinInterval: import("./types.js").FPFn2<
boolean,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
string | number | Date
>;
@@ -0,0 +1,4 @@
export declare const getDaysInYear: import("./types.js").FPFn1<
number,
string | number | Date
>;
@@ -0,0 +1,39 @@
{
"name": "lexical",
"description": "Lexical is an extensible text editor framework that provides excellent reliability, accessible and performance.",
"keywords": [
"react",
"lexical",
"editor",
"contenteditable",
"rich-text"
],
"license": "MIT",
"version": "0.35.0",
"main": "Lexical.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical"
},
"module": "Lexical.mjs",
"sideEffects": false,
"exports": {
".": {
"import": {
"types": "./index.d.ts",
"development": "./Lexical.dev.mjs",
"production": "./Lexical.prod.mjs",
"node": "./Lexical.node.mjs",
"default": "./Lexical.mjs"
},
"require": {
"types": "./index.d.ts",
"development": "./Lexical.dev.js",
"production": "./Lexical.prod.js",
"default": "./Lexical.js"
}
}
}
}
@@ -0,0 +1,116 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { getTranslation } from '@payloadcms/translations';
import { reduceFieldsToValues } from 'payload/shared';
import React from 'react';
import { useAuth } from '../../../providers/Auth/index.js';
import { useConfig } from '../../../providers/Config/index.js';
import { DocumentInfoProvider } from '../../../providers/DocumentInfo/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { ActionsBar } from '../ActionsBar/index.js';
import { discardBulkUploadModalSlug, DiscardWithoutSaving } from '../DiscardWithoutSaving/index.js';
import { EditForm } from '../EditForm/index.js';
import { FileSidebar } from '../FileSidebar/index.js';
import { useFormsManager } from '../FormsManager/index.js';
import { DrawerHeader } from '../Header/index.js';
import './index.scss';
const baseClass = 'bulk-upload--file-manager';
export function AddingFilesView() {
const $ = _c(18);
const {
activeIndex,
collectionSlug,
docPermissions,
documentSlots,
forms,
hasPublishPermission,
hasSavePermission,
hasSubmitted,
resetUploadEdits,
updateUploadEdits
} = useFormsManager();
const activeForm = forms[activeIndex];
const {
getEntityConfig
} = useConfig();
const {
i18n
} = useTranslation();
const {
user
} = useAuth();
const {
openModal
} = useModal();
let t0;
if ($[0] !== activeForm || $[1] !== activeIndex || $[2] !== collectionSlug || $[3] !== docPermissions || $[4] !== documentSlots || $[5] !== forms.length || $[6] !== getEntityConfig || $[7] !== hasPublishPermission || $[8] !== hasSavePermission || $[9] !== hasSubmitted || $[10] !== i18n || $[11] !== openModal || $[12] !== resetUploadEdits || $[13] !== updateUploadEdits || $[14] !== user) {
const collectionConfig = getEntityConfig({
collectionSlug
});
let t1;
if ($[16] !== openModal) {
t1 = () => openModal(discardBulkUploadModalSlug);
$[16] = openModal;
$[17] = t1;
} else {
t1 = $[17];
}
t0 = _jsxs("div", {
className: baseClass,
children: [_jsx(FileSidebar, {}), _jsxs("div", {
className: `${baseClass}__editView`,
children: [_jsx(DrawerHeader, {
onClose: t1,
title: getTranslation(collectionConfig.labels.singular, i18n)
}), activeForm ? _jsxs(DocumentInfoProvider, {
collectionSlug,
currentEditor: user,
docPermissions,
hasPublishedDoc: false,
hasPublishPermission,
hasSavePermission,
id: null,
initialData: reduceFieldsToValues(activeForm.formState, true),
initialState: activeForm.formState,
isLocked: false,
lastUpdateTime: 0,
mostRecentVersionIsAutosaved: false,
unpublishedVersionCount: 0,
Upload: documentSlots.Upload,
versionCount: 0,
children: [_jsx(ActionsBar, {
collectionConfig
}), _jsx(EditForm, {
resetUploadEdits,
submitted: hasSubmitted,
updateUploadEdits,
uploadEdits: activeForm?.uploadEdits
})]
}, `${activeIndex}-${forms.length}`) : null]
}), _jsx(DiscardWithoutSaving, {})]
});
$[0] = activeForm;
$[1] = activeIndex;
$[2] = collectionSlug;
$[3] = docPermissions;
$[4] = documentSlots;
$[5] = forms.length;
$[6] = getEntityConfig;
$[7] = hasPublishPermission;
$[8] = hasSavePermission;
$[9] = hasSubmitted;
$[10] = i18n;
$[11] = openModal;
$[12] = resetUploadEdits;
$[13] = updateUploadEdits;
$[14] = user;
$[15] = t0;
} else {
t0 = $[15];
}
return t0;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,29 @@
import { formatDistance } from "./ru/_lib/formatDistance.mjs";
import { formatLong } from "./ru/_lib/formatLong.mjs";
import { formatRelative } from "./ru/_lib/formatRelative.mjs";
import { localize } from "./ru/_lib/localize.mjs";
import { match } from "./ru/_lib/match.mjs";
/**
* @category Locales
* @summary Russian locale.
* @language Russian
* @iso-639-2 rus
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
*/
export const ru = {
code: "ru",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ru;
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sources":["../../../../src/config/withSentryConfig/constants.ts"],"sourcesContent":["// Packages we auto-instrument need to be external for instrumentation to work\n// Next.js externalizes some packages by default, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages\n// Others we need to add ourselves\n//\n// NOTE: 'ai' (Vercel AI SDK) is intentionally NOT included in this list.\n// When externalized, Next.js doesn't properly handle the package's conditional exports,\n// specifically the \"react-server\" export condition. This causes client-side code to be\n// loaded in server components instead of the appropriate server-side functions.\nexport const DEFAULT_SERVER_EXTERNAL_PACKAGES = [\n 'amqplib',\n 'connect',\n 'dataloader',\n 'express',\n 'generic-pool',\n 'graphql',\n '@hapi/hapi',\n 'ioredis',\n 'kafkajs',\n 'koa',\n 'lru-memoizer',\n 'mongodb',\n 'mongoose',\n 'mysql',\n 'mysql2',\n 'knex',\n 'pg',\n 'pg-pool',\n '@node-redis/client',\n '@redis/client',\n 'redis',\n 'tedious',\n];\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,mCAAmC;AAChD,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,SAAS;AACX,EAAE,cAAc;AAChB,EAAE,SAAS;AACX,EAAE,YAAY;AACd,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,SAAS;AACX,EAAE,UAAU;AACZ,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,IAAI;AACN,EAAE,SAAS;AACX,EAAE,oBAAoB;AACtB,EAAE,eAAe;AACjB,EAAE,OAAO;AACT,EAAE,SAAS;AACX;;;;"}
@@ -0,0 +1,135 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const node_fs = require('node:fs');
const node_path = require('node:path');
const detection = require('../utils/detection.js');
let moduleCache;
const INTEGRATION_NAME = 'Modules';
/**
* `__SENTRY_SERVER_MODULES__` can be replaced at build time with the modules loaded by the server.
* Right now, we leverage this in Next.js to circumvent the problem that we do not get access to these things at runtime.
*/
const SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === 'undefined' ? {} : __SENTRY_SERVER_MODULES__;
const _modulesIntegration = (() => {
return {
name: INTEGRATION_NAME,
processEvent(event) {
event.modules = {
...event.modules,
..._getModules(),
};
return event;
},
getModules: _getModules,
};
}) ;
/**
* Add node modules / packages to the event.
* For this, multiple sources are used:
* - They can be injected at build time into the __SENTRY_SERVER_MODULES__ variable (e.g. in Next.js)
* - They are extracted from the dependencies & devDependencies in the package.json file
* - They are extracted from the require.cache (CJS only)
*/
const modulesIntegration = _modulesIntegration;
function getRequireCachePaths() {
try {
return require.cache ? Object.keys(require.cache ) : [];
} catch {
return [];
}
}
/** Extract information about package.json modules */
function collectModules() {
return {
...SERVER_MODULES,
...getModulesFromPackageJson(),
...(detection.isCjs() ? collectRequireModules() : {}),
};
}
/** Extract information about package.json modules from require.cache */
function collectRequireModules() {
const mainPaths = require.main?.paths || [];
const paths = getRequireCachePaths();
// We start with the modules from package.json (if possible)
// These may be overwritten by more specific versions from the require.cache
const infos = {};
const seen = new Set();
paths.forEach(path => {
let dir = path;
/** Traverse directories upward in the search of package.json file */
const updir = () => {
const orig = dir;
dir = node_path.dirname(orig);
if (!dir || orig === dir || seen.has(orig)) {
return undefined;
}
if (mainPaths.indexOf(dir) < 0) {
return updir();
}
const pkgfile = node_path.join(orig, 'package.json');
seen.add(orig);
if (!node_fs.existsSync(pkgfile)) {
return updir();
}
try {
const info = JSON.parse(node_fs.readFileSync(pkgfile, 'utf8'))
;
infos[info.name] = info.version;
} catch {
// no-empty
}
};
updir();
});
return infos;
}
/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */
function _getModules() {
if (!moduleCache) {
moduleCache = collectModules();
}
return moduleCache;
}
function getPackageJson() {
try {
const filePath = node_path.join(process.cwd(), 'package.json');
const packageJson = JSON.parse(node_fs.readFileSync(filePath, 'utf8')) ;
return packageJson;
} catch {
return {};
}
}
function getModulesFromPackageJson() {
const packageJson = getPackageJson();
return {
...packageJson.dependencies,
...packageJson.devDependencies,
};
}
exports.modulesIntegration = modulesIntegration;
//# sourceMappingURL=modules.js.map
@@ -0,0 +1,36 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
const MAC_REGEX = /^(?:[0-9A-Fa-f]{2}([:-]?)[0-9A-Fa-f]{2})(?:(?:\1|\.)(?:[0-9A-Fa-f]{2}([:-]?)[0-9A-Fa-f]{2})){2}$/;
const validate = (value, ast) => {
if (typeof value !== 'string') {
throw createGraphQLError(`Value is not string: ${value}`, ast ? { nodes: ast } : undefined);
}
if (!MAC_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid MAC address: ${value}`, ast ? { nodes: ast } : undefined);
}
return value;
};
export const GraphQLMAC = /*#__PURE__*/ new GraphQLScalarType({
name: `MAC`,
description: `A field whose value is a IEEE 802 48-bit MAC address: https://en.wikipedia.org/wiki/MAC_address.`,
serialize(value) {
return validate(value);
},
parseValue(value) {
return validate(value);
},
parseLiteral(ast) {
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`Can only validate strings as MAC addresses but got a: ${ast.kind}`, { nodes: ast });
}
return validate(ast.value, ast);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'MAC',
type: 'string',
pattern: MAC_REGEX.source,
},
},
});
@@ -0,0 +1,44 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const typeof_1 = __importDefault(require("./typeof"));
const instanceof_1 = __importDefault(require("./instanceof"));
const range_1 = __importDefault(require("./range"));
const exclusiveRange_1 = __importDefault(require("./exclusiveRange"));
const regexp_1 = __importDefault(require("./regexp"));
const transform_1 = __importDefault(require("./transform"));
const uniqueItemProperties_1 = __importDefault(require("./uniqueItemProperties"));
const allRequired_1 = __importDefault(require("./allRequired"));
const anyRequired_1 = __importDefault(require("./anyRequired"));
const oneRequired_1 = __importDefault(require("./oneRequired"));
const patternRequired_1 = __importDefault(require("./patternRequired"));
const prohibited_1 = __importDefault(require("./prohibited"));
const deepProperties_1 = __importDefault(require("./deepProperties"));
const deepRequired_1 = __importDefault(require("./deepRequired"));
const dynamicDefaults_1 = __importDefault(require("./dynamicDefaults"));
const select_1 = __importDefault(require("./select"));
const definitions = [
typeof_1.default,
instanceof_1.default,
range_1.default,
exclusiveRange_1.default,
regexp_1.default,
transform_1.default,
uniqueItemProperties_1.default,
allRequired_1.default,
anyRequired_1.default,
oneRequired_1.default,
patternRequired_1.default,
prohibited_1.default,
deepProperties_1.default,
deepRequired_1.default,
dynamicDefaults_1.default,
];
function ajvKeywords(opts) {
return definitions.map((d) => d(opts)).concat((0, select_1.default)(opts));
}
exports.default = ajvKeywords;
module.exports = ajvKeywords;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,246 @@
import { once } from "node:events";
import { NoopCache } from "../cache/core/index.js";
import { Column } from "../column.js";
import { entityKind, is } from "../entity.js";
import { NoopLogger } from "../logger.js";
import {
SingleStorePreparedQuery,
SingleStoreSession,
SingleStoreTransaction
} from "../singlestore-core/session.js";
import { fillPlaceholders, sql } from "../sql/sql.js";
import { mapResultRow } from "../utils.js";
class SingleStoreDriverPreparedQuery extends SingleStorePreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, customResultMapper, generatedIds, returningIds) {
super(cache, queryMetadata, cacheConfig);
this.client = client;
this.params = params;
this.logger = logger;
this.fields = fields;
this.customResultMapper = customResultMapper;
this.generatedIds = generatedIds;
this.returningIds = returningIds;
this.rawQuery = {
sql: queryString,
// rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
};
this.query = {
sql: queryString,
rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
};
}
static [entityKind] = "SingleStoreDriverPreparedQuery";
rawQuery;
query;
async execute(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.rawQuery.sql, params);
const { fields, client, rawQuery, query, joinsNotNullableMap, customResultMapper, returningIds, generatedIds } = this;
if (!fields && !customResultMapper) {
const res = await this.queryWithCache(rawQuery.sql, params, async () => {
return await client.query(rawQuery, params);
});
const insertId = res[0].insertId;
const affectedRows = res[0].affectedRows;
if (returningIds) {
const returningResponse = [];
let j = 0;
for (let i = insertId; i < insertId + affectedRows; i++) {
for (const column of returningIds) {
const key = returningIds[0].path[0];
if (is(column.field, Column)) {
if (column.field.primary && column.field.autoIncrement) {
returningResponse.push({ [key]: i });
}
if (column.field.defaultFn && generatedIds) {
returningResponse.push({ [key]: generatedIds[j][key] });
}
}
}
j++;
}
return returningResponse;
}
return res;
}
const result = await this.queryWithCache(query.sql, params, async () => {
return await client.query(query, params);
});
const rows = result[0];
if (customResultMapper) {
return customResultMapper(rows);
}
return rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
}
async *iterator(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
const conn = (isPool(this.client) ? await this.client.getConnection() : this.client).connection;
const { fields, query, rawQuery, joinsNotNullableMap, client, customResultMapper } = this;
const hasRowsMapper = Boolean(fields || customResultMapper);
const driverQuery = hasRowsMapper ? conn.query(query, params) : conn.query(rawQuery, params);
const stream = driverQuery.stream();
function dataListener() {
stream.pause();
}
stream.on("data", dataListener);
try {
const onEnd = once(stream, "end");
const onError = once(stream, "error");
while (true) {
stream.resume();
const row = await Promise.race([onEnd, onError, new Promise((resolve) => stream.once("data", resolve))]);
if (row === void 0 || Array.isArray(row) && row.length === 0) {
break;
} else if (row instanceof Error) {
throw row;
} else {
if (hasRowsMapper) {
if (customResultMapper) {
const mappedRow = customResultMapper([row]);
yield Array.isArray(mappedRow) ? mappedRow[0] : mappedRow;
} else {
yield mapResultRow(fields, row, joinsNotNullableMap);
}
} else {
yield row;
}
}
}
} finally {
stream.off("data", dataListener);
if (isPool(client)) {
conn.end();
}
}
}
}
class SingleStoreDriverSession extends SingleStoreSession {
constructor(client, dialect, schema, options) {
super(dialect);
this.client = client;
this.schema = schema;
this.options = options;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
}
static [entityKind] = "SingleStoreDriverSession";
logger;
cache;
prepareQuery(query, fields, customResultMapper, generatedIds, returningIds, queryMetadata, cacheConfig) {
return new SingleStoreDriverPreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
customResultMapper,
generatedIds,
returningIds
);
}
/**
* @internal
* What is its purpose?
*/
async query(query, params) {
this.logger.logQuery(query, params);
const result = await this.client.query({
sql: query,
values: params,
rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
});
return result;
}
all(query) {
const querySql = this.dialect.sqlToQuery(query);
this.logger.logQuery(querySql.sql, querySql.params);
return this.client.execute(querySql.sql, querySql.params).then((result) => result[0]);
}
async transaction(transaction, config) {
const session = isPool(this.client) ? new SingleStoreDriverSession(
await this.client.getConnection(),
this.dialect,
this.schema,
this.options
) : this;
const tx = new SingleStoreDriverTransaction(
this.dialect,
session,
this.schema,
0
);
if (config) {
const setTransactionConfigSql = this.getSetTransactionSQL(config);
if (setTransactionConfigSql) {
await tx.execute(setTransactionConfigSql);
}
const startTransactionSql = this.getStartTransactionSQL(config);
await (startTransactionSql ? tx.execute(startTransactionSql) : tx.execute(sql`begin`));
} else {
await tx.execute(sql`begin`);
}
try {
const result = await transaction(tx);
await tx.execute(sql`commit`);
return result;
} catch (err) {
await tx.execute(sql`rollback`);
throw err;
} finally {
if (isPool(this.client)) {
session.client.release();
}
}
}
}
class SingleStoreDriverTransaction extends SingleStoreTransaction {
static [entityKind] = "SingleStoreDriverTransaction";
async transaction(transaction) {
const savepointName = `sp${this.nestedIndex + 1}`;
const tx = new SingleStoreDriverTransaction(
this.dialect,
this.session,
this.schema,
this.nestedIndex + 1
);
await tx.execute(sql.raw(`savepoint ${savepointName}`));
try {
const result = await transaction(tx);
await tx.execute(sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (err) {
await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
throw err;
}
}
}
function isPool(client) {
return "getConnection" in client;
}
export {
SingleStoreDriverPreparedQuery,
SingleStoreDriverSession,
SingleStoreDriverTransaction
};
//# sourceMappingURL=session.js.map
@@ -0,0 +1,8 @@
export { I as IntlError, a as IntlErrorCode, b as _createCache, c as _createIntlFormatters } from './formatters-r4aAmsMP.js';
export { createTranslator, hasLocale } from './core.js';
export { c as createFormatter, i as initializeConfig } from './initializeConfig-DzxNJxi9.js';
export { IntlProvider, _useExtracted, useFormatter, useLocale, useMessages, useNow, useTimeZone, useTranslations } from './react.js';
@@ -0,0 +1 @@
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/admin/views/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IACjC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;CAC3C,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,qBAAqB,CAAA;IACtC,oBAAoB,EAAE,sBAAsB,CAAC,sBAAsB,CAAC,CAAA;CACrE,GAAG,WAAW,CAAA;AAEf,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,uBAAuB,CAAA;AAE/E,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;IACjC,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAA;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,sBAAsB,CAAC,EAAE,6BAA6B,CAAA;IACtD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;IAC9C,qBAAqB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;IAC1D,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,aAAa,CAAA;AAEjB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAGD,MAAM,MAAM,qBAAqB,GAAG,6BAA6B,CAAA;AACjE,MAAM,MAAM,yBAAyB,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG,yBAAyB,CAAA;AAGrF,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AACtE,MAAM,MAAM,8BAA8B,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACzE,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GAAG,8BAA8B,CAAA;AAGpG,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAA;AAChE,MAAM,MAAM,wBAAwB,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACnE,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,wBAAwB,CAAA;AAGlF,MAAM,MAAM,yBAAyB,GAAG,6BAA6B,CAAA;AACrE,MAAM,MAAM,6BAA6B,GAAG,EAAE,GAAG,uBAAuB,CAAA;AACxE,MAAM,MAAM,yBAAyB,GAAG,yBAAyB,GAAG,6BAA6B,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/instrument.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,KAAK,YAAY,GAAG,OAAO,CAAC;AAE5B,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5F,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;CACpD;AAGD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,2BAA2B,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAE/B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,eAAe,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,eAAe,CAAC;KAC1B,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAE7B,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,YAAY,CAAC;IAEpB,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,wCAAwC;IACxC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016-2019 David Mark Clements
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,185 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const WINDOW = core.GLOBAL_OBJ ;
let ignoreOnError = 0;
/**
* @hidden
*/
function shouldIgnoreOnError() {
return ignoreOnError > 0;
}
/**
* @hidden
*/
function ignoreNextOnError() {
// onerror should trigger before setTimeout
ignoreOnError++;
setTimeout(() => {
ignoreOnError--;
});
}
// eslint-disable-next-line @typescript-eslint/ban-types
/**
* Instruments the given function and sends an event to Sentry every time the
* function throws an exception.
*
* @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always
* has a correct `this` context.
* @returns The wrapped function.
* @hidden
*/
function wrap(
fn,
options
= {},
) {
// for future readers what this does is wrap a function and then create
// a bi-directional wrapping between them.
//
// example: wrapped = wrap(original);
// original.__sentry_wrapped__ -> wrapped
// wrapped.__sentry_original__ -> original
function isFunction(fn) {
return typeof fn === 'function';
}
if (!isFunction(fn)) {
return fn;
}
try {
// if we're dealing with a function that was previously wrapped, return
// the original wrapper.
const wrapper = (fn ).__sentry_wrapped__;
if (wrapper) {
if (typeof wrapper === 'function') {
return wrapper;
} else {
// If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means
// that something messed with it. In that case we want to return the originally passed function.
return fn;
}
}
// We don't wanna wrap it twice
if (core.getOriginalFunction(fn)) {
return fn;
}
} catch {
// Just accessing custom props in some Selenium environments
// can cause a "Permission denied" exception (see raven-js#495).
// Bail on wrapping and return the function as-is (defers to window.onerror).
return fn;
}
// Wrap the function itself
// It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`
const sentryWrapped = function ( ...args) {
try {
// Also wrap arguments that are themselves functions
const wrappedArguments = args.map(arg => wrap(arg, options));
// Attempt to invoke user-land function
// NOTE: If you are a Sentry user, and you are seeing this stack frame, it
// means the sentry.javascript SDK caught an error invoking your application code. This
// is expected behavior and NOT indicative of a bug with sentry.javascript.
return fn.apply(this, wrappedArguments);
} catch (ex) {
ignoreNextOnError();
core.withScope(scope => {
scope.addEventProcessor(event => {
if (options.mechanism) {
core.addExceptionTypeValue(event, undefined, undefined);
core.addExceptionMechanism(event, options.mechanism);
}
event.extra = {
...event.extra,
arguments: args,
};
return event;
});
// no need to add a mechanism here, we already add it via an event processor above
core.captureException(ex);
});
throw ex;
}
} ;
// Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available
try {
for (const property in fn) {
if (Object.prototype.hasOwnProperty.call(fn, property)) {
sentryWrapped[property ] = fn[property ];
}
}
} catch {
// Accessing some objects may throw
// ref: https://github.com/getsentry/sentry-javascript/issues/1168
}
// Signal that this function has been wrapped/filled already
// for both debugging and to prevent it to being wrapped/filled twice
core.markFunctionWrapped(sentryWrapped, fn);
core.addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);
// Restore original function name (not all browsers allow that)
try {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');
if (descriptor.configurable) {
Object.defineProperty(sentryWrapped, 'name', {
get() {
return fn.name;
},
});
}
} catch {
// This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.
// to save some bytes we simply try-catch this
}
return sentryWrapped;
}
/**
* Get HTTP request data from the current page.
*/
function getHttpRequestData() {
// grab as much info as exists and add it to the event
const url = core.getLocationHref();
const { referrer } = WINDOW.document || {};
const { userAgent } = WINDOW.navigator || {};
const headers = {
...(referrer && { Referer: referrer }),
...(userAgent && { 'User-Agent': userAgent }),
};
const request = {
url,
headers,
};
return request;
}
exports.WINDOW = WINDOW;
exports.getHttpRequestData = getHttpRequestData;
exports.ignoreNextOnError = ignoreNextOnError;
exports.shouldIgnoreOnError = shouldIgnoreOnError;
exports.wrap = wrap;
//# sourceMappingURL=helpers.js.map
@@ -0,0 +1,183 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["前", "公元"],
abbreviated: ["前", "公元"],
wide: ["公元前", "公元"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
wide: ["第一季度", "第二季度", "第三季度", "第四季度"],
};
const monthValues = {
narrow: [
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九",
"十",
"十一",
"十二",
],
abbreviated: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
],
wide: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
};
const dayValues = {
narrow: ["日", "一", "二", "三", "四", "五", "六"],
short: ["日", "一", "二", "三", "四", "五", "六"],
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
};
const dayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜间",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜间",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜间",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜间",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
switch (options?.unit) {
case "date":
return number.toString() + "日";
case "hour":
return number.toString() + "时";
case "minute":
return number.toString() + "分";
case "second":
return number.toString() + "秒";
default:
return "第 " + number.toString();
}
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};
@@ -0,0 +1 @@
{"version":3,"file":"grapheme-break-trie.js","sourceRoot":"","sources":["../../src/grapheme-break-trie.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GACf,8izBAA8izB,CAAC;AACtizB,QAAA,UAAU,GAAG,KAAK,CAAC"}
@@ -0,0 +1,58 @@
/**
* @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 Wheat = createLucideIcon("Wheat", [
["path", { d: "M2 22 16 8", key: "60hf96" }],
[
"path",
{
d: "M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",
key: "1rdhi6"
}
],
[
"path",
{
d: "M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",
key: "1sdzmb"
}
],
[
"path",
{
d: "M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",
key: "eoatbi"
}
],
["path", { d: "M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z", key: "19rau1" }],
[
"path",
{
d: "M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",
key: "tc8ph9"
}
],
[
"path",
{
d: "M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",
key: "2m8kc5"
}
],
[
"path",
{
d: "M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",
key: "vex3ng"
}
]
]);
export { Wheat as default };
//# sourceMappingURL=wheat.js.map
@@ -0,0 +1,47 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NOOP_LOGGER_PROVIDER } from './NoopLoggerProvider';
import { ProxyLogger } from './ProxyLogger';
export class ProxyLoggerProvider {
getLogger(name, version, options) {
var _a;
return ((_a = this._getDelegateLogger(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyLogger(this, name, version, options));
}
/**
* Get the delegate logger provider.
* Used by tests only.
* @internal
*/
_getDelegate() {
var _a;
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_LOGGER_PROVIDER;
}
/**
* Set the delegate logger provider
* @internal
*/
_setDelegate(delegate) {
this._delegate = delegate;
}
/**
* @internal
*/
_getDelegateLogger(name, version, options) {
var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getLogger(name, version, options);
}
}
//# sourceMappingURL=ProxyLoggerProvider.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/openai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,cAAc,CAAC;AAKjE,eAAO,MAAM,gBAAgB;;CAG5B,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,iBAAiB,6EAAwC,CAAC"}
@@ -0,0 +1,2 @@
export { _globalThis } from './globalThis';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
export declare const intlFormatDistance: import("./types.js").FPFn2<
string,
string | number | Date,
string | number | Date
>;

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