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

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

View File

@@ -0,0 +1,37 @@
import fs from 'fs/promises';
import { ErrorDeletingFile } from '../errors/index.js';
import { fileExists } from './fileExists.js';
export const deleteAssociatedFiles = async ({ collectionConfig, doc, files = [], overrideDelete, req })=>{
if (!collectionConfig.upload) {
return;
}
if (overrideDelete || files.length > 0) {
const { staticDir: staticPath } = collectionConfig.upload;
const fileToDelete = `${staticPath}/${doc.filename}`;
try {
if (await fileExists(fileToDelete)) {
await fs.unlink(fileToDelete);
}
} catch (ignore) {
throw new ErrorDeletingFile(req.t);
}
if (doc.sizes) {
const sizes = Object.values(doc.sizes);
// Since forEach will not wait until unlink is finished it could
// happen that two operations will try to delete the same file.
// To avoid this it is recommended to use "sync" instead
for (const size of sizes){
const sizeToDelete = `${staticPath}/${size.filename}`;
try {
if (await fileExists(sizeToDelete)) {
await fs.unlink(sizeToDelete);
}
} catch (ignore) {
throw new ErrorDeletingFile(req.t);
}
}
}
}
};
//# sourceMappingURL=deleteAssociatedFiles.js.map

View File

@@ -0,0 +1,17 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const WebpackError = require("./WebpackError");
module.exports = class HarmonyLinkingError extends WebpackError {
/** @param {string} message Error message */
constructor(message) {
super(message);
/** @type {string} */
this.name = "HarmonyLinkingError";
this.hideStack = true;
}
};

View File

@@ -0,0 +1,35 @@
"use strict";
exports.endOfSecond = endOfSecond;
var _index = require("./toDate.cjs");
/**
* The {@link endOfSecond} function options.
*/
/**
* @name endOfSecond
* @category Second Helpers
* @summary Return the end of a second for the given date.
*
* @description
* Return the end of a second for the given date.
* The result will be in the local timezone if no `in` option is specified.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The end of a second
*
* @example
* // The end of a second for 1 December 2014 22:15:45.400:
* const result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
* //=> Mon Dec 01 2014 22:15:45.999
*/
function endOfSecond(date, options) {
const _date = (0, _index.toDate)(date, options?.in);
_date.setMilliseconds(999);
return _date;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"omega.js","sources":["../../../src/icons/omega.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Omega\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAyMGg0LjVhLjUuNSAwIDAgMCAuNS0uNXYtLjI4MmEuNTIuNTIgMCAwIDAtLjI0Ny0uNDM3IDggOCAwIDEgMSA4LjQ5NC0uMDAxLjUyLjUyIDAgMCAwLS4yNDcuNDM4di4yODJhLjUuNSAwIDAgMCAuNS41SDIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/omega\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 Omega = createLucideIcon('Omega', [\n [\n 'path',\n {\n d: 'M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21',\n key: '1x94xo',\n },\n ],\n]);\n\nexport default Omega;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"package-plus.js","sources":["../../../src/icons/package-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackagePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTZoNiIgLz4KICA8cGF0aCBkPSJNMTkgMTN2NiIgLz4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/package-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackagePlus = createLucideIcon('PackagePlus', [\n ['path', { d: 'M16 16h6', key: '100bgy' }],\n ['path', { d: 'M19 13v6', key: '85cyf1' }],\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n]);\n\nexport default PackagePlus;\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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,5 @@
import type { SanitizedConfig, SanitizedPermissions, VisibleEntities } from 'payload';
import { type I18nClient } from '@payloadcms/translations';
/** @internal */
export declare function getNavGroups(permissions: SanitizedPermissions, visibleEntities: VisibleEntities, config: SanitizedConfig, i18n: I18nClient): import("./groupNavItems.js").NavGroupType[];
//# sourceMappingURL=getNavGroups.d.ts.map

View File

@@ -0,0 +1,118 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Type-guard: The attribute object has the shape the official attribute object (value, type, unit).
* https://develop.sentry.dev/sdk/telemetry/scopes/#setting-attributes
*/
function isAttributeObject(maybeObj) {
return (
typeof maybeObj === 'object' &&
maybeObj != null &&
!Array.isArray(maybeObj) &&
Object.keys(maybeObj).includes('value')
);
}
/**
* Converts an attribute value to a typed attribute value.
*
* For now, we intentionally only support primitive values and attribute objects with primitive values.
* If @param useFallback is true, we stringify non-primitive values to a string attribute value. Otherwise
* we return `undefined` for unsupported values.
*
* @param value - The value of the passed attribute.
* @param useFallback - If true, unsupported values will be stringified to a string attribute value.
* Defaults to false. In this case, `undefined` is returned for unsupported values.
* @returns The typed attribute.
*/
function attributeValueToTypedAttributeValue(
rawValue,
useFallback,
) {
const { value, unit } = isAttributeObject(rawValue) ? rawValue : { value: rawValue, unit: undefined };
const attributeValue = getTypedAttributeValue(value);
const checkedUnit = unit && typeof unit === 'string' ? { unit } : {};
if (attributeValue) {
return { ...attributeValue, ...checkedUnit };
}
if (!useFallback || (useFallback === 'skip-undefined' && value === undefined)) {
return;
}
// Fallback: stringify the value
// TODO(v11): be smarter here and use String constructor if stringify fails
// (this is a breaking change for already existing attribute values)
let stringValue = '';
try {
stringValue = JSON.stringify(value) ?? '';
} catch {
// Do nothing
}
return {
value: stringValue,
type: 'string',
...checkedUnit,
};
}
/**
* Serializes raw attributes to typed attributes as expected in our envelopes.
*
* @param attributes The raw attributes to serialize.
* @param fallback If true, unsupported values will be stringified to a string attribute value.
* Defaults to false. In this case, `undefined` is returned for unsupported values.
*
* @returns The serialized attributes.
*/
function serializeAttributes(
attributes,
fallback = false,
) {
const serializedAttributes = {};
for (const [key, value] of Object.entries(attributes ?? {})) {
const typedValue = attributeValueToTypedAttributeValue(value, fallback);
if (typedValue) {
serializedAttributes[key] = typedValue;
}
}
return serializedAttributes;
}
/**
* NOTE: We intentionally do not return anything for non-primitive values:
* - array support will come in the future but if we stringify arrays now,
* sending arrays (unstringified) later will be a subtle breaking change.
* - Objects are not supported yet and product support is still TBD.
* - We still keep the type signature for TypedAttributeValue wider to avoid a
* breaking change once we add support for non-primitive values.
* - Once we go back to supporting arrays and stringifying all other values,
* we already implemented the serialization logic here:
* https://github.com/getsentry/sentry-javascript/pull/18165
*/
function getTypedAttributeValue(value) {
const primitiveType =
typeof value === 'string'
? 'string'
: typeof value === 'boolean'
? 'boolean'
: typeof value === 'number' && !Number.isNaN(value)
? Number.isInteger(value)
? 'integer'
: 'double'
: null;
if (primitiveType) {
// @ts-expect-error - TS complains because {@link TypedAttributeValue} is strictly typed to
// avoid setting the wrong `type` on the attribute value.
// In this case, getPrimitiveType already does the check but TS doesn't know that.
// The "clean" alternative is to return an object per `typeof value` case
// but that would require more bundle size
// Therefore, we ignore it.
return { value, type: primitiveType };
}
}
exports.attributeValueToTypedAttributeValue = attributeValueToTypedAttributeValue;
exports.isAttributeObject = isAttributeObject;
exports.serializeAttributes = serializeAttributes;
//# sourceMappingURL=attributes.js.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Minimize2 = createLucideIcon("Minimize2", [
["polyline", { points: "4 14 10 14 10 20", key: "11kfnr" }],
["polyline", { points: "20 10 14 10 14 4", key: "rlmsce" }],
["line", { x1: "14", x2: "21", y1: "10", y2: "3", key: "o5lafz" }],
["line", { x1: "3", x2: "10", y1: "21", y2: "14", key: "1atl0r" }]
]);
export { Minimize2 as default };
//# sourceMappingURL=minimize-2.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.04856,"115":0.01121,"136":0.01121,"143":0.00374,"144":0.02988,"145":0.26145,"146":0.25398,_:"2 3 4 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 78 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 124 125 126 127 128 129 130 131 132 133 134 135 137 138 139 140 141 142 147 148 149 3.5 3.6"},D:{"49":0.01121,"69":0.05603,"75":0.00374,"76":0.01868,"79":0.11205,"80":0.00374,"86":0.00374,"93":0.01121,"94":0.00374,"103":0.11205,"105":0.00374,"108":0.01121,"109":0.93375,"111":0.05603,"114":0.00374,"116":0.10085,"119":0.00374,"120":0.04482,"122":0.02988,"123":0.00374,"124":0.01868,"125":0.26145,"126":0.03362,"128":0.05229,"129":0.17181,"130":0.01121,"131":0.01121,"132":0.5229,"133":0.00374,"134":0.02241,"136":0.00747,"137":0.02988,"138":0.30627,"139":0.14567,"140":0.04856,"141":0.23531,"142":6.62216,"143":8.16471,"144":0.00747,_:"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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 77 78 81 83 84 85 87 88 89 90 91 92 95 96 97 98 99 100 101 102 104 106 107 110 112 113 115 117 118 121 127 135 145 146"},F:{"93":0.05603,"95":0.00747,"123":0.01121,"124":0.437,"125":0.08964,_:"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 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"100":0.00374,"122":0.00374,"125":0.00374,"126":0.00747,"128":0.00374,"131":0.00374,"136":0.00374,"139":0.01121,"140":0.00747,"141":0.04109,"142":1.89738,"143":4.3214,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 124 127 129 130 132 133 134 135 137 138"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 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 15.5 16.0 16.2 16.5 17.0 17.2 18.2 26.3","13.1":0.00747,"14.1":0.01121,"15.6":0.07844,"16.1":0.03362,"16.3":0.32495,"16.4":0.02241,"16.6":0.07097,"17.1":0.05603,"17.3":0.04109,"17.4":0.04109,"17.5":0.47435,"17.6":0.25398,"18.0":0.00747,"18.1":0.05229,"18.3":0.0747,"18.4":0.05229,"18.5-18.6":0.19049,"26.0":0.2129,"26.1":0.64242,"26.2":0.16061},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00448,"5.0-5.1":0,"6.0-6.1":0.00897,"7.0-7.1":0.00672,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01793,"10.0-10.2":0.00224,"10.3":0.03138,"11.0-11.2":0.38556,"11.3-11.4":0.01121,"12.0-12.1":0.00897,"12.2-12.5":0.10087,"13.0-13.1":0.00224,"13.2":0.01569,"13.3":0.00448,"13.4-13.7":0.01569,"14.0-14.4":0.03138,"14.5-14.8":0.03362,"15.0-15.1":0.03587,"15.2-15.3":0.0269,"15.4":0.02914,"15.5":0.03138,"15.6-15.8":0.48643,"16.0":0.05604,"16.1":0.1076,"16.2":0.05604,"16.3":0.10087,"16.4":0.02466,"16.5":0.04259,"16.6-16.7":0.63214,"17.0":0.03587,"17.1":0.05828,"17.2":0.04259,"17.3":0.06501,"17.4":0.10984,"17.5":0.2152,"17.6-17.7":0.49764,"18.0":0.11208,"18.1":0.23313,"18.2":0.12329,"18.3":0.40125,"18.4":0.20623,"18.5-18.7":14.80812,"26.0":0.28917,"26.1":2.40526,"26.2":0.45729,"26.3":0.02017},P:{"21":0.07222,"24":0.03095,"25":0.14444,"26":0.05159,"27":0.02063,"28":0.17539,"29":3.94114,_:"4 20 22 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","7.2-7.4":0.04127,"16.0":0.02063},I:{"0":0.00625,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.11277,_:"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"},O:{"0":0.01253},H:{"0":0},L:{"0":42.40484},R:{_:"0"},M:{"0":0.08771}};

View File

@@ -0,0 +1,801 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
var core = require('@dnd-kit/core');
var utilities = require('@dnd-kit/utilities');
/**
* Move an array item to a different position. Returns a new array with the item moved to the new position.
*/
function arrayMove(array, from, to) {
const newArray = array.slice();
newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
return newArray;
}
/**
* Swap an array item to a different position. Returns a new array with the item swapped to the new position.
*/
function arraySwap(array, from, to) {
const newArray = array.slice();
newArray[from] = array[to];
newArray[to] = array[from];
return newArray;
}
function getSortedRects(items, rects) {
return items.reduce((accumulator, id, index) => {
const rect = rects.get(id);
if (rect) {
accumulator[index] = rect;
}
return accumulator;
}, Array(items.length));
}
function isValidIndex(index) {
return index !== null && index >= 0;
}
function itemsEqual(a, b) {
if (a === b) {
return true;
}
if (a.length !== b.length) {
return false;
}
for (let i = 0; i < a.length; i++) {
if (a[i] !== b[i]) {
return false;
}
}
return true;
}
function normalizeDisabled(disabled) {
if (typeof disabled === 'boolean') {
return {
draggable: disabled,
droppable: disabled
};
}
return disabled;
}
// To-do: We should be calculating scale transformation
const defaultScale = {
scaleX: 1,
scaleY: 1
};
const horizontalListSortingStrategy = _ref => {
var _rects$activeIndex;
let {
rects,
activeNodeRect: fallbackActiveRect,
activeIndex,
overIndex,
index
} = _ref;
const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
if (!activeNodeRect) {
return null;
}
const itemGap = getItemGap(rects, index, activeIndex);
if (index === activeIndex) {
const newIndexRect = rects[overIndex];
if (!newIndexRect) {
return null;
}
return {
x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,
y: 0,
...defaultScale
};
}
if (index > activeIndex && index <= overIndex) {
return {
x: -activeNodeRect.width - itemGap,
y: 0,
...defaultScale
};
}
if (index < activeIndex && index >= overIndex) {
return {
x: activeNodeRect.width + itemGap,
y: 0,
...defaultScale
};
}
return {
x: 0,
y: 0,
...defaultScale
};
};
function getItemGap(rects, index, activeIndex) {
const currentRect = rects[index];
const previousRect = rects[index - 1];
const nextRect = rects[index + 1];
if (!currentRect || !previousRect && !nextRect) {
return 0;
}
if (activeIndex < index) {
return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);
}
return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);
}
const rectSortingStrategy = _ref => {
let {
rects,
activeIndex,
overIndex,
index
} = _ref;
const newRects = arrayMove(rects, overIndex, activeIndex);
const oldRect = rects[index];
const newRect = newRects[index];
if (!newRect || !oldRect) {
return null;
}
return {
x: newRect.left - oldRect.left,
y: newRect.top - oldRect.top,
scaleX: newRect.width / oldRect.width,
scaleY: newRect.height / oldRect.height
};
};
const rectSwappingStrategy = _ref => {
let {
activeIndex,
index,
rects,
overIndex
} = _ref;
let oldRect;
let newRect;
if (index === activeIndex) {
oldRect = rects[index];
newRect = rects[overIndex];
}
if (index === overIndex) {
oldRect = rects[index];
newRect = rects[activeIndex];
}
if (!newRect || !oldRect) {
return null;
}
return {
x: newRect.left - oldRect.left,
y: newRect.top - oldRect.top,
scaleX: newRect.width / oldRect.width,
scaleY: newRect.height / oldRect.height
};
};
// To-do: We should be calculating scale transformation
const defaultScale$1 = {
scaleX: 1,
scaleY: 1
};
const verticalListSortingStrategy = _ref => {
var _rects$activeIndex;
let {
activeIndex,
activeNodeRect: fallbackActiveRect,
index,
rects,
overIndex
} = _ref;
const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
if (!activeNodeRect) {
return null;
}
if (index === activeIndex) {
const overIndexRect = rects[overIndex];
if (!overIndexRect) {
return null;
}
return {
x: 0,
y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,
...defaultScale$1
};
}
const itemGap = getItemGap$1(rects, index, activeIndex);
if (index > activeIndex && index <= overIndex) {
return {
x: 0,
y: -activeNodeRect.height - itemGap,
...defaultScale$1
};
}
if (index < activeIndex && index >= overIndex) {
return {
x: 0,
y: activeNodeRect.height + itemGap,
...defaultScale$1
};
}
return {
x: 0,
y: 0,
...defaultScale$1
};
};
function getItemGap$1(clientRects, index, activeIndex) {
const currentRect = clientRects[index];
const previousRect = clientRects[index - 1];
const nextRect = clientRects[index + 1];
if (!currentRect) {
return 0;
}
if (activeIndex < index) {
return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;
}
return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;
}
const ID_PREFIX = 'Sortable';
const Context = /*#__PURE__*/React__default.createContext({
activeIndex: -1,
containerId: ID_PREFIX,
disableTransforms: false,
items: [],
overIndex: -1,
useDragOverlay: false,
sortedRects: [],
strategy: rectSortingStrategy,
disabled: {
draggable: false,
droppable: false
}
});
function SortableContext(_ref) {
let {
children,
id,
items: userDefinedItems,
strategy = rectSortingStrategy,
disabled: disabledProp = false
} = _ref;
const {
active,
dragOverlay,
droppableRects,
over,
measureDroppableContainers
} = core.useDndContext();
const containerId = utilities.useUniqueId(ID_PREFIX, id);
const useDragOverlay = Boolean(dragOverlay.rect !== null);
const items = React.useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);
const isDragging = active != null;
const activeIndex = active ? items.indexOf(active.id) : -1;
const overIndex = over ? items.indexOf(over.id) : -1;
const previousItemsRef = React.useRef(items);
const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
const disabled = normalizeDisabled(disabledProp);
utilities.useIsomorphicLayoutEffect(() => {
if (itemsHaveChanged && isDragging) {
measureDroppableContainers(items);
}
}, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);
React.useEffect(() => {
previousItemsRef.current = items;
}, [items]);
const contextValue = React.useMemo(() => ({
activeIndex,
containerId,
disabled,
disableTransforms,
items,
overIndex,
useDragOverlay,
sortedRects: getSortedRects(items, droppableRects),
strategy
}), // eslint-disable-next-line react-hooks/exhaustive-deps
[activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);
return React__default.createElement(Context.Provider, {
value: contextValue
}, children);
}
const defaultNewIndexGetter = _ref => {
let {
id,
items,
activeIndex,
overIndex
} = _ref;
return arrayMove(items, activeIndex, overIndex).indexOf(id);
};
const defaultAnimateLayoutChanges = _ref2 => {
let {
containerId,
isSorting,
wasDragging,
index,
items,
newIndex,
previousItems,
previousContainerId,
transition
} = _ref2;
if (!transition || !wasDragging) {
return false;
}
if (previousItems !== items && index === newIndex) {
return false;
}
if (isSorting) {
return true;
}
return newIndex !== index && containerId === previousContainerId;
};
const defaultTransition = {
duration: 200,
easing: 'ease'
};
const transitionProperty = 'transform';
const disabledTransition = /*#__PURE__*/utilities.CSS.Transition.toString({
property: transitionProperty,
duration: 0,
easing: 'linear'
});
const defaultAttributes = {
roleDescription: 'sortable'
};
/*
* When the index of an item changes while sorting,
* we need to temporarily disable the transforms
*/
function useDerivedTransform(_ref) {
let {
disabled,
index,
node,
rect
} = _ref;
const [derivedTransform, setDerivedtransform] = React.useState(null);
const previousIndex = React.useRef(index);
utilities.useIsomorphicLayoutEffect(() => {
if (!disabled && index !== previousIndex.current && node.current) {
const initial = rect.current;
if (initial) {
const current = core.getClientRect(node.current, {
ignoreTransform: true
});
const delta = {
x: initial.left - current.left,
y: initial.top - current.top,
scaleX: initial.width / current.width,
scaleY: initial.height / current.height
};
if (delta.x || delta.y) {
setDerivedtransform(delta);
}
}
}
if (index !== previousIndex.current) {
previousIndex.current = index;
}
}, [disabled, index, node, rect]);
React.useEffect(() => {
if (derivedTransform) {
setDerivedtransform(null);
}
}, [derivedTransform]);
return derivedTransform;
}
function useSortable(_ref) {
let {
animateLayoutChanges = defaultAnimateLayoutChanges,
attributes: userDefinedAttributes,
disabled: localDisabled,
data: customData,
getNewIndex = defaultNewIndexGetter,
id,
strategy: localStrategy,
resizeObserverConfig,
transition = defaultTransition
} = _ref;
const {
items,
containerId,
activeIndex,
disabled: globalDisabled,
disableTransforms,
sortedRects,
overIndex,
useDragOverlay,
strategy: globalStrategy
} = React.useContext(Context);
const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
const index = items.indexOf(id);
const data = React.useMemo(() => ({
sortable: {
containerId,
index,
items
},
...customData
}), [containerId, customData, index, items]);
const itemsAfterCurrentSortable = React.useMemo(() => items.slice(items.indexOf(id)), [items, id]);
const {
rect,
node,
isOver,
setNodeRef: setDroppableNodeRef
} = core.useDroppable({
id,
data,
disabled: disabled.droppable,
resizeObserverConfig: {
updateMeasurementsFor: itemsAfterCurrentSortable,
...resizeObserverConfig
}
});
const {
active,
activatorEvent,
activeNodeRect,
attributes,
setNodeRef: setDraggableNodeRef,
listeners,
isDragging,
over,
setActivatorNodeRef,
transform
} = core.useDraggable({
id,
data,
attributes: { ...defaultAttributes,
...userDefinedAttributes
},
disabled: disabled.draggable
});
const setNodeRef = utilities.useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
const isSorting = Boolean(active);
const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);
const shouldDisplaceDragSource = !useDragOverlay && isDragging;
const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;
const strategy = localStrategy != null ? localStrategy : globalStrategy;
const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({
rects: sortedRects,
activeNodeRect,
activeIndex,
overIndex,
index
}) : null;
const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({
id,
items,
activeIndex,
overIndex
}) : index;
const activeId = active == null ? void 0 : active.id;
const previous = React.useRef({
activeId,
items,
newIndex,
containerId
});
const itemsHaveChanged = items !== previous.current.items;
const shouldAnimateLayoutChanges = animateLayoutChanges({
active,
containerId,
isDragging,
isSorting,
id,
index,
items,
newIndex: previous.current.newIndex,
previousItems: previous.current.items,
previousContainerId: previous.current.containerId,
transition,
wasDragging: previous.current.activeId != null
});
const derivedTransform = useDerivedTransform({
disabled: !shouldAnimateLayoutChanges,
index,
node,
rect
});
React.useEffect(() => {
if (isSorting && previous.current.newIndex !== newIndex) {
previous.current.newIndex = newIndex;
}
if (containerId !== previous.current.containerId) {
previous.current.containerId = containerId;
}
if (items !== previous.current.items) {
previous.current.items = items;
}
}, [isSorting, newIndex, containerId, items]);
React.useEffect(() => {
if (activeId === previous.current.activeId) {
return;
}
if (activeId != null && previous.current.activeId == null) {
previous.current.activeId = activeId;
return;
}
const timeoutId = setTimeout(() => {
previous.current.activeId = activeId;
}, 50);
return () => clearTimeout(timeoutId);
}, [activeId]);
return {
active,
activeIndex,
attributes,
data,
rect,
index,
newIndex,
items,
isOver,
isSorting,
isDragging,
listeners,
node,
overIndex,
over,
setNodeRef,
setActivatorNodeRef,
setDroppableNodeRef,
setDraggableNodeRef,
transform: derivedTransform != null ? derivedTransform : finalTransform,
transition: getTransition()
};
function getTransition() {
if ( // Temporarily disable transitions for a single frame to set up derived transforms
derivedTransform || // Or to prevent items jumping to back to their "new" position when items change
itemsHaveChanged && previous.current.newIndex === index) {
return disabledTransition;
}
if (shouldDisplaceDragSource && !utilities.isKeyboardEvent(activatorEvent) || !transition) {
return undefined;
}
if (isSorting || shouldAnimateLayoutChanges) {
return utilities.CSS.Transition.toString({ ...transition,
property: transitionProperty
});
}
return undefined;
}
}
function normalizeLocalDisabled(localDisabled, globalDisabled) {
var _localDisabled$dragga, _localDisabled$droppa;
if (typeof localDisabled === 'boolean') {
return {
draggable: localDisabled,
// Backwards compatibility
droppable: false
};
}
return {
draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,
droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable
};
}
function hasSortableData(entry) {
if (!entry) {
return false;
}
const data = entry.data.current;
if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {
return true;
}
return false;
}
const directions = [core.KeyboardCode.Down, core.KeyboardCode.Right, core.KeyboardCode.Up, core.KeyboardCode.Left];
const sortableKeyboardCoordinates = (event, _ref) => {
let {
context: {
active,
collisionRect,
droppableRects,
droppableContainers,
over,
scrollableAncestors
}
} = _ref;
if (directions.includes(event.code)) {
event.preventDefault();
if (!active || !collisionRect) {
return;
}
const filteredContainers = [];
droppableContainers.getEnabled().forEach(entry => {
if (!entry || entry != null && entry.disabled) {
return;
}
const rect = droppableRects.get(entry.id);
if (!rect) {
return;
}
switch (event.code) {
case core.KeyboardCode.Down:
if (collisionRect.top < rect.top) {
filteredContainers.push(entry);
}
break;
case core.KeyboardCode.Up:
if (collisionRect.top > rect.top) {
filteredContainers.push(entry);
}
break;
case core.KeyboardCode.Left:
if (collisionRect.left > rect.left) {
filteredContainers.push(entry);
}
break;
case core.KeyboardCode.Right:
if (collisionRect.left < rect.left) {
filteredContainers.push(entry);
}
break;
}
});
const collisions = core.closestCorners({
active,
collisionRect: collisionRect,
droppableRects,
droppableContainers: filteredContainers,
pointerCoordinates: null
});
let closestId = core.getFirstCollision(collisions, 'id');
if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {
closestId = collisions[1].id;
}
if (closestId != null) {
const activeDroppable = droppableContainers.get(active.id);
const newDroppable = droppableContainers.get(closestId);
const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;
const newNode = newDroppable == null ? void 0 : newDroppable.node.current;
if (newNode && newRect && activeDroppable && newDroppable) {
const newScrollAncestors = core.getScrollableAncestors(newNode);
const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);
const hasSameContainer = isSameContainer(activeDroppable, newDroppable);
const isAfterActive = isAfter(activeDroppable, newDroppable);
const offset = hasDifferentScrollAncestors || !hasSameContainer ? {
x: 0,
y: 0
} : {
x: isAfterActive ? collisionRect.width - newRect.width : 0,
y: isAfterActive ? collisionRect.height - newRect.height : 0
};
const rectCoordinates = {
x: newRect.left,
y: newRect.top
};
const newCoordinates = offset.x && offset.y ? rectCoordinates : utilities.subtract(rectCoordinates, offset);
return newCoordinates;
}
}
}
return undefined;
};
function isSameContainer(a, b) {
if (!hasSortableData(a) || !hasSortableData(b)) {
return false;
}
return a.data.current.sortable.containerId === b.data.current.sortable.containerId;
}
function isAfter(a, b) {
if (!hasSortableData(a) || !hasSortableData(b)) {
return false;
}
if (!isSameContainer(a, b)) {
return false;
}
return a.data.current.sortable.index < b.data.current.sortable.index;
}
exports.SortableContext = SortableContext;
exports.arrayMove = arrayMove;
exports.arraySwap = arraySwap;
exports.defaultAnimateLayoutChanges = defaultAnimateLayoutChanges;
exports.defaultNewIndexGetter = defaultNewIndexGetter;
exports.hasSortableData = hasSortableData;
exports.horizontalListSortingStrategy = horizontalListSortingStrategy;
exports.rectSortingStrategy = rectSortingStrategy;
exports.rectSwappingStrategy = rectSwappingStrategy;
exports.sortableKeyboardCoordinates = sortableKeyboardCoordinates;
exports.useSortable = useSortable;
exports.verticalListSortingStrategy = verticalListSortingStrategy;
//# sourceMappingURL=sortable.cjs.development.js.map

View File

@@ -0,0 +1,24 @@
/**
* @name differenceInYears
* @category Year Helpers
* @summary Get the number of full years between the given dates.
*
* @description
* Get the number of full years between the given dates.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
*
* @returns The number of full years
*
* @example
* // How many full years are between 31 December 2013 and 11 February 2015?
* const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))
* //=> 1
*/
export declare function differenceInYears<DateType extends Date>(
dateLeft: DateType | number | string,
dateRight: DateType | number | string,
): number;

View File

@@ -0,0 +1,46 @@
import type { HandlerDataFetch } from './types-hoist/instrument';
import type { ResponseHookInfo } from './types-hoist/request';
import type { Span, SpanOrigin } from './types-hoist/span';
type PolymorphicRequestHeaders = Record<string, string | undefined> | Array<[string, string]> | {
append: (key: string, value: string) => void;
get: (key: string) => string | null | undefined;
};
interface InstrumentFetchRequestOptions {
spanOrigin?: SpanOrigin;
propagateTraceparent?: boolean;
onRequestSpanEnd?: (span: Span, responseInformation: ResponseHookInfo) => void;
}
/**
* Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.
*
* @deprecated pass an options object instead of the spanOrigin parameter
*
* @returns Span if a span was created, otherwise void.
*/
export declare function instrumentFetchRequest(handlerData: HandlerDataFetch, shouldCreateSpan: (url: string) => boolean, shouldAttachHeaders: (url: string) => boolean, spans: Record<string, Span>, spanOrigin: SpanOrigin): Span | undefined;
/**
* Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.
*
* @returns Span if a span was created, otherwise void.
*/
export declare function instrumentFetchRequest(handlerData: HandlerDataFetch, shouldCreateSpan: (url: string) => boolean, shouldAttachHeaders: (url: string) => boolean, spans: Record<string, Span>, instrumentFetchRequestOptions: InstrumentFetchRequestOptions): Span | undefined;
/**
* Calls the onRequestSpanEnd callback if it is defined.
*/
export declare function _callOnRequestSpanEnd(span: Span, handlerData: HandlerDataFetch, spanOriginOrOptions?: SpanOrigin | InstrumentFetchRequestOptions): void;
/**
* Adds sentry-trace and baggage headers to the various forms of fetch headers.
* exported only for testing purposes
*
* When we determine if we should add a baggage header, there are 3 cases:
* 1. No previous baggage header -> add baggage
* 2. Previous baggage header has no sentry baggage values -> add our baggage
* 3. Previous baggage header has sentry baggage values -> do nothing (might have been added manually by users)
*/
export declare function _addTracingHeadersToFetchRequest(request: string | Request, fetchOptionsObj: {
headers?: {
[key: string]: string[] | string | undefined;
} | PolymorphicRequestHeaders;
}, span?: Span, propagateTraceparent?: boolean): PolymorphicRequestHeaders | undefined;
export {};
//# sourceMappingURL=fetch.d.ts.map

View File

@@ -0,0 +1,96 @@
export const getLivePreviewConfig = ({
collectionConfig,
config,
globalConfig,
isLivePreviewEnabled
}) => ({
...(isLivePreviewEnabled ? config.admin.livePreview : {}),
...(collectionConfig?.admin?.livePreview || {}),
...(globalConfig?.admin?.livePreview || {})
});
/**
* Multi-level check to determine whether live preview is enabled on a collection or global.
* For example, live preview can be enabled at both the root config level, or on the entity's config.
* If a collectionConfig/globalConfig is provided, checks if it is enabled at the root level,
* or on the entity's own config.
*/
export const isLivePreviewEnabled = ({
collectionConfig,
config,
globalConfig
}) => {
if (globalConfig) {
return Boolean(config.admin?.livePreview?.globals?.includes(globalConfig.slug) || globalConfig.admin?.livePreview);
}
if (collectionConfig) {
return Boolean(config.admin?.livePreview?.collections?.includes(collectionConfig.slug) || collectionConfig.admin?.livePreview);
}
};
/**
* 1. Looks up the relevant live preview config, which could have been enabled:
* a. At the root level, e.g. `collections: ['posts']`
* b. On the collection or global config, e.g. `admin: { livePreview: { ... } }`
* 2. Determines if live preview is enabled, and if not, early returns.
* 3. Merges the config with the root config, if necessary.
* 4. Executes the `url` function, if necessary.
*
* Notice: internal function only. Subject to change at any time. Use at your own risk.
*/
export const handleLivePreview = async ({
collectionSlug,
config,
data,
globalSlug,
operation,
req
}) => {
const collectionConfig = collectionSlug ? req.payload.collections[collectionSlug]?.config : undefined;
const globalConfig = globalSlug ? config.globals.find(g => g.slug === globalSlug) : undefined;
const enabled = isLivePreviewEnabled({
collectionConfig,
config,
globalConfig
});
if (!enabled) {
return {};
}
const livePreviewConfig = getLivePreviewConfig({
collectionConfig,
config,
globalConfig,
isLivePreviewEnabled: enabled
});
let livePreviewURL;
if (typeof livePreviewConfig?.url === 'string') {
livePreviewURL = livePreviewConfig.url;
}
if (typeof livePreviewConfig?.url === 'function' && operation !== 'create') {
try {
const result = await livePreviewConfig.url({
collectionConfig,
data,
globalConfig,
locale: {
code: req.locale,
label: ''
},
payload: req.payload,
req
});
if (typeof result === 'string') {
livePreviewURL = result;
}
} catch (err) {
req.payload.logger.error({
err,
msg: `There was an error executing the live preview URL function for ${collectionSlug || globalSlug}`
});
}
}
return {
isLivePreviewEnabled: enabled,
livePreviewConfig,
livePreviewURL
};
};
//# sourceMappingURL=handleLivePreview.js.map

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { CreateEditorArgs, LexicalEditor } from 'lexical';
/**
* Generates a headless editor that allows lexical to be used without the need for a DOM, eg in Node.js.
* Throws an error when unsupported methods are used.
* @param editorConfig - The optional lexical editor configuration.
* @returns - The configured headless editor.
*/
export declare function createHeadlessEditor(editorConfig?: CreateEditorArgs): LexicalEditor;

View File

@@ -0,0 +1 @@
{"version":3,"file":"perf_hooks.js","sources":["../../../../src/config/polyfills/perf_hooks.js"],"sourcesContent":["/* eslint-disable @sentry-internal/sdk/no-unsafe-random-apis */\n// Polyfill for Node.js perf_hooks module in edge runtime\n// This mirrors the polyfill from packages/vercel-edge/rollup.npm.config.mjs\nconst __sentry__timeOrigin = Date.now();\n\n// Ensure performance global is available\nif (typeof globalThis !== 'undefined' && globalThis.performance === undefined) {\n globalThis.performance = {\n timeOrigin: __sentry__timeOrigin,\n now: function () {\n return Date.now() - __sentry__timeOrigin;\n },\n };\n}\n\n// Export the performance object for perf_hooks compatibility\nexport const performance = globalThis.performance || {\n timeOrigin: __sentry__timeOrigin,\n now: function () {\n return Date.now() - __sentry__timeOrigin;\n },\n};\n\n// Default export for CommonJS compatibility\nexport default {\n performance,\n};\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA,MAAM,uBAAuB,IAAI,CAAC,GAAG,EAAE;;AAEvC;AACA,IAAI,OAAO,UAAA,KAAe,WAAA,IAAe,UAAU,CAAC,WAAA,KAAgB,SAAS,EAAE;AAC/E,EAAE,UAAU,CAAC,WAAA,GAAc;AAC3B,IAAI,UAAU,EAAE,oBAAoB;AACpC,IAAI,GAAG,EAAE,YAAY;AACrB,MAAM,OAAO,IAAI,CAAC,GAAG,EAAC,GAAI,oBAAoB;AAC9C,IAAI,CAAC;AACL,GAAG;AACH;;AAEA;MACa,WAAA,GAAc,UAAU,CAAC,eAAe;AACrD,EAAE,UAAU,EAAE,oBAAoB;AAClC,EAAE,GAAG,EAAE,YAAY;AACnB,IAAI,OAAO,IAAI,CAAC,GAAG,EAAC,GAAI,oBAAoB;AAC5C,EAAE,CAAC;AACH;;AAEA;AACA,mBAAe;AACf,EAAE,WAAW;AACb,CAAC;;;;"}

View File

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

View File

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

View File

@@ -0,0 +1,38 @@
import { constructFrom } from "./constructFrom.js";
import { constructNow } from "./constructNow.js";
import { isSameISOWeek } from "./isSameISOWeek.js";
/**
* The {@link isThisISOWeek} function options.
*/
/**
* @name isThisISOWeek
* @category ISO Week Helpers
* @summary Is the given date in the same ISO week as the current date?
* @pure false
*
* @description
* Is the given date in the same ISO week as the current date?
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is in this ISO week
*
* @example
* // If today is 25 September 2014, is 22 September 2014 in this ISO week?
* const result = isThisISOWeek(new Date(2014, 8, 22))
* //=> true
*/
export function isThisISOWeek(date, options) {
return isSameISOWeek(
constructFrom(options?.in || date, date),
constructNow(options?.in || date),
);
}
// Fallback for modularized imports:
export default isThisISOWeek;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/forms/Submit/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAA;AAS3D,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA8CtC,CAAA"}

View File

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

View File

@@ -0,0 +1,28 @@
/**
* @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 Ampersands = createLucideIcon("Ampersands", [
[
"path",
{
d: "M10 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5",
key: "12lh1k"
}
],
[
"path",
{
d: "M22 17c-5-3-7-7-7-9a2 2 0 0 1 4 0c0 2.5-5 2.5-5 6 0 1.7 1.3 3 3 3 2.8 0 5-2.2 5-5",
key: "173c68"
}
]
]);
export { Ampersands as default };
//# sourceMappingURL=ampersands.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/collections/operations/utilities/buildAfterOperation.ts"],"sourcesContent":["import type { CollectionSlug } from '../../../index.js'\nimport type { AfterOperationArg, OperationMap, OperationResult } from './types.js'\n\nexport const buildAfterOperation = async <\n TOperationGeneric extends CollectionSlug,\n O extends keyof OperationMap<TOperationGeneric> = keyof OperationMap<TOperationGeneric>,\n>(\n operationArgs: { operation: O } & Omit<AfterOperationArg<TOperationGeneric>, 'req'>,\n): Promise<any | OperationResult<TOperationGeneric, O>> => {\n const { args, collection, operation, overrideAccess, result } = operationArgs\n\n let newResult = result as OperationResult<TOperationGeneric, O>\n\n if (args.collection.config.hooks?.afterOperation?.length) {\n for (const hook of args.collection.config.hooks.afterOperation) {\n const hookResult = await hook({\n args,\n collection,\n operation,\n overrideAccess,\n req: args.req,\n result: newResult,\n } as AfterOperationArg<TOperationGeneric>)\n\n if (hookResult !== undefined) {\n newResult = hookResult as OperationResult<TOperationGeneric, O>\n }\n }\n }\n\n return newResult\n}\n"],"names":["buildAfterOperation","operationArgs","args","collection","operation","overrideAccess","result","newResult","config","hooks","afterOperation","length","hook","hookResult","req","undefined"],"mappings":"AAGA,OAAO,MAAMA,sBAAsB,OAIjCC;IAEA,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAEC,SAAS,EAAEC,cAAc,EAAEC,MAAM,EAAE,GAAGL;IAEhE,IAAIM,YAAYD;IAEhB,IAAIJ,KAAKC,UAAU,CAACK,MAAM,CAACC,KAAK,EAAEC,gBAAgBC,QAAQ;QACxD,KAAK,MAAMC,QAAQV,KAAKC,UAAU,CAACK,MAAM,CAACC,KAAK,CAACC,cAAc,CAAE;YAC9D,MAAMG,aAAa,MAAMD,KAAK;gBAC5BV;gBACAC;gBACAC;gBACAC;gBACAS,KAAKZ,KAAKY,GAAG;gBACbR,QAAQC;YACV;YAEA,IAAIM,eAAeE,WAAW;gBAC5BR,YAAYM;YACd;QACF;IACF;IAEA,OAAON;AACT,EAAC"}

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Doc = void 0;
class Doc {
constructor(args = []) {
this.content = [];
this.indent = 0;
if (this)
this.args = args;
}
indented(fn) {
this.indent += 1;
fn(this);
this.indent -= 1;
}
write(arg) {
if (typeof arg === "function") {
arg(this, { execution: "sync" });
arg(this, { execution: "async" });
return;
}
const content = arg;
const lines = content.split("\n").filter((x) => x);
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
for (const line of dedented) {
this.content.push(line);
}
}
compile() {
const F = Function;
const args = this?.args;
const content = this?.content ?? [``];
const lines = [...content.map((x) => ` ${x}`)];
// console.log(lines.join("\n"));
return new F(...args, lines.join("\n"));
}
}
exports.Doc = Doc;

View File

@@ -0,0 +1,426 @@
'use strict'
module.exports = Yallist
Yallist.Node = Node
Yallist.create = Yallist
function Yallist (list) {
var self = this
if (!(self instanceof Yallist)) {
self = new Yallist()
}
self.tail = null
self.head = null
self.length = 0
if (list && typeof list.forEach === 'function') {
list.forEach(function (item) {
self.push(item)
})
} else if (arguments.length > 0) {
for (var i = 0, l = arguments.length; i < l; i++) {
self.push(arguments[i])
}
}
return self
}
Yallist.prototype.removeNode = function (node) {
if (node.list !== this) {
throw new Error('removing node which does not belong to this list')
}
var next = node.next
var prev = node.prev
if (next) {
next.prev = prev
}
if (prev) {
prev.next = next
}
if (node === this.head) {
this.head = next
}
if (node === this.tail) {
this.tail = prev
}
node.list.length--
node.next = null
node.prev = null
node.list = null
return next
}
Yallist.prototype.unshiftNode = function (node) {
if (node === this.head) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var head = this.head
node.list = this
node.next = head
if (head) {
head.prev = node
}
this.head = node
if (!this.tail) {
this.tail = node
}
this.length++
}
Yallist.prototype.pushNode = function (node) {
if (node === this.tail) {
return
}
if (node.list) {
node.list.removeNode(node)
}
var tail = this.tail
node.list = this
node.prev = tail
if (tail) {
tail.next = node
}
this.tail = node
if (!this.head) {
this.head = node
}
this.length++
}
Yallist.prototype.push = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
push(this, arguments[i])
}
return this.length
}
Yallist.prototype.unshift = function () {
for (var i = 0, l = arguments.length; i < l; i++) {
unshift(this, arguments[i])
}
return this.length
}
Yallist.prototype.pop = function () {
if (!this.tail) {
return undefined
}
var res = this.tail.value
this.tail = this.tail.prev
if (this.tail) {
this.tail.next = null
} else {
this.head = null
}
this.length--
return res
}
Yallist.prototype.shift = function () {
if (!this.head) {
return undefined
}
var res = this.head.value
this.head = this.head.next
if (this.head) {
this.head.prev = null
} else {
this.tail = null
}
this.length--
return res
}
Yallist.prototype.forEach = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.head, i = 0; walker !== null; i++) {
fn.call(thisp, walker.value, i, this)
walker = walker.next
}
}
Yallist.prototype.forEachReverse = function (fn, thisp) {
thisp = thisp || this
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
fn.call(thisp, walker.value, i, this)
walker = walker.prev
}
}
Yallist.prototype.get = function (n) {
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.next
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.getReverse = function (n) {
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
// abort out of the list early if we hit a cycle
walker = walker.prev
}
if (i === n && walker !== null) {
return walker.value
}
}
Yallist.prototype.map = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.head; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.next
}
return res
}
Yallist.prototype.mapReverse = function (fn, thisp) {
thisp = thisp || this
var res = new Yallist()
for (var walker = this.tail; walker !== null;) {
res.push(fn.call(thisp, walker.value, this))
walker = walker.prev
}
return res
}
Yallist.prototype.reduce = function (fn, initial) {
var acc
var walker = this.head
if (arguments.length > 1) {
acc = initial
} else if (this.head) {
walker = this.head.next
acc = this.head.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = 0; walker !== null; i++) {
acc = fn(acc, walker.value, i)
walker = walker.next
}
return acc
}
Yallist.prototype.reduceReverse = function (fn, initial) {
var acc
var walker = this.tail
if (arguments.length > 1) {
acc = initial
} else if (this.tail) {
walker = this.tail.prev
acc = this.tail.value
} else {
throw new TypeError('Reduce of empty list with no initial value')
}
for (var i = this.length - 1; walker !== null; i--) {
acc = fn(acc, walker.value, i)
walker = walker.prev
}
return acc
}
Yallist.prototype.toArray = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.head; walker !== null; i++) {
arr[i] = walker.value
walker = walker.next
}
return arr
}
Yallist.prototype.toArrayReverse = function () {
var arr = new Array(this.length)
for (var i = 0, walker = this.tail; walker !== null; i++) {
arr[i] = walker.value
walker = walker.prev
}
return arr
}
Yallist.prototype.slice = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
walker = walker.next
}
for (; walker !== null && i < to; i++, walker = walker.next) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.sliceReverse = function (from, to) {
to = to || this.length
if (to < 0) {
to += this.length
}
from = from || 0
if (from < 0) {
from += this.length
}
var ret = new Yallist()
if (to < from || to < 0) {
return ret
}
if (from < 0) {
from = 0
}
if (to > this.length) {
to = this.length
}
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
walker = walker.prev
}
for (; walker !== null && i > from; i--, walker = walker.prev) {
ret.push(walker.value)
}
return ret
}
Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) {
if (start > this.length) {
start = this.length - 1
}
if (start < 0) {
start = this.length + start;
}
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
walker = walker.next
}
var ret = []
for (var i = 0; walker && i < deleteCount; i++) {
ret.push(walker.value)
walker = this.removeNode(walker)
}
if (walker === null) {
walker = this.tail
}
if (walker !== this.head && walker !== this.tail) {
walker = walker.prev
}
for (var i = 2; i < arguments.length; i++) {
walker = insert(this, walker, arguments[i])
}
return ret;
}
Yallist.prototype.reverse = function () {
var head = this.head
var tail = this.tail
for (var walker = head; walker !== null; walker = walker.prev) {
var p = walker.prev
walker.prev = walker.next
walker.next = p
}
this.head = tail
this.tail = head
return this
}
function insert (self, node, value) {
var inserted = node === self.head ?
new Node(value, null, node, self) :
new Node(value, node, node.next, self)
if (inserted.next === null) {
self.tail = inserted
}
if (inserted.prev === null) {
self.head = inserted
}
self.length++
return inserted
}
function push (self, item) {
self.tail = new Node(item, self.tail, null, self)
if (!self.head) {
self.head = self.tail
}
self.length++
}
function unshift (self, item) {
self.head = new Node(item, null, self.head, self)
if (!self.tail) {
self.tail = self.head
}
self.length++
}
function Node (value, prev, next, list) {
if (!(this instanceof Node)) {
return new Node(value, prev, next, list)
}
this.list = list
this.value = value
if (prev) {
prev.next = this
this.prev = prev
} else {
this.prev = null
}
if (next) {
next.prev = this
this.next = next
} else {
this.next = null
}
}
try {
// add if support for Symbol.iterator is present
require('./iterator.js')(Yallist)
} catch (er) {}

View File

@@ -0,0 +1,12 @@
{
"compileOnSave": false,
"compilerOptions": {
"module": "commonjs",
"noEmit": true,
"noImplicitAny": true
},
"files": [
"../objectid.d.ts",
"./objectid-tests.ts"
]
}

View File

@@ -0,0 +1,506 @@
/**
* The `node:os` module provides operating system-related utility methods and
* properties. It can be accessed using:
*
* ```js
* import os from 'node:os';
* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/os.js)
*/
declare module "os" {
import { NonSharedBuffer } from "buffer";
interface CpuInfo {
model: string;
speed: number;
times: {
/** The number of milliseconds the CPU has spent in user mode. */
user: number;
/** The number of milliseconds the CPU has spent in nice mode. */
nice: number;
/** The number of milliseconds the CPU has spent in sys mode. */
sys: number;
/** The number of milliseconds the CPU has spent in idle mode. */
idle: number;
/** The number of milliseconds the CPU has spent in irq mode. */
irq: number;
};
}
interface NetworkInterfaceBase {
address: string;
netmask: string;
mac: string;
internal: boolean;
cidr: string | null;
scopeid?: number;
}
interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
family: "IPv4";
}
interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
family: "IPv6";
scopeid: number;
}
interface UserInfo<T> {
username: T;
uid: number;
gid: number;
shell: T | null;
homedir: T;
}
type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
/**
* Returns the host name of the operating system as a string.
* @since v0.3.3
*/
function hostname(): string;
/**
* Returns an array containing the 1, 5, and 15 minute load averages.
*
* The load average is a measure of system activity calculated by the operating
* system and expressed as a fractional number.
*
* The load average is a Unix-specific concept. On Windows, the return value is
* always `[0, 0, 0]`.
* @since v0.3.3
*/
function loadavg(): number[];
/**
* Returns the system uptime in number of seconds.
* @since v0.3.3
*/
function uptime(): number;
/**
* Returns the amount of free system memory in bytes as an integer.
* @since v0.3.3
*/
function freemem(): number;
/**
* Returns the total amount of system memory in bytes as an integer.
* @since v0.3.3
*/
function totalmem(): number;
/**
* Returns an array of objects containing information about each logical CPU core.
* The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
*
* The properties included on each object include:
*
* ```js
* [
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 252020,
* nice: 0,
* sys: 30340,
* idle: 1070356870,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 306960,
* nice: 0,
* sys: 26980,
* idle: 1071569080,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 248450,
* nice: 0,
* sys: 21750,
* idle: 1070919370,
* irq: 0,
* },
* },
* {
* model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
* speed: 2926,
* times: {
* user: 256880,
* nice: 0,
* sys: 19430,
* idle: 1070905480,
* irq: 20,
* },
* },
* ]
* ```
*
* `nice` values are POSIX-only. On Windows, the `nice` values of all processors
* are always 0.
*
* `os.cpus().length` should not be used to calculate the amount of parallelism
* available to an application. Use {@link availableParallelism} for this purpose.
* @since v0.3.3
*/
function cpus(): CpuInfo[];
/**
* Returns an estimate of the default amount of parallelism a program should use.
* Always returns a value greater than zero.
*
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
* @since v19.4.0, v18.14.0
*/
function availableParallelism(): number;
/**
* Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
* returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
*
* See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
* about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
* @since v0.3.3
*/
function type(): string;
/**
* Returns the operating system as a string.
*
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
* [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v0.3.3
*/
function release(): string;
/**
* Returns an object containing network interfaces that have been assigned a
* network address.
*
* Each key on the returned object identifies a network interface. The associated
* value is an array of objects that each describe an assigned network address.
*
* The properties available on the assigned network address object include:
*
* ```js
* {
* lo: [
* {
* address: '127.0.0.1',
* netmask: '255.0.0.0',
* family: 'IPv4',
* mac: '00:00:00:00:00:00',
* internal: true,
* cidr: '127.0.0.1/8'
* },
* {
* address: '::1',
* netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
* family: 'IPv6',
* mac: '00:00:00:00:00:00',
* scopeid: 0,
* internal: true,
* cidr: '::1/128'
* }
* ],
* eth0: [
* {
* address: '192.168.1.108',
* netmask: '255.255.255.0',
* family: 'IPv4',
* mac: '01:02:03:0a:0b:0c',
* internal: false,
* cidr: '192.168.1.108/24'
* },
* {
* address: 'fe80::a00:27ff:fe4e:66a1',
* netmask: 'ffff:ffff:ffff:ffff::',
* family: 'IPv6',
* mac: '01:02:03:0a:0b:0c',
* scopeid: 1,
* internal: false,
* cidr: 'fe80::a00:27ff:fe4e:66a1/64'
* }
* ]
* }
* ```
* @since v0.6.0
*/
function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
/**
* Returns the string path of the current user's home directory.
*
* On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
* uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
*
* On Windows, it uses the `USERPROFILE` environment variable if defined.
* Otherwise it uses the path to the profile directory of the current user.
* @since v2.3.0
*/
function homedir(): string;
interface UserInfoOptions {
encoding?: BufferEncoding | "buffer" | undefined;
}
interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
encoding: "buffer";
}
interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
encoding?: BufferEncoding | undefined;
}
/**
* Returns information about the currently effective user. On POSIX platforms,
* this is typically a subset of the password file. The returned object includes
* the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
*
* The value of `homedir` returned by `os.userInfo()` is provided by the operating
* system. This differs from the result of `os.homedir()`, which queries
* environment variables for the home directory before falling back to the
* operating system response.
*
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
* @since v6.0.0
*/
function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
function userInfo(options: UserInfoOptions): UserInfo<string | Buffer>;
type SignalConstants = {
[key in NodeJS.Signals]: number;
};
namespace constants {
const UV_UDP_REUSEADDR: number;
namespace signals {}
const signals: SignalConstants;
namespace errno {
const E2BIG: number;
const EACCES: number;
const EADDRINUSE: number;
const EADDRNOTAVAIL: number;
const EAFNOSUPPORT: number;
const EAGAIN: number;
const EALREADY: number;
const EBADF: number;
const EBADMSG: number;
const EBUSY: number;
const ECANCELED: number;
const ECHILD: number;
const ECONNABORTED: number;
const ECONNREFUSED: number;
const ECONNRESET: number;
const EDEADLK: number;
const EDESTADDRREQ: number;
const EDOM: number;
const EDQUOT: number;
const EEXIST: number;
const EFAULT: number;
const EFBIG: number;
const EHOSTUNREACH: number;
const EIDRM: number;
const EILSEQ: number;
const EINPROGRESS: number;
const EINTR: number;
const EINVAL: number;
const EIO: number;
const EISCONN: number;
const EISDIR: number;
const ELOOP: number;
const EMFILE: number;
const EMLINK: number;
const EMSGSIZE: number;
const EMULTIHOP: number;
const ENAMETOOLONG: number;
const ENETDOWN: number;
const ENETRESET: number;
const ENETUNREACH: number;
const ENFILE: number;
const ENOBUFS: number;
const ENODATA: number;
const ENODEV: number;
const ENOENT: number;
const ENOEXEC: number;
const ENOLCK: number;
const ENOLINK: number;
const ENOMEM: number;
const ENOMSG: number;
const ENOPROTOOPT: number;
const ENOSPC: number;
const ENOSR: number;
const ENOSTR: number;
const ENOSYS: number;
const ENOTCONN: number;
const ENOTDIR: number;
const ENOTEMPTY: number;
const ENOTSOCK: number;
const ENOTSUP: number;
const ENOTTY: number;
const ENXIO: number;
const EOPNOTSUPP: number;
const EOVERFLOW: number;
const EPERM: number;
const EPIPE: number;
const EPROTO: number;
const EPROTONOSUPPORT: number;
const EPROTOTYPE: number;
const ERANGE: number;
const EROFS: number;
const ESPIPE: number;
const ESRCH: number;
const ESTALE: number;
const ETIME: number;
const ETIMEDOUT: number;
const ETXTBSY: number;
const EWOULDBLOCK: number;
const EXDEV: number;
const WSAEINTR: number;
const WSAEBADF: number;
const WSAEACCES: number;
const WSAEFAULT: number;
const WSAEINVAL: number;
const WSAEMFILE: number;
const WSAEWOULDBLOCK: number;
const WSAEINPROGRESS: number;
const WSAEALREADY: number;
const WSAENOTSOCK: number;
const WSAEDESTADDRREQ: number;
const WSAEMSGSIZE: number;
const WSAEPROTOTYPE: number;
const WSAENOPROTOOPT: number;
const WSAEPROTONOSUPPORT: number;
const WSAESOCKTNOSUPPORT: number;
const WSAEOPNOTSUPP: number;
const WSAEPFNOSUPPORT: number;
const WSAEAFNOSUPPORT: number;
const WSAEADDRINUSE: number;
const WSAEADDRNOTAVAIL: number;
const WSAENETDOWN: number;
const WSAENETUNREACH: number;
const WSAENETRESET: number;
const WSAECONNABORTED: number;
const WSAECONNRESET: number;
const WSAENOBUFS: number;
const WSAEISCONN: number;
const WSAENOTCONN: number;
const WSAESHUTDOWN: number;
const WSAETOOMANYREFS: number;
const WSAETIMEDOUT: number;
const WSAECONNREFUSED: number;
const WSAELOOP: number;
const WSAENAMETOOLONG: number;
const WSAEHOSTDOWN: number;
const WSAEHOSTUNREACH: number;
const WSAENOTEMPTY: number;
const WSAEPROCLIM: number;
const WSAEUSERS: number;
const WSAEDQUOT: number;
const WSAESTALE: number;
const WSAEREMOTE: number;
const WSASYSNOTREADY: number;
const WSAVERNOTSUPPORTED: number;
const WSANOTINITIALISED: number;
const WSAEDISCON: number;
const WSAENOMORE: number;
const WSAECANCELLED: number;
const WSAEINVALIDPROCTABLE: number;
const WSAEINVALIDPROVIDER: number;
const WSAEPROVIDERFAILEDINIT: number;
const WSASYSCALLFAILURE: number;
const WSASERVICE_NOT_FOUND: number;
const WSATYPE_NOT_FOUND: number;
const WSA_E_NO_MORE: number;
const WSA_E_CANCELLED: number;
const WSAEREFUSED: number;
}
namespace dlopen {
const RTLD_LAZY: number;
const RTLD_NOW: number;
const RTLD_GLOBAL: number;
const RTLD_LOCAL: number;
const RTLD_DEEPBIND: number;
}
namespace priority {
const PRIORITY_LOW: number;
const PRIORITY_BELOW_NORMAL: number;
const PRIORITY_NORMAL: number;
const PRIORITY_ABOVE_NORMAL: number;
const PRIORITY_HIGH: number;
const PRIORITY_HIGHEST: number;
}
}
const devNull: string;
/**
* The operating system-specific end-of-line marker.
* * `\n` on POSIX
* * `\r\n` on Windows
*/
const EOL: string;
/**
* Returns the operating system CPU architecture for which the Node.js binary was
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
* and `'x64'`.
*
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch).
* @since v0.5.0
*/
function arch(): string;
/**
* Returns a string identifying the kernel version.
*
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v13.11.0, v12.17.0
*/
function version(): string;
/**
* Returns a string identifying the operating system platform for which
* the Node.js binary was compiled. The value is set at compile time.
* Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
*
* The return value is equivalent to `process.platform`.
*
* The value `'android'` may also be returned if Node.js is built on the Android
* operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
* @since v0.5.0
*/
function platform(): NodeJS.Platform;
/**
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
*
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0, v16.18.0
*/
function machine(): string;
/**
* Returns the operating system's default directory for temporary files as a
* string.
* @since v0.9.9
*/
function tmpdir(): string;
/**
* Returns a string identifying the endianness of the CPU for which the Node.js
* binary was compiled.
*
* Possible values are `'BE'` for big endian and `'LE'` for little endian.
* @since v0.9.4
*/
function endianness(): "BE" | "LE";
/**
* Returns the scheduling priority for the process specified by `pid`. If `pid` is
* not provided or is `0`, the priority of the current process is returned.
* @since v10.10.0
* @param [pid=0] The process ID to retrieve scheduling priority for.
*/
function getPriority(pid?: number): number;
/**
* Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.
*
* The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
* priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
* mapping may cause the return value to be slightly different on Windows. To avoid
* confusion, set `priority` to one of the priority constants.
*
* On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
* privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
* @since v10.10.0
* @param [pid=0] The process ID to set scheduling priority for.
* @param priority The scheduling priority to assign to the process.
*/
function setPriority(priority: number): void;
function setPriority(pid: number, priority: number): void;
}
declare module "node:os" {
export * from "os";
}

View File

@@ -0,0 +1,19 @@
import { useContext } from 'react';
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
import { useReducedMotion } from './use-reduced-motion.mjs';
function useReducedMotionConfig() {
const reducedMotionPreference = useReducedMotion();
const { reducedMotion } = useContext(MotionConfigContext);
if (reducedMotion === "never") {
return false;
}
else if (reducedMotion === "always") {
return true;
}
else {
return reducedMotionPreference;
}
}
export { useReducedMotionConfig };

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["Button","Link","Translation","formatAdminURL","React","Fragment","FormHeader","ForgotPasswordForm","forgotPasswordBaseClass","ForgotPasswordView","initPageResult","req","i18n","payload","config","user","admin","routes","account","accountRoute","login","loginRoute","adminRoute","_jsxs","_jsx","description","elements","0","children","href","path","prefetch","i18nKey","t","heading","buttonStyle","el","size","to"],"sources":["../../../src/views/ForgotPassword/index.tsx"],"sourcesContent":["import type { AdminViewServerProps } from 'payload'\n\nimport { Button, Link } from '@payloadcms/ui'\nimport { Translation } from '@payloadcms/ui/shared'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { Fragment } from 'react'\n\nimport { FormHeader } from '../../elements/FormHeader/index.js'\nimport { ForgotPasswordForm } from './ForgotPasswordForm/index.js'\n\nexport const forgotPasswordBaseClass = 'forgot-password'\n\nexport function ForgotPasswordView({ initPageResult }: AdminViewServerProps) {\n const {\n req: {\n i18n,\n payload: { config },\n user,\n },\n } = initPageResult\n\n const {\n admin: {\n routes: { account: accountRoute, login: loginRoute },\n },\n routes: { admin: adminRoute },\n } = config\n\n if (user) {\n return (\n <Fragment>\n <FormHeader\n description={\n <Translation\n elements={{\n '0': ({ children }) => (\n <Link\n href={formatAdminURL({\n adminRoute,\n path: accountRoute,\n })}\n prefetch={false}\n >\n {children}\n </Link>\n ),\n }}\n i18nKey=\"authentication:loggedInChangePassword\"\n t={i18n.t}\n />\n }\n heading={i18n.t('authentication:alreadyLoggedIn')}\n />\n <Button buttonStyle=\"secondary\" el=\"link\" size=\"large\" to={adminRoute}>\n {i18n.t('general:backToDashboard')}\n </Button>\n </Fragment>\n )\n }\n\n return (\n <Fragment>\n <ForgotPasswordForm />\n <Link\n href={formatAdminURL({\n adminRoute,\n path: loginRoute,\n })}\n prefetch={false}\n >\n {i18n.t('authentication:backToLogin')}\n </Link>\n </Fragment>\n )\n}\n"],"mappings":";AAEA,SAASA,MAAM,EAAEC,IAAI,QAAQ;AAC7B,SAASC,WAAW,QAAQ;AAC5B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,QAAQ,QAAQ;AAEhC,SAASC,UAAU,QAAQ;AAC3B,SAASC,kBAAkB,QAAQ;AAEnC,OAAO,MAAMC,uBAAA,GAA0B;AAEvC,OAAO,SAASC,mBAAmB;EAAEC;AAAc,CAAwB;EACzE,MAAM;IACJC,GAAA,EAAK;MACHC,IAAI;MACJC,OAAA,EAAS;QAAEC;MAAM,CAAE;MACnBC;IAAI;EACL,CACF,GAAGL,cAAA;EAEJ,MAAM;IACJM,KAAA,EAAO;MACLC,MAAA,EAAQ;QAAEC,OAAA,EAASC,YAAY;QAAEC,KAAA,EAAOC;MAAU;IAAE,CACrD;IACDJ,MAAA,EAAQ;MAAED,KAAA,EAAOM;IAAU;EAAE,CAC9B,GAAGR,MAAA;EAEJ,IAAIC,IAAA,EAAM;IACR,oBACEQ,KAAA,CAAClB,QAAA;8BACCmB,IAAA,CAAClB,UAAA;QACCmB,WAAA,eACED,IAAA,CAACtB,WAAA;UACCwB,QAAA,EAAU;YACR,KAAKC,CAAC;cAAEC;YAAQ,CAAE,kBAChBJ,IAAA,CAACvB,IAAA;cACC4B,IAAA,EAAM1B,cAAA,CAAe;gBACnBmB,UAAA;gBACAQ,IAAA,EAAMX;cACR;cACAY,QAAA,EAAU;wBAETH;;UAGP;UACAI,OAAA,EAAQ;UACRC,CAAA,EAAGrB,IAAA,CAAKqB;;QAGZC,OAAA,EAAStB,IAAA,CAAKqB,CAAC,CAAC;uBAElBT,IAAA,CAACxB,MAAA;QAAOmC,WAAA,EAAY;QAAYC,EAAA,EAAG;QAAOC,IAAA,EAAK;QAAQC,EAAA,EAAIhB,UAAA;kBACxDV,IAAA,CAAKqB,CAAC,CAAC;;;EAIhB;EAEA,oBACEV,KAAA,CAAClB,QAAA;4BACCmB,IAAA,CAACjB,kBAAA,O,aACDiB,IAAA,CAACvB,IAAA;MACC4B,IAAA,EAAM1B,cAAA,CAAe;QACnBmB,UAAA;QACAQ,IAAA,EAAMT;MACR;MACAU,QAAA,EAAU;gBAETnB,IAAA,CAAKqB,CAAC,CAAC;;;AAIhB","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"film.js","sources":["../../../src/icons/film.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Film\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDN2MTgiIC8+CiAgPHBhdGggZD0iTTMgNy41aDQiIC8+CiAgPHBhdGggZD0iTTMgMTJoMTgiIC8+CiAgPHBhdGggZD0iTTMgMTYuNWg0IiAvPgogIDxwYXRoIGQ9Ik0xNyAzdjE4IiAvPgogIDxwYXRoIGQ9Ik0xNyA3LjVoNCIgLz4KICA8cGF0aCBkPSJNMTcgMTYuNWg0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/film\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 Film = createLucideIcon('Film', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M7 3v18', key: 'bbkbws' }],\n ['path', { d: 'M3 7.5h4', key: 'zfgn84' }],\n ['path', { d: 'M3 12h18', key: '1i2n21' }],\n ['path', { d: 'M3 16.5h4', key: '1230mu' }],\n ['path', { d: 'M17 3v18', key: 'in4fa5' }],\n ['path', { d: 'M17 7.5h4', key: 'myr1c1' }],\n ['path', { d: 'M17 16.5h4', key: 'go4c1d' }],\n]);\n\nexport default Film;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,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,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,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,149 @@
import { Client } from '../client';
import { DebugImage } from './debugMeta';
import { Integration } from './integration';
import { MeasurementUnit } from './measurement';
export interface ContinuousProfiler<T extends Client> {
initialize(client: T): void;
start(): void;
stop(): void;
}
export interface ProfilingIntegration<T extends Client = Client> extends Integration {
_profiler: ContinuousProfiler<T>;
}
export interface Profiler {
/**
* Starts the profiler.
*/
startProfiler(): void;
/**
* Stops the profiler.
*/
stopProfiler(): void;
}
export type ThreadId = string;
export type FrameId = number;
export type StackId = number;
export interface ThreadCpuSample {
stack_id: StackId;
thread_id: ThreadId;
queue_address?: string;
elapsed_since_start_ns: string;
}
export interface ContinuousThreadCpuSample {
stack_id: StackId;
thread_id: ThreadId;
queue_address?: string;
timestamp: number;
}
export type ThreadCpuStack = FrameId[];
export type ThreadCpuFrame = {
function?: string;
file?: string;
lineno?: number;
colno?: number;
abs_path?: string;
platform?: string;
instruction_addr?: string;
module?: string;
in_app?: boolean;
};
export interface ThreadCpuProfile {
samples: ThreadCpuSample[];
stacks: ThreadCpuStack[];
frames: ThreadCpuFrame[];
thread_metadata: Record<ThreadId, {
name?: string;
priority?: number;
}>;
queue_metadata?: Record<string, {
label: string;
}>;
}
export interface ContinuousThreadCpuProfile {
samples: ContinuousThreadCpuSample[];
stacks: ThreadCpuStack[];
frames: ThreadCpuFrame[];
thread_metadata: Record<ThreadId, {
name?: string;
priority?: number;
}>;
queue_metadata?: Record<string, {
label: string;
}>;
}
interface BaseProfile<T> {
version: string;
release: string;
environment: string;
platform: string;
profile: T;
debug_meta?: {
images: DebugImage[];
};
measurements?: Record<string, {
unit: MeasurementUnit;
values: {
elapsed_since_start_ns: number;
value: number;
}[];
}>;
}
export interface Profile extends BaseProfile<ThreadCpuProfile> {
event_id: string;
version: string;
os: {
name: string;
version: string;
build_number?: string;
};
runtime: {
name: string;
version: string;
};
device: {
architecture: string;
is_emulator: boolean;
locale: string;
manufacturer: string;
model: string;
};
timestamp: string;
release: string;
environment: string;
platform: string;
profile: ThreadCpuProfile;
debug_meta?: {
images: DebugImage[];
};
transaction?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
};
transactions?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
relative_start_ns: string;
relative_end_ns: string;
}[];
measurements?: Record<string, {
unit: MeasurementUnit;
values: {
elapsed_since_start_ns: number;
value: number;
}[];
}>;
}
export interface ProfileChunk extends BaseProfile<ContinuousThreadCpuProfile> {
chunk_id: string;
profiler_id: string;
client_sdk: {
name: string;
version: string;
};
}
export {};
//# sourceMappingURL=profiling.d.ts.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const AArrowDown = createLucideIcon("AArrowDown", [
["path", { d: "M3.5 13h6", key: "p1my2r" }],
["path", { d: "m2 16 4.5-9 4.5 9", key: "ndf0b3" }],
["path", { d: "M18 7v9", key: "pknjwm" }],
["path", { d: "m14 12 4 4 4-4", key: "buelq4" }]
]);
export { AArrowDown as default };
//# sourceMappingURL=a-arrow-down.js.map

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cone = createLucideIcon("Cone", [
["path", { d: "m20.9 18.55-8-15.98a1 1 0 0 0-1.8 0l-8 15.98", key: "53pte7" }],
["ellipse", { cx: "12", cy: "19", rx: "9", ry: "3", key: "1ji25f" }]
]);
export { Cone as default };
//# sourceMappingURL=cone.js.map

View File

@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgMacaddrBuilderInitial<TName extends string> = PgMacaddrBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgMacaddr';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgMacaddrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgMacaddr'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgMacaddr<T extends ColumnBaseConfig<'string', 'PgMacaddr'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function macaddr(): PgMacaddrBuilderInitial<''>;
export declare function macaddr<TName extends string>(name: TName): PgMacaddrBuilderInitial<TName>;

View File

@@ -0,0 +1,27 @@
{
"name": "scheduler",
"version": "0.25.0",
"description": "Cooperative scheduler for the browser environment.",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/scheduler"
},
"license": "MIT",
"keywords": [
"react"
],
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://react.dev/",
"files": [
"LICENSE",
"README.md",
"index.js",
"index.native.js",
"unstable_mock.js",
"unstable_post_task.js",
"cjs/"
]
}

View File

@@ -0,0 +1,6 @@
import type { SanitizedCollectionConfig } from 'payload';
export type IndexProps = {
collection: SanitizedCollectionConfig;
isEditing?: boolean;
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,16 @@
import type { StackLineParser, StackLineParserFn } from '../types-hoist/stacktrace';
export type GetModuleFn = (filename: string | undefined) => string | undefined;
/**
* Does this filename look like it's part of the app code?
*/
export declare function filenameIsInApp(filename: string, isNative?: boolean): boolean;
/** Node Stack line parser */
export declare function node(getModule?: GetModuleFn): StackLineParserFn;
/**
* Node.js stack line parser
*
* This is in @sentry/core so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.
* This allows it to be used without referencing or importing any node specific code which causes bundlers to complain
*/
export declare function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser;
//# sourceMappingURL=node-stack-trace.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.04606,"78":0.01417,"91":0.00709,"102":0.14172,"115":0.19487,"121":0.00354,"127":0.00354,"128":0.17715,"134":0.01772,"136":0.02126,"137":0.00354,"140":0.17006,"143":0.01417,"144":0.00709,"145":0.4287,"146":0.49956,_:"2 3 4 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 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 122 123 124 125 126 129 130 131 132 133 135 138 139 141 142 147 148 149 3.5 3.6"},D:{"47":0.02834,"61":0.00354,"69":0.10275,"70":0.01417,"73":0.06023,"79":0.06023,"81":0.00709,"83":0.36847,"87":0.00709,"94":0.00354,"98":0.01417,"102":0.00354,"103":0.06023,"104":0.04252,"105":0.0496,"106":0.06023,"107":0.02126,"108":0.04252,"109":0.07086,"110":0.03543,"111":0.13818,"112":0.02834,"113":0.01063,"114":0.00709,"116":0.07795,"117":0.07795,"119":0.03897,"120":0.08503,"123":0.00354,"124":0.05669,"125":0.05315,"126":0.71923,"127":0.01772,"128":0.11338,"129":0.01417,"130":0.00709,"131":0.20904,"132":0.12755,"133":0.08858,"134":0.01772,"135":0.03897,"136":0.0744,"138":0.03897,"139":0.03897,"140":0.08503,"141":0.34367,"142":3.4934,"143":7.84775,"145":0.06377,_:"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 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63 64 65 66 67 68 71 72 74 75 76 77 78 80 84 85 86 88 89 90 91 92 93 95 96 97 99 100 101 115 118 121 122 137 144 146"},F:{"46":0.01417,"92":0.01063,"93":0.06023,"94":0.00709,"106":0.00354,"122":0.00354,"123":0.03189,"124":0.16652,"125":0.55271,_:"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 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 85 86 87 88 89 90 91 95 96 97 98 99 100 101 102 103 104 105 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"89":0.00354,"109":0.00354,"130":0.00354,"132":0.02126,"135":0.00354,"136":0.00709,"138":0.01063,"139":0.01772,"140":0.01063,"141":0.14881,"142":0.85386,"143":3.26665,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 90 91 92 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 120 121 122 123 124 125 126 127 128 129 131 133 134 137"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 16.0 16.1 16.2 16.4 17.3 18.2 18.3","14.1":0.00354,"15.4":0.0248,"15.5":0.00354,"15.6":0.00354,"16.3":0.00354,"16.5":0.00354,"16.6":0.59168,"17.0":0.00354,"17.1":0.00709,"17.2":0.00354,"17.4":0.00354,"17.5":0.00354,"17.6":0.22321,"18.0":0.01772,"18.1":0.00709,"18.4":0.00709,"18.5-18.6":0.13818,"26.0":0.00354,"26.1":0.16652,"26.2":0.02126,"26.3":0.00354},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00124,"5.0-5.1":0,"6.0-6.1":0.00248,"7.0-7.1":0.00186,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00496,"10.0-10.2":0.00062,"10.3":0.00869,"11.0-11.2":0.10675,"11.3-11.4":0.0031,"12.0-12.1":0.00248,"12.2-12.5":0.02793,"13.0-13.1":0.00062,"13.2":0.00434,"13.3":0.00124,"13.4-13.7":0.00434,"14.0-14.4":0.00869,"14.5-14.8":0.00931,"15.0-15.1":0.00993,"15.2-15.3":0.00745,"15.4":0.00807,"15.5":0.00869,"15.6-15.8":0.13467,"16.0":0.01552,"16.1":0.02979,"16.2":0.01552,"16.3":0.02793,"16.4":0.00683,"16.5":0.01179,"16.6-16.7":0.17501,"17.0":0.00993,"17.1":0.01614,"17.2":0.01179,"17.3":0.018,"17.4":0.03041,"17.5":0.05958,"17.6-17.7":0.13778,"18.0":0.03103,"18.1":0.06454,"18.2":0.03413,"18.3":0.11109,"18.4":0.0571,"18.5-18.7":4.09977,"26.0":0.08006,"26.1":0.66592,"26.2":0.12661,"26.3":0.00559},P:{"21":0.01018,"22":0.04073,"24":0.10182,"25":0.36654,"26":0.02036,"27":0.13236,"28":0.17309,"29":1.62908,_:"4 20 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0","7.2-7.4":0.03055,"18.0":0.01018,"19.0":0.01018},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.63934,_:"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"},O:{"0":0.00646},H:{"0":0},L:{"0":64.1181},R:{_:"0"},M:{"0":0.10979}};

View File

@@ -0,0 +1,21 @@
/*
* 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.
*/
/* eslint-disable no-restricted-syntax --
* These re-exports are only of constants, only one-level deep at this point,
* and should not cause problems for tree-shakers.
*/
export * from './SemanticResourceAttributes';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,31 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.cjs";
export type MySqlFloatBuilderInitial<TName extends string> = MySqlFloatBuilder<{
name: TName;
dataType: 'number';
columnType: 'MySqlFloat';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class MySqlFloatBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlFloatConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: MySqlFloatConfig | undefined);
}
export declare class MySqlFloat<T extends ColumnBaseConfig<'number', 'MySqlFloat'>> extends MySqlColumnWithAutoIncrement<T, MySqlFloatConfig> {
static readonly [entityKind]: string;
readonly precision: number | undefined;
readonly scale: number | undefined;
readonly unsigned: boolean | undefined;
getSQLType(): string;
}
export interface MySqlFloatConfig {
precision?: number;
scale?: number;
unsigned?: boolean;
}
export declare function float(): MySqlFloatBuilderInitial<''>;
export declare function float(config?: MySqlFloatConfig): MySqlFloatBuilderInitial<''>;
export declare function float<TName extends string>(name: TName, config?: MySqlFloatConfig): MySqlFloatBuilderInitial<TName>;

View File

@@ -0,0 +1,29 @@
import { Log, LogSeverityLevel, ParameterizedString, Scope } from '@sentry/core';
/**
* Additional metadata to capture the log with.
*/
interface CaptureLogMetadata {
scope?: Scope;
}
type CaptureLogArgWithTemplate = [
/*messageTemplate*/ string,
/*messageParams*/ Array<unknown>,
/*attributes*/ Log['attributes'],
/*metadata*/ CaptureLogMetadata
];
type CaptureLogArgWithoutTemplate = [
/*message*/ ParameterizedString,
/*attributes*/ Log['attributes'],
/*metadata*/ CaptureLogMetadata
];
export type CaptureLogArgs = CaptureLogArgWithTemplate | CaptureLogArgWithoutTemplate;
/**
* Capture a log with the given level.
*
* @param level - The level of the log.
* @param message - The message to log.
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
*/
export declare function captureLog(level: LogSeverityLevel, ...args: CaptureLogArgs): void;
export {};
//# sourceMappingURL=capture.d.ts.map

View File

@@ -0,0 +1 @@
!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(a){for(var o=[],i=0;i<a.length;i++){var r=a[i],s=!1;if("string"!=typeof r&&("tag"===r.type&&r.content[0]&&"tag"===r.content[0].type?"</"===r.content[0].content[0].content?o.length>0&&o[o.length-1].tagName===t(r.content[0].content[1])&&o.pop():"/>"===r.content[r.content.length-1].content||o.push({tagName:t(r.content[0].content[1]),openedBraces:0}):!(o.length>0&&"punctuation"===r.type&&"{"===r.content)||a[i+1]&&"punctuation"===a[i+1].type&&"{"===a[i+1].content||a[i-1]&&"plain-text"===a[i-1].type&&"{"===a[i-1].content?o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===r.type&&"}"===r.content?o[o.length-1].openedBraces--:"comment"!==r.type&&(s=!0):o[o.length-1].openedBraces++),(s||"string"==typeof r)&&o.length>0&&0===o[o.length-1].openedBraces){var l=t(r);i<a.length-1&&("string"==typeof a[i+1]||"plain-text"===a[i+1].type)&&(l+=t(a[i+1]),a.splice(i+1,1)),i>0&&("string"==typeof a[i-1]||"plain-text"===a[i-1].type)&&(l=t(a[i-1])+l,a.splice(i-1,1),i--),/^\s+$/.test(l)?a[i]=l:a[i]=new e.Token("plain-text",l,null,l)}r.content&&"string"!=typeof r.content&&n(r.content)}};e.hooks.add("after-tokenize",(function(e){"xquery"===e.language&&n(e.tokens)}))}(Prism);

View File

@@ -0,0 +1,99 @@
import { decodeXML, decodeHTML, DecodingMode } from "./decode.js";
import { encodeHTML, encodeNonAsciiHTML } from "./encode.js";
import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js";
/** The level of entities to support. */
export var EntityLevel;
(function (EntityLevel) {
/** Support only XML entities. */
EntityLevel[EntityLevel["XML"] = 0] = "XML";
/** Support HTML entities, which are a superset of XML entities. */
EntityLevel[EntityLevel["HTML"] = 1] = "HTML";
})(EntityLevel || (EntityLevel = {}));
export var EncodingMode;
(function (EncodingMode) {
/**
* The output is UTF-8 encoded. Only characters that need escaping within
* XML will be escaped.
*/
EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8";
/**
* The output consists only of ASCII characters. Characters that need
* escaping within HTML, and characters that aren't ASCII characters will
* be escaped.
*/
EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII";
/**
* Encode all characters that have an equivalent entity, as well as all
* characters that are not ASCII characters.
*/
EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive";
/**
* Encode all characters that have to be escaped in HTML attributes,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute";
/**
* Encode all characters that have to be escaped in HTML text,
* following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}.
*/
EncodingMode[EncodingMode["Text"] = 4] = "Text";
})(EncodingMode || (EncodingMode = {}));
/**
* Decodes a string with entities.
*
* @param data String to decode.
* @param options Decoding options.
*/
export function decode(data, options = EntityLevel.XML) {
const level = typeof options === "number" ? options : options.level;
if (level === EntityLevel.HTML) {
const mode = typeof options === "object" ? options.mode : undefined;
return decodeHTML(data, mode);
}
return decodeXML(data);
}
/**
* Decodes a string with entities. Does not allow missing trailing semicolons for entities.
*
* @param data String to decode.
* @param options Decoding options.
* @deprecated Use `decode` with the `mode` set to `Strict`.
*/
export function decodeStrict(data, options = EntityLevel.XML) {
var _a;
const opts = typeof options === "number" ? { level: options } : options;
(_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict);
return decode(data, opts);
}
/**
* Encodes a string with entities.
*
* @param data String to encode.
* @param options Encoding options.
*/
export function encode(data, options = EntityLevel.XML) {
const opts = typeof options === "number" ? { level: options } : options;
// Mode `UTF8` just escapes XML entities
if (opts.mode === EncodingMode.UTF8)
return escapeUTF8(data);
if (opts.mode === EncodingMode.Attribute)
return escapeAttribute(data);
if (opts.mode === EncodingMode.Text)
return escapeText(data);
if (opts.level === EntityLevel.HTML) {
if (opts.mode === EncodingMode.ASCII) {
return encodeNonAsciiHTML(data);
}
return encodeHTML(data);
}
// ASCII and Extensive are equivalent
return encodeXML(data);
}
export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js";
export { encodeHTML, encodeNonAsciiHTML,
// Legacy aliases (deprecated)
encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js";
export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute,
// Legacy aliases (deprecated)
decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js";
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,18 @@
import { Attributes } from '@opentelemetry/api';
export interface LoggerOptions {
/**
* The schemaUrl of the tracer or instrumentation library
* @default ''
*/
schemaUrl?: string;
/**
* The instrumentation scope attributes to associate with emitted telemetry
*/
scopeAttributes?: Attributes;
/**
* Specifies whether the Trace Context should automatically be passed on to the LogRecords emitted by the Logger.
* @default true
*/
includeTraceContext?: boolean;
}
//# sourceMappingURL=LoggerOptions.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"requireDrizzleKit.d.ts","sourceRoot":"","sources":["../../src/postgres/requireDrizzleKit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,eAAO,MAAM,iBAAiB,EAAE,iBAc/B,CAAA"}

View File

@@ -0,0 +1,29 @@
{
"root": true,
"extends": "@ljharb/eslint-config/node/0.4",
"rules": {
"array-element-newline": 0,
"complexity": 0,
"func-style": [2, "declaration"],
"max-lines-per-function": 0,
"max-nested-callbacks": 1,
"max-statements-per-line": 1,
"max-statements": 0,
"multiline-comment-style": 0,
"no-continue": 1,
"no-param-reassign": 1,
"no-restricted-syntax": 1,
"object-curly-newline": 0,
},
"overrides": [
{
"files": "test/**",
"rules": {
"camelcase": 0,
},
},
]
}

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLUtcOffset = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const UTC_OFFSET_REGEX = /^([+-]?)(\d{2}):(\d{2})$/;
const validate = (value, ast) => {
if (typeof value !== 'string') {
throw (0, error_js_1.createGraphQLError)(`Value is not string: ${value}`, ast ? { nodes: ast } : undefined);
}
if (!UTC_OFFSET_REGEX.test(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid UTC Offset: ${value}`, ast ? { nodes: ast } : undefined);
}
return value;
};
exports.GraphQLUtcOffset = new graphql_1.GraphQLScalarType({
name: 'UtcOffset',
description: 'A field whose value is a UTC Offset: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones',
serialize: validate,
parseValue: validate,
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate strings as UTC Offset but got a: ${ast.kind}`, {
nodes: ast,
});
}
return validate(ast.value, ast);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'UtcOffset',
type: 'string',
pattern: UTC_OFFSET_REGEX.source,
},
},
});

View File

@@ -0,0 +1,30 @@
/*
* 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 { context } from '@opentelemetry/api';
import { suppressTracing } from '../trace/suppress-tracing';
/**
* @internal
* Shared functionality used by Exporters while exporting data, including suppression of Traces.
*/
export function _export(exporter, arg) {
return new Promise(resolve => {
// prevent downstream exporter calls from generating spans
context.with(suppressTracing(context.active()), () => {
exporter.export(arg, resolve);
});
});
}
//# sourceMappingURL=exporter.js.map

View File

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

View File

@@ -0,0 +1,2 @@
import { IPropertyTypeValueDescriptor } from '../IPropertyDescriptor';
export declare const textDecorationColor: IPropertyTypeValueDescriptor;

View File

@@ -0,0 +1,55 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var ReactJSXRuntime = require('react/jsx-runtime');
var emotionElement = require('../../dist/emotion-element-25f9958c.browser.cjs.js');
require('react');
require('@emotion/cache');
require('@babel/runtime/helpers/extends');
require('@emotion/weak-memoize');
require('../../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.js');
require('hoist-non-react-statics');
require('@emotion/utils');
require('@emotion/serialize');
require('@emotion/use-insertion-effect-with-fallbacks');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var ReactJSXRuntime__namespace = /*#__PURE__*/_interopNamespace(ReactJSXRuntime);
var Fragment = ReactJSXRuntime__namespace.Fragment;
var jsx = function jsx(type, props, key) {
if (!emotionElement.hasOwn.call(props, 'css')) {
return ReactJSXRuntime__namespace.jsx(type, props, key);
}
return ReactJSXRuntime__namespace.jsx(emotionElement.Emotion, emotionElement.createEmotionProps(type, props), key);
};
var jsxs = function jsxs(type, props, key) {
if (!emotionElement.hasOwn.call(props, 'css')) {
return ReactJSXRuntime__namespace.jsxs(type, props, key);
}
return ReactJSXRuntime__namespace.jsxs(emotionElement.Emotion, emotionElement.createEmotionProps(type, props), key);
};
exports.Fragment = Fragment;
exports.jsx = jsx;
exports.jsxs = jsxs;

View File

@@ -0,0 +1 @@
{"version":3,"file":"getExistingRowDoc.d.ts","sourceRoot":"","sources":["../../../../src/fields/hooks/beforeChange/getExistingRowDoc.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEzD,eAAO,MAAM,iBAAiB,gBAAiB,UAAU,iBAAiB,OAAO,KAAG,UAkBnF,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getDirectory.d.ts","sourceRoot":"","sources":["../src/getDirectory.ts"],"names":[],"mappings":"AAGA,iBAAe,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAU7D;AAED,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}

View File

@@ -0,0 +1,4 @@
/** Used to lookup unminified function names. */
var realNames = {};
module.exports = realNames;

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
const r=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function t(e,{instancePath:a="",parentData:o,parentDataProperty:n,rootData:s=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return t.errors=[{params:{type:"object"}}],!1;{const a=0;for(const r in e)if("outputPath"!==r)return t.errors=[{params:{additionalProperty:r}}],!1;if(0===a&&void 0!==e.outputPath){let a=e.outputPath;if("string"!=typeof a)return t.errors=[{params:{type:"string"}}],!1;if(a.includes("!")||!0!==r.test(a))return t.errors=[{params:{}}],!1}}return t.errors=null,!0}module.exports=t,module.exports.default=t;

View File

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

View File

@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const TestTubeDiagonal = createLucideIcon("TestTubeDiagonal", [
[
"path",
{ d: "M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3", key: "1ub6xw" }
],
["path", { d: "m16 2 6 6", key: "1gw87d" }],
["path", { d: "M12 16H4", key: "1cjfip" }]
]);
export { TestTubeDiagonal as default };
//# sourceMappingURL=test-tube-diagonal.js.map

View File

@@ -0,0 +1,19 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.dropdown-indicator {
cursor: pointer;
display: flex;
@include btn-reset;
&:focus-visible {
outline: var(--accessibility-outline);
}
&__icon {
.stroke {
stroke-width: 1px;
}
}
}
}

View File

@@ -0,0 +1,92 @@
import { isSameWeek } from "../../../isSameWeek.mjs";
const weekdays = [
"недела",
"понеделник",
"вторник",
"среда",
"четврток",
"петок",
"сабота",
];
function lastWeek(day) {
const weekday = weekdays[day];
switch (day) {
case 0:
case 3:
case 6:
return "'минатата " + weekday + " во' p";
case 1:
case 2:
case 4:
case 5:
return "'минатиот " + weekday + " во' p";
}
}
function thisWeek(day) {
const weekday = weekdays[day];
switch (day) {
case 0:
case 3:
case 6:
return "'ова " + weekday + " вo' p";
case 1:
case 2:
case 4:
case 5:
return "'овој " + weekday + " вo' p";
}
}
function nextWeek(day) {
const weekday = weekdays[day];
switch (day) {
case 0:
case 3:
case 6:
return "'следната " + weekday + " вo' p";
case 1:
case 2:
case 4:
case 5:
return "'следниот " + weekday + " вo' p";
}
}
const formatRelativeLocale = {
lastWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
},
yesterday: "'вчера во' p",
today: "'денес во' p",
tomorrow: "'утре во' p",
nextWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
},
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};

View File

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

View File

@@ -0,0 +1,16 @@
import { StackLineParser, StackLineParserFn } from '../types-hoist/stacktrace';
export type GetModuleFn = (filename: string | undefined) => string | undefined;
/**
* Does this filename look like it's part of the app code?
*/
export declare function filenameIsInApp(filename: string, isNative?: boolean): boolean;
/** Node Stack line parser */
export declare function node(getModule?: GetModuleFn): StackLineParserFn;
/**
* Node.js stack line parser
*
* This is in @sentry/core so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.
* This allows it to be used without referencing or importing any node specific code which causes bundlers to complain
*/
export declare function nodeStackLineParser(getModule?: GetModuleFn): StackLineParser;
//# sourceMappingURL=node-stack-trace.d.ts.map

View File

@@ -0,0 +1,57 @@
"use strict";
exports.AMPMParser = void 0;
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class AMPMParser extends _Parser.Parser {
priority = 80;
parse(dateString, token, match) {
switch (token) {
case "a":
case "aa":
case "aaa":
return (
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
case "aaaaa":
return match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
});
case "aaaa":
default:
return (
match.dayPeriod(dateString, {
width: "wide",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
set(date, _flags, value) {
date.setHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0);
return date;
}
incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
}
exports.AMPMParser = AMPMParser;

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Columns4 = createLucideIcon("Columns4", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M7.5 3v18", key: "w0wo6v" }],
["path", { d: "M12 3v18", key: "108xh3" }],
["path", { d: "M16.5 3v18", key: "10tjh1" }]
]);
export { Columns4 as default };
//# sourceMappingURL=columns-4.js.map

View File

@@ -0,0 +1,14 @@
export const wordBoundariesRegex = (input)=>{
const words = input.split(' ');
// Regex word boundaries that work for cyrillic characters - https://stackoverflow.com/a/47062016/1717697
const wordBoundaryBefore = '(?:(?:[^\\p{L}\\p{N}])|^)' // Converted to a non-matching group instead of positive lookbehind for Safari
;
const wordBoundaryAfter = '(?=[^\\p{L}\\p{N}]|$)';
const regex = words.reduce((pattern, word, i)=>{
const escapedWord = word.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
return `${pattern}(?=.*${wordBoundaryBefore}.*${escapedWord}.*${wordBoundaryAfter})${i + 1 === words.length ? '.+' : ''}`;
}, '');
return new RegExp(regex, 'i');
};
//# sourceMappingURL=wordBoundariesRegex.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"flower-2.js","sources":["../../../src/icons/flower-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Flower2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNWEzIDMgMCAxIDEgMyAzbS0zLTNhMyAzIDAgMSAwLTMgM20zLTN2MU05IDhhMyAzIDAgMSAwIDMgM005IDhoMW01IDBhMyAzIDAgMSAxLTMgM20zLTNoLTFtLTIgM3YtMSIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjgiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTEyIDEwdjEyIiAvPgogIDxwYXRoIGQ9Ik0xMiAyMmM0LjIgMCA3LTEuNjY3IDctNS00LjIgMC03IDEuNjY3LTcgNVoiIC8+CiAgPHBhdGggZD0iTTEyIDIyYy00LjIgMC03LTEuNjY3LTctNSA0LjIgMCA3IDEuNjY3IDcgNVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/flower-2\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 Flower2 = createLucideIcon('Flower2', [\n [\n 'path',\n {\n d: 'M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1',\n key: '3pnvol',\n },\n ],\n ['circle', { cx: '12', cy: '8', r: '2', key: '1822b1' }],\n ['path', { d: 'M12 10v12', key: '6ubwww' }],\n ['path', { d: 'M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z', key: '9hd38g' }],\n ['path', { d: 'M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z', key: 'ufn41s' }],\n]);\n\nexport default Flower2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC/E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,96 @@
/**
* Enriches list view documents with correct draft status display.
* When draft=true is used in the query, Payload returns the latest draft version if it exists.
* This function checks if draft documents also have a published version to determine "changed" status.
*
* Performance: Uses a single query to find all documents with "changed" status instead of N queries.
*/export async function enrichDocsWithVersionStatus({
collectionConfig,
data,
req
}) {
const draftsEnabled = collectionConfig?.versions?.drafts;
if (!draftsEnabled || !data?.docs?.length) {
return data;
}
// Find all draft documents
// When querying with draft:true, we get the latest draft if it exists
// We need to check if these drafts have a published version
const draftDocs = data.docs.filter(doc => doc._status === 'draft');
if (draftDocs.length === 0) {
return data;
}
const draftDocIds = draftDocs.map(doc => doc.id).filter(Boolean);
if (draftDocIds.length === 0) {
return data;
}
// OPTIMIZATION: Single query to find all document IDs that have BOTH:
// 1. A draft version (latest=true, _status='draft')
// 2. A published version (_status='published')
// These are the documents with "changed" status
try {
// TODO: This could be more efficient with a findDistinctVersions() API:
// const { values } = await req.payload.findDistinctVersions({
// collection: collectionConfig.slug,
// field: 'parent',
// where: {
// and: [
// { parent: { in: draftDocIds } },
// { 'version._status': { equals: 'published' } },
// ],
// },
// })
// const hasPublishedVersionSet = new Set(values)
//
// For now, we query all published versions but only select the 'parent' field
// to minimize data transfer, then deduplicate with a Set
const publishedVersions = await req.payload.findVersions({
collection: collectionConfig.slug,
depth: 0,
limit: 0,
pagination: false,
select: {
parent: true
},
where: {
and: [{
parent: {
in: draftDocIds
}
}, {
'version._status': {
equals: 'published'
}
}]
}
});
// Create a Set of document IDs that have published versions
const hasPublishedVersionSet = new Set(publishedVersions.docs.map(version => version.parent).filter(Boolean));
// Enrich documents with display status
const enrichedDocs = data.docs.map(doc => {
// If it's a draft and has a published version, show "changed"
if (doc._status === 'draft' && hasPublishedVersionSet.has(doc.id)) {
return {
...doc,
_displayStatus: 'changed'
};
}
return {
...doc,
_displayStatus: doc._status
};
});
return {
...data,
docs: enrichedDocs
};
} catch (error) {
// If there's an error querying versions, just return the original data
req.payload.logger.error({
err: error,
msg: `Error checking version status for collection ${collectionConfig.slug}`
});
return data;
}
}
//# sourceMappingURL=enrichDocsWithVersionStatus.js.map

View File

@@ -0,0 +1,29 @@
import * as ReactJSXRuntime from 'react/jsx-runtime';
import { h as hasOwn, E as Emotion, c as createEmotionProps } from '../../dist/emotion-element-d59e098f.esm.js';
import 'react';
import '@emotion/cache';
import '@babel/runtime/helpers/extends';
import '@emotion/weak-memoize';
import '../../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js';
import 'hoist-non-react-statics';
import '@emotion/utils';
import '@emotion/serialize';
import '@emotion/use-insertion-effect-with-fallbacks';
var Fragment = ReactJSXRuntime.Fragment;
var jsx = function jsx(type, props, key) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsx(type, props, key);
}
return ReactJSXRuntime.jsx(Emotion, createEmotionProps(type, props), key);
};
var jsxs = function jsxs(type, props, key) {
if (!hasOwn.call(props, 'css')) {
return ReactJSXRuntime.jsxs(type, props, key);
}
return ReactJSXRuntime.jsxs(Emotion, createEmotionProps(type, props), key);
};
export { Fragment, jsx, jsxs };

View File

@@ -0,0 +1,331 @@
export type TypedArray =
| Int8Array
| Uint8Array
| Uint8ClampedArray
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Float32Array
| Float64Array
| BigInt64Array
| BigUint64Array;
/**
Check if the given value is an instance of `Uint8Array`.
Replacement for [`Buffer.isBuffer()`](https://nodejs.org/api/buffer.html#static-method-bufferisbufferobj).
@example
```
import {isUint8Array} from 'uint8array-extras';
console.log(isUint8Array(new Uint8Array()));
//=> true
console.log(isUint8Array(Buffer.from('x')));
//=> true
console.log(isUint8Array(new ArrayBuffer(10)));
//=> false
```
*/
export function isUint8Array(value: unknown): value is Uint8Array;
/**
Throw a `TypeError` if the given value is not an instance of `Uint8Array`.
@example
```
import {assertUint8Array} from 'uint8array-extras';
try {
assertUint8Array(new ArrayBuffer(10)); // Throws a TypeError
} catch (error) {
console.error(error.message);
}
```
*/
export function assertUint8Array(value: unknown): asserts value is Uint8Array;
/**
Throw a `TypeError` if the given value is not an instance of `Uint8Array` or `ArrayBuffer`.
Useful as a guard for functions that accept either a `Uint8Array` or `ArrayBuffer`.
@example
```
import {assertUint8ArrayOrArrayBuffer} from 'uint8array-extras';
assertUint8ArrayOrArrayBuffer(new Uint8Array());
assertUint8ArrayOrArrayBuffer(new ArrayBuffer(8));
```
*/
export function assertUint8ArrayOrArrayBuffer(value: unknown): asserts value is Uint8Array | ArrayBuffer;
/**
Convert a value to a `Uint8Array` without copying its data.
This can be useful for converting a `Buffer` to a pure `Uint8Array`. `Buffer` is already a `Uint8Array` subclass, but [`Buffer` alters some behavior](https://sindresorhus.com/blog/goodbye-nodejs-buffer), so it can be useful to cast it to a pure `Uint8Array` before returning it.
Tip: If you want a copy, just call `.slice()` on the return value.
*/
export function toUint8Array(value: TypedArray | ArrayBuffer | DataView): Uint8Array;
/**
Concatenate the given arrays into a new array.
If `arrays` is empty, it will return a zero-sized `Uint8Array`.
If `totalLength` is not specified, it is calculated from summing the lengths of the given arrays.
Replacement for [`Buffer.concat()`](https://nodejs.org/api/buffer.html#static-method-bufferconcatlist-totallength).
@example
```
import {concatUint8Arrays} from 'uint8array-extras';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([4, 5, 6]);
console.log(concatUint8Arrays([a, b]));
//=> Uint8Array [1, 2, 3, 4, 5, 6]
```
*/
export function concatUint8Arrays(arrays: Uint8Array[], totalLength?: number): Uint8Array<ArrayBuffer>;
/**
Check if two arrays are identical by verifying that they contain the same bytes in the same sequence.
Replacement for [`Buffer#equals()`](https://nodejs.org/api/buffer.html#bufequalsotherbuffer).
@example
```
import {areUint8ArraysEqual} from 'uint8array-extras';
const a = new Uint8Array([1, 2, 3]);
const b = new Uint8Array([1, 2, 3]);
const c = new Uint8Array([4, 5, 6]);
console.log(areUint8ArraysEqual(a, b));
//=> true
console.log(areUint8ArraysEqual(a, c));
//=> false
```
*/
export function areUint8ArraysEqual(a: Uint8Array, b: Uint8Array): boolean;
/**
Compare two arrays and indicate their relative order or equality. Useful for sorting.
Replacement for [`Buffer.compare()`](https://nodejs.org/api/buffer.html#static-method-buffercomparebuf1-buf2).
@example
```
import {compareUint8Arrays} from 'uint8array-extras';
const array1 = new Uint8Array([1, 2, 3]);
const array2 = new Uint8Array([4, 5, 6]);
const array3 = new Uint8Array([7, 8, 9]);
[array3, array1, array2].sort(compareUint8Arrays);
//=> [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
```
*/
export function compareUint8Arrays(a: Uint8Array, b: Uint8Array): 0 | 1 | -1;
/**
Convert a `Uint8Array` to a string.
@param encoding - The [encoding](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API/Encodings) to convert from. Default: `'utf8'`
Replacement for [`Buffer#toString()`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end). For the `encoding` parameter, `latin1` should be used instead of `binary` and `utf-16le` instead of `utf16le`.
@example
```
import {uint8ArrayToString} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToString(byteArray));
//=> 'Hello'
const zh = new Uint8Array([167, 65, 166, 110]);
console.log(uint8ArrayToString(zh, 'big5'));
//=> '你好'
const ja = new Uint8Array([130, 177, 130, 241, 130, 201, 130, 191, 130, 205]);
console.log(uint8ArrayToString(ja, 'shift-jis'));
//=> 'こんにちは'
```
*/
export function uint8ArrayToString(array: Uint8Array | ArrayBuffer, encoding?: string): string;
/**
Convert a string to a `Uint8Array` (using UTF-8 encoding).
Replacement for [`Buffer.from('Hello')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
@example
```
import {stringToUint8Array} from 'uint8array-extras';
console.log(stringToUint8Array('Hello'));
//=> Uint8Array [72, 101, 108, 108, 111]
```
*/
export function stringToUint8Array(string: string): Uint8Array<ArrayBuffer>;
/**
Convert a `Uint8Array` to a Base64-encoded string.
Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
Replacement for [`Buffer#toString('base64')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
@example
```
import {uint8ArrayToBase64} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToBase64(byteArray));
//=> 'SGVsbG8='
```
*/
export function uint8ArrayToBase64(array: Uint8Array, options?: {urlSafe: boolean}): string;
/**
Convert a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a `Uint8Array`.
Accepts Base64URL with or without padding.
Replacement for [`Buffer.from('SGVsbG8=', 'base64')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
@example
```
import {base64ToUint8Array} from 'uint8array-extras';
console.log(base64ToUint8Array('SGVsbG8='));
//=> Uint8Array [72, 101, 108, 108, 111]
```
*/
export function base64ToUint8Array(string: string): Uint8Array<ArrayBuffer>;
/**
Encode a string to a Base64-encoded string.
Specify `{urlSafe: true}` to get a [Base64URL](https://base64.guru/standards/base64url)-encoded string.
Replacement for `Buffer.from('Hello').toString('base64')` and [`btoa()`](https://developer.mozilla.org/en-US/docs/Web/API/btoa).
@example
```
import {stringToBase64} from 'uint8array-extras';
console.log(stringToBase64('Hello'));
//=> 'SGVsbG8='
```
*/
export function stringToBase64(string: string, options?: {urlSafe: boolean}): string;
/**
Decode a Base64-encoded or [Base64URL](https://base64.guru/standards/base64url)-encoded string to a string.
Accepts Base64URL with or without padding.
Replacement for `Buffer.from('SGVsbG8=', 'base64').toString()` and [`atob()`](https://developer.mozilla.org/en-US/docs/Web/API/atob).
@example
```
import {base64ToString} from 'uint8array-extras';
console.log(base64ToString('SGVsbG8='));
//=> 'Hello'
```
*/
export function base64ToString(base64String: string): string;
/**
Convert a `Uint8Array` to a Hex string.
Replacement for [`Buffer#toString('hex')`](https://nodejs.org/api/buffer.html#buftostringencoding-start-end).
@example
```
import {uint8ArrayToHex} from 'uint8array-extras';
const byteArray = new Uint8Array([72, 101, 108, 108, 111]);
console.log(uint8ArrayToHex(byteArray));
//=> '48656c6c6f'
```
*/
export function uint8ArrayToHex(array: Uint8Array): string;
/**
Convert a Hex string to a `Uint8Array`.
Replacement for [`Buffer.from('48656c6c6f', 'hex')`](https://nodejs.org/api/buffer.html#static-method-bufferfromstring-encoding).
@example
```
import {hexToUint8Array} from 'uint8array-extras';
console.log(hexToUint8Array('48656c6c6f'));
//=> Uint8Array [72, 101, 108, 108, 111]
```
*/
export function hexToUint8Array(hexString: string): Uint8Array<ArrayBuffer>;
/**
Read `DataView#byteLength` number of bytes from the given view, up to 48-bit.
Replacement for [`Buffer#readUIntBE`](https://nodejs.org/api/buffer.html#bufreaduintbeoffset-bytelength)
@example
```
import {getUintBE} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
console.log(getUintBE(new DataView(byteArray.buffer)));
//=> 20015998341291
```
*/
export function getUintBE(view: DataView): number; // eslint-disable-line @typescript-eslint/naming-convention
/**
Find the index of the first occurrence of the given sequence of bytes (`value`) within the given `Uint8Array` (`array`).
Replacement for [`Buffer#indexOf`](https://nodejs.org/api/buffer.html#bufindexofvalue-byteoffset-encoding). `Uint8Array#indexOf` only takes a number which is different from Buffer's `indexOf` implementation.
@example
```
import {indexOf} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
console.log(indexOf(byteArray, new Uint8Array([0x78, 0x90])));
//=> 3
```
*/
export function indexOf(array: Uint8Array, value: Uint8Array): number;
/**
Checks if the given sequence of bytes (`value`) is within the given `Uint8Array` (`array`).
Returns true if the value is included, otherwise false.
Replacement for [`Buffer#includes`](https://nodejs.org/api/buffer.html#bufincludesvalue-byteoffset-encoding). `Uint8Array#includes` only takes a number which is different from Buffer's `includes` implementation.
```
import {includes} from 'uint8array-extras';
const byteArray = new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]);
console.log(includes(byteArray, new Uint8Array([0x78, 0x90])));
//=> true
```
*/
export function includes(array: Uint8Array, value: Uint8Array): boolean;

View File

@@ -0,0 +1,50 @@
import { Span } from '@opentelemetry/api';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
export declare enum KoaLayerType {
ROUTER = "router",
MIDDLEWARE = "middleware"
}
/**
* Information about the current Koa middleware layer
* The middleware layer type is any by default.
* One can install koa types packages `@types/koa` and `@types/koa__router`
* with compatible versions to the koa version used in the project
* to get more specific types for the middleware layer property.
*
* Example use in a custom attribute function:
* ```ts
* import type { Middleware, ParameterizedContext, DefaultState } from 'koa';
* import type { RouterParamContext } from '@koa/router';
*
* type KoaContext = ParameterizedContext<DefaultState, RouterParamContext>;
* type KoaMiddleware = Middleware<DefaultState, KoaContext>;
*
* const koaConfig: KoaInstrumentationConfig<KoaContext, KoaMiddleware> = {
* requestHook: (span: Span, info: KoaRequestInfo<KoaContext, KoaMiddleware>) => {
* // custom typescript code that can access the typed into.middlewareLayer and info.context
* }
*
*/
export type KoaRequestInfo<KoaContextType = any, KoaMiddlewareType = any> = {
context: KoaContextType;
middlewareLayer: KoaMiddlewareType;
layerType: KoaLayerType;
};
/**
* Function that can be used to add custom attributes to the current span
* @param span - The Express middleware layer span.
* @param context - The current KoaContext.
*/
export interface KoaRequestCustomAttributeFunction<KoaContextType = any, KoaMiddlewareType = any> {
(span: Span, info: KoaRequestInfo<KoaContextType, KoaMiddlewareType>): void;
}
/**
* Options available for the Koa Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-Instrumentation-koa#koa-Instrumentation-options))
*/
export interface KoaInstrumentationConfig<KoaContextType = any, KoaMiddlewareType = any> extends InstrumentationConfig {
/** Ignore specific layers based on their type */
ignoreLayersType?: KoaLayerType[];
/** Function for adding custom attributes to each middleware layer span */
requestHook?: KoaRequestCustomAttributeFunction<KoaContextType, KoaMiddlewareType>;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,79 @@
/// <reference types="node" />
import type { IncomingMessage, ServerResponse } from 'http';
import { HandlerOptions as RawHandlerOptions, OperationContext } from '../handler.mjs';
import { RequestParams } from '../common.mjs';
/**
* The context in the request for the handler.
*
* @category Server/http
*/
export interface RequestContext {
res: ServerResponse;
}
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on the `ServerResponse` argument and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import http from 'http';
* import { parseRequestParams } from 'graphql-http/lib/use/http';
*
* const server = http.createServer(async (req, res) => {
* if (req.url.startsWith('/graphql')) {
* try {
* const maybeParams = await parseRequestParams(req, res);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* res.writeHead(200).end(JSON.stringify(maybeParams, null, ' '));
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* res.writeHead(400).end(err.message);
* }
* } else {
* res.writeHead(404).end();
* }
* });
*
* server.listen(4000);
* console.log('Listening to port 4000');
* ```
*
* @category Server/http
*/
export declare function parseRequestParams(req: IncomingMessage, res: ServerResponse): Promise<RequestParams | null>;
/**
* Handler options when using the http adapter.
*
* @category Server/http
*/
export type HandlerOptions<Context extends OperationContext = undefined> = RawHandlerOptions<IncomingMessage, RequestContext, Context>;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the Node environment http module.
*
* ```js
* import http from 'http';
* import { createHandler } from 'graphql-http/lib/use/http';
* import { schema } from './my-graphql-schema/index.mjs';
*
* const server = http.createServer(createHandler({ schema }));
*
* server.listen(4000);
* console.log('Listening to port 4000');
* ```
*
* @category Server/http
*/
export declare function createHandler<Context extends OperationContext = undefined>(options: HandlerOptions<Context>): (req: IncomingMessage, res: ServerResponse) => Promise<void>;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/fields/config/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,0BAA0B,CAAA;AAErE,OAAO,KAAK,EAGV,KAAK,EAGL,WAAW,EACX,WAAW,EAEX,KAAK,EACL,SAAS,EAOV,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKnD,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAKtE,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB,MAAM,MAAM,yBAAyB,GACjC,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,eAAe,GACf,SAAS,GACT,OAAO,GACP,kBAAkB,GAClB,UAAU,GACV,MAAM,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC,CAAA;AAEzE,MAAM,MAAM,8BAA8B,GAAG,MAAM,IAAI,CACrD,SAAS,CAAC,OAAO,CAAC,EAElB,YAAY,GAAG,WAAW,CAC3B,CAAA;AA+BD,eAAO,MAAM,kBAAkB,gDAK5B;IACD,MAAM,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,EAAE,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,GAAG,WAAW,EAgFzC,CAAA;AAED,eAAO,MAAM,iBAAiB,8DAK3B;IACD,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,KAAK,EAAE,KAAK,CAAA;IACZ,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,WAoSH,CAAA;AAED,eAAO,MAAM,kBAAkB,iEAM5B;IACD,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAA;IACvD,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;CACrB,KAAG,WAAW,EAkCd,CAAA"}

View File

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

View File

@@ -0,0 +1,115 @@
const { test } = require('node:test')
const { strict: assert } = require('node:assert')
const slowRedact = require('../index.js')
test('selective cloning shares references for non-redacted paths', () => {
const sharedObject = { unchanged: 'data' }
const obj = {
toRedact: 'secret',
shared: sharedObject,
nested: {
toRedact: 'secret2',
shared: sharedObject
}
}
const redact = slowRedact({
paths: ['toRedact', 'nested.toRedact'],
serialize: false
})
const result = redact(obj)
// Redacted values should be different
assert.strictEqual(result.toRedact, '[REDACTED]')
assert.strictEqual(result.nested.toRedact, '[REDACTED]')
// Non-redacted references should be shared (same object reference)
assert.strictEqual(result.shared, obj.shared)
assert.strictEqual(result.nested.shared, obj.nested.shared)
// The shared object should be the exact same reference
assert.strictEqual(result.shared, sharedObject)
assert.strictEqual(result.nested.shared, sharedObject)
})
test('selective cloning works with arrays', () => {
const sharedItem = { unchanged: 'data' }
const obj = {
items: [
{ secret: 'hidden1', shared: sharedItem },
{ secret: 'hidden2', shared: sharedItem },
sharedItem
]
}
const redact = slowRedact({
paths: ['items.*.secret'],
serialize: false
})
const result = redact(obj)
// Secrets should be redacted
assert.strictEqual(result.items[0].secret, '[REDACTED]')
assert.strictEqual(result.items[1].secret, '[REDACTED]')
// Shared references should be preserved where possible
// Note: array items with secrets will be cloned, but their shared properties should still reference the original
assert.strictEqual(result.items[0].shared, sharedItem)
assert.strictEqual(result.items[1].shared, sharedItem)
// The third item gets cloned due to wildcard, but should have the same content
assert.deepStrictEqual(result.items[2], sharedItem)
// Note: Due to wildcard '*', all array items are cloned, even if they don't need redaction
// This is still a significant optimization for object properties that aren't in wildcard paths
})
test('selective cloning with no paths returns original object', () => {
const obj = { data: 'unchanged' }
const redact = slowRedact({
paths: [],
serialize: false
})
const result = redact(obj)
// Should return the exact same object reference
assert.strictEqual(result, obj)
})
test('selective cloning performance - large objects with minimal redaction', () => {
// Create a large object with mostly shared data
const sharedData = { large: 'data'.repeat(1000) }
const obj = {
secret: 'hidden',
shared1: sharedData,
shared2: sharedData,
nested: {
secret: 'hidden2',
shared3: sharedData,
deep: {
shared4: sharedData,
moreShared: sharedData
}
}
}
const redact = slowRedact({
paths: ['secret', 'nested.secret'],
serialize: false
})
const result = redact(obj)
// Verify redaction worked
assert.strictEqual(result.secret, '[REDACTED]')
assert.strictEqual(result.nested.secret, '[REDACTED]')
// Verify shared references are preserved
assert.strictEqual(result.shared1, sharedData)
assert.strictEqual(result.shared2, sharedData)
assert.strictEqual(result.nested.shared3, sharedData)
assert.strictEqual(result.nested.deep.shared4, sharedData)
assert.strictEqual(result.nested.deep.moreShared, sharedData)
})

View File

@@ -0,0 +1,261 @@
const util = require('./util')
module.exports = function stringify (value, replacer, space) {
const stack = []
let indent = ''
let propertyList
let replacerFunc
let gap = ''
let quote
if (
replacer != null &&
typeof replacer === 'object' &&
!Array.isArray(replacer)
) {
space = replacer.space
quote = replacer.quote
replacer = replacer.replacer
}
if (typeof replacer === 'function') {
replacerFunc = replacer
} else if (Array.isArray(replacer)) {
propertyList = []
for (const v of replacer) {
let item
if (typeof v === 'string') {
item = v
} else if (
typeof v === 'number' ||
v instanceof String ||
v instanceof Number
) {
item = String(v)
}
if (item !== undefined && propertyList.indexOf(item) < 0) {
propertyList.push(item)
}
}
}
if (space instanceof Number) {
space = Number(space)
} else if (space instanceof String) {
space = String(space)
}
if (typeof space === 'number') {
if (space > 0) {
space = Math.min(10, Math.floor(space))
gap = ' '.substr(0, space)
}
} else if (typeof space === 'string') {
gap = space.substr(0, 10)
}
return serializeProperty('', {'': value})
function serializeProperty (key, holder) {
let value = holder[key]
if (value != null) {
if (typeof value.toJSON5 === 'function') {
value = value.toJSON5(key)
} else if (typeof value.toJSON === 'function') {
value = value.toJSON(key)
}
}
if (replacerFunc) {
value = replacerFunc.call(holder, key, value)
}
if (value instanceof Number) {
value = Number(value)
} else if (value instanceof String) {
value = String(value)
} else if (value instanceof Boolean) {
value = value.valueOf()
}
switch (value) {
case null: return 'null'
case true: return 'true'
case false: return 'false'
}
if (typeof value === 'string') {
return quoteString(value, false)
}
if (typeof value === 'number') {
return String(value)
}
if (typeof value === 'object') {
return Array.isArray(value) ? serializeArray(value) : serializeObject(value)
}
return undefined
}
function quoteString (value) {
const quotes = {
"'": 0.1,
'"': 0.2,
}
const replacements = {
"'": "\\'",
'"': '\\"',
'\\': '\\\\',
'\b': '\\b',
'\f': '\\f',
'\n': '\\n',
'\r': '\\r',
'\t': '\\t',
'\v': '\\v',
'\0': '\\0',
'\u2028': '\\u2028',
'\u2029': '\\u2029',
}
let product = ''
for (let i = 0; i < value.length; i++) {
const c = value[i]
switch (c) {
case "'":
case '"':
quotes[c]++
product += c
continue
case '\0':
if (util.isDigit(value[i + 1])) {
product += '\\x00'
continue
}
}
if (replacements[c]) {
product += replacements[c]
continue
}
if (c < ' ') {
let hexString = c.charCodeAt(0).toString(16)
product += '\\x' + ('00' + hexString).substring(hexString.length)
continue
}
product += c
}
const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b)
product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar])
return quoteChar + product + quoteChar
}
function serializeObject (value) {
if (stack.indexOf(value) >= 0) {
throw TypeError('Converting circular structure to JSON5')
}
stack.push(value)
let stepback = indent
indent = indent + gap
let keys = propertyList || Object.keys(value)
let partial = []
for (const key of keys) {
const propertyString = serializeProperty(key, value)
if (propertyString !== undefined) {
let member = serializeKey(key) + ':'
if (gap !== '') {
member += ' '
}
member += propertyString
partial.push(member)
}
}
let final
if (partial.length === 0) {
final = '{}'
} else {
let properties
if (gap === '') {
properties = partial.join(',')
final = '{' + properties + '}'
} else {
let separator = ',\n' + indent
properties = partial.join(separator)
final = '{\n' + indent + properties + ',\n' + stepback + '}'
}
}
stack.pop()
indent = stepback
return final
}
function serializeKey (key) {
if (key.length === 0) {
return quoteString(key, true)
}
const firstChar = String.fromCodePoint(key.codePointAt(0))
if (!util.isIdStartChar(firstChar)) {
return quoteString(key, true)
}
for (let i = firstChar.length; i < key.length; i++) {
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
return quoteString(key, true)
}
}
return key
}
function serializeArray (value) {
if (stack.indexOf(value) >= 0) {
throw TypeError('Converting circular structure to JSON5')
}
stack.push(value)
let stepback = indent
indent = indent + gap
let partial = []
for (let i = 0; i < value.length; i++) {
const propertyString = serializeProperty(String(i), value)
partial.push((propertyString !== undefined) ? propertyString : 'null')
}
let final
if (partial.length === 0) {
final = '[]'
} else {
if (gap === '') {
let properties = partial.join(',')
final = '[' + properties + ']'
} else {
let separator = ',\n' + indent
let properties = partial.join(separator)
final = '[\n' + indent + properties + ',\n' + stepback + ']'
}
}
stack.pop()
indent = stepback
return final
}
}

View File

@@ -0,0 +1,139 @@
import crypto from './webcrypto.js';
import { JOSENotSupported } from '../util/errors.js';
import random from './random.js';
export async function generateSecret(alg, options) {
let length;
let algorithm;
let keyUsages;
switch (alg) {
case 'HS256':
case 'HS384':
case 'HS512':
length = parseInt(alg.slice(-3), 10);
algorithm = { name: 'HMAC', hash: `SHA-${length}`, length };
keyUsages = ['sign', 'verify'];
break;
case 'A128CBC-HS256':
case 'A192CBC-HS384':
case 'A256CBC-HS512':
length = parseInt(alg.slice(-3), 10);
return random(new Uint8Array(length >> 3));
case 'A128KW':
case 'A192KW':
case 'A256KW':
length = parseInt(alg.slice(1, 4), 10);
algorithm = { name: 'AES-KW', length };
keyUsages = ['wrapKey', 'unwrapKey'];
break;
case 'A128GCMKW':
case 'A192GCMKW':
case 'A256GCMKW':
case 'A128GCM':
case 'A192GCM':
case 'A256GCM':
length = parseInt(alg.slice(1, 4), 10);
algorithm = { name: 'AES-GCM', length };
keyUsages = ['encrypt', 'decrypt'];
break;
default:
throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
}
return crypto.subtle.generateKey(algorithm, options?.extractable ?? false, keyUsages);
}
function getModulusLengthOption(options) {
const modulusLength = options?.modulusLength ?? 2048;
if (typeof modulusLength !== 'number' || modulusLength < 2048) {
throw new JOSENotSupported('Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used');
}
return modulusLength;
}
export async function generateKeyPair(alg, options) {
let algorithm;
let keyUsages;
switch (alg) {
case 'PS256':
case 'PS384':
case 'PS512':
algorithm = {
name: 'RSA-PSS',
hash: `SHA-${alg.slice(-3)}`,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
modulusLength: getModulusLengthOption(options),
};
keyUsages = ['sign', 'verify'];
break;
case 'RS256':
case 'RS384':
case 'RS512':
algorithm = {
name: 'RSASSA-PKCS1-v1_5',
hash: `SHA-${alg.slice(-3)}`,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
modulusLength: getModulusLengthOption(options),
};
keyUsages = ['sign', 'verify'];
break;
case 'RSA-OAEP':
case 'RSA-OAEP-256':
case 'RSA-OAEP-384':
case 'RSA-OAEP-512':
algorithm = {
name: 'RSA-OAEP',
hash: `SHA-${parseInt(alg.slice(-3), 10) || 1}`,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
modulusLength: getModulusLengthOption(options),
};
keyUsages = ['decrypt', 'unwrapKey', 'encrypt', 'wrapKey'];
break;
case 'ES256':
algorithm = { name: 'ECDSA', namedCurve: 'P-256' };
keyUsages = ['sign', 'verify'];
break;
case 'ES384':
algorithm = { name: 'ECDSA', namedCurve: 'P-384' };
keyUsages = ['sign', 'verify'];
break;
case 'ES512':
algorithm = { name: 'ECDSA', namedCurve: 'P-521' };
keyUsages = ['sign', 'verify'];
break;
case 'EdDSA': {
keyUsages = ['sign', 'verify'];
const crv = options?.crv ?? 'Ed25519';
switch (crv) {
case 'Ed25519':
case 'Ed448':
algorithm = { name: crv };
break;
default:
throw new JOSENotSupported('Invalid or unsupported crv option provided');
}
break;
}
case 'ECDH-ES':
case 'ECDH-ES+A128KW':
case 'ECDH-ES+A192KW':
case 'ECDH-ES+A256KW': {
keyUsages = ['deriveKey', 'deriveBits'];
const crv = options?.crv ?? 'P-256';
switch (crv) {
case 'P-256':
case 'P-384':
case 'P-521': {
algorithm = { name: 'ECDH', namedCurve: crv };
break;
}
case 'X25519':
case 'X448':
algorithm = { name: crv };
break;
default:
throw new JOSENotSupported('Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448');
}
break;
}
default:
throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
}
return crypto.subtle.generateKey(algorithm, options?.extractable ?? false, keyUsages);
}

View File

@@ -0,0 +1,18 @@
import { inspect } from './inspect.mjs';
/**
* Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
*/
export function toError(thrownValue) {
return thrownValue instanceof Error
? thrownValue
: new NonErrorThrown(thrownValue);
}
class NonErrorThrown extends Error {
constructor(thrownValue) {
super('Unexpected error value: ' + inspect(thrownValue));
this.name = 'NonErrorThrown';
this.thrownValue = thrownValue;
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6BjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUjD,wDAAwD;AACxD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CActE;AAED,uDAAuD;AACvD,wBAAgB,IAAI,CAAC,OAAO,GAAE,iBAAsB,GAAG,MAAM,GAAG,SAAS,CAqDxE;AAgCD,wBAAgB,SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CA+BxD;AAoBD;;GAEG;AAEH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoGtE"}

View File

@@ -0,0 +1,28 @@
"use strict";
exports.enIN = void 0;
var _index = require("./en-US/_lib/formatDistance.cjs");
var _index2 = require("./en-US/_lib/formatRelative.cjs");
var _index3 = require("./en-US/_lib/localize.cjs");
var _index4 = require("./en-US/_lib/match.cjs");
var _index5 = require("./en-IN/_lib/formatLong.cjs");
/**
* @category Locales
* @summary English locale (India).
* @language English
* @iso-639-2 eng
* @author Galeel Bhasha Satthar [@gbhasha](https://github.com/gbhasha)
*/
const enIN = (exports.enIN = {
code: "en-IN",
formatDistance: _index.formatDistance,
formatLong: _index5.formatLong,
formatRelative: _index2.formatRelative,
localize: _index3.localize,
match: _index4.match,
options: {
weekStartsOn: 1, // Monday is the first day of the week.
firstWeekContainsDate: 4, // The week that contains Jan 4th is the first week of the year.
},
});

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const isDisjoint = (...headers) => {
const sources = headers.filter(Boolean);
if (sources.length === 0 || sources.length === 1) {
return true;
}
let acc;
for (const header of sources) {
const parameters = Object.keys(header);
if (!acc || acc.size === 0) {
acc = new Set(parameters);
continue;
}
for (const parameter of parameters) {
if (acc.has(parameter)) {
return false;
}
acc.add(parameter);
}
}
return true;
};
exports.default = isDisjoint;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAA+D;AAAtD,6HAAA,0BAA0B,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { LruMemoizerInstrumentation } from './instrumentation';\n"]}

View File

@@ -0,0 +1,38 @@
'use strict'
/* global SharedArrayBuffer, Atomics */
if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') {
const nil = new Int32Array(new SharedArrayBuffer(4))
function sleep (ms) {
// also filters out NaN, non-number types, including empty strings, but allows bigints
const valid = ms > 0 && ms < Infinity
if (valid === false) {
if (typeof ms !== 'number' && typeof ms !== 'bigint') {
throw TypeError('sleep: ms must be a number')
}
throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')
}
Atomics.wait(nil, 0, 0, Number(ms))
}
module.exports = sleep
} else {
function sleep (ms) {
// also filters out NaN, non-number types, including empty strings, but allows bigints
const valid = ms > 0 && ms < Infinity
if (valid === false) {
if (typeof ms !== 'number' && typeof ms !== 'bigint') {
throw TypeError('sleep: ms must be a number')
}
throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')
}
const target = Date.now() + Number(ms)
while (target > Date.now()){}
}
module.exports = sleep
}

View File

@@ -0,0 +1,13 @@
import { buildFeedbackIntegration } from '@sentry-internal/feedback';
import { lazyLoadIntegration } from './utils/lazyLoadIntegration.js';
/**
* An integration to add user feedback to your application,
* while loading most of the code lazily only when it's needed.
*/
const feedbackAsyncIntegration = buildFeedbackIntegration({
lazyLoadIntegration,
});
export { feedbackAsyncIntegration };
//# sourceMappingURL=feedbackAsync.js.map

View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { LexicalEditor, MutatedNodes } from './LexicalEditor';
import type { NodeKey } from './LexicalNode';
import type { ElementNode } from './nodes/LexicalElementNode';
import { EditorState } from './LexicalEditorState';
type IntentionallyMarkedAsDirtyElement = boolean;
export declare function $getReconciledDirection(node: ElementNode): 'ltr' | 'rtl' | 'auto' | null;
export declare function $reconcileRoot(prevEditorState: EditorState, nextEditorState: EditorState, editor: LexicalEditor, dirtyType: 0 | 1 | 2, dirtyElements: Map<NodeKey, IntentionallyMarkedAsDirtyElement>, dirtyLeaves: Set<NodeKey>): MutatedNodes;
export declare function storeDOMWithKey(key: NodeKey, dom: HTMLElement, editor: LexicalEditor): void;
export {};

View File

@@ -0,0 +1,154 @@
'use strict';
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
const prompts = require('./prompts');
const passOn = ['suggest', 'format', 'onState', 'validate', 'onRender', 'type'];
const noop = () => {};
/**
* Prompt for a series of questions
* @param {Array|Object} questions Single question object or Array of question objects
* @param {Function} [onSubmit] Callback function called on prompt submit
* @param {Function} [onCancel] Callback function called on cancel/abort
* @returns {Object} Object with values from user input
*/
function prompt() {
return _prompt.apply(this, arguments);
}
function _prompt() {
_prompt = _asyncToGenerator(function* (questions = [], {
onSubmit = noop,
onCancel = noop
} = {}) {
const answers = {};
const override = prompt._override || {};
questions = [].concat(questions);
let answer, question, quit, name, type, lastPrompt;
const getFormattedAnswer = /*#__PURE__*/function () {
var _ref = _asyncToGenerator(function* (question, answer, skipValidation = false) {
if (!skipValidation && question.validate && question.validate(answer) !== true) {
return;
}
return question.format ? yield question.format(answer, answers) : answer;
});
return function getFormattedAnswer(_x, _x2) {
return _ref.apply(this, arguments);
};
}();
var _iterator = _createForOfIteratorHelper(questions),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
question = _step.value;
var _question = question;
name = _question.name;
type = _question.type;
// evaluate type first and skip if type is a falsy value
if (typeof type === 'function') {
type = yield type(answer, _objectSpread({}, answers), question);
question['type'] = type;
}
if (!type) continue; // if property is a function, invoke it unless it's a special function
for (let key in question) {
if (passOn.includes(key)) continue;
let value = question[key];
question[key] = typeof value === 'function' ? yield value(answer, _objectSpread({}, answers), lastPrompt) : value;
}
lastPrompt = question;
if (typeof question.message !== 'string') {
throw new Error('prompt message is required');
} // update vars in case they changed
var _question2 = question;
name = _question2.name;
type = _question2.type;
if (prompts[type] === void 0) {
throw new Error(`prompt type (${type}) is not defined`);
}
if (override[question.name] !== undefined) {
answer = yield getFormattedAnswer(question, override[question.name]);
if (answer !== undefined) {
answers[name] = answer;
continue;
}
}
try {
// Get the injected answer if there is one or prompt the user
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts[type](question);
answers[name] = answer = yield getFormattedAnswer(question, answer, true);
quit = yield onSubmit(question, answer, answers);
} catch (err) {
quit = !(yield onCancel(question, answers));
}
if (quit) return answers;
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return answers;
});
return _prompt.apply(this, arguments);
}
function getInjectedAnswer(injected, deafultValue) {
const answer = injected.shift();
if (answer instanceof Error) {
throw answer;
}
return answer === undefined ? deafultValue : answer;
}
function inject(answers) {
prompt._injected = (prompt._injected || []).concat(answers);
}
function override(answers) {
prompt._override = Object.assign({}, answers);
}
module.exports = Object.assign(prompt, {
prompt,
prompts,
inject,
override
});

View File

@@ -0,0 +1,21 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalize = void 0;
var path_1 = require("path");
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return path_1.normalize; } });
//# sourceMappingURL=normalize.js.map

View File

@@ -0,0 +1,89 @@
declare type StringifyOptions = {
/**
* A function that alters the behavior of the stringification process, or an
* array of String and Number objects that serve as a allowlist for
* selecting/filtering the properties of the value object to be included in
* the JSON5 string. If this value is null or not provided, all properties
* of the object are included in the resulting JSON5 string.
*/
replacer?:
| ((this: any, key: string, value: any) => any)
| (string | number)[]
| null
/**
* A String or Number object that's used to insert white space into the
* output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this
* number is capped at 10 (if it is greater, the value is just 10). Values
* less than 1 indicate that no space should be used. If this is a String,
* the string (or the first 10 characters of the string, if it's longer than
* that) is used as white space. If this parameter is not provided (or is
* null), no white space is used. If white space is used, trailing commas
* will be used in objects and arrays.
*/
space?: string | number | null
/**
* A String representing the quote character to use when serializing
* strings.
*/
quote?: string | null
}
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param replacer A function that alters the behavior of the stringification
* process. If this value is null or not provided, all properties of the object
* are included in the resulting JSON5 string.
* @param space A String or Number object that's used to insert white space into
* the output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this number
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
* indicate that no space should be used. If this is a String, the string (or
* the first 10 characters of the string, if it's longer than that) is used as
* white space. If this parameter is not provided (or is null), no white space
* is used. If white space is used, trailing commas will be used in objects and
* arrays.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(
value: any,
replacer?: ((this: any, key: string, value: any) => any) | null,
space?: string | number | null,
): string
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param replacer An array of String and Number objects that serve as a
* allowlist for selecting/filtering the properties of the value object to be
* included in the JSON5 string. If this value is null or not provided, all
* properties of the object are included in the resulting JSON5 string.
* @param space A String or Number object that's used to insert white space into
* the output JSON5 string for readability purposes. If this is a Number, it
* indicates the number of space characters to use as white space; this number
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
* indicate that no space should be used. If this is a String, the string (or
* the first 10 characters of the string, if it's longer than that) is used as
* white space. If this parameter is not provided (or is null), no white space
* is used. If white space is used, trailing commas will be used in objects and
* arrays.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(
value: any,
replacer: (string | number)[],
space?: string | number | null,
): string
/**
* Converts a JavaScript value to a JSON5 string.
* @param value The value to convert to a JSON5 string.
* @param options An object specifying options.
* @returns The JSON5 string converted from the JavaScript value.
*/
declare function stringify(value: any, options: StringifyOptions): string
export = stringify

View File

@@ -0,0 +1,29 @@
var baseGetTag = require('./_baseGetTag'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var boolTag = '[object Boolean]';
/**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
* @example
*
* _.isBoolean(false);
* // => true
*
* _.isBoolean(null);
* // => false
*/
function isBoolean(value) {
return value === true || value === false ||
(isObjectLike(value) && baseGetTag(value) == boolTag);
}
module.exports = isBoolean;

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