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,268 @@
import { _ as _to_array } from "./_to_array.js";
import { _ as _to_property_key } from "./_to_property_key.js";
import { _ as _type_of } from "./_type_of.js";
function _decorate(decorators, factory, superClass) {
var r = factory(function initialize(O) {
_initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = _decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
_initializeClassElements(r.F, decorated.elements);
return _runClassFinishers(r.F, decorated.finishers);
}
function _createElementDescriptor(def) {
var key = _to_property_key(def.key);
var descriptor;
if (def.kind === "method") {
descriptor = { value: def.value, writable: true, configurable: true, enumerable: false };
Object.defineProperty(def.value, "name", { value: _type_of(key) === "symbol" ? "" : key, configurable: true });
} else if (def.kind === "get") descriptor = { get: def.value, configurable: true, enumerable: false };
else if (def.kind === "set") descriptor = { set: def.value, configurable: true, enumerable: false };
else if (def.kind === "field") descriptor = { configurable: true, writable: true, enumerable: true };
var element = { kind: def.kind === "field" ? "field" : "method", key: key, placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype", descriptor: descriptor };
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
function _coalesceGetterSetter(element, other) {
if (element.descriptor.get !== undefined) other.descriptor.get = element.descriptor.get;
else other.descriptor.set = element.descriptor.set;
}
function _coalesceClassElements(elements) {
var newElements = [];
var isSameElement = function isSameElement(other) {
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
};
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var other;
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element) {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc) {
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
}
function _initializeClassElements(F, elements) {
var proto = F.prototype;
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
var placement = element.placement;
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
var receiver = placement === "static" ? F : proto;
_defineClassElement(receiver, element);
}
});
});
}
function _initializeInstanceElements(O, elements) {
["method", "field"].forEach(function(kind) {
elements.forEach(function(element) {
if (element.kind === kind && element.placement === "own") _defineClassElement(O, element);
});
});
}
function _defineClassElement(receiver, element) {
var descriptor = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = { enumerable: descriptor.enumerable, writable: descriptor.writable, configurable: descriptor.configurable, value: initializer === void 0 ? void 0 : initializer.call(receiver) };
}
Object.defineProperty(receiver, element.key, descriptor);
}
function _decorateClass(elements, decorators) {
var newElements = [];
var finishers = [];
var placements = { static: [], prototype: [], own: [] };
elements.forEach(function(element) {
_addElementPlacement(element, placements);
});
elements.forEach(function(element) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras = _decorateElement(element, placements);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
});
if (!decorators) return { elements: newElements, finishers: finishers };
var result = _decorateConstructor(newElements, decorators);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
}
function _addElementPlacement(element, placements, silent) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) throw new TypeError("Duplicated element (" + element.key + ")");
keys.push(element.key);
}
function _decorateElement(element, placements) {
var extras = [];
var finishers = [];
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject = _fromElementDescriptor(element);
var elementFinisherExtras = _toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
element = elementFinisherExtras.element;
_addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) finishers.push(elementFinisherExtras.finisher);
var newExtras = elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) _addElementPlacement(newExtras[j], placements);
extras.push.apply(extras, newExtras);
}
}
return { element: element, finishers: finishers, extras: extras };
}
function _decorateConstructor(elements, decorators) {
var finishers = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj = _fromClassDescriptor(elements);
var elementsAndFinisher = _toClassDescriptor((0, decorators[i])(obj) || obj);
if (elementsAndFinisher.finisher !== undefined) finishers.push(elementsAndFinisher.finisher);
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
throw new TypeError("Duplicated element (" + elements[j].key + ")");
}
}
}
}
}
return { elements: elements, finishers: finishers };
}
function _fromElementDescriptor(element) {
var obj = { kind: element.kind, key: element.key, placement: element.placement, descriptor: element.descriptor };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
}
function _toElementDescriptors(elementObjects) {
if (elementObjects === undefined) return;
return _to_array(elementObjects).map(function(elementObject) {
var element = _toElementDescriptor(elementObject);
_disallowProperty(elementObject, "finisher", "An element descriptor");
_disallowProperty(elementObject, "extras", "An element descriptor");
return element;
});
}
function _toElementDescriptor(elementObject) {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError("An element descriptor's .kind property must be either \"method\" or" + " \"field\", but a decorator created an element descriptor with" + " .kind \"" + kind + "\"");
}
var key = _to_property_key(elementObject.key);
var placement = String(elementObject.placement);
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
throw new TypeError(
"An element descriptor's .placement property must be one of \"static\","
+ " \"prototype\" or \"own\", but a decorator created an element descriptor"
+ " with .placement \""
+ placement
+ "\""
);
}
var descriptor = elementObject.descriptor;
_disallowProperty(elementObject, "elements", "An element descriptor");
var element = { kind: kind, key: key, placement: placement, descriptor: Object.assign({}, descriptor) };
if (kind !== "field") _disallowProperty(elementObject, "initializer", "A method descriptor");
else {
_disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
_disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
element.initializer = elementObject.initializer;
}
return element;
}
function _toElementFinisherExtras(elementObject) {
var element = _toElementDescriptor(elementObject);
var finisher = _optionalCallableProperty(elementObject, "finisher");
var extras = _toElementDescriptors(elementObject.extras);
return { element: element, finisher: finisher, extras: extras };
}
function _fromClassDescriptor(elements) {
var obj = { kind: "class", elements: elements.map(_fromElementDescriptor) };
var desc = { value: "Descriptor", configurable: true };
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
}
function _toClassDescriptor(obj) {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError("A class descriptor's .kind property must be \"class\", but a decorator" + " created a class descriptor with .kind \"" + kind + "\"");
}
_disallowProperty(obj, "key", "A class descriptor");
_disallowProperty(obj, "placement", "A class descriptor");
_disallowProperty(obj, "descriptor", "A class descriptor");
_disallowProperty(obj, "initializer", "A class descriptor");
_disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = _toElementDescriptors(obj.elements);
return { elements: elements, finisher: finisher };
}
function _disallowProperty(obj, name, objectType) {
if (obj[name] !== undefined) throw new TypeError(objectType + " can't have a ." + name + " property.");
}
function _optionalCallableProperty(obj, name) {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
function _runClassFinishers(constructor, finishers) {
for (var i = 0; i < finishers.length; i++) {
var newConstructor = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
if (typeof newConstructor !== "function") throw new TypeError("Finishers must return a constructor.");
constructor = newConstructor;
}
}
return constructor;
}
export { _decorate as _ };

View File

@@ -0,0 +1,38 @@
import { Client } from '../client';
import { DsnComponents, DsnLike } from '../types-hoist/dsn';
/**
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
*/
export declare function dsnToString(dsn: DsnComponents, withPassword?: boolean): string;
/**
* Parses a Dsn from a given string.
*
* @param str A Dsn as string
* @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string
*/
export declare function dsnFromString(str: string): DsnComponents | undefined;
/**
* Extract the org ID from a DSN host.
*
* @param host The host from a DSN
* @returns The org ID if found, undefined otherwise
*/
export declare function extractOrgIdFromDsnHost(host: string): string | undefined;
/**
* Returns the organization ID of the client.
*
* The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.
*/
export declare function extractOrgIdFromClient(client: Client): string | undefined;
/**
* Creates a valid Sentry Dsn object, identifying a Sentry instance and project.
* @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source
*/
export declare function makeDsn(from: DsnLike): DsnComponents | undefined;
//# sourceMappingURL=dsn.d.ts.map

View File

@@ -0,0 +1,26 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ArrayPushCallbackChunkFormatPlugin = require("../javascript/ArrayPushCallbackChunkFormatPlugin");
const EnableChunkLoadingPlugin = require("../javascript/EnableChunkLoadingPlugin");
/** @typedef {import("../Compiler")} Compiler */
class WebWorkerTemplatePlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.options.output.chunkLoading = "import-scripts";
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
new EnableChunkLoadingPlugin("import-scripts").apply(compiler);
}
}
module.exports = WebWorkerTemplatePlugin;

View File

@@ -0,0 +1,542 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/ckb/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u06A9\u06D5\u0645\u062A\u0631 \u0644\u06D5 \u06CC\u06D5\u06A9 \u0686\u0631\u06A9\u06D5",
other: "\u06A9\u06D5\u0645\u062A\u0631 \u0644\u06D5 {{count}} \u0686\u0631\u06A9\u06D5"
},
xSeconds: {
one: "1 \u0686\u0631\u06A9\u06D5",
other: "{{count}} \u0686\u0631\u06A9\u06D5"
},
halfAMinute: "\u0646\u06CC\u0648 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",
lessThanXMinutes: {
one: "\u06A9\u06D5\u0645\u062A\u0631 \u0644\u06D5 \u06CC\u06D5\u06A9 \u062E\u0648\u0644\u06D5\u06A9",
other: "\u06A9\u06D5\u0645\u062A\u0631 \u0644\u06D5 {{count}} \u062E\u0648\u0644\u06D5\u06A9"
},
xMinutes: {
one: "1 \u062E\u0648\u0644\u06D5\u06A9",
other: "{{count}} \u062E\u0648\u0644\u06D5\u06A9"
},
aboutXHours: {
one: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC 1 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",
other: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC {{count}} \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631"
},
xHours: {
one: "1 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631",
other: "{{count}} \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631"
},
xDays: {
one: "1 \u0695\u06C6\u0698",
other: "{{count}} \u0698\u06C6\u0698"
},
aboutXWeeks: {
one: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC 1 \u0647\u06D5\u0641\u062A\u06D5",
other: "\u062F\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC {{count}} \u0647\u06D5\u0641\u062A\u06D5"
},
xWeeks: {
one: "1 \u0647\u06D5\u0641\u062A\u06D5",
other: "{{count}} \u0647\u06D5\u0641\u062A\u06D5"
},
aboutXMonths: {
one: "\u062F\u0627\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC 1 \u0645\u0627\u0646\u06AF",
other: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC {{count}} \u0645\u0627\u0646\u06AF"
},
xMonths: {
one: "1 \u0645\u0627\u0646\u06AF",
other: "{{count}} \u0645\u0627\u0646\u06AF"
},
aboutXYears: {
one: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC 1 \u0633\u0627\u06B5",
other: "\u062F\u06D5\u0648\u0631\u0648\u0628\u06D5\u0631\u06CC {{count}} \u0633\u0627\u06B5"
},
xYears: {
one: "1 \u0633\u0627\u06B5",
other: "{{count}} \u0633\u0627\u06B5"
},
overXYears: {
one: "\u0632\u06CC\u0627\u062A\u0631 \u0644\u06D5 \u0633\u0627\u06B5\u06CE\u06A9",
other: "\u0632\u06CC\u0627\u062A\u0631 \u0644\u06D5 {{count}} \u0633\u0627\u06B5"
},
almostXYears: {
one: "\u0628\u06D5\u0646\u0632\u06CC\u06A9\u06D5\u06CC\u06CC \u0633\u0627\u06B5\u06CE\u06A9 ",
other: "\u0628\u06D5\u0646\u0632\u06CC\u06A9\u06D5\u06CC\u06CC {{count}} \u0633\u0627\u06B5"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0644\u06D5 \u0645\u0627\u0648\u06D5\u06CC " + result + "\u062F\u0627";
} else {
return result + "\u067E\u06CE\u0634 \u0626\u06CE\u0633\u062A\u0627";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/ckb/_lib/formatLong.js
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} '\u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' {{time}}",
long: "{{date}} '\u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/ckb/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\u0647\u06D5\u0641\u062A\u06D5\u06CC \u0695\u0627\u0628\u0631\u062F\u0648\u0648' eeee '\u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' p",
yesterday: "'\u062F\u0648\u06CE\u0646\u06CE \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' p",
today: "'\u0626\u06D5\u0645\u0695\u06C6 \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' p",
tomorrow: "'\u0628\u06D5\u06CC\u0627\u0646\u06CC \u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' p",
nextWeek: "eeee '\u06A9\u0627\u062A\u0698\u0645\u06CE\u0631' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/ckb/_lib/localize.js
var eraValues = {
narrow: ["\u067E", "\u062F"],
abbreviated: ["\u067E-\u0632", "\u062F-\u0632"],
wide: ["\u067E\u06CE\u0634 \u0632\u0627\u06CC\u0646", "\u062F\u0648\u0627\u06CC \u0632\u0627\u06CC\u0646"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u06861\u0645", "\u06862\u0645", "\u06863\u0645", "\u06864\u0645"],
wide: ["\u0686\u0627\u0631\u06D5\u06AF\u06CC \u06CC\u06D5\u06A9\u06D5\u0645", "\u0686\u0627\u0631\u06D5\u06AF\u06CC \u062F\u0648\u0648\u06D5\u0645", "\u0686\u0627\u0631\u06D5\u06AF\u06CC \u0633\u06CE\u06CC\u06D5\u0645", "\u0686\u0627\u0631\u06D5\u06AF\u06CC \u0686\u0648\u0627\u0631\u06D5\u0645"]
};
var monthValues = {
narrow: [
"\u06A9-\u062F",
"\u0634",
"\u0626\u0627",
"\u0646",
"\u0645",
"\u062D",
"\u062A",
"\u0626\u0627",
"\u0626\u06D5",
"\u062A\u0634-\u06CC",
"\u062A\u0634-\u062F",
"\u06A9-\u06CC"],
abbreviated: [
"\u06A9\u0627\u0646-\u062F\u0648\u0648",
"\u0634\u0648\u0628",
"\u0626\u0627\u062F",
"\u0646\u06CC\u0633",
"\u0645\u0627\u06CC\u0633",
"\u062D\u0648\u0632",
"\u062A\u06D5\u0645",
"\u0626\u0627\u0628",
"\u0626\u06D5\u0644",
"\u062A\u0634-\u06CC\u06D5\u06A9",
"\u062A\u0634-\u062F\u0648\u0648",
"\u06A9\u0627\u0646-\u06CC\u06D5\u06A9"],
wide: [
"\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645",
"\u0634\u0648\u0628\u0627\u062A",
"\u0626\u0627\u062F\u0627\u0631",
"\u0646\u06CC\u0633\u0627\u0646",
"\u0645\u0627\u06CC\u0633",
"\u062D\u0648\u0632\u06D5\u06CC\u0631\u0627\u0646",
"\u062A\u06D5\u0645\u0645\u0648\u0632",
"\u0626\u0627\u0628",
"\u0626\u06D5\u06CC\u0644\u0648\u0644",
"\u062A\u0634\u0631\u06CC\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645",
"\u062A\u0634\u0631\u06CC\u0646\u06CC \u062F\u0648\u0648\u06D5\u0645",
"\u06A9\u0627\u0646\u0648\u0648\u0646\u06CC \u06CC\u06D5\u06A9\u06D5\u0645"]
};
var dayValues = {
narrow: ["\u06CC-\u0634", "\u062F-\u0634", "\u0633-\u0634", "\u0686-\u0634", "\u067E-\u0634", "\u0647\u06D5", "\u0634"],
short: ["\u06CC\u06D5-\u0634\u06D5", "\u062F\u0648\u0648-\u0634\u06D5", "\u0633\u06CE-\u0634\u06D5", "\u0686\u0648-\u0634\u06D5", "\u067E\u06CE-\u0634\u06D5", "\u0647\u06D5\u06CC", "\u0634\u06D5"],
abbreviated: [
"\u06CC\u06D5\u06A9-\u0634\u06D5\u0645",
"\u062F\u0648\u0648-\u0634\u06D5\u0645",
"\u0633\u06CE-\u0634\u06D5\u0645",
"\u0686\u0648\u0627\u0631-\u0634\u06D5\u0645",
"\u067E\u06CE\u0646\u062C-\u0634\u06D5\u0645",
"\u0647\u06D5\u06CC\u0646\u06CC",
"\u0634\u06D5\u0645\u06D5"],
wide: [
"\u06CC\u06D5\u06A9 \u0634\u06D5\u0645\u06D5",
"\u062F\u0648\u0648 \u0634\u06D5\u0645\u06D5",
"\u0633\u06CE \u0634\u06D5\u0645\u06D5",
"\u0686\u0648\u0627\u0631 \u0634\u06D5\u0645\u06D5",
"\u067E\u06CE\u0646\u062C \u0634\u06D5\u0645\u06D5",
"\u0647\u06D5\u06CC\u0646\u06CC",
"\u0634\u06D5\u0645\u06D5"]
};
var dayPeriodValues = {
narrow: {
am: "\u067E",
pm: "\u062F",
midnight: "\u0646-\u0634",
noon: "\u0646",
morning: "\u0628\u06D5\u06CC\u0627\u0646\u06CC",
afternoon: "\u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6",
evening: "\u0626\u06CE\u0648\u0627\u0631\u06D5",
night: "\u0634\u06D5\u0648"
},
abbreviated: {
am: "\u067E-\u0646",
pm: "\u062F-\u0646",
midnight: "\u0646\u06CC\u0648\u06D5 \u0634\u06D5\u0648",
noon: "\u0646\u06CC\u0648\u06D5\u0695\u06C6",
morning: "\u0628\u06D5\u06CC\u0627\u0646\u06CC",
afternoon: "\u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6",
evening: "\u0626\u06CE\u0648\u0627\u0631\u06D5",
night: "\u0634\u06D5\u0648"
},
wide: {
am: "\u067E\u06CE\u0634 \u0646\u06CC\u0648\u06D5\u0695\u06C6",
pm: "\u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6",
midnight: "\u0646\u06CC\u0648\u06D5 \u0634\u06D5\u0648",
noon: "\u0646\u06CC\u0648\u06D5\u0695\u06C6",
morning: "\u0628\u06D5\u06CC\u0627\u0646\u06CC",
afternoon: "\u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6",
evening: "\u0626\u06CE\u0648\u0627\u0631\u06D5",
night: "\u0634\u06D5\u0648"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u067E",
pm: "\u062F",
midnight: "\u0646-\u0634",
noon: "\u0646",
morning: "\u0644\u06D5 \u0628\u06D5\u06CC\u0627\u0646\u06CC\u062F\u0627",
afternoon: "\u0644\u06D5 \u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6\u062F\u0627",
evening: "\u0644\u06D5 \u0626\u06CE\u0648\u0627\u0631\u06D5\u062F\u0627",
night: "\u0644\u06D5 \u0634\u06D5\u0648\u062F\u0627"
},
abbreviated: {
am: "\u067E-\u0646",
pm: "\u062F-\u0646",
midnight: "\u0646\u06CC\u0648\u06D5 \u0634\u06D5\u0648",
noon: "\u0646\u06CC\u0648\u06D5\u0695\u06C6",
morning: "\u0644\u06D5 \u0628\u06D5\u06CC\u0627\u0646\u06CC\u062F\u0627",
afternoon: "\u0644\u06D5 \u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6\u062F\u0627",
evening: "\u0644\u06D5 \u0626\u06CE\u0648\u0627\u0631\u06D5\u062F\u0627",
night: "\u0644\u06D5 \u0634\u06D5\u0648\u062F\u0627"
},
wide: {
am: "\u067E\u06CE\u0634 \u0646\u06CC\u0648\u06D5\u0695\u06C6",
pm: "\u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6",
midnight: "\u0646\u06CC\u0648\u06D5 \u0634\u06D5\u0648",
noon: "\u0646\u06CC\u0648\u06D5\u0695\u06C6",
morning: "\u0644\u06D5 \u0628\u06D5\u06CC\u0627\u0646\u06CC\u062F\u0627",
afternoon: "\u0644\u06D5 \u062F\u0648\u0627\u06CC \u0646\u06CC\u0648\u06D5\u0695\u06C6\u062F\u0627",
evening: "\u0644\u06D5 \u0626\u06CE\u0648\u0627\u0631\u06D5\u062F\u0627",
night: "\u0644\u06D5 \u0634\u06D5\u0648\u062F\u0627"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
return String(dirtyNumber);
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/ckb/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(پ|د)/i,
abbreviated: /^(پ-ز|د.ز)/i,
wide: /^(پێش زاین| دوای زاین)/i
};
var parseEraPatterns = {
any: [/^د/g, /^پ/g]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^م[1234]چ/i,
wide: /^(یەکەم|دووەم|سێیەم| چوارەم) (چارەگی)? quarter/i
};
var parseQuarterPatterns = {
wide: [/چارەگی یەکەم/, /چارەگی دووەم/, /چارەگی سيیەم/, /چارەگی چوارەم/],
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^(ک-د|ش|ئا|ن|م|ح|ت|ئە|تش-ی|تش-د|ک-ی)/i,
abbreviated: /^(کان-دوو|شوب|ئاد|نیس|مایس|حوز|تەم|ئاب|ئەل|تش-یەک|تش-دوو|کان-یەک)/i,
wide: /^(کانوونی دووەم|شوبات|ئادار|نیسان|مایس|حوزەیران|تەمموز|ئاب|ئەیلول|تشرینی یەکەم|تشرینی دووەم|کانوونی یەکەم)/i
};
var parseMonthPatterns = {
narrow: [
/^ک-د/i,
/^ش/i,
/^ئا/i,
/^ن/i,
/^م/i,
/^ح/i,
/^ت/i,
/^ئا/i,
/^ئە/i,
/^تش-ی/i,
/^تش-د/i,
/^ک-ی/i],
any: [
/^کان-دوو/i,
/^شوب/i,
/^ئاد/i,
/^نیس/i,
/^مایس/i,
/^حوز/i,
/^تەم/i,
/^ئاب/i,
/^ئەل/i,
/^تش-یەک/i,
/^تش-دوو/i,
/^|کان-یەک/i]
};
var matchDayPatterns = {
narrow: /^(ش|ی|د|س|چ|پ|هە)/i,
short: /^(یە-شە|دوو-شە|سێ-شە|چو-شە|پێ-شە|هە|شە)/i,
abbreviated: /^(یەک-شەم|دوو-شەم|سێ-شەم|چوار-شەم|پێنخ-شەم|هەینی|شەمە)/i,
wide: /^(یەک شەمە|دوو شەمە|سێ شەمە|چوار شەمە|پێنج شەمە|هەینی|شەمە)/i
};
var parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
};
var matchDayPeriodPatterns = {
narrow: /^(پ|د|ن-ش|ن| (بەیانی|دوای نیوەڕۆ|ئێوارە|شەو))/i,
abbreviated: /^(پ-ن|د-ن|نیوە شەو|نیوەڕۆ|بەیانی|دوای نیوەڕۆ|ئێوارە|شەو)/,
wide: /^(پێش نیوەڕۆ|دوای نیوەڕۆ|نیوەڕۆ|نیوە شەو|لەبەیانیدا|لەدواینیوەڕۆدا|لە ئێوارەدا|لە شەودا)/,
any: /^(پ|د|بەیانی|نیوەڕۆ|ئێوارە|شەو)/
};
var parseDayPeriodPatterns = {
any: {
am: /^د/i,
pm: /^پ/i,
midnight: /^ن-ش/i,
noon: /^ن/i,
morning: /بەیانی/i,
afternoon: /دواینیوەڕۆ/i,
evening: /ئێوارە/i,
night: /شەو/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ckb.js
var ckb = {
code: "ckb",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/ckb/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
ckb: ckb }) });
//# debugId=74427E9D47BF4BB164756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,102 @@
'use strict';
const assert = require('assert');
const { randomFillSync } = require('crypto');
const { inspect } = require('util');
const busboy = require('..');
const { mustCall } = require('./common.js');
const BOUNDARY = 'u2KxIV5yF1y+xUspOQCCZopaVgeV6Jxihv35XQJmuTx8X3sh';
function formDataSection(key, value) {
return Buffer.from(
`\r\n--${BOUNDARY}`
+ `\r\nContent-Disposition: form-data; name="${key}"`
+ `\r\n\r\n${value}`
);
}
function formDataFile(key, filename, contentType) {
const buf = Buffer.allocUnsafe(100000);
return Buffer.concat([
Buffer.from(`\r\n--${BOUNDARY}\r\n`),
Buffer.from(`Content-Disposition: form-data; name="${key}"`
+ `; filename="${filename}"\r\n`),
Buffer.from(`Content-Type: ${contentType}\r\n\r\n`),
randomFillSync(buf)
]);
}
const reqChunks = [
Buffer.concat([
formDataFile('file', 'file.bin', 'application/octet-stream'),
formDataSection('foo', 'foo value'),
]),
formDataSection('bar', 'bar value'),
Buffer.from(`\r\n--${BOUNDARY}--\r\n`)
];
const bb = busboy({
headers: {
'content-type': `multipart/form-data; boundary=${BOUNDARY}`
}
});
const expected = [
{ type: 'file',
name: 'file',
info: {
filename: 'file.bin',
encoding: '7bit',
mimeType: 'application/octet-stream',
},
},
{ type: 'field',
name: 'foo',
val: 'foo value',
info: {
nameTruncated: false,
valueTruncated: false,
encoding: '7bit',
mimeType: 'text/plain',
},
},
{ type: 'field',
name: 'bar',
val: 'bar value',
info: {
nameTruncated: false,
valueTruncated: false,
encoding: '7bit',
mimeType: 'text/plain',
},
},
];
const results = [];
bb.on('field', (name, val, info) => {
results.push({ type: 'field', name, val, info });
});
bb.on('file', (name, stream, info) => {
results.push({ type: 'file', name, info });
// Simulate a pipe where the destination is pausing (perhaps due to waiting
// for file system write to finish)
setTimeout(() => {
stream.resume();
}, 10);
});
bb.on('close', mustCall(() => {
assert.deepStrictEqual(
results,
expected,
'Results mismatch.\n'
+ `Parsed: ${inspect(results)}\n`
+ `Expected: ${inspect(expected)}`
);
}));
for (const chunk of reqChunks)
bb.write(chunk);
bb.end();

View File

@@ -0,0 +1,91 @@
(function (Prism) {
var keywords = /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;
Prism.languages.maxscript = {
'comment': {
pattern: /\/\*[\s\S]*?(?:\*\/|$)|--.*/,
greedy: true
},
'string': {
pattern: /(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,
lookbehind: true,
greedy: true
},
'path': {
pattern: /\$(?:[\w/\\.*?]|'[^']*')*/,
greedy: true,
alias: 'string'
},
'function-call': {
pattern: RegExp(
'((?:' + (
// start of line
/^/.source +
'|' +
// operators and other language constructs
/[;=<>+\-*/^({\[]/.source +
'|' +
// keywords as part of statements
/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source
) + ')[ \t]*)' +
'(?!' + keywords.source + ')' + /[a-z_]\w*\b/.source +
'(?=[ \t]*(?:' + (
// variable
'(?!' + keywords.source + ')' + /[a-z_]/.source +
'|' +
// number
/\d|-\.?\d/.source +
'|' +
// other expressions or literals
/[({'"$@#?]/.source
) + '))',
'im'
),
lookbehind: true,
greedy: true,
alias: 'function'
},
'function-definition': {
pattern: /(\b(?:fn|function)\s+)\w+\b/i,
lookbehind: true,
alias: 'function'
},
'argument': {
pattern: /\b[a-z_]\w*(?=:)/i,
alias: 'attr-name'
},
'keyword': keywords,
'boolean': /\b(?:false|true)\b/,
'time': {
pattern: /(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,
lookbehind: true,
alias: 'number'
},
'number': [
{
pattern: /(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,
lookbehind: true
},
/\b(?:e|pi)\b/
],
'constant': /\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,
'color': {
pattern: /\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,
alias: 'constant'
},
'operator': /[-+*/<>=!]=?|[&^?]|#(?!\()/,
'punctuation': /[()\[\]{}.:,;]|#(?=\()|\\$/m
};
}(Prism));

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListStart = createLucideIcon("ListStart", [
["path", { d: "M16 12H3", key: "1a2rj7" }],
["path", { d: "M16 18H3", key: "12xzn7" }],
["path", { d: "M10 6H3", key: "lf8lx7" }],
["path", { d: "M21 18V8a2 2 0 0 0-2-2h-5", key: "1hghli" }],
["path", { d: "m16 8-2-2 2-2", key: "160uvd" }]
]);
export { ListStart as default };
//# sourceMappingURL=list-start.js.map

View File

@@ -0,0 +1,6 @@
var root = require('./_root');
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Popup/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAA;AAEvD,OAAO,KAAmD,MAAM,OAAO,CAAA;AAIvE,OAAO,cAAc,CAAA;AAuBrB,MAAM,MAAM,UAAU,GAAG;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAClD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAA;IAC1C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;IACpD,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACxC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAA;IACzD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnD;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CACjC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAgXtC,CAAA"}

View File

@@ -0,0 +1,245 @@
import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-f0de968e.browser.esm.js';
export { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-f0de968e.browser.esm.js';
import * as React from 'react';
import { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';
import { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';
import { serializeStyles } from '@emotion/serialize';
import '@emotion/cache';
import '@babel/runtime/helpers/extends';
import '@emotion/weak-memoize';
import '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';
import 'hoist-non-react-statics';
var jsx = function jsx(type, props) {
// eslint-disable-next-line prefer-rest-params
var args = arguments;
if (props == null || !hasOwn.call(props, 'css')) {
return React.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = Emotion;
createElementArgArray[1] = createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
}
return React.createElement.apply(null, createElementArgArray);
};
(function (_jsx) {
var JSX;
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
})(jsx || (jsx = {}));
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
var styles = props.styles;
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var sheetRef = React.useRef();
useInsertionEffectWithLayoutFallback(function () {
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
var sheet = new cache.sheet.constructor({
key: key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy
});
var rehydrating = false;
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
if (cache.sheet.tags.length) {
sheet.before = cache.sheet.tags[0];
}
if (node !== null) {
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
node.setAttribute('data-emotion', key);
sheet.hydrate([node]);
}
sheetRef.current = [sheet, rehydrating];
return function () {
sheet.flush();
};
}, [cache]);
useInsertionEffectWithLayoutFallback(function () {
var sheetRefCurrent = sheetRef.current;
var sheet = sheetRefCurrent[0],
rehydrating = sheetRefCurrent[1];
if (rehydrating) {
sheetRefCurrent[1] = false;
return;
}
if (serialized.next !== undefined) {
// insert keyframes
insertStyles(cache, serialized.next, true);
}
if (sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
sheet.before = element;
sheet.flush();
}
cache.insert("", serialized, sheet, false);
}, [cache, serialized.name]);
return null;
});
function css() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return serializeStyles(args);
}
function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name;
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
}
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serializedArr = _ref.serializedArr;
useInsertionEffectAlwaysWithSyncFallback(function () {
for (var i = 0; i < serializedArr.length; i++) {
insertStyles(cache, serializedArr[i], false);
}
});
return null;
};
var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
var hasRendered = false;
var serializedArr = [];
var css = function css() {
if (hasRendered && isDevelopment) {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serializeStyles(args, cache.registered);
serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
registerStyles(cache, serialized, false);
return cache.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && isDevelopment) {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(cache.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: React.useContext(ThemeContext)
};
var ele = props.children(content);
hasRendered = true;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
cache: cache,
serializedArr: serializedArr
}), ele);
});
export { ClassNames, Global, jsx as createElement, css, jsx, keyframes };

View File

@@ -0,0 +1,381 @@
{
"name": "jose",
"version": "5.9.6",
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
"keywords": [
"browser",
"bun",
"cloudflare",
"compact",
"decode",
"decrypt",
"deno",
"detached",
"ec",
"ecdsa",
"eddsa",
"edge",
"electron",
"embedded",
"encrypt",
"flattened",
"general",
"jose",
"json web token",
"jsonwebtoken",
"jwa",
"jwe",
"jwk",
"jwks",
"jws",
"jwt",
"jwt-decode",
"netlify",
"next",
"nextjs",
"oct",
"okp",
"payload",
"pem",
"pkcs8",
"rsa",
"secp256k1",
"sign",
"signature",
"spki",
"validate",
"vercel",
"verify",
"webcrypto",
"workerd",
"workers",
"x509"
],
"homepage": "https://github.com/panva/jose",
"repository": "panva/jose",
"funding": {
"url": "https://github.com/sponsors/panva"
},
"license": "MIT",
"author": "Filip Skokan <panva.ip@gmail.com>",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"bun": "./dist/browser/index.js",
"deno": "./dist/browser/index.js",
"browser": "./dist/browser/index.js",
"worker": "./dist/browser/index.js",
"workerd": "./dist/browser/index.js",
"import": "./dist/node/esm/index.js",
"require": "./dist/node/cjs/index.js"
},
"./jwk/embedded": {
"types": "./dist/types/jwk/embedded.d.ts",
"bun": "./dist/browser/jwk/embedded.js",
"deno": "./dist/browser/jwk/embedded.js",
"browser": "./dist/browser/jwk/embedded.js",
"worker": "./dist/browser/jwk/embedded.js",
"workerd": "./dist/browser/jwk/embedded.js",
"import": "./dist/node/esm/jwk/embedded.js",
"require": "./dist/node/cjs/jwk/embedded.js"
},
"./jwk/thumbprint": {
"types": "./dist/types/jwk/thumbprint.d.ts",
"bun": "./dist/browser/jwk/thumbprint.js",
"deno": "./dist/browser/jwk/thumbprint.js",
"browser": "./dist/browser/jwk/thumbprint.js",
"worker": "./dist/browser/jwk/thumbprint.js",
"workerd": "./dist/browser/jwk/thumbprint.js",
"import": "./dist/node/esm/jwk/thumbprint.js",
"require": "./dist/node/cjs/jwk/thumbprint.js"
},
"./key/import": {
"types": "./dist/types/key/import.d.ts",
"bun": "./dist/browser/key/import.js",
"deno": "./dist/browser/key/import.js",
"browser": "./dist/browser/key/import.js",
"worker": "./dist/browser/key/import.js",
"workerd": "./dist/browser/key/import.js",
"import": "./dist/node/esm/key/import.js",
"require": "./dist/node/cjs/key/import.js"
},
"./key/export": {
"types": "./dist/types/key/export.d.ts",
"bun": "./dist/browser/key/export.js",
"deno": "./dist/browser/key/export.js",
"browser": "./dist/browser/key/export.js",
"worker": "./dist/browser/key/export.js",
"workerd": "./dist/browser/key/export.js",
"import": "./dist/node/esm/key/export.js",
"require": "./dist/node/cjs/key/export.js"
},
"./key/generate/keypair": {
"types": "./dist/types/key/generate_key_pair.d.ts",
"bun": "./dist/browser/key/generate_key_pair.js",
"deno": "./dist/browser/key/generate_key_pair.js",
"browser": "./dist/browser/key/generate_key_pair.js",
"worker": "./dist/browser/key/generate_key_pair.js",
"workerd": "./dist/browser/key/generate_key_pair.js",
"import": "./dist/node/esm/key/generate_key_pair.js",
"require": "./dist/node/cjs/key/generate_key_pair.js"
},
"./key/generate/secret": {
"types": "./dist/types/key/generate_secret.d.ts",
"bun": "./dist/browser/key/generate_secret.js",
"deno": "./dist/browser/key/generate_secret.js",
"browser": "./dist/browser/key/generate_secret.js",
"worker": "./dist/browser/key/generate_secret.js",
"workerd": "./dist/browser/key/generate_secret.js",
"import": "./dist/node/esm/key/generate_secret.js",
"require": "./dist/node/cjs/key/generate_secret.js"
},
"./jwks/remote": {
"types": "./dist/types/jwks/remote.d.ts",
"bun": "./dist/browser/jwks/remote.js",
"deno": "./dist/browser/jwks/remote.js",
"browser": "./dist/browser/jwks/remote.js",
"worker": "./dist/browser/jwks/remote.js",
"workerd": "./dist/browser/jwks/remote.js",
"import": "./dist/node/esm/jwks/remote.js",
"require": "./dist/node/cjs/jwks/remote.js"
},
"./jwks/local": {
"types": "./dist/types/jwks/local.d.ts",
"bun": "./dist/browser/jwks/local.js",
"deno": "./dist/browser/jwks/local.js",
"browser": "./dist/browser/jwks/local.js",
"worker": "./dist/browser/jwks/local.js",
"workerd": "./dist/browser/jwks/local.js",
"import": "./dist/node/esm/jwks/local.js",
"require": "./dist/node/cjs/jwks/local.js"
},
"./jwt/sign": {
"types": "./dist/types/jwt/sign.d.ts",
"bun": "./dist/browser/jwt/sign.js",
"deno": "./dist/browser/jwt/sign.js",
"browser": "./dist/browser/jwt/sign.js",
"worker": "./dist/browser/jwt/sign.js",
"workerd": "./dist/browser/jwt/sign.js",
"import": "./dist/node/esm/jwt/sign.js",
"require": "./dist/node/cjs/jwt/sign.js"
},
"./jwt/verify": {
"types": "./dist/types/jwt/verify.d.ts",
"bun": "./dist/browser/jwt/verify.js",
"deno": "./dist/browser/jwt/verify.js",
"browser": "./dist/browser/jwt/verify.js",
"worker": "./dist/browser/jwt/verify.js",
"workerd": "./dist/browser/jwt/verify.js",
"import": "./dist/node/esm/jwt/verify.js",
"require": "./dist/node/cjs/jwt/verify.js"
},
"./jwt/encrypt": {
"types": "./dist/types/jwt/encrypt.d.ts",
"bun": "./dist/browser/jwt/encrypt.js",
"deno": "./dist/browser/jwt/encrypt.js",
"browser": "./dist/browser/jwt/encrypt.js",
"worker": "./dist/browser/jwt/encrypt.js",
"workerd": "./dist/browser/jwt/encrypt.js",
"import": "./dist/node/esm/jwt/encrypt.js",
"require": "./dist/node/cjs/jwt/encrypt.js"
},
"./jwt/decrypt": {
"types": "./dist/types/jwt/decrypt.d.ts",
"bun": "./dist/browser/jwt/decrypt.js",
"deno": "./dist/browser/jwt/decrypt.js",
"browser": "./dist/browser/jwt/decrypt.js",
"worker": "./dist/browser/jwt/decrypt.js",
"workerd": "./dist/browser/jwt/decrypt.js",
"import": "./dist/node/esm/jwt/decrypt.js",
"require": "./dist/node/cjs/jwt/decrypt.js"
},
"./jwt/unsecured": {
"types": "./dist/types/jwt/unsecured.d.ts",
"bun": "./dist/browser/jwt/unsecured.js",
"deno": "./dist/browser/jwt/unsecured.js",
"browser": "./dist/browser/jwt/unsecured.js",
"worker": "./dist/browser/jwt/unsecured.js",
"workerd": "./dist/browser/jwt/unsecured.js",
"import": "./dist/node/esm/jwt/unsecured.js",
"require": "./dist/node/cjs/jwt/unsecured.js"
},
"./jwt/decode": {
"types": "./dist/types/util/decode_jwt.d.ts",
"bun": "./dist/browser/util/decode_jwt.js",
"deno": "./dist/browser/util/decode_jwt.js",
"browser": "./dist/browser/util/decode_jwt.js",
"worker": "./dist/browser/util/decode_jwt.js",
"workerd": "./dist/browser/util/decode_jwt.js",
"import": "./dist/node/esm/util/decode_jwt.js",
"require": "./dist/node/cjs/util/decode_jwt.js"
},
"./decode/protected_header": {
"types": "./dist/types/util/decode_protected_header.d.ts",
"bun": "./dist/browser/util/decode_protected_header.js",
"deno": "./dist/browser/util/decode_protected_header.js",
"browser": "./dist/browser/util/decode_protected_header.js",
"worker": "./dist/browser/util/decode_protected_header.js",
"workerd": "./dist/browser/util/decode_protected_header.js",
"import": "./dist/node/esm/util/decode_protected_header.js",
"require": "./dist/node/cjs/util/decode_protected_header.js"
},
"./jws/compact/sign": {
"types": "./dist/types/jws/compact/sign.d.ts",
"bun": "./dist/browser/jws/compact/sign.js",
"deno": "./dist/browser/jws/compact/sign.js",
"browser": "./dist/browser/jws/compact/sign.js",
"worker": "./dist/browser/jws/compact/sign.js",
"workerd": "./dist/browser/jws/compact/sign.js",
"import": "./dist/node/esm/jws/compact/sign.js",
"require": "./dist/node/cjs/jws/compact/sign.js"
},
"./jws/compact/verify": {
"types": "./dist/types/jws/compact/verify.d.ts",
"bun": "./dist/browser/jws/compact/verify.js",
"deno": "./dist/browser/jws/compact/verify.js",
"browser": "./dist/browser/jws/compact/verify.js",
"worker": "./dist/browser/jws/compact/verify.js",
"workerd": "./dist/browser/jws/compact/verify.js",
"import": "./dist/node/esm/jws/compact/verify.js",
"require": "./dist/node/cjs/jws/compact/verify.js"
},
"./jws/flattened/sign": {
"types": "./dist/types/jws/flattened/sign.d.ts",
"bun": "./dist/browser/jws/flattened/sign.js",
"deno": "./dist/browser/jws/flattened/sign.js",
"browser": "./dist/browser/jws/flattened/sign.js",
"worker": "./dist/browser/jws/flattened/sign.js",
"workerd": "./dist/browser/jws/flattened/sign.js",
"import": "./dist/node/esm/jws/flattened/sign.js",
"require": "./dist/node/cjs/jws/flattened/sign.js"
},
"./jws/flattened/verify": {
"types": "./dist/types/jws/flattened/verify.d.ts",
"bun": "./dist/browser/jws/flattened/verify.js",
"deno": "./dist/browser/jws/flattened/verify.js",
"browser": "./dist/browser/jws/flattened/verify.js",
"worker": "./dist/browser/jws/flattened/verify.js",
"workerd": "./dist/browser/jws/flattened/verify.js",
"import": "./dist/node/esm/jws/flattened/verify.js",
"require": "./dist/node/cjs/jws/flattened/verify.js"
},
"./jws/general/sign": {
"types": "./dist/types/jws/general/sign.d.ts",
"bun": "./dist/browser/jws/general/sign.js",
"deno": "./dist/browser/jws/general/sign.js",
"browser": "./dist/browser/jws/general/sign.js",
"worker": "./dist/browser/jws/general/sign.js",
"workerd": "./dist/browser/jws/general/sign.js",
"import": "./dist/node/esm/jws/general/sign.js",
"require": "./dist/node/cjs/jws/general/sign.js"
},
"./jws/general/verify": {
"types": "./dist/types/jws/general/verify.d.ts",
"bun": "./dist/browser/jws/general/verify.js",
"deno": "./dist/browser/jws/general/verify.js",
"browser": "./dist/browser/jws/general/verify.js",
"worker": "./dist/browser/jws/general/verify.js",
"workerd": "./dist/browser/jws/general/verify.js",
"import": "./dist/node/esm/jws/general/verify.js",
"require": "./dist/node/cjs/jws/general/verify.js"
},
"./jwe/compact/encrypt": {
"types": "./dist/types/jwe/compact/encrypt.d.ts",
"bun": "./dist/browser/jwe/compact/encrypt.js",
"deno": "./dist/browser/jwe/compact/encrypt.js",
"browser": "./dist/browser/jwe/compact/encrypt.js",
"worker": "./dist/browser/jwe/compact/encrypt.js",
"workerd": "./dist/browser/jwe/compact/encrypt.js",
"import": "./dist/node/esm/jwe/compact/encrypt.js",
"require": "./dist/node/cjs/jwe/compact/encrypt.js"
},
"./jwe/compact/decrypt": {
"types": "./dist/types/jwe/compact/decrypt.d.ts",
"bun": "./dist/browser/jwe/compact/decrypt.js",
"deno": "./dist/browser/jwe/compact/decrypt.js",
"browser": "./dist/browser/jwe/compact/decrypt.js",
"worker": "./dist/browser/jwe/compact/decrypt.js",
"workerd": "./dist/browser/jwe/compact/decrypt.js",
"import": "./dist/node/esm/jwe/compact/decrypt.js",
"require": "./dist/node/cjs/jwe/compact/decrypt.js"
},
"./jwe/flattened/encrypt": {
"types": "./dist/types/jwe/flattened/encrypt.d.ts",
"bun": "./dist/browser/jwe/flattened/encrypt.js",
"deno": "./dist/browser/jwe/flattened/encrypt.js",
"browser": "./dist/browser/jwe/flattened/encrypt.js",
"worker": "./dist/browser/jwe/flattened/encrypt.js",
"workerd": "./dist/browser/jwe/flattened/encrypt.js",
"import": "./dist/node/esm/jwe/flattened/encrypt.js",
"require": "./dist/node/cjs/jwe/flattened/encrypt.js"
},
"./jwe/flattened/decrypt": {
"types": "./dist/types/jwe/flattened/decrypt.d.ts",
"bun": "./dist/browser/jwe/flattened/decrypt.js",
"deno": "./dist/browser/jwe/flattened/decrypt.js",
"browser": "./dist/browser/jwe/flattened/decrypt.js",
"worker": "./dist/browser/jwe/flattened/decrypt.js",
"workerd": "./dist/browser/jwe/flattened/decrypt.js",
"import": "./dist/node/esm/jwe/flattened/decrypt.js",
"require": "./dist/node/cjs/jwe/flattened/decrypt.js"
},
"./jwe/general/encrypt": {
"types": "./dist/types/jwe/general/encrypt.d.ts",
"bun": "./dist/browser/jwe/general/encrypt.js",
"deno": "./dist/browser/jwe/general/encrypt.js",
"browser": "./dist/browser/jwe/general/encrypt.js",
"worker": "./dist/browser/jwe/general/encrypt.js",
"workerd": "./dist/browser/jwe/general/encrypt.js",
"import": "./dist/node/esm/jwe/general/encrypt.js",
"require": "./dist/node/cjs/jwe/general/encrypt.js"
},
"./jwe/general/decrypt": {
"types": "./dist/types/jwe/general/decrypt.d.ts",
"bun": "./dist/browser/jwe/general/decrypt.js",
"deno": "./dist/browser/jwe/general/decrypt.js",
"browser": "./dist/browser/jwe/general/decrypt.js",
"worker": "./dist/browser/jwe/general/decrypt.js",
"workerd": "./dist/browser/jwe/general/decrypt.js",
"import": "./dist/node/esm/jwe/general/decrypt.js",
"require": "./dist/node/cjs/jwe/general/decrypt.js"
},
"./errors": {
"types": "./dist/types/util/errors.d.ts",
"bun": "./dist/browser/util/errors.js",
"deno": "./dist/browser/util/errors.js",
"browser": "./dist/browser/util/errors.js",
"worker": "./dist/browser/util/errors.js",
"workerd": "./dist/browser/util/errors.js",
"import": "./dist/node/esm/util/errors.js",
"require": "./dist/node/cjs/util/errors.js"
},
"./base64url": {
"types": "./dist/types/util/base64url.d.ts",
"bun": "./dist/browser/util/base64url.js",
"deno": "./dist/browser/util/base64url.js",
"browser": "./dist/browser/util/base64url.js",
"worker": "./dist/browser/util/base64url.js",
"workerd": "./dist/browser/util/base64url.js",
"import": "./dist/node/esm/util/base64url.js",
"require": "./dist/node/cjs/util/base64url.js"
},
"./package.json": "./package.json"
},
"main": "./dist/node/cjs/index.js",
"browser": "./dist/browser/index.js",
"types": "./dist/types/index.d.ts",
"files": [
"dist/**/package.json",
"dist/**/*.js",
"dist/types/**/*.d.ts",
"!dist/**/*.bundle.js",
"!dist/**/*.umd.js",
"!dist/**/*.min.js",
"!dist/node/webcrypto/**/*",
"!dist/types/runtime/*",
"!dist/types/lib/*",
"!dist/deno/**/*"
],
"deno": "./dist/browser/index.js"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getPreferences.js","names":["cache","getPreferences","key","payload","userID","userSlug","result","find","collection","depth","limit","pagination","where","and","equals","then","res","docs"],"sources":["../../src/utilities/getPreferences.ts"],"sourcesContent":["import type { DefaultDocumentIDType, Payload } from 'payload'\n\nimport { cache } from 'react'\n\nexport const getPreferences = cache(\n async <T>(\n key: string,\n payload: Payload,\n userID: DefaultDocumentIDType,\n userSlug: string,\n ): Promise<{ id: DefaultDocumentIDType; value: T }> => {\n const result = (await payload\n .find({\n collection: 'payload-preferences',\n depth: 0,\n limit: 1,\n pagination: false,\n where: {\n and: [\n {\n key: {\n equals: key,\n },\n },\n {\n 'user.relationTo': {\n equals: userSlug,\n },\n },\n {\n 'user.value': {\n equals: userID,\n },\n },\n ],\n },\n })\n .then((res) => res.docs?.[0])) as { id: DefaultDocumentIDType; value: T }\n\n return result\n },\n)\n"],"mappings":"AAEA,SAASA,KAAK,QAAQ;AAEtB,OAAO,MAAMC,cAAA,GAAiBD,KAAA,CAC5B,OACEE,GAAA,EACAC,OAAA,EACAC,MAAA,EACAC,QAAA;EAEA,MAAMC,MAAA,GAAU,MAAMH,OAAA,CACnBI,IAAI,CAAC;IACJC,UAAA,EAAY;IACZC,KAAA,EAAO;IACPC,KAAA,EAAO;IACPC,UAAA,EAAY;IACZC,KAAA,EAAO;MACLC,GAAA,EAAK,CACH;QACEX,GAAA,EAAK;UACHY,MAAA,EAAQZ;QACV;MACF,GACA;QACE,mBAAmB;UACjBY,MAAA,EAAQT;QACV;MACF,GACA;QACE,cAAc;UACZS,MAAA,EAAQV;QACV;MACF;IAEJ;EACF,GACCW,IAAI,CAAEC,GAAA,IAAQA,GAAA,CAAIC,IAAI,GAAG,EAAE;EAE9B,OAAOX,MAAA;AACT","ignoreList":[]}

View File

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

View File

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

View File

@@ -0,0 +1,531 @@
import { AlignedPlacement } from '@floating-ui/utils';
import { Alignment } from '@floating-ui/utils';
import { Axis } from '@floating-ui/utils';
import { ClientRectObject } from '@floating-ui/utils';
import { Coords } from '@floating-ui/utils';
import { Dimensions } from '@floating-ui/utils';
import { ElementRects } from '@floating-ui/utils';
import { Length } from '@floating-ui/utils';
import { Padding } from '@floating-ui/utils';
import { Placement } from '@floating-ui/utils';
import { Rect } from '@floating-ui/utils';
import { rectToClientRect } from '@floating-ui/utils';
import { Side } from '@floating-ui/utils';
import { SideObject } from '@floating-ui/utils';
import { Strategy } from '@floating-ui/utils';
import { VirtualElement } from '@floating-ui/utils';
export { AlignedPlacement }
export { Alignment }
/**
* Provides data to position an inner element of the floating element so that it
* appears centered to the reference element.
* @see https://floating-ui.com/docs/arrow
*/
export declare const arrow: (options: ArrowOptions | Derivable<ArrowOptions>) => Middleware;
export declare interface ArrowOptions {
/**
* The arrow element to be positioned.
* @default undefined
*/
element: any;
/**
* The padding between the arrow element and the floating element edges.
* Useful when the floating element has rounded corners.
* @default 0
*/
padding?: Padding;
}
/**
* Optimizes the visibility of the floating element by choosing the placement
* that has the most space available automatically, without needing to specify a
* preferred placement. Alternative to `flip`.
* @see https://floating-ui.com/docs/autoPlacement
*/
export declare const autoPlacement: (options?: AutoPlacementOptions | Derivable<AutoPlacementOptions>) => Middleware;
export declare interface AutoPlacementOptions extends DetectOverflowOptions {
/**
* The axis that runs along the alignment of the floating element. Determines
* whether to check for most space along this axis.
* @default false
*/
crossAxis?: boolean;
/**
* Choose placements with a particular alignment.
* @default undefined
*/
alignment?: Alignment | null;
/**
* Whether to choose placements with the opposite alignment if the preferred
* alignment does not fit.
* @default true
*/
autoAlignment?: boolean;
/**
* Which placements are allowed to be chosen. Placements must be within the
* `alignment` option if explicitly set.
* @default allPlacements (variable)
*/
allowedPlacements?: Array<Placement>;
}
export { Axis }
export declare type Boundary = any;
export { ClientRectObject }
export declare type ComputePosition = (reference: unknown, floating: unknown, config: ComputePositionConfig) => Promise<ComputePositionReturn>;
/**
* Computes the `x` and `y` coordinates that will place the floating element
* next to a given reference element.
*
* This export does not have any `platform` interface logic. You will need to
* write one for the platform you are using Floating UI with.
*/
export declare const computePosition: ComputePosition;
export declare interface ComputePositionConfig {
/**
* Object to interface with the current platform.
*/
platform: Platform;
/**
* Where to place the floating element relative to the reference element.
*/
placement?: Placement;
/**
* The strategy to use when positioning the floating element.
*/
strategy?: Strategy;
/**
* Array of middleware objects to modify the positioning or provide data for
* rendering.
*/
middleware?: Array<Middleware | null | undefined | false>;
}
export declare interface ComputePositionReturn extends Coords {
/**
* The final chosen placement of the floating element.
*/
placement: Placement;
/**
* The strategy used to position the floating element.
*/
strategy: Strategy;
/**
* Object containing data returned from all middleware, keyed by their name.
*/
middlewareData: MiddlewareData;
}
export { Coords }
/**
* Function option to derive middleware options from state.
*/
export declare type Derivable<T> = (state: MiddlewareState) => T;
/**
* Resolves with an object of overflow side offsets that determine how much the
* element is overflowing a given clipping boundary on each side.
* - positive = overflowing the boundary by that number of pixels
* - negative = how many pixels left before it will overflow
* - 0 = lies flush with the boundary
* @see https://floating-ui.com/docs/detectOverflow
*/
export declare function detectOverflow(state: MiddlewareState, options?: DetectOverflowOptions | Derivable<DetectOverflowOptions>): Promise<SideObject>;
export declare interface DetectOverflowOptions {
/**
* The clipping element(s) or area in which overflow will be checked.
* @default 'clippingAncestors'
*/
boundary?: Boundary;
/**
* The root clipping area in which overflow will be checked.
* @default 'viewport'
*/
rootBoundary?: RootBoundary;
/**
* The element in which overflow is being checked relative to a boundary.
* @default 'floating'
*/
elementContext?: ElementContext;
/**
* Whether to check for overflow using the alternate element's boundary
* (`clippingAncestors` boundary only).
* @default false
*/
altBoundary?: boolean;
/**
* Virtual padding for the resolved overflow detection offsets.
* @default 0
*/
padding?: Padding;
}
export { Dimensions }
export declare type ElementContext = 'reference' | 'floating';
export { ElementRects }
export declare interface Elements {
reference: ReferenceElement;
floating: FloatingElement;
}
/**
* Optimizes the visibility of the floating element by flipping the `placement`
* in order to keep it in view when the preferred placement(s) will overflow the
* clipping boundary. Alternative to `autoPlacement`.
* @see https://floating-ui.com/docs/flip
*/
export declare const flip: (options?: FlipOptions | Derivable<FlipOptions>) => Middleware;
export declare interface FlipOptions extends DetectOverflowOptions {
/**
* The axis that runs along the side of the floating element. Determines
* whether overflow along this axis is checked to perform a flip.
* @default true
*/
mainAxis?: boolean;
/**
* The axis that runs along the alignment of the floating element. Determines
* whether overflow along this axis is checked to perform a flip.
* - `true`: Whether to check cross axis overflow for both side and alignment flipping.
* - `false`: Whether to disable all cross axis overflow checking.
* - `'alignment'`: Whether to check cross axis overflow for alignment flipping only.
* @default true
*/
crossAxis?: boolean | 'alignment';
/**
* Placements to try sequentially if the preferred `placement` does not fit.
* @default [oppositePlacement] (computed)
*/
fallbackPlacements?: Array<Placement>;
/**
* What strategy to use when no placements fit.
* @default 'bestFit'
*/
fallbackStrategy?: 'bestFit' | 'initialPlacement';
/**
* Whether to allow fallback to the perpendicular axis of the preferred
* placement, and if so, which side direction along the axis to prefer.
* @default 'none' (disallow fallback)
*/
fallbackAxisSideDirection?: 'none' | 'start' | 'end';
/**
* Whether to flip to placements with the opposite alignment if they fit
* better.
* @default true
*/
flipAlignment?: boolean;
}
export declare type FloatingElement = any;
/**
* Provides data to hide the floating element in applicable situations, such as
* when it is not in the same clipping context as the reference element.
* @see https://floating-ui.com/docs/hide
*/
export declare const hide: (options?: HideOptions | Derivable<HideOptions>) => Middleware;
export declare interface HideOptions extends DetectOverflowOptions {
/**
* The strategy used to determine when to hide the floating element.
*/
strategy?: 'referenceHidden' | 'escaped';
}
/**
* Provides improved positioning for inline reference elements that can span
* over multiple lines, such as hyperlinks or range selections.
* @see https://floating-ui.com/docs/inline
*/
export declare const inline: (options?: InlineOptions | Derivable<InlineOptions>) => Middleware;
export declare interface InlineOptions {
/**
* Viewport-relative `x` coordinate to choose a `ClientRect`.
* @default undefined
*/
x?: number;
/**
* Viewport-relative `y` coordinate to choose a `ClientRect`.
* @default undefined
*/
y?: number;
/**
* Represents the padding around a disjoined rect when choosing it.
* @default 2
*/
padding?: Padding;
}
export { Length }
/**
* Built-in `limiter` that will stop `shift()` at a certain point.
*/
export declare const limitShift: (options?: LimitShiftOptions | Derivable<LimitShiftOptions>) => {
options: any;
fn: (state: MiddlewareState) => Coords;
};
declare type LimitShiftOffset = number | {
/**
* Offset the limiting of the axis that runs along the alignment of the
* floating element.
*/
mainAxis?: number;
/**
* Offset the limiting of the axis that runs along the side of the
* floating element.
*/
crossAxis?: number;
};
export declare interface LimitShiftOptions {
/**
* Offset when limiting starts. `0` will limit when the opposite edges of the
* reference and floating elements are aligned.
* - positive = start limiting earlier
* - negative = start limiting later
*/
offset?: LimitShiftOffset | Derivable<LimitShiftOffset>;
/**
* Whether to limit the axis that runs along the alignment of the floating
* element.
*/
mainAxis?: boolean;
/**
* Whether to limit the axis that runs along the side of the floating element.
*/
crossAxis?: boolean;
}
export declare type Middleware = {
name: string;
options?: any;
fn: (state: MiddlewareState) => Promisable<MiddlewareReturn>;
};
/**
* @deprecated use `MiddlewareState` instead.
*/
export declare type MiddlewareArguments = MiddlewareState;
export declare interface MiddlewareData {
[key: string]: any;
arrow?: Partial<Coords> & {
centerOffset: number;
alignmentOffset?: number;
};
autoPlacement?: {
index?: number;
overflows: Array<{
placement: Placement;
overflows: Array<number>;
}>;
};
flip?: {
index?: number;
overflows: Array<{
placement: Placement;
overflows: Array<number>;
}>;
};
hide?: {
referenceHidden?: boolean;
escaped?: boolean;
referenceHiddenOffsets?: SideObject;
escapedOffsets?: SideObject;
};
offset?: Coords & {
placement: Placement;
};
shift?: Coords & {
enabled: {
[key in Axis]: boolean;
};
};
}
export declare interface MiddlewareReturn extends Partial<Coords> {
data?: {
[key: string]: any;
};
reset?: boolean | {
placement?: Placement;
rects?: boolean | ElementRects;
};
}
export declare interface MiddlewareState extends Coords {
initialPlacement: Placement;
placement: Placement;
strategy: Strategy;
middlewareData: MiddlewareData;
elements: Elements;
rects: ElementRects;
platform: {
detectOverflow: typeof detectOverflow;
} & Platform;
}
/**
* Modifies the placement by translating the floating element along the
* specified axes.
* A number (shorthand for `mainAxis` or distance), or an axes configuration
* object may be passed.
* @see https://floating-ui.com/docs/offset
*/
export declare const offset: (options?: OffsetOptions) => Middleware;
export declare type OffsetOptions = OffsetValue | Derivable<OffsetValue>;
declare type OffsetValue = number | {
/**
* The axis that runs along the side of the floating element. Represents
* the distance (gutter or margin) between the reference and floating
* element.
* @default 0
*/
mainAxis?: number;
/**
* The axis that runs along the alignment of the floating element.
* Represents the skidding between the reference and floating element.
* @default 0
*/
crossAxis?: number;
/**
* The same axis as `crossAxis` but applies only to aligned placements
* and inverts the `end` alignment. When set to a number, it overrides the
* `crossAxis` value.
*
* A positive number will move the floating element in the direction of
* the opposite edge to the one that is aligned, while a negative number
* the reverse.
* @default null
*/
alignmentAxis?: number | null;
};
export { Padding }
export { Placement }
/**
* Platform interface methods to work with the current platform.
* @see https://floating-ui.com/docs/platform
*/
export declare interface Platform {
getElementRects: (args: {
reference: ReferenceElement;
floating: FloatingElement;
strategy: Strategy;
}) => Promisable<ElementRects>;
getClippingRect: (args: {
element: any;
boundary: Boundary;
rootBoundary: RootBoundary;
strategy: Strategy;
}) => Promisable<Rect>;
getDimensions: (element: any) => Promisable<Dimensions>;
convertOffsetParentRelativeRectToViewportRelativeRect?: (args: {
elements?: Elements;
rect: Rect;
offsetParent: any;
strategy: Strategy;
}) => Promisable<Rect>;
getOffsetParent?: (element: any) => Promisable<any>;
isElement?: (value: any) => Promisable<boolean>;
getDocumentElement?: (element: any) => Promisable<any>;
getClientRects?: (element: any) => Promisable<Array<ClientRectObject>>;
isRTL?: (element: any) => Promisable<boolean>;
getScale?: (element: any) => Promisable<{
x: number;
y: number;
}>;
detectOverflow?: typeof detectOverflow;
}
declare type Promisable<T> = T | Promise<T>;
export { Rect }
export { rectToClientRect }
export declare type ReferenceElement = any;
export declare type RootBoundary = 'viewport' | 'document' | Rect;
/**
* Optimizes the visibility of the floating element by shifting it in order to
* keep it in view when it will overflow the clipping boundary.
* @see https://floating-ui.com/docs/shift
*/
export declare const shift: (options?: ShiftOptions | Derivable<ShiftOptions>) => Middleware;
export declare interface ShiftOptions extends DetectOverflowOptions {
/**
* The axis that runs along the alignment of the floating element. Determines
* whether overflow along this axis is checked to perform shifting.
* @default true
*/
mainAxis?: boolean;
/**
* The axis that runs along the side of the floating element. Determines
* whether overflow along this axis is checked to perform shifting.
* @default false
*/
crossAxis?: boolean;
/**
* Accepts a function that limits the shifting done in order to prevent
* detachment.
*/
limiter?: {
fn: (state: MiddlewareState) => Coords;
options?: any;
};
}
export { Side }
export { SideObject }
/**
* Provides data that allows you to change the size of the floating element —
* for instance, prevent it from overflowing the clipping boundary or match the
* width of the reference element.
* @see https://floating-ui.com/docs/size
*/
export declare const size: (options?: SizeOptions | Derivable<SizeOptions>) => Middleware;
export declare interface SizeOptions extends DetectOverflowOptions {
/**
* Function that is called to perform style mutations to the floating element
* to change its size.
* @default undefined
*/
apply?(args: MiddlewareState & {
availableWidth: number;
availableHeight: number;
}): void | Promise<void>;
}
export { Strategy }
export { VirtualElement }
export { }

View File

@@ -0,0 +1,112 @@
/**
* The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation **SHOULD** use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns **SHOULD** document it.
*
* @example myDataSource
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const ATTR_DB_CLIENT_CONNECTION_POOL_NAME: "db.client.connection.pool.name";
/**
* The state of a connection in the pool
*
* @example idle
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const ATTR_DB_CLIENT_CONNECTION_STATE: "db.client.connection.state";
/**
* Deprecated, use `server.address`, `server.port` attributes instead.
*
* @example "Server=(localdb)\\v11.0;Integrated Security=true;"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` and `server.port`.
*/
export declare const ATTR_DB_CONNECTION_STRING: "db.connection_string";
/**
* Deprecated, use `db.namespace` instead.
*
* @example customers
* @example main
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.namespace`.
*/
export declare const ATTR_DB_NAME: "db.name";
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
export declare const ATTR_DB_STATEMENT: "db.statement";
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
export declare const ATTR_DB_SYSTEM: "db.system";
/**
* Deprecated, no replacement at this time.
*
* @example readonly_user
* @example reporting_user
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Removed, no replacement at this time.
*/
export declare const ATTR_DB_USER: "db.user";
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
export declare const ATTR_NET_PEER_NAME: "net.peer.name";
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
export declare const ATTR_NET_PEER_PORT: "net.peer.port";
/**
* Enum value "idle" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.
*/
export declare const DB_CLIENT_CONNECTION_STATE_VALUE_IDLE: "idle";
/**
* Enum value "used" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.
*/
export declare const DB_CLIENT_CONNECTION_STATE_VALUE_USED: "used";
/**
* Enum value "postgresql" for attribute {@link ATTR_DB_SYSTEM}.
*/
export declare const DB_SYSTEM_VALUE_POSTGRESQL: "postgresql";
/**
* The number of connections that are currently in state described by the `state` attribute
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const METRIC_DB_CLIENT_CONNECTION_COUNT: "db.client.connection.count";
/**
* The number of current pending requests for an open connection
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS: "db.client.connection.pending_requests";
//# sourceMappingURL=semconv.d.ts.map

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i;
exports.default = {
/**
* The order that this parser will run, in relation to other parsers.
*/
order: 400,
/**
* Whether to allow "empty" files (zero bytes).
*/
allowEmpty: true,
/**
* Determines whether this parser can parse a given file reference.
* Parsers that return true will be tried, in order, until one successfully parses the file.
* Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
* every parser will be tried.
*/
canParse(file) {
// Use this parser if the file is a Buffer, and has a known binary extension
return Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url);
},
/**
* Parses the given data as a Buffer (byte array).
*/
parse(file) {
if (Buffer.isBuffer(file.data)) {
return file.data;
}
else {
// This will reject if data is anything other than a string or typed array
return Buffer.from(file.data);
}
},
};

View File

@@ -0,0 +1,17 @@
import { RequestOptions, RequestTransformer, ResponseTransformer } from "../types/request.cjs";
//#region src/rest/types.d.ts
interface RestCommand<_Output extends object | unknown, _Schema> {
(): RequestOptions;
}
interface RestClient<Schema> {
request<Output>(options: RestCommand<Output, Schema>): Promise<Output>;
}
interface RestConfig {
credentials?: RequestCredentials;
onRequest?: RequestTransformer;
onResponse?: ResponseTransformer;
}
//#endregion
export { RestClient, RestCommand, RestConfig };
//# sourceMappingURL=types.d.cts.map

View File

@@ -0,0 +1 @@
Prism.languages.wiki=Prism.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:Prism.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),Prism.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:Prism.languages.markup.tag.inside}}}});

View File

@@ -0,0 +1,87 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Hook = require("./Hook");
const HookCodeFactory = require("./HookCodeFactory");
class AsyncParallelBailHookCodeFactory extends HookCodeFactory {
content({ onError, onResult, onDone }) {
let code = "";
code += `var _results = new Array(${this.options.taps.length});\n`;
code += "var _checkDone = function() {\n";
code += "for(var i = 0; i < _results.length; i++) {\n";
code += "var item = _results[i];\n";
code += "if(item === undefined) return false;\n";
code += "if(item.result !== undefined) {\n";
code += onResult("item.result");
code += "return true;\n";
code += "}\n";
code += "if(item.error) {\n";
code += onError("item.error");
code += "return true;\n";
code += "}\n";
code += "}\n";
code += "return false;\n";
code += "}\n";
code += this.callTapsParallel({
onError: (i, err, done, doneBreak) => {
let code = "";
code += `if(${i} < _results.length && ((_results.length = ${
i + 1
}), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`;
code += doneBreak(true);
code += "} else {\n";
code += done();
code += "}\n";
return code;
},
onResult: (i, result, done, doneBreak) => {
let code = "";
code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${
i + 1
}), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`;
code += doneBreak(true);
code += "} else {\n";
code += done();
code += "}\n";
return code;
},
onTap: (i, run, done, _doneBreak) => {
let code = "";
if (i > 0) {
code += `if(${i} >= _results.length) {\n`;
code += done();
code += "} else {\n";
}
code += run();
if (i > 0) code += "}\n";
return code;
},
onDone
});
return code;
}
}
const factory = new AsyncParallelBailHookCodeFactory();
function COMPILE(options) {
factory.setup(this, options);
return factory.create(options);
}
function AsyncParallelBailHook(args = [], name = undefined) {
const hook = new Hook(args, name);
hook.constructor = AsyncParallelBailHook;
hook.compile = COMPILE;
hook._call = undefined;
hook.call = undefined;
return hook;
}
AsyncParallelBailHook.prototype = null;
module.exports = AsyncParallelBailHook;

View File

@@ -0,0 +1 @@
import{usePathname as e}from"next/navigation";import{useMemo as r}from"react";import{useLocale as o}from"use-intl";import{hasPathnamePrefixed as t,unprefixPathname as i,getLocalePrefix as f,getLocaleAsPrefix as l}from"../../shared/utils.js";function n(n){const s=e(),a=o();return r((()=>{if(!s)return s;let e=s;const r=f(a,n.localePrefix);if(t(r,s))e=i(s,r);else if("never"!==n.localePrefix.mode&&n.localePrefix.prefixes){const r=l(a);t(r,s)&&(e=i(s,r))}return e}),[n.localePrefix,a,s])}export{n as default};

View File

@@ -0,0 +1 @@
module.exports={C:{"52":0.0263,"58":0.00526,"78":0.02104,"96":0.04207,"112":0.07889,"115":0.2051,"125":0.00526,"127":0.00526,"128":0.01052,"134":0.01052,"135":0.00526,"136":0.01052,"137":0.00526,"139":0.00526,"140":0.06837,"141":0.00526,"142":0.00526,"143":0.03155,"144":0.02104,"145":0.62056,"146":0.81515,"147":0.01052,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 120 121 122 123 124 126 129 130 131 132 133 138 148 149 3.5 3.6"},D:{"39":0.01052,"40":0.01052,"41":0.01052,"42":0.01052,"43":0.01052,"44":0.01052,"45":0.01052,"46":0.01052,"47":0.01052,"48":0.01052,"49":0.01052,"50":0.01052,"51":0.01052,"52":0.01052,"53":0.01052,"54":0.01052,"55":0.01052,"56":0.01052,"57":0.01052,"58":0.01052,"59":0.01052,"60":0.01052,"64":0.00526,"70":0.01052,"74":0.01052,"76":0.00526,"79":0.00526,"85":0.00526,"87":0.00526,"90":0.00526,"100":0.04733,"102":0.04207,"103":0.01052,"104":0.02104,"105":0.09992,"106":0.00526,"107":0.00526,"108":0.00526,"109":0.63634,"110":0.00526,"111":0.00526,"112":0.24717,"113":0.04733,"114":0.02104,"115":0.00526,"116":0.0263,"117":0.00526,"118":0.01052,"119":0.01052,"120":0.09992,"121":0.01052,"122":0.03681,"123":0.00526,"124":0.0263,"125":1.8091,"126":0.18407,"127":0.00526,"128":0.05785,"129":0.03155,"130":0.0894,"131":0.09992,"132":0.03155,"133":0.04207,"134":0.03681,"135":0.03681,"136":0.03681,"137":0.05785,"138":0.07889,"139":0.19458,"140":0.10518,"141":0.18407,"142":11.14908,"143":24.89085,"144":0.00526,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 65 66 67 68 69 71 72 73 75 77 78 80 81 83 84 86 88 89 91 92 93 94 95 96 97 98 99 101 145 146"},F:{"85":0.00526,"92":0.00526,"93":0.06837,"95":0.03155,"120":0.00526,"122":0.00526,"123":0.01578,"124":1.1412,"125":0.39443,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00526,"92":0.00526,"109":0.01578,"112":0.03681,"121":0.00526,"122":0.00526,"127":0.00526,"131":0.00526,"132":0.00526,"133":0.00526,"134":0.00526,"135":0.00526,"136":0.01052,"137":0.00526,"138":0.00526,"139":0.00526,"140":0.01578,"141":0.02104,"142":0.5522,"143":1.53563,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 113 114 115 116 117 118 119 120 123 124 125 126 128 129 130"},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 15.4 15.5 16.0 16.1 17.0 26.3","14.1":0.01052,"15.6":0.0263,"16.2":0.00526,"16.3":0.00526,"16.4":0.00526,"16.5":0.00526,"16.6":0.0263,"17.1":0.02104,"17.2":0.00526,"17.3":0.01052,"17.4":0.01052,"17.5":0.01052,"17.6":0.04207,"18.0":0.00526,"18.1":0.00526,"18.2":0.01052,"18.3":0.02104,"18.4":0.01578,"18.5-18.6":0.04207,"26.0":0.03155,"26.1":0.17881,"26.2":0.05259},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00203,"5.0-5.1":0,"6.0-6.1":0.00407,"7.0-7.1":0.00305,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00813,"10.0-10.2":0.00102,"10.3":0.01423,"11.0-11.2":0.17483,"11.3-11.4":0.00508,"12.0-12.1":0.00407,"12.2-12.5":0.04574,"13.0-13.1":0.00102,"13.2":0.00712,"13.3":0.00203,"13.4-13.7":0.00712,"14.0-14.4":0.01423,"14.5-14.8":0.01525,"15.0-15.1":0.01626,"15.2-15.3":0.0122,"15.4":0.01321,"15.5":0.01423,"15.6-15.8":0.22057,"16.0":0.02541,"16.1":0.04879,"16.2":0.02541,"16.3":0.04574,"16.4":0.01118,"16.5":0.01931,"16.6-16.7":0.28664,"17.0":0.01626,"17.1":0.02643,"17.2":0.01931,"17.3":0.02948,"17.4":0.04981,"17.5":0.09758,"17.6-17.7":0.22566,"18.0":0.05082,"18.1":0.10571,"18.2":0.05591,"18.3":0.18195,"18.4":0.09352,"18.5-18.7":6.7148,"26.0":0.13112,"26.1":1.09067,"26.2":0.20736,"26.3":0.00915},P:{"20":0.01036,"21":0.01036,"22":0.02073,"23":0.02073,"24":0.02073,"25":0.03109,"26":0.05182,"27":0.06219,"28":0.18657,"29":2.52901,_:"4 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 15.0 16.0 17.0","7.2-7.4":0.02073,"14.0":0.01036,"18.0":0.02073,"19.0":0.01036},I:{"0":0.03313,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},A:{"8":0.01352,"11":0.08114,_:"6 7 9 10 5.5"},K:{"0":0.32713,_:"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.01896},H:{"0":0},L:{"0":37.06604},R:{_:"0"},M:{"0":0.33187}};

View File

@@ -0,0 +1,41 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This function is like `composeArgs` except that the arguments composition
* is tailored for `_.partialRight`.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to append to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
module.exports = composeArgsRight;

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 ReceiptRussianRuble = createLucideIcon("ReceiptRussianRuble", [
[
"path",
{ d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z", key: "q3az6g" }
],
["path", { d: "M8 15h5", key: "vxg57a" }],
["path", { d: "M8 11h5a2 2 0 1 0 0-4h-3v10", key: "1usi5u" }]
]);
export { ReceiptRussianRuble as default };
//# sourceMappingURL=receipt-russian-ruble.js.map

View File

@@ -0,0 +1,131 @@
import { ono } from "@jsdevtools/ono";
import * as url from "../util/url.js";
import { ResolverError } from "../util/errors.js";
import type { FileInfo, HTTPResolverOptions, JSONSchema } from "../types/index.js";
export default {
/**
* The order that this resolver will run, in relation to other resolvers.
*/
order: 200,
/**
* HTTP headers to send when downloading files.
*
* @example:
* {
* "User-Agent": "JSON Schema $Ref Parser",
* Accept: "application/json"
* }
*/
headers: null,
/**
* HTTP request timeout (in milliseconds).
*/
timeout: 60_000, // 60 seconds
/**
* The maximum number of HTTP redirects to follow.
* To disable automatic following of redirects, set this to zero.
*/
redirects: 5,
/**
* The `withCredentials` option of XMLHttpRequest.
* Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication
*/
withCredentials: false,
/**
* Determines whether this resolver can read a given file reference.
* Resolvers that return true will be tried in order, until one successfully resolves the file.
* Resolvers that return false will not be given a chance to resolve the file.
*/
canRead(file: FileInfo) {
return url.isHttp(file.url);
},
/**
* Reads the given URL and returns its raw contents as a Buffer.
*/
read(file: FileInfo) {
const u = url.parse(file.url);
if (typeof window !== "undefined" && !u.protocol) {
// Use the protocol of the current page
u.protocol = url.parse(location.href).protocol;
}
return download(u, this);
},
} as HTTPResolverOptions<JSONSchema>;
/**
* Downloads the given file.
* @returns
* The promise resolves with the raw downloaded data, or rejects if there is an HTTP error.
*/
async function download<S extends object = JSONSchema>(
u: URL | string,
httpOptions: HTTPResolverOptions<S>,
_redirects?: string[],
): Promise<Buffer> {
u = url.parse(u);
const redirects = _redirects || [];
redirects.push(u.href);
try {
const res = await get(u, httpOptions);
if (res.status >= 400) {
throw ono({ status: res.status }, `HTTP ERROR ${res.status}`);
} else if (res.status >= 300) {
if (!Number.isNaN(httpOptions.redirects) && redirects.length > httpOptions.redirects!) {
throw new ResolverError(
ono(
{ status: res.status },
`Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`,
),
);
} else if (!("location" in res.headers) || !res.headers.location) {
throw ono({ status: res.status }, `HTTP ${res.status} redirect with no location header`);
} else {
const redirectTo = url.resolve(u.href, res.headers.location as string);
return download(redirectTo, httpOptions, redirects);
}
} else {
if (res.body) {
const buf = await res.arrayBuffer();
return Buffer.from(buf);
}
return Buffer.alloc(0);
}
} catch (err: any) {
throw new ResolverError(ono(err, `Error downloading ${u.href}`), u.href);
}
}
/**
* Sends an HTTP GET request.
* The promise resolves with the HTTP Response object.
*/
async function get<S extends object = JSONSchema>(u: RequestInfo | URL, httpOptions: HTTPResolverOptions<S>) {
let controller: any;
let timeoutId: any;
if (httpOptions.timeout) {
controller = new AbortController();
timeoutId = setTimeout(() => controller.abort(), httpOptions.timeout);
}
const response = await fetch(u, {
method: "GET",
headers: httpOptions.headers || {},
credentials: httpOptions.withCredentials ? "include" : "same-origin",
signal: controller ? controller.signal : null,
});
if (timeoutId) {
clearTimeout(timeoutId);
}
return response;
}

View File

@@ -0,0 +1,16 @@
var flatten = require('./flatten'),
overRest = require('./_overRest'),
setToString = require('./_setToString');
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
module.exports = flatRest;

View File

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

View File

@@ -0,0 +1,72 @@
/*
* 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 { propagation, } from '@opentelemetry/api';
import { isTracingSuppressed } from '../../trace/suppress-tracing';
import { BAGGAGE_HEADER, BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_MAX_NAME_VALUE_PAIRS, BAGGAGE_MAX_PER_NAME_VALUE_PAIRS, } from '../constants';
import { getKeyPairs, parsePairKeyValue, serializeKeyPairs } from '../utils';
/**
* Propagates {@link Baggage} through Context format propagation.
*
* Based on the Baggage specification:
* https://w3c.github.io/baggage/
*/
export class W3CBaggagePropagator {
inject(context, carrier, setter) {
const baggage = propagation.getBaggage(context);
if (!baggage || isTracingSuppressed(context))
return;
const keyPairs = getKeyPairs(baggage)
.filter((pair) => {
return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;
})
.slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS);
const headerValue = serializeKeyPairs(keyPairs);
if (headerValue.length > 0) {
setter.set(carrier, BAGGAGE_HEADER, headerValue);
}
}
extract(context, carrier, getter) {
const headerValue = getter.get(carrier, BAGGAGE_HEADER);
const baggageString = Array.isArray(headerValue)
? headerValue.join(BAGGAGE_ITEMS_SEPARATOR)
: headerValue;
if (!baggageString)
return context;
const baggage = {};
if (baggageString.length === 0) {
return context;
}
const pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR);
pairs.forEach(entry => {
const keyPair = parsePairKeyValue(entry);
if (keyPair) {
const baggageEntry = { value: keyPair.value };
if (keyPair.metadata) {
baggageEntry.metadata = keyPair.metadata;
}
baggage[keyPair.key] = baggageEntry;
}
});
if (Object.entries(baggage).length === 0) {
return context;
}
return propagation.setBaggage(context, propagation.createBaggage(baggage));
}
fields() {
return [BAGGAGE_HEADER];
}
}
//# sourceMappingURL=W3CBaggagePropagator.js.map

View File

@@ -0,0 +1,203 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const api = require('@opentelemetry/api');
const instrumentation = require('@prisma/instrumentation');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const INTEGRATION_NAME = 'Prisma';
function isPrismaV6TracingHelper(helper) {
return !!helper && typeof helper === 'object' && 'dispatchEngineSpans' in helper;
}
function getPrismaTracingHelper() {
const prismaInstrumentationObject = (globalThis ).PRISMA_INSTRUMENTATION;
const prismaTracingHelper =
prismaInstrumentationObject &&
typeof prismaInstrumentationObject === 'object' &&
'helper' in prismaInstrumentationObject
? prismaInstrumentationObject.helper
: undefined;
return prismaTracingHelper;
}
class SentryPrismaInteropInstrumentation extends instrumentation.PrismaInstrumentation {
constructor(options) {
super(options?.instrumentationConfig);
}
enable() {
super.enable();
// The PrismaIntegration (super class) defines a global variable `global["PRISMA_INSTRUMENTATION"]` when `enable()` is called. This global variable holds a "TracingHelper" which Prisma uses internally to create tracing data. It's their way of not depending on OTEL with their main package. The sucky thing is, prisma broke the interface of the tracing helper with the v6 major update. This means that if you use Prisma 5 with the v6 instrumentation (or vice versa) Prisma just blows up, because tries to call methods on the helper that no longer exist.
// Because we actually want to use the v6 instrumentation and not blow up in Prisma 5 user's faces, what we're doing here is backfilling the v5 method (`createEngineSpan`) with a noop so that no longer crashes when it attempts to call that function.
const prismaTracingHelper = getPrismaTracingHelper();
if (isPrismaV6TracingHelper(prismaTracingHelper)) {
// Inspired & adjusted from https://github.com/prisma/prisma/tree/5.22.0/packages/instrumentation
(prismaTracingHelper ).createEngineSpan = (
engineSpanEvent,
) => {
const tracer = api.trace.getTracer('prismaV5Compatibility') ;
// Prisma v5 relies on being able to create spans with a specific span & trace ID
// this is no longer possible in OTEL v2, there is no public API to do this anymore
// So in order to kind of hack this possibility, we rely on the internal `_idGenerator` property
// This is used to generate the random IDs, and we overwrite this temporarily to generate static IDs
// This is flawed and may not work, e.g. if the code is bundled and the private property is renamed
// in such cases, these spans will not be captured and some Prisma spans will be missing
const initialIdGenerator = tracer._idGenerator;
if (!initialIdGenerator) {
core.consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
'[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!',
);
});
return;
}
try {
engineSpanEvent.spans.forEach(engineSpan => {
const kind = engineSpanKindToOTELSpanKind(engineSpan.kind);
const parentSpanId = engineSpan.parent_span_id;
const spanId = engineSpan.span_id;
const traceId = engineSpan.trace_id;
const links = engineSpan.links?.map(link => {
return {
context: {
traceId: link.trace_id,
spanId: link.span_id,
traceFlags: api.TraceFlags.SAMPLED,
},
};
});
const ctx = api.trace.setSpanContext(api.context.active(), {
traceId,
spanId: parentSpanId,
traceFlags: api.TraceFlags.SAMPLED,
});
api.context.with(ctx, () => {
const temporaryIdGenerator = {
generateTraceId: () => {
return traceId;
},
generateSpanId: () => {
return spanId;
},
};
tracer._idGenerator = temporaryIdGenerator;
const span = tracer.startSpan(engineSpan.name, {
kind,
links,
startTime: engineSpan.start_time,
attributes: engineSpan.attributes,
});
span.end(engineSpan.end_time);
tracer._idGenerator = initialIdGenerator;
});
});
} finally {
// Ensure we always restore this at the end, even if something errors
tracer._idGenerator = initialIdGenerator;
}
};
}
}
}
function engineSpanKindToOTELSpanKind(engineSpanKind) {
switch (engineSpanKind) {
case 'client':
return api.SpanKind.CLIENT;
case 'internal':
default: // Other span kinds aren't currently supported
return api.SpanKind.INTERNAL;
}
}
const instrumentPrisma = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, options => {
return new SentryPrismaInteropInstrumentation(options);
});
/**
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
*
* NOTE: By default, this integration works with Prisma version 6.
* To get performance instrumentation for other Prisma versions,
* 1. Install the `@prisma/instrumentation` package with the desired version.
* 1. Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option of this integration:
*
* ```js
* import { PrismaInstrumentation } from '@prisma/instrumentation'
*
* Sentry.init({
* integrations: [
* prismaIntegration({
* // Override the default instrumentation that Sentry uses
* prismaInstrumentation: new PrismaInstrumentation()
* })
* ]
* })
* ```
*
* The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.
* 1. Depending on your Prisma version (prior to version 6), add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
*
* ```
* generator client {
* provider = "prisma-client-js"
* previewFeatures = ["tracing"]
* }
* ```
*/
const prismaIntegration = core.defineIntegration((options) => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentPrisma(options);
},
setup(client) {
// If no tracing helper exists, we skip any work here
// this means that prisma is not being used
if (!getPrismaTracingHelper()) {
return;
}
client.on('spanStart', span => {
const spanJSON = core.spanToJSON(span);
if (spanJSON.description?.startsWith('prisma:')) {
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.prisma');
}
// Make sure we use the query text as the span name, for ex. SELECT * FROM "User" WHERE "id" = $1
if (spanJSON.description === 'prisma:engine:db_query' && spanJSON.data['db.query.text']) {
span.updateName(spanJSON.data['db.query.text'] );
}
// In Prisma v5.22+, the `db.system` attribute is automatically set
// On older versions, this is missing, so we add it here
if (spanJSON.description === 'prisma:engine:db_query' && !spanJSON.data['db.system']) {
span.setAttribute('db.system', 'prisma');
}
});
},
};
});
exports.instrumentPrisma = instrumentPrisma;
exports.prismaIntegration = prismaIntegration;
//# sourceMappingURL=prisma.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.uz = void 0;
var _index = require("./uz/_lib/formatDistance.cjs");
var _index2 = require("./uz/_lib/formatLong.cjs");
var _index3 = require("./uz/_lib/formatRelative.cjs");
var _index4 = require("./uz/_lib/localize.cjs");
var _index5 = require("./uz/_lib/match.cjs");
/**
* @category Locales
* @summary Uzbek locale.
* @language Uzbek
* @iso-639-2 uzb
* @author Mukhammadali [@mukhammadali](https://github.com/Mukhammadali)
*/
const uz = (exports.uz = {
code: "uz",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,24 @@
{
"name": "escape-html",
"description": "Escape string for use in HTML",
"version": "1.0.3",
"license": "MIT",
"keywords": [
"escape",
"html",
"utility"
],
"repository": "component/escape-html",
"devDependencies": {
"benchmark": "1.0.0",
"beautify-benchmark": "0.2.4"
},
"files": [
"LICENSE",
"Readme.md",
"index.js"
],
"scripts": {
"bench": "node benchmark/index.js"
}
}

View File

@@ -0,0 +1,2 @@
export declare const DEFAULT_SERVER_EXTERNAL_PACKAGES: string[];
//# sourceMappingURL=constants.d.ts.map

View File

@@ -0,0 +1,27 @@
import { toDate } from "./toDate.mjs";
/**
* @name getYear
* @category Year Helpers
* @summary Get the year of the given date.
*
* @description
* Get the year of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The year
*
* @example
* // Which year is 2 July 2014?
* const result = getYear(new Date(2014, 6, 2))
* //=> 2014
*/
export function getYear(date) {
return toDate(date).getFullYear();
}
// Fallback for modularized imports:
export default getYear;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"accessibility.esm.js","sources":["../src/components/HiddenText/HiddenText.tsx","../src/components/LiveRegion/LiveRegion.tsx","../src/hooks/useAnnouncement.ts"],"sourcesContent":["import React from 'react';\n\ninterface Props {\n id: string;\n value: string;\n}\n\nconst hiddenStyles: React.CSSProperties = {\n display: 'none',\n};\n\nexport function HiddenText({id, value}: Props) {\n return (\n <div id={id} style={hiddenStyles}>\n {value}\n </div>\n );\n}\n","import React from 'react';\n\nexport interface Props {\n id: string;\n announcement: string;\n ariaLiveType?: \"polite\" | \"assertive\" | \"off\";\n}\n\nexport function LiveRegion({id, announcement, ariaLiveType = \"assertive\"}: Props) {\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden: React.CSSProperties = {\n position: 'fixed',\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap',\n };\n \n return (\n <div\n id={id}\n style={visuallyHidden}\n role=\"status\"\n aria-live={ariaLiveType}\n aria-atomic\n >\n {announcement}\n </div>\n );\n}\n","import {useCallback, useState} from 'react';\n\nexport function useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback((value: string | undefined) => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n\n return {announce, announcement} as const;\n}\n"],"names":["hiddenStyles","display","HiddenText","id","value","React","style","LiveRegion","announcement","ariaLiveType","visuallyHidden","position","top","left","width","height","margin","border","padding","overflow","clip","clipPath","whiteSpace","role","useAnnouncement","setAnnouncement","useState","announce","useCallback"],"mappings":";;AAOA,MAAMA,YAAY,GAAwB;EACxCC,OAAO,EAAE;AAD+B,CAA1C;SAIgBC;MAAW;IAACC,EAAD;IAAKC;;EAC9B,OACEC,mBAAA,MAAA;IAAKF,EAAE,EAAEA;IAAIG,KAAK,EAAEN;GAApB,EACGI,KADH,CADF;AAKD;;SCTeG;MAAW;IAACJ,EAAD;IAAKK,YAAL;IAAmBC,YAAY,GAAG;;;EAE3D,MAAMC,cAAc,GAAwB;IAC1CC,QAAQ,EAAE,OADgC;IAE1CC,GAAG,EAAE,CAFqC;IAG1CC,IAAI,EAAE,CAHoC;IAI1CC,KAAK,EAAE,CAJmC;IAK1CC,MAAM,EAAE,CALkC;IAM1CC,MAAM,EAAE,CAAC,CANiC;IAO1CC,MAAM,EAAE,CAPkC;IAQ1CC,OAAO,EAAE,CARiC;IAS1CC,QAAQ,EAAE,QATgC;IAU1CC,IAAI,EAAE,eAVoC;IAW1CC,QAAQ,EAAE,aAXgC;IAY1CC,UAAU,EAAE;GAZd;EAeA,OACEjB,mBAAA,MAAA;IACEF,EAAE,EAAEA;IACJG,KAAK,EAAEI;IACPa,IAAI,EAAC;iBACMd;;GAJb,EAOGD,YAPH,CADF;AAWD;;SClCegB;EACd,MAAM,CAAChB,YAAD,EAAeiB,eAAf,IAAkCC,QAAQ,CAAC,EAAD,CAAhD;EACA,MAAMC,QAAQ,GAAGC,WAAW,CAAExB,KAAD;IAC3B,IAAIA,KAAK,IAAI,IAAb,EAAmB;MACjBqB,eAAe,CAACrB,KAAD,CAAf;;GAFwB,EAIzB,EAJyB,CAA5B;EAMA,OAAO;IAACuB,QAAD;IAAWnB;GAAlB;AACD;;;;"}

View File

@@ -0,0 +1,103 @@
import { createHandler as createRawHandler, parseRequestParams as rawParseRequestParams, } from '../handler.mjs';
/**
* 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 `FastifyReply` 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 Fastify from 'fastify'; // yarn add fastify
* import { parseRequestParams } from 'graphql-http/lib/use/fastify';
*
* const fastify = Fastify();
* fastify.all('/graphql', async (req, reply) => {
* try {
* const maybeParams = await parseRequestParams(req, reply);
* 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
* reply.status(200).send(JSON.stringify(maybeParams, null, ' '));
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* reply.status(400).send(err.message);
* }
* });
*
* fastify.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/fastify
*/
export async function parseRequestParams(req, reply) {
const rawReq = toRequest(req, reply);
const paramsOrRes = await rawParseRequestParams(rawReq);
if (!('query' in paramsOrRes)) {
const [body, init] = paramsOrRes;
reply
.status(init.status)
.headers(init.headers || {})
// "or undefined" because `null` will be JSON stringified
.send(body || undefined);
return null;
}
return paramsOrRes;
}
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the fastify framework.
*
* ```js
* import Fastify from 'fastify'; // yarn add fastify
* import { createHandler } from 'graphql-http/lib/use/fastify';
* import { schema } from './my-graphql-schema/index.mjs';
*
* const fastify = Fastify();
* fastify.all('/graphql', createHandler({ schema }));
*
* fastify.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/fastify
*/
export function createHandler(options) {
const handle = createRawHandler(options);
return async function requestListener(req, reply) {
try {
const [body, init] = await handle(toRequest(req, reply));
reply
.status(init.status)
.headers(init.headers || {})
// "or undefined" because `null` will be JSON stringified
.send(body || undefined);
}
catch (err) {
// The handler shouldnt throw errors.
// If you wish to handle them differently, consider implementing your own request handler.
console.error('Internal error occurred during request handling. ' +
'Please check your implementation.', err);
reply.status(500).send();
}
};
}
function toRequest(req, reply) {
return {
url: req.url,
method: req.method,
headers: req.headers,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
body: req.body,
raw: req,
context: { reply },
};
}

View File

@@ -0,0 +1,156 @@
'use strict'
const { InvalidArgumentError, MaxOriginsReachedError } = require('../core/errors')
const { kClients, kRunning, kClose, kDestroy, kDispatch, kUrl } = require('../core/symbols')
const DispatcherBase = require('./dispatcher-base')
const Pool = require('./pool')
const Client = require('./client')
const util = require('../core/util')
const kOnConnect = Symbol('onConnect')
const kOnDisconnect = Symbol('onDisconnect')
const kOnConnectionError = Symbol('onConnectionError')
const kOnDrain = Symbol('onDrain')
const kFactory = Symbol('factory')
const kOptions = Symbol('options')
const kOrigins = Symbol('origins')
function defaultFactory (origin, opts) {
return opts && opts.connections === 1
? new Client(origin, opts)
: new Pool(origin, opts)
}
class Agent extends DispatcherBase {
constructor ({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) {
if (typeof factory !== 'function') {
throw new InvalidArgumentError('factory must be a function.')
}
if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {
throw new InvalidArgumentError('connect must be a function or an object')
}
if (typeof maxOrigins !== 'number' || Number.isNaN(maxOrigins) || maxOrigins <= 0) {
throw new InvalidArgumentError('maxOrigins must be a number greater than 0')
}
super()
if (connect && typeof connect !== 'function') {
connect = { ...connect }
}
this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }
this[kFactory] = factory
this[kClients] = new Map()
this[kOrigins] = new Set()
this[kOnDrain] = (origin, targets) => {
this.emit('drain', origin, [this, ...targets])
}
this[kOnConnect] = (origin, targets) => {
this.emit('connect', origin, [this, ...targets])
}
this[kOnDisconnect] = (origin, targets, err) => {
this.emit('disconnect', origin, [this, ...targets], err)
}
this[kOnConnectionError] = (origin, targets, err) => {
this.emit('connectionError', origin, [this, ...targets], err)
}
}
get [kRunning] () {
let ret = 0
for (const { dispatcher } of this[kClients].values()) {
ret += dispatcher[kRunning]
}
return ret
}
[kDispatch] (opts, handler) {
let key
if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) {
key = String(opts.origin)
} else {
throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.')
}
if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) {
throw new MaxOriginsReachedError()
}
const result = this[kClients].get(key)
let dispatcher = result && result.dispatcher
if (!dispatcher) {
const closeClientIfUnused = (connected) => {
const result = this[kClients].get(key)
if (result) {
if (connected) result.count -= 1
if (result.count <= 0) {
this[kClients].delete(key)
result.dispatcher.close()
}
this[kOrigins].delete(key)
}
}
dispatcher = this[kFactory](opts.origin, this[kOptions])
.on('drain', this[kOnDrain])
.on('connect', (origin, targets) => {
const result = this[kClients].get(key)
if (result) {
result.count += 1
}
this[kOnConnect](origin, targets)
})
.on('disconnect', (origin, targets, err) => {
closeClientIfUnused(true)
this[kOnDisconnect](origin, targets, err)
})
.on('connectionError', (origin, targets, err) => {
closeClientIfUnused(false)
this[kOnConnectionError](origin, targets, err)
})
this[kClients].set(key, { count: 0, dispatcher })
this[kOrigins].add(key)
}
return dispatcher.dispatch(opts, handler)
}
[kClose] () {
const closePromises = []
for (const { dispatcher } of this[kClients].values()) {
closePromises.push(dispatcher.close())
}
this[kClients].clear()
return Promise.all(closePromises)
}
[kDestroy] (err) {
const destroyPromises = []
for (const { dispatcher } of this[kClients].values()) {
destroyPromises.push(dispatcher.destroy(err))
}
this[kClients].clear()
return Promise.all(destroyPromises)
}
get stats () {
const allClientStats = {}
for (const { dispatcher } of this[kClients].values()) {
if (dispatcher.stats) {
allClientStats[dispatcher[kUrl].origin] = dispatcher.stats
}
}
return allClientStats
}
}
module.exports = Agent

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function makeNext() {
if (typeof process === "object" && typeof process.nextTick === "function") {
return process.nextTick;
}
else if (typeof setImmediate === "function") {
return setImmediate;
}
else {
return function next(f) {
setTimeout(f, 0);
};
}
}
exports.default = makeNext();

View File

@@ -0,0 +1,32 @@
import { daysInWeek } from "./constants.js";
/**
* @name daysToWeeks
* @category Conversion Helpers
* @summary Convert days to weeks.
*
* @description
* Convert a number of days to a full number of weeks.
*
* @param days - The number of days to be converted
*
* @returns The number of days converted in weeks
*
* @example
* // Convert 14 days to weeks:
* const result = daysToWeeks(14)
* //=> 2
*
* @example
* // It uses trunc rounding:
* const result = daysToWeeks(13)
* //=> 1
*/
export function daysToWeeks(days) {
const result = Math.trunc(days / daysInWeek);
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Fallback for modularized imports:
export default daysToWeeks;

View File

@@ -0,0 +1,70 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var varbinary_exports = {};
__export(varbinary_exports, {
MySqlVarBinary: () => MySqlVarBinary,
MySqlVarBinaryBuilder: () => MySqlVarBinaryBuilder,
varbinary: () => varbinary
});
module.exports = __toCommonJS(varbinary_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class MySqlVarBinaryBuilder extends import_common.MySqlColumnBuilder {
static [import_entity.entityKind] = "MySqlVarBinaryBuilder";
/** @internal */
constructor(name, config) {
super(name, "string", "MySqlVarBinary");
this.config.length = config?.length;
}
/** @internal */
build(table) {
return new MySqlVarBinary(
table,
this.config
);
}
}
class MySqlVarBinary extends import_common.MySqlColumn {
static [import_entity.entityKind] = "MySqlVarBinary";
length = this.config.length;
mapFromDriverValue(value) {
if (typeof value === "string") return value;
if (Buffer.isBuffer(value)) return value.toString();
const str = [];
for (const v of value) {
str.push(v === 49 ? "1" : "0");
}
return str.join("");
}
getSQLType() {
return this.length === void 0 ? `varbinary` : `varbinary(${this.length})`;
}
}
function varbinary(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new MySqlVarBinaryBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlVarBinary,
MySqlVarBinaryBuilder,
varbinary
});
//# sourceMappingURL=varbinary.cjs.map

View File

@@ -0,0 +1,55 @@
import { PropagationContext, Span, SpanAttributes } from '@sentry/core';
import { Scope } from '@sentry/core';
/**
* Takes a shared (garbage collectable) object between resources, e.g. a headers object shared between Next.js server components and returns a common propagation context.
*
* @param commonObject The shared object.
* @param propagationContext The propagation context that should be shared between all the resources if no propagation context was registered yet.
* @returns the shared propagation context.
*/
export declare function commonObjectToPropagationContext(commonObject: unknown, propagationContext: PropagationContext): PropagationContext;
/**
* Takes a shared (garbage collectable) object between resources, e.g. a headers object shared between Next.js server components and returns a common propagation context.
*
* @param commonObject The shared object.
* @param isolationScope The isolationScope that should be shared between all the resources if no isolation scope was created yet.
* @returns the shared isolation scope.
*/
export declare function commonObjectToIsolationScope(commonObject: unknown): Scope;
/**
* Will mark the execution context of the callback as "escaped" from Next.js internal tracing by unsetting the active
* span and propagation context. When an execution passes through this function multiple times, it is a noop after the
* first time.
*/
export declare function escapeNextjsTracing<T>(cb: () => T): T;
/**
* Ideally this function never lands in the develop branch.
*
* Drops the entire span tree this function was called in, if it was a span tree created by Next.js.
*/
export declare function dropNextjsRootContext(): void;
/**
* Checks if the span is a resolve segment span.
* @param spanAttributes The attributes of the span to check.
* @returns True if the span is a resolve segment span, false otherwise.
*/
export declare function isResolveSegmentSpan(spanAttributes: SpanAttributes): boolean;
/**
* Returns the enhanced name for a resolve segment span.
* @param segment The segment of the resolve segment span.
* @param route The route of the resolve segment span.
* @returns The enhanced name for the resolve segment span.
*/
export declare function getEnhancedResolveSegmentSpanName({ segment, route }: {
segment: string;
route: string;
}): string;
/**
* Maybe enhances the span name for a resolve segment span.
* If the span is not a resolve segment span, this function does nothing.
* @param activeSpan The active span.
* @param spanAttributes The attributes of the span to check.
* @param rootSpanAttributes The attributes of the according root span.
*/
export declare function maybeEnhanceServerComponentSpanName(activeSpan: Span, spanAttributes: SpanAttributes, rootSpanAttributes: SpanAttributes): void;
//# sourceMappingURL=tracingUtils.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"calendar-minus.js","sources":["../../../src/icons/calendar-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CalendarMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTloNiIgLz4KICA8cGF0aCBkPSJNMTYgMnY0IiAvPgogIDxwYXRoIGQ9Ik0yMSAxNVY2YTIgMiAwIDAgMC0yLTJINWEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoOC41IiAvPgogIDxwYXRoIGQ9Ik0zIDEwaDE4IiAvPgogIDxwYXRoIGQ9Ik04IDJ2NCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/calendar-minus\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 CalendarMinus = createLucideIcon('CalendarMinus', [\n ['path', { d: 'M16 19h6', key: 'xwg31i' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['path', { d: 'M21 15V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5', key: '1scpom' }],\n ['path', { d: 'M3 10h18', key: '8toen8' }],\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n]);\n\nexport default CalendarMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5F,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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,68 @@
{
"name": "peek-readable",
"version": "5.4.2",
"description": "Read and peek from a readable stream",
"author": {
"name": "Borewit",
"url": "https://github.com/Borewit"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/Borewit"
},
"scripts": {
"clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'test/**/*.js' 'test/**/*.js.map' 'coverage' '.nyc_output'",
"build": "npm run clean && npm run compile",
"compile-src": "tsc -p lib",
"compile-test": "tsc -p test",
"compile": "yarn run compile-src && yarn run compile-test",
"lint-ts": "biome check",
"lint-md": "remark -u preset-lint-recommended .",
"lint": "yarn run lint-md && yarn run lint-ts",
"test": "mocha",
"test-coverage": "c8 npm run test",
"start": "yarn run compile && yarn run lint && yarn run cover-test"
},
"engines": {
"node": ">=14.16"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Borewit/peek-readable"
},
"license": "MIT",
"type": "module",
"exports": "./lib/index.js",
"types": "lib/index.d.ts",
"bugs": {
"url": "https://github.com/Borewit/peek-readable/issues"
},
"files": [
"lib/**/*.js",
"lib/**/*.d.ts"
],
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/chai": "^5.0.1",
"@types/chai-as-promised": "^8.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.10",
"c8": "^10.1.3",
"chai": "^5.1.2",
"chai-as-promised": "^8.0.1",
"del-cli": "^6.0.0",
"mocha": "^11.1.0",
"remark-cli": "^12.0.1",
"remark-preset-lint-recommended": "^7.0.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"typescript": "^5.7.3"
},
"keywords": [
"readable",
"buffer",
"stream",
"read"
],
"packageManager": "yarn@4.6.0"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../src/fields/Textarea/types.ts"],"sourcesContent":["import type { StaticDescription, StaticLabel } from 'payload'\nimport type React from 'react'\n\nimport { type ChangeEvent } from 'react'\n\nexport type TextAreaInputProps = {\n readonly AfterInput?: React.ReactNode\n readonly BeforeInput?: React.ReactNode\n readonly className?: string\n readonly Description?: React.ReactNode\n readonly description?: StaticDescription\n readonly Error?: React.ReactNode\n readonly inputRef?: React.RefObject<HTMLInputElement>\n readonly Label?: React.ReactNode\n readonly label?: StaticLabel\n readonly localized?: boolean\n readonly onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly path: string\n readonly placeholder?: string\n readonly readOnly?: boolean\n readonly required?: boolean\n readonly rows?: number\n readonly rtl?: boolean\n readonly showError?: boolean\n readonly style?: React.CSSProperties\n readonly value?: string\n readonly valueToRender?: string\n}\n"],"mappings":"AAKA","ignoreList":[]}

View File

@@ -0,0 +1,4 @@
import React from 'react';
import type { DateFilterProps as Props } from './types.js';
export declare const DateFilter: React.FC<Props>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,7 @@
import { IImage } from './interface.js';
declare const typeHandlers: Map<"bmp" | "cur" | "dds" | "gif" | "heif" | "icns" | "ico" | "j2c" | "jp2" | "jpg" | "jxl" | "jxl-stream" | "ktx" | "png" | "pnm" | "psd" | "svg" | "tga" | "tiff" | "webp", IImage>;
declare const types: ("bmp" | "cur" | "dds" | "gif" | "heif" | "icns" | "ico" | "j2c" | "jp2" | "jpg" | "jxl" | "jxl-stream" | "ktx" | "png" | "pnm" | "psd" | "svg" | "tga" | "tiff" | "webp")[];
type imageType = (typeof types)[number];
export { type imageType, typeHandlers, types };

View File

@@ -0,0 +1,41 @@
import { Context } from '../context/types';
import { Span } from './span';
import { SpanContext } from './span_context';
/**
* Return the span if one exists
*
* @param context context to get span from
*/
export declare function getSpan(context: Context): Span | undefined;
/**
* Gets the span from the current context, if one exists.
*/
export declare function getActiveSpan(): Span | undefined;
/**
* Set the span on a context
*
* @param context context to use as parent
* @param span span to set active
*/
export declare function setSpan(context: Context, span: Span): Context;
/**
* Remove current span stored in the context
*
* @param context context to delete span from
*/
export declare function deleteSpan(context: Context): Context;
/**
* Wrap span context in a NoopSpan and set as span in a new
* context
*
* @param context context to set active span on
* @param spanContext span context to be wrapped
*/
export declare function setSpanContext(context: Context, spanContext: SpanContext): Context;
/**
* Get the span context of the span if it exists.
*
* @param context context to get values from
*/
export declare function getSpanContext(context: Context): SpanContext | undefined;
//# sourceMappingURL=context-utils.d.ts.map

View File

@@ -0,0 +1,4 @@
export * from './common';
export * from './handler';
export * from './client';
export * from './audits';

View File

@@ -0,0 +1,31 @@
import validate from './validate.js';
/**
* Convert array of 16 byte values to UUID string format of the form:
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
*/
const byteToHex = [];
for (let i = 0; i < 256; ++i) {
byteToHex.push((i + 0x100).toString(16).slice(1));
}
export function unsafeStringify(arr, offset = 0) {
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
//
// Note to future-self: No, you can't remove the `toLowerCase()` call.
// REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
}
function stringify(arr, offset = 0) {
const uuid = unsafeStringify(arr, offset);
// Consistency check for valid UUID. If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
if (!validate(uuid)) {
throw TypeError('Stringified UUID is invalid');
}
return uuid;
}
export default stringify;

View File

@@ -0,0 +1,39 @@
{
"name": "joycon",
"version": "3.1.1",
"description": "Load config with ease.",
"repository": {
"url": "egoist/joycon",
"type": "git"
},
"main": "lib/index.js",
"types": "types/index.d.ts",
"files": [
"lib",
"types/index.d.ts"
],
"scripts": {
"test": "jest --testPathPattern tests",
"build": "babel src -d lib --no-comments",
"prepublishOnly": "npm run build"
},
"author": "egoist <0x142857@gmail.com>",
"license": "MIT",
"jest": {
"testEnvironment": "node"
},
"devDependencies": {
"@babel/cli": "^7.13.10",
"@babel/core": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"@egoist/prettier-config": "^0.1.0",
"@types/node": "^14.14.33",
"babel-jest": "^26.6.3",
"babel-plugin-sync": "^0.1.0",
"jest-cli": "^26.6.3",
"prettier": "^2.2.1"
},
"engines": {
"node": ">=10"
}
}

View File

@@ -0,0 +1,27 @@
import { millisecondsInHour } from "./constants.mjs";
/**
* @name hoursToMilliseconds
* @category Conversion Helpers
* @summary Convert hours to milliseconds.
*
* @description
* Convert a number of hours to a full number of milliseconds.
*
* @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 hours - number of hours to be converted
*
* @returns The number of hours converted to milliseconds
*
* @example
* // Convert 2 hours to milliseconds:
* const result = hoursToMilliseconds(2)
* //=> 7200000
*/
export function hoursToMilliseconds(hours) {
return Math.trunc(hours * millisecondsInHour);
}
// Fallback for modularized imports:
export default hoursToMilliseconds;

View File

@@ -0,0 +1,9 @@
import * as types from './types';
export declare class NoopContextManager implements types.ContextManager {
active(): types.Context;
with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(_context: types.Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
bind<T>(_context: types.Context, target: T): T;
enable(): this;
disable(): this;
}
//# sourceMappingURL=NoopContextManager.d.ts.map

View File

@@ -0,0 +1,68 @@
{
"name": "tsx",
"version": "4.21.0",
"description": "TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files",
"keywords": [
"cli",
"runtime",
"node",
"cjs",
"commonjs",
"esm",
"typescript",
"typescript runner"
],
"license": "MIT",
"repository": "privatenumber/tsx",
"author": {
"name": "Hiroki Osame",
"email": "hiroki.osame@gmail.com"
},
"files": [
"dist"
],
"type": "module",
"bin": "./dist/cli.mjs",
"exports": {
"./package.json": "./package.json",
".": "./dist/loader.mjs",
"./patch-repl": "./dist/patch-repl.cjs",
"./cjs": "./dist/cjs/index.cjs",
"./cjs/api": {
"import": {
"types": "./dist/cjs/api/index.d.mts",
"default": "./dist/cjs/api/index.mjs"
},
"require": {
"types": "./dist/cjs/api/index.d.cts",
"default": "./dist/cjs/api/index.cjs"
}
},
"./esm": "./dist/esm/index.mjs",
"./esm/api": {
"import": {
"types": "./dist/esm/api/index.d.mts",
"default": "./dist/esm/api/index.mjs"
},
"require": {
"types": "./dist/esm/api/index.d.cts",
"default": "./dist/esm/api/index.cjs"
}
},
"./cli": "./dist/cli.mjs",
"./suppress-warnings": "./dist/suppress-warnings.cjs",
"./preflight": "./dist/preflight.cjs",
"./repl": "./dist/repl.mjs"
},
"homepage": "https://tsx.is",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"esbuild": "~0.27.0",
"get-tsconfig": "^4.7.5"
},
"optionalDependencies": {
"fsevents": "~2.3.3"
}
}

View File

@@ -0,0 +1,2 @@
// Needed for projects with `moduleResolution: 'node'`
export * from '../dist/types/core/format-message/format-only.d.ts';

View File

@@ -0,0 +1,66 @@
'use strict'
module.exports = formatTime
const {
DATE_FORMAT,
DATE_FORMAT_SIMPLE
} = require('../constants')
const dateformat = require('dateformat')
const createDate = require('./create-date')
const isValidDate = require('./is-valid-date')
/**
* Converts a given `epoch` to a desired display format.
*
* @param {number|string} epoch The time to convert. May be any value that is
* valid for `new Date()`.
* @param {boolean|string} [translateTime=false] When `false`, the given `epoch`
* will simply be returned. When `true`, the given `epoch` will be converted
* to a string at UTC using the `DATE_FORMAT` constant. If `translateTime` is
* a string, the following rules are available:
*
* - `<format string>`: The string is a literal format string. This format
* string will be used to interpret the `epoch` and return a display string
* at UTC.
* - `SYS:STANDARD`: The returned display string will follow the `DATE_FORMAT`
* constant at the system's local timezone.
* - `SYS:<format string>`: The returned display string will follow the given
* `<format string>` at the system's local timezone.
* - `UTC:<format string>`: The returned display string will follow the given
* `<format string>` at UTC.
*
* @returns {number|string} The formatted time.
*/
function formatTime (epoch, translateTime = false) {
if (translateTime === false) {
return epoch
}
const instant = createDate(epoch)
// If the Date is invalid, do not attempt to format
if (!isValidDate(instant)) {
return epoch
}
if (translateTime === true) {
return dateformat(instant, DATE_FORMAT_SIMPLE)
}
const upperFormat = translateTime.toUpperCase()
if (upperFormat === 'SYS:STANDARD') {
return dateformat(instant, DATE_FORMAT)
}
const prefix = upperFormat.substr(0, 4)
if (prefix === 'SYS:' || prefix === 'UTC:') {
if (prefix === 'UTC:') {
return dateformat(instant, translateTime)
}
return dateformat(instant, translateTime.slice(4))
}
return dateformat(instant, `UTC:${translateTime}`)
}

View File

@@ -0,0 +1,50 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
import { LOCAL_TIME_FORMAT, validateLocalTime } from './LocalTime.js';
const LOCAL_END_TIMES = ['24:00', '24:00:00', '24:00:00.000'];
function validateLocalEndTime(value) {
// first check if it's any of the special "end time" values
if (LOCAL_END_TIMES.indexOf(value) >= 0) {
return value;
}
// otherwise, fall back on the standard LocalTime validation
return validateLocalTime(value);
}
export const GraphQLLocalEndTime = /*#__PURE__*/ new GraphQLScalarType({
name: 'LocalEndTime',
description: 'A local time string (i.e., with no associated timezone) in 24-hr `HH:mm[:ss[.SSS]]` format, e.g. `14:25` or `14:25:06` or `14:25:06.123`. This scalar is very similar to the `LocalTime`, with the only difference being that `LocalEndTime` also allows `24:00` as a valid value to indicate midnight of the following day. This is useful when using the scalar to represent the exclusive upper bound of a time block.',
serialize(value) {
// value sent to client as string
return validateLocalEndTime(value);
},
parseValue(value) {
// value from client as json
return validateLocalEndTime(value);
},
parseLiteral(ast) {
// value from client in ast
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`Can only validate strings as local times but got a: ${ast.kind}`, {
nodes: ast,
});
}
return validateLocalEndTime(ast.value);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'LocalEndTime',
type: 'string',
oneOf: [
{
type: 'string',
pattern: LOCAL_TIME_FORMAT.source,
},
{
type: 'string',
enum: LOCAL_END_TIMES,
},
],
},
},
});

View File

@@ -0,0 +1,9 @@
import { WebFetchHeaders } from '@sentry/core';
export interface RequestAsyncStorage {
getStore: () => {
headers: WebFetchHeaders;
} | undefined;
}
export declare const requestAsyncStorage: undefined;
export declare const workUnitAsyncStorage: undefined;
//# sourceMappingURL=requestAsyncStorageShim.d.ts.map

View File

@@ -0,0 +1,276 @@
import { status as httpStatus } from 'http-status';
import { executeAccess } from '../../auth/executeAccess.js';
import { combineQueries } from '../../database/combineQueries.js';
import { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js';
import { sanitizeWhereQuery } from '../../database/sanitizeWhereQuery.js';
import { APIError } from '../../errors/index.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { deleteUserPreferences } from '../../preferences/deleteUserPreferences.js';
import { deleteAssociatedFiles } from '../../uploads/deleteAssociatedFiles.js';
import { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js';
import { checkDocumentLockStatus } from '../../utilities/checkDocumentLockStatus.js';
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { hasScheduledPublishEnabled } from '../../utilities/getVersionsConfig.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { isErrorPublic } from '../../utilities/isErrorPublic.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { deleteCollectionVersions } from '../../versions/deleteCollectionVersions.js';
import { deleteScheduledPublishJobs } from '../../versions/deleteScheduledPublishJobs.js';
import { buildAfterOperation } from './utilities/buildAfterOperation.js';
import { buildBeforeOperation } from './utilities/buildBeforeOperation.js';
export const deleteOperation = async (incomingArgs)=>{
let args = incomingArgs;
try {
const shouldCommit = !args.disableTransaction && await initTransaction(args.req);
// /////////////////////////////////////
// beforeOperation - Collection
// /////////////////////////////////////
args = await buildBeforeOperation({
args,
collection: args.collection.config,
operation: 'delete',
overrideAccess: args.overrideAccess
});
const { collection: { config: collectionConfig }, depth, overrideAccess, overrideLock, populate, req: { fallbackLocale, locale, payload: { config }, payload }, req, select: incomingSelect, showHiddenFields, trash = false, where } = args;
if (!where) {
throw new APIError("Missing 'where' query of documents to delete.", httpStatus.BAD_REQUEST);
}
// /////////////////////////////////////
// Access
// /////////////////////////////////////
let accessResult;
if (!overrideAccess) {
accessResult = await executeAccess({
req
}, collectionConfig.access.delete);
}
await validateQueryPaths({
collectionConfig,
overrideAccess: overrideAccess,
req,
where
});
let fullWhere = combineQueries(where, accessResult);
// Exclude trashed documents when trash: false
fullWhere = appendNonTrashedFilter({
enableTrash: collectionConfig.trash,
trash,
where: fullWhere
});
sanitizeWhereQuery({
fields: collectionConfig.flattenedFields,
payload,
where: fullWhere
});
const select = sanitizeSelect({
fields: collectionConfig.flattenedFields,
forceSelect: collectionConfig.forceSelect,
select: incomingSelect
});
// /////////////////////////////////////
// Retrieve documents
// /////////////////////////////////////
const { docs } = await payload.db.find({
collection: collectionConfig.slug,
locale: locale,
req,
select,
where: fullWhere
});
const errors = [];
const promises = docs.map(async (doc)=>{
let result;
const { id } = doc;
try {
// Each document gets its own transaction when singleTransaction is enabled
let docShouldCommit = false;
if (req.payload.db.bulkOperationsSingleTransaction) {
docShouldCommit = await initTransaction(req);
}
// /////////////////////////////////////
// Handle potentially locked documents
// /////////////////////////////////////
await checkDocumentLockStatus({
id,
collectionSlug: collectionConfig.slug,
lockErrorMessage: `Document with ID ${id} is currently locked and cannot be deleted.`,
overrideLock,
req
});
// /////////////////////////////////////
// beforeDelete - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.beforeDelete?.length) {
for (const hook of collectionConfig.hooks.beforeDelete){
await hook({
id,
collection: collectionConfig,
context: req.context,
req
});
}
}
await deleteAssociatedFiles({
collectionConfig,
config,
doc,
overrideDelete: true,
req
});
// /////////////////////////////////////
// Delete versions
// /////////////////////////////////////
if (collectionConfig.versions) {
await deleteCollectionVersions({
id,
slug: collectionConfig.slug,
payload,
req
});
}
// /////////////////////////////////////
// Delete scheduled posts
// /////////////////////////////////////
if (hasScheduledPublishEnabled(collectionConfig)) {
await deleteScheduledPublishJobs({
id,
slug: collectionConfig.slug,
payload,
req
});
}
// /////////////////////////////////////
// Delete document
// /////////////////////////////////////
await payload.db.deleteOne({
collection: collectionConfig.slug,
req,
returning: false,
where: {
id: {
equals: id
}
}
});
// /////////////////////////////////////
// afterRead - Fields
// /////////////////////////////////////
result = await afterRead({
collection: collectionConfig,
context: req.context,
depth: depth,
doc: result || doc,
// @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve
draft: undefined,
fallbackLocale: fallbackLocale,
global: null,
locale: locale,
overrideAccess: overrideAccess,
populate,
req,
select,
showHiddenFields: showHiddenFields
});
// /////////////////////////////////////
// Add collection property for auth collections
// /////////////////////////////////////
if (collectionConfig.auth) {
result = {
...result,
collection: collectionConfig.slug
};
}
// /////////////////////////////////////
// afterRead - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.afterRead?.length) {
for (const hook of collectionConfig.hooks.afterRead){
result = await hook({
collection: collectionConfig,
context: req.context,
doc: result || doc,
overrideAccess,
req
}) || result;
}
}
// /////////////////////////////////////
// afterDelete - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.afterDelete?.length) {
for (const hook of collectionConfig.hooks.afterDelete){
result = await hook({
id,
collection: collectionConfig,
context: req.context,
doc: result,
req
}) || result;
}
}
// /////////////////////////////////////
// 8. Return results
// /////////////////////////////////////
if (docShouldCommit) {
await commitTransaction(req);
}
return result;
} catch (error) {
const isPublic = error instanceof Error ? isErrorPublic(error, config) : false;
if (req.payload.db.bulkOperationsSingleTransaction) {
await killTransaction(req);
}
errors.push({
id: doc.id,
isPublic,
message: error instanceof Error ? error.message : 'Unknown error'
});
}
return null;
});
// Process sequentially when using single transaction mode to avoid shared state issues
// Process in parallel when using one transaction for better performance
let awaitedDocs;
if (req.payload.db.bulkOperationsSingleTransaction) {
awaitedDocs = [];
for (const promise of promises){
awaitedDocs.push(await promise);
}
} else {
awaitedDocs = await Promise.all(promises);
}
// /////////////////////////////////////
// Delete Preferences
// /////////////////////////////////////
await deleteUserPreferences({
collectionConfig,
ids: docs.map(({ id })=>id),
payload,
req
});
let result = {
docs: awaitedDocs.filter(Boolean),
errors
};
// /////////////////////////////////////
// afterOperation - Collection
// /////////////////////////////////////
result = await buildAfterOperation({
args,
collection: collectionConfig,
operation: 'delete',
overrideAccess,
result
});
if (shouldCommit) {
await commitTransaction(req);
}
return result;
} catch (error) {
await killTransaction(args.req);
throw error;
}
};
//# sourceMappingURL=delete.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"user-plus.js","sources":["../../../src/icons/user-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name UserPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMjF2LTJhNCA0IDAgMCAwLTQtNEg2YTQgNCAwIDAgMC00IDR2MiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iNyIgcj0iNCIgLz4KICA8bGluZSB4MT0iMTkiIHgyPSIxOSIgeTE9IjgiIHkyPSIxNCIgLz4KICA8bGluZSB4MT0iMjIiIHgyPSIxNiIgeTE9IjExIiB5Mj0iMTEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/user-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 UserPlus = createLucideIcon('UserPlus', [\n ['path', { d: 'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2', key: '1yyitq' }],\n ['circle', { cx: '9', cy: '7', r: '4', key: 'nufk8' }],\n ['line', { x1: '19', x2: '19', y1: '8', y2: '14', key: '1bvyxn' }],\n ['line', { x1: '22', x2: '16', y1: '11', y2: '11', key: '1shjgl' }],\n]);\n\nexport default UserPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAA,CAAA;AAAA,CACrD,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,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,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 @@
{"version":3,"file":"monitor.js","sources":["../../../src/icons/monitor.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Monitor\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTQiIHg9IjIiIHk9IjMiIHJ4PSIyIiAvPgogIDxsaW5lIHgxPSI4IiB4Mj0iMTYiIHkxPSIyMSIgeTI9IjIxIiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMTciIHkyPSIyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/monitor\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 Monitor = createLucideIcon('Monitor', [\n ['rect', { width: '20', height: '14', x: '2', y: '3', rx: '2', key: '48i651' }],\n ['line', { x1: '8', x2: '16', y1: '21', y2: '21', key: '1svkeh' }],\n ['line', { x1: '12', x2: '12', y1: '17', y2: '21', key: 'vw1qmm' }],\n]);\n\nexport default Monitor;\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,CAAA,CAC1C,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,CAC9E,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,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,3 @@
import type { Where } from '../types/index.js';
export declare function combineWhereConstraints(constraints: Array<undefined | Where>, as?: 'and' | 'or'): Where;
//# sourceMappingURL=combineWhereConstraints.d.ts.map

View File

@@ -0,0 +1,21 @@
import type { UploadEdits } from 'payload';
import React from 'react';
import 'react-image-crop/dist/ReactCrop.css';
import './index.scss';
type FocalPosition = {
x: number;
y: number;
};
export type EditUploadProps = {
fileName: string;
fileSrc: string;
imageCacheTag?: string;
initialCrop?: UploadEdits['crop'];
initialFocalPoint?: FocalPosition;
onSave?: (uploadEdits: UploadEdits) => void;
showCrop?: boolean;
showFocalPoint?: boolean;
};
export declare const EditUpload: React.FC<EditUploadProps>;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,2 @@
const e=(e,t)=>()=>({path:`/folders`,params:t??{},body:JSON.stringify(e),method:`POST`}),t=(e,t)=>()=>({path:`/folders`,params:t??{},body:JSON.stringify(e),method:`POST`});exports.createFolder=t,exports.createFolders=e;
//# sourceMappingURL=folders.cjs.map

View File

@@ -0,0 +1,10 @@
export * from "./stringify.js";
export * from "./traversal.js";
export * from "./manipulation.js";
export * from "./querying.js";
export * from "./legacy.js";
export * from "./helpers.js";
export * from "./feeds.js";
/** @deprecated Use these methods from `domhandler` directly. */
export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler";
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/foreign-keys.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { AnyMySqlColumn, MySqlColumn } from './columns/index.ts';\nimport type { MySqlTable } from './table.ts';\n\nexport type UpdateDeleteAction = 'cascade' | 'restrict' | 'no action' | 'set null' | 'set default';\n\nexport type Reference = () => {\n\treadonly name?: string;\n\treadonly columns: MySqlColumn[];\n\treadonly foreignTable: MySqlTable;\n\treadonly foreignColumns: MySqlColumn[];\n};\n\nexport class ForeignKeyBuilder {\n\tstatic readonly [entityKind]: string = 'MySqlForeignKeyBuilder';\n\n\t/** @internal */\n\treference: Reference;\n\n\t/** @internal */\n\t_onUpdate: UpdateDeleteAction | undefined;\n\n\t/** @internal */\n\t_onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(\n\t\tconfig: () => {\n\t\t\tname?: string;\n\t\t\tcolumns: MySqlColumn[];\n\t\t\tforeignColumns: MySqlColumn[];\n\t\t},\n\t\tactions?: {\n\t\t\tonUpdate?: UpdateDeleteAction;\n\t\t\tonDelete?: UpdateDeleteAction;\n\t\t} | undefined,\n\t) {\n\t\tthis.reference = () => {\n\t\t\tconst { name, columns, foreignColumns } = config();\n\t\t\treturn { name, columns, foreignTable: foreignColumns[0]!.table as MySqlTable, foreignColumns };\n\t\t};\n\t\tif (actions) {\n\t\t\tthis._onUpdate = actions.onUpdate;\n\t\t\tthis._onDelete = actions.onDelete;\n\t\t}\n\t}\n\n\tonUpdate(action: UpdateDeleteAction): this {\n\t\tthis._onUpdate = action;\n\t\treturn this;\n\t}\n\n\tonDelete(action: UpdateDeleteAction): this {\n\t\tthis._onDelete = action;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: MySqlTable): ForeignKey {\n\t\treturn new ForeignKey(table, this);\n\t}\n}\n\nexport type AnyForeignKeyBuilder = ForeignKeyBuilder;\n\nexport class ForeignKey {\n\tstatic readonly [entityKind]: string = 'MySqlForeignKey';\n\n\treadonly reference: Reference;\n\treadonly onUpdate: UpdateDeleteAction | undefined;\n\treadonly onDelete: UpdateDeleteAction | undefined;\n\n\tconstructor(readonly table: MySqlTable, builder: ForeignKeyBuilder) {\n\t\tthis.reference = builder.reference;\n\t\tthis.onUpdate = builder._onUpdate;\n\t\tthis.onDelete = builder._onDelete;\n\t}\n\n\tgetName(): string {\n\t\tconst { name, columns, foreignColumns } = this.reference();\n\t\tconst columnNames = columns.map((column) => column.name);\n\t\tconst foreignColumnNames = foreignColumns.map((column) => column.name);\n\t\tconst chunks = [\n\t\t\tthis.table[TableName],\n\t\t\t...columnNames,\n\t\t\tforeignColumns[0]!.table[TableName],\n\t\t\t...foreignColumnNames,\n\t\t];\n\t\treturn name ?? `${chunks.join('_')}_fk`;\n\t}\n}\n\ntype ColumnsWithTable<\n\tTTableName extends string,\n\tTColumns extends MySqlColumn[],\n> = { [Key in keyof TColumns]: AnyMySqlColumn<{ tableName: TTableName }> };\n\nexport type GetColumnsTable<TColumns extends MySqlColumn | MySqlColumn[]> = (\n\tTColumns extends MySqlColumn ? TColumns\n\t\t: TColumns extends MySqlColumn[] ? TColumns[number]\n\t\t: never\n) extends AnyMySqlColumn<{ tableName: infer TTableName extends string }> ? TTableName\n\t: never;\n\nexport function foreignKey<\n\tTTableName extends string,\n\tTForeignTableName extends string,\n\tTColumns extends [AnyMySqlColumn<{ tableName: TTableName }>, ...AnyMySqlColumn<{ tableName: TTableName }>[]],\n>(\n\tconfig: {\n\t\tname?: string;\n\t\tcolumns: TColumns;\n\t\tforeignColumns: ColumnsWithTable<TForeignTableName, TColumns>;\n\t},\n): ForeignKeyBuilder {\n\tfunction mappedConfig() {\n\t\tconst { name, columns, foreignColumns } = config;\n\t\treturn {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tforeignColumns,\n\t\t};\n\t}\n\n\treturn new ForeignKeyBuilder(mappedConfig);\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAanB,MAAM,kBAAkB;AAAA,EAC9B,QAAiB,UAAU,IAAY;AAAA;AAAA,EAGvC;AAAA;AAAA,EAGA;AAAA;AAAA,EAGA;AAAA,EAEA,YACC,QAKA,SAIC;AACD,SAAK,YAAY,MAAM;AACtB,YAAM,EAAE,MAAM,SAAS,eAAe,IAAI,OAAO;AACjD,aAAO,EAAE,MAAM,SAAS,cAAc,eAAe,CAAC,EAAG,OAAqB,eAAe;AAAA,IAC9F;AACA,QAAI,SAAS;AACZ,WAAK,YAAY,QAAQ;AACzB,WAAK,YAAY,QAAQ;AAAA,IAC1B;AAAA,EACD;AAAA,EAEA,SAAS,QAAkC;AAC1C,SAAK,YAAY;AACjB,WAAO;AAAA,EACR;AAAA,EAEA,SAAS,QAAkC;AAC1C,SAAK,YAAY;AACjB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,MAAM,OAA+B;AACpC,WAAO,IAAI,WAAW,OAAO,IAAI;AAAA,EAClC;AACD;AAIO,MAAM,WAAW;AAAA,EAOvB,YAAqB,OAAmB,SAA4B;AAA/C;AACpB,SAAK,YAAY,QAAQ;AACzB,SAAK,WAAW,QAAQ;AACxB,SAAK,WAAW,QAAQ;AAAA,EACzB;AAAA,EAVA,QAAiB,UAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAAA,EACA;AAAA,EAQT,UAAkB;AACjB,UAAM,EAAE,MAAM,SAAS,eAAe,IAAI,KAAK,UAAU;AACzD,UAAM,cAAc,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI;AACvD,UAAM,qBAAqB,eAAe,IAAI,CAAC,WAAW,OAAO,IAAI;AACrE,UAAM,SAAS;AAAA,MACd,KAAK,MAAM,SAAS;AAAA,MACpB,GAAG;AAAA,MACH,eAAe,CAAC,EAAG,MAAM,SAAS;AAAA,MAClC,GAAG;AAAA,IACJ;AACA,WAAO,QAAQ,GAAG,OAAO,KAAK,GAAG,CAAC;AAAA,EACnC;AACD;AAcO,SAAS,WAKf,QAKoB;AACpB,WAAS,eAAe;AACvB,UAAM,EAAE,MAAM,SAAS,eAAe,IAAI;AAC1C,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,SAAO,IAAI,kBAAkB,YAAY;AAC1C;","names":[]}

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'Praėjusį' eeee p",
yesterday: "'Vakar' p",
today: "'Šiandien' p",
tomorrow: "'Rytoj' p",
nextWeek: "eeee p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1,11 @@
import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';
const isCustomValue = (v) => {
return Boolean(v && typeof v === "object" && v.mix && v.toValue);
};
const resolveFinalValueInKeyframes = (v) => {
// TODO maybe throw if v.length - 1 is placeholder token?
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
};
export { isCustomValue, resolveFinalValueInKeyframes };

View File

@@ -0,0 +1,3 @@
import type { MigrationConfig } from "../../migrator.js";
import type { AwsDataApiPgDatabase } from "./driver.js";
export declare function migrate<TSchema extends Record<string, unknown>>(db: AwsDataApiPgDatabase<TSchema>, config: MigrationConfig): Promise<void>;

View File

@@ -0,0 +1,559 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/eu/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "segundo bat baino gutxiago",
other: "{{count}} segundo baino gutxiago"
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundo"
},
halfAMinute: "minutu erdi",
lessThanXMinutes: {
one: "minutu bat baino gutxiago",
other: "{{count}} minutu baino gutxiago"
},
xMinutes: {
one: "1 minutu",
other: "{{count}} minutu"
},
aboutXHours: {
one: "1 ordu gutxi gorabehera",
other: "{{count}} ordu gutxi gorabehera"
},
xHours: {
one: "1 ordu",
other: "{{count}} ordu"
},
xDays: {
one: "1 egun",
other: "{{count}} egun"
},
aboutXWeeks: {
one: "aste 1 inguru",
other: "{{count}} aste inguru"
},
xWeeks: {
one: "1 aste",
other: "{{count}} astean"
},
aboutXMonths: {
one: "1 hilabete gutxi gorabehera",
other: "{{count}} hilabete gutxi gorabehera"
},
xMonths: {
one: "1 hilabete",
other: "{{count}} hilabete"
},
aboutXYears: {
one: "1 urte gutxi gorabehera",
other: "{{count}} urte gutxi gorabehera"
},
xYears: {
one: "1 urte",
other: "{{count}} urte"
},
overXYears: {
one: "1 urte baino gehiago",
other: "{{count}} urte baino gehiago"
},
almostXYears: {
one: "ia 1 urte",
other: "ia {{count}} urte"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "en " + result;
} else {
return "duela " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/eu/_lib/formatLong.js
var dateFormats = {
full: "EEEE, y'ko' MMMM'ren' d'a' y'ren'",
long: "y'ko' MMMM'ren' d'a'",
medium: "y MMM d",
short: "yy/MM/dd"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'tan' {{time}}",
long: "{{date}} 'tan' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/eu/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'joan den' eeee, LT",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: "eeee, p",
other: "P"
};
var formatRelativeLocalePlural = {
lastWeek: "'joan den' eeee, p",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: "eeee, p",
other: "P"
};
var formatRelative = function formatRelative(token, date) {
if (date.getHours() !== 1) {
return formatRelativeLocalePlural[token];
}
return formatRelativeLocale[token];
};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/eu/_lib/localize.js
var eraValues = {
narrow: ["k.a.", "k.o."],
abbreviated: ["k.a.", "k.o."],
wide: ["kristo aurretik", "kristo ondoren"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1H", "2H", "3H", "4H"],
wide: [
"1. hiruhilekoa",
"2. hiruhilekoa",
"3. hiruhilekoa",
"4. hiruhilekoa"]
};
var monthValues = {
narrow: ["u", "o", "m", "a", "m", "e", "u", "a", "i", "u", "a", "a"],
abbreviated: [
"urt",
"ots",
"mar",
"api",
"mai",
"eka",
"uzt",
"abu",
"ira",
"urr",
"aza",
"abe"],
wide: [
"urtarrila",
"otsaila",
"martxoa",
"apirila",
"maiatza",
"ekaina",
"uztaila",
"abuztua",
"iraila",
"urria",
"azaroa",
"abendua"]
};
var dayValues = {
narrow: ["i", "a", "a", "a", "o", "o", "l"],
short: ["ig", "al", "as", "az", "og", "or", "lr"],
abbreviated: ["iga", "ast", "ast", "ast", "ost", "ost", "lar"],
wide: [
"igandea",
"astelehena",
"asteartea",
"asteazkena",
"osteguna",
"ostirala",
"larunbata"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "ge",
noon: "eg",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "ge",
noon: "eg",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/eu/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(.)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(k.a.|k.o.)/i,
abbreviated: /^(k.a.|k.o.)/i,
wide: /^(kristo aurretik|kristo ondoren)/i
};
var parseEraPatterns = {
narrow: [/^k.a./i, /^k.o./i],
abbreviated: [/^(k.a.)/i, /^(k.o.)/i],
wide: [/^(kristo aurretik)/i, /^(kristo ondoren)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]H/i,
wide: /^[1234](.)? hiruhilekoa/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[uomaei]/i,
abbreviated: /^(urt|ots|mar|api|mai|eka|uzt|abu|ira|urr|aza|abe)/i,
wide: /^(urtarrila|otsaila|martxoa|apirila|maiatza|ekaina|uztaila|abuztua|iraila|urria|azaroa|abendua)/i
};
var parseMonthPatterns = {
narrow: [
/^u/i,
/^o/i,
/^m/i,
/^a/i,
/^m/i,
/^e/i,
/^u/i,
/^a/i,
/^i/i,
/^u/i,
/^a/i,
/^a/i],
any: [
/^urt/i,
/^ots/i,
/^mar/i,
/^api/i,
/^mai/i,
/^eka/i,
/^uzt/i,
/^abu/i,
/^ira/i,
/^urr/i,
/^aza/i,
/^abe/i]
};
var matchDayPatterns = {
narrow: /^[iaol]/i,
short: /^(ig|al|as|az|og|or|lr)/i,
abbreviated: /^(iga|ast|ast|ast|ost|ost|lar)/i,
wide: /^(igandea|astelehena|asteartea|asteazkena|osteguna|ostirala|larunbata)/i
};
var parseDayPatterns = {
narrow: [/^i/i, /^a/i, /^a/i, /^a/i, /^o/i, /^o/i, /^l/i],
short: [/^ig/i, /^al/i, /^as/i, /^az/i, /^og/i, /^or/i, /^lr/i],
abbreviated: [/^iga/i, /^ast/i, /^ast/i, /^ast/i, /^ost/i, /^ost/i, /^lar/i],
wide: [
/^igandea/i,
/^astelehena/i,
/^asteartea/i,
/^asteazkena/i,
/^osteguna/i,
/^ostirala/i,
/^larunbata/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|ge|eg|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i,
any: /^([ap]\.?\s?m\.?|gauerdia|eguerdia|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i
};
var parseDayPeriodPatterns = {
narrow: {
am: /^a/i,
pm: /^p/i,
midnight: /^ge/i,
noon: /^eg/i,
morning: /goiz/i,
afternoon: /arratsaldea/i,
evening: /arratsaldea/i,
night: /gau/i
},
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^gauerdia/i,
noon: /^eguerdia/i,
morning: /goiz/i,
afternoon: /arratsaldea/i,
evening: /arratsaldea/i,
night: /gau/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "wide"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/eu.js
var eu = {
code: "eu",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/eu/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
eu: eu }) });
//# debugId=C22264D9A0261B1964756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"InteractionManager.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/lib/InteractionManager.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IAKjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC;AAkBD;;GAEG;AACH,qBAAa,kBAAkB;IAC7B;;;;OAIG;IAEH,uBAAuB,EAAE,WAAW,EAAE,CAAM;IAE5C;;;OAGG;IAEH,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAG7D,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAGnE,8BAA8B,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IAGpE,kBAAkB;IAMlB;;;OAGG;IAEH,8BAA8B;IAS9B;;;;;OAKG;IAEH,aAAa,CAAC,KAAK,EAAE,sBAAsB;CAqD5C"}

View File

@@ -0,0 +1,3 @@
import type { SelectMode, SelectType } from '../types/index.js';
export declare const getSelectMode: (select: SelectType) => SelectMode;
//# sourceMappingURL=getSelectMode.d.ts.map

View File

@@ -0,0 +1,28 @@
var baseMerge = require('./_baseMerge'),
isObject = require('./isObject');
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
* objects into destination objects that are passed thru.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
module.exports = customDefaultsMerge;

View File

@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.memoize3 = memoize3;
/**
* Memoizes the provided three-argument function.
*/
function memoize3(fn) {
let cache0;
return function memoized(a1, a2, a3) {
if (cache0 === undefined) {
cache0 = new WeakMap();
}
let cache1 = cache0.get(a1);
if (cache1 === undefined) {
cache1 = new WeakMap();
cache0.set(a1, cache1);
}
let cache2 = cache1.get(a2);
if (cache2 === undefined) {
cache2 = new WeakMap();
cache1.set(a2, cache2);
}
let fnResult = cache2.get(a3);
if (fnResult === undefined) {
fnResult = fn(a1, a2, a3);
cache2.set(a3, fnResult);
}
return fnResult;
};
}

View File

@@ -0,0 +1,9 @@
/**
* If there is an incoming row id,
* and it matches the existing sibling doc id,
* this is an existing row, so it should be merged.
* Otherwise, return an empty object.
*/
import type { JsonObject } from '../../../types/index.js';
export declare const getExistingRowDoc: (incomingRow: JsonObject, existingRows?: unknown) => JsonObject;
//# sourceMappingURL=getExistingRowDoc.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("@lexical/rich-text"),n=require("@lexical/utils"),o=require("lexical"),r=require("react");function i(e){return[e.getKey(),e.getTextContent(),e.getTag()]}function s(e,t,n){if(null===t)return n;const o=i(t);let r=[];if(null===e){if(n.length>0&&n[0][0]===t.__key)return n;r=[o,...n]}else for(let i=0;i<n.length;i++){const s=n[i][0];if(r.push(n[i]),s===e.getKey()&&s!==t.getKey()){if(i+1<n.length&&n[i+1][0]===t.__key)return n;r.push(o)}}return r}function u(e,t){const n=[];for(const o of t)o[0]!==e&&n.push(o);return n}function l(e,t){const n=[];for(const o of t)o[0]===e.getKey()?n.push(i(e)):n.push(o);return n}function c(e,t,n){const o=[],r=i(t);e||o.push(r);for(const i of n)i[0]!==t.getKey()&&(o.push(i),e&&i[0]===e.getKey()&&o.push(r));return o}function d(e){let o=n.$getNextRightPreorderNode(e);for(;null!==o&&!t.$isHeadingNode(o);)o=n.$getNextRightPreorderNode(o);return o}exports.TableOfContentsPlugin=function({children:n}){const[i,g]=r.useState([]),[f]=e.useLexicalComposerContext();return r.useEffect((()=>{let e=[];f.getEditorState().read((()=>{const n=r=>{for(const i of r.getChildren())t.$isHeadingNode(i)?e.push([i.getKey(),i.getTextContent(),i.getTag()]):o.$isElementNode(i)&&n(i)};n(o.$getRoot()),g(e)}));const n=f.registerUpdateListener((({editorState:n,dirtyElements:r})=>{n.read((()=>{const n=r=>{for(const i of r.getChildren())if(t.$isHeadingNode(i)){const t=d(i);e=c(t,i,e),g(e)}else o.$isElementNode(i)&&n(i)};o.$getRoot().getChildren().forEach((e=>{o.$isElementNode(e)&&r.get(e.__key)&&n(e)}))}))})),r=f.registerMutationListener(t.HeadingNode,(t=>{f.getEditorState().read((()=>{for(const[n,r]of t)if("created"===r){const t=o.$getNodeByKey(n);if(null!==t){const n=d(t);e=s(n,t,e)}}else if("destroyed"===r)e=u(n,e);else if("updated"===r){const t=o.$getNodeByKey(n);if(null!==t){const n=d(t);e=c(n,t,e)}}g(e)}))}),{skipInitialization:!0}),i=f.registerMutationListener(o.TextNode,(n=>{f.getEditorState().read((()=>{for(const[r,i]of n)if("updated"===i){const n=o.$getNodeByKey(r);if(null!==n){const o=n.getParentOrThrow();t.$isHeadingNode(o)&&(e=l(o,e),g(e))}}}))}),{skipInitialization:!0});return()=>{r(),i(),n()}}),[f]),n(i,f)};

View File

@@ -0,0 +1,135 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { EntityType, getAccessResults } from 'payload';
import { formatAdminURL } from 'payload/shared';
import React from 'react';
import { Button } from '../../elements/Button/index.js';
import { Card } from '../../elements/Card/index.js';
import { Locked } from '../../elements/Locked/index.js';
import { getGlobalData } from '../../utilities/getGlobalData.js';
import { getNavGroups } from '../../utilities/getNavGroups.js';
import { getVisibleEntities } from '../../utilities/getVisibleEntities.js';
import './index.scss';
const baseClass = 'collections';
export async function CollectionCards(props) {
const {
i18n,
payload,
user
} = props.req;
const {
admin: adminRoute
} = payload.config.routes;
const {
t
} = i18n;
const permissions = await getAccessResults({
req: props.req
});
const visibleEntities = getVisibleEntities({
req: props.req
});
const globalData = await getGlobalData(props.req);
const navGroups = getNavGroups(permissions, visibleEntities, payload.config, i18n);
return /*#__PURE__*/_jsx("div", {
className: baseClass,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__wrap`,
children: !navGroups || navGroups?.length === 0 ? /*#__PURE__*/_jsx("p", {
children: "no nav groups...."
}) : navGroups.map(({
entities,
label
}, groupIndex) => {
return /*#__PURE__*/_jsxs("div", {
className: `${baseClass}__group`,
children: [/*#__PURE__*/_jsx("h2", {
className: `${baseClass}__label`,
children: label
}), /*#__PURE__*/_jsx("ul", {
className: `${baseClass}__card-list`,
children: entities.map(({
slug,
type,
label
}, entityIndex) => {
let title;
let buttonAriaLabel;
let createHREF;
let href;
let hasCreatePermission;
let isLocked = null;
let userEditing = null;
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (type === EntityType.collection) {
title = getTranslation(label, i18n);
buttonAriaLabel = t('general:showAllLabel', {
label: title
});
href = formatAdminURL({
adminRoute,
path: `/collections/${slug}`
});
createHREF = formatAdminURL({
adminRoute,
path: `/collections/${slug}/create`
});
hasCreatePermission = permissions?.collections?.[slug]?.create;
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (type === EntityType.global) {
title = getTranslation(label, i18n);
buttonAriaLabel = t('general:editLabel', {
label: getTranslation(label, i18n)
});
href = formatAdminURL({
adminRoute,
path: `/globals/${slug}`
});
// Find the lock status for the global
const globalLockData = globalData.find(global => global.slug === slug);
if (globalLockData) {
isLocked = globalLockData.data._isLocked;
userEditing = globalLockData.data._userEditing;
// Check if the lock is expired
const lockDuration = globalLockData?.lockDuration;
const lastEditedAt = new Date(globalLockData.data?._lastEditedAt).getTime();
const lockDurationInMilliseconds = lockDuration * 1000;
const lockExpirationTime = lastEditedAt + lockDurationInMilliseconds;
if (new Date().getTime() > lockExpirationTime) {
isLocked = false;
userEditing = null;
}
}
}
return /*#__PURE__*/_jsx("li", {
children: /*#__PURE__*/_jsx(Card, {
actions: isLocked && user?.id !== userEditing?.id ? /*#__PURE__*/_jsx(Locked, {
className: `${baseClass}__locked`,
user: userEditing
}) : hasCreatePermission && type === EntityType.collection ? /*#__PURE__*/_jsx(Button, {
"aria-label": t('general:createNewLabel', {
label
}),
buttonStyle: "icon-label",
el: "link",
icon: "plus",
iconStyle: "with-border",
round: true,
to: createHREF
}) : undefined,
buttonAriaLabel: buttonAriaLabel,
href: href,
id: `card-${slug}`,
title: getTranslation(label, i18n),
titleAs: "h3"
})
}, entityIndex);
})
})]
}, groupIndex);
})
})
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.zhHK = void 0;
var _index = require("./zh-HK/_lib/formatDistance.cjs");
var _index2 = require("./zh-HK/_lib/formatLong.cjs");
var _index3 = require("./zh-HK/_lib/formatRelative.cjs");
var _index4 = require("./zh-HK/_lib/localize.cjs");
var _index5 = require("./zh-HK/_lib/match.cjs");
/**
* @category Locales
* @summary Chinese Traditional locale.
* @language Chinese Traditional
* @iso-639-2 zho
* @author Gary Ip [@gaplo](https://github.com/gaplo)
*/
const zhHK = (exports.zhHK = {
code: "zh-HK",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,35 @@
var toArray = require('./toArray');
/**
* Gets the next value on a wrapped object following the
* [iterator protocol](https://mdn.io/iteration_protocols#iterator).
*
* @name next
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the next iterator value.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped.next();
* // => { 'done': false, 'value': 1 }
*
* wrapped.next();
* // => { 'done': false, 'value': 2 }
*
* wrapped.next();
* // => { 'done': true, 'value': undefined }
*/
function wrapperNext() {
if (this.__values__ === undefined) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
value = done ? undefined : this.__values__[this.__index__++];
return { 'done': done, 'value': value };
}
module.exports = wrapperNext;

View File

@@ -0,0 +1,4 @@
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
module.exports = _classStaticPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,83 @@
declare namespace locatePath {
interface Options {
/**
Current working directory.
@default process.cwd()
*/
readonly cwd?: string;
/**
Type of path to match.
@default 'file'
*/
readonly type?: 'file' | 'directory';
/**
Allow symbolic links to match if they point to the requested path type.
@default true
*/
readonly allowSymlinks?: boolean;
}
interface AsyncOptions extends Options {
/**
Number of concurrently pending promises. Minimum: `1`.
@default Infinity
*/
readonly concurrency?: number;
/**
Preserve `paths` order when searching.
Disable this to improve performance if you don't care about the order.
@default true
*/
readonly preserveOrder?: boolean;
}
}
declare const locatePath: {
/**
Synchronously get the first path that exists on disk of multiple paths.
@param paths - Paths to check.
@returns The first path that exists or `undefined` if none exists.
*/
sync: (
paths: Iterable<string>,
options?: locatePath.Options
) => string | undefined;
/**
Get the first path that exists on disk of multiple paths.
@param paths - Paths to check.
@returns The first path that exists or `undefined` if none exists.
@example
```
import locatePath = require('locate-path');
const files = [
'unicorn.png',
'rainbow.png', // Only this one actually exists on disk
'pony.png'
];
(async () => {
console(await locatePath(files));
//=> 'rainbow'
})();
```
*/
(paths: Iterable<string>, options?: locatePath.AsyncOptions): Promise<
string | undefined
>;
};
export = locatePath;

View File

@@ -0,0 +1,12 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.nav-toggler {
position: relative;
background: transparent;
padding: 0;
margin: 0;
border: 0;
cursor: pointer;
}
}

View File

@@ -0,0 +1,14 @@
import { Session, SessionAggregates } from '../types-hoist/session';
import { User } from '../types-hoist/user';
/**
* @internal
* @deprecated -- set ip inferral via via SDK metadata options on client instead.
*/
export declare function addAutoIpAddressToUser(objWithMaybeUser: {
user?: User | null;
}): void;
/**
* @internal
*/
export declare function addAutoIpAddressToSession(session: Session | SessionAggregates): void;
//# sourceMappingURL=ipAddress.d.ts.map

View File

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

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
/**
* Key is opaque string up to 256 characters printable. It MUST begin with a
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
* underscores _, dashes -, asterisks *, and forward slashes /.
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
* see https://www.w3.org/TR/trace-context/#key
*/
export function validateKey(key) {
return VALID_KEY_REGEX.test(key);
}
/**
* Value is opaque string up to 256 characters printable ASCII RFC0020
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
*/
export function validateValue(value) {
return (VALID_VALUE_BASE_REGEX.test(value) &&
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
}
//# sourceMappingURL=tracestate-validators.js.map

View File

@@ -0,0 +1,385 @@
/**
* 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 { useCollaborationContext } from '@lexical/react/LexicalCollaborationContext';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { initLocalState, syncLexicalUpdateToYjs, TOGGLE_CONNECT_COMMAND, syncCursorPositions, setLocalStateFocus, createUndoManager, CONNECTED_COMMAND, syncYjsChangesToLexical, createBinding } from '@lexical/yjs';
import * as React from 'react';
import { useRef, useCallback, useEffect, useMemo, useState } from 'react';
import { mergeRegister } from '@lexical/utils';
import { SKIP_COLLAB_TAG, COMMAND_PRIORITY_EDITOR, FOCUS_COMMAND, BLUR_COMMAND, UNDO_COMMAND, REDO_COMMAND, CAN_UNDO_COMMAND, CAN_REDO_COMMAND, $getRoot, HISTORY_MERGE_TAG, $createParagraphNode, $getSelection } from 'lexical';
import { createPortal } from 'react-dom';
import { UndoManager } from 'yjs';
import { jsx, Fragment } from 'react/jsx-runtime';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function useYjsCollaboration(editor, id, provider, docMap, name, color, shouldBootstrap, binding, setDoc, cursorsContainerRef, initialEditorState, awarenessData, syncCursorPositionsFn = syncCursorPositions) {
const isReloadingDoc = useRef(false);
const connect = useCallback(() => provider.connect(), [provider]);
const disconnect = useCallback(() => {
try {
provider.disconnect();
} catch (e) {
// Do nothing
}
}, [provider]);
useEffect(() => {
const {
root
} = binding;
const {
awareness
} = provider;
const onStatus = ({
status
}) => {
editor.dispatchCommand(CONNECTED_COMMAND, status === 'connected');
};
const onSync = isSynced => {
if (shouldBootstrap && isSynced && root.isEmpty() && root._xmlText._length === 0 && isReloadingDoc.current === false) {
initializeEditor(editor, initialEditorState);
}
isReloadingDoc.current = false;
};
const onAwarenessUpdate = () => {
syncCursorPositionsFn(binding, provider);
};
const onYjsTreeChanges = (events, transaction) => {
const origin = transaction.origin;
if (origin !== binding) {
const isFromUndoManger = origin instanceof UndoManager;
syncYjsChangesToLexical(binding, provider, events, isFromUndoManger, syncCursorPositionsFn);
}
};
initLocalState(provider, name, color, document.activeElement === editor.getRootElement(), awarenessData || {});
const onProviderDocReload = ydoc => {
clearEditorSkipCollab(editor, binding);
setDoc(ydoc);
docMap.set(id, ydoc);
isReloadingDoc.current = true;
};
provider.on('reload', onProviderDocReload);
provider.on('status', onStatus);
provider.on('sync', onSync);
awareness.on('update', onAwarenessUpdate);
// This updates the local editor state when we receive updates from other clients
root.getSharedType().observeDeep(onYjsTreeChanges);
const removeListener = editor.registerUpdateListener(({
prevEditorState,
editorState,
dirtyLeaves,
dirtyElements,
normalizedNodes,
tags
}) => {
if (tags.has(SKIP_COLLAB_TAG) === false) {
syncLexicalUpdateToYjs(binding, provider, prevEditorState, editorState, dirtyElements, dirtyLeaves, normalizedNodes, tags);
}
});
const connectionPromise = connect();
return () => {
if (isReloadingDoc.current === false) {
if (connectionPromise) {
connectionPromise.then(disconnect);
} else {
// Workaround for race condition in StrictMode. It's possible there
// is a different race for the above case where connect returns a
// promise, but we don't have an example of that in-repo.
// It's possible that there is a similar issue with
// TOGGLE_CONNECT_COMMAND below when the provider connect returns a
// promise.
// https://github.com/facebook/lexical/issues/6640
disconnect();
}
}
provider.off('sync', onSync);
provider.off('status', onStatus);
provider.off('reload', onProviderDocReload);
awareness.off('update', onAwarenessUpdate);
root.getSharedType().unobserveDeep(onYjsTreeChanges);
docMap.delete(id);
removeListener();
};
}, [binding, color, connect, disconnect, docMap, editor, id, initialEditorState, name, provider, shouldBootstrap, awarenessData, setDoc, syncCursorPositionsFn]);
const cursorsContainer = useMemo(() => {
const ref = element => {
binding.cursorsContainer = element;
};
return /*#__PURE__*/createPortal(/*#__PURE__*/jsx("div", {
ref: ref
}), cursorsContainerRef && cursorsContainerRef.current || document.body);
}, [binding, cursorsContainerRef]);
useEffect(() => {
return editor.registerCommand(TOGGLE_CONNECT_COMMAND, payload => {
const shouldConnect = payload;
if (shouldConnect) {
// eslint-disable-next-line no-console
console.log('Collaboration connected!');
connect();
} else {
// eslint-disable-next-line no-console
console.log('Collaboration disconnected!');
disconnect();
}
return true;
}, COMMAND_PRIORITY_EDITOR);
}, [connect, disconnect, editor]);
return cursorsContainer;
}
function useYjsFocusTracking(editor, provider, name, color, awarenessData) {
useEffect(() => {
return mergeRegister(editor.registerCommand(FOCUS_COMMAND, () => {
setLocalStateFocus(provider, name, color, true, awarenessData || {});
return false;
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(BLUR_COMMAND, () => {
setLocalStateFocus(provider, name, color, false, awarenessData || {});
return false;
}, COMMAND_PRIORITY_EDITOR));
}, [color, editor, name, provider, awarenessData]);
}
function useYjsHistory(editor, binding) {
const undoManager = useMemo(() => createUndoManager(binding, binding.root.getSharedType()), [binding]);
useEffect(() => {
const undo = () => {
undoManager.undo();
};
const redo = () => {
undoManager.redo();
};
return mergeRegister(editor.registerCommand(UNDO_COMMAND, () => {
undo();
return true;
}, COMMAND_PRIORITY_EDITOR), editor.registerCommand(REDO_COMMAND, () => {
redo();
return true;
}, COMMAND_PRIORITY_EDITOR));
});
const clearHistory = useCallback(() => {
undoManager.clear();
}, [undoManager]);
// Exposing undo and redo states
React.useEffect(() => {
const updateUndoRedoStates = () => {
editor.dispatchCommand(CAN_UNDO_COMMAND, undoManager.undoStack.length > 0);
editor.dispatchCommand(CAN_REDO_COMMAND, undoManager.redoStack.length > 0);
};
undoManager.on('stack-item-added', updateUndoRedoStates);
undoManager.on('stack-item-popped', updateUndoRedoStates);
undoManager.on('stack-cleared', updateUndoRedoStates);
return () => {
undoManager.off('stack-item-added', updateUndoRedoStates);
undoManager.off('stack-item-popped', updateUndoRedoStates);
undoManager.off('stack-cleared', updateUndoRedoStates);
};
}, [editor, undoManager]);
return clearHistory;
}
function initializeEditor(editor, initialEditorState) {
editor.update(() => {
const root = $getRoot();
if (root.isEmpty()) {
if (initialEditorState) {
switch (typeof initialEditorState) {
case 'string':
{
const parsedEditorState = editor.parseEditorState(initialEditorState);
editor.setEditorState(parsedEditorState, {
tag: HISTORY_MERGE_TAG
});
break;
}
case 'object':
{
editor.setEditorState(initialEditorState, {
tag: HISTORY_MERGE_TAG
});
break;
}
case 'function':
{
editor.update(() => {
const root1 = $getRoot();
if (root1.isEmpty()) {
initialEditorState(editor);
}
}, {
tag: HISTORY_MERGE_TAG
});
break;
}
}
} else {
const paragraph = $createParagraphNode();
root.append(paragraph);
const {
activeElement
} = document;
if ($getSelection() !== null || activeElement !== null && activeElement === editor.getRootElement()) {
paragraph.select();
}
}
}
}, {
tag: HISTORY_MERGE_TAG
});
}
function clearEditorSkipCollab(editor, binding) {
// reset editor state
editor.update(() => {
const root = $getRoot();
root.clear();
root.select();
}, {
tag: SKIP_COLLAB_TAG
});
if (binding.cursors == null) {
return;
}
const cursors = binding.cursors;
if (cursors == null) {
return;
}
const cursorsContainer = binding.cursorsContainer;
if (cursorsContainer == null) {
return;
}
// reset cursors in dom
const cursorsArr = Array.from(cursors.values());
for (let i = 0; i < cursorsArr.length; i++) {
const cursor = cursorsArr[i];
const selection = cursor.selection;
if (selection && selection.selections != null) {
const selections = selection.selections;
for (let j = 0; j < selections.length; j++) {
cursorsContainer.removeChild(selections[i]);
}
}
}
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function CollaborationPlugin({
id,
providerFactory,
shouldBootstrap,
username,
cursorColor,
cursorsContainerRef,
initialEditorState,
excludedProperties,
awarenessData,
syncCursorPositionsFn
}) {
const isBindingInitialized = useRef(false);
const isProviderInitialized = useRef(false);
const collabContext = useCollaborationContext(username, cursorColor);
const {
yjsDocMap,
name,
color
} = collabContext;
const [editor] = useLexicalComposerContext();
useEffect(() => {
collabContext.isCollabActive = true;
return () => {
// Resetting flag only when unmount top level editor collab plugin. Nested
// editors (e.g. image caption) should unmount without affecting it
if (editor._parentEditor == null) {
collabContext.isCollabActive = false;
}
};
}, [collabContext, editor]);
const [provider, setProvider] = useState();
const [doc, setDoc] = useState();
useEffect(() => {
if (isProviderInitialized.current) {
return;
}
isProviderInitialized.current = true;
const newProvider = providerFactory(id, yjsDocMap);
setProvider(newProvider);
setDoc(yjsDocMap.get(id));
return () => {
newProvider.disconnect();
};
}, [id, providerFactory, yjsDocMap]);
const [binding, setBinding] = useState();
useEffect(() => {
if (!provider) {
return;
}
if (isBindingInitialized.current) {
return;
}
isBindingInitialized.current = true;
const newBinding = createBinding(editor, provider, id, doc || yjsDocMap.get(id), yjsDocMap, excludedProperties);
setBinding(newBinding);
return () => {
newBinding.root.destroy(newBinding);
};
}, [editor, provider, id, yjsDocMap, doc, excludedProperties]);
if (!provider || !binding) {
return /*#__PURE__*/jsx(Fragment, {});
}
return /*#__PURE__*/jsx(YjsCollaborationCursors, {
awarenessData: awarenessData,
binding: binding,
collabContext: collabContext,
color: color,
cursorsContainerRef: cursorsContainerRef,
editor: editor,
id: id,
initialEditorState: initialEditorState,
name: name,
provider: provider,
setDoc: setDoc,
shouldBootstrap: shouldBootstrap,
yjsDocMap: yjsDocMap,
syncCursorPositionsFn: syncCursorPositionsFn
});
}
function YjsCollaborationCursors({
editor,
id,
provider,
yjsDocMap,
name,
color,
shouldBootstrap,
cursorsContainerRef,
initialEditorState,
awarenessData,
collabContext,
binding,
setDoc,
syncCursorPositionsFn
}) {
const cursors = useYjsCollaboration(editor, id, provider, yjsDocMap, name, color, shouldBootstrap, binding, setDoc, cursorsContainerRef, initialEditorState, awarenessData, syncCursorPositionsFn);
collabContext.clientID = binding.clientID;
useYjsHistory(editor, binding);
useYjsFocusTracking(editor, provider, name, color, awarenessData);
return cursors;
}
export { CollaborationPlugin };

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareCode = createLucideIcon("SquareCode", [
["path", { d: "M10 9.5 8 12l2 2.5", key: "3mjy60" }],
["path", { d: "m14 9.5 2 2.5-2 2.5", key: "1bir2l" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { SquareCode as default };
//# sourceMappingURL=square-code.js.map

View File

@@ -0,0 +1,138 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const _exports = require('../../exports.js');
const spanstatus = require('../spanstatus.js');
const genAiAttributes = require('../ai/gen-ai-attributes.js');
/**
* State object used to accumulate information from a stream of Google GenAI events.
*/
/**
* Checks if a response chunk contains an error
* @param chunk - The response chunk to check
* @param span - The span to update if error is found
* @returns Whether an error occurred
*/
function isErrorChunk(chunk, span) {
const feedback = chunk?.promptFeedback;
if (feedback?.blockReason) {
const message = feedback.blockReasonMessage ?? feedback.blockReason;
span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: `Content blocked: ${message}` });
_exports.captureException(`Content blocked: ${message}`, {
mechanism: { handled: false, type: 'auto.ai.google_genai' },
});
return true;
}
return false;
}
/**
* Processes response metadata from a chunk
* @param chunk - The response chunk to process
* @param state - The state of the streaming process
*/
function handleResponseMetadata(chunk, state) {
if (typeof chunk.responseId === 'string') state.responseId = chunk.responseId;
if (typeof chunk.modelVersion === 'string') state.responseModel = chunk.modelVersion;
const usage = chunk.usageMetadata;
if (usage) {
if (typeof usage.promptTokenCount === 'number') state.promptTokens = usage.promptTokenCount;
if (typeof usage.candidatesTokenCount === 'number') state.completionTokens = usage.candidatesTokenCount;
if (typeof usage.totalTokenCount === 'number') state.totalTokens = usage.totalTokenCount;
}
}
/**
* Processes candidate content from a response chunk
* @param chunk - The response chunk to process
* @param state - The state of the streaming process
* @param recordOutputs - Whether to record outputs
*/
function handleCandidateContent(chunk, state, recordOutputs) {
if (Array.isArray(chunk.functionCalls)) {
state.toolCalls.push(...chunk.functionCalls);
}
for (const candidate of chunk.candidates ?? []) {
if (candidate?.finishReason && !state.finishReasons.includes(candidate.finishReason)) {
state.finishReasons.push(candidate.finishReason);
}
for (const part of candidate?.content?.parts ?? []) {
if (recordOutputs && part.text) state.responseTexts.push(part.text);
if (part.functionCall) {
state.toolCalls.push({
type: 'function',
id: part.functionCall.id,
name: part.functionCall.name,
arguments: part.functionCall.args,
});
}
}
}
}
/**
* Processes a single chunk from the Google GenAI stream
* @param chunk - The chunk to process
* @param state - The state of the streaming process
* @param recordOutputs - Whether to record outputs
* @param span - The span to update
*/
function processChunk(chunk, state, recordOutputs, span) {
if (!chunk || isErrorChunk(chunk, span)) return;
handleResponseMetadata(chunk, state);
handleCandidateContent(chunk, state, recordOutputs);
}
/**
* Instruments an async iterable stream of Google GenAI response chunks, updates the span with
* streaming attributes and (optionally) the aggregated output text, and yields
* each chunk from the input stream unchanged.
*/
async function* instrumentStream(
stream,
span,
recordOutputs,
) {
const state = {
responseTexts: [],
finishReasons: [],
toolCalls: [],
};
try {
for await (const chunk of stream) {
processChunk(chunk, state, recordOutputs, span);
yield chunk;
}
} finally {
const attrs = {
[genAiAttributes.GEN_AI_RESPONSE_STREAMING_ATTRIBUTE]: true,
};
if (state.responseId) attrs[genAiAttributes.GEN_AI_RESPONSE_ID_ATTRIBUTE] = state.responseId;
if (state.responseModel) attrs[genAiAttributes.GEN_AI_RESPONSE_MODEL_ATTRIBUTE] = state.responseModel;
if (state.promptTokens !== undefined) attrs[genAiAttributes.GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = state.promptTokens;
if (state.completionTokens !== undefined) attrs[genAiAttributes.GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] = state.completionTokens;
if (state.totalTokens !== undefined) attrs[genAiAttributes.GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = state.totalTokens;
if (state.finishReasons.length) {
attrs[genAiAttributes.GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE] = JSON.stringify(state.finishReasons);
}
if (recordOutputs && state.responseTexts.length) {
attrs[genAiAttributes.GEN_AI_RESPONSE_TEXT_ATTRIBUTE] = state.responseTexts.join('');
}
if (recordOutputs && state.toolCalls.length) {
attrs[genAiAttributes.GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE] = JSON.stringify(state.toolCalls);
}
span.setAttributes(attrs);
span.end();
}
}
exports.instrumentStream = instrumentStream;
//# sourceMappingURL=streaming.js.map

View File

@@ -0,0 +1,40 @@
"use strict";
exports.min = min;
var _index = require("./toDate.js");
/**
* @name min
* @category Common Helpers
* @summary Returns the earliest of the given dates.
*
* @description
* Returns the earliest of the given dates.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dates - The dates to compare
*
* @returns The earliest of the dates
*
* @example
* // Which of these dates is the earliest?
* const result = min([
* new Date(1989, 6, 10),
* new Date(1987, 1, 11),
* new Date(1995, 6, 2),
* new Date(1990, 0, 1)
* ])
* //=> Wed Feb 11 1987 00:00:00
*/
function min(dates) {
let result;
dates.forEach((dirtyDate) => {
const date = (0, _index.toDate)(dirtyDate);
if (!result || result > date || isNaN(+date)) {
result = date;
}
});
return result || new Date(NaN);
}

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