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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,80 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_crypto_1 = require("node:crypto");
const check_iv_length_js_1 = require("../lib/check_iv_length.js");
const check_cek_length_js_1 = require("./check_cek_length.js");
const buffer_utils_js_1 = require("../lib/buffer_utils.js");
const cbc_tag_js_1 = require("./cbc_tag.js");
const webcrypto_js_1 = require("./webcrypto.js");
const crypto_key_js_1 = require("../lib/crypto_key.js");
const is_key_object_js_1 = require("./is_key_object.js");
const invalid_key_input_js_1 = require("../lib/invalid_key_input.js");
const iv_js_1 = require("../lib/iv.js");
const errors_js_1 = require("../util/errors.js");
const ciphers_js_1 = require("./ciphers.js");
const is_key_like_js_1 = require("./is_key_like.js");
function cbcEncrypt(enc, plaintext, cek, iv, aad) {
const keySize = parseInt(enc.slice(1, 4), 10);
if ((0, is_key_object_js_1.default)(cek)) {
cek = cek.export();
}
const encKey = cek.subarray(keySize >> 3);
const macKey = cek.subarray(0, keySize >> 3);
const algorithm = `aes-${keySize}-cbc`;
if (!(0, ciphers_js_1.default)(algorithm)) {
throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);
}
const cipher = (0, node_crypto_1.createCipheriv)(algorithm, encKey, iv);
const ciphertext = (0, buffer_utils_js_1.concat)(cipher.update(plaintext), cipher.final());
const macSize = parseInt(enc.slice(-3), 10);
const tag = (0, cbc_tag_js_1.default)(aad, iv, ciphertext, macSize, macKey, keySize);
return { ciphertext, tag, iv };
}
function gcmEncrypt(enc, plaintext, cek, iv, aad) {
const keySize = parseInt(enc.slice(1, 4), 10);
const algorithm = `aes-${keySize}-gcm`;
if (!(0, ciphers_js_1.default)(algorithm)) {
throw new errors_js_1.JOSENotSupported(`alg ${enc} is not supported by your javascript runtime`);
}
const cipher = (0, node_crypto_1.createCipheriv)(algorithm, cek, iv, { authTagLength: 16 });
if (aad.byteLength) {
cipher.setAAD(aad, { plaintextLength: plaintext.length });
}
const ciphertext = cipher.update(plaintext);
cipher.final();
const tag = cipher.getAuthTag();
return { ciphertext, tag, iv };
}
const encrypt = (enc, plaintext, cek, iv, aad) => {
let key;
if ((0, webcrypto_js_1.isCryptoKey)(cek)) {
(0, crypto_key_js_1.checkEncCryptoKey)(cek, enc, 'encrypt');
key = node_crypto_1.KeyObject.from(cek);
}
else if (cek instanceof Uint8Array || (0, is_key_object_js_1.default)(cek)) {
key = cek;
}
else {
throw new TypeError((0, invalid_key_input_js_1.default)(cek, ...is_key_like_js_1.types, 'Uint8Array'));
}
(0, check_cek_length_js_1.default)(enc, key);
if (iv) {
(0, check_iv_length_js_1.default)(enc, iv);
}
else {
iv = (0, iv_js_1.default)(enc);
}
switch (enc) {
case 'A128CBC-HS256':
case 'A192CBC-HS384':
case 'A256CBC-HS512':
return cbcEncrypt(enc, plaintext, key, iv, aad);
case 'A128GCM':
case 'A192GCM':
case 'A256GCM':
return gcmEncrypt(enc, plaintext, key, iv, aad);
default:
throw new errors_js_1.JOSENotSupported('Unsupported JWE Content Encryption Algorithm');
}
};
exports.default = encrypt;
@@ -0,0 +1,90 @@
/*
* 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.
*/
export var SemconvStability;
(function (SemconvStability) {
/** Emit only stable semantic conventions. */
SemconvStability[SemconvStability["STABLE"] = 1] = "STABLE";
/** Emit only old semantic conventions. */
SemconvStability[SemconvStability["OLD"] = 2] = "OLD";
/** Emit both stable and old semantic conventions. */
SemconvStability[SemconvStability["DUPLICATE"] = 3] = "DUPLICATE";
})(SemconvStability || (SemconvStability = {}));
/**
* Determine the appropriate semconv stability for the given namespace.
*
* This will parse the given string of comma-separated values (often
* `process.env.OTEL_SEMCONV_STABILITY_OPT_IN`) looking for the `${namespace}`
* or `${namespace}/dup` tokens. This is a pattern defined by a number of
* non-normative semconv documents.
*
* For example:
* - namespace 'http': https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/
* - namespace 'database': https://opentelemetry.io/docs/specs/semconv/non-normative/database-migration/
* - namespace 'k8s': https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-migration/
*
* Usage:
*
* import {SemconvStability, semconvStabilityFromStr} from '@opentelemetry/instrumentation';
*
* export class FooInstrumentation extends InstrumentationBase<FooInstrumentationConfig> {
* private _semconvStability: SemconvStability;
* constructor(config: FooInstrumentationConfig = {}) {
* super('@opentelemetry/instrumentation-foo', VERSION, config);
*
* // When supporting the OTEL_SEMCONV_STABILITY_OPT_IN envvar
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* process.env.OTEL_SEMCONV_STABILITY_OPT_IN
* );
*
* // or when supporting a `semconvStabilityOptIn` config option (e.g. for
* // the web where there are no envvars).
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* config?.semconvStabilityOptIn
* );
* }
* }
*
* // Then, to apply semconv, use the following or similar:
* if (this._semconvStability & SemconvStability.OLD) {
* // ...
* }
* if (this._semconvStability & SemconvStability.STABLE) {
* // ...
* }
*
*/
export function semconvStabilityFromStr(namespace, str) {
let semconvStability = SemconvStability.OLD;
// The same parsing of `str` as `getStringListFromEnv` from the core pkg.
const entries = str
?.split(',')
.map(v => v.trim())
.filter(s => s !== '');
for (const entry of entries ?? []) {
if (entry.toLowerCase() === namespace + '/dup') {
// DUPLICATE takes highest precedence.
semconvStability = SemconvStability.DUPLICATE;
break;
}
else if (entry.toLowerCase() === namespace) {
semconvStability = SemconvStability.STABLE;
}
}
return semconvStability;
}
//# sourceMappingURL=semconvStability.js.map
@@ -0,0 +1,101 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "menos de um segundo",
other: "menos de {{count}} segundos",
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundos",
},
halfAMinute: "meio minuto",
lessThanXMinutes: {
one: "menos de um minuto",
other: "menos de {{count}} minutos",
},
xMinutes: {
one: "1 minuto",
other: "{{count}} minutos",
},
aboutXHours: {
one: "cerca de 1 hora",
other: "cerca de {{count}} horas",
},
xHours: {
one: "1 hora",
other: "{{count}} horas",
},
xDays: {
one: "1 dia",
other: "{{count}} dias",
},
aboutXWeeks: {
one: "cerca de 1 semana",
other: "cerca de {{count}} semanas",
},
xWeeks: {
one: "1 semana",
other: "{{count}} semanas",
},
aboutXMonths: {
one: "cerca de 1 mês",
other: "cerca de {{count}} meses",
},
xMonths: {
one: "1 mês",
other: "{{count}} meses",
},
aboutXYears: {
one: "cerca de 1 ano",
other: "cerca de {{count}} anos",
},
xYears: {
one: "1 ano",
other: "{{count}} anos",
},
overXYears: {
one: "mais de 1 ano",
other: "mais de {{count}} anos",
},
almostXYears: {
one: "quase 1 ano",
other: "quase {{count}} anos",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "em " + result;
} else {
return "há " + result;
}
}
return result;
};
@@ -0,0 +1 @@
{"version":3,"file":"book-x.js","sources":["../../../src/icons/book-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTQuNSA3LTUgNSIgLz4KICA8cGF0aCBkPSJNNCAxOS41di0xNUEyLjUgMi41IDAgMCAxIDYuNSAySDE5YTEgMSAwIDAgMSAxIDF2MThhMSAxIDAgMCAxLTEgMUg2LjVhMSAxIDAgMCAxIDAtNUgyMCIgLz4KICA8cGF0aCBkPSJtOS41IDcgNSA1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/book-x\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 BookX = createLucideIcon('BookX', [\n ['path', { d: 'm14.5 7-5 5', key: 'dy991v' }],\n [\n 'path',\n {\n d: 'M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20',\n key: 'k3hazp',\n },\n ],\n ['path', { d: 'm9.5 7 5 5', key: 's45iea' }],\n]);\n\nexport default BookX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "simvol", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "element", verb: "olmalıdır" },
set: { unit: "element", verb: "olmalıdır" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Yanlış dəyər: gözlənilən ${issue.expected}, daxil olan ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Yanlış dəyər: gözlənilən ${util.stringifyPrimitive(issue.values[0])}`;
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
if (_issue.format === "ends_with") return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
if (_issue.format === "includes") return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
if (_issue.format === "regex") return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
return `Yanlış ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Yanlış ədəd: ${issue.divisor} ilə bölünə bilən olmalıdır`;
case "unrecognized_keys":
return `Tanınmayan açar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} daxilində yanlış açar`;
case "invalid_union":
return "Yanlış dəyər";
case "invalid_element":
return `${issue.origin} daxilində yanlış dəyər`;
default:
return `Yanlış dəyər`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,131 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["v.C.", "n.C."],
abbreviated: ["v.Chr.", "n.Chr."],
wide: ["voor Christus", "na Christus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1e kwartaal", "2e kwartaal", "3e kwartaal", "4e kwartaal"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jan.",
"feb.",
"mrt.",
"apr.",
"mei",
"jun.",
"jul.",
"aug.",
"sep.",
"okt.",
"nov.",
"dec.",
],
wide: [
"januari",
"februari",
"maart",
"april",
"mei",
"juni",
"juli",
"augustus",
"september",
"oktober",
"november",
"december",
],
};
const dayValues = {
narrow: ["Z", "M", "D", "W", "D", "V", "Z"],
short: ["zo", "ma", "di", "wo", "do", "vr", "za"],
abbreviated: ["zon", "maa", "din", "woe", "don", "vri", "zat"],
wide: [
"zondag",
"maandag",
"dinsdag",
"woensdag",
"donderdag",
"vrijdag",
"zaterdag",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
wide: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "e";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
}),
});
@@ -0,0 +1,32 @@
(function (Prism) {
/**
* Based on the manual by Wouter van Oortmerssen.
*
* @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
*/
Prism.languages['false'] = {
'comment': {
pattern: /\{[^}]*\}/
},
'string': {
pattern: /"[^"]*"/,
greedy: true
},
'character-code': {
pattern: /'(?:[^\r]|\r\n?)/,
alias: 'number'
},
'assembler-code': {
pattern: /\d+`/,
alias: 'important'
},
'number': /\d+/,
'operator': /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
'punctuation': /\[|\]/,
'variable': /[a-z]/,
'non-standard': {
pattern: /[()<BDO®]/,
alias: 'bold'
}
};
}(Prism));
@@ -0,0 +1 @@
{"version":3,"file":"map-pin-minus.js","sources":["../../../src/icons/map-pin-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MapPinMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTguOTc3IDE0QzE5LjYgMTIuNzAxIDIwIDExLjM0MyAyMCAxMGE4IDggMCAwIDAtMTYgMGMwIDQuOTkzIDUuNTM5IDEwLjE5MyA3LjM5OSAxMS43OTlhMSAxIDAgMCAwIDEuMjAyIDAgMzIgMzIgMCAwIDAgLjgyNC0uNzM4IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTAiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTE2IDE4aDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/map-pin-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 MapPinMinus = createLucideIcon('MapPinMinus', [\n [\n 'path',\n {\n d: 'M18.977 14C19.6 12.701 20 11.343 20 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 1.202 0 32 32 0 0 0 .824-.738',\n key: '11uxia',\n },\n ],\n ['circle', { cx: '12', cy: '10', r: '3', key: 'ilqhr7' }],\n ['path', { d: 'M16 18h6', key: '987eiv' }],\n]);\n\nexport default MapPinMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,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;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,498 @@
/**
* Copyright (c) 2019-present, GraphQL Foundation
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
*/
// A Function, which when given an Array of keys, returns a Promise of an Array
// of values or Errors.
export type BatchLoadFn<K, V> = (
keys: $ReadOnlyArray<K>,
) => Promise<$ReadOnlyArray<V | Error>>;
// Optionally turn off batching or caching or provide a cache key function or a
// custom cache instance.
export type Options<K, V, C = K> = {
batch?: boolean,
maxBatchSize?: number,
batchScheduleFn?: (callback: () => void) => void,
cache?: boolean,
cacheKeyFn?: (key: K) => C,
cacheMap?: CacheMap<C, Promise<V>> | null,
name?: string,
};
// If a custom cache is provided, it must be of this type (a subset of ES6 Map).
export type CacheMap<K, V> = {
get(key: K): V | void,
set(key: K, value: V): any,
delete(key: K): any,
clear(): any,
};
/**
* A `DataLoader` creates a public API for loading data from a particular
* data back-end with unique keys such as the `id` column of a SQL table or
* document name in a MongoDB database, given a batch loading function.
*
* Each `DataLoader` instance contains a unique memoized cache. Use caution when
* used in long-lived applications or those which serve many users with
* different access permissions and consider creating a new instance per
* web request.
*/
class DataLoader<K, V, C = K> {
constructor(batchLoadFn: BatchLoadFn<K, V>, options?: Options<K, V, C>) {
if (typeof batchLoadFn !== 'function') {
throw new TypeError(
'DataLoader must be constructed with a function which accepts ' +
`Array<key> and returns Promise<Array<value>>, but got: ${batchLoadFn}.`,
);
}
this._batchLoadFn = batchLoadFn;
this._maxBatchSize = getValidMaxBatchSize(options);
this._batchScheduleFn = getValidBatchScheduleFn(options);
this._cacheKeyFn = getValidCacheKeyFn(options);
this._cacheMap = getValidCacheMap(options);
this._batch = null;
this.name = getValidName(options);
}
// Private
_batchLoadFn: BatchLoadFn<K, V>;
_maxBatchSize: number;
_batchScheduleFn: (() => void) => void;
_cacheKeyFn: K => C;
_cacheMap: CacheMap<C, Promise<V>> | null;
_batch: Batch<K, V> | null;
/**
* Loads a key, returning a `Promise` for the value represented by that key.
*/
load(key: K): Promise<V> {
if (key === null || key === undefined) {
throw new TypeError(
'The loader.load() function must be called with a value, ' +
`but got: ${String(key)}.`,
);
}
const batch = getCurrentBatch(this);
const cacheMap = this._cacheMap;
let cacheKey: ?C;
// If caching and there is a cache-hit, return cached Promise.
if (cacheMap) {
cacheKey = this._cacheKeyFn(key);
const cachedPromise = cacheMap.get(cacheKey);
if (cachedPromise) {
const cacheHits = batch.cacheHits || (batch.cacheHits = []);
return new Promise(resolve => {
cacheHits.push(() => {
resolve(cachedPromise);
});
});
}
}
// Otherwise, produce a new Promise for this key, and enqueue it to be
// dispatched along with the current batch.
batch.keys.push(key);
const promise = new Promise((resolve, reject) => {
batch.callbacks.push({ resolve, reject });
});
// If caching, cache this promise.
if (cacheMap) {
cacheMap.set((cacheKey: any), promise);
}
return promise;
}
/**
* Loads multiple keys, promising an array of values:
*
* var [ a, b ] = await myLoader.loadMany([ 'a', 'b' ]);
*
* This is similar to the more verbose:
*
* var [ a, b ] = await Promise.all([
* myLoader.load('a'),
* myLoader.load('b')
* ]);
*
* However it is different in the case where any load fails. Where
* Promise.all() would reject, loadMany() always resolves, however each result
* is either a value or an Error instance.
*
* var [ a, b, c ] = await myLoader.loadMany([ 'a', 'b', 'badkey' ]);
* // c instanceof Error
*
*/
loadMany(keys: $ReadOnlyArray<K>): Promise<Array<V | Error>> {
if (!isArrayLike(keys)) {
throw new TypeError(
'The loader.loadMany() function must be called with Array<key> ' +
`but got: ${(keys: any)}.`,
);
}
// Support ArrayLike by using only minimal property access
const loadPromises = [];
for (let i = 0; i < keys.length; i++) {
loadPromises.push(this.load(keys[i]).catch(error => error));
}
return Promise.all(loadPromises);
}
/**
* Clears the value at `key` from the cache, if it exists. Returns itself for
* method chaining.
*/
clear(key: K): this {
const cacheMap = this._cacheMap;
if (cacheMap) {
const cacheKey = this._cacheKeyFn(key);
cacheMap.delete(cacheKey);
}
return this;
}
/**
* Clears the entire cache. To be used when some event results in unknown
* invalidations across this particular `DataLoader`. Returns itself for
* method chaining.
*/
clearAll(): this {
const cacheMap = this._cacheMap;
if (cacheMap) {
cacheMap.clear();
}
return this;
}
/**
* Adds the provided key and value to the cache. If the key already
* exists, no change is made. Returns itself for method chaining.
*
* To prime the cache with an error at a key, provide an Error instance.
*/
prime(key: K, value: V | Promise<V> | Error): this {
const cacheMap = this._cacheMap;
if (cacheMap) {
const cacheKey = this._cacheKeyFn(key);
// Only add the key if it does not already exist.
if (cacheMap.get(cacheKey) === undefined) {
// Cache a rejected promise if the value is an Error, in order to match
// the behavior of load(key).
let promise;
if (value instanceof Error) {
promise = Promise.reject(value);
// Since this is a case where an Error is intentionally being primed
// for a given key, we want to disable unhandled promise rejection.
promise.catch(() => {});
} else {
promise = Promise.resolve(value);
}
cacheMap.set(cacheKey, promise);
}
}
return this;
}
/**
* The name given to this `DataLoader` instance. Useful for APM tools.
*
* Is `null` if not set in the constructor.
*/
name: string | null;
}
// Private: Enqueue a Job to be executed after all "PromiseJobs" Jobs.
//
// ES6 JavaScript uses the concepts Job and JobQueue to schedule work to occur
// after the current execution context has completed:
// http://www.ecma-international.org/ecma-262/6.0/#sec-jobs-and-job-queues
//
// Node.js uses the `process.nextTick` mechanism to implement the concept of a
// Job, maintaining a global FIFO JobQueue for all Jobs, which is flushed after
// the current call stack ends.
//
// When calling `then` on a Promise, it enqueues a Job on a specific
// "PromiseJobs" JobQueue which is flushed in Node as a single Job on the
// global JobQueue.
//
// DataLoader batches all loads which occur in a single frame of execution, but
// should include in the batch all loads which occur during the flushing of the
// "PromiseJobs" JobQueue after that same execution frame.
//
// In order to avoid the DataLoader dispatch Job occuring before "PromiseJobs",
// A Promise Job is created with the sole purpose of enqueuing a global Job,
// ensuring that it always occurs after "PromiseJobs" ends.
//
// Node.js's job queue is unique. Browsers do not have an equivalent mechanism
// for enqueuing a job to be performed after promise microtasks and before the
// next macrotask. For browser environments, a macrotask is used (via
// setImmediate or setTimeout) at a potential performance penalty.
const enqueuePostPromiseJob =
typeof process === 'object' && typeof process.nextTick === 'function'
? function (fn) {
if (!resolvedPromise) {
resolvedPromise = Promise.resolve();
}
resolvedPromise.then(() => {
process.nextTick(fn);
});
}
: typeof setImmediate === 'function'
? function (fn) {
setImmediate(fn);
}
: function (fn) {
setTimeout(fn);
};
// Private: cached resolved Promise instance
let resolvedPromise;
// Private: Describes a batch of requests
type Batch<K, V> = {
hasDispatched: boolean,
keys: Array<K>,
callbacks: Array<{
resolve: (value: V) => void,
reject: (error: Error) => void,
}>,
cacheHits?: Array<() => void>,
};
// Private: Either returns the current batch, or creates and schedules a
// dispatch of a new batch for the given loader.
function getCurrentBatch<K, V>(loader: DataLoader<K, V, any>): Batch<K, V> {
// If there is an existing batch which has not yet dispatched and is within
// the limit of the batch size, then return it.
const existingBatch = loader._batch;
if (
existingBatch !== null &&
!existingBatch.hasDispatched &&
existingBatch.keys.length < loader._maxBatchSize
) {
return existingBatch;
}
// Otherwise, create a new batch for this loader.
const newBatch = { hasDispatched: false, keys: [], callbacks: [] };
// Store it on the loader so it may be reused.
loader._batch = newBatch;
// Then schedule a task to dispatch this batch of requests.
loader._batchScheduleFn(() => {
dispatchBatch(loader, newBatch);
});
return newBatch;
}
function dispatchBatch<K, V>(
loader: DataLoader<K, V, any>,
batch: Batch<K, V>,
) {
// Mark this batch as having been dispatched.
batch.hasDispatched = true;
// If there's nothing to load, resolve any cache hits and return early.
if (batch.keys.length === 0) {
resolveCacheHits(batch);
return;
}
// Call the provided batchLoadFn for this loader with the batch's keys and
// with the loader as the `this` context.
let batchPromise;
try {
batchPromise = loader._batchLoadFn(batch.keys);
} catch (e) {
return failedDispatch(
loader,
batch,
new TypeError(
'DataLoader must be constructed with a function which accepts ' +
'Array<key> and returns Promise<Array<value>>, but the function ' +
`errored synchronously: ${String(e)}.`,
),
);
}
// Assert the expected response from batchLoadFn
if (!batchPromise || typeof batchPromise.then !== 'function') {
return failedDispatch(
loader,
batch,
new TypeError(
'DataLoader must be constructed with a function which accepts ' +
'Array<key> and returns Promise<Array<value>>, but the function did ' +
`not return a Promise: ${String(batchPromise)}.`,
),
);
}
// Await the resolution of the call to batchLoadFn.
batchPromise
.then(values => {
// Assert the expected resolution from batchLoadFn.
if (!isArrayLike(values)) {
throw new TypeError(
'DataLoader must be constructed with a function which accepts ' +
'Array<key> and returns Promise<Array<value>>, but the function did ' +
`not return a Promise of an Array: ${String(values)}.`,
);
}
if (values.length !== batch.keys.length) {
throw new TypeError(
'DataLoader must be constructed with a function which accepts ' +
'Array<key> and returns Promise<Array<value>>, but the function did ' +
'not return a Promise of an Array of the same length as the Array ' +
'of keys.' +
`\n\nKeys:\n${String(batch.keys)}` +
`\n\nValues:\n${String(values)}`,
);
}
// Resolve all cache hits in the same micro-task as freshly loaded values.
resolveCacheHits(batch);
// Step through values, resolving or rejecting each Promise in the batch.
for (let i = 0; i < batch.callbacks.length; i++) {
const value = values[i];
if (value instanceof Error) {
batch.callbacks[i].reject(value);
} else {
batch.callbacks[i].resolve(value);
}
}
})
.catch(error => {
failedDispatch(loader, batch, error);
});
}
// Private: do not cache individual loads if the entire batch dispatch fails,
// but still reject each request so they do not hang.
function failedDispatch<K, V>(
loader: DataLoader<K, V, any>,
batch: Batch<K, V>,
error: Error,
) {
// Cache hits are resolved, even though the batch failed.
resolveCacheHits(batch);
for (let i = 0; i < batch.keys.length; i++) {
loader.clear(batch.keys[i]);
batch.callbacks[i].reject(error);
}
}
// Private: Resolves the Promises for any cache hits in this batch.
function resolveCacheHits(batch: Batch<any, any>) {
if (batch.cacheHits) {
for (let i = 0; i < batch.cacheHits.length; i++) {
batch.cacheHits[i]();
}
}
}
// Private: given the DataLoader's options, produce a valid max batch size.
function getValidMaxBatchSize(options: ?Options<any, any, any>): number {
const shouldBatch = !options || options.batch !== false;
if (!shouldBatch) {
return 1;
}
const maxBatchSize = options && options.maxBatchSize;
if (maxBatchSize === undefined) {
return Infinity;
}
if (typeof maxBatchSize !== 'number' || maxBatchSize < 1) {
throw new TypeError(
`maxBatchSize must be a positive number: ${(maxBatchSize: any)}`,
);
}
return maxBatchSize;
}
// Private
function getValidBatchScheduleFn(
options: ?Options<any, any, any>,
): (() => void) => void {
const batchScheduleFn = options && options.batchScheduleFn;
if (batchScheduleFn === undefined) {
return enqueuePostPromiseJob;
}
if (typeof batchScheduleFn !== 'function') {
throw new TypeError(
`batchScheduleFn must be a function: ${(batchScheduleFn: any)}`,
);
}
return batchScheduleFn;
}
// Private: given the DataLoader's options, produce a cache key function.
function getValidCacheKeyFn<K, C>(options: ?Options<K, any, C>): K => C {
const cacheKeyFn = options && options.cacheKeyFn;
if (cacheKeyFn === undefined) {
return (key => key: any);
}
if (typeof cacheKeyFn !== 'function') {
throw new TypeError(`cacheKeyFn must be a function: ${(cacheKeyFn: any)}`);
}
return cacheKeyFn;
}
// Private: given the DataLoader's options, produce a CacheMap to be used.
function getValidCacheMap<K, V, C>(
options: ?Options<K, V, C>,
): CacheMap<C, Promise<V>> | null {
const shouldCache = !options || options.cache !== false;
if (!shouldCache) {
return null;
}
const cacheMap = options && options.cacheMap;
if (cacheMap === undefined) {
return new Map();
}
if (cacheMap !== null) {
const cacheFunctions = ['get', 'set', 'delete', 'clear'];
const missingFunctions = cacheFunctions.filter(
fnName => cacheMap && typeof cacheMap[fnName] !== 'function',
);
if (missingFunctions.length !== 0) {
throw new TypeError(
'Custom cacheMap missing methods: ' + missingFunctions.join(', '),
);
}
}
return cacheMap;
}
function getValidName<K, V, C>(options: ?Options<K, V, C>): string | null {
if (options && options.name) {
return options.name;
}
return null;
}
// Private
function isArrayLike(x: mixed): boolean {
return (
typeof x === 'object' &&
x !== null &&
typeof x.length === 'number' &&
(x.length === 0 ||
(x.length > 0 && Object.prototype.hasOwnProperty.call(x, x.length - 1)))
);
}
module.exports = DataLoader;
@@ -0,0 +1,108 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
exports.generate = generate;
var _sourceMap = require("./source-map.js");
var _printer = require("./printer.js");
function normalizeOptions(code, opts, ast) {
var _opts$recordAndTupleS;
if (opts.experimental_preserveFormat) {
if (typeof code !== "string") {
throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");
}
if (!opts.retainLines) {
throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");
}
if (opts.compact && opts.compact !== "auto") {
throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");
}
if (opts.minified) {
throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");
}
if (opts.jsescOption) {
throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");
}
if (!Array.isArray(ast.tokens)) {
throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.");
}
}
const format = {
auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
shouldPrintComment: opts.shouldPrintComment,
preserveFormat: opts.experimental_preserveFormat,
retainLines: opts.retainLines,
retainFunctionParens: opts.retainFunctionParens,
comments: opts.comments == null || opts.comments,
compact: opts.compact,
minified: opts.minified,
concise: opts.concise,
indent: {
adjustMultilineComment: true,
style: " "
},
jsescOption: Object.assign({
quotes: "double",
wrap: true,
minimal: false
}, opts.jsescOption),
topicToken: opts.topicToken
};
format.decoratorsBeforeExport = opts.decoratorsBeforeExport;
format.jsescOption.json = opts.jsonCompatibleStrings;
format.recordAndTupleSyntaxType = (_opts$recordAndTupleS = opts.recordAndTupleSyntaxType) != null ? _opts$recordAndTupleS : "hash";
format.importAttributesKeyword = opts.importAttributesKeyword;
if (format.minified) {
format.compact = true;
format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
} else {
format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.includes("@license") || value.includes("@preserve"));
}
if (format.compact === "auto") {
format.compact = typeof code === "string" && code.length > 500000;
if (format.compact) {
console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`);
}
}
if (format.compact || format.preserveFormat) {
format.indent.adjustMultilineComment = false;
}
const {
auxiliaryCommentBefore,
auxiliaryCommentAfter,
shouldPrintComment
} = format;
if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {
format.auxiliaryCommentBefore = undefined;
}
if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {
format.auxiliaryCommentAfter = undefined;
}
return format;
}
exports.CodeGenerator = class CodeGenerator {
constructor(ast, opts = {}, code) {
this._ast = void 0;
this._format = void 0;
this._map = void 0;
this._ast = ast;
this._format = normalizeOptions(code, opts, ast);
this._map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
}
generate() {
const printer = new _printer.default(this._format, this._map);
return printer.generate(this._ast);
}
};
function generate(ast, opts = {}, code) {
const format = normalizeOptions(code, opts, ast);
const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
const printer = new _printer.default(format, map, ast.tokens, typeof code === "string" ? code : null);
return printer.generate(ast);
}
var _default = exports.default = generate;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
import React from 'react';
import './index.scss';
export declare const PreviewFrameSizeInput: React.FC<{
axis?: 'x' | 'y';
}>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"flag.js","sources":["../../../src/icons/flag.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Flag\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxNXMxLTEgNC0xIDUgMiA4IDIgNC0xIDQtMVYzcy0xIDEtNCAxLTUtMi04LTItNCAxLTQgMXoiIC8+CiAgPGxpbmUgeDE9IjQiIHgyPSI0IiB5MT0iMjIiIHkyPSIxNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/flag\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 Flag = createLucideIcon('Flag', [\n ['path', { d: 'M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z', key: 'i9b6wo' }],\n ['line', { x1: '4', x2: '4', y1: '22', y2: '15', key: '1cm3nv' }],\n]);\n\nexport default Flag;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1F,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,164 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "أ", "س", "أ", "ن", "د"],
abbreviated: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
wide: [
"الأحد",
"الاثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
};
const ordinalNumber = (num) => String(num);
const localize = (exports.localize = {
ordinalNumber: ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});
@@ -0,0 +1,49 @@
"use strict";
function _async_generator_delegate(inner, awaitWrap) {
var iter = {}, waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function(resolve) {
resolve(inner[key](value));
});
return { done: false, value: awaitWrap(value) };
}
if (typeof Symbol === "function" && Symbol.iterator) {
iter[Symbol.iterator] = function() {
return this;
};
}
iter.next = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner.throw === "function") {
iter.throw = function(value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner.return === "function") {
iter.return = function(value) {
return pump("return", value);
};
}
return iter;
}
exports._ = _async_generator_delegate;
@@ -0,0 +1,143 @@
export type Schema =
| ObjectSchema
| ArraySchema
| StringSchema
| NumberSchema
| IntegerSchema
| BooleanSchema
| NullSchema;
// export type JsonType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
// export interface JSONSchema {
// type?: string ;
// $id?: string ;
// id?: string ;
// $schema?: string ;
// $ref?: string ;
// $anchor?: string ;
// $defs?: { [key: string]: JSONSchema } ;
// definitions?: { [key: string]: JSONSchema } ;
// $comment?: string ;
// title?: string ;
// description?: string ;
// default?: unknown ;
// examples?: unknown[] ;
// readOnly?: boolean ;
// writeOnly?: boolean ;
// deprecated?: boolean ;
// allOf?: JSONSchema[] ;
// anyOf?: JSONSchema[] ;
// oneOf?: JSONSchema[] ;
// not?: JSONSchema ;
// if?: JSONSchema ;
// then?: JSONSchema ;
// else?: JSONSchema ;
// enum?: Array<string | number | boolean | null> ;
// const?: string | number | boolean | null ;
// [k: string]: unknown;
// /** A special key used as an intermediate representation of extends-style relationships. Omitted as a $ref with additional properties. */
// // _ref?: JSONSchema;
// _prefault?: unknown ;
// }
export type _JSONSchema = boolean | JSONSchema;
export type JSONSchema = {
[k: string]: unknown;
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#";
$id?: string;
$anchor?: string;
$ref?: string;
$dynamicRef?: string;
$dynamicAnchor?: string;
$vocabulary?: Record<string, boolean>;
$comment?: string;
$defs?: Record<string, JSONSchema>;
type?: "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
additionalItems?: _JSONSchema;
unevaluatedItems?: _JSONSchema;
prefixItems?: _JSONSchema[];
items?: _JSONSchema | _JSONSchema[];
contains?: _JSONSchema;
additionalProperties?: _JSONSchema;
unevaluatedProperties?: _JSONSchema;
properties?: Record<string, _JSONSchema>;
patternProperties?: Record<string, _JSONSchema>;
dependentSchemas?: Record<string, _JSONSchema>;
propertyNames?: _JSONSchema;
if?: _JSONSchema;
then?: _JSONSchema;
else?: _JSONSchema;
allOf?: JSONSchema[];
anyOf?: JSONSchema[];
oneOf?: JSONSchema[];
not?: _JSONSchema;
multipleOf?: number;
maximum?: number;
exclusiveMaximum?: number;
minimum?: number;
exclusiveMinimum?: number;
maxLength?: number;
minLength?: number;
pattern?: string;
maxItems?: number;
minItems?: number;
uniqueItems?: boolean;
maxContains?: number;
minContains?: number;
maxProperties?: number;
minProperties?: number;
required?: string[];
dependentRequired?: Record<string, string[]>;
enum?: Array<string | number | boolean | null>;
const?: string | number | boolean | null;
// metadata
id?: string;
title?: string;
description?: string;
default?: unknown;
deprecated?: boolean;
readOnly?: boolean;
writeOnly?: boolean;
examples?: unknown[];
format?: string;
contentMediaType?: string;
contentEncoding?: string;
contentSchema?: JSONSchema;
// internal
_prefault?: unknown;
};
// for backwards compatibility
export type BaseSchema = JSONSchema;
export interface ObjectSchema extends JSONSchema {
type: "object";
}
export interface ArraySchema extends JSONSchema {
type: "array";
}
export interface StringSchema extends JSONSchema {
type: "string";
}
export interface NumberSchema extends JSONSchema {
type: "number";
}
export interface IntegerSchema extends JSONSchema {
type: "integer";
}
export interface BooleanSchema extends JSONSchema {
type: "boolean";
}
export interface NullSchema extends JSONSchema {
type: "null";
}
@@ -0,0 +1,275 @@
import { sql } from 'drizzle-orm';
import fs from 'fs';
import { buildVersionCollectionFields, buildVersionGlobalFields } from 'payload';
import toSnakeCase from 'to-snake-case';
import { getTransaction } from '../../../utilities/getTransaction.js';
import { groupUpSQLStatements } from './groupUpSQLStatements.js';
import { migrateRelationships } from './migrateRelationships.js';
import { traverseFields } from './traverseFields.js';
const runStatementGroup = async ({ adapter, db, debug, statements })=>{
const addColumnsStatement = statements.join('\n');
if (debug) {
adapter.payload.logger.info(debug);
adapter.payload.logger.info(addColumnsStatement);
}
await db.execute(sql.raw(addColumnsStatement));
};
/**
* Moves upload and relationship columns from the join table and into the tables while moving data
* This is done in the following order:
* ADD COLUMNs
* -- manipulate data to move relationships to new columns
* ADD CONSTRAINTs
* NOT NULLs
* DROP TABLEs
* DROP CONSTRAINTs
* DROP COLUMNs
* @param debug
* @param payload
* @param req
*/ export const migratePostgresV2toV3 = async ({ debug, payload, req })=>{
const adapter = payload.db;
const dir = payload.db.migrationDir;
// get the drizzle migrateUpSQL from drizzle using the last schema
const { generateDrizzleJson, generateMigration, upSnapshot } = adapter.requireDrizzleKit();
const drizzleJsonAfter = generateDrizzleJson(adapter.schema);
// Get the previous migration snapshot
const previousSnapshot = fs.readdirSync(dir).filter((file)=>file.endsWith('.json') && !file.endsWith('relationships_v2_v3.json')).sort().reverse()?.[0];
if (!previousSnapshot) {
throw new Error(`No previous migration schema file found! A prior migration from v2 is required to migrate to v3.`);
}
let drizzleJsonBefore = JSON.parse(fs.readFileSync(`${dir}/${previousSnapshot}`, 'utf8'));
if (upSnapshot && drizzleJsonBefore.version < drizzleJsonAfter.version) {
drizzleJsonBefore = upSnapshot(drizzleJsonBefore);
}
const generatedSQL = await generateMigration(drizzleJsonBefore, drizzleJsonAfter);
if (!generatedSQL.length) {
payload.logger.info(`No schema changes needed.`);
process.exit(0);
}
const sqlUpStatements = groupUpSQLStatements(generatedSQL);
const db = await getTransaction(adapter, req);
await runStatementGroup({
adapter,
db,
debug: debug ? 'CREATING TYPES' : null,
statements: sqlUpStatements.createType
});
await runStatementGroup({
adapter,
db,
debug: debug ? 'ALTERING TYPES' : null,
statements: sqlUpStatements.alterType
});
await runStatementGroup({
adapter,
db,
debug: debug ? 'CREATING TABLES' : null,
statements: sqlUpStatements.createTable
});
await runStatementGroup({
adapter,
db,
debug: debug ? 'RENAMING COLUMNS' : null,
statements: sqlUpStatements.renameColumn
});
await runStatementGroup({
adapter,
db,
debug: debug ? 'CREATING NEW RELATIONSHIP COLUMNS' : null,
statements: sqlUpStatements.addColumn
});
// SET DEFAULTS
await runStatementGroup({
adapter,
db,
debug: debug ? 'SETTING DEFAULTS' : null,
statements: sqlUpStatements.setDefault
});
await runStatementGroup({
adapter,
db,
debug: debug ? 'CREATING INDEXES' : null,
statements: sqlUpStatements.createIndex
});
for (const collection of payload.config.collections){
if (collection.slug === 'payload-locked-documents') {
continue;
}
const tableName = adapter.tableNameMap.get(toSnakeCase(collection.slug));
const pathsToQuery = new Set();
traverseFields({
adapter,
collectionSlug: collection.slug,
columnPrefix: '',
db,
disableNotNull: false,
fields: collection.flattenedFields,
isVersions: false,
newTableName: tableName,
parentTableName: tableName,
path: '',
pathsToQuery,
payload,
rootTableName: tableName
});
await migrateRelationships({
adapter,
collectionSlug: collection.slug,
db,
debug,
fields: collection.flattenedFields,
isVersions: false,
pathsToQuery,
payload,
req,
tableName
});
if (collection.versions) {
const versionsTableName = adapter.tableNameMap.get(`_${toSnakeCase(collection.slug)}${adapter.versionsSuffix}`);
const versionFields = buildVersionCollectionFields(payload.config, collection, true);
const versionPathsToQuery = new Set();
traverseFields({
adapter,
collectionSlug: collection.slug,
columnPrefix: '',
db,
disableNotNull: true,
fields: versionFields,
isVersions: true,
newTableName: versionsTableName,
parentTableName: versionsTableName,
path: '',
pathsToQuery: versionPathsToQuery,
payload,
rootTableName: versionsTableName
});
await migrateRelationships({
adapter,
collectionSlug: collection.slug,
db,
debug,
fields: versionFields,
isVersions: true,
pathsToQuery: versionPathsToQuery,
payload,
req,
tableName: versionsTableName
});
}
}
for (const global of payload.config.globals){
const tableName = adapter.tableNameMap.get(toSnakeCase(global.slug));
const pathsToQuery = new Set();
traverseFields({
adapter,
columnPrefix: '',
db,
disableNotNull: false,
fields: global.flattenedFields,
globalSlug: global.slug,
isVersions: false,
newTableName: tableName,
parentTableName: tableName,
path: '',
pathsToQuery,
payload,
rootTableName: tableName
});
await migrateRelationships({
adapter,
db,
debug,
fields: global.flattenedFields,
globalSlug: global.slug,
isVersions: false,
pathsToQuery,
payload,
req,
tableName
});
if (global.versions) {
const versionsTableName = adapter.tableNameMap.get(`_${toSnakeCase(global.slug)}${adapter.versionsSuffix}`);
const versionFields = buildVersionGlobalFields(payload.config, global, true);
const versionPathsToQuery = new Set();
traverseFields({
adapter,
columnPrefix: '',
db,
disableNotNull: true,
fields: versionFields,
globalSlug: global.slug,
isVersions: true,
newTableName: versionsTableName,
parentTableName: versionsTableName,
path: '',
pathsToQuery: versionPathsToQuery,
payload,
rootTableName: versionsTableName
});
await migrateRelationships({
adapter,
db,
debug,
fields: versionFields,
globalSlug: global.slug,
isVersions: true,
pathsToQuery: versionPathsToQuery,
payload,
req,
tableName: versionsTableName
});
}
}
// ADD CONSTRAINT
await runStatementGroup({
adapter,
db,
debug: debug ? 'ADDING CONSTRAINTS' : null,
statements: sqlUpStatements.addConstraint
});
// NOT NULL
await runStatementGroup({
adapter,
db,
debug: debug ? 'NOT NULL CONSTRAINTS' : null,
statements: sqlUpStatements.notNull
});
// DROP TABLE
await runStatementGroup({
adapter,
db,
debug: debug ? 'DROPPING TABLES' : null,
statements: sqlUpStatements.dropTable
});
// DROP INDEX
await runStatementGroup({
adapter,
db,
debug: debug ? 'DROPPING INDEXES' : null,
statements: sqlUpStatements.dropIndex
});
// DROP CONSTRAINT
await runStatementGroup({
adapter,
db,
debug: debug ? 'DROPPING CONSTRAINTS' : null,
statements: sqlUpStatements.dropConstraint
});
// DROP COLUMN
await runStatementGroup({
adapter,
db,
debug: debug ? 'DROPPING COLUMNS' : null,
statements: sqlUpStatements.dropColumn
});
// DROP TYPES
await runStatementGroup({
adapter,
db,
debug: debug ? 'DROPPING TYPES' : null,
statements: sqlUpStatements.dropType
});
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UnfoldVertical = createLucideIcon("UnfoldVertical", [
["path", { d: "M12 22v-6", key: "6o8u61" }],
["path", { d: "M12 8V2", key: "1wkif3" }],
["path", { d: "M4 12H2", key: "rhcxmi" }],
["path", { d: "M10 12H8", key: "s88cx1" }],
["path", { d: "M16 12h-2", key: "10asgb" }],
["path", { d: "M22 12h-2", key: "14jgyd" }],
["path", { d: "m15 19-3 3-3-3", key: "11eu04" }],
["path", { d: "m15 5-3-3-3 3", key: "itvq4r" }]
]);
export { UnfoldVertical as default };
//# sourceMappingURL=unfold-vertical.js.map
@@ -0,0 +1 @@
{"version":3,"file":"get-auth-endpoint.js","names":[],"sources":["../../../src/rest/utils/get-auth-endpoint.ts"],"sourcesContent":["/**\n * @param provider Use a specific authentication provider\n * @returns The endpoint to be used for authentication\n */\nexport function getAuthEndpoint(provider?: string) {\n\tif (provider) return `/auth/login/${provider}`;\n\treturn '/auth/login';\n}\n"],"mappings":"AAIA,SAAgB,EAAgB,EAAmB,CAElD,OADI,EAAiB,eAAe,IAC7B"}
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { intlFormatDistance as fn } from "../intlFormatDistance.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const intlFormatDistanceWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default intlFormatDistanceWithOptions;
@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/fastify/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,eAAe,GACvB,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,uBAAuB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAChG,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC,CAAC;AAE5F,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,YAAY,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAElG,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG,CAC1B,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,uBAAuB,KAC1B,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,eAAe,CAAC;IAC3C,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,KAAK,eAAe,CAAC;IAC5D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,eAAe,CAAC;IACjE,OAAO,CACL,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,GAC5E,eAAe,CAAC;IACnB,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,eAAe,CAAC;CAC9G;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,KAAK,OAAO,CAAC;CACrF,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,YAAY,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,YAAY,CAAC,EAAE;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";import{throwIfCoreCollection as t}from"../../utils/throw-core-collection.js";const n=(n,r)=>()=>{let i={};return e(String(n),`Collection cannot be empty`),t(n,`Cannot use deleteItems for core collections`),Array.isArray(r)?(e(r,`keysOrQuery cannot be empty`),i={keys:r}):(e(Object.keys(r),`keysOrQuery cannot be empty`),i={query:r}),{path:`/items/${n}`,body:JSON.stringify(i),method:`DELETE`}},r=(n,r)=>()=>(e(String(n),`Collection cannot be empty`),t(n,`Cannot use deleteItem for core collections`),e(String(r),`Key cannot be empty`),{path:`/items/${n}/${r}`,method:`DELETE`});export{r as deleteItem,n as deleteItems};
//# sourceMappingURL=items.js.map
@@ -0,0 +1,46 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { type Writable } from "../../utils.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
export type SingleStoreTextColumnType = 'tinytext' | 'text' | 'mediumtext' | 'longtext';
export type SingleStoreTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = SingleStoreTextBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreText';
data: TEnum[number];
driverParam: string;
enumValues: TEnum;
generated: undefined;
}>;
export declare class SingleStoreTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreText'>> extends SingleStoreColumnBuilder<T, {
textType: SingleStoreTextColumnType;
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], textType: SingleStoreTextColumnType, config: SingleStoreTextConfig<T['enumValues']>);
}
export declare class SingleStoreText<T extends ColumnBaseConfig<'string', 'SingleStoreText'>> extends SingleStoreColumn<T, {
textType: SingleStoreTextColumnType;
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
readonly textType: SingleStoreTextColumnType;
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export interface SingleStoreTextConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined> {
enum?: TEnum;
}
export declare function text(): SingleStoreTextBuilderInitial<'', [string, ...string[]]>;
export declare function text<U extends string, T extends Readonly<[U, ...U[]]>>(config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<'', Writable<T>>;
export declare function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<TName, Writable<T>>;
export declare function tinytext(): SingleStoreTextBuilderInitial<'', [string, ...string[]]>;
export declare function tinytext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<'', Writable<T>>;
export declare function tinytext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<TName, Writable<T>>;
export declare function mediumtext(): SingleStoreTextBuilderInitial<'', [string, ...string[]]>;
export declare function mediumtext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<'', Writable<T>>;
export declare function mediumtext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<TName, Writable<T>>;
export declare function longtext(): SingleStoreTextBuilderInitial<'', [string, ...string[]]>;
export declare function longtext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<'', Writable<T>>;
export declare function longtext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: SingleStoreTextConfig<T | Writable<T>>): SingleStoreTextBuilderInitial<TName, Writable<T>>;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './columns-2.js';
//# sourceMappingURL=columns.js.map
@@ -0,0 +1,14 @@
import type { Column } from "./column.js";
import { entityKind } from "./entity.js";
import type { Casing } from "./utils.js";
export declare function toSnakeCase(input: string): string;
export declare function toCamelCase(input: string): string;
export declare class CasingCache {
static readonly [entityKind]: string;
private cachedTables;
private convert;
constructor(casing?: Casing);
getColumnCasing(column: Column): string;
private cacheTable;
clearCache(): void;
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M"},C:{"1":"0 1 2 3 4 5 6 7 8 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":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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":"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"},E:{"2":"J bB K D B C L M G 6C bC 7C 8C 9C PC QC BD CD DD dC","129":"cC","194":"E F A AD","257":"eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 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","2":"9 F B C G N O P cB AB BB CB JD KD LD MD PC xC ND QC"},G:{"2":"bC OD yC PD QD RD XD YD ZD aD bD cD dD eD fD gD hD dC","129":"WD","194":"E SD TD UD VD","257":"eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:1,C:"navigator.hardwareConcurrency",D:true};
@@ -0,0 +1,246 @@
{
"name": "file-type",
"version": "19.3.0",
"description": "Detect the file type of a Uint8Array/ArrayBuffer",
"license": "MIT",
"repository": "sindresorhus/file-type",
"funding": "https://github.com/sindresorhus/file-type?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
".": {
"node": "./index.js",
"default": "./core.js"
},
"./core": "./core.js"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts",
"core.js",
"core.d.ts",
"supported.js",
"util.js"
],
"keywords": [
"mime",
"file",
"type",
"magic",
"archive",
"image",
"img",
"pic",
"picture",
"flash",
"photo",
"video",
"detect",
"check",
"is",
"exif",
"elf",
"macho",
"exe",
"binary",
"buffer",
"uint8array",
"jpg",
"png",
"apng",
"gif",
"webp",
"flif",
"xcf",
"cr2",
"cr3",
"orf",
"arw",
"dng",
"nef",
"rw2",
"raf",
"tif",
"bmp",
"icns",
"jxr",
"psd",
"indd",
"zip",
"tar",
"rar",
"gz",
"bz2",
"7z",
"dmg",
"mp4",
"mid",
"mkv",
"webm",
"mov",
"avi",
"mpg",
"mp2",
"mp3",
"m4a",
"ogg",
"opus",
"flac",
"wav",
"amr",
"pdf",
"epub",
"mobi",
"swf",
"rtf",
"woff",
"woff2",
"eot",
"ttf",
"otf",
"ico",
"flv",
"ps",
"xz",
"sqlite",
"xpi",
"cab",
"deb",
"ar",
"rpm",
"Z",
"lz",
"cfb",
"mxf",
"mts",
"wasm",
"webassembly",
"blend",
"bpg",
"docx",
"pptx",
"xlsx",
"3gp",
"j2c",
"jp2",
"jpm",
"jpx",
"mj2",
"aif",
"odt",
"ods",
"odp",
"xml",
"heic",
"ics",
"glb",
"pcap",
"dsf",
"lnk",
"alias",
"voc",
"ac3",
"3g2",
"m4b",
"m4p",
"m4v",
"f4a",
"f4b",
"f4p",
"f4v",
"mie",
"qcp",
"asf",
"ogv",
"ogm",
"oga",
"spx",
"ogx",
"ape",
"wv",
"cur",
"nes",
"crx",
"ktx",
"dcm",
"mpc",
"arrow",
"shp",
"aac",
"mp1",
"it",
"s3m",
"xm",
"ai",
"skp",
"avif",
"eps",
"lzh",
"pgp",
"asar",
"stl",
"chm",
"3mf",
"zst",
"jxl",
"vcf",
"jls",
"pst",
"dwg",
"parquet",
"class",
"arj",
"cpio",
"ace",
"avro",
"icc",
"fbx",
"vsdx"
],
"dependencies": {
"strtok3": "^8.0.0",
"token-types": "^6.0.0",
"uint8array-extras": "^1.3.0"
},
"devDependencies": {
"@tokenizer/token": "^0.3.0",
"@types/node": "^20.10.7",
"ava": "^6.0.1",
"commonmark": "^0.30.0",
"noop-stream": "^1.0.0",
"tsd": "^0.30.3",
"xo": "^0.56.0"
},
"xo": {
"envs": [
"node",
"browser"
],
"ignores": [
"fixture"
],
"rules": {
"no-inner-declarations": "warn",
"no-await-in-loop": "warn",
"no-bitwise": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"unicorn/text-encoding-identifier-case": "off",
"unicorn/switch-case-braces": "off",
"unicorn/prefer-top-level-await": "off"
}
},
"ava": {
"serial": true
}
}
@@ -0,0 +1,838 @@
(() => {
var _window$dateFns;function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];return arr2;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}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);}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/ru/_lib/formatDistance.js
function declension(scheme, count) {
if (scheme.one !== undefined && count === 1) {
return scheme.one;
}
var rem10 = count % 10;
var rem100 = count % 100;
if (rem10 === 1 && rem100 !== 11) {
return scheme.singularNominative.replace("{{count}}", String(count));
} else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
return scheme.singularGenitive.replace("{{count}}", String(count));
} else {
return scheme.pluralGenitive.replace("{{count}}", String(count));
}
}
function buildLocalizeTokenFn(scheme) {
return function (count, options) {
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (scheme.future) {
return declension(scheme.future, count);
} else {
return "\u0447\u0435\u0440\u0435\u0437 " + declension(scheme.regular, count);
}
} else {
if (scheme.past) {
return declension(scheme.past, count);
} else {
return declension(scheme.regular, count) + " \u043D\u0430\u0437\u0430\u0434";
}
}
} else {
return declension(scheme.regular, count);
}
};
}
var formatDistanceLocale = {
lessThanXSeconds: buildLocalizeTokenFn({
regular: {
one: "\u043C\u0435\u043D\u044C\u0448\u0435 \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
singularNominative: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
singularGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434",
pluralGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434"
},
future: {
one: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043A\u0443\u043D\u0434\u0443",
singularNominative: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0443",
singularGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
pluralGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434"
}
}),
xSeconds: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0430",
singularGenitive: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
pluralGenitive: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434"
},
past: {
singularNominative: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0443 \u043D\u0430\u0437\u0430\u0434",
singularGenitive: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u044B \u043D\u0430\u0437\u0430\u0434",
pluralGenitive: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434 \u043D\u0430\u0437\u0430\u0434"
},
future: {
singularNominative: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0443",
singularGenitive: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u044B",
pluralGenitive: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434"
}
}),
halfAMinute: function halfAMinute(_count, options) {
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0447\u0435\u0440\u0435\u0437 \u043F\u043E\u043B\u043C\u0438\u043D\u0443\u0442\u044B";
} else {
return "\u043F\u043E\u043B\u043C\u0438\u043D\u0443\u0442\u044B \u043D\u0430\u0437\u0430\u0434";
}
}
return "\u043F\u043E\u043B\u043C\u0438\u043D\u0443\u0442\u044B";
},
lessThanXMinutes: buildLocalizeTokenFn({
regular: {
one: "\u043C\u0435\u043D\u044C\u0448\u0435 \u043C\u0438\u043D\u0443\u0442\u044B",
singularNominative: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u043C\u0438\u043D\u0443\u0442\u044B",
singularGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u043C\u0438\u043D\u0443\u0442",
pluralGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435 {{count}} \u043C\u0438\u043D\u0443\u0442"
},
future: {
one: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 \u043C\u0438\u043D\u0443\u0442\u0443",
singularNominative: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442\u0443",
singularGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442\u044B",
pluralGenitive: "\u043C\u0435\u043D\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442"
}
}),
xMinutes: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u043C\u0438\u043D\u0443\u0442\u0430",
singularGenitive: "{{count}} \u043C\u0438\u043D\u0443\u0442\u044B",
pluralGenitive: "{{count}} \u043C\u0438\u043D\u0443\u0442"
},
past: {
singularNominative: "{{count}} \u043C\u0438\u043D\u0443\u0442\u0443 \u043D\u0430\u0437\u0430\u0434",
singularGenitive: "{{count}} \u043C\u0438\u043D\u0443\u0442\u044B \u043D\u0430\u0437\u0430\u0434",
pluralGenitive: "{{count}} \u043C\u0438\u043D\u0443\u0442 \u043D\u0430\u0437\u0430\u0434"
},
future: {
singularNominative: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442\u0443",
singularGenitive: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442\u044B",
pluralGenitive: "\u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0438\u043D\u0443\u0442"
}
}),
aboutXHours: buildLocalizeTokenFn({
regular: {
singularNominative: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0447\u0430\u0441\u0430",
singularGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0447\u0430\u0441\u043E\u0432",
pluralGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0447\u0430\u0441\u043E\u0432"
},
future: {
singularNominative: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u0447\u0430\u0441",
singularGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u0447\u0430\u0441\u0430",
pluralGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u0447\u0430\u0441\u043E\u0432"
}
}),
xHours: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u0447\u0430\u0441",
singularGenitive: "{{count}} \u0447\u0430\u0441\u0430",
pluralGenitive: "{{count}} \u0447\u0430\u0441\u043E\u0432"
}
}),
xDays: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u0434\u0435\u043D\u044C",
singularGenitive: "{{count}} \u0434\u043D\u044F",
pluralGenitive: "{{count}} \u0434\u043D\u0435\u0439"
}
}),
aboutXWeeks: buildLocalizeTokenFn({
regular: {
singularNominative: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043D\u0435\u0434\u0435\u043B\u0438",
singularGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043D\u0435\u0434\u0435\u043B\u044C",
pluralGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043D\u0435\u0434\u0435\u043B\u044C"
},
future: {
singularNominative: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043D\u0435\u0434\u0435\u043B\u044E",
singularGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043D\u0435\u0434\u0435\u043B\u0438",
pluralGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043D\u0435\u0434\u0435\u043B\u044C"
}
}),
xWeeks: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u043D\u0435\u0434\u0435\u043B\u044F",
singularGenitive: "{{count}} \u043D\u0435\u0434\u0435\u043B\u0438",
pluralGenitive: "{{count}} \u043D\u0435\u0434\u0435\u043B\u044C"
}
}),
aboutXMonths: buildLocalizeTokenFn({
regular: {
singularNominative: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043C\u0435\u0441\u044F\u0446\u0430",
singularGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043C\u0435\u0441\u044F\u0446\u0435\u0432",
pluralGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043C\u0435\u0441\u044F\u0446\u0435\u0432"
},
future: {
singularNominative: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0435\u0441\u044F\u0446",
singularGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0435\u0441\u044F\u0446\u0430",
pluralGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043C\u0435\u0441\u044F\u0446\u0435\u0432"
}
}),
xMonths: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u043C\u0435\u0441\u044F\u0446",
singularGenitive: "{{count}} \u043C\u0435\u0441\u044F\u0446\u0430",
pluralGenitive: "{{count}} \u043C\u0435\u0441\u044F\u0446\u0435\u0432"
}
}),
aboutXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0433\u043E\u0434\u0430",
singularGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043B\u0435\u0442",
pluralGenitive: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043B\u0435\u0442"
},
future: {
singularNominative: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434",
singularGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434\u0430",
pluralGenitive: "\u043F\u0440\u0438\u0431\u043B\u0438\u0437\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0447\u0435\u0440\u0435\u0437 {{count}} \u043B\u0435\u0442"
}
}),
xYears: buildLocalizeTokenFn({
regular: {
singularNominative: "{{count}} \u0433\u043E\u0434",
singularGenitive: "{{count}} \u0433\u043E\u0434\u0430",
pluralGenitive: "{{count}} \u043B\u0435\u0442"
}
}),
overXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "\u0431\u043E\u043B\u044C\u0448\u0435 {{count}} \u0433\u043E\u0434\u0430",
singularGenitive: "\u0431\u043E\u043B\u044C\u0448\u0435 {{count}} \u043B\u0435\u0442",
pluralGenitive: "\u0431\u043E\u043B\u044C\u0448\u0435 {{count}} \u043B\u0435\u0442"
},
future: {
singularNominative: "\u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434",
singularGenitive: "\u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434\u0430",
pluralGenitive: "\u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u0447\u0435\u0440\u0435\u0437 {{count}} \u043B\u0435\u0442"
}
}),
almostXYears: buildLocalizeTokenFn({
regular: {
singularNominative: "\u043F\u043E\u0447\u0442\u0438 {{count}} \u0433\u043E\u0434",
singularGenitive: "\u043F\u043E\u0447\u0442\u0438 {{count}} \u0433\u043E\u0434\u0430",
pluralGenitive: "\u043F\u043E\u0447\u0442\u0438 {{count}} \u043B\u0435\u0442"
},
future: {
singularNominative: "\u043F\u043E\u0447\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434",
singularGenitive: "\u043F\u043E\u0447\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 {{count}} \u0433\u043E\u0434\u0430",
pluralGenitive: "\u043F\u043E\u0447\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 {{count}} \u043B\u0435\u0442"
}
})
};
var formatDistance = function formatDistance(token, count, options) {
return formatDistanceLocale[token](count, options);
};
// 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/ru/_lib/formatLong.js
var dateFormats = {
full: "EEEE, d MMMM y '\u0433.'",
long: "d MMMM y '\u0433.'",
medium: "d MMM y '\u0433.'",
short: "dd.MM.y"
};
var timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm"
};
var dateTimeFormats = {
any: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any"
})
};
// lib/constants.js
var daysInWeek = 7;
var daysInYear = 365.2425;
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
var minTime = -maxTime;
var millisecondsInWeek = 604800000;
var millisecondsInDay = 86400000;
var millisecondsInMinute = 60000;
var millisecondsInHour = 3600000;
var millisecondsInSecond = 1000;
var minutesInYear = 525600;
var minutesInMonth = 43200;
var minutesInDay = 1440;
var minutesInHour = 60;
var monthsInQuarter = 3;
var monthsInYear = 12;
var quartersInYear = 4;
var secondsInHour = 3600;
var secondsInMinute = 60;
var secondsInDay = secondsInHour * 24;
var secondsInWeek = secondsInDay * 7;
var secondsInYear = secondsInDay * daysInYear;
var secondsInMonth = secondsInYear / 12;
var secondsInQuarter = secondsInMonth * 3;
var constructFromSymbol = Symbol.for("constructDateFrom");
// lib/constructFrom.js
function constructFrom(date, value) {
if (typeof date === "function")
return date(value);
if (date && _typeof(date) === "object" && constructFromSymbol in date)
return date[constructFromSymbol](value);
if (date instanceof Date)
return new date.constructor(value);
return new Date(value);
}
// lib/_lib/normalizeDates.js
function normalizeDates(context) {for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {dates[_key - 1] = arguments[_key];}
var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";}));
return dates.map(normalize);
}
// lib/_lib/defaultOptions.js
function getDefaultOptions() {
return defaultOptions;
}
function setDefaultOptions(newOptions) {
defaultOptions = newOptions;
}
var defaultOptions = {};
// lib/toDate.js
function toDate(argument, context) {
return constructFrom(context || argument, argument);
}
// lib/startOfWeek.js
function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions3$loca;
var defaultOptions3 = getDefaultOptions();
var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions3.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions3$loca = defaultOptions3.locale) === null || _defaultOptions3$loca === void 0 || (_defaultOptions3$loca = _defaultOptions3$loca.options) === null || _defaultOptions3$loca === void 0 ? void 0 : _defaultOptions3$loca.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0;
var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in);
var day = _date.getDay();
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
_date.setDate(_date.getDate() - diff);
_date.setHours(0, 0, 0, 0);
return _date;
}
// lib/isSameWeek.js
function isSameWeek(laterDate, earlierDate, options) {
var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1];
return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
}
// lib/locale/ru/_lib/formatRelative.js
function _lastWeek(day) {
var weekday = accusativeWeekdays[day];
switch (day) {
case 0:
return "'\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u0435 " + weekday + " \u0432' p";
case 1:
case 2:
case 4:
return "'\u0432 \u043F\u0440\u043E\u0448\u043B\u044B\u0439 " + weekday + " \u0432' p";
case 3:
case 5:
case 6:
return "'\u0432 \u043F\u0440\u043E\u0448\u043B\u0443\u044E " + weekday + " \u0432' p";
}
}
function thisWeek(day) {
var weekday = accusativeWeekdays[day];
if (day === 2) {
return "'\u0432\u043E " + weekday + " \u0432' p";
} else {
return "'\u0432 " + weekday + " \u0432' p";
}
}
function _nextWeek(day) {
var weekday = accusativeWeekdays[day];
switch (day) {
case 0:
return "'\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 " + weekday + " \u0432' p";
case 1:
case 2:
case 4:
return "'\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 " + weekday + " \u0432' p";
case 3:
case 5:
case 6:
return "'\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E " + weekday + " \u0432' p";
}
}
var accusativeWeekdays = [
"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435",
"\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A",
"\u0432\u0442\u043E\u0440\u043D\u0438\u043A",
"\u0441\u0440\u0435\u0434\u0443",
"\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
"\u043F\u044F\u0442\u043D\u0438\u0446\u0443",
"\u0441\u0443\u0431\u0431\u043E\u0442\u0443"];
var formatRelativeLocale = {
lastWeek: function lastWeek(date, baseDate, options) {
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return _lastWeek(day);
}
},
yesterday: "'\u0432\u0447\u0435\u0440\u0430 \u0432' p",
today: "'\u0441\u0435\u0433\u043E\u0434\u043D\u044F \u0432' p",
tomorrow: "'\u0437\u0430\u0432\u0442\u0440\u0430 \u0432' p",
nextWeek: function nextWeek(date, baseDate, options) {
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return _nextWeek(day);
}
},
other: "P"
};
var formatRelative = function formatRelative(token, date, baseDate, options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
// 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/ru/_lib/localize.js
var eraValues = {
narrow: ["\u0434\u043E \u043D.\u044D.", "\u043D.\u044D."],
abbreviated: ["\u0434\u043E \u043D. \u044D.", "\u043D. \u044D."],
wide: ["\u0434\u043E \u043D\u0430\u0448\u0435\u0439 \u044D\u0440\u044B", "\u043D\u0430\u0448\u0435\u0439 \u044D\u0440\u044B"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-\u0439 \u043A\u0432.", "2-\u0439 \u043A\u0432.", "3-\u0439 \u043A\u0432.", "4-\u0439 \u043A\u0432."],
wide: ["1-\u0439 \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "2-\u0439 \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "3-\u0439 \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "4-\u0439 \u043A\u0432\u0430\u0440\u0442\u0430\u043B"]
};
var monthValues = {
narrow: ["\u042F", "\u0424", "\u041C", "\u0410", "\u041C", "\u0418", "\u0418", "\u0410", "\u0421", "\u041E", "\u041D", "\u0414"],
abbreviated: [
"\u044F\u043D\u0432.",
"\u0444\u0435\u0432.",
"\u043C\u0430\u0440\u0442",
"\u0430\u043F\u0440.",
"\u043C\u0430\u0439",
"\u0438\u044E\u043D\u044C",
"\u0438\u044E\u043B\u044C",
"\u0430\u0432\u0433.",
"\u0441\u0435\u043D\u0442.",
"\u043E\u043A\u0442.",
"\u043D\u043E\u044F\u0431.",
"\u0434\u0435\u043A."],
wide: [
"\u044F\u043D\u0432\u0430\u0440\u044C",
"\u0444\u0435\u0432\u0440\u0430\u043B\u044C",
"\u043C\u0430\u0440\u0442",
"\u0430\u043F\u0440\u0435\u043B\u044C",
"\u043C\u0430\u0439",
"\u0438\u044E\u043D\u044C",
"\u0438\u044E\u043B\u044C",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C",
"\u043E\u043A\u0442\u044F\u0431\u0440\u044C",
"\u043D\u043E\u044F\u0431\u0440\u044C",
"\u0434\u0435\u043A\u0430\u0431\u0440\u044C"]
};
var formattingMonthValues = {
narrow: ["\u042F", "\u0424", "\u041C", "\u0410", "\u041C", "\u0418", "\u0418", "\u0410", "\u0421", "\u041E", "\u041D", "\u0414"],
abbreviated: [
"\u044F\u043D\u0432.",
"\u0444\u0435\u0432.",
"\u043C\u0430\u0440.",
"\u0430\u043F\u0440.",
"\u043C\u0430\u044F",
"\u0438\u044E\u043D.",
"\u0438\u044E\u043B.",
"\u0430\u0432\u0433.",
"\u0441\u0435\u043D\u0442.",
"\u043E\u043A\u0442.",
"\u043D\u043E\u044F\u0431.",
"\u0434\u0435\u043A."],
wide: [
"\u044F\u043D\u0432\u0430\u0440\u044F",
"\u0444\u0435\u0432\u0440\u0430\u043B\u044F",
"\u043C\u0430\u0440\u0442\u0430",
"\u0430\u043F\u0440\u0435\u043B\u044F",
"\u043C\u0430\u044F",
"\u0438\u044E\u043D\u044F",
"\u0438\u044E\u043B\u044F",
"\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
"\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F",
"\u043E\u043A\u0442\u044F\u0431\u0440\u044F",
"\u043D\u043E\u044F\u0431\u0440\u044F",
"\u0434\u0435\u043A\u0430\u0431\u0440\u044F"]
};
var dayValues = {
narrow: ["\u0412", "\u041F", "\u0412", "\u0421", "\u0427", "\u041F", "\u0421"],
short: ["\u0432\u0441", "\u043F\u043D", "\u0432\u0442", "\u0441\u0440", "\u0447\u0442", "\u043F\u0442", "\u0441\u0431"],
abbreviated: ["\u0432\u0441\u043A", "\u043F\u043D\u0434", "\u0432\u0442\u0440", "\u0441\u0440\u0434", "\u0447\u0442\u0432", "\u043F\u0442\u043D", "\u0441\u0443\u0431"],
wide: [
"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435",
"\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A",
"\u0432\u0442\u043E\u0440\u043D\u0438\u043A",
"\u0441\u0440\u0435\u0434\u0430",
"\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
"\u043F\u044F\u0442\u043D\u0438\u0446\u0430",
"\u0441\u0443\u0431\u0431\u043E\u0442\u0430"]
};
var dayPeriodValues = {
narrow: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D.",
noon: "\u043F\u043E\u043B\u0434.",
morning: "\u0443\u0442\u0440\u043E",
afternoon: "\u0434\u0435\u043D\u044C",
evening: "\u0432\u0435\u0447.",
night: "\u043D\u043E\u0447\u044C"
},
abbreviated: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D.",
noon: "\u043F\u043E\u043B\u0434.",
morning: "\u0443\u0442\u0440\u043E",
afternoon: "\u0434\u0435\u043D\u044C",
evening: "\u0432\u0435\u0447.",
night: "\u043D\u043E\u0447\u044C"
},
wide: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D\u043E\u0447\u044C",
noon: "\u043F\u043E\u043B\u0434\u0435\u043D\u044C",
morning: "\u0443\u0442\u0440\u043E",
afternoon: "\u0434\u0435\u043D\u044C",
evening: "\u0432\u0435\u0447\u0435\u0440",
night: "\u043D\u043E\u0447\u044C"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D.",
noon: "\u043F\u043E\u043B\u0434.",
morning: "\u0443\u0442\u0440\u0430",
afternoon: "\u0434\u043D\u044F",
evening: "\u0432\u0435\u0447.",
night: "\u043D\u043E\u0447\u0438"
},
abbreviated: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D.",
noon: "\u043F\u043E\u043B\u0434.",
morning: "\u0443\u0442\u0440\u0430",
afternoon: "\u0434\u043D\u044F",
evening: "\u0432\u0435\u0447.",
night: "\u043D\u043E\u0447\u0438"
},
wide: {
am: "\u0414\u041F",
pm: "\u041F\u041F",
midnight: "\u043F\u043E\u043B\u043D\u043E\u0447\u044C",
noon: "\u043F\u043E\u043B\u0434\u0435\u043D\u044C",
morning: "\u0443\u0442\u0440\u0430",
afternoon: "\u0434\u043D\u044F",
evening: "\u0432\u0435\u0447\u0435\u0440\u0430",
night: "\u043D\u043E\u0447\u0438"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = options === null || options === void 0 ? void 0 : options.unit;
var suffix;
if (unit === "date") {
suffix = "-\u0435";
} else if (unit === "week" || unit === "minute" || unit === "second") {
suffix = "-\u044F";
} else {
suffix = "-\u0439";
}
return number + suffix;
};
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",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "any",
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/ru/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^((до )?н\.?\s?э\.?)/i,
abbreviated: /^((до )?н\.?\s?э\.?)/i,
wide: /^(до нашей эры|нашей эры|наша эра)/i
};
var parseEraPatterns = {
any: [/^д/i, /^н/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234](-?[ыои]?й?)? кв.?/i,
wide: /^[1234](-?[ыои]?й?)? квартал/i
};
var parseQuarterPatterns = {
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: [/^в/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i],
any: [/^в[ос]/i, /^п[он]/i, /^в/i, /^ср/i, /^ч/i, /^п[ят]/i, /^с[уб]/i]
};
var matchDayPeriodPatterns = {
narrow: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
abbreviated: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
wide: /^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i
};
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: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ru.js
var ru = {
code: "ru",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/ru/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), {}, {
ru: ru }) });
//# debugId=766E05712952456564756E2164756E21
//# sourceMappingURL=cdn.js.map
})();
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createTemplateBuilder;
var _options = require("./options.js");
var _string = require("./string.js");
var _literal = require("./literal.js");
const NO_PLACEHOLDER = (0, _options.validate)({
placeholderPattern: false
});
function createTemplateBuilder(formatter, defaultOpts) {
const templateFnCache = new WeakMap();
const templateAstCache = new WeakMap();
const cachedOpts = defaultOpts || (0, _options.validate)(null);
return Object.assign((tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
} else if (Array.isArray(tpl)) {
let builder = templateFnCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, cachedOpts);
templateFnCache.set(tpl, builder);
}
return extendedTrace(builder(args));
} else if (typeof tpl === "object" && tpl) {
if (args.length > 0) throw new Error("Unexpected extra params.");
return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
}
throw new Error(`Unexpected template param ${typeof tpl}`);
}, {
ast: (tpl, ...args) => {
if (typeof tpl === "string") {
if (args.length > 1) throw new Error("Unexpected extra params.");
return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
} else if (Array.isArray(tpl)) {
let builder = templateAstCache.get(tpl);
if (!builder) {
builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
templateAstCache.set(tpl, builder);
}
return builder(args)();
}
throw new Error(`Unexpected template param ${typeof tpl}`);
}
});
}
function extendedTrace(fn) {
let rootStack = "";
try {
throw new Error();
} catch (error) {
if (error.stack) {
rootStack = error.stack.split("\n").slice(3).join("\n");
}
}
return arg => {
try {
return fn(arg);
} catch (err) {
err.stack += `\n =============\n${rootStack}`;
throw err;
}
};
}
//# sourceMappingURL=builder.js.map
@@ -0,0 +1,34 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const WebpackError = require("./WebpackError");
const makeSerializable = require("./util/makeSerializable");
class UnhandledSchemeError extends WebpackError {
/**
* @param {string} scheme scheme
* @param {string} resource resource
*/
constructor(scheme, resource) {
super(
`Reading from "${resource}" is not handled by plugins (Unhandled scheme).` +
'\nWebpack supports "data:" and "file:" URIs by default.' +
`\nYou may need an additional plugin to handle "${scheme}:" URIs.`
);
this.file = resource;
/** @type {string} */
this.name = "UnhandledSchemeError";
}
}
makeSerializable(
UnhandledSchemeError,
"webpack/lib/UnhandledSchemeError",
"UnhandledSchemeError"
);
module.exports = UnhandledSchemeError;
@@ -0,0 +1 @@
{"version":3,"file":"outdent.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,37 @@
# Security Policy
## Supported Versions
The most recently published version is the only supported version. We simply do not have the maintainer capacity to support multiple versions.
## Security Releases
The most recently published version is the only supported version. If there's a security issue in that version, then we will fix it by publishing a new version that addresses the vulnerability, but we will not support or update any previous versions.
__Example Scenario__
Let's say we publish 9.0.0 and a security issue is found in 8.1.3, and it's still in 9.0.0, then we will fix it in 9.0.1 or 9.1.0 (or possibly 10.0.0 if it requires breaking backward compatibility for some reason -- this should be rare), but we will not also publish 8.1.4 or 8.2.1 to fix it.
There could also be a scenario where we're in a pre-release on a new major and a security issue is discovered in the current 8.1.3 release. In that case, we would try to fix it in the current non-pre-release, and bring that forward into the pre-release, but that's as far back as we would go (though we don't consider that going back because the latest release isn't a "full" release, it's still in pre-release stage, so we don't expect everyone to want to adopt a pre-release to get security fix).
## Release Cadence
This happens whenever there's something new to publish, regardless of the [Semver](https://semver.org/) bump, though we try to avoid breaking changes (majors) as much as possible. That time may come, however, and the major version change is an indication that there _may_ be a large change/break in functionality. We may also publish a major out of an abundance of caution, even if there are technically no known backward compatibility breaks, if there have been many internal changes.
When planning a major break in functionality for a new major release where we wish to gather feedback from the community prior to officially publishing it, we would leverage the pre-release version indicator by publishing 9.0.0-alpha.1, for example. After gathering some feedback, we may publishing additional pre-release versions, until we would finally officially publish as 9.0.0.
We may not always leverage pre-releases for breaking changes, however. One scenario would be a complex security issue that would force a breaking change, and needs immediate fixing.
## Backwards Compatibility
This is only guaranteed _within_ a major, not from one major to the next. [Semver](https://semver.org/) states that, "the major version is incremented if any backwards _incompatible_ changes are introduced." That is what we respect for this package. Patches are bug fixes that remain backward compatible (to the current major), minors for new features (or significant internal changes) that remain backward-compatible (to the current major), and majors are for breaking changes (from the previous major).
## Reporting Vulnerabilities
If you believe you have found a security vulnerability in this package, please contact one of the maintainers directly and provide them with details, severity, and a reproduction. We would also welcome a suggested fix if you have one.
Any verified and accepted security vulnerabilities will be rewarded with a listing in a special "Hall of Fame" section of our README, similar to our [Contributors](./README.md#contributors) section. We do NOT offer any type of reward whatsoever other than this listing, and we do NOT guarantee that the listing will remain in the repository for any release made after the one which will address the vulnerability.
### Maintainers
- [Stefan Cameron](mailto:stefan@stefcameron.com)
@@ -0,0 +1,56 @@
"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 migrator_exports = {};
__export(migrator_exports, {
migrate: () => migrate
});
module.exports = __toCommonJS(migrator_exports);
var import_migrator = require("../migrator.cjs");
var import_sql = require("../sql/sql.cjs");
async function migrate(db, callback, config) {
const migrations = (0, import_migrator.readMigrationFiles)(config);
const migrationsTable = typeof config === "string" ? "__drizzle_migrations" : config.migrationsTable ?? "__drizzle_migrations";
const migrationTableCreate = import_sql.sql`
CREATE TABLE IF NOT EXISTS ${import_sql.sql.identifier(migrationsTable)} (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
`;
await db.run(migrationTableCreate);
const dbMigrations = await db.values(
import_sql.sql`SELECT id, hash, created_at FROM ${import_sql.sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`
);
const lastDbMigration = dbMigrations[0] ?? void 0;
const queriesToRun = [];
for (const migration of migrations) {
if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) {
queriesToRun.push(
...migration.sql,
`INSERT INTO \`${migrationsTable}\` ("hash", "created_at") VALUES('${migration.hash}', '${migration.folderMillis}')`
);
}
}
await callback(queriesToRun);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
migrate
});
//# sourceMappingURL=migrator.cjs.map
@@ -0,0 +1,425 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { getTranslation } from '@payloadcms/translations';
import { useRouter, useSearchParams } from 'next/navigation.js';
import { combineWhereConstraints, formatAdminURL, mergeListSearchAndWhere, unflatten } from 'payload/shared';
import * as qs from 'qs-esm';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useForm } from '../../forms/Form/context.js';
import { Form } from '../../forms/Form/index.js';
import { RenderField } from '../../forms/RenderFields/RenderField.js';
import { FormSubmit } from '../../forms/Submit/index.js';
import { XIcon } from '../../icons/X/index.js';
import { useAuth } from '../../providers/Auth/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { DocumentInfoProvider } from '../../providers/DocumentInfo/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { OperationContext } from '../../providers/Operation/index.js';
import { useServerFunctions } from '../../providers/ServerFunctions/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { abortAndIgnore, handleAbortRef } from '../../utilities/abortAndIgnore.js';
import { parseSearchParams } from '../../utilities/parseSearchParams.js';
import { FieldSelect } from '../FieldSelect/index.js';
import './index.scss';
import '../../forms/RenderFields/index.scss';
import { baseClass } from './index.js';
const Submit = t0 => {
const $ = _c(7);
const {
action,
disabled
} = t0;
const {
submit
} = useForm();
const {
t
} = useTranslation();
let t1;
if ($[0] !== action || $[1] !== submit) {
t1 = () => {
submit({
action,
method: "PATCH",
skipValidation: true
});
};
$[0] = action;
$[1] = submit;
$[2] = t1;
} else {
t1 = $[2];
}
const save = t1;
let t2;
if ($[3] !== disabled || $[4] !== save || $[5] !== t) {
t2 = _jsx(FormSubmit, {
className: `${baseClass}__save`,
disabled,
onClick: save,
children: t("general:save")
});
$[3] = disabled;
$[4] = save;
$[5] = t;
$[6] = t2;
} else {
t2 = $[6];
}
return t2;
};
const PublishButton = t0 => {
const $ = _c(7);
const {
action,
disabled
} = t0;
const {
submit
} = useForm();
const {
t
} = useTranslation();
let t1;
if ($[0] !== action || $[1] !== submit) {
t1 = () => {
submit({
action,
method: "PATCH",
overrides: {
_status: "published"
},
skipValidation: true
});
};
$[0] = action;
$[1] = submit;
$[2] = t1;
} else {
t1 = $[2];
}
const save = t1;
let t2;
if ($[3] !== disabled || $[4] !== save || $[5] !== t) {
t2 = _jsx(FormSubmit, {
className: `${baseClass}__publish`,
disabled,
onClick: save,
children: t("version:publishChanges")
});
$[3] = disabled;
$[4] = save;
$[5] = t;
$[6] = t2;
} else {
t2 = $[6];
}
return t2;
};
const SaveDraftButton = t0 => {
const $ = _c(7);
const {
action,
disabled
} = t0;
const {
submit
} = useForm();
const {
t
} = useTranslation();
let t1;
if ($[0] !== action || $[1] !== submit) {
t1 = () => {
submit({
action,
method: "PATCH",
overrides: {
_status: "draft"
},
skipValidation: true
});
};
$[0] = action;
$[1] = submit;
$[2] = t1;
} else {
t1 = $[2];
}
const save = t1;
let t2;
if ($[3] !== disabled || $[4] !== save || $[5] !== t) {
t2 = _jsx(FormSubmit, {
buttonStyle: "secondary",
className: `${baseClass}__draft`,
disabled,
onClick: save,
children: t("version:saveDraft")
});
$[3] = disabled;
$[4] = save;
$[5] = t;
$[6] = t2;
} else {
t2 = $[6];
}
return t2;
};
export const EditManyDrawerContent = props => {
const {
collection,
collection: {
fields,
labels: {
plural,
singular
}
} = {},
count,
drawerSlug,
ids,
onSuccess: onSuccessFromProps,
selectAll,
selectedFields,
setSelectedFields,
where
} = props;
const {
permissions,
user
} = useAuth();
const {
code: locale
} = useLocale();
const {
closeModal
} = useModal();
const {
config: {
routes: {
api: apiRoute
}
}
} = useConfig();
const {
getFormState
} = useServerFunctions();
const {
i18n,
t
} = useTranslation();
const [isInitializing, setIsInitializing] = useState(false);
const router = useRouter();
const abortFormStateRef = React.useRef(null);
const collectionPermissions = permissions?.collections?.[collection.slug];
const searchParams = useSearchParams();
const select = useMemo(() => {
return unflatten(selectedFields.reduce((acc, option) => {
acc[option.value.path] = true;
return acc;
}, {}));
}, [selectedFields]);
const onChange = useCallback(async ({
formState: prevFormState,
submitted
}) => {
const controller = handleAbortRef(abortFormStateRef);
const {
state
} = await getFormState({
collectionSlug: collection.slug,
docPermissions: collectionPermissions,
docPreferences: null,
formState: prevFormState,
operation: 'update',
schemaPath: collection.slug,
select,
signal: controller.signal,
skipValidation: !submitted
});
abortFormStateRef.current = null;
return state;
}, [getFormState, collection, collectionPermissions, select]);
useEffect(() => {
const abortFormState = abortFormStateRef.current;
return () => {
abortAndIgnore(abortFormState);
};
}, []);
const queryString = useMemo(() => {
const whereConstraints = [];
if (where) {
whereConstraints.push(where);
}
const queryWithSearch = mergeListSearchAndWhere({
collectionConfig: collection,
search: searchParams.get('search')
});
if (queryWithSearch) {
whereConstraints.push(queryWithSearch);
}
if (selectAll) {
// Match the current filter/search, or default to all docs
whereConstraints.push(parseSearchParams(searchParams)?.where || {
id: {
not_equals: ''
}
});
} else {
// If we're not selecting all, we need to select specific docs
whereConstraints.push({
id: {
in: ids || []
}
});
}
return qs.stringify({
locale,
select: {},
where: combineWhereConstraints(whereConstraints)
}, {
addQueryPrefix: true
});
}, [collection, searchParams, selectAll, ids, locale, where]);
const onSuccess = () => {
router.replace(qs.stringify({
...parseSearchParams(searchParams),
_r: Date.now(),
page: selectAll ? '1' : undefined
}, {
addQueryPrefix: true
}));
closeModal(drawerSlug);
if (typeof onSuccessFromProps === 'function') {
onSuccessFromProps();
}
};
const onFieldSelect = useCallback(async ({
dispatchFields,
formState,
selected
}) => {
setIsInitializing(true);
setSelectedFields(selected || []);
const {
state: state_0
} = await getFormState({
collectionSlug: collection.slug,
docPermissions: collectionPermissions,
docPreferences: null,
formState,
operation: 'update',
schemaPath: collection.slug,
select: unflatten(selected.reduce((acc_0, option_0) => {
acc_0[option_0.value.path] = true;
return acc_0;
}, {})),
skipValidation: true
});
dispatchFields({
type: 'UPDATE_MANY',
formState: state_0
});
setIsInitializing(false);
}, [getFormState, collection.slug, collectionPermissions, setSelectedFields]);
return /*#__PURE__*/_jsx(DocumentInfoProvider, {
collectionSlug: collection.slug,
currentEditor: user,
hasPublishedDoc: false,
id: null,
initialData: {},
isLocked: false,
lastUpdateTime: 0,
mostRecentVersionIsAutosaved: false,
unpublishedVersionCount: 0,
versionCount: 0,
children: /*#__PURE__*/_jsx(OperationContext, {
value: "update",
children: /*#__PURE__*/_jsxs("div", {
className: `${baseClass}__main`,
children: [/*#__PURE__*/_jsxs("div", {
className: `${baseClass}__header`,
children: [/*#__PURE__*/_jsx("h2", {
className: `${baseClass}__header__title`,
children: t('general:editingLabel', {
count,
label: getTranslation(count > 1 ? plural : singular, i18n)
})
}), /*#__PURE__*/_jsx("button", {
"aria-label": t('general:close'),
className: `${baseClass}__header__close`,
id: `close-drawer__${drawerSlug}`,
onClick: () => closeModal(drawerSlug),
type: "button",
children: /*#__PURE__*/_jsx(XIcon, {})
})]
}), /*#__PURE__*/_jsxs(Form, {
className: `${baseClass}__form`,
isInitializing: isInitializing,
onChange: [onChange],
onSuccess: onSuccess,
children: [/*#__PURE__*/_jsx(FieldSelect, {
fields: fields,
onChange: onFieldSelect,
permissions: collectionPermissions.fields
}), selectedFields.length === 0 ? null : /*#__PURE__*/_jsx("div", {
className: "render-fields",
children: selectedFields.map((option_1, i) => {
const {
value: {
field,
fieldPermissions,
path
}
} = option_1;
return /*#__PURE__*/_jsx(RenderField, {
clientFieldConfig: field,
indexPath: "",
parentPath: "",
parentSchemaPath: "",
path: path,
permissions: fieldPermissions
}, `${path}-${i}`);
})
}), /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar-wrap`,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar`,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar-sticky-wrap`,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__document-actions`,
children: collection?.versions?.drafts ? /*#__PURE__*/_jsxs(React.Fragment, {
children: [/*#__PURE__*/_jsx(SaveDraftButton, {
action: formatAdminURL({
apiRoute,
path: `/${collection.slug}${queryString}&draft=true`
}),
disabled: selectedFields.length === 0
}), /*#__PURE__*/_jsx(PublishButton, {
action: formatAdminURL({
apiRoute,
path: `/${collection.slug}${queryString}&draft=true`
}),
disabled: selectedFields.length === 0
})]
}) : /*#__PURE__*/_jsx(Submit, {
action: formatAdminURL({
apiRoute,
path: `/${collection.slug}${queryString}`
}),
disabled: selectedFields.length === 0
})
})
})
})
})]
})]
})
})
});
};
//# sourceMappingURL=DrawerContent.js.map
@@ -0,0 +1,5 @@
export declare const isSaturdayWithOptions: import("./types.js").FPFn2<
boolean,
import("../isSaturday.js").IsSaturdayOptions | undefined,
string | number | Date
>;
@@ -0,0 +1,158 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const dynamicSamplingContext = require('./tracing/dynamicSamplingContext.js');
const dsn = require('./utils/dsn.js');
const envelope = require('./utils/envelope.js');
const shouldIgnoreSpan = require('./utils/should-ignore-span.js');
const spanUtils = require('./utils/spanUtils.js');
/**
* Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
* Merge with existing data if any.
*
* @internal, exported only for testing
**/
function _enhanceEventWithSdkInfo(event, newSdkInfo) {
if (!newSdkInfo) {
return event;
}
const eventSdkInfo = event.sdk || {};
event.sdk = {
...eventSdkInfo,
name: eventSdkInfo.name || newSdkInfo.name,
version: eventSdkInfo.version || newSdkInfo.version,
integrations: [...(event.sdk?.integrations || []), ...(newSdkInfo.integrations || [])],
packages: [...(event.sdk?.packages || []), ...(newSdkInfo.packages || [])],
settings:
event.sdk?.settings || newSdkInfo.settings
? {
...event.sdk?.settings,
...newSdkInfo.settings,
}
: undefined,
};
return event;
}
/** Creates an envelope from a Session */
function createSessionEnvelope(
session,
dsn$1,
metadata,
tunnel,
) {
const sdkInfo = envelope.getSdkMetadataForEnvelopeHeader(metadata);
const envelopeHeaders = {
sent_at: new Date().toISOString(),
...(sdkInfo && { sdk: sdkInfo }),
...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }),
};
const envelopeItem =
'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];
return envelope.createEnvelope(envelopeHeaders, [envelopeItem]);
}
/**
* Create an Envelope from an event.
*/
function createEventEnvelope(
event,
dsn,
metadata,
tunnel,
) {
const sdkInfo = envelope.getSdkMetadataForEnvelopeHeader(metadata);
/*
Note: Due to TS, event.type may be `replay_event`, theoretically.
In practice, we never call `createEventEnvelope` with `replay_event` type,
and we'd have to adjust a looot of types to make this work properly.
We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)
So the safe choice is to really guard against the replay_event type here.
*/
const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';
_enhanceEventWithSdkInfo(event, metadata?.sdk);
const envelopeHeaders = envelope.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);
// Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to
// sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may
// have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid
// of this `delete`, lest we miss putting it back in the next time the property is in use.)
delete event.sdkProcessingMetadata;
const eventItem = [{ type: eventType }, event];
return envelope.createEnvelope(envelopeHeaders, [eventItem]);
}
/**
* Create envelope from Span item.
*
* Takes an optional client and runs spans through `beforeSendSpan` if available.
*/
function createSpanEnvelope(spans, client) {
function dscHasRequiredProps(dsc) {
return !!dsc.trace_id && !!dsc.public_key;
}
// For the moment we'll obtain the DSC from the first span in the array
// This might need to be changed if we permit sending multiple spans from
// different segments in one envelope
const dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(spans[0]);
const dsn$1 = client?.getDsn();
const tunnel = client?.getOptions().tunnel;
const headers = {
sent_at: new Date().toISOString(),
...(dscHasRequiredProps(dsc) && { trace: dsc }),
...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }),
};
const { beforeSendSpan, ignoreSpans } = client?.getOptions() || {};
const filteredSpans = ignoreSpans?.length
? spans.filter(span => !shouldIgnoreSpan.shouldIgnoreSpan(spanUtils.spanToJSON(span), ignoreSpans))
: spans;
const droppedSpans = spans.length - filteredSpans.length;
if (droppedSpans) {
client?.recordDroppedEvent('before_send', 'span', droppedSpans);
}
const convertToSpanJSON = beforeSendSpan
? (span) => {
const spanJson = spanUtils.spanToJSON(span);
const processedSpan = beforeSendSpan(spanJson);
if (!processedSpan) {
spanUtils.showSpanDropWarning();
return spanJson;
}
return processedSpan;
}
: spanUtils.spanToJSON;
const items = [];
for (const span of filteredSpans) {
const spanJson = convertToSpanJSON(span);
if (spanJson) {
items.push(envelope.createSpanEnvelopeItem(spanJson));
}
}
return envelope.createEnvelope(headers, items);
}
exports._enhanceEventWithSdkInfo = _enhanceEventWithSdkInfo;
exports.createEventEnvelope = createEventEnvelope;
exports.createSessionEnvelope = createSessionEnvelope;
exports.createSpanEnvelope = createSpanEnvelope;
//# sourceMappingURL=envelope.js.map
@@ -0,0 +1 @@
{"version":3,"file":"rows-4.js","sources":["../../../src/icons/rows-4.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Rows4\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0yMSA3LjVIMyIgLz4KICA8cGF0aCBkPSJNMjEgMTJIMyIgLz4KICA8cGF0aCBkPSJNMjEgMTYuNUgzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/rows-4\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 Rows4 = createLucideIcon('Rows4', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M21 7.5H3', key: '1hm9pq' }],\n ['path', { d: 'M21 12H3', key: '2avoz0' }],\n ['path', { d: 'M21 16.5H3', key: 'n7jzkj' }],\n]);\n\nexport default Rows4;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"wifi-high.js","sources":["../../../src/icons/wifi-high.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name WifiHigh\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjBoLjAxIiAvPgogIDxwYXRoIGQ9Ik01IDEyLjg1OWExMCAxMCAwIDAgMSAxNCAwIiAvPgogIDxwYXRoIGQ9Ik04LjUgMTYuNDI5YTUgNSAwIDAgMSA3IDAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/wifi-high\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 WifiHigh = createLucideIcon('WifiHigh', [\n ['path', { d: 'M12 20h.01', key: 'zekei9' }],\n ['path', { d: 'M5 12.859a10 10 0 0 1 14 0', key: '1x1e6c' }],\n ['path', { d: 'M8.5 16.429a5 5 0 0 1 7 0', key: '1bycff' }],\n]);\n\nexport default WifiHigh;\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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,83 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Compilation")} Compilation */
class CompatRuntimeModule extends RuntimeModule {
constructor() {
super("compat", RuntimeModule.STAGE_ATTACH);
/** @type {boolean} */
this.fullHash = true;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
const chunk = /** @type {Chunk} */ (this.chunk);
const {
runtimeTemplate,
mainTemplate,
moduleTemplates,
dependencyTemplates
} = compilation;
const bootstrap = mainTemplate.hooks.bootstrap.call(
"",
chunk,
compilation.hash || "XXXX",
moduleTemplates.javascript,
dependencyTemplates
);
const localVars = mainTemplate.hooks.localVars.call(
"",
chunk,
compilation.hash || "XXXX"
);
const requireExtensions = mainTemplate.hooks.requireExtensions.call(
"",
chunk,
compilation.hash || "XXXX"
);
const runtimeRequirements = chunkGraph.getTreeRuntimeRequirements(chunk);
let requireEnsure = "";
if (runtimeRequirements.has(RuntimeGlobals.ensureChunk)) {
const requireEnsureHandler = mainTemplate.hooks.requireEnsure.call(
"",
chunk,
compilation.hash || "XXXX",
"chunkId"
);
if (requireEnsureHandler) {
requireEnsure = `${
RuntimeGlobals.ensureChunkHandlers
}.compat = ${runtimeTemplate.basicFunction(
"chunkId, promises",
requireEnsureHandler
)};`;
}
}
return [bootstrap, localVars, requireEnsure, requireExtensions]
.filter(Boolean)
.join("\n");
}
/**
* @returns {boolean} true, if the runtime module should get it's own scope
*/
shouldIsolate() {
// We avoid isolating this to have better backward-compat
return false;
}
}
module.exports = CompatRuntimeModule;
@@ -0,0 +1,29 @@
import { transform } from '../utils/transform.mjs';
import { useCombineMotionValues } from './use-combine-values.mjs';
import { useConstant } from '../utils/use-constant.mjs';
import { useComputed } from './use-computed.mjs';
function useTransform(input, inputRangeOrTransformer, outputRange, options) {
if (typeof input === "function") {
return useComputed(input);
}
const transformer = typeof inputRangeOrTransformer === "function"
? inputRangeOrTransformer
: transform(inputRangeOrTransformer, outputRange, options);
return Array.isArray(input)
? useListTransform(input, transformer)
: useListTransform([input], ([latest]) => transformer(latest));
}
function useListTransform(values, transformer) {
const latest = useConstant(() => []);
return useCombineMotionValues(values, () => {
latest.length = 0;
const numValues = values.length;
for (let i = 0; i < numValues; i++) {
latest[i] = values[i].get();
}
return transformer(latest);
});
}
export { useTransform };
@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=(t,n,r)=>()=>(e(t,`Keys cannot be empty`),{path:`/users`,params:r??{},body:JSON.stringify({keys:t,data:n}),method:`PATCH`}),n=(e,t)=>()=>({path:`/users`,params:t??{},body:JSON.stringify(e),method:`PATCH`}),r=(t,n,r)=>()=>(e(t,`Key cannot be empty`),{path:`/users/${t}`,params:r??{},body:JSON.stringify(n),method:`PATCH`}),i=(e,t)=>()=>({path:`/users/me`,params:t??{},body:JSON.stringify(e),method:`PATCH`});export{i as updateMe,r as updateUser,t as updateUsers,n as updateUsersBatch};
//# sourceMappingURL=users.js.map
@@ -0,0 +1,180 @@
"use strict";
exports.formatDistance = void 0;
const translations = {
xseconds_other: "sekundė_sekundžių_sekundes",
xminutes_one: "minutė_minutės_minutę",
xminutes_other: "minutės_minučių_minutes",
xhours_one: "valanda_valandos_valandą",
xhours_other: "valandos_valandų_valandas",
xdays_one: "diena_dienos_dieną",
xdays_other: "dienos_dienų_dienas",
xweeks_one: "savaitė_savaitės_savaitę",
xweeks_other: "savaitės_savaičių_savaites",
xmonths_one: "mėnuo_mėnesio_mėnesį",
xmonths_other: "mėnesiai_mėnesių_mėnesius",
xyears_one: "metai_metų_metus",
xyears_other: "metai_metų_metus",
about: "apie",
over: "daugiau nei",
almost: "beveik",
lessthan: "mažiau nei",
};
const translateSeconds = (_number, addSuffix, _key, isFuture) => {
if (!addSuffix) {
return "kelios sekundės";
} else {
return isFuture ? "kelių sekundžių" : "kelias sekundes";
}
};
const translateSingular = (_number, addSuffix, key, isFuture) => {
return !addSuffix ? forms(key)[0] : isFuture ? forms(key)[1] : forms(key)[2];
};
const translate = (number, addSuffix, key, isFuture) => {
const result = number + " ";
if (number === 1) {
return result + translateSingular(number, addSuffix, key, isFuture);
} else if (!addSuffix) {
return result + (special(number) ? forms(key)[1] : forms(key)[0]);
} else {
if (isFuture) {
return result + forms(key)[1];
} else {
return result + (special(number) ? forms(key)[1] : forms(key)[2]);
}
}
};
function special(number) {
return number % 10 === 0 || (number > 10 && number < 20);
}
function forms(key) {
return translations[key].split("_");
}
const formatDistanceLocale = {
lessThanXSeconds: {
one: translateSeconds,
other: translate,
},
xSeconds: {
one: translateSeconds,
other: translate,
},
halfAMinute: "pusė minutės",
lessThanXMinutes: {
one: translateSingular,
other: translate,
},
xMinutes: {
one: translateSingular,
other: translate,
},
aboutXHours: {
one: translateSingular,
other: translate,
},
xHours: {
one: translateSingular,
other: translate,
},
xDays: {
one: translateSingular,
other: translate,
},
aboutXWeeks: {
one: translateSingular,
other: translate,
},
xWeeks: {
one: translateSingular,
other: translate,
},
aboutXMonths: {
one: translateSingular,
other: translate,
},
xMonths: {
one: translateSingular,
other: translate,
},
aboutXYears: {
one: translateSingular,
other: translate,
},
xYears: {
one: translateSingular,
other: translate,
},
overXYears: {
one: translateSingular,
other: translate,
},
almostXYears: {
one: translateSingular,
other: translate,
},
};
const formatDistance = (token, count, options) => {
const adverb = token.match(/about|over|almost|lessthan/i);
const unit = adverb ? token.replace(adverb[0], "") : token;
const isFuture = options?.comparison !== undefined && options.comparison > 0;
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one(
count,
options?.addSuffix === true,
unit.toLowerCase() + "_one",
isFuture,
);
} else {
result = tokenValue.other(
count,
options?.addSuffix === true,
unit.toLowerCase() + "_other",
isFuture,
);
}
if (adverb) {
const key = adverb[0].toLowerCase();
result = translations[key] + " " + result;
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "po " + result;
} else {
return "prieš " + result;
}
}
return result;
};
exports.formatDistance = formatDistance;
@@ -0,0 +1,5 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateMethodInitSpec(e, a) {
checkPrivateRedeclaration(e, a), a.add(e);
}
module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,85 @@
import { deepMerge, UnauthorizedError } from 'payload';
import { getClientConfig } from '../../../utilities/getClientConfig.js';
import { getClientSchemaMap } from '../../../utilities/getClientSchemaMap.js';
import { getSchemaMap } from '../../../utilities/getSchemaMap.js';
import { renderField } from '../renderField.js';
/**
* @experimental - may break in minor releases
*/
export const _internal_renderFieldHandler = async ({
field: fieldArg,
initialValue,
path,
req,
schemaPath
}) => {
if (!req.user) {
throw new UnauthorizedError();
}
const [entityType, entitySlug, ...fieldPath] = schemaPath.split('.');
const schemaMap = getSchemaMap({
collectionSlug: entityType === 'collection' ? entitySlug : undefined,
config: req.payload.config,
globalSlug: entityType === 'global' ? entitySlug : undefined,
i18n: req.i18n
});
// Provide client schema map as it would have been provided if the target editor field would have been rendered.
// For lexical, only then will it contain all the lexical-internal entries
const clientSchemaMap = getClientSchemaMap({
collectionSlug: entityType === 'collection' ? entitySlug : undefined,
config: getClientConfig({
config: req.payload.config,
i18n: req.i18n,
importMap: req.payload.importMap,
user: req.user
}),
globalSlug: entityType === 'global' ? entitySlug : undefined,
i18n: req.i18n,
payload: req.payload,
schemaMap
});
const targetField = schemaMap.get(`${entitySlug}.${fieldPath.join('.')}`);
if (!targetField) {
throw new Error(`Could not find target field at schemaPath: ${schemaPath}`);
}
const field = fieldArg ? deepMerge(targetField, fieldArg, {
clone: false
}) : targetField;
let data = {};
if (typeof initialValue !== 'undefined') {
if ('name' in field) {
data[field.name] = initialValue;
} else {
data = initialValue;
}
}
const fieldState = {};
renderField({
clientFieldSchemaMap: clientSchemaMap,
collectionSlug: entityType === 'collection' && entitySlug ? entitySlug : '-',
data,
fieldConfig: field,
fieldSchemaMap: schemaMap,
fieldState,
formState: {},
indexPath: '',
lastRenderedPath: '',
operation: 'create',
parentPath: '',
parentSchemaPath: '',
path: path ?? ('name' in field ? field.name : ''),
permissions: true,
preferences: {
fields: {}
},
// If we are passed a field override, we want to ensure we create a new client field based on that override
forceCreateClientField: fieldArg ? true : false,
previousFieldState: undefined,
renderAllFields: true,
req,
schemaPath: `${entitySlug}.${fieldPath.join('.')}`,
siblingData: data
});
return fieldState.customComponents ?? {};
};
//# sourceMappingURL=renderFieldServerFn.js.map
@@ -0,0 +1,5 @@
'use client';
import { useContext } from 'react';
import { WindowInfoContext } from '../WindowInfoProvider/context.js';
export const useWindowInfo = () => useContext(WindowInfoContext);
//# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
/**
* If this attribute is attached to a transaction, the Next.js SDK will drop that transaction.
*/
const TRANSACTION_ATTR_SHOULD_DROP_TRANSACTION = 'sentry.drop_transaction';
const TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL = 'sentry.sentry_trace_backfill';
const TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL = 'sentry.route_backfill';
export { TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL, TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL, TRANSACTION_ATTR_SHOULD_DROP_TRANSACTION };
//# sourceMappingURL=span-attributes-with-logic-attached.js.map
@@ -0,0 +1 @@
{"version":3,"file":"dedupe.d.ts","sourceRoot":"","sources":["../../../src/integrations/dedupe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAkClD;;GAEG;AACH,eAAO,MAAM,iBAAiB,wDAAwC,CAAC;AAEvE,+BAA+B;AAC/B,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,KAAK,GAAG,OAAO,CAcpF"}
@@ -0,0 +1,29 @@
import { formatDistance } from "./mt/_lib/formatDistance.js";
import { formatLong } from "./mt/_lib/formatLong.js";
import { formatRelative } from "./mt/_lib/formatRelative.js";
import { localize } from "./mt/_lib/localize.js";
import { match } from "./mt/_lib/match.js";
/**
* @category Locales
* @summary Maltese locale.
* @language Maltese
* @iso-639-2 mlt
* @author Andras Matzon [@amatzon](@link https://github.com/amatzon)
* @author Bryan Borg [@bryanMt](@link https://github.com/bryanMt)
*/
export const mt = {
code: "mt",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default mt;
@@ -0,0 +1,3 @@
import { useLayoutEffect } from 'react';
declare const _default: typeof useLayoutEffect;
export default _default;
@@ -0,0 +1 @@
Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m};
@@ -0,0 +1,34 @@
import type { ContextOptions, DateArg, RoundingOptions } from "./types.js";
/**
* The {@link differenceInHours} function options.
*/
export interface DifferenceInHoursOptions
extends RoundingOptions,
ContextOptions<Date> {}
/**
* @name differenceInHours
* @category Hour Helpers
* @summary Get the number of hours between the given dates.
*
* @description
* Get the number of hours between the given dates.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options.
*
* @returns The number of hours
*
* @example
* // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?
* const result = differenceInHours(
* new Date(2014, 6, 2, 19, 0),
* new Date(2014, 6, 2, 6, 50)
* )
* //=> 12
*/
export declare function differenceInHours(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInHoursOptions,
): number;
@@ -0,0 +1,16 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Get the current value for {@link LexicalEditor.isEditable}
* using {@link useLexicalSubscription}.
* You should prefer this over manually observing the value with
* {@link LexicalEditor.registerEditableListener},
* which is a bit tricky to do correctly, particularly when using
* React StrictMode (the default for development) or concurrency.
*/
export declare function useLexicalEditable(): boolean;
@@ -0,0 +1,71 @@
{
"name": "source-map-js",
"description": "Generates and consumes source maps",
"version": "1.2.1",
"homepage": "https://github.com/7rulnik/source-map-js",
"author": "Valentin 7rulnik Semirulnik <v7rulnik@gmail.com>",
"contributors": [
"Nick Fitzgerald <nfitzgerald@mozilla.com>",
"Tobias Koppers <tobias.koppers@googlemail.com>",
"Duncan Beevers <duncan@dweebd.com>",
"Stephen Crane <scrane@mozilla.com>",
"Ryan Seddon <seddon.ryan@gmail.com>",
"Miles Elam <miles.elam@deem.com>",
"Mihai Bazon <mihai.bazon@gmail.com>",
"Michael Ficarra <github.public.email@michael.ficarra.me>",
"Todd Wolfson <todd@twolfson.com>",
"Alexander Solovyov <alexander@solovyov.net>",
"Felix Gnass <fgnass@gmail.com>",
"Conrad Irwin <conrad.irwin@gmail.com>",
"usrbincc <usrbincc@yahoo.com>",
"David Glasser <glasser@davidglasser.net>",
"Chase Douglas <chase@newrelic.com>",
"Evan Wallace <evan.exe@gmail.com>",
"Heather Arthur <fayearthur@gmail.com>",
"Hugh Kennedy <hughskennedy@gmail.com>",
"David Glasser <glasser@davidglasser.net>",
"Simon Lydell <simon.lydell@gmail.com>",
"Jmeas Smith <jellyes2@gmail.com>",
"Michael Z Goddard <mzgoddard@gmail.com>",
"azu <azu@users.noreply.github.com>",
"John Gozde <john@gozde.ca>",
"Adam Kirkton <akirkton@truefitinnovation.com>",
"Chris Montgomery <christopher.montgomery@dowjones.com>",
"J. Ryan Stinnett <jryans@gmail.com>",
"Jack Herrington <jherrington@walmartlabs.com>",
"Chris Truter <jeffpalentine@gmail.com>",
"Daniel Espeset <daniel@danielespeset.com>",
"Jamie Wong <jamie.lf.wong@gmail.com>",
"Eddy Bruël <ejpbruel@mozilla.com>",
"Hawken Rives <hawkrives@gmail.com>",
"Gilad Peleg <giladp007@gmail.com>",
"djchie <djchie.dev@gmail.com>",
"Gary Ye <garysye@gmail.com>",
"Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
],
"repository": "7rulnik/source-map-js",
"main": "./source-map.js",
"files": [
"source-map.js",
"source-map.d.ts",
"lib/"
],
"engines": {
"node": ">=0.10.0"
},
"license": "BSD-3-Clause",
"scripts": {
"test": "npm run build && node test/run-tests.js",
"build": "webpack --color",
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
},
"devDependencies": {
"clean-publish": "^3.1.0",
"doctoc": "^0.15.0",
"webpack": "^1.12.0"
},
"clean-publish": {
"cleanDocs": true
},
"typings": "source-map.d.ts"
}
@@ -0,0 +1,18 @@
var baseConvert = require('./_baseConvert');
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function' && typeof _.runInContext == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;
@@ -0,0 +1 @@
{"version":3,"file":"parameterize.js","sources":["../../../src/utils/parameterize.ts"],"sourcesContent":["import type { ParameterizedString } from '../types-hoist/parameterize';\n\n/**\n * Tagged template function which returns parameterized representation of the message\n * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return:\n * \"__sentry_template_string__\": 'This is a log statement with %s and %s params',\n * \"__sentry_template_values__\": ['first', 'second']\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n *\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport function parameterize(strings: TemplateStringsArray, ...values: unknown[]): ParameterizedString {\n const formatted = new String(String.raw(strings, ...values)) as ParameterizedString;\n formatted.__sentry_template_string__ = strings.join('\\x00').replace(/%/g, '%%').replace(/\\0/g, '%s');\n formatted.__sentry_template_values__ = values;\n return formatted;\n}\n\n/**\n * Tagged template function which returns parameterized representation of the message.\n *\n * @param strings An array of string values splitted between expressions\n * @param values Expressions extracted from template string\n * @returns A `ParameterizedString` object that can be passed into `captureMessage` or Sentry.logger.X methods.\n */\nexport const fmt = parameterize;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,OAAO,EAAwB,GAAG,MAAM,EAAkC;AACvG,EAAE,MAAM,SAAA,GAAY,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;AAC7D,EAAE,SAAS,CAAC,0BAAA,GAA6B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;AACtG,EAAE,SAAS,CAAC,0BAAA,GAA6B,MAAM;AAC/C,EAAE,OAAO,SAAS;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,GAAA,GAAM;;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_toPropertyKey","require","_defineProperty","obj","key","value","toPropertyKey","Object","defineProperty","enumerable","configurable","writable"],"sources":["../../src/helpers/defineProperty.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\nimport toPropertyKey from \"./toPropertyKey.ts\";\n\nexport default function _defineProperty<T extends object>(\n obj: T,\n key: PropertyKey,\n value: any,\n) {\n key = toPropertyKey(key);\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n } else {\n // @ts-expect-error - Explicitly assigning to generic type key\n obj[key] = value;\n }\n return obj;\n}\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAEe,SAASC,eAAeA,CACrCC,GAAM,EACNC,GAAgB,EAChBC,KAAU,EACV;EACAD,GAAG,GAAG,IAAAE,sBAAa,EAACF,GAAG,CAAC;EAMxB,IAAIA,GAAG,IAAID,GAAG,EAAE;IACdI,MAAM,CAACC,cAAc,CAACL,GAAG,EAAEC,GAAG,EAAE;MAC9BC,KAAK,EAAEA,KAAK;MACZI,UAAU,EAAE,IAAI;MAChBC,YAAY,EAAE,IAAI;MAClBC,QAAQ,EAAE;IACZ,CAAC,CAAC;EACJ,CAAC,MAAM;IAELR,GAAG,CAACC,GAAG,CAAC,GAAGC,KAAK;EAClB;EACA,OAAOF,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,47 @@
import { DirectusPermission } from "./permission.cjs";
import { DirectusFolder } from "./folder.cjs";
import { DirectusFile } from "./file.cjs";
import { DirectusUser } from "./user.cjs";
import { DirectusRole } from "./role.cjs";
import { DirectusCollection } from "./collection.cjs";
import { DirectusVersion } from "./version.cjs";
import { DirectusActivity } from "./activity.cjs";
import { DirectusComment } from "./comment.cjs";
import { DirectusDashboard } from "./dashboard.cjs";
import { DirectusExtension } from "./extension.cjs";
import { DirectusField } from "./field.cjs";
import { DirectusOperation } from "./operation.cjs";
import { DirectusFlow } from "./flow.cjs";
import { DirectusNotification } from "./notification.cjs";
import { DirectusPanel } from "./panel.cjs";
import { DirectusPreset } from "./preset.cjs";
import { DirectusRelation } from "./relation.cjs";
import { DirectusSettings } from "./settings.cjs";
import { DirectusShare } from "./share.cjs";
//#region src/schema/core.d.ts
interface CoreSchema<Schema = any> {
directus_activity: DirectusActivity<Schema>[];
directus_collections: DirectusCollection<Schema>[];
directus_comments: DirectusComment<Schema>[];
directus_dashboards: DirectusDashboard<Schema>[];
directus_extensions: DirectusExtension<Schema>[];
directus_fields: DirectusField<Schema>[];
directus_files: DirectusFile<Schema>[];
directus_flows: DirectusFlow<Schema>[];
directus_folders: DirectusFolder<Schema>[];
directus_notifications: DirectusNotification<Schema>[];
directus_operations: DirectusOperation<Schema>[];
directus_panels: DirectusPanel<Schema>[];
directus_permissions: DirectusPermission<Schema>[];
directus_presets: DirectusPreset<Schema>[];
directus_relations: DirectusRelation<Schema>[];
directus_roles: DirectusRole<Schema>[];
directus_settings: DirectusSettings<Schema>;
directus_shares: DirectusShare<Schema>[];
directus_users: DirectusUser<Schema>[];
directus_versions: DirectusVersion<Schema>[];
}
//#endregion
export { CoreSchema };
//# sourceMappingURL=core.d.cts.map
@@ -0,0 +1 @@
{"version":3,"file":"coins.js","sources":["../../../src/icons/coins.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Coins\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNiIgLz4KICA8cGF0aCBkPSJNMTguMDkgMTAuMzdBNiA2IDAgMSAxIDEwLjM0IDE4IiAvPgogIDxwYXRoIGQ9Ik03IDZoMXY0IiAvPgogIDxwYXRoIGQ9Im0xNi43MSAxMy44OC43LjcxLTIuODIgMi44MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/coins\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 Coins = createLucideIcon('Coins', [\n ['circle', { cx: '8', cy: '8', r: '6', key: '3yglwk' }],\n ['path', { d: 'M18.09 10.37A6 6 0 1 1 10.34 18', key: 't5s6rm' }],\n ['path', { d: 'M7 6h1v4', key: '1obek4' }],\n ['path', { d: 'm16.71 13.88.7.71-2.82 2.82', key: '1rbuyh' }],\n]);\n\nexport default Coins;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,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,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAChE,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,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC9D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,5 @@
export declare class LCPEntryManager {
_onBeforeProcessingEntry?: (entry: LargestContentfulPaint) => void;
_processEntry(entry: LargestContentfulPaint): void;
}
//# sourceMappingURL=LCPEntryManager.d.ts.map
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setHours as fn } from "../setHours.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const setHours = convertToFP(fn, 2);
// Fallback for modularized imports:
export default setHours;
@@ -0,0 +1,29 @@
/**
* @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 Nut = createLucideIcon("Nut", [
["path", { d: "M12 4V2", key: "1k5q1u" }],
[
"path",
{
d: "M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592A7.003 7.003 0 0 0 19 14v-4",
key: "1tgyif"
}
],
[
"path",
{
d: "M12 4C8 4 4.5 6 4 8c-.243.97-.919 1.952-2 3 1.31-.082 1.972-.29 3-1 .54.92.982 1.356 2 2 1.452-.647 1.954-1.098 2.5-2 .595.995 1.151 1.427 2.5 2 1.31-.621 1.862-1.058 2.5-2 .629.977 1.162 1.423 2.5 2 1.209-.548 1.68-.967 2-2 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4Z",
key: "tnsqj"
}
]
]);
export { Nut as default };
//# sourceMappingURL=nut.js.map
@@ -0,0 +1,7 @@
import type { ArrayField } from 'payload';
export declare const getArrayRelationName: ({ field, path, tableName, }: {
field: ArrayField;
path: string;
tableName: string;
}) => string;
//# sourceMappingURL=getArrayRelationName.d.ts.map
@@ -0,0 +1,37 @@
import React from 'react';
import type { Transform } from '@dnd-kit/utilities';
import type { AutoScrollOptions } from '../../hooks/utilities';
import type { SensorDescriptor } from '../../sensors';
import { CollisionDetection } from '../../utilities';
import { Modifiers } from '../../modifiers';
import type { DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, DragPendingEvent, DragAbortEvent } from '../../types';
import { Announcements, ScreenReaderInstructions } from '../Accessibility';
import type { MeasuringConfiguration } from './types';
export interface Props {
id?: string;
accessibility?: {
announcements?: Announcements;
container?: Element;
restoreFocus?: boolean;
screenReaderInstructions?: ScreenReaderInstructions;
};
autoScroll?: boolean | AutoScrollOptions;
cancelDrop?: CancelDrop;
children?: React.ReactNode;
collisionDetection?: CollisionDetection;
measuring?: MeasuringConfiguration;
modifiers?: Modifiers;
sensors?: SensorDescriptor<any>[];
onDragAbort?(event: DragAbortEvent): void;
onDragPending?(event: DragPendingEvent): void;
onDragStart?(event: DragStartEvent): void;
onDragMove?(event: DragMoveEvent): void;
onDragOver?(event: DragOverEvent): void;
onDragEnd?(event: DragEndEvent): void;
onDragCancel?(event: DragCancelEvent): void;
}
export interface CancelDropArguments extends DragEndEvent {
}
export declare type CancelDrop = (args: CancelDropArguments) => boolean | Promise<boolean>;
export declare const ActiveDraggableContext: React.Context<Transform>;
export declare const DndContext: React.NamedExoticComponent<Props>;
@@ -0,0 +1,586 @@
# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces)
> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save braces
```
## v3.0.0 Released!!
See the [changelog](CHANGELOG.md) for details.
## Why use braces?
Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters.
- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests)
- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity.
- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up.
- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written).
- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)).
- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']`
- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']`
- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']`
- [Supports escaping](#escaping) - To prevent evaluation of special characters.
## Usage
The main export is a function that takes one or more brace `patterns` and `options`.
```js
const braces = require('braces');
// braces(patterns[, options]);
console.log(braces(['{01..05}', '{a..e}']));
//=> ['(0[1-5])', '([a-e])']
console.log(braces(['{01..05}', '{a..e}'], { expand: true }));
//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e']
```
### Brace Expansion vs. Compilation
By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching.
**Compiled**
```js
console.log(braces('a/{x,y,z}/b'));
//=> ['a/(x|y|z)/b']
console.log(braces(['a/{01..20}/b', 'a/{1..5}/b']));
//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ]
```
**Expanded**
Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)):
```js
console.log(braces('a/{x,y,z}/b', { expand: true }));
//=> ['a/x/b', 'a/y/b', 'a/z/b']
console.log(braces.expand('{01..10}'));
//=> ['01','02','03','04','05','06','07','08','09','10']
```
### Lists
Expand lists (like Bash "sets"):
```js
console.log(braces('a/{foo,bar,baz}/*.js'));
//=> ['a/(foo|bar|baz)/*.js']
console.log(braces.expand('a/{foo,bar,baz}/*.js'));
//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js']
```
### Sequences
Expand ranges of characters (like Bash "sequences"):
```js
console.log(braces.expand('{1..3}')); // ['1', '2', '3']
console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b']
console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c']
console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c']
// supports zero-padded ranges
console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b']
console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b']
```
See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options.
### Steppped ranges
Steps, or increments, may be used with ranges:
```js
console.log(braces.expand('{2..10..2}'));
//=> ['2', '4', '6', '8', '10']
console.log(braces('{2..10..2}'));
//=> ['(2|4|6|8|10)']
```
When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion.
### Nesting
Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved.
**"Expanded" braces**
```js
console.log(braces.expand('a{b,c,/{x,y}}/e'));
//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e']
console.log(braces.expand('a/{x,{1..5},y}/c'));
//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c']
```
**"Optimized" braces**
```js
console.log(braces('a{b,c,/{x,y}}/e'));
//=> ['a(b|c|/(x|y))/e']
console.log(braces('a/{x,{1..5},y}/c'));
//=> ['a/(x|([1-5])|y)/c']
```
### Escaping
**Escaping braces**
A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_:
```js
console.log(braces.expand('a\\{d,c,b}e'));
//=> ['a{d,c,b}e']
console.log(braces.expand('a{d,c,b\\}e'));
//=> ['a{d,c,b}e']
```
**Escaping commas**
Commas inside braces may also be escaped:
```js
console.log(braces.expand('a{b\\,c}d'));
//=> ['a{b,c}d']
console.log(braces.expand('a{d\\,c,b}e'));
//=> ['ad,ce', 'abe']
```
**Single items**
Following bash conventions, a brace pattern is also not expanded when it contains a single character:
```js
console.log(braces.expand('a{b}c'));
//=> ['a{b}c']
```
## Options
### options.maxLength
**Type**: `Number`
**Default**: `10,000`
**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera.
```js
console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error
```
### options.expand
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing).
```js
console.log(braces('a/{b,c}/d', { expand: true }));
//=> [ 'a/b/d', 'a/c/d' ]
```
### options.nodupes
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Remove duplicates from the returned array.
### options.rangeLimit
**Type**: `Number`
**Default**: `1000`
**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`.
You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether.
**Examples**
```js
// pattern exceeds the "rangeLimit", so it's optimized automatically
console.log(braces.expand('{1..1000}'));
//=> ['([1-9]|[1-9][0-9]{1,2}|1000)']
// pattern does not exceed "rangeLimit", so it's NOT optimized
console.log(braces.expand('{1..100}'));
//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100']
```
### options.transform
**Type**: `Function`
**Default**: `undefined`
**Description**: Customize range expansion.
**Example: Transforming non-numeric values**
```js
const alpha = braces.expand('x/{a..e}/y', {
transform(value, index) {
// When non-numeric values are passed, "value" is a character code.
return 'foo/' + String.fromCharCode(value) + '-' + index;
},
});
console.log(alpha);
//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ]
```
**Example: Transforming numeric values**
```js
const numeric = braces.expand('{1..5}', {
transform(value) {
// when numeric values are passed, "value" is a number
return 'foo/' + value * 2;
},
});
console.log(numeric);
//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ]
```
### options.quantifiers
**Type**: `Boolean`
**Default**: `undefined`
**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times.
Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists)
The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists.
**Examples**
```js
const braces = require('braces');
console.log(braces('a/b{1,3}/{x,y,z}'));
//=> [ 'a/b(1|3)/(x|y|z)' ]
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true }));
//=> [ 'a/b{1,3}/(x|y|z)' ]
console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true }));
//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ]
```
### options.keepEscaping
**Type**: `Boolean`
**Default**: `undefined`
**Description**: Do not strip backslashes that were used for escaping from the result.
## What is "brace expansion"?
Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs).
In addition to "expansion", braces are also used for matching. In other words:
- [brace expansion](#brace-expansion) is for generating new lists
- [brace matching](#brace-matching) is for filtering existing lists
<details>
<summary><strong>More about brace expansion</strong> (click to expand)</summary>
There are two main types of brace expansion:
1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}`
2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges".
Here are some example brace patterns to illustrate how they work:
**Sets**
```
{a,b,c} => a b c
{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2
```
**Sequences**
```
{1..9} => 1 2 3 4 5 6 7 8 9
{4..-4} => 4 3 2 1 0 -1 -2 -3 -4
{1..20..3} => 1 4 7 10 13 16 19
{a..j} => a b c d e f g h i j
{j..a} => j i h g f e d c b a
{a..z..3} => a d g j m p s v y
```
**Combination**
Sets and sequences can be mixed together or used along with any other strings.
```
{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3
foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar
```
The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases.
## Brace matching
In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching.
For example, the pattern `foo/{1..3}/bar` would match any of following strings:
```
foo/1/bar
foo/2/bar
foo/3/bar
```
But not:
```
baz/1/qux
baz/2/qux
baz/3/qux
```
Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings:
```
foo/1/bar
foo/2/bar
foo/3/bar
baz/1/qux
baz/2/qux
baz/3/qux
```
## Brace matching pitfalls
Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of.
### tldr
**"brace bombs"**
- brace expansion can eat up a huge amount of processing resources
- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially
- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!)
For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section.
### The solution
Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries.
### Geometric complexity
At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`.
For example, the following sets demonstrate quadratic (`O(n^2)`) complexity:
```
{1,2}{3,4} => (2X2) => 13 14 23 24
{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246
```
But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity:
```
{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248
249 257 258 259 267 268 269 347 348 349 357
358 359 367 368 369
```
Now, imagine how this complexity grows given that each element is a n-tuple:
```
{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB)
{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB)
```
Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control.
**More information**
Interested in learning more about brace expansion?
- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion)
- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion)
- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
</details>
## Performance
Braces is not only screaming fast, it's also more accurate the other brace expansion libraries.
### Better algorithms
Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_.
Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently.
**The proof is in the numbers**
Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively.
| **Pattern** | **braces** | **[minimatch][]** |
| --------------------------- | ------------------- | ---------------------------- |
| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) |
| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) |
| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) |
| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) |
| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) |
| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) |
| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) |
| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) |
| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) |
| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) |
| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) |
| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) |
| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) |
| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) |
| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) |
| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) |
| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) |
### Faster algorithms
When you need expansion, braces is still much faster.
_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_
| **Pattern** | **braces** | **[minimatch][]** |
| --------------- | --------------------------- | ---------------------------- |
| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) |
| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) |
| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) |
| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) |
| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) |
| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) |
| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) |
| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) |
If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js).
## Benchmarks
### Running benchmarks
Install dev dependencies:
```bash
npm i -d && npm benchmark
```
### Latest results
Braces is more accurate, without sacrificing performance.
```bash
● expand - range (expanded)
braces x 53,167 ops/sec ±0.12% (102 runs sampled)
minimatch x 11,378 ops/sec ±0.10% (102 runs sampled)
● expand - range (optimized for regex)
braces x 373,442 ops/sec ±0.04% (100 runs sampled)
minimatch x 3,262 ops/sec ±0.18% (100 runs sampled)
● expand - nested ranges (expanded)
braces x 33,921 ops/sec ±0.09% (99 runs sampled)
minimatch x 10,855 ops/sec ±0.28% (100 runs sampled)
● expand - nested ranges (optimized for regex)
braces x 287,479 ops/sec ±0.52% (98 runs sampled)
minimatch x 3,219 ops/sec ±0.28% (101 runs sampled)
● expand - set (expanded)
braces x 238,243 ops/sec ±0.19% (97 runs sampled)
minimatch x 538,268 ops/sec ±0.31% (96 runs sampled)
● expand - set (optimized for regex)
braces x 321,844 ops/sec ±0.10% (97 runs sampled)
minimatch x 140,600 ops/sec ±0.15% (100 runs sampled)
● expand - nested sets (expanded)
braces x 165,371 ops/sec ±0.42% (96 runs sampled)
minimatch x 337,720 ops/sec ±0.28% (100 runs sampled)
● expand - nested sets (optimized for regex)
braces x 242,948 ops/sec ±0.12% (99 runs sampled)
minimatch x 87,403 ops/sec ±0.79% (96 runs sampled)
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Contributors
| **Commits** | **Contributor** |
| ----------- | ------------------------------------------------------------- |
| 197 | [jonschlinkert](https://github.com/jonschlinkert) |
| 4 | [doowb](https://github.com/doowb) |
| 1 | [es128](https://github.com/es128) |
| 1 | [eush77](https://github.com/eush77) |
| 1 | [hemanth](https://github.com/hemanth) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Author
**Jon Schlinkert**
- [GitHub Profile](https://github.com/jonschlinkert)
- [Twitter Profile](https://twitter.com/jonschlinkert)
- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
---
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._
@@ -0,0 +1 @@
{"version":3,"file":"limitNumber.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitNumber.ts"],"names":[],"mappings":";;AAEA,mDAA6D;AAE7D,MAAM,GAAG,GAAG,mBAAS,CAAA;AAMrB,MAAM,IAAI,GAA4D;IACpE,OAAO,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAC;IACjD,OAAO,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,EAAC;IACjD,gBAAgB,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAC;IACzD,gBAAgB,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,EAAC;CAC1D,CAAA;AAQD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,WAAW,IAAI,CAAC,OAAc,CAAC,CAAC,KAAK,IAAI,UAAU,EAAE;IAC5F,MAAM,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC,EAAE,EAAE,CAChC,IAAA,WAAC,EAAA,gBAAgB,IAAI,CAAC,OAAc,CAAC,CAAC,KAAK,YAAY,UAAU,GAAG;CACvE,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QACvC,GAAG,CAAC,SAAS,CAAC,IAAA,WAAC,EAAA,GAAG,IAAI,IAAI,IAAI,CAAC,OAAc,CAAC,CAAC,IAAI,IAAI,UAAU,aAAa,IAAI,GAAG,CAAC,CAAA;IACxF,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,3 @@
import type { Plugin } from "ajv";
declare const deepRequired: Plugin<undefined>;
export default deepRequired;
@@ -0,0 +1,167 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { getTranslation } from '@payloadcms/translations';
import { useRouter } from 'next/navigation.js';
import { formatAdminURL, hasDraftsEnabled } from 'payload/shared';
import * as qs from 'qs-esm';
import React, { useCallback, useMemo } from 'react';
import { toast } from 'sonner';
import { useForm, useFormModified } from '../../forms/Form/context.js';
import { useConfig } from '../../providers/Config/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { useRouteTransition } from '../../providers/RouteTransition/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { requests } from '../../utilities/api.js';
import { traverseForLocalizedFields } from '../../utilities/traverseForLocalizedFields.js';
import { ConfirmationModal } from '../ConfirmationModal/index.js';
import { PopupList } from '../Popup/index.js';
import { SelectLocalesDrawer } from './SelectLocalesDrawer/index.js';
export const DuplicateDocument = ({
id,
slug,
onDuplicate,
redirectAfterDuplicate = true,
selectLocales,
singularLabel
}) => {
const router = useRouter();
const modified = useFormModified();
const {
openModal
} = useModal();
const {
code: localeCode
} = useLocale();
const {
setModified
} = useForm();
const {
startRouteTransition
} = useRouteTransition();
const {
config: {
localization,
routes: {
admin: adminRoute,
api: apiRoute
}
},
getEntityConfig
} = useConfig();
const collectionConfig = getEntityConfig({
collectionSlug: slug
});
const {
i18n,
t
} = useTranslation();
const modalSlug = `duplicate-${id}`;
const drawerSlug = `duplicate-locales-${id}`;
const isDuplicateByLocaleEnabled = useMemo(() => {
if (selectLocales && collectionConfig) {
return traverseForLocalizedFields(collectionConfig.fields);
}
return false;
}, [collectionConfig, selectLocales]);
const handleDuplicate = useCallback(async args => {
const {
selectedLocales
} = args || {};
const hasSelectedLocales = selectedLocales && selectedLocales.length > 0;
const queryParams = {};
if (localeCode) {
queryParams.locale = localeCode;
}
if (hasSelectedLocales) {
queryParams.selectedLocales = selectedLocales;
}
const headers = {
'Accept-Language': i18n.language,
'Content-Type': 'application/json',
credentials: 'include'
};
try {
const res = await requests.post(formatAdminURL({
apiRoute,
path: `/${slug}/${id}/duplicate${qs.stringify(queryParams, {
addQueryPrefix: true
})}`
}), {
body: JSON.stringify(hasDraftsEnabled(collectionConfig) ? {
_status: 'draft'
} : {}),
headers
});
const {
doc,
errors,
message
} = await res.json();
if (res.status < 400) {
toast.success(message || t('general:successfullyDuplicated', {
label: getTranslation(singularLabel, i18n)
}));
setModified(false);
if (redirectAfterDuplicate) {
return startRouteTransition(() => router.push(formatAdminURL({
adminRoute,
path: `/collections/${slug}/${doc.id}${localeCode ? `?locale=${localeCode}` : ''}`
})));
}
if (typeof onDuplicate === 'function') {
void onDuplicate({
collectionConfig,
doc
});
}
} else {
toast.error(errors?.[0].message || message || t('error:unspecific', {
label: getTranslation(singularLabel, i18n)
}));
}
} catch (_error) {
toast.error(t('error:unspecific', {
label: getTranslation(singularLabel, i18n)
}));
}
}, [adminRoute, apiRoute, collectionConfig, i18n, id, localeCode, onDuplicate, redirectAfterDuplicate, router, setModified, singularLabel, slug, startRouteTransition, t]);
const handleConfirmWithoutSaving = useCallback(async () => {
if (selectLocales) {
openModal(drawerSlug);
} else {
await handleDuplicate();
}
}, [handleDuplicate, drawerSlug, selectLocales, openModal]);
const buttonLabel = selectLocales ? `${t('general:duplicate')} ${t('localization:selectedLocales')}` : t('general:duplicate');
if (!selectLocales || isDuplicateByLocaleEnabled) {
return /*#__PURE__*/_jsxs(React.Fragment, {
children: [/*#__PURE__*/_jsx(PopupList.Button, {
id: `action-duplicate${isDuplicateByLocaleEnabled ? `-locales` : ''}`,
onClick: () => {
if (modified) {
openModal(modalSlug);
} else if (selectLocales) {
openModal(drawerSlug);
} else {
void handleDuplicate();
}
},
children: buttonLabel
}), /*#__PURE__*/_jsx(ConfirmationModal, {
body: t('general:unsavedChangesDuplicate'),
confirmLabel: t('general:duplicateWithoutSaving'),
heading: t('general:unsavedChanges'),
modalSlug: modalSlug,
onConfirm: handleConfirmWithoutSaving
}), selectLocales && localization && /*#__PURE__*/_jsx(SelectLocalesDrawer, {
localization: localization,
onConfirm: handleDuplicate,
slug: drawerSlug
})]
});
}
return null;
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
import { feedbackAsyncIntegration } from './feedbackAsync';
export * from './index.bundle.base';
export { getActiveSpan, getRootSpan, getSpanDescendants, setMeasurement, startInactiveSpan, startNewTrace, startSpan, startSpanManual, withActiveSpan, logger, consoleLoggingIntegration, } from '@sentry/core';
export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
export { reportPageLoaded } from './tracing/reportPageLoaded';
export { setActiveSpanInBrowser } from './tracing/setActiveSpan';
export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
export { feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration };
export { replayIntegration, getReplay } from '@sentry-internal/replay';
//# sourceMappingURL=index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map
@@ -0,0 +1,17 @@
/*
* 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.
*/
export {};
//# sourceMappingURL=MeterProvider.js.map
@@ -0,0 +1,104 @@
'use strict';
const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
const $ = {
enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && FORCE_COLOR !== '0',
// modifiers
reset: init(0, 0),
bold: init(1, 22),
dim: init(2, 22),
italic: init(3, 23),
underline: init(4, 24),
inverse: init(7, 27),
hidden: init(8, 28),
strikethrough: init(9, 29),
// colors
black: init(30, 39),
red: init(31, 39),
green: init(32, 39),
yellow: init(33, 39),
blue: init(34, 39),
magenta: init(35, 39),
cyan: init(36, 39),
white: init(37, 39),
gray: init(90, 39),
grey: init(90, 39),
// background colors
bgBlack: init(40, 49),
bgRed: init(41, 49),
bgGreen: init(42, 49),
bgYellow: init(43, 49),
bgBlue: init(44, 49),
bgMagenta: init(45, 49),
bgCyan: init(46, 49),
bgWhite: init(47, 49)
};
function run(arr, str) {
let i=0, tmp, beg='', end='';
for (; i < arr.length; i++) {
tmp = arr[i];
beg += tmp.open;
end += tmp.close;
if (str.includes(tmp.close)) {
str = str.replace(tmp.rgx, tmp.close + tmp.open);
}
}
return beg + str + end;
}
function chain(has, keys) {
let ctx = { has, keys };
ctx.reset = $.reset.bind(ctx);
ctx.bold = $.bold.bind(ctx);
ctx.dim = $.dim.bind(ctx);
ctx.italic = $.italic.bind(ctx);
ctx.underline = $.underline.bind(ctx);
ctx.inverse = $.inverse.bind(ctx);
ctx.hidden = $.hidden.bind(ctx);
ctx.strikethrough = $.strikethrough.bind(ctx);
ctx.black = $.black.bind(ctx);
ctx.red = $.red.bind(ctx);
ctx.green = $.green.bind(ctx);
ctx.yellow = $.yellow.bind(ctx);
ctx.blue = $.blue.bind(ctx);
ctx.magenta = $.magenta.bind(ctx);
ctx.cyan = $.cyan.bind(ctx);
ctx.white = $.white.bind(ctx);
ctx.gray = $.gray.bind(ctx);
ctx.grey = $.grey.bind(ctx);
ctx.bgBlack = $.bgBlack.bind(ctx);
ctx.bgRed = $.bgRed.bind(ctx);
ctx.bgGreen = $.bgGreen.bind(ctx);
ctx.bgYellow = $.bgYellow.bind(ctx);
ctx.bgBlue = $.bgBlue.bind(ctx);
ctx.bgMagenta = $.bgMagenta.bind(ctx);
ctx.bgCyan = $.bgCyan.bind(ctx);
ctx.bgWhite = $.bgWhite.bind(ctx);
return ctx;
}
function init(open, close) {
let blk = {
open: `\x1b[${open}m`,
close: `\x1b[${close}m`,
rgx: new RegExp(`\\x1b\\[${close}m`, 'g')
};
return function (txt) {
if (this !== void 0 && this.has !== void 0) {
this.has.includes(open) || (this.has.push(open),this.keys.push(blk));
return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';
}
return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';
};
}
module.exports = $;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './users-round.js';
//# sourceMappingURL=users-2.js.map
@@ -0,0 +1,25 @@
import { entityKind } from "../../entity.js";
import { SQL, type SQLWrapper } from "../../sql/sql.js";
import type { SingleStoreSession } from "../session.js";
import type { SingleStoreTable } from "../table.js";
export declare class SingleStoreCountBuilder<TSession extends SingleStoreSession<any, any, any>> extends SQL<number> implements Promise<number>, SQLWrapper {
readonly params: {
source: SingleStoreTable | /* SingleStoreViewBase | */ SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
};
private sql;
static readonly [entityKind] = "SingleStoreCountBuilder";
[Symbol.toStringTag]: string;
private session;
private static buildEmbeddedCount;
private static buildCount;
constructor(params: {
source: SingleStoreTable | /* SingleStoreViewBase | */ SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
});
then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
catch(onRejected?: ((reason: any) => never | PromiseLike<never>) | null | undefined): Promise<number>;
finally(onFinally?: (() => void) | null | undefined): Promise<number>;
}
@@ -0,0 +1,3 @@
export * from "./driver.js";
export * from "./session.js";
//# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
const e=(e,t)=>()=>({path:`/permissions`,params:t??{},body:JSON.stringify(e),method:`POST`}),t=(e,t)=>()=>({path:`/permissions`,params:t??{},body:JSON.stringify(e),method:`POST`});exports.createPermission=t,exports.createPermissions=e;
//# sourceMappingURL=permissions.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"flashlight.js","sources":["../../../src/icons/flashlight.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Flashlight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggNmMwIDItMiAyLTIgNHYxMGEyIDIgMCAwIDEtMiAyaC00YTIgMiAwIDAgMS0yLTJWMTBjMC0yLTItMi0yLTRWMmgxMnoiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSIxOCIgeTE9IjYiIHkyPSI2IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMTIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/flashlight\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 Flashlight = createLucideIcon('Flashlight', [\n [\n 'path',\n {\n d: 'M18 6c0 2-2 2-2 4v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V10c0-2-2-2-2-4V2h12z',\n key: '1orkel',\n },\n ],\n ['line', { x1: '6', x2: '18', y1: '6', y2: '6', key: '1z11jq' }],\n ['line', { x1: '12', x2: '12', y1: '12', y2: '12', key: '1f4yc1' }],\n]);\n\nexport default Flashlight;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAChD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,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,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/D,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;;"}
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalPlainTextPlugin.dev.mjs') : import('./LexicalPlainTextPlugin.prod.mjs'));
export const PlainTextPlugin = mod.PlainTextPlugin;
@@ -0,0 +1,30 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
export type SingleStoreRealBuilderInitial<TName extends string> = SingleStoreRealBuilder<{
name: TName;
dataType: 'number';
columnType: 'SingleStoreReal';
data: number;
driverParam: number | string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreReal'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreRealConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: SingleStoreRealConfig | undefined);
}
export declare class SingleStoreReal<T extends ColumnBaseConfig<'number', 'SingleStoreReal'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreRealConfig> {
static readonly [entityKind]: string;
precision: number | undefined;
scale: number | undefined;
getSQLType(): string;
}
export interface SingleStoreRealConfig {
precision?: number;
scale?: number;
}
export declare function real(): SingleStoreRealBuilderInitial<''>;
export declare function real(config?: SingleStoreRealConfig): SingleStoreRealBuilderInitial<''>;
export declare function real<TName extends string>(name: TName, config?: SingleStoreRealConfig): SingleStoreRealBuilderInitial<TName>;
@@ -0,0 +1,62 @@
declare const BigIntMock: () => bigint;
declare const ByteMock: () => Uint8Array;
declare const DateMock: () => string;
export declare const Time: () => string;
export declare const DateTime: () => string;
export declare const DateTimeISO: () => string;
export declare const Timestamp: () => number;
export declare const TimeZone: () => string;
export declare const UtcOffset: () => string;
export declare const Duration: () => string;
export declare const LocalDate: () => string;
export declare const LocalTime: () => string;
export declare const LocalDateTime: () => string;
export declare const LocalEndTime: () => string;
export declare const EmailAddress: () => string;
export declare const NegativeFloat: () => number;
export declare const NegativeInt: () => number;
export declare const NonEmptyString: () => string;
export declare const NonNegativeFloat: () => number;
export declare const NonNegativeInt: () => number;
export declare const NonPositiveFloat: () => number;
export declare const NonPositiveInt: () => number;
export declare const PhoneNumber: () => string;
export declare const ObjectID: () => string;
export declare const PositiveFloat: () => number;
export declare const PositiveInt: () => number;
export declare const PostalCode: () => string;
declare const URLMock: () => any;
export declare const UUID: () => string;
export declare const HexColorCode: () => string;
export declare const Hexadecimal: () => string;
export declare const HSL: () => string;
export declare const HSLA: () => string;
export declare const IP: () => string;
export declare const IPv4: () => string;
export declare const IPv6: () => string;
export declare const MAC: () => string;
export declare const Port: () => number;
export declare const RGB: () => string;
export declare const RGBA: () => string;
export declare const ISBN: () => string;
export declare const JWT: () => string;
export declare const Latitude: () => number;
export declare const Longitude: () => number;
export declare const USCurrency: () => number;
export declare const Currency: () => string;
export declare const JSON: () => {};
export declare const JSONObject: () => {};
export declare const IBAN: () => string;
export declare const Void: () => null;
export declare const SafeInt: () => number;
export declare const DID: () => string;
export declare const CountryCode: () => string;
export declare const Locale: () => string;
export declare const RoutingNumber: () => string;
export declare const AccountNumber: () => string;
export declare const Cuid: () => string;
export declare const SemVer: () => string;
export declare const DeweyDecimal: () => string;
export declare const LCCSubclass: () => string;
export declare const IPCPatent: () => string;
export { DateMock as Date, URLMock as URL, NonNegativeInt as UnsignedInt, NonNegativeFloat as UnsignedFloat, UUID as GUID, BigIntMock as Long, BigIntMock as BigInt, ByteMock as Byte, Duration as ISO8601Duration, };
@@ -0,0 +1,4 @@
export declare function parse(): void;
export * from "./types.js";
export declare const _Parser: undefined;
export { isStructurallySame } from "./manipulator.js";
@@ -0,0 +1,18 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=Attributes.js.map
@@ -0,0 +1,51 @@
import { _ as _overload_yield } from "./_overload_yield.js";
function _async_generator_delegate(inner) {
var iter = {}, waiting = false;
function pump(key, value) {
waiting = true;
value = new Promise(function(resolve) {
resolve(inner[key](value));
});
return { done: false, value: new _overload_yield(value, /* kind: delegate */ 1) };
}
iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function() {
return this;
};
iter.next = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("next", value);
};
if (typeof inner.throw === "function") {
iter.throw = function(value) {
if (waiting) {
waiting = false;
throw value;
}
return pump("throw", value);
};
}
if (typeof inner.return === "function") {
iter.return = function(value) {
if (waiting) {
waiting = false;
return value;
}
return pump("return", value);
};
}
return iter;
}
export { _async_generator_delegate as _ };
@@ -0,0 +1 @@
{"version":3,"file":"columns-2.js","sources":["../../../src/icons/columns-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Columns2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiAzdjE4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/columns-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Columns2 = createLucideIcon('Columns2', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M12 3v18', key: '108xh3' }],\n]);\n\nexport default Columns2;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,247 @@
JS-YAML - YAML 1.2 parser / writer for JavaScript
=================================================
[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions)
[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml)
__[Online Demo](https://nodeca.github.io/js-yaml/)__
This is an implementation of [YAML](https://yaml.org/), a human-friendly data
serialization language. Started as [PyYAML](https://pyyaml.org/) port, it was
completely rewritten from scratch. Now it's very fast, and supports 1.2 spec.
Installation
------------
### YAML module for node.js
```
npm install js-yaml
```
### CLI executable
If you want to inspect your YAML files from CLI, install js-yaml globally:
```
npm install -g js-yaml
```
#### Usage
```
usage: js-yaml [-h] [-v] [-c] [-t] file
Positional arguments:
file File with YAML document(s)
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-c, --compact Display errors in compact mode
-t, --trace Show stack trace on error
```
API
---
Here we cover the most 'useful' methods. If you need advanced details (creating
your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples)
for more info.
``` javascript
const yaml = require('js-yaml');
const fs = require('fs');
// Get document, or throw exception on error
try {
const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8'));
console.log(doc);
} catch (e) {
console.log(e);
}
```
### load (string [ , options ])
Parses `string` as single YAML document. Returns either a
plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does
not support regexps, functions and undefined.
options:
- `filename` _(default: null)_ - string to be used as a file path in
error/warning messages.
- `onWarning` _(default: null)_ - function to call on warning messages.
Loader will call this function with an instance of `YAMLException` for each warning.
- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use.
- `FAILSAFE_SCHEMA` - only strings, arrays and plain objects:
https://www.yaml.org/spec/1.2/spec.html#id2802346
- `JSON_SCHEMA` - all JSON-supported types:
https://www.yaml.org/spec/1.2/spec.html#id2803231
- `CORE_SCHEMA` - same as `JSON_SCHEMA`:
https://www.yaml.org/spec/1.2/spec.html#id2804923
- `DEFAULT_SCHEMA` - all supported YAML types.
- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error.
NOTE: This function **does not** understand multi-document sources, it throws
exception on those.
NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions.
So, the JSON schema is not as strictly defined in the YAML specification.
It allows numbers in any notation, use `Null` and `NULL` as `null`, etc.
The core schema also has no such restrictions. It allows binary notation for integers.
### loadAll (string [, iterator] [, options ])
Same as `load()`, but understands multi-document sources. Applies
`iterator` to each document if specified, or returns array of documents.
``` javascript
const yaml = require('js-yaml');
yaml.loadAll(data, function (doc) {
console.log(doc);
});
```
### dump (object [ , options ])
Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will
throw an exception if you try to dump regexps or functions. However, you can
disable exceptions by setting the `skipInvalid` option to `true`.
options:
- `indent` _(default: 2)_ - indentation width to use (in spaces).
- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements
- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function
in the safe schema) and skip pairs and single values with such types.
- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from
block to flow style for collections. -1 means block style everwhere
- `styles` - "tag" => "style" map. Each tag may have own set of styles.
- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use.
- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a
function, use the function to sort the keys.
- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width.
- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references
- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older
yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1
- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded.
- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters.
- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to.
- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`).
The following table show availlable styles (e.g. "canonical",
"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml
output is shown on the right side after `=>` (default setting) or `->`:
``` none
!!null
"canonical" -> "~"
"lowercase" => "null"
"uppercase" -> "NULL"
"camelcase" -> "Null"
"empty" -> ""
!!int
"binary" -> "0b1", "0b101010", "0b1110001111010"
"octal" -> "0o1", "0o52", "0o16172"
"decimal" => "1", "42", "7290"
"hexadecimal" -> "0x1", "0x2A", "0x1C7A"
!!bool
"lowercase" => "true", "false"
"uppercase" -> "TRUE", "FALSE"
"camelcase" -> "True", "False"
!!float
"lowercase" => ".nan", '.inf'
"uppercase" -> ".NAN", '.INF'
"camelcase" -> ".NaN", '.Inf'
```
Example:
``` javascript
dump(object, {
'styles': {
'!!null': 'canonical' // dump null as ~
},
'sortKeys': true // sort object keys
});
```
Supported YAML types
--------------------
The list of standard YAML tags and corresponding JavaScript types. See also
[YAML tag discussion](https://pyyaml.org/wiki/YAMLTagDiscussion) and
[YAML types repository](https://yaml.org/type/).
```
!!null '' # null
!!bool 'yes' # bool
!!int '3...' # number
!!float '3.14...' # number
!!binary '...base64...' # buffer
!!timestamp 'YYYY-...' # date
!!omap [ ... ] # array of key-value pairs
!!pairs [ ... ] # array or array pairs
!!set { ... } # array of objects with given keys and null values
!!str '...' # string
!!seq [ ... ] # array
!!map { ... } # object
```
**JavaScript-specific tags**
See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for
extra types.
Caveats
-------
Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects
or arrays as keys, and stringifies (by calling `toString()` method) them at the
moment of adding them.
``` yaml
---
? [ foo, bar ]
: - baz
? { foo: bar }
: - baz
- baz
```
``` javascript
{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] }
```
Also, reading of properties on implicit block mapping keys is not supported yet.
So, the following YAML document cannot be loaded.
``` yaml
&anchor foo:
foo: bar
*anchor: duplicate key
baz: bat
*anchor: duplicate key
```
js-yaml for enterprise
----------------------
Available as part of the Tidelift Subscription
The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
@@ -0,0 +1,33 @@
import {
Agent,
ClientRequest,
RequestOptions,
AgentCallbackCallback,
AgentCallbackPromise,
AgentCallbackReturn
} from './index';
type LegacyCallback = (
req: ClientRequest,
opts: RequestOptions,
fn: AgentCallbackCallback
) => void;
export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
return new Promise((resolve, reject) => {
fn.call(
this,
req,
opts,
(err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
if (err) {
reject(err);
} else {
resolve(rtn);
}
}
);
});
};
}
@@ -0,0 +1,12 @@
var compose = function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (x) {
return fns.reduceRight(function (y, f) {
return f(y);
}, x);
};
};
export { compose as default };
@@ -0,0 +1,20 @@
import { Loader, LoaderSync, Options, OptionsSync } from './index';
export declare type Config = any;
export declare type CosmiconfigResult = {
config: Config;
filepath: string;
isEmpty?: boolean;
} | null;
export interface ExplorerOptions extends Required<Options> {
}
export interface ExplorerOptionsSync extends Required<OptionsSync> {
}
export declare type Cache = Map<string, CosmiconfigResult>;
export declare type LoadedFileContent = Config | null | undefined;
export interface Loaders {
[key: string]: Loader;
}
export interface LoadersSync {
[key: string]: LoaderSync;
}
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,6 @@
import _typeof from "./typeof.js";
function _checkInRHS(e) {
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null"));
return e;
}
export { _checkInRHS as default };

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