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,10 @@
import type { ASTVisitor } from '../../language/visitor';
import type { SDLValidationContext } from '../ValidationContext';
/**
* Unique type names
*
* A GraphQL document is only valid if all defined types have unique names.
*/
export declare function UniqueTypeNamesRule(
context: SDLValidationContext,
): ASTVisitor;
@@ -0,0 +1 @@
{"version":3,"file":"sticky-note.js","sources":["../../../src/icons/sticky-note.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name StickyNote\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgM0g1YTIgMiAwIDAgMC0yIDJ2MTRhMiAyIDAgMCAwIDIgMmgxNGEyIDIgMCAwIDAgMi0yVjhaIiAvPgogIDxwYXRoIGQ9Ik0xNSAzdjRhMiAyIDAgMCAwIDIgMmg0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/sticky-note\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 StickyNote = createLucideIcon('StickyNote', [\n ['path', { d: 'M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z', key: 'qazsjp' }],\n ['path', { d: 'M15 3v4a2 2 0 0 0 2 2h4', key: '40519r' }],\n]);\n\nexport default StickyNote;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"userfeedback.d.ts","sourceRoot":"","sources":["../../../src/userfeedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAG9G;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,YAAY,EACtB,EACE,QAAQ,EACR,MAAM,EACN,GAAG,GACJ,EAAE;IACD,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,GAAG,EAAE,aAAa,GAAG,SAAS,CAAC;CAChC,GACA,aAAa,CAef"}
@@ -0,0 +1 @@
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/admin/elements/Table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAE/D,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;CAC1C,CAAA"}
@@ -0,0 +1,28 @@
import { formatDistance } from "./oc/_lib/formatDistance.js";
import { formatLong } from "./oc/_lib/formatLong.js";
import { formatRelative } from "./oc/_lib/formatRelative.js";
import { localize } from "./oc/_lib/localize.js";
import { match } from "./oc/_lib/match.js";
/**
* @category Locales
* @summary Occitan locale.
* @language Occitan
* @iso-639-2 oci
* @author Quentin PAGÈS
*/
export const oc = {
code: "oc",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default oc;
@@ -0,0 +1,89 @@
/**
* Essential MCP attribute constants for Sentry instrumentation
*
* Based on OpenTelemetry MCP semantic conventions
* @see https://github.com/open-telemetry/semantic-conventions/blob/3097fb0af5b9492b0e3f55dc5f6c21a3dc2be8df/docs/gen-ai/mcp.md
*/
/** The name of the request or notification method */
export declare const MCP_METHOD_NAME_ATTRIBUTE = "mcp.method.name";
/** JSON-RPC request identifier for the request. Unique within the MCP session. */
export declare const MCP_REQUEST_ID_ATTRIBUTE = "mcp.request.id";
/** Identifies the MCP session */
export declare const MCP_SESSION_ID_ATTRIBUTE = "mcp.session.id";
/** Transport method used for MCP communication */
export declare const MCP_TRANSPORT_ATTRIBUTE = "mcp.transport";
/** Name of the MCP client application */
export declare const MCP_CLIENT_NAME_ATTRIBUTE = "mcp.client.name";
/** Display title of the MCP client application */
export declare const MCP_CLIENT_TITLE_ATTRIBUTE = "mcp.client.title";
/** Version of the MCP client application */
export declare const MCP_CLIENT_VERSION_ATTRIBUTE = "mcp.client.version";
/** Name of the MCP server application */
export declare const MCP_SERVER_NAME_ATTRIBUTE = "mcp.server.name";
/** Display title of the MCP server application */
export declare const MCP_SERVER_TITLE_ATTRIBUTE = "mcp.server.title";
/** Version of the MCP server application */
export declare const MCP_SERVER_VERSION_ATTRIBUTE = "mcp.server.version";
/** MCP protocol version used in the session */
export declare const MCP_PROTOCOL_VERSION_ATTRIBUTE = "mcp.protocol.version";
/** Name of the tool being called */
export declare const MCP_TOOL_NAME_ATTRIBUTE = "mcp.tool.name";
/** The resource URI being accessed */
export declare const MCP_RESOURCE_URI_ATTRIBUTE = "mcp.resource.uri";
/** Name of the prompt template */
export declare const MCP_PROMPT_NAME_ATTRIBUTE = "mcp.prompt.name";
/** Whether a tool execution resulted in an error */
export declare const MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE = "mcp.tool.result.is_error";
/** Number of content items in the tool result */
export declare const MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE = "mcp.tool.result.content_count";
/** Serialized content of the tool result */
export declare const MCP_TOOL_RESULT_CONTENT_ATTRIBUTE = "mcp.tool.result.content";
/** Prefix for tool result attributes that contain sensitive content */
export declare const MCP_TOOL_RESULT_PREFIX = "mcp.tool.result";
/** Description of the prompt result */
export declare const MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE = "mcp.prompt.result.description";
/** Number of messages in the prompt result */
export declare const MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE = "mcp.prompt.result.message_count";
/** Role of the message in the prompt result (for single message results) */
export declare const MCP_PROMPT_RESULT_MESSAGE_ROLE_ATTRIBUTE = "mcp.prompt.result.message_role";
/** Content of the message in the prompt result (for single message results) */
export declare const MCP_PROMPT_RESULT_MESSAGE_CONTENT_ATTRIBUTE = "mcp.prompt.result.message_content";
/** Prefix for prompt result attributes that contain sensitive content */
export declare const MCP_PROMPT_RESULT_PREFIX = "mcp.prompt.result";
/** Prefix for MCP request argument prefix for each argument */
export declare const MCP_REQUEST_ARGUMENT = "mcp.request.argument";
/** Log level for MCP logging operations */
export declare const MCP_LOGGING_LEVEL_ATTRIBUTE = "mcp.logging.level";
/** Logger name for MCP logging operations */
export declare const MCP_LOGGING_LOGGER_ATTRIBUTE = "mcp.logging.logger";
/** Data type of the logged message */
export declare const MCP_LOGGING_DATA_TYPE_ATTRIBUTE = "mcp.logging.data_type";
/** Log message content */
export declare const MCP_LOGGING_MESSAGE_ATTRIBUTE = "mcp.logging.message";
/** OSI transport layer protocol */
export declare const NETWORK_TRANSPORT_ATTRIBUTE = "network.transport";
/** The version of JSON RPC protocol used */
export declare const NETWORK_PROTOCOL_VERSION_ATTRIBUTE = "network.protocol.version";
/** Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name */
export declare const CLIENT_ADDRESS_ATTRIBUTE = "client.address";
/** Client port number */
export declare const CLIENT_PORT_ATTRIBUTE = "client.port";
/** Sentry operation value for MCP server spans */
export declare const MCP_SERVER_OP_VALUE = "mcp.server";
/**
* Sentry operation value for client-to-server notifications
* Following OpenTelemetry MCP semantic conventions
*/
export declare const MCP_NOTIFICATION_CLIENT_TO_SERVER_OP_VALUE = "mcp.notification.client_to_server";
/**
* Sentry operation value for server-to-client notifications
* Following OpenTelemetry MCP semantic conventions
*/
export declare const MCP_NOTIFICATION_SERVER_TO_CLIENT_OP_VALUE = "mcp.notification.server_to_client";
/** Sentry origin value for MCP function spans */
export declare const MCP_FUNCTION_ORIGIN_VALUE = "auto.function.mcp_server";
/** Sentry origin value for MCP notification spans */
export declare const MCP_NOTIFICATION_ORIGIN_VALUE = "auto.mcp.notification";
/** Sentry source value for MCP route spans */
export declare const MCP_ROUTE_SOURCE_VALUE = "route";
//# sourceMappingURL=attributes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"}
@@ -0,0 +1 @@
{"version":3,"file":"debug.js","sources":["../../../src/utils/debug.ts"],"sourcesContent":["let cachedDebuggerEnabled: boolean | undefined;\n\n/**\n * Was the debugger enabled when this function was first called?\n */\nexport async function isDebuggerEnabled(): Promise<boolean> {\n if (cachedDebuggerEnabled === undefined) {\n try {\n // Node can be built without inspector support\n const inspector = await import('node:inspector');\n cachedDebuggerEnabled = !!inspector.url();\n } catch {\n cachedDebuggerEnabled = false;\n }\n }\n\n return cachedDebuggerEnabled;\n}\n"],"names":[],"mappings":"AAAA,IAAI,qBAAqB;;AAEzB;AACA;AACA;AACO,eAAe,iBAAiB,GAAqB;AAC5D,EAAE,IAAI,qBAAA,KAA0B,SAAS,EAAE;AAC3C,IAAI,IAAI;AACR;AACA,MAAM,MAAM,SAAA,GAAY,MAAM,OAAO,gBAAgB,CAAC;AACtD,MAAM,qBAAA,GAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;AAC/C,IAAI,EAAE,MAAM;AACZ,MAAM,qBAAA,GAAwB,KAAK;AACnC,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,qBAAqB;AAC9B;;;;"}
@@ -0,0 +1,965 @@
'use strict';
/*eslint-disable no-use-before-define*/
var common = require('./common');
var YAMLException = require('./exception');
var DEFAULT_SCHEMA = require('./schema/default');
var _toString = Object.prototype.toString;
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var CHAR_BOM = 0xFEFF;
var CHAR_TAB = 0x09; /* Tab */
var CHAR_LINE_FEED = 0x0A; /* LF */
var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */
var CHAR_SPACE = 0x20; /* Space */
var CHAR_EXCLAMATION = 0x21; /* ! */
var CHAR_DOUBLE_QUOTE = 0x22; /* " */
var CHAR_SHARP = 0x23; /* # */
var CHAR_PERCENT = 0x25; /* % */
var CHAR_AMPERSAND = 0x26; /* & */
var CHAR_SINGLE_QUOTE = 0x27; /* ' */
var CHAR_ASTERISK = 0x2A; /* * */
var CHAR_COMMA = 0x2C; /* , */
var CHAR_MINUS = 0x2D; /* - */
var CHAR_COLON = 0x3A; /* : */
var CHAR_EQUALS = 0x3D; /* = */
var CHAR_GREATER_THAN = 0x3E; /* > */
var CHAR_QUESTION = 0x3F; /* ? */
var CHAR_COMMERCIAL_AT = 0x40; /* @ */
var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */
var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
var CHAR_GRAVE_ACCENT = 0x60; /* ` */
var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */
var CHAR_VERTICAL_LINE = 0x7C; /* | */
var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */
var ESCAPE_SEQUENCES = {};
ESCAPE_SEQUENCES[0x00] = '\\0';
ESCAPE_SEQUENCES[0x07] = '\\a';
ESCAPE_SEQUENCES[0x08] = '\\b';
ESCAPE_SEQUENCES[0x09] = '\\t';
ESCAPE_SEQUENCES[0x0A] = '\\n';
ESCAPE_SEQUENCES[0x0B] = '\\v';
ESCAPE_SEQUENCES[0x0C] = '\\f';
ESCAPE_SEQUENCES[0x0D] = '\\r';
ESCAPE_SEQUENCES[0x1B] = '\\e';
ESCAPE_SEQUENCES[0x22] = '\\"';
ESCAPE_SEQUENCES[0x5C] = '\\\\';
ESCAPE_SEQUENCES[0x85] = '\\N';
ESCAPE_SEQUENCES[0xA0] = '\\_';
ESCAPE_SEQUENCES[0x2028] = '\\L';
ESCAPE_SEQUENCES[0x2029] = '\\P';
var DEPRECATED_BOOLEANS_SYNTAX = [
'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
];
var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
function compileStyleMap(schema, map) {
var result, keys, index, length, tag, style, type;
if (map === null) return {};
result = {};
keys = Object.keys(map);
for (index = 0, length = keys.length; index < length; index += 1) {
tag = keys[index];
style = String(map[tag]);
if (tag.slice(0, 2) === '!!') {
tag = 'tag:yaml.org,2002:' + tag.slice(2);
}
type = schema.compiledTypeMap['fallback'][tag];
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
style = type.styleAliases[style];
}
result[tag] = style;
}
return result;
}
function encodeHex(character) {
var string, handle, length;
string = character.toString(16).toUpperCase();
if (character <= 0xFF) {
handle = 'x';
length = 2;
} else if (character <= 0xFFFF) {
handle = 'u';
length = 4;
} else if (character <= 0xFFFFFFFF) {
handle = 'U';
length = 8;
} else {
throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
}
return '\\' + handle + common.repeat('0', length - string.length) + string;
}
var QUOTING_TYPE_SINGLE = 1,
QUOTING_TYPE_DOUBLE = 2;
function State(options) {
this.schema = options['schema'] || DEFAULT_SCHEMA;
this.indent = Math.max(1, (options['indent'] || 2));
this.noArrayIndent = options['noArrayIndent'] || false;
this.skipInvalid = options['skipInvalid'] || false;
this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
this.sortKeys = options['sortKeys'] || false;
this.lineWidth = options['lineWidth'] || 80;
this.noRefs = options['noRefs'] || false;
this.noCompatMode = options['noCompatMode'] || false;
this.condenseFlow = options['condenseFlow'] || false;
this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;
this.forceQuotes = options['forceQuotes'] || false;
this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;
this.implicitTypes = this.schema.compiledImplicit;
this.explicitTypes = this.schema.compiledExplicit;
this.tag = null;
this.result = '';
this.duplicates = [];
this.usedDuplicates = null;
}
// Indents every line in a string. Empty lines (\n only) are not indented.
function indentString(string, spaces) {
var ind = common.repeat(' ', spaces),
position = 0,
next = -1,
result = '',
line,
length = string.length;
while (position < length) {
next = string.indexOf('\n', position);
if (next === -1) {
line = string.slice(position);
position = length;
} else {
line = string.slice(position, next + 1);
position = next + 1;
}
if (line.length && line !== '\n') result += ind;
result += line;
}
return result;
}
function generateNextLine(state, level) {
return '\n' + common.repeat(' ', state.indent * level);
}
function testImplicitResolving(state, str) {
var index, length, type;
for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
type = state.implicitTypes[index];
if (type.resolve(str)) {
return true;
}
}
return false;
}
// [33] s-white ::= s-space | s-tab
function isWhitespace(c) {
return c === CHAR_SPACE || c === CHAR_TAB;
}
// Returns true if the character can be printed without escaping.
// From YAML 1.2: "any allowed characters known to be non-printable
// should also be escaped. [However,] This isn’t mandatory"
// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029.
function isPrintable(c) {
return (0x00020 <= c && c <= 0x00007E)
|| ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)
|| ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)
|| (0x10000 <= c && c <= 0x10FFFF);
}
// [34] ns-char ::= nb-char - s-white
// [27] nb-char ::= c-printable - b-char - c-byte-order-mark
// [26] b-char ::= b-line-feed | b-carriage-return
// Including s-white (for some reason, examples doesn't match specs in this aspect)
// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark
function isNsCharOrWhitespace(c) {
return isPrintable(c)
&& c !== CHAR_BOM
// - b-char
&& c !== CHAR_CARRIAGE_RETURN
&& c !== CHAR_LINE_FEED;
}
// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out
// c = flow-in ⇒ ns-plain-safe-in
// c = block-key ⇒ ns-plain-safe-out
// c = flow-key ⇒ ns-plain-safe-in
// [128] ns-plain-safe-out ::= ns-char
// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator
// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )
// | ( /* An ns-char preceding */ “#” )
// | ( “:” /* Followed by an ns-plain-safe(c) */ )
function isPlainSafe(c, prev, inblock) {
var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);
var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);
return (
// ns-plain-safe
inblock ? // c = flow-in
cIsNsCharOrWhitespace
: cIsNsCharOrWhitespace
// - c-flow-indicator
&& c !== CHAR_COMMA
&& c !== CHAR_LEFT_SQUARE_BRACKET
&& c !== CHAR_RIGHT_SQUARE_BRACKET
&& c !== CHAR_LEFT_CURLY_BRACKET
&& c !== CHAR_RIGHT_CURLY_BRACKET
)
// ns-plain-char
&& c !== CHAR_SHARP // false on '#'
&& !(prev === CHAR_COLON && !cIsNsChar) // false on ': '
|| (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'
|| (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'
}
// Simplified test for values allowed as the first character in plain style.
function isPlainSafeFirst(c) {
// Uses a subset of ns-char - c-indicator
// where ns-char = nb-char - s-white.
// No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part
return isPrintable(c) && c !== CHAR_BOM
&& !isWhitespace(c) // - s-white
// - (c-indicator ::=
// “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”
&& c !== CHAR_MINUS
&& c !== CHAR_QUESTION
&& c !== CHAR_COLON
&& c !== CHAR_COMMA
&& c !== CHAR_LEFT_SQUARE_BRACKET
&& c !== CHAR_RIGHT_SQUARE_BRACKET
&& c !== CHAR_LEFT_CURLY_BRACKET
&& c !== CHAR_RIGHT_CURLY_BRACKET
// | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"”
&& c !== CHAR_SHARP
&& c !== CHAR_AMPERSAND
&& c !== CHAR_ASTERISK
&& c !== CHAR_EXCLAMATION
&& c !== CHAR_VERTICAL_LINE
&& c !== CHAR_EQUALS
&& c !== CHAR_GREATER_THAN
&& c !== CHAR_SINGLE_QUOTE
&& c !== CHAR_DOUBLE_QUOTE
// | “%” | “@” | “`”)
&& c !== CHAR_PERCENT
&& c !== CHAR_COMMERCIAL_AT
&& c !== CHAR_GRAVE_ACCENT;
}
// Simplified test for values allowed as the last character in plain style.
function isPlainSafeLast(c) {
// just not whitespace or colon, it will be checked to be plain character later
return !isWhitespace(c) && c !== CHAR_COLON;
}
// Same as 'string'.codePointAt(pos), but works in older browsers.
function codePointAt(string, pos) {
var first = string.charCodeAt(pos), second;
if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {
second = string.charCodeAt(pos + 1);
if (second >= 0xDC00 && second <= 0xDFFF) {
// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
}
}
return first;
}
// Determines whether block indentation indicator is required.
function needIndentIndicator(string) {
var leadingSpaceRe = /^\n* /;
return leadingSpaceRe.test(string);
}
var STYLE_PLAIN = 1,
STYLE_SINGLE = 2,
STYLE_LITERAL = 3,
STYLE_FOLDED = 4,
STYLE_DOUBLE = 5;
// Determines which scalar styles are possible and returns the preferred style.
// lineWidth = -1 => no limit.
// Pre-conditions: str.length > 0.
// Post-conditions:
// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string.
// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).
// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,
testAmbiguousType, quotingType, forceQuotes, inblock) {
var i;
var char = 0;
var prevChar = null;
var hasLineBreak = false;
var hasFoldableLine = false; // only checked if shouldTrackWidth
var shouldTrackWidth = lineWidth !== -1;
var previousLineBreak = -1; // count the first line correctly
var plain = isPlainSafeFirst(codePointAt(string, 0))
&& isPlainSafeLast(codePointAt(string, string.length - 1));
if (singleLineOnly || forceQuotes) {
// Case: no block styles.
// Check for disallowed characters to rule out plain and single.
for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
if (!isPrintable(char)) {
return STYLE_DOUBLE;
}
plain = plain && isPlainSafe(char, prevChar, inblock);
prevChar = char;
}
} else {
// Case: block styles permitted.
for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
if (char === CHAR_LINE_FEED) {
hasLineBreak = true;
// Check if any line can be folded.
if (shouldTrackWidth) {
hasFoldableLine = hasFoldableLine ||
// Foldable line = too long, and not more-indented.
(i - previousLineBreak - 1 > lineWidth &&
string[previousLineBreak + 1] !== ' ');
previousLineBreak = i;
}
} else if (!isPrintable(char)) {
return STYLE_DOUBLE;
}
plain = plain && isPlainSafe(char, prevChar, inblock);
prevChar = char;
}
// in case the end is missing a \n
hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&
(i - previousLineBreak - 1 > lineWidth &&
string[previousLineBreak + 1] !== ' '));
}
// Although every style can represent \n without escaping, prefer block styles
// for multiline, since they're more readable and they don't add empty lines.
// Also prefer folding a super-long line.
if (!hasLineBreak && !hasFoldableLine) {
// Strings interpretable as another type have to be quoted;
// e.g. the string 'true' vs. the boolean true.
if (plain && !forceQuotes && !testAmbiguousType(string)) {
return STYLE_PLAIN;
}
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
}
// Edge case: block indentation indicator can only have one digit.
if (indentPerLevel > 9 && needIndentIndicator(string)) {
return STYLE_DOUBLE;
}
// At this point we know block styles are valid.
// Prefer literal style unless we want to fold.
if (!forceQuotes) {
return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
}
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
}
// Note: line breaking/folding is implemented for only the folded style.
// NB. We drop the last trailing newline (if any) of a returned block scalar
// since the dumper adds its own newline. This always works:
// • No ending newline => unaffected; already using strip "-" chomping.
// • Ending newline => removed then restored.
// Importantly, this keeps the "+" chomp indicator from gaining an extra line.
function writeScalar(state, string, level, iskey, inblock) {
state.dump = (function () {
if (string.length === 0) {
return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
}
if (!state.noCompatMode) {
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'");
}
}
var indent = state.indent * Math.max(1, level); // no 0-indent scalars
// As indentation gets deeper, let the width decrease monotonically
// to the lower bound min(state.lineWidth, 40).
// Note that this implies
// state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.
// state.lineWidth > 40 + state.indent: width decreases until the lower bound.
// This behaves better than a constant minimum width which disallows narrower options,
// or an indent threshold which causes the width to suddenly increase.
var lineWidth = state.lineWidth === -1
? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
// Without knowing if keys are implicit/explicit, assume implicit for safety.
var singleLineOnly = iskey
// No block styles in flow mode.
|| (state.flowLevel > -1 && level >= state.flowLevel);
function testAmbiguity(string) {
return testImplicitResolving(state, string);
}
switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,
testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {
case STYLE_PLAIN:
return string;
case STYLE_SINGLE:
return "'" + string.replace(/'/g, "''") + "'";
case STYLE_LITERAL:
return '|' + blockHeader(string, state.indent)
+ dropEndingNewline(indentString(string, indent));
case STYLE_FOLDED:
return '>' + blockHeader(string, state.indent)
+ dropEndingNewline(indentString(foldString(string, lineWidth), indent));
case STYLE_DOUBLE:
return '"' + escapeString(string, lineWidth) + '"';
default:
throw new YAMLException('impossible error: invalid scalar style');
}
}());
}
// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.
function blockHeader(string, indentPerLevel) {
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';
// note the special case: the string '\n' counts as a "trailing" empty line.
var clip = string[string.length - 1] === '\n';
var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
var chomp = keep ? '+' : (clip ? '' : '-');
return indentIndicator + chomp + '\n';
}
// (See the note for writeScalar.)
function dropEndingNewline(string) {
return string[string.length - 1] === '\n' ? string.slice(0, -1) : string;
}
// Note: a long line without a suitable break point will exceed the width limit.
// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.
function foldString(string, width) {
// In folded style, $k$ consecutive newlines output as $k+1$ newlines—
// unless they're before or after a more-indented line, or at the very
// beginning or end, in which case $k$ maps to $k$.
// Therefore, parse each chunk as newline(s) followed by a content line.
var lineRe = /(\n+)([^\n]*)/g;
// first line (possibly an empty line)
var result = (function () {
var nextLF = string.indexOf('\n');
nextLF = nextLF !== -1 ? nextLF : string.length;
lineRe.lastIndex = nextLF;
return foldLine(string.slice(0, nextLF), width);
}());
// If we haven't reached the first content line yet, don't add an extra \n.
var prevMoreIndented = string[0] === '\n' || string[0] === ' ';
var moreIndented;
// rest of the lines
var match;
while ((match = lineRe.exec(string))) {
var prefix = match[1], line = match[2];
moreIndented = (line[0] === ' ');
result += prefix
+ (!prevMoreIndented && !moreIndented && line !== ''
? '\n' : '')
+ foldLine(line, width);
prevMoreIndented = moreIndented;
}
return result;
}
// Greedy line breaking.
// Picks the longest line under the limit each time,
// otherwise settles for the shortest line over the limit.
// NB. More-indented lines *cannot* be folded, as that would add an extra \n.
function foldLine(line, width) {
if (line === '' || line[0] === ' ') return line;
// Since a more-indented line adds a \n, breaks can't be followed by a space.
var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.
var match;
// start is an inclusive index. end, curr, and next are exclusive.
var start = 0, end, curr = 0, next = 0;
var result = '';
// Invariants: 0 <= start <= length-1.
// 0 <= curr <= next <= max(0, length-2). curr - start <= width.
// Inside the loop:
// A match implies length >= 2, so curr and next are <= length-2.
while ((match = breakRe.exec(line))) {
next = match.index;
// maintain invariant: curr - start <= width
if (next - start > width) {
end = (curr > start) ? curr : next; // derive end <= length-2
result += '\n' + line.slice(start, end);
// skip the space that was output as \n
start = end + 1; // derive start <= length-1
}
curr = next;
}
// By the invariants, start <= length-1, so there is something left over.
// It is either the whole string or a part starting from non-whitespace.
result += '\n';
// Insert a break if the remainder is too long and there is a break available.
if (line.length - start > width && curr > start) {
result += line.slice(start, curr) + '\n' + line.slice(curr + 1);
} else {
result += line.slice(start);
}
return result.slice(1); // drop extra \n joiner
}
// Escapes a double-quoted string.
function escapeString(string) {
var result = '';
var char = 0;
var escapeSeq;
for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {
char = codePointAt(string, i);
escapeSeq = ESCAPE_SEQUENCES[char];
if (!escapeSeq && isPrintable(char)) {
result += string[i];
if (char >= 0x10000) result += string[i + 1];
} else {
result += escapeSeq || encodeHex(char);
}
}
return result;
}
function writeFlowSequence(state, level, object) {
var _result = '',
_tag = state.tag,
index,
length,
value;
for (index = 0, length = object.length; index < length; index += 1) {
value = object[index];
if (state.replacer) {
value = state.replacer.call(object, String(index), value);
}
// Write only valid elements, put null instead of invalid elements.
if (writeNode(state, level, value, false, false) ||
(typeof value === 'undefined' &&
writeNode(state, level, null, false, false))) {
if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');
_result += state.dump;
}
}
state.tag = _tag;
state.dump = '[' + _result + ']';
}
function writeBlockSequence(state, level, object, compact) {
var _result = '',
_tag = state.tag,
index,
length,
value;
for (index = 0, length = object.length; index < length; index += 1) {
value = object[index];
if (state.replacer) {
value = state.replacer.call(object, String(index), value);
}
// Write only valid elements, put null instead of invalid elements.
if (writeNode(state, level + 1, value, true, true, false, true) ||
(typeof value === 'undefined' &&
writeNode(state, level + 1, null, true, true, false, true))) {
if (!compact || _result !== '') {
_result += generateNextLine(state, level);
}
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
_result += '-';
} else {
_result += '- ';
}
_result += state.dump;
}
}
state.tag = _tag;
state.dump = _result || '[]'; // Empty sequence if no valid values.
}
function writeFlowMapping(state, level, object) {
var _result = '',
_tag = state.tag,
objectKeyList = Object.keys(object),
index,
length,
objectKey,
objectValue,
pairBuffer;
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
if (_result !== '') pairBuffer += ', ';
if (state.condenseFlow) pairBuffer += '"';
objectKey = objectKeyList[index];
objectValue = object[objectKey];
if (state.replacer) {
objectValue = state.replacer.call(object, objectKey, objectValue);
}
if (!writeNode(state, level, objectKey, false, false)) {
continue; // Skip this pair because of invalid key;
}
if (state.dump.length > 1024) pairBuffer += '? ';
pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ');
if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
}
pairBuffer += state.dump;
// Both key and value are valid.
_result += pairBuffer;
}
state.tag = _tag;
state.dump = '{' + _result + '}';
}
function writeBlockMapping(state, level, object, compact) {
var _result = '',
_tag = state.tag,
objectKeyList = Object.keys(object),
index,
length,
objectKey,
objectValue,
explicitPair,
pairBuffer;
// Allow sorting keys so that the output file is deterministic
if (state.sortKeys === true) {
// Default sorting
objectKeyList.sort();
} else if (typeof state.sortKeys === 'function') {
// Custom sort function
objectKeyList.sort(state.sortKeys);
} else if (state.sortKeys) {
// Something is wrong
throw new YAMLException('sortKeys must be a boolean or a function');
}
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
pairBuffer = '';
if (!compact || _result !== '') {
pairBuffer += generateNextLine(state, level);
}
objectKey = objectKeyList[index];
objectValue = object[objectKey];
if (state.replacer) {
objectValue = state.replacer.call(object, objectKey, objectValue);
}
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
continue; // Skip this pair because of invalid key.
}
explicitPair = (state.tag !== null && state.tag !== '?') ||
(state.dump && state.dump.length > 1024);
if (explicitPair) {
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
pairBuffer += '?';
} else {
pairBuffer += '? ';
}
}
pairBuffer += state.dump;
if (explicitPair) {
pairBuffer += generateNextLine(state, level);
}
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
continue; // Skip this pair because of invalid value.
}
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
pairBuffer += ':';
} else {
pairBuffer += ': ';
}
pairBuffer += state.dump;
// Both key and value are valid.
_result += pairBuffer;
}
state.tag = _tag;
state.dump = _result || '{}'; // Empty mapping if no valid pairs.
}
function detectType(state, object, explicit) {
var _result, typeList, index, length, type, style;
typeList = explicit ? state.explicitTypes : state.implicitTypes;
for (index = 0, length = typeList.length; index < length; index += 1) {
type = typeList[index];
if ((type.instanceOf || type.predicate) &&
(!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&
(!type.predicate || type.predicate(object))) {
if (explicit) {
if (type.multi && type.representName) {
state.tag = type.representName(object);
} else {
state.tag = type.tag;
}
} else {
state.tag = '?';
}
if (type.represent) {
style = state.styleMap[type.tag] || type.defaultStyle;
if (_toString.call(type.represent) === '[object Function]') {
_result = type.represent(object, style);
} else if (_hasOwnProperty.call(type.represent, style)) {
_result = type.represent[style](object, style);
} else {
throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
}
state.dump = _result;
}
return true;
}
}
return false;
}
// Serializes `object` and writes it to global `result`.
// Returns true on success, or false on invalid object.
//
function writeNode(state, level, object, block, compact, iskey, isblockseq) {
state.tag = null;
state.dump = object;
if (!detectType(state, object, false)) {
detectType(state, object, true);
}
var type = _toString.call(state.dump);
var inblock = block;
var tagStr;
if (block) {
block = (state.flowLevel < 0 || state.flowLevel > level);
}
var objectOrArray = type === '[object Object]' || type === '[object Array]',
duplicateIndex,
duplicate;
if (objectOrArray) {
duplicateIndex = state.duplicates.indexOf(object);
duplicate = duplicateIndex !== -1;
}
if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {
compact = false;
}
if (duplicate && state.usedDuplicates[duplicateIndex]) {
state.dump = '*ref_' + duplicateIndex;
} else {
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
state.usedDuplicates[duplicateIndex] = true;
}
if (type === '[object Object]') {
if (block && (Object.keys(state.dump).length !== 0)) {
writeBlockMapping(state, level, state.dump, compact);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + state.dump;
}
} else {
writeFlowMapping(state, level, state.dump);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
}
}
} else if (type === '[object Array]') {
if (block && (state.dump.length !== 0)) {
if (state.noArrayIndent && !isblockseq && level > 0) {
writeBlockSequence(state, level - 1, state.dump, compact);
} else {
writeBlockSequence(state, level, state.dump, compact);
}
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + state.dump;
}
} else {
writeFlowSequence(state, level, state.dump);
if (duplicate) {
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
}
}
} else if (type === '[object String]') {
if (state.tag !== '?') {
writeScalar(state, state.dump, level, iskey, inblock);
}
} else if (type === '[object Undefined]') {
return false;
} else {
if (state.skipInvalid) return false;
throw new YAMLException('unacceptable kind of an object to dump ' + type);
}
if (state.tag !== null && state.tag !== '?') {
// Need to encode all characters except those allowed by the spec:
//
// [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */
// [36] ns-hex-digit ::= ns-dec-digit
// | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */
// [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */
// [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”
// [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”
// | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”
// | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”
//
// Also need to encode '!' because it has special meaning (end of tag prefix).
//
tagStr = encodeURI(
state.tag[0] === '!' ? state.tag.slice(1) : state.tag
).replace(/!/g, '%21');
if (state.tag[0] === '!') {
tagStr = '!' + tagStr;
} else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {
tagStr = '!!' + tagStr.slice(18);
} else {
tagStr = '!<' + tagStr + '>';
}
state.dump = tagStr + ' ' + state.dump;
}
}
return true;
}
function getDuplicateReferences(object, state) {
var objects = [],
duplicatesIndexes = [],
index,
length;
inspectNode(object, objects, duplicatesIndexes);
for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
state.duplicates.push(objects[duplicatesIndexes[index]]);
}
state.usedDuplicates = new Array(length);
}
function inspectNode(object, objects, duplicatesIndexes) {
var objectKeyList,
index,
length;
if (object !== null && typeof object === 'object') {
index = objects.indexOf(object);
if (index !== -1) {
if (duplicatesIndexes.indexOf(index) === -1) {
duplicatesIndexes.push(index);
}
} else {
objects.push(object);
if (Array.isArray(object)) {
for (index = 0, length = object.length; index < length; index += 1) {
inspectNode(object[index], objects, duplicatesIndexes);
}
} else {
objectKeyList = Object.keys(object);
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
}
}
}
}
}
function dump(input, options) {
options = options || {};
var state = new State(options);
if (!state.noRefs) getDuplicateReferences(input, state);
var value = input;
if (state.replacer) {
value = state.replacer.call({ '': value }, '', value);
}
if (writeNode(state, 0, value, true, true)) return state.dump + '\n';
return '';
}
module.exports.dump = dump;
@@ -0,0 +1 @@
{"version":3,"file":"fieldSchemasToFormState.spec.d.ts","sourceRoot":"","sources":["../../../src/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_private_field_loose_key.js";
@@ -0,0 +1,11 @@
import type { Client } from '@sentry/core';
export declare const INCOMPLETE_APP_ROUTER_INSTRUMENTATION_TRANSACTION_NAME = "incomplete-app-router-transaction";
/** Instruments the Next.js app router for pageloads. */
export declare function appRouterInstrumentPageLoad(client: Client): void;
/** Instruments the Next.js app router for navigation. */
export declare function appRouterInstrumentNavigation(client: Client): void;
/**
* A handler for Next.js' `onRouterTransitionStart` hook in `instrumentation-client.ts` to record navigation spans in Sentry.
*/
export declare function captureRouterTransitionStart(href: string, navigationType: string): void;
//# sourceMappingURL=appRouterRoutingInstrumentation.d.ts.map
@@ -0,0 +1 @@
Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}));
@@ -0,0 +1,434 @@
import { defaultLocale } from "./_lib/defaultLocale.js";
import { getDefaultOptions } from "./_lib/defaultOptions.js";
import { formatters } from "./_lib/format/formatters.js";
import { longFormatters } from "./_lib/format/longFormatters.js";
import {
isProtectedDayOfYearToken,
isProtectedWeekYearToken,
warnOrThrowProtectedError,
} from "./_lib/protectedTokens.js";
import { isValid } from "./isValid.js";
import { toDate } from "./toDate.js";
// Rexports of internal for libraries to use.
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
export { formatters, longFormatters };
// This RegExp consists of three parts separated by `|`:
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
// (one of the certain letters followed by `o`)
// - (\w)\1* matches any sequences of the same letter
// - '' matches two quote characters in a row
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
// except a single quote symbol, which ends the sequence.
// Two quote characters do not end the sequence.
// If there is no matching single quote
// then the sequence will continue until the end of the string.
// - . matches any single character unmatched by previous parts of the RegExps
const formattingTokensRegExp =
/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
// This RegExp catches symbols escaped by quotes, and also
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
const escapedStringRegExp = /^'([^]*?)'?$/;
const doubleQuoteRegExp = /''/g;
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
export { format as formatDate };
/**
* The {@link format} function options.
*/
/**
* @name format
* @alias formatDate
* @category Common Helpers
* @summary Format the date.
*
* @description
* Return the formatted date string in the given format. The result may vary by locale.
*
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
* > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* The characters wrapped between two single quotes characters (') are escaped.
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
* (see the last example)
*
* Format of the string is based on Unicode Technical Standard #35:
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* with a few additions (see note 7 below the table).
*
* Accepted patterns:
* | Unit | Pattern | Result examples | Notes |
* |---------------------------------|---------|-----------------------------------|-------|
* | Era | G..GGG | AD, BC | |
* | | GGGG | Anno Domini, Before Christ | 2 |
* | | GGGGG | A, B | |
* | Calendar year | y | 44, 1, 1900, 2017 | 5 |
* | | yo | 44th, 1st, 0th, 17th | 5,7 |
* | | yy | 44, 01, 00, 17 | 5 |
* | | yyy | 044, 001, 1900, 2017 | 5 |
* | | yyyy | 0044, 0001, 1900, 2017 | 5 |
* | | yyyyy | ... | 3,5 |
* | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
* | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
* | | YY | 44, 01, 00, 17 | 5,8 |
* | | YYY | 044, 001, 1900, 2017 | 5 |
* | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
* | | YYYYY | ... | 3,5 |
* | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
* | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
* | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
* | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
* | | RRRRR | ... | 3,5,7 |
* | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
* | | uu | -43, 01, 1900, 2017 | 5 |
* | | uuu | -043, 001, 1900, 2017 | 5 |
* | | uuuu | -0043, 0001, 1900, 2017 | 5 |
* | | uuuuu | ... | 3,5 |
* | Quarter (formatting) | Q | 1, 2, 3, 4 | |
* | | Qo | 1st, 2nd, 3rd, 4th | 7 |
* | | QQ | 01, 02, 03, 04 | |
* | | QQQ | Q1, Q2, Q3, Q4 | |
* | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
* | | QQQQQ | 1, 2, 3, 4 | 4 |
* | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
* | | qo | 1st, 2nd, 3rd, 4th | 7 |
* | | qq | 01, 02, 03, 04 | |
* | | qqq | Q1, Q2, Q3, Q4 | |
* | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
* | | qqqqq | 1, 2, 3, 4 | 4 |
* | Month (formatting) | M | 1, 2, ..., 12 | |
* | | Mo | 1st, 2nd, ..., 12th | 7 |
* | | MM | 01, 02, ..., 12 | |
* | | MMM | Jan, Feb, ..., Dec | |
* | | MMMM | January, February, ..., December | 2 |
* | | MMMMM | J, F, ..., D | |
* | Month (stand-alone) | L | 1, 2, ..., 12 | |
* | | Lo | 1st, 2nd, ..., 12th | 7 |
* | | LL | 01, 02, ..., 12 | |
* | | LLL | Jan, Feb, ..., Dec | |
* | | LLLL | January, February, ..., December | 2 |
* | | LLLLL | J, F, ..., D | |
* | Local week of year | w | 1, 2, ..., 53 | |
* | | wo | 1st, 2nd, ..., 53th | 7 |
* | | ww | 01, 02, ..., 53 | |
* | ISO week of year | I | 1, 2, ..., 53 | 7 |
* | | Io | 1st, 2nd, ..., 53th | 7 |
* | | II | 01, 02, ..., 53 | 7 |
* | Day of month | d | 1, 2, ..., 31 | |
* | | do | 1st, 2nd, ..., 31st | 7 |
* | | dd | 01, 02, ..., 31 | |
* | Day of year | D | 1, 2, ..., 365, 366 | 9 |
* | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
* | | DD | 01, 02, ..., 365, 366 | 9 |
* | | DDD | 001, 002, ..., 365, 366 | |
* | | DDDD | ... | 3 |
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
* | | EEEEE | M, T, W, T, F, S, S | |
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
* | | io | 1st, 2nd, ..., 7th | 7 |
* | | ii | 01, 02, ..., 07 | 7 |
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
* | | iiiii | M, T, W, T, F, S, S | 7 |
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
* | | eo | 2nd, 3rd, ..., 1st | 7 |
* | | ee | 02, 03, ..., 01 | |
* | | eee | Mon, Tue, Wed, ..., Sun | |
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
* | | eeeee | M, T, W, T, F, S, S | |
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
* | | co | 2nd, 3rd, ..., 1st | 7 |
* | | cc | 02, 03, ..., 01 | |
* | | ccc | Mon, Tue, Wed, ..., Sun | |
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
* | | ccccc | M, T, W, T, F, S, S | |
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
* | AM, PM | a..aa | AM, PM | |
* | | aaa | am, pm | |
* | | aaaa | a.m., p.m. | 2 |
* | | aaaaa | a, p | |
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
* | | bbb | am, pm, noon, midnight | |
* | | bbbb | a.m., p.m., noon, midnight | 2 |
* | | bbbbb | a, p, n, mi | |
* | Flexible day period | B..BBB | at night, in the morning, ... | |
* | | BBBB | at night, in the morning, ... | 2 |
* | | BBBBB | at night, in the morning, ... | |
* | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
* | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
* | | hh | 01, 02, ..., 11, 12 | |
* | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
* | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
* | | HH | 00, 01, 02, ..., 23 | |
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
* | | KK | 01, 02, ..., 11, 00 | |
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
* | | kk | 24, 01, 02, ..., 23 | |
* | Minute | m | 0, 1, ..., 59 | |
* | | mo | 0th, 1st, ..., 59th | 7 |
* | | mm | 00, 01, ..., 59 | |
* | Second | s | 0, 1, ..., 59 | |
* | | so | 0th, 1st, ..., 59th | 7 |
* | | ss | 00, 01, ..., 59 | |
* | Fraction of second | S | 0, 1, ..., 9 | |
* | | SS | 00, 01, ..., 99 | |
* | | SSS | 000, 001, ..., 999 | |
* | | SSSS | ... | 3 |
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
* | | XX | -0800, +0530, Z | |
* | | XXX | -08:00, +05:30, Z | |
* | | XXXX | -0800, +0530, Z, +123456 | 2 |
* | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
* | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
* | | xx | -0800, +0530, +0000 | |
* | | xxx | -08:00, +05:30, +00:00 | 2 |
* | | xxxx | -0800, +0530, +0000, +123456 | |
* | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
* | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
* | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
* | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
* | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
* | Seconds timestamp | t | 512969520 | 7 |
* | | tt | ... | 3,7 |
* | Milliseconds timestamp | T | 512969520900 | 7 |
* | | TT | ... | 3,7 |
* | Long localized date | P | 04/29/1453 | 7 |
* | | PP | Apr 29, 1453 | 7 |
* | | PPP | April 29th, 1453 | 7 |
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
* | Long localized time | p | 12:00 AM | 7 |
* | | pp | 12:00:00 AM | 7 |
* | | ppp | 12:00:00 AM GMT+2 | 7 |
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
* | | PPPppp | April 29th, 1453 at ... | 7 |
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
* Notes:
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
* are the same as "stand-alone" units, but are different in some languages.
* "Formatting" units are declined according to the rules of the language
* in the context of a date. "Stand-alone" units are always nominative singular:
*
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
* the single quote characters (see below).
* If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
* the output will be the same as default pattern for this unit, usually
* the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
* are marked with "2" in the last column of the table.
*
* `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
*
* `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
*
* `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
*
* `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
*
* `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
*
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
* The output will be padded with zeros to match the length of the pattern.
*
* `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
*
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
* These tokens represent the shortest form of the quarter.
*
* 5. The main difference between `y` and `u` patterns are B.C. years:
*
* | Year | `y` | `u` |
* |------|-----|-----|
* | AC 1 | 1 | 1 |
* | BC 1 | 1 | 0 |
* | BC 2 | 2 | -1 |
*
* Also `yy` always returns the last two digits of a year,
* while `uu` pads single digit years to 2 characters and returns other years unchanged:
*
* | Year | `yy` | `uu` |
* |------|------|------|
* | 1 | 01 | 01 |
* | 14 | 14 | 14 |
* | 376 | 76 | 376 |
* | 1453 | 53 | 1453 |
*
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
* except local week-numbering years are dependent on `options.weekStartsOn`
* and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)
* and [getWeekYear](https://date-fns.org/docs/getWeekYear)).
*
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
* so right now these tokens fall back to GMT timezones.
*
* 7. These patterns are not in the Unicode Technical Standard #35:
* - `i`: ISO day of week
* - `I`: ISO week of year
* - `R`: ISO week-numbering year
* - `t`: seconds timestamp
* - `T`: milliseconds timestamp
* - `o`: ordinal number modifier
* - `P`: long localized date
* - `p`: long localized time
*
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @param date - The original date
* @param format - The string of tokens
* @param options - An object with options
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
* @throws `options.locale` must contain `localize` property
* @throws `options.locale` must contain `formatLong` property
* @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* @throws format string contains an unescaped latin alphabet character
*
* @example
* // Represent 11 February 2014 in middle-endian format:
* const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
* //=> '02/11/2014'
*
* @example
* // Represent 2 July 2014 in Esperanto:
* import { eoLocale } from 'date-fns/locale/eo'
* const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
* locale: eoLocale
* })
* //=> '2-a de julio 2014'
*
* @example
* // Escape string by single quote characters:
* const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
* //=> "3 o'clock"
*/
export function format(date, formatStr, options) {
const defaultOptions = getDefaultOptions();
const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const weekStartsOn =
options?.weekStartsOn ??
options?.locale?.options?.weekStartsOn ??
defaultOptions.weekStartsOn ??
defaultOptions.locale?.options?.weekStartsOn ??
0;
const originalDate = toDate(date, options?.in);
if (!isValid(originalDate)) {
throw new RangeError("Invalid time value");
}
let parts = formatStr
.match(longFormattingTokensRegExp)
.map((substring) => {
const firstCharacter = substring[0];
if (firstCharacter === "p" || firstCharacter === "P") {
const longFormatter = longFormatters[firstCharacter];
return longFormatter(substring, locale.formatLong);
}
return substring;
})
.join("")
.match(formattingTokensRegExp)
.map((substring) => {
// Replace two single quote characters with one single quote character
if (substring === "''") {
return { isToken: false, value: "'" };
}
const firstCharacter = substring[0];
if (firstCharacter === "'") {
return { isToken: false, value: cleanEscapedString(substring) };
}
if (formatters[firstCharacter]) {
return { isToken: true, value: substring };
}
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
throw new RangeError(
"Format string contains an unescaped latin alphabet character `" +
firstCharacter +
"`",
);
}
return { isToken: false, value: substring };
});
// invoke localize preprocessor (only for french locales at the moment)
if (locale.localize.preprocessor) {
parts = locale.localize.preprocessor(originalDate, parts);
}
const formatterOptions = {
firstWeekContainsDate,
weekStartsOn,
locale,
};
return parts
.map((part) => {
if (!part.isToken) return part.value;
const token = part.value;
if (
(!options?.useAdditionalWeekYearTokens &&
isProtectedWeekYearToken(token)) ||
(!options?.useAdditionalDayOfYearTokens &&
isProtectedDayOfYearToken(token))
) {
warnOrThrowProtectedError(token, formatStr, String(date));
}
const formatter = formatters[token[0]];
return formatter(originalDate, token, locale.localize, formatterOptions);
})
.join("");
}
function cleanEscapedString(input) {
const matched = input.match(escapedStringRegExp);
if (!matched) {
return input;
}
return matched[1].replace(doubleQuoteRegExp, "'");
}
// Fallback for modularized imports:
export default format;
@@ -0,0 +1 @@
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/versions/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;CAE3B,CAAA"}
@@ -0,0 +1,43 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
// Ref: https://www.unicode.org/cldr/charts/32/summary/ta.html
// CLDR #1846 - #1849
const dateFormats = {
full: "EEEE, d MMMM, y",
long: "d MMMM, y",
medium: "d MMM, y",
short: "d/M/yy",
};
// CLDR #1850 - #1853
const timeFormats = {
full: "a h:mm:ss zzzz",
long: "a h:mm:ss z",
medium: "a h:mm:ss",
short: "a h:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
@@ -0,0 +1,58 @@
import { daysInYear } from "./constants.mjs";
/**
* @name milliseconds
* @category Millisecond Helpers
* @summary
* Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds.
*
* @description
* Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds.
*
* One years equals 365.2425 days according to the formula:
*
* > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.
* > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
*
* One month is a year divided by 12.
*
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added.
*
* @returns The milliseconds
*
* @example
* // 1 year in milliseconds
* milliseconds({ years: 1 })
* //=> 31556952000
*
* // 3 months in milliseconds
* milliseconds({ months: 3 })
* //=> 7889238000
*/
export function milliseconds({
years,
months,
weeks,
days,
hours,
minutes,
seconds,
}) {
let totalDays = 0;
if (years) totalDays += years * daysInYear;
if (months) totalDays += months * (daysInYear / 12);
if (weeks) totalDays += weeks * 7;
if (days) totalDays += days;
let totalSeconds = totalDays * 24 * 60 * 60;
if (hours) totalSeconds += hours * 60 * 60;
if (minutes) totalSeconds += minutes * 60;
if (seconds) totalSeconds += seconds;
return Math.trunc(totalSeconds * 1000);
}
// Fallback for modularized imports:
export default milliseconds;
@@ -0,0 +1 @@
{"version":3,"file":"image-element-container.js","sourceRoot":"","sources":["../../../../src/dom/replaced-elements/image-element-container.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0DAAsD;AAGtD;IAA2C,yCAAgB;IAKvD,+BAAY,OAAgB,EAAE,GAAqB;QAAnD,YACI,kBAAM,OAAO,EAAE,GAAG,CAAC,SAKtB;QAJG,KAAI,CAAC,GAAG,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,GAAG,CAAC;QACrC,KAAI,CAAC,cAAc,GAAG,GAAG,CAAC,YAAY,CAAC;QACvC,KAAI,CAAC,eAAe,GAAG,GAAG,CAAC,aAAa,CAAC;QACzC,KAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAI,CAAC,GAAG,CAAC,CAAC;;IAC1C,CAAC;IACL,4BAAC;AAAD,CAAC,AAZD,CAA2C,oCAAgB,GAY1D;AAZY,sDAAqB"}
@@ -0,0 +1,5 @@
import type { PreviewButtonClientProps } from 'payload';
import React from 'react';
import './index.scss';
export declare function PreviewButton(props: PreviewButtonClientProps): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,26 @@
import type { DeepPartial } from 'ts-essentials';
import type { PayloadRequest, PopulateType, SelectType, TransformCollectionWithSelect } from '../../types/index.js';
import type { Collection, RequiredDataFromCollectionSlug, SelectFromCollectionSlug } from '../config/types.js';
import { type CollectionSlug, type FindOptions } from '../../index.js';
export type Arguments<TSlug extends CollectionSlug> = {
autosave?: boolean;
collection: Collection;
data: DeepPartial<RequiredDataFromCollectionSlug<TSlug>>;
depth?: number;
disableTransaction?: boolean;
disableVerificationEmail?: boolean;
draft?: boolean;
id: number | string;
overrideAccess?: boolean;
overrideLock?: boolean;
overwriteExistingFiles?: boolean;
populate?: PopulateType;
publishAllLocales?: boolean;
publishSpecificLocale?: string;
req: PayloadRequest;
showHiddenFields?: boolean;
trash?: boolean;
unpublishAllLocales?: boolean;
} & Pick<FindOptions<TSlug, SelectType>, 'select'>;
export declare const updateByIDOperation: <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug> = SelectType>(incomingArgs: Arguments<TSlug>) => Promise<TransformCollectionWithSelect<TSlug, TSelect>>;
//# sourceMappingURL=updateByID.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/neon-serverless/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport type { NeonDatabase } from './driver.ts';\n\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: NeonDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tawait db.dialect.migrate(migrations, db.session, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AAGnC,eAAsB,QACrB,IACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAC5C,QAAM,GAAG,QAAQ,QAAQ,YAAY,GAAG,SAAS,MAAM;AACxD;","names":[]}
@@ -0,0 +1,10 @@
import type { UniqueIdentifier } from '../types';
import type { DroppableContainer } from './types';
declare type Identifier = UniqueIdentifier | null | undefined;
export declare class DroppableContainersMap extends Map<UniqueIdentifier, DroppableContainer> {
get(id: Identifier): DroppableContainer | undefined;
toArray(): DroppableContainer[];
getEnabled(): DroppableContainer[];
getNodeFor(id: Identifier): HTMLElement | undefined;
}
export {};
@@ -0,0 +1,35 @@
Prism.languages.magma = {
'output': {
pattern: /^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,
lookbehind: true,
greedy: true
},
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
greedy: true
},
'string': {
pattern: /(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,
lookbehind: true,
greedy: true
},
// http://magma.maths.usyd.edu.au/magma/handbook/text/82
'keyword': /\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,
'boolean': /\b(?:false|true)\b/,
'generator': {
pattern: /\b[a-z_]\w*(?=\s*<)/i,
alias: 'class-name'
},
'function': /\b[a-z_]\w*(?=\s*\()/i,
'number': {
pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,
lookbehind: true
},
'operator': /->|[-+*/^~!|#=]|:=|\.\./,
'punctuation': /[()[\]{}<>,;.:]/
};
@@ -0,0 +1 @@
{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"}
@@ -0,0 +1,624 @@
import type { IntegrationIndex } from './integration';
import type { Scope } from './scope';
import type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbHint, XhrBreadcrumbHint } from './types-hoist/breadcrumb';
import type { CheckIn, MonitorConfig } from './types-hoist/checkin';
import type { EventDropReason, Outcome } from './types-hoist/clientreport';
import type { DataCategory } from './types-hoist/datacategory';
import type { DsnComponents } from './types-hoist/dsn';
import type { DynamicSamplingContext, Envelope } from './types-hoist/envelope';
import type { Event, EventHint } from './types-hoist/event';
import type { EventProcessor } from './types-hoist/eventprocessor';
import type { FeedbackEvent } from './types-hoist/feedback';
import type { Integration } from './types-hoist/integration';
import type { Log } from './types-hoist/log';
import type { Metric } from './types-hoist/metric';
import type { ClientOptions } from './types-hoist/options';
import type { ParameterizedString } from './types-hoist/parameterize';
import type { RequestEventData } from './types-hoist/request';
import type { SdkMetadata } from './types-hoist/sdkmetadata';
import type { Session, SessionAggregates } from './types-hoist/session';
import type { SeverityLevel } from './types-hoist/severity';
import type { Span, SpanAttributes, SpanContextData } from './types-hoist/span';
import type { StartSpanOptions } from './types-hoist/startSpanOptions';
import type { Transport, TransportMakeRequestResponse } from './types-hoist/transport';
/**
* Base implementation for all JavaScript SDK clients.
*
* Call the constructor with the corresponding options
* specific to the client subclass. To access these options later, use
* {@link Client.getOptions}.
*
* If a Dsn is specified in the options, it will be parsed and stored. Use
* {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
* invalid, the constructor will throw a {@link SentryException}. Note that
* without a valid Dsn, the SDK will not send any events to Sentry.
*
* Before sending an event, it is passed through
* {@link Client._prepareEvent} to add SDK information and scope data
* (breadcrumbs and context). To add more custom information, override this
* method and extend the resulting prepared event.
*
* To issue automatically created events (e.g. via instrumentation), use
* {@link Client.captureEvent}. It will prepare the event and pass it through
* the callback lifecycle. To issue auto-breadcrumbs, use
* {@link Client.addBreadcrumb}.
*
* @example
* class NodeClient extends Client<NodeOptions> {
* public constructor(options: NodeOptions) {
* super(options);
* }
*
* // ...
* }
*/
export declare abstract class Client<O extends ClientOptions = ClientOptions> {
/** Options passed to the SDK. */
protected readonly _options: O;
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
protected readonly _dsn?: DsnComponents;
protected readonly _transport?: Transport;
/** Array of set up integrations. */
protected _integrations: IntegrationIndex;
/** Number of calls being processed */
protected _numProcessing: number;
protected _eventProcessors: EventProcessor[];
/** Holds flushable */
private _outcomes;
private _hooks;
private _promiseBuffer;
/**
* Initializes this client instance.
*
* @param options Options for the client.
*/
protected constructor(options: O);
/**
* Captures an exception event and sends it to Sentry.
*
* Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.
*/
captureException(exception: unknown, hint?: EventHint, scope?: Scope): string;
/**
* Captures a message event and sends it to Sentry.
*
* Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.
*/
captureMessage(message: ParameterizedString, level?: SeverityLevel, hint?: EventHint, currentScope?: Scope): string;
/**
* Captures a manually created event and sends it to Sentry.
*
* Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.
*/
captureEvent(event: Event, hint?: EventHint, currentScope?: Scope): string;
/**
* Captures a session.
*/
captureSession(session: Session): void;
/**
* Create a cron monitor check in and send it to Sentry. This method is not available on all clients.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
* @param scope An optional scope containing event metadata.
* @returns A string representing the id of the check in.
*/
captureCheckIn?(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string;
/**
* Get the current Dsn.
*/
getDsn(): DsnComponents | undefined;
/**
* Get the current options.
*/
getOptions(): O;
/**
* Get the SDK metadata.
* @see SdkMetadata
*/
getSdkMetadata(): SdkMetadata | undefined;
/**
* Returns the transport that is used by the client.
* Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.
*/
getTransport(): Transport | undefined;
/**
* Wait for all events to be sent or the timeout to expire, whichever comes first.
*
* @param timeout Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will
* cause the client to wait until all events are sent before resolving the promise.
* @returns A promise that will resolve with `true` if all events are sent before the timeout, or `false` if there are
* still events in the queue when the timeout is reached.
*/
flush(timeout?: number): PromiseLike<boolean>;
/**
* Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.
*
* @param {number} timeout Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause
* the client to wait until all events are sent before disabling itself.
* @returns {Promise<boolean>} A promise which resolves to `true` if the flush completes successfully before the timeout, or `false` if
* it doesn't.
*/
close(timeout?: number): PromiseLike<boolean>;
/**
* Get all installed event processors.
*/
getEventProcessors(): EventProcessor[];
/**
* Adds an event processor that applies to any event processed by this client.
*/
addEventProcessor(eventProcessor: EventProcessor): void;
/**
* Initialize this client.
* Call this after the client was set on a scope.
*/
init(): void;
/**
* Gets an installed integration by its name.
*
* @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.
*/
getIntegrationByName<T extends Integration = Integration>(integrationName: string): T | undefined;
/**
* Add an integration to the client.
* This can be used to e.g. lazy load integrations.
* In most cases, this should not be necessary,
* and you're better off just passing the integrations via `integrations: []` at initialization time.
* However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.
*/
addIntegration(integration: Integration): void;
/**
* Send a fully prepared event to Sentry.
*/
sendEvent(event: Event, hint?: EventHint): void;
/**
* Send a session or session aggregrates to Sentry.
*/
sendSession(session: Session | SessionAggregates): void;
/**
* Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).
*/
recordDroppedEvent(reason: EventDropReason, category: DataCategory, count?: number): void;
/**
* Register a callback for whenever a span is started.
* Receives the span as argument.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'spanStart', callback: (span: Span) => void): () => void;
/**
* Register a callback before span sampling runs. Receives a `samplingDecision` object argument with a `decision`
* property that can be used to make a sampling decision that will be enforced, before any span sampling runs.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeSampling', callback: (samplingData: {
spanAttributes: SpanAttributes;
spanName: string;
parentSampled?: boolean;
parentSampleRate?: number;
parentContext?: SpanContextData;
}, samplingDecision: {
decision: boolean;
}) => void): void;
/**
* Register a callback for after a span is ended.
* NOTE: The span cannot be mutated anymore in this callback.
* Receives the span as argument.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'spanEnd', callback: (span: Span) => void): () => void;
/**
* Register a callback for when an idle span is allowed to auto-finish.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'idleSpanEnableAutoFinish', callback: (span: Span) => void): () => void;
/**
* Register a callback for transaction start and finish.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): () => void;
/**
* Register a callback that runs when stack frame metadata should be applied to an event.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'applyFrameMetadata', callback: (event: Event) => void): () => void;
/**
* Register a callback for before sending an event.
* This is called right before an event is sent and should not be used to mutate the event.
* Receives an Event & EventHint as arguments.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeSendEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;
/**
* Register a callback for before sending a session or session aggregrates..
* Receives the session/aggregate as second argument.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeSendSession', callback: (session: Session | SessionAggregates) => void): () => void;
/**
* Register a callback for preprocessing an event,
* before it is passed to (global) event processors.
* Receives an Event & EventHint as arguments.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'preprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;
/**
* Register a callback for postprocessing an event,
* after it was passed to (global) event processors, before it is being sent.
* Receives an Event & EventHint as arguments.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'postprocessEvent', callback: (event: Event, hint?: EventHint | undefined) => void): () => void;
/**
* Register a callback for when an event has been sent.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'afterSendEvent', callback: (event: Event, sendResponse: TransportMakeRequestResponse) => void): () => void;
/**
* Register a callback before a breadcrumb is added.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeAddBreadcrumb', callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void): () => void;
/**
* Register a callback when a DSC (Dynamic Sampling Context) is created.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext, rootSpan?: Span) => void): () => void;
/**
* Register a callback when a Feedback event has been prepared.
* This should be used to mutate the event. The options argument can hint
* about what kind of mutation it expects.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeSendFeedback', callback: (feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}) => void): () => void;
/**
* Register a callback when the feedback widget is opened in a user's browser
*/
on(hook: 'openFeedbackWidget', callback: () => void): () => void;
/**
* A hook for the browser tracing integrations to trigger a span start for a page load.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'startPageLoadSpan', callback: (options: StartSpanOptions, traceOptions?: {
sentryTrace?: string | undefined;
baggage?: string | undefined;
}) => void): () => void;
/**
* A hook for the browser tracing integrations to trigger the end of a page load span.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'endPageloadSpan', callback: () => void): () => void;
/**
* A hook for the browser tracing integrations to trigger after the pageload span was started.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'afterStartPageLoadSpan', callback: (span: Span) => void): () => void;
/**
* A hook for triggering right before a navigation span is started.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeStartNavigationSpan', callback: (options: StartSpanOptions, navigationOptions?: {
isRedirect?: boolean;
}) => void): () => void;
/**
* A hook for browser tracing integrations to trigger a span for a navigation.
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'startNavigationSpan', callback: (options: StartSpanOptions, navigationOptions?: {
isRedirect?: boolean;
}) => void): () => void;
/**
* A hook for GraphQL client integration to enhance a span with request data.
* @returns A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeOutgoingRequestSpan', callback: (span: Span, hint: XhrBreadcrumbHint | FetchBreadcrumbHint) => void): () => void;
/**
* A hook for GraphQL client integration to enhance a breadcrumb with request data.
* @returns A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeOutgoingRequestBreadcrumb', callback: (breadcrumb: Breadcrumb, hint: XhrBreadcrumbHint | FetchBreadcrumbHint) => void): () => void;
/**
* A hook that is called when the client is flushing
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'flush', callback: () => void): () => void;
/**
* A hook that is called when the client is closing
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'close', callback: () => void): () => void;
/**
* A hook that is called before a log is captured. This hooks runs before `beforeSendLog` is fired.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'beforeCaptureLog', callback: (log: Log) => void): () => void;
/**
* A hook that is called after a log is captured
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'afterCaptureLog', callback: (log: Log) => void): () => void;
/**
* A hook that is called when the client is flushing logs
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'flushLogs', callback: () => void): () => void;
/**
* A hook that is called after capturing a metric. This hooks runs after `beforeSendMetric` is fired.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'afterCaptureMetric', callback: (metric: Metric) => void): () => void;
/**
* A hook that is called when the client is flushing metrics
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'flushMetrics', callback: () => void): () => void;
/**
* A hook that is called when a metric is processed before it is captured and before the `beforeSendMetric` callback is fired.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'processMetric', callback: (metric: Metric) => void): () => void;
/**
* A hook that is called when a http server request is started.
* This hook is called after request isolation, but before the request is processed.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'httpServerRequest', callback: (request: unknown, response: unknown, normalizedRequest: RequestEventData) => void): () => void;
/**
* A hook that is called when the UI Profiler should start profiling.
*
* This hook is called when running `Sentry.uiProfiler.startProfiler()`.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'startUIProfiler', callback: () => void): () => void;
/**
* A hook that is called when the UI Profiler should stop profiling.
*
* This hook is called when running `Sentry.uiProfiler.stopProfiler()`.
*
* @returns {() => void} A function that, when executed, removes the registered callback.
*/
on(hook: 'stopUIProfiler', callback: () => void): () => void;
/** Fire a hook whenever a span starts. */
emit(hook: 'spanStart', span: Span): void;
/** A hook that is called every time before a span is sampled. */
emit(hook: 'beforeSampling', samplingData: {
spanAttributes: SpanAttributes;
spanName: string;
parentSampled?: boolean;
parentSampleRate?: number;
parentContext?: SpanContextData;
}, samplingDecision: {
decision: boolean;
}): void;
/** Fire a hook whenever a span ends. */
emit(hook: 'spanEnd', span: Span): void;
/**
* Fire a hook indicating that an idle span is allowed to auto finish.
*/
emit(hook: 'idleSpanEnableAutoFinish', span: Span): void;
/**
* Fire a hook event for envelope creation and sending. Expects to be given an envelope as the
* second argument.
*/
emit(hook: 'beforeEnvelope', envelope: Envelope): void;
/**
* Fire a hook indicating that stack frame metadata should be applied to the event passed to the hook.
*/
emit(hook: 'applyFrameMetadata', event: Event): void;
/**
* Fire a hook event before sending an event.
* This is called right before an event is sent and should not be used to mutate the event.
* Expects to be given an Event & EventHint as the second/third argument.
*/
emit(hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
/**
* Fire a hook event before sending a session/aggregates.
* Expects to be given the prepared session/aggregates as second argument.
*/
emit(hook: 'beforeSendSession', session: Session | SessionAggregates): void;
/**
* Fire a hook event to process events before they are passed to (global) event processors.
* Expects to be given an Event & EventHint as the second/third argument.
*/
emit(hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
/**
* Fire a hook event to process a user on an event before it is sent to Sentry, after all other processors have run.
* Expects to be given an Event & EventHint as the second/third argument.
*/
emit(hook: 'postprocessEvent', event: Event, hint?: EventHint): void;
/**
* Fire a hook event after sending an event. Expects to be given an Event as the
* second argument.
*/
emit(hook: 'afterSendEvent', event: Event, sendResponse: TransportMakeRequestResponse): void;
/**
* Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
*/
emit(hook: 'beforeAddBreadcrumb', breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;
/**
* Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
*/
emit(hook: 'createDsc', dsc: DynamicSamplingContext, rootSpan?: Span): void;
/**
* Fire a hook event for after preparing a feedback event. Events to be given
* a feedback event as the second argument, and an optional options object as
* third argument.
*/
emit(hook: 'beforeSendFeedback', feedback: FeedbackEvent, options?: {
includeReplay?: boolean;
}): void;
/**
* Fire a hook event for when the feedback widget is opened in a user's browser
*/
emit(hook: 'openFeedbackWidget'): void;
/**
* Emit a hook event for browser tracing integrations to trigger a span start for a page load.
*/
emit(hook: 'startPageLoadSpan', options: StartSpanOptions, traceOptions?: {
sentryTrace?: string | undefined;
baggage?: string | undefined;
}): void;
/**
* Emit a hook event for browser tracing integrations to trigger the end of a page load span.
*/
emit(hook: 'endPageloadSpan'): void;
/**
* Emit a hook event for browser tracing integrations to trigger aafter the pageload span was started.
*/
emit(hook: 'afterStartPageLoadSpan', span: Span): void;
/**
* Emit a hook event for triggering right before a navigation span is started.
*/
emit(hook: 'beforeStartNavigationSpan', options: StartSpanOptions, navigationOptions?: {
isRedirect?: boolean;
}): void;
/**
* Emit a hook event for browser tracing integrations to trigger a span for a navigation.
*/
emit(hook: 'startNavigationSpan', options: StartSpanOptions, navigationOptions?: {
isRedirect?: boolean;
}): void;
/**
* Emit a hook event for GraphQL client integration to enhance a span with request data.
*/
emit(hook: 'beforeOutgoingRequestSpan', span: Span, hint: XhrBreadcrumbHint | FetchBreadcrumbHint): void;
/**
* Emit a hook event for GraphQL client integration to enhance a breadcrumb with request data.
*/
emit(hook: 'beforeOutgoingRequestBreadcrumb', breadcrumb: Breadcrumb, hint: XhrBreadcrumbHint | FetchBreadcrumbHint): void;
/**
* Emit a hook event for client flush
*/
emit(hook: 'flush'): void;
/**
* Emit a hook event for client close
*/
emit(hook: 'close'): void;
/**
* Emit a hook event for client before capturing a log. This hooks runs before `beforeSendLog` is fired.
*/
emit(hook: 'beforeCaptureLog', log: Log): void;
/**
* Emit a hook event for client after capturing a log.
*/
emit(hook: 'afterCaptureLog', log: Log): void;
/**
* Emit a hook event for client flush logs
*/
emit(hook: 'flushLogs'): void;
/**
* Emit a hook event for client after capturing a metric.
*/
emit(hook: 'afterCaptureMetric', metric: Metric): void;
/**
* Emit a hook event for client flush metrics
*/
emit(hook: 'flushMetrics'): void;
/**
*
* Emit a hook event for client to process a metric before it is captured.
* This hook is called before the `beforeSendMetric` callback is fired.
*/
emit(hook: 'processMetric', metric: Metric): void;
/**
* Emit a hook event for client when a http server request is started.
* This hook is called after request isolation, but before the request is processed.
*/
emit(hook: 'httpServerRequest', request: unknown, response: unknown, normalizedRequest: RequestEventData): void;
/**
* Emit a hook event for starting the UI Profiler.
*/
emit(hook: 'startUIProfiler'): void;
/**
* Emit a hook event for stopping the UI Profiler.
*/
emit(hook: 'stopUIProfiler'): void;
/**
* Send an envelope to Sentry.
*/
sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse>;
/** Setup integrations for this client. */
protected _setupIntegrations(): void;
/** Updates existing session based on the provided event */
protected _updateSessionFromEvent(session: Session, event: Event): void;
/**
* Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
* "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
*
* @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
* passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
* `true`.
* @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
* `false` otherwise
*/
protected _isClientDoneProcessing(timeout?: number): Promise<boolean>;
/** Determines whether this SDK is enabled and a transport is present. */
protected _isEnabled(): boolean;
/**
* Adds common information to events.
*
* The information includes release and environment from `options`,
* breadcrumbs and context (extra, tags and user) from the scope.
*
* Information that is already present in the event is never overwritten. For
* nested objects, such as the context, keys are merged.
*
* @param event The original event.
* @param hint May contain additional information about the original exception.
* @param currentScope A scope containing event metadata.
* @returns A new event with more information.
*/
protected _prepareEvent(event: Event, hint: EventHint, currentScope: Scope, isolationScope: Scope): PromiseLike<Event | null>;
/**
* Processes the event and logs an error in case of rejection
* @param event
* @param hint
* @param scope
*/
protected _captureEvent(event: Event, hint?: EventHint, currentScope?: Scope, isolationScope?: Scope): PromiseLike<string | undefined>;
/**
* Processes an event (either error or message) and sends it to Sentry.
*
* This also adds breadcrumbs and context information to the event. However,
* platform specific meta data (such as the User's IP address) must be added
* by the SDK implementor.
*
*
* @param event The event to send to Sentry.
* @param hint May contain additional information about the original exception.
* @param currentScope A scope containing event metadata.
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
*/
protected _processEvent(event: Event, hint: EventHint, currentScope: Scope, isolationScope: Scope): PromiseLike<Event>;
/**
* Occupies the client with processing and event
*/
protected _process<T>(taskProducer: () => PromiseLike<T>, dataCategory: DataCategory): void;
/**
* Clears outcomes on this client and returns them.
*/
protected _clearOutcomes(): Outcome[];
/**
* Sends client reports as an envelope.
*/
protected _flushOutcomes(): void;
/**
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
*/
abstract eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike<Event>;
/**
* Creates an {@link Event} from primitive inputs to `captureMessage`.
*/
abstract eventFromMessage(_message: ParameterizedString, _level?: SeverityLevel, _hint?: EventHint): PromiseLike<Event>;
}
//# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,9 @@
import type { Coordinates } from '@dnd-kit/utilities';
export type { Coordinates };
export declare type DistanceMeasurement = number | Coordinates | Pick<Coordinates, 'x'> | Pick<Coordinates, 'y'>;
export declare type Translate = Coordinates;
export interface ScrollCoordinates {
initial: Coordinates;
current: Coordinates;
delta: Coordinates;
}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PanelBottomOpen = createLucideIcon("PanelBottomOpen", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 15h18", key: "5xshup" }],
["path", { d: "m9 10 3-3 3 3", key: "11gsxs" }]
]);
export { PanelBottomOpen as default };
//# sourceMappingURL=panel-bottom-open.js.map
@@ -0,0 +1,75 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { dirname, join } = require("./util/fs");
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./NormalModuleFactory").ResolveData} ResolveData */
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
/** @typedef {(resolveData: ResolveData) => void} ModuleReplacer */
const PLUGIN_NAME = "NormalModuleReplacementPlugin";
class NormalModuleReplacementPlugin {
/**
* Create an instance of the plugin
* @param {RegExp} resourceRegExp the resource matcher
* @param {string | ModuleReplacer} newResource the resource replacement
*/
constructor(resourceRegExp, newResource) {
this.resourceRegExp = resourceRegExp;
this.newResource = newResource;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const resourceRegExp = this.resourceRegExp;
const newResource = this.newResource;
compiler.hooks.normalModuleFactory.tap(PLUGIN_NAME, (nmf) => {
nmf.hooks.beforeResolve.tap(PLUGIN_NAME, (result) => {
if (resourceRegExp.test(result.request)) {
if (typeof newResource === "function") {
newResource(result);
} else {
result.request = newResource;
}
}
});
nmf.hooks.afterResolve.tap(PLUGIN_NAME, (result) => {
const createData = result.createData;
if (resourceRegExp.test(/** @type {string} */ (createData.resource))) {
if (typeof newResource === "function") {
newResource(result);
} else {
const fs =
/** @type {InputFileSystem} */
(compiler.inputFileSystem);
if (
newResource.startsWith("/") ||
(newResource.length > 1 && newResource[1] === ":")
) {
createData.resource = newResource;
} else {
createData.resource = join(
fs,
dirname(fs, /** @type {string} */ (createData.resource)),
newResource
);
}
}
}
});
});
}
}
module.exports = NormalModuleReplacementPlugin;
@@ -0,0 +1,29 @@
var toString = require('./toString');
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to modify.
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @example
*
* _.replace('Hi Fred', 'Fred', 'Barney');
* // => 'Hi Barney'
*/
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
module.exports = replace;
@@ -0,0 +1,132 @@
import { DEBUG_BUILD } from '../debug-build.js';
import { defineIntegration } from '../integration.js';
import { debug } from '../utils/debug-logger.js';
import { isError, isPlainObject } from '../utils/is.js';
import { normalize } from '../utils/normalize.js';
import { addNonEnumerableProperty } from '../utils/object.js';
import { truncate } from '../utils/string.js';
const INTEGRATION_NAME = 'ExtraErrorData';
/**
* Extract additional data for from original exceptions.
*/
const _extraErrorDataIntegration = ((options = {}) => {
const { depth = 3, captureErrorCause = true } = options;
return {
name: INTEGRATION_NAME,
processEvent(event, hint, client) {
const { maxValueLength } = client.getOptions();
return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);
},
};
}) ;
const extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);
function _enhanceEventWithErrorData(
event,
hint = {},
depth,
captureErrorCause,
maxValueLength,
) {
if (!hint.originalException || !isError(hint.originalException)) {
return event;
}
const exceptionName = (hint.originalException ).name || hint.originalException.constructor.name;
const errorData = _extractErrorData(hint.originalException , captureErrorCause, maxValueLength);
if (errorData) {
const contexts = {
...event.contexts,
};
const normalizedErrorData = normalize(errorData, depth);
if (isPlainObject(normalizedErrorData)) {
// We mark the error data as "already normalized" here, because we don't want other normalization procedures to
// potentially truncate the data we just already normalized, with a certain depth setting.
addNonEnumerableProperty(normalizedErrorData, '__sentry_skip_normalization__', true);
contexts[exceptionName] = normalizedErrorData;
}
return {
...event,
contexts,
};
}
return event;
}
/**
* Extract extra information from the Error object
*/
function _extractErrorData(
error,
captureErrorCause,
maxValueLength,
) {
// We are trying to enhance already existing event, so no harm done if it won't succeed
try {
const nativeKeys = [
'name',
'message',
'stack',
'line',
'column',
'fileName',
'lineNumber',
'columnNumber',
'toJSON',
];
const extraErrorInfo = {};
// We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.
for (const key of Object.keys(error)) {
if (nativeKeys.indexOf(key) !== -1) {
continue;
}
const value = error[key];
extraErrorInfo[key] =
isError(value) || typeof value === 'string'
? maxValueLength
? truncate(`${value}`, maxValueLength)
: `${value}`
: value;
}
// Error.cause is a standard property that is non enumerable, we therefore need to access it separately.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
if (captureErrorCause && error.cause !== undefined) {
if (isError(error.cause)) {
const errorName = error.cause.name || error.cause.constructor.name;
extraErrorInfo.cause = { [errorName]: _extractErrorData(error.cause , false, maxValueLength) };
} else {
extraErrorInfo.cause = error.cause;
}
}
// Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)
if (typeof error.toJSON === 'function') {
const serializedError = error.toJSON() ;
for (const key of Object.keys(serializedError)) {
const value = serializedError[key];
extraErrorInfo[key] = isError(value) ? value.toString() : value;
}
}
return extraErrorInfo;
} catch (oO) {
DEBUG_BUILD && debug.error('Unable to extract extra data from the Error object:', oO);
}
return null;
}
export { extraErrorDataIntegration };
//# sourceMappingURL=extraerrordata.js.map
@@ -0,0 +1,21 @@
/**
* 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.
*
* @flow strict
*/
import type {CustomPrintNodeFn} from '@lexical/devtools-core';
import type {LexicalEditor} from 'lexical';
declare export function TreeView(props: {
timeTravelPanelClassName: string,
timeTravelPanelSliderClassName: string,
timeTravelPanelButtonClassName: string,
timeTravelButtonClassName: string,
viewClassName: string,
editor: LexicalEditor,
customPrintNode?: CustomPrintNodeFn,
}): React.Node;
@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/async-creatable/index.js"
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2015 William Kapk
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
http://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.
@@ -0,0 +1,7 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var assertClassBrand = require("./assertClassBrand.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldDestructureSet(t, r, s) {
return assertClassBrand(r, t), classCheckPrivateStaticFieldDescriptor(s, "set"), classApplyDescriptorDestructureSet(t, s);
}
module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,242 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
const codegen_1 = require("./codegen");
const validation_error_1 = require("../runtime/validation_error");
const names_1 = require("./names");
const resolve_1 = require("./resolve");
const util_1 = require("./util");
const validate_1 = require("./validate");
class SchemaEnv {
constructor(env) {
var _a;
this.refs = {};
this.dynamicAnchors = {};
let schema;
if (typeof env.schema == "object")
schema = env.schema;
this.schema = env.schema;
this.schemaId = env.schemaId;
this.root = env.root || this;
this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
this.schemaPath = env.schemaPath;
this.localRefs = env.localRefs;
this.meta = env.meta;
this.$async = schema === null || schema === void 0 ? void 0 : schema.$async;
this.refs = {};
}
}
exports.SchemaEnv = SchemaEnv;
// let codeSize = 0
// let nodeCount = 0
// Compiles schema in SchemaEnv
function compileSchema(sch) {
// TODO refactor - remove compilations
const _sch = getCompilingSchema.call(this, sch);
if (_sch)
return _sch;
const rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId); // TODO if getFullPath removed 1 tests fails
const { es5, lines } = this.opts.code;
const { ownProperties } = this.opts;
const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties });
let _ValidationError;
if (sch.$async) {
_ValidationError = gen.scopeValue("Error", {
ref: validation_error_1.default,
code: (0, codegen_1._) `require("ajv/dist/runtime/validation_error").default`,
});
}
const validateName = gen.scopeName("validate");
sch.validateName = validateName;
const schemaCxt = {
gen,
allErrors: this.opts.allErrors,
data: names_1.default.data,
parentData: names_1.default.parentData,
parentDataProperty: names_1.default.parentDataProperty,
dataNames: [names_1.default.data],
dataPathArr: [codegen_1.nil], // TODO can its length be used as dataLevel if nil is removed?
dataLevel: 0,
dataTypes: [],
definedProperties: new Set(),
topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true
? { ref: sch.schema, code: (0, codegen_1.stringify)(sch.schema) }
: { ref: sch.schema }),
validateName,
ValidationError: _ValidationError,
schema: sch.schema,
schemaEnv: sch,
rootId,
baseId: sch.baseId || rootId,
schemaPath: codegen_1.nil,
errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"),
errorPath: (0, codegen_1._) `""`,
opts: this.opts,
self: this,
};
let sourceCode;
try {
this._compilations.add(sch);
(0, validate_1.validateFunctionCode)(schemaCxt);
gen.optimize(this.opts.code.optimize);
// gen.optimize(1)
const validateCode = gen.toString();
sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;
// console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount))
if (this.opts.code.process)
sourceCode = this.opts.code.process(sourceCode, sch);
// console.log("\n\n\n *** \n", sourceCode)
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
const validate = makeValidate(this, this.scope.get());
this.scope.value(validateName, { ref: validate });
validate.errors = null;
validate.schema = sch.schema;
validate.schemaEnv = sch;
if (sch.$async)
validate.$async = true;
if (this.opts.code.source === true) {
validate.source = { validateName, validateCode, scopeValues: gen._values };
}
if (this.opts.unevaluated) {
const { props, items } = schemaCxt;
validate.evaluated = {
props: props instanceof codegen_1.Name ? undefined : props,
items: items instanceof codegen_1.Name ? undefined : items,
dynamicProps: props instanceof codegen_1.Name,
dynamicItems: items instanceof codegen_1.Name,
};
if (validate.source)
validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
}
sch.validate = validate;
return sch;
}
catch (e) {
delete sch.validate;
delete sch.validateName;
if (sourceCode)
this.logger.error("Error compiling schema, function code:", sourceCode);
// console.log("\n\n\n *** \n", sourceCode, this.opts)
throw e;
}
finally {
this._compilations.delete(sch);
}
}
exports.compileSchema = compileSchema;
function resolveRef(root, baseId, ref) {
var _a;
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
const schOrFunc = root.refs[ref];
if (schOrFunc)
return schOrFunc;
let _sch = resolve.call(this, root, ref);
if (_sch === undefined) {
const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv
const { schemaId } = this.opts;
if (schema)
_sch = new SchemaEnv({ schema, schemaId, root, baseId });
}
if (_sch === undefined)
return;
return (root.refs[ref] = inlineOrCompile.call(this, _sch));
}
exports.resolveRef = resolveRef;
function inlineOrCompile(sch) {
if ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs))
return sch.schema;
return sch.validate ? sch : compileSchema.call(this, sch);
}
// Index of schema compilation in the currently compiled list
function getCompilingSchema(schEnv) {
for (const sch of this._compilations) {
if (sameSchemaEnv(sch, schEnv))
return sch;
}
}
exports.getCompilingSchema = getCompilingSchema;
function sameSchemaEnv(s1, s2) {
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
}
// resolve and compile the references ($ref)
// TODO returns AnySchemaObject (if the schema can be inlined) or validation function
function resolve(root, // information about the root schema for the current schema
ref // reference to resolve
) {
let sch;
while (typeof (sch = this.refs[ref]) == "string")
ref = sch;
return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
}
// Resolve schema, its root and baseId
function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it
ref // reference to resolve
) {
const p = this.opts.uriResolver.parse(ref);
const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);
// TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests
if (Object.keys(root.schema).length > 0 && refPath === baseId) {
return getJsonPointer.call(this, p, root);
}
const id = (0, resolve_1.normalizeId)(refPath);
const schOrRef = this.refs[id] || this.schemas[id];
if (typeof schOrRef == "string") {
const sch = resolveSchema.call(this, root, schOrRef);
if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object")
return;
return getJsonPointer.call(this, p, sch);
}
if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object")
return;
if (!schOrRef.validate)
compileSchema.call(this, schOrRef);
if (id === (0, resolve_1.normalizeId)(ref)) {
const { schema } = schOrRef;
const { schemaId } = this.opts;
const schId = schema[schemaId];
if (schId)
baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
return new SchemaEnv({ schema, schemaId, root, baseId });
}
return getJsonPointer.call(this, p, schOrRef);
}
exports.resolveSchema = resolveSchema;
const PREVENT_SCOPE_CHANGE = new Set([
"properties",
"patternProperties",
"enum",
"dependencies",
"definitions",
]);
function getJsonPointer(parsedRef, { baseId, schema, root }) {
var _a;
if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/")
return;
for (const part of parsedRef.fragment.slice(1).split("/")) {
if (typeof schema === "boolean")
return;
const partSchema = schema[(0, util_1.unescapeFragment)(part)];
if (partSchema === undefined)
return;
schema = partSchema;
// TODO PREVENT_SCOPE_CHANGE could be defined in keyword def?
const schId = typeof schema === "object" && schema[this.opts.schemaId];
if (!PREVENT_SCOPE_CHANGE.has(part) && schId) {
baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
}
}
let env;
if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
env = resolveSchema.call(this, root, $ref);
}
// even though resolution failed we need to return SchemaEnv to throw exception
// so that compileAsync loads missing schema.
const { schemaId } = this.opts;
env = env || new SchemaEnv({ schema, schemaId, root, baseId });
if (env.schema !== env.root.schema)
return env;
return undefined;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,50 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = transitionEnd;
var _css = _interopRequireDefault(require("./css"));
var _listen = _interopRequireDefault(require("./listen"));
var _triggerEvent = _interopRequireDefault(require("./triggerEvent"));
function parseDuration(node) {
var str = (0, _css.default)(node, 'transitionDuration') || '';
var mult = str.indexOf('ms') === -1 ? 1000 : 1;
return parseFloat(str) * mult;
}
function emulateTransitionEnd(element, duration, padding) {
if (padding === void 0) {
padding = 5;
}
var called = false;
var handle = setTimeout(function () {
if (!called) (0, _triggerEvent.default)(element, 'transitionend', true);
}, duration + padding);
var remove = (0, _listen.default)(element, 'transitionend', function () {
called = true;
}, {
once: true
});
return function () {
clearTimeout(handle);
remove();
};
}
function transitionEnd(element, handler, duration, padding) {
if (duration == null) duration = parseDuration(element) || 0;
var removeEmulate = emulateTransitionEnd(element, duration, padding);
var remove = (0, _listen.default)(element, 'transitionend', handler);
return function () {
removeEmulate();
remove();
};
}
module.exports = exports["default"];
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","SwapIcon","_jsx","className","viewBox","xmlns","d","strokeLinecap"],"sources":["../../../src/icons/Swap/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const SwapIcon: React.FC = () => (\n <svg className=\"icon icon--swap\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"stroke\"\n d=\"M7.33334 4L4.66667 6.66667M4.66667 6.66667L7.33334 9.33333M4.66667 6.66667H15.3333M12.6667 16L15.3333 13.3333M15.3333 13.3333L12.6667 10.6667M15.3333 13.3333H4.66667\"\n strokeLinecap=\"square\"\n />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,OAAO,MAAMC,QAAA,GAAqBA,CAAA,kBAChCC,IAAA,CAAC;EAAIC,SAAA,EAAU;EAAkBC,OAAA,EAAQ;EAAYC,KAAA,EAAM;YACzD,aAAAH,IAAA,CAAC;IACCC,SAAA,EAAU;IACVG,CAAA,EAAE;IACFC,aAAA,EAAc","ignoreList":[]}
@@ -0,0 +1 @@
Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/};
@@ -0,0 +1,42 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: "តិចជាង {{count}} វិនាទី",
xSeconds: "{{count}} វិនាទី",
halfAMinute: "កន្លះនាទី",
lessThanXMinutes: "តិចជាង {{count}} នាទី",
xMinutes: "{{count}} នាទី",
aboutXHours: "ប្រហែល {{count}} ម៉ោង",
xHours: "{{count}} ម៉ោង",
xDays: "{{count}} ថ្ងៃ",
aboutXWeeks: "ប្រហែល {{count}} សប្តាហ៍",
xWeeks: "{{count}} សប្តាហ៍",
aboutXMonths: "ប្រហែល {{count}} ខែ",
xMonths: "{{count}} ខែ",
aboutXYears: "ប្រហែល {{count}} ឆ្នាំ",
xYears: "{{count}} ឆ្នាំ",
overXYears: "ជាង {{count}} ឆ្នាំ",
almostXYears: "ជិត {{count}} ឆ្នាំ",
};
const formatDistance = (token, count, options) => {
const tokenValue = formatDistanceLocale[token];
let result = tokenValue;
if (typeof count === "number") {
result = result.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "ក្នុងរយៈពេល " + result;
} else {
return result + "មុន";
}
}
return result;
};
exports.formatDistance = formatDistance;
@@ -0,0 +1,268 @@
export interface BundleOptions {
intro?: string;
separator?: string;
}
export interface SourceMapOptions {
/**
* Whether the mapping should be high-resolution.
* Hi-res mappings map every single character, meaning (for example) your devtools will always
* be able to pinpoint the exact location of function calls and so on.
* With lo-res mappings, devtools may only be able to identify the correct
* line - but they're quicker to generate and less bulky.
* You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
* instead of per character, suitable for string semantics that are separated by words.
* If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
*/
hires?: boolean | 'boundary';
/**
* The filename where you plan to write the sourcemap.
*/
file?: string;
/**
* The filename of the file containing the original source.
*/
source?: string;
/**
* Whether to include the original content in the map's sourcesContent array.
*/
includeContent?: boolean;
}
export type SourceMapSegment =
| [number]
| [number, number, number, number]
| [number, number, number, number, number];
export interface DecodedSourceMap {
file: string;
sources: string[];
sourcesContent?: string[];
names: string[];
mappings: SourceMapSegment[][];
x_google_ignoreList?: number[];
}
export class SourceMap {
constructor(properties: DecodedSourceMap);
version: number;
file: string;
sources: string[];
sourcesContent?: string[];
names: string[];
mappings: string;
x_google_ignoreList?: number[];
/**
* Returns the equivalent of `JSON.stringify(map)`
*/
toString(): string;
/**
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
* `generateMap(options?: SourceMapOptions): SourceMap;`
*/
toUrl(): string;
}
export class Bundle {
constructor(options?: BundleOptions);
/**
* Adds the specified source to the bundle, which can either be a `MagicString` object directly,
* or an options object that holds a magic string `content` property and optionally provides
* a `filename` for the source within the bundle, as well as an optional `ignoreList` hint
* (which defaults to `false`). The `filename` is used when constructing the source map for the
* bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint
* is used to populate the `x_google_ignoreList` extension field in the source map, which is a
* mechanism for tools to signal to debuggers that certain sources should be ignored by default
* (depending on user preferences).
*/
addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle;
append(str: string, options?: BundleOptions): Bundle;
clone(): Bundle;
generateMap(options?: SourceMapOptions): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
generateDecodedMap(options?: SourceMapOptions): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
getIndentString(): string;
indent(indentStr?: string): Bundle;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
prepend(str: string): Bundle;
toString(): string;
trimLines(): Bundle;
trim(charType?: string): Bundle;
trimStart(charType?: string): Bundle;
trimEnd(charType?: string): Bundle;
isEmpty(): boolean;
length(): number;
}
export type ExclusionRange = [ number, number ];
export interface MagicStringOptions {
filename?: string,
indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
}
export interface IndentOptions {
exclude?: ExclusionRange | Array<ExclusionRange>;
indentStart?: boolean;
}
export interface OverwriteOptions {
storeName?: boolean;
contentOnly?: boolean;
}
export interface UpdateOptions {
storeName?: boolean;
overwrite?: boolean;
}
export default class MagicString {
constructor(str: string, options?: MagicStringOptions);
/**
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
*/
addSourcemapLocation(char: number): void;
/**
* Appends the specified content to the end of the string.
*/
append(content: string): MagicString;
/**
* Appends the specified content at the index in the original string.
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
* See also `s.prependLeft(...)`.
*/
appendLeft(index: number, content: string): MagicString;
/**
* Appends the specified content at the index in the original string.
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
* See also `s.prependRight(...)`.
*/
appendRight(index: number, content: string): MagicString;
/**
* Does what you'd expect.
*/
clone(): MagicString;
/**
* Generates a version 3 sourcemap.
*/
generateMap(options?: SourceMapOptions): SourceMap;
/**
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
*/
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
getIndentString(): string;
/**
* Prefixes each line of the string with prefix.
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
*/
indent(options?: IndentOptions): MagicString;
/**
* Prefixes each line of the string with prefix.
* If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
*
* The options argument can have an exclude property, which is an array of [start, end] character ranges.
* These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
*/
indent(indentStr?: string, options?: IndentOptions): MagicString;
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
/**
* Moves the characters from `start and `end` to `index`.
*/
move(start: number, end: number, index: number): MagicString;
/**
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
* that range. The same restrictions as `s.remove()` apply.
*
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
* for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
* the content is overwritten, or anything that was appended/prepended to the range as well.
*
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
*/
overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString;
/**
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
*
* The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
* for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
* the content is overwritten, or anything that was appended/prepended to the range as well.
*/
update(start: number, end: number, content: string, options?: boolean | UpdateOptions): MagicString;
/**
* Prepends the string with the specified content.
*/
prepend(content: string): MagicString;
/**
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
*/
prependLeft(index: number, content: string): MagicString;
/**
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
*/
prependRight(index: number, content: string): MagicString;
/**
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
* Removing the same content twice, or making removals that partially overlap, will cause an error.
*/
remove(start: number, end: number): MagicString;
/**
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
*/
reset(start: number, end: number): MagicString;
/**
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
* Throws error if the indices are for characters that were already removed.
*/
slice(start: number, end: number): string;
/**
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
*/
snip(start: number, end: number): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
*/
trim(charType?: string): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
*/
trimStart(charType?: string): MagicString;
/**
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
*/
trimEnd(charType?: string): MagicString;
/**
* Removes empty lines from the start and end.
*/
trimLines(): MagicString;
/**
* String replacement with RegExp or string.
*/
replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
/**
* Same as `s.replace`, but replace all matched strings instead of just one.
*/
replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString;
lastChar(): string;
lastLine(): string;
/**
* Returns true if the resulting source is empty (disregarding white space).
*/
isEmpty(): boolean;
length(): number;
/**
* Indicates if the string has been changed.
*/
hasChanged(): boolean;
original: string;
/**
* Returns the generated string.
*/
toString(): string;
}
@@ -0,0 +1,180 @@
import { DEBUG_BUILD } from '../debug-build.js';
import { debug } from './debug-logger.js';
import { GLOBAL_OBJ } from './worldwide.js';
const WINDOW = GLOBAL_OBJ ;
/**
* Tells whether current environment supports ErrorEvent objects
* {@link supportsErrorEvent}.
*
* @returns Answer to the given question.
*/
function supportsErrorEvent() {
try {
new ErrorEvent('');
return true;
} catch {
return false;
}
}
/**
* Tells whether current environment supports DOMError objects
* {@link supportsDOMError}.
*
* @returns Answer to the given question.
*/
function supportsDOMError() {
try {
// Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
// 1 argument required, but only 0 present.
// @ts-expect-error It really needs 1 argument, not 0.
new DOMError('');
return true;
} catch {
return false;
}
}
/**
* Tells whether current environment supports DOMException objects
* {@link supportsDOMException}.
*
* @returns Answer to the given question.
*/
function supportsDOMException() {
try {
new DOMException('');
return true;
} catch {
return false;
}
}
/**
* Tells whether current environment supports History API
* {@link supportsHistory}.
*
* @returns Answer to the given question.
*/
function supportsHistory() {
return 'history' in WINDOW && !!WINDOW.history;
}
/**
* Tells whether current environment supports Fetch API
* {@link supportsFetch}.
*
* @returns Answer to the given question.
* @deprecated This is no longer used and will be removed in a future major version.
*/
const supportsFetch = _isFetchSupported;
function _isFetchSupported() {
if (!('fetch' in WINDOW)) {
return false;
}
try {
new Headers();
// Deno requires a valid URL so '' cannot be used as an argument
new Request('data:,');
new Response();
return true;
} catch {
return false;
}
}
/**
* isNative checks if the given function is a native implementation
*/
// eslint-disable-next-line @typescript-eslint/ban-types
function isNativeFunction(func) {
return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
}
/**
* Tells whether current environment supports Fetch API natively
* {@link supportsNativeFetch}.
*
* @returns true if `window.fetch` is natively implemented, false otherwise
*/
function supportsNativeFetch() {
if (typeof EdgeRuntime === 'string') {
return true;
}
if (!_isFetchSupported()) {
return false;
}
// Fast path to avoid DOM I/O
// eslint-disable-next-line @typescript-eslint/unbound-method
if (isNativeFunction(WINDOW.fetch)) {
return true;
}
// window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
// so create a "pure" iframe to see if that has native fetch
let result = false;
const doc = WINDOW.document;
// eslint-disable-next-line deprecation/deprecation
if (doc && typeof (doc.createElement ) === 'function') {
try {
const sandbox = doc.createElement('iframe');
sandbox.hidden = true;
doc.head.appendChild(sandbox);
if (sandbox.contentWindow?.fetch) {
// eslint-disable-next-line @typescript-eslint/unbound-method
result = isNativeFunction(sandbox.contentWindow.fetch);
}
doc.head.removeChild(sandbox);
} catch (err) {
DEBUG_BUILD && debug.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
}
}
return result;
}
/**
* Tells whether current environment supports ReportingObserver API
* {@link supportsReportingObserver}.
*
* @returns Answer to the given question.
*/
function supportsReportingObserver() {
return 'ReportingObserver' in WINDOW;
}
/**
* Tells whether current environment supports Referrer Policy API
* {@link supportsReferrerPolicy}.
*
* @returns Answer to the given question.
* @deprecated This is no longer used and will be removed in a future major version.
*/
function supportsReferrerPolicy() {
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
// (see https://caniuse.com/#feat=referrer-policy),
// it doesn't. And it throws an exception instead of ignoring this parameter...
// REF: https://github.com/getsentry/raven-js/issues/1233
if (!_isFetchSupported()) {
return false;
}
try {
new Request('_', {
referrerPolicy: 'origin' ,
});
return true;
} catch {
return false;
}
}
export { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };
//# sourceMappingURL=supports.js.map
@@ -0,0 +1,30 @@
import { Feature } from '../motion/features/Feature.mjs';
import { press } from 'motion-dom';
import { extractEventInfo } from '../events/event-info.mjs';
import { frame } from '../frameloop/frame.mjs';
function handlePressEvent(node, event, lifecycle) {
const { props } = node;
if (node.animationState && props.whileTap) {
node.animationState.setActive("whileTap", lifecycle === "Start");
}
const eventName = ("onTap" + (lifecycle === "End" ? "" : lifecycle));
const callback = props[eventName];
if (callback) {
frame.postRender(() => callback(event, extractEventInfo(event)));
}
}
class PressGesture extends Feature {
mount() {
const { current } = this.node;
if (!current)
return;
this.unmount = press(current, (startEvent) => {
handlePressEvent(this.node, startEvent, "Start");
return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? "End" : "Cancel");
}, { useGlobalTarget: this.node.props.globalTapTarget });
}
unmount() { }
}
export { PressGesture };
@@ -0,0 +1,10 @@
import type { Locale, createFormatter } from 'use-intl/core';
/**
* Returns a formatter based on the given locale.
*
* The formatter automatically receives the request config, but
* you can override it by passing in additional options.
*/
export default function getFormatter(opts?: {
locale?: Locale;
}): Promise<ReturnType<typeof createFormatter>>;
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "วันEEEEที่ do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "H:mm:ss น. zzzz",
long: "H:mm:ss น. z",
medium: "H:mm:ss น.",
short: "H:mm น.",
};
const dateTimeFormats = {
full: "{{date}} 'เวลา' {{time}}",
long: "{{date}} 'เวลา' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "medium",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1 @@
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM,CAK7D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiC5D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CA0BrE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAaT;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAM,EACrC,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAET"}
@@ -0,0 +1 @@
{"version":3,"file":"file-lock-2.js","sources":["../../../src/icons/file-lock-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileLock2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAyMmgxNGEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2MSIgLz4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI1IiB4PSIyIiB5PSIxMyIgcng9IjEiIC8+CiAgPHBhdGggZD0iTTggMTN2LTJhMiAyIDAgMSAwLTQgMHYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-lock-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 FileLock2 = createLucideIcon('FileLock2', [\n ['path', { d: 'M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v1', key: 'jmtmu2' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['rect', { width: '8', height: '5', x: '2', y: '13', rx: '1', key: '10y5wo' }],\n ['path', { d: 'M8 13v-2a2 2 0 1 0-4 0v2', key: '1pdxzg' }],\n]);\n\nexport default FileLock2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAChF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
import type { Config, SanitizedConfig } from './types.js';
export declare const sanitizeConfig: (incomingConfig: Config) => Promise<SanitizedConfig>;
//# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","4":"K D E F A zC"},B:{"1":"C L M G N","129":"0 1 2 3 4 5 6 7 8 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"9 K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB","4":"0C VC J bB 4C 5C","129":"0 1 2 3 4 5 6 7 8 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"},D:{"1":"sB tB uB vB wB xB yB zB 0B 1B","4":"J bB K","129":"0 1 2 3 4 5 6 7 8 9 D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB 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"},E:{"4":"J bB 6C bC","129":"K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"C fB gB hB iB jB kB lB mB nB oB PC xC ND QC","4":"F B JD KD LD MD","129":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB 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"},G:{"4":"bC OD yC","129":"E PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"4":"mD"},I:{"4":"nD oD pD","129":"VC J I qD yC rD sD"},J:{"129":"D A"},K:{"1":"C PC xC QC","4":"A B","129":"H"},L:{"129":"I"},M:{"129":"OC"},N:{"1":"B","4":"A"},O:{"129":"RC"},P:{"129":"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:{"129":"4D"},R:{"129":"5D"},S:{"1":"6D","129":"7D"}},B:1,C:"dataset & data-* attributes",D:true};
@@ -0,0 +1,81 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
test("string to number pipe", () => {
const schema = z.string().transform(Number).pipe(z.number());
expect(schema.parse("1234")).toEqual(1234);
});
test("string to number pipe async", async () => {
const schema = z
.string()
.transform(async (val) => Number(val))
.pipe(z.number());
expect(await schema.parseAsync("1234")).toEqual(1234);
});
test("string with default fallback", () => {
const stringWithDefault = z
.pipe(
z.transform((v) => (v === "none" ? undefined : v)),
z.string()
)
.catch("default");
expect(stringWithDefault.parse("ok")).toBe("ok");
expect(stringWithDefault.parse(undefined)).toBe("default");
expect(stringWithDefault.parse("none")).toBe("default");
expect(stringWithDefault.parse(15)).toBe("default");
});
test("continue on non-fatal errors", () => {
const schema = z
.string()
.refine((c) => c === "1234", "A")
.transform((val) => Number(val))
.refine((c) => c === 1234, "B");
schema.parse("1234");
expect(schema.safeParse("4321")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [],
"message": "A"
},
{
"code": "custom",
"path": [],
"message": "B"
}
]],
"success": false,
}
`);
});
test("break on fatal errors", () => {
const schema = z
.string()
.refine((c) => c === "1234", { message: "A", abort: true })
.transform((val) => Number(val))
.refine((c) => c === 1234, "B");
schema.parse("1234");
expect(schema.safeParse("4321")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [],
"message": "A"
}
]],
"success": false,
}
`);
});
@@ -0,0 +1,70 @@
'use strict';
const assert = require('assert');
const StreamSearch = require('../lib/sbmh.js');
[
{
needle: '\r\n',
chunks: [
'foo',
' bar',
'\r',
'\n',
'baz, hello\r',
'\n world.',
'\r\n Node.JS rules!!\r\n\r\n',
],
expect: [
[false, 'foo'],
[false, ' bar'],
[ true, null],
[false, 'baz, hello'],
[ true, null],
[false, ' world.'],
[ true, null],
[ true, ' Node.JS rules!!'],
[ true, ''],
],
},
{
needle: '---foobarbaz',
chunks: [
'---foobarbaz',
'asdf',
'\r\n',
'---foobarba',
'---foobar',
'ba',
'\r\n---foobarbaz--\r\n',
],
expect: [
[ true, null],
[false, 'asdf'],
[false, '\r\n'],
[false, '---foobarba'],
[false, '---foobarba'],
[ true, '\r\n'],
[false, '--\r\n'],
],
},
].forEach((test, i) => {
console.log(`Running test #${i + 1}`);
const { needle, chunks, expect } = test;
const results = [];
const ss = new StreamSearch(Buffer.from(needle),
(isMatch, data, start, end) => {
if (data)
data = data.toString('latin1', start, end);
else
data = null;
results.push([isMatch, data]);
});
for (const chunk of chunks)
ss.push(Buffer.from(chunk));
assert.deepStrictEqual(results, expect);
});
@@ -0,0 +1,100 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { useLayoutEffect, useEffect, useMemo, useState, useRef } from 'react';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? useLayoutEffect : useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Shortcut to Lexical subscriptions when values are used for render.
* @param subscription - The function to create the {@link LexicalSubscription}. This function's identity must be stable (e.g. defined at module scope or with useCallback).
*/
function useLexicalSubscription(subscription) {
const [editor] = useLexicalComposerContext();
const initializedSubscription = useMemo(() => subscription(editor), [editor, subscription]);
const [value, setValue] = useState(() => initializedSubscription.initialValueFn());
const valueRef = useRef(value);
useLayoutEffectImpl(() => {
const {
initialValueFn,
subscribe
} = initializedSubscription;
const currentValue = initialValueFn();
if (valueRef.current !== currentValue) {
valueRef.current = currentValue;
setValue(currentValue);
}
return subscribe(newValue => {
valueRef.current = newValue;
setValue(newValue);
});
}, [initializedSubscription, subscription]);
return value;
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function subscription(editor) {
return {
initialValueFn: () => editor.isEditable(),
subscribe: callback => {
return editor.registerEditableListener(callback);
}
};
}
/**
* 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.
*/
function useLexicalEditable() {
return useLexicalSubscription(subscription);
}
export { useLexicalEditable };
@@ -0,0 +1 @@
module.exports={C:{"5":0.03028,"115":0.03634,"121":0.00303,"128":0.00303,"136":0.00303,"140":0.01211,"145":0.15746,"146":0.2483,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 122 123 124 125 126 127 129 130 131 132 133 134 135 137 138 139 141 142 143 144 147 148 149 3.5 3.6"},D:{"66":0.00303,"68":0.00303,"69":0.03331,"73":0.00303,"79":0.00908,"83":0.00303,"87":0.00908,"95":0.00303,"96":0.00606,"98":0.03028,"100":0.00606,"103":0.17562,"104":0.17865,"105":0.1726,"106":0.17562,"107":0.1726,"108":0.18471,"109":0.70552,"110":0.1726,"111":0.2059,"112":7.33382,"113":0.00303,"114":0.00606,"115":0.00303,"116":0.35125,"117":0.21499,"119":0.01211,"120":0.20893,"121":0.00606,"122":0.11204,"123":0.00303,"124":0.17865,"125":0.0757,"126":3.11581,"127":0.00606,"128":0.03936,"129":0.00606,"130":0.00303,"131":0.36336,"132":0.04542,"133":0.35125,"134":0.01211,"135":0.01514,"136":0.01211,"137":0.02725,"138":0.0969,"139":0.03936,"140":0.03028,"141":0.09387,"142":3.10067,"143":4.71762,"144":0.00303,_:"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 67 70 71 72 74 75 76 77 78 80 81 84 85 86 88 89 90 91 92 93 94 97 99 101 102 118 145 146"},F:{"56":0.00303,"93":0.01211,"113":0.00303,"120":0.01514,"121":0.00303,"122":0.00606,"123":0.00303,"124":0.06056,"125":0.02725,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00303,"109":0.01211,"114":0.00303,"122":0.00303,"128":0.00303,"135":0.00606,"136":0.00303,"137":0.00303,"138":0.00303,"139":0.00606,"140":0.02725,"141":0.01514,"142":0.29069,"143":0.8115,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 124 125 126 127 129 130 131 132 133 134"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.1 16.3 16.4 16.5 17.0 17.2 18.2 26.3","5.1":0.00303,"15.6":0.01817,"16.0":0.00606,"16.2":0.00303,"16.6":0.04239,"17.1":0.01514,"17.3":0.00303,"17.4":0.00606,"17.5":0.00303,"17.6":0.01817,"18.0":0.00303,"18.1":0.00303,"18.3":0.00606,"18.4":0.00606,"18.5-18.6":0.0212,"26.0":0.01211,"26.1":0.08781,"26.2":0.0212},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00321,"5.0-5.1":0,"6.0-6.1":0.00642,"7.0-7.1":0.00481,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01283,"10.0-10.2":0.0016,"10.3":0.02245,"11.0-11.2":0.27585,"11.3-11.4":0.00802,"12.0-12.1":0.00642,"12.2-12.5":0.07217,"13.0-13.1":0.0016,"13.2":0.01123,"13.3":0.00321,"13.4-13.7":0.01123,"14.0-14.4":0.02245,"14.5-14.8":0.02406,"15.0-15.1":0.02566,"15.2-15.3":0.01925,"15.4":0.02085,"15.5":0.02245,"15.6-15.8":0.34802,"16.0":0.04009,"16.1":0.07698,"16.2":0.04009,"16.3":0.07217,"16.4":0.01764,"16.5":0.03047,"16.6-16.7":0.45227,"17.0":0.02566,"17.1":0.0417,"17.2":0.03047,"17.3":0.04651,"17.4":0.07859,"17.5":0.15396,"17.6-17.7":0.35604,"18.0":0.08019,"18.1":0.16679,"18.2":0.08821,"18.3":0.28708,"18.4":0.14755,"18.5-18.7":10.59464,"26.0":0.20689,"26.1":1.72087,"26.2":0.32717,"26.3":0.01443},P:{"4":0.01025,"21":0.01025,"22":0.02051,"23":0.02051,"24":0.01025,"25":0.05127,"26":0.03076,"27":0.05127,"28":0.12305,"29":1.22028,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.02051},I:{"0":0.02785,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},A:{"11":0.07267,_:"6 7 8 9 10 5.5"},K:{"0":0.04881,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.00697},H:{"0":0},L:{"0":56.62822},R:{_:"0"},M:{"0":0.05578}};
@@ -0,0 +1 @@
{"version":3,"file":"resetPassword.d.ts","sourceRoot":"","sources":["../../../src/resolvers/auth/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMzC,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAiCzD"}
@@ -0,0 +1,268 @@
class POParser {
static parse(content) {
const lines = POParser.splitLines(content);
const messages = [];
const meta = {};
let state = 'entry';
let entry;
for(let i = 0; i < lines.length; i++){
const line = lines[i].trim();
// An empty line indicates the end of an entry
if (!line) {
if (state === 'entry' && entry) {
messages.push(POParser.finishEntry(entry));
entry = undefined;
}
state = 'entry';
continue;
}
if (state === 'meta') {
if (line.startsWith(POParser.QUOTE)) {
const rawMetaLine = POParser.extractQuotedString(line, state);
const metaLine = POParser.unescape(rawMetaLine);
const cleaned = metaLine.endsWith('\n') ? metaLine.slice(0, -1) : metaLine;
const separatorIndex = cleaned.indexOf(POParser.META_SEPARATOR);
if (separatorIndex > 0) {
const key = cleaned.substring(0, separatorIndex).trim();
const value = cleaned.substring(separatorIndex + 1).trim();
meta[key] = value;
}
} else {
POParser.throwWithLine('Encountered unexpected non-quoted metadata line', line);
}
} else {
// Unsupported comment types
if (POParser.lineStartsWithPrefix(line, POParser.COMMENTS.TRANSLATOR)) {
POParser.throwWithLine('Translator comments (#) are not supported, use inline descriptions instead', line);
}
if (POParser.lineStartsWithPrefix(line, POParser.COMMENTS.PREVIOUS)) {
POParser.throwWithLine('Previous string key comments (#|) are not supported', line);
}
// Flag comments
if (POParser.lineStartsWithPrefix(line, POParser.COMMENTS.FLAG)) {
entry = POParser.ensureEntry(entry);
const flagsText = line.substring(POParser.COMMENTS.FLAG.length).trim();
entry.flags = flagsText.split(',').map((flag)=>flag.trim()).filter(Boolean);
continue;
}
// Reference comments
if (POParser.lineStartsWithPrefix(line, POParser.COMMENTS.REFERENCE)) {
var _entry;
entry = POParser.ensureEntry(entry);
const parts = line.substring(POParser.COMMENTS.REFERENCE.length).trim().split(POParser.FILE_COLUMN_SEPARATOR);
const path = parts[0];
let lineNumber;
if (parts.length > 1) {
const parsedLine = parseInt(parts[1]);
if (!isNaN(parsedLine)) {
lineNumber = parsedLine;
}
}
(_entry = entry).references ?? (_entry.references = []);
const reference = {
path
};
if (lineNumber) {
reference.line = lineNumber;
}
entry.references.push(reference);
continue;
}
// Extracted comments
if (POParser.lineStartsWithPrefix(line, POParser.COMMENTS.EXTRACTED)) {
var _entry1;
entry = POParser.ensureEntry(entry);
const comment = line.substring(POParser.COMMENTS.EXTRACTED.length).trim();
(_entry1 = entry).extractedComments ?? (_entry1.extractedComments = []);
entry.extractedComments.push(comment);
continue;
}
// Check for unsupported features
if (POParser.lineStartsWithPrefix(line, POParser.KEYWORDS.MSGID_PLURAL)) {
POParser.throwWithLine('Plural forms (msgid_plural) are not supported, use ICU pluralization instead', line);
}
// msgctxt
if (POParser.lineStartsWithPrefix(line, POParser.KEYWORDS.MSGCTXT)) {
entry = POParser.ensureEntry(entry);
entry.msgctxt = POParser.unescape(POParser.extractQuotedString(line.substring(POParser.KEYWORDS.MSGCTXT.length + 1), state));
continue;
}
// msgid
if (POParser.lineStartsWithPrefix(line, POParser.KEYWORDS.MSGID)) {
entry = POParser.ensureEntry(entry);
entry.msgid = POParser.unescape(POParser.extractQuotedString(line.substring(POParser.KEYWORDS.MSGID.length + 1), state));
if (POParser.isMetaEntry(entry, messages)) {
state = 'meta';
entry = undefined;
}
continue;
}
// msgstr
if (POParser.lineStartsWithPrefix(line, POParser.KEYWORDS.MSGSTR)) {
entry = POParser.ensureEntry(entry);
entry.msgstr = POParser.unescape(POParser.extractQuotedString(line.substring(POParser.KEYWORDS.MSGSTR.length + 1), state));
if (POParser.isMetaEntry(entry, messages)) {
state = 'meta';
entry = undefined;
}
continue;
}
// Multi-line strings are not supported in entry mode
if (line.startsWith(POParser.QUOTE)) {
POParser.throwWithLine('Multi-line strings are not supported, use single-line strings instead', line);
}
}
}
// Finish any remaining entry
if (state === 'entry' && entry) {
messages.push(POParser.finishEntry(entry));
}
return {
meta: Object.keys(meta).length > 0 ? meta : undefined,
messages: messages.length > 0 ? messages : undefined
};
}
static isMetaEntry(entry, messages) {
return messages.length === 0 && entry.msgid === '' && entry.msgstr === '';
}
static serialize(catalog) {
const lines = [];
// Metadata
if (catalog.meta) {
lines.push(`${POParser.KEYWORDS.MSGID} ${POParser.QUOTE}${POParser.QUOTE}`);
lines.push(`${POParser.KEYWORDS.MSGSTR} ${POParser.QUOTE}${POParser.QUOTE}`);
for (const [key, value] of Object.entries(catalog.meta)){
lines.push(`${POParser.QUOTE}${key}${POParser.META_SEPARATOR} ${POParser.escape(value)}${POParser.NEWLINE}${POParser.QUOTE}`);
}
lines.push('');
}
// Messages
if (catalog.messages) {
for (const entry of catalog.messages){
if (entry.extractedComments && entry.extractedComments.length > 0) {
for (const comment of entry.extractedComments){
lines.push(`${POParser.COMMENTS.EXTRACTED} ${comment}`);
}
}
if (entry.references && entry.references.length > 0) {
for (const ref of entry.references){
let refString = ref.path;
if (ref.line) {
refString += `${POParser.FILE_COLUMN_SEPARATOR}${ref.line}`;
}
lines.push(`${POParser.COMMENTS.REFERENCE} ${refString}`);
}
}
if (entry.flags && entry.flags.length > 0) {
lines.push(`${POParser.COMMENTS.FLAG} ${entry.flags.join(POParser.FLAG_SEPARATOR)}`);
}
if (entry.msgctxt) {
lines.push(`${POParser.KEYWORDS.MSGCTXT} ${POParser.QUOTE}${POParser.escape(entry.msgctxt)}${POParser.QUOTE}`);
}
lines.push(`${POParser.KEYWORDS.MSGID} ${POParser.QUOTE}${POParser.escape(entry.msgid)}${POParser.QUOTE}`);
lines.push(`${POParser.KEYWORDS.MSGSTR} ${POParser.QUOTE}${POParser.escape(entry.msgstr)}${POParser.QUOTE}`);
lines.push('');
}
}
return lines.join('\n');
}
static lineStartsWithPrefix(line, prefix) {
return line.startsWith(prefix + ' ');
}
static throwWithLine(message, line) {
throw new Error(`${message}:\n> ${line}`);
}
static splitLines(content) {
// Avoid overhead for Unix newlines only
if (content.includes('\r')) {
content = content.replace(/\r\n/g, '\n');
}
return content.split('\n');
}
static ensureEntry(entry) {
return entry || {};
}
static finishEntry(entry) {
if (entry.msgid == null || entry.msgstr == null) {
throw new Error('Incomplete message entry: both msgid and msgstr are required');
}
return {
msgctxt: entry.msgctxt,
msgid: entry.msgid,
msgstr: entry.msgstr,
extractedComments: entry.extractedComments,
references: entry.references,
flags: entry.flags
};
}
static extractQuotedString(line, state) {
const trimmed = line.trim();
if (!trimmed.startsWith(POParser.QUOTE)) {
POParser.throwWithLine('Incomplete quoted string', line);
}
if (!trimmed.endsWith(POParser.QUOTE)) {
if (state === 'meta') {
return trimmed.substring(POParser.QUOTE.length);
}
POParser.throwWithLine('Incomplete quoted string', line);
}
const endIndex = trimmed.length - POParser.QUOTE.length;
return trimmed.substring(POParser.QUOTE.length, endIndex);
}
static escape(value) {
let result = '';
for (const char of value){
const mapped = POParser.ESCAPE_LOOKUP[char];
result += mapped != null ? `\\${mapped}` : char;
}
return result;
}
static unescape(value) {
let result = '';
for(let i = 0; i < value.length; i++){
const char = value[i];
if (char === '\\' && i + 1 < value.length) {
const nextChar = value[i + 1];
const mapped = POParser.UNESCAPE_LOOKUP[nextChar];
if (mapped != null) {
result += mapped;
i++;
continue;
}
}
result += char;
}
return result;
}
}
POParser.KEYWORDS = {
MSGID: 'msgid',
MSGSTR: 'msgstr',
MSGCTXT: 'msgctxt',
MSGID_PLURAL: 'msgid_plural'
};
POParser.COMMENTS = {
REFERENCE: '#:',
EXTRACTED: '#.',
TRANSLATOR: '#',
FLAG: '#,',
PREVIOUS: '#|'
};
POParser.QUOTE = '"';
POParser.NEWLINE = '\\n';
POParser.FILE_COLUMN_SEPARATOR = ':';
POParser.META_SEPARATOR = ':';
POParser.FLAG_SEPARATOR = ', ';
POParser.ESCAPE_LOOKUP = {
'\\': '\\',
'"': '"',
'\n': 'n',
'\r': 'r',
'\t': 't'
};
POParser.UNESCAPE_LOOKUP = Object.entries(POParser.ESCAPE_LOOKUP).reduce((acc, [char, code])=>{
acc[code] = char;
return acc;
}, {});
export { POParser as default };
@@ -0,0 +1,57 @@
/**
* A list of all valid MotionProps.
*
* @privateRemarks
* This doesn't throw if a `MotionProp` name is missing - it should.
*/
const validMotionProps = new Set([
"animate",
"exit",
"variants",
"initial",
"style",
"values",
"variants",
"transition",
"transformTemplate",
"custom",
"inherit",
"onBeforeLayoutMeasure",
"onAnimationStart",
"onAnimationComplete",
"onUpdate",
"onDragStart",
"onDrag",
"onDragEnd",
"onMeasureDragConstraints",
"onDirectionLock",
"onDragTransitionEnd",
"_dragX",
"_dragY",
"onHoverStart",
"onHoverEnd",
"onViewportEnter",
"onViewportLeave",
"globalTapTarget",
"ignoreStrict",
"viewport",
]);
/**
* Check whether a prop name is a valid `MotionProp` key.
*
* @param key - Name of the property to check
* @returns `true` is key is a valid `MotionProp`.
*
* @public
*/
function isValidMotionProp(key) {
return (key.startsWith("while") ||
(key.startsWith("drag") && key !== "draggable") ||
key.startsWith("layout") ||
key.startsWith("onTap") ||
key.startsWith("onPan") ||
key.startsWith("onLayout") ||
validMotionProps.has(key));
}
export { isValidMotionProp };
@@ -0,0 +1 @@
{"version":3,"file":"_error.js","sources":["../../../../src/common/pages-router-instrumentation/_error.ts"],"sourcesContent":["import { captureException, httpRequestToRequestData, withScope } from '@sentry/core';\nimport type { NextPageContext } from 'next';\nimport { flushSafelyWithTimeout, waitUntil } from '../utils/responseEnd';\n\ntype ContextOrProps = {\n req?: NextPageContext['req'];\n res?: NextPageContext['res'];\n err?: NextPageContext['err'] | string;\n pathname?: string;\n statusCode?: number;\n};\n\n/**\n * Capture the exception passed by nextjs to the `_error` page, adding context data as appropriate.\n *\n * This will not capture the exception if the status code is < 500 or if the pathname is not provided and will thus not return an event ID.\n *\n * @param contextOrProps The data passed to either `getInitialProps` or `render` by nextjs\n * @returns The Sentry event ID, or `undefined` if no event was captured\n */\nexport async function captureUnderscoreErrorException(contextOrProps: ContextOrProps): Promise<string | undefined> {\n const { req, res, err } = contextOrProps;\n\n // 404s (and other 400-y friends) can trigger `_error`, but we don't want to send them to Sentry\n const statusCode = res?.statusCode || contextOrProps.statusCode;\n if (statusCode && statusCode < 500) {\n return;\n }\n\n // In previous versions of the suggested `_error.js` page in which this function is meant to be used, there was a\n // workaround for https://github.com/vercel/next.js/issues/8592 which involved an extra call to this function, in the\n // custom error component's `render` method, just in case it hadn't been called by `getInitialProps`. Now that that\n // issue has been fixed, the second call is unnecessary, but since it lives in user code rather than our code, users\n // have to be the ones to get rid of it, and guaraneteedly, not all of them will. So, rather than capture the error\n // twice, we just bail if we sense we're in that now-extraneous second call. (We can tell which function we're in\n // because Nextjs passes `pathname` to `getInitialProps` but not to `render`.)\n if (!contextOrProps.pathname) {\n return;\n }\n\n const eventId = withScope(scope => {\n if (req) {\n const normalizedRequest = httpRequestToRequestData(req);\n scope.setSDKProcessingMetadata({ normalizedRequest });\n }\n\n // If third-party libraries (or users themselves) throw something falsy, we want to capture it as a message (which\n // is what passing a string to `captureException` will wind up doing)\n return captureException(err || `_error.js called with falsy error (${err})`, {\n mechanism: {\n type: 'auto.function.nextjs.underscore_error',\n handled: false,\n data: {\n function: '_error.getInitialProps',\n },\n },\n });\n });\n\n waitUntil(flushSafelyWithTimeout());\n\n return eventId;\n}\n"],"names":["withScope","httpRequestToRequestData","captureException","waitUntil","flushSafelyWithTimeout"],"mappings":";;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,+BAA+B,CAAC,cAAc,EAA+C;AACnH,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAA,EAAI,GAAI,cAAc;;AAE1C;AACA,EAAE,MAAM,aAAa,GAAG,EAAE,UAAA,IAAc,cAAc,CAAC,UAAU;AACjE,EAAE,IAAI,UAAA,IAAc,UAAA,GAAa,GAAG,EAAE;AACtC,IAAI;AACJ,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE;AAChC,IAAI;AACJ,EAAE;;AAEF,EAAE,MAAM,OAAA,GAAUA,cAAS,CAAC,SAAS;AACrC,IAAI,IAAI,GAAG,EAAE;AACb,MAAM,MAAM,iBAAA,GAAoBC,6BAAwB,CAAC,GAAG,CAAC;AAC7D,MAAM,KAAK,CAAC,wBAAwB,CAAC,EAAE,iBAAA,EAAmB,CAAC;AAC3D,IAAI;;AAEJ;AACA;AACA,IAAI,OAAOC,qBAAgB,CAAC,GAAA,IAAO,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE;AACjF,MAAM,SAAS,EAAE;AACjB,QAAQ,IAAI,EAAE,uCAAuC;AACrD,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,IAAI,EAAE;AACd,UAAU,QAAQ,EAAE,wBAAwB;AAC5C,SAAS;AACT,OAAO;AACP,KAAK,CAAC;AACN,EAAE,CAAC,CAAC;;AAEJ,EAAEC,qBAAS,CAACC,kCAAsB,EAAE,CAAC;;AAErC,EAAE,OAAO,OAAO;AAChB;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"prefixItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/prefixItems.ts"],"names":[],"mappings":";;AACA,mCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,qBAAa,EAAC,GAAG,EAAE,OAAO,CAAC;CAC3C,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,9 @@
import type { RequestCookies } from 'next/dist/server/web/spec-extension/cookies.js';
import type { Locale } from 'use-intl';
import type { ResolvedRoutingConfig } from '../routing/config.js';
import type { DomainConfig, DomainsConfig, LocalePrefixMode, Locales, Pathnames } from '../routing/types.js';
export declare function getAcceptLanguageLocale<AppLocales extends Locales>(requestHeaders: Headers, locales: AppLocales, defaultLocale: Locale): string | undefined;
export default function resolveLocale<AppLocales extends Locales, AppLocalePrefixMode extends LocalePrefixMode, AppPathnames extends Pathnames<AppLocales> | undefined, AppDomains extends DomainsConfig<AppLocales> | undefined>(routing: Omit<ResolvedRoutingConfig<AppLocales, AppLocalePrefixMode, AppPathnames, AppDomains>, 'pathnames'>, requestHeaders: Headers, requestCookies: RequestCookies, pathname: string): {
locale: AppLocales[number];
domain?: DomainConfig<AppLocales>;
};
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["default","withPayload"],"sources":["../src/index.js"],"sourcesContent":["export { default as withPayload } from './withPayload/withPayload.js'\n"],"mappings":"AAAA,SAASA,OAAA,IAAWC,WAAW,QAAQ","ignoreList":[]}
@@ -0,0 +1,12 @@
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult } from "../types.js";
export declare class FractionOfSecondParser extends Parser<number> {
priority: number;
parse(dateString: string, token: string): ParseResult<number>;
set<DateType extends Date>(
date: DateType,
_flags: ParseFlags,
value: number,
): DateType;
incompatibleTokens: string[];
}
@@ -0,0 +1 @@
{"version":3,"file":"password-reset.js","names":[],"sources":["../../../../src/rest/commands/auth/password-reset.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n/**\n * The request a password reset endpoint sends an email with a link to the admin app (or a custom route) which in turn uses this endpoint to allow the user to reset their password.\n *\n * @param token Password reset token, as provided in the email sent by the request endpoint.\n * @param password New password for the user.\n *\n * @returns Empty body.\n */\nexport const passwordReset =\n\t<Schema>(token: string, password: string): RestCommand<void, Schema> =>\n\t() => ({\n\t\tpath: '/auth/password/reset',\n\t\tmethod: 'POST',\n\t\tbody: JSON.stringify({ token, password }),\n\t});\n"],"mappings":"AAUA,MAAa,GACH,EAAe,SACjB,CACN,KAAM,uBACN,OAAQ,OACR,KAAM,KAAK,UAAU,CAAE,QAAO,WAAU,CAAC,CACzC"}
@@ -0,0 +1,9 @@
import { entityKind } from "./entity.js";
import { View } from "./sql/sql.js";
import { Subquery } from "./subquery.js";
export declare class SelectionProxyHandler<T extends Subquery | Record<string, unknown> | View> implements ProxyHandler<Subquery | Record<string, unknown> | View> {
static readonly [entityKind]: string;
private config;
constructor(config: SelectionProxyHandler<T>['config']);
get(subquery: T, prop: string | symbol): any;
}
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isBinding;
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js");
function isBinding(node, parent, grandparent) {
if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
return false;
}
const keys = _getBindingIdentifiers.default.keys[parent.type];
if (keys) {
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const val = parent[key];
if (Array.isArray(val)) {
if (val.includes(node)) return true;
} else {
if (val === node) return true;
}
}
}
return false;
}
//# sourceMappingURL=isBinding.js.map
@@ -0,0 +1,43 @@
"use strict";
exports.setISOWeekYear = setISOWeekYear;
var _index = require("./constructFrom.js");
var _index2 = require("./differenceInCalendarDays.js");
var _index3 = require("./startOfISOWeekYear.js");
var _index4 = require("./toDate.js");
/**
* @name setISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Set the ISO week-numbering year to the given date.
*
* @description
* Set the ISO week-numbering year to the given date,
* saving the week number and the weekday number.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param weekYear - The ISO week-numbering year of the new date
*
* @returns The new date with the ISO week-numbering year set
*
* @example
* // Set ISO week-numbering year 2007 to 29 December 2008:
* const result = setISOWeekYear(new Date(2008, 11, 29), 2007)
* //=> Mon Jan 01 2007 00:00:00
*/
function setISOWeekYear(date, weekYear) {
let _date = (0, _index4.toDate)(date);
const diff = (0, _index2.differenceInCalendarDays)(
_date,
(0, _index3.startOfISOWeekYear)(_date),
);
const fourthOfJanuary = (0, _index.constructFrom)(date, 0);
fourthOfJanuary.setFullYear(weekYear, 0, 4);
fourthOfJanuary.setHours(0, 0, 0, 0);
_date = (0, _index3.startOfISOWeekYear)(fourthOfJanuary);
_date.setDate(_date.getDate() + diff);
return _date;
}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.letterSpacing = void 0;
exports.letterSpacing = {
name: 'letter-spacing',
initialValue: '0',
prefix: false,
type: 0 /* VALUE */,
parse: function (_context, token) {
if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'normal') {
return 0;
}
if (token.type === 17 /* NUMBER_TOKEN */) {
return token.number;
}
if (token.type === 15 /* DIMENSION_TOKEN */) {
return token.number;
}
return 0;
}
};
//# sourceMappingURL=letter-spacing.js.map
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "dd.MM.y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'om' {{time}}",
long: "{{date}} 'om' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1,21 @@
/**
* @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 NotepadText = createLucideIcon("NotepadText", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M12 2v4", key: "3427ic" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "16", height: "18", x: "4", y: "4", rx: "2", key: "1u9h20" }],
["path", { d: "M8 10h6", key: "3oa6kw" }],
["path", { d: "M8 14h8", key: "1fgep2" }],
["path", { d: "M8 18h5", key: "17enja" }]
]);
export { NotepadText as default };
//# sourceMappingURL=notepad-text.js.map
@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{useLexicalComposerContext as e}from"@lexical/react/LexicalComposerContext";import{useLayoutEffect as n,useEffect as t,useMemo as o,useState as r,useRef as i}from"react";const c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n:t;function u(n){const[t]=e(),u=o((()=>n(t)),[t,n]),[a,d]=r((()=>u.initialValueFn())),l=i(a);return c((()=>{const{initialValueFn:e,subscribe:n}=u,t=e();return l.current!==t&&(l.current=t,d(t)),n((e=>{l.current=e,d(e)}))}),[u,n]),a}export{u as useLexicalSubscription};
@@ -0,0 +1,20 @@
import parse from './parse.js';
import { unsafeStringify } from './stringify.js';
/**
* Convert a v6 UUID to a v1 UUID
*
* @param {string|Uint8Array} uuid - The v6 UUID to convert to v6
* @returns {string|Uint8Array} The v1 UUID as the same type as the `uuid` arg
* (string or Uint8Array)
*/
export default function v6ToV1(uuid) {
var v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
var v1Bytes = _v6ToV1(v6Bytes);
return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes;
}
// Do the field transformation needed for v6 -> v1
function _v6ToV1(v6Bytes) {
return Uint8Array.of((v6Bytes[3] & 0x0f) << 4 | v6Bytes[4] >> 4 & 0x0f, (v6Bytes[4] & 0x0f) << 4 | (v6Bytes[5] & 0xf0) >> 4, (v6Bytes[5] & 0x0f) << 4 | v6Bytes[6] & 0x0f, v6Bytes[7], (v6Bytes[1] & 0x0f) << 4 | (v6Bytes[2] & 0xf0) >> 4, (v6Bytes[2] & 0x0f) << 4 | (v6Bytes[3] & 0xf0) >> 4, 0x10 | (v6Bytes[0] & 0xf0) >> 4, (v6Bytes[0] & 0x0f) << 4 | (v6Bytes[1] & 0xf0) >> 4, v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
}
@@ -0,0 +1,510 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var lexical = require('lexical');
var React = require('react');
var utils = require('@lexical/utils');
var jsxRuntime = require('react/jsx-runtime');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// Webpack + React 17 fails to compile on the usage of `React.startTransition` or
// `React["startTransition"]` even if it's behind a feature detection of
// `"startTransition" in React`. Moving this to a constant avoids the issue :/
const START_TRANSITION = 'startTransition';
function startTransition(callback) {
if (START_TRANSITION in React) {
React[START_TRANSITION](callback);
} else {
callback();
}
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
const CAN_USE_DOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// This workaround is no longer necessary in React 19,
// but we currently support React >=17.x
// https://github.com/facebook/react/pull/26395
const useLayoutEffectImpl = CAN_USE_DOM ? React.useLayoutEffect : React.useEffect;
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
class MenuOption {
constructor(key) {
this.key = key;
this.ref = {
current: null
};
this.setRefElement = this.setRefElement.bind(this);
}
setRefElement(element) {
this.ref = {
current: element
};
}
}
const scrollIntoViewIfNeeded = target => {
const typeaheadContainerNode = document.getElementById('typeahead-menu');
if (!typeaheadContainerNode) {
return;
}
const typeaheadRect = typeaheadContainerNode.getBoundingClientRect();
if (typeaheadRect.top + typeaheadRect.height > window.innerHeight) {
typeaheadContainerNode.scrollIntoView({
block: 'center'
});
}
if (typeaheadRect.top < 0) {
typeaheadContainerNode.scrollIntoView({
block: 'center'
});
}
target.scrollIntoView({
block: 'nearest'
});
};
/**
* Walk backwards along user input and forward through entity title to try
* and replace more of the user's text with entity.
*/
function getFullMatchOffset(documentText, entryText, offset) {
let triggerOffset = offset;
for (let i = triggerOffset; i <= entryText.length; i++) {
if (documentText.slice(-i) === entryText.substring(0, i)) {
triggerOffset = i;
}
}
return triggerOffset;
}
/**
* Split Lexical TextNode and return a new TextNode only containing matched text.
* Common use cases include: removing the node, replacing with a new node.
*/
function $splitNodeContainingQuery(match) {
const selection = lexical.$getSelection();
if (!lexical.$isRangeSelection(selection) || !selection.isCollapsed()) {
return null;
}
const anchor = selection.anchor;
if (anchor.type !== 'text') {
return null;
}
const anchorNode = anchor.getNode();
if (!anchorNode.isSimpleText()) {
return null;
}
const selectionOffset = anchor.offset;
const textContent = anchorNode.getTextContent().slice(0, selectionOffset);
const characterOffset = match.replaceableString.length;
const queryOffset = getFullMatchOffset(textContent, match.matchingString, characterOffset);
const startOffset = selectionOffset - queryOffset;
if (startOffset < 0) {
return null;
}
let newNode;
if (startOffset === 0) {
[newNode] = anchorNode.splitText(selectionOffset);
} else {
[, newNode] = anchorNode.splitText(startOffset, selectionOffset);
}
return newNode;
}
// Got from https://stackoverflow.com/a/42543908/2013580
function getScrollParent(element, includeHidden) {
let style = getComputedStyle(element);
const excludeStaticParent = style.position === 'absolute';
const overflowRegex = /(auto|scroll)/;
if (style.position === 'fixed') {
return document.body;
}
for (let parent = element; parent = parent.parentElement;) {
style = getComputedStyle(parent);
if (excludeStaticParent && style.position === 'static') {
continue;
}
if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {
return parent;
}
}
return document.body;
}
function isTriggerVisibleInNearestScrollContainer(targetElement, containerElement) {
const tRect = targetElement.getBoundingClientRect();
const cRect = containerElement.getBoundingClientRect();
return tRect.top > cRect.top && tRect.top < cRect.bottom;
}
// Reposition the menu on scroll, window resize, and element resize.
function useDynamicPositioning(resolution, targetElement, onReposition, onVisibilityChange) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
React.useEffect(() => {
if (targetElement != null && resolution != null) {
const rootElement = editor.getRootElement();
const rootScrollParent = rootElement != null ? getScrollParent(rootElement) : document.body;
let ticking = false;
let previousIsInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent);
const handleScroll = function () {
if (!ticking) {
window.requestAnimationFrame(function () {
onReposition();
ticking = false;
});
ticking = true;
}
const isInView = isTriggerVisibleInNearestScrollContainer(targetElement, rootScrollParent);
if (isInView !== previousIsInView) {
previousIsInView = isInView;
if (onVisibilityChange != null) {
onVisibilityChange(isInView);
}
}
};
const resizeObserver = new ResizeObserver(onReposition);
window.addEventListener('resize', onReposition);
document.addEventListener('scroll', handleScroll, {
capture: true,
passive: true
});
resizeObserver.observe(targetElement);
return () => {
resizeObserver.unobserve(targetElement);
window.removeEventListener('resize', onReposition);
document.removeEventListener('scroll', handleScroll, true);
};
}
}, [targetElement, editor, onVisibilityChange, onReposition, resolution]);
}
const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = lexical.createCommand('SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND');
function LexicalMenu({
close,
editor,
anchorElementRef,
resolution,
options,
menuRenderFn,
onSelectOption,
shouldSplitNodeWithQuery = false,
commandPriority = lexical.COMMAND_PRIORITY_LOW,
preselectFirstItem = true
}) {
const [selectedIndex, setHighlightedIndex] = React.useState(null);
const matchingString = resolution.match && resolution.match.matchingString;
React.useEffect(() => {
if (preselectFirstItem) {
setHighlightedIndex(0);
}
}, [matchingString, preselectFirstItem]);
const selectOptionAndCleanUp = React.useCallback(selectedEntry => {
editor.update(() => {
const textNodeContainingQuery = resolution.match != null && shouldSplitNodeWithQuery ? $splitNodeContainingQuery(resolution.match) : null;
onSelectOption(selectedEntry, textNodeContainingQuery, close, resolution.match ? resolution.match.matchingString : '');
});
}, [editor, shouldSplitNodeWithQuery, resolution.match, onSelectOption, close]);
const updateSelectedIndex = React.useCallback(index => {
const rootElem = editor.getRootElement();
if (rootElem !== null) {
rootElem.setAttribute('aria-activedescendant', 'typeahead-item-' + index);
setHighlightedIndex(index);
}
}, [editor]);
React.useEffect(() => {
return () => {
const rootElem = editor.getRootElement();
if (rootElem !== null) {
rootElem.removeAttribute('aria-activedescendant');
}
};
}, [editor]);
useLayoutEffectImpl(() => {
if (options === null) {
setHighlightedIndex(null);
} else if (selectedIndex === null && preselectFirstItem) {
updateSelectedIndex(0);
}
}, [options, selectedIndex, updateSelectedIndex, preselectFirstItem]);
React.useEffect(() => {
return utils.mergeRegister(editor.registerCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, ({
option
}) => {
if (option.ref && option.ref.current != null) {
scrollIntoViewIfNeeded(option.ref.current);
return true;
}
return false;
}, commandPriority));
}, [editor, updateSelectedIndex, commandPriority]);
React.useEffect(() => {
return utils.mergeRegister(editor.registerCommand(lexical.KEY_ARROW_DOWN_COMMAND, payload => {
const event = payload;
if (options !== null && options.length) {
const newSelectedIndex = selectedIndex === null ? 0 : selectedIndex !== options.length - 1 ? selectedIndex + 1 : 0;
updateSelectedIndex(newSelectedIndex);
const option = options[newSelectedIndex];
if (option.ref != null && option.ref.current) {
editor.dispatchCommand(SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND, {
index: newSelectedIndex,
option
});
}
event.preventDefault();
event.stopImmediatePropagation();
}
return true;
}, commandPriority), editor.registerCommand(lexical.KEY_ARROW_UP_COMMAND, payload => {
const event = payload;
if (options !== null && options.length) {
const newSelectedIndex = selectedIndex === null ? options.length - 1 : selectedIndex !== 0 ? selectedIndex - 1 : options.length - 1;
updateSelectedIndex(newSelectedIndex);
const option = options[newSelectedIndex];
if (option.ref != null && option.ref.current) {
scrollIntoViewIfNeeded(option.ref.current);
}
event.preventDefault();
event.stopImmediatePropagation();
}
return true;
}, commandPriority), editor.registerCommand(lexical.KEY_ESCAPE_COMMAND, payload => {
const event = payload;
event.preventDefault();
event.stopImmediatePropagation();
close();
return true;
}, commandPriority), editor.registerCommand(lexical.KEY_TAB_COMMAND, payload => {
const event = payload;
if (options === null || selectedIndex === null || options[selectedIndex] == null) {
return false;
}
event.preventDefault();
event.stopImmediatePropagation();
selectOptionAndCleanUp(options[selectedIndex]);
return true;
}, commandPriority), editor.registerCommand(lexical.KEY_ENTER_COMMAND, event => {
if (options === null || selectedIndex === null || options[selectedIndex] == null) {
return false;
}
if (event !== null) {
event.preventDefault();
event.stopImmediatePropagation();
}
selectOptionAndCleanUp(options[selectedIndex]);
return true;
}, commandPriority));
}, [selectOptionAndCleanUp, close, editor, options, selectedIndex, updateSelectedIndex, commandPriority]);
const listItemProps = React.useMemo(() => ({
options,
selectOptionAndCleanUp,
selectedIndex,
setHighlightedIndex
}), [selectOptionAndCleanUp, selectedIndex, options]);
return menuRenderFn(anchorElementRef, listItemProps, resolution.match ? resolution.match.matchingString : '');
}
function setContainerDivAttributes(containerDiv, className) {
if (className != null) {
containerDiv.className = className;
}
containerDiv.setAttribute('aria-label', 'Typeahead menu');
containerDiv.setAttribute('role', 'listbox');
containerDiv.style.display = 'block';
containerDiv.style.position = 'absolute';
}
function useMenuAnchorRef(resolution, setResolution, className, parent = CAN_USE_DOM ? document.body : undefined, shouldIncludePageYOffset__EXPERIMENTAL = true) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
const initialAnchorElement = CAN_USE_DOM ? document.createElement('div') : null;
const anchorElementRef = React.useRef(initialAnchorElement);
const positionMenu = React.useCallback(() => {
if (anchorElementRef.current === null || parent === undefined) {
return;
}
anchorElementRef.current.style.top = anchorElementRef.current.style.bottom;
const rootElement = editor.getRootElement();
const containerDiv = anchorElementRef.current;
const menuEle = containerDiv.firstChild;
if (rootElement !== null && resolution !== null) {
const {
left,
top,
width,
height
} = resolution.getRect();
const anchorHeight = anchorElementRef.current.offsetHeight; // use to position under anchor
containerDiv.style.top = `${top + anchorHeight + 3 + (shouldIncludePageYOffset__EXPERIMENTAL ? window.pageYOffset : 0)}px`;
containerDiv.style.left = `${left + window.pageXOffset}px`;
containerDiv.style.height = `${height}px`;
containerDiv.style.width = `${width}px`;
if (menuEle !== null) {
menuEle.style.top = `${top}`;
const menuRect = menuEle.getBoundingClientRect();
const menuHeight = menuRect.height;
const menuWidth = menuRect.width;
const rootElementRect = rootElement.getBoundingClientRect();
if (left + menuWidth > rootElementRect.right) {
containerDiv.style.left = `${rootElementRect.right - menuWidth + window.pageXOffset}px`;
}
if ((top + menuHeight > window.innerHeight || top + menuHeight > rootElementRect.bottom) && top - rootElementRect.top > menuHeight + height) {
containerDiv.style.top = `${top - menuHeight - height + (shouldIncludePageYOffset__EXPERIMENTAL ? window.pageYOffset : 0)}px`;
}
}
if (!containerDiv.isConnected) {
setContainerDivAttributes(containerDiv, className);
parent.append(containerDiv);
}
containerDiv.setAttribute('id', 'typeahead-menu');
rootElement.setAttribute('aria-controls', 'typeahead-menu');
}
}, [editor, resolution, shouldIncludePageYOffset__EXPERIMENTAL, className, parent]);
React.useEffect(() => {
const rootElement = editor.getRootElement();
if (resolution !== null) {
positionMenu();
}
return () => {
if (rootElement !== null) {
rootElement.removeAttribute('aria-controls');
}
// eslint-disable-next-line react-hooks/exhaustive-deps
const containerDiv = anchorElementRef.current;
if (containerDiv !== null && containerDiv.isConnected) {
containerDiv.remove();
containerDiv.removeAttribute('id');
}
};
}, [editor, positionMenu, resolution]);
const onVisibilityChange = React.useCallback(isInView => {
if (resolution !== null) {
if (!isInView) {
setResolution(null);
}
}
}, [resolution, setResolution]);
useDynamicPositioning(resolution, anchorElementRef.current, positionMenu, onVisibilityChange);
// Append the context for the menu immediately
if (initialAnchorElement != null && initialAnchorElement === anchorElementRef.current) {
setContainerDivAttributes(initialAnchorElement, className);
if (parent != null) {
parent.append(initialAnchorElement);
}
}
return anchorElementRef;
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function LexicalNodeMenuPlugin({
options,
nodeKey,
onClose,
onOpen,
onSelectOption,
menuRenderFn,
anchorClassName,
commandPriority = lexical.COMMAND_PRIORITY_LOW,
parent
}) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
const [resolution, setResolution] = React.useState(null);
const anchorElementRef = useMenuAnchorRef(resolution, setResolution, anchorClassName, parent);
const closeNodeMenu = React.useCallback(() => {
setResolution(null);
if (onClose != null && resolution !== null) {
onClose();
}
}, [onClose, resolution]);
const openNodeMenu = React.useCallback(res => {
setResolution(res);
if (onOpen != null && resolution === null) {
onOpen(res);
}
}, [onOpen, resolution]);
const positionOrCloseMenu = React.useCallback(() => {
if (nodeKey) {
editor.update(() => {
const node = lexical.$getNodeByKey(nodeKey);
const domElement = editor.getElementByKey(nodeKey);
if (node != null && domElement != null) {
if (resolution == null) {
startTransition(() => openNodeMenu({
getRect: () => domElement.getBoundingClientRect()
}));
}
}
});
} else if (nodeKey == null && resolution != null) {
closeNodeMenu();
}
}, [closeNodeMenu, editor, nodeKey, openNodeMenu, resolution]);
React.useEffect(() => {
positionOrCloseMenu();
}, [positionOrCloseMenu, nodeKey]);
React.useEffect(() => {
if (nodeKey != null) {
return editor.registerUpdateListener(({
dirtyElements
}) => {
if (dirtyElements.get(nodeKey)) {
positionOrCloseMenu();
}
});
}
}, [editor, positionOrCloseMenu, nodeKey]);
return anchorElementRef.current === null || resolution === null || editor === null ? null : /*#__PURE__*/jsxRuntime.jsx(LexicalMenu, {
close: closeNodeMenu,
resolution: resolution,
editor: editor,
anchorElementRef: anchorElementRef,
options: options,
menuRenderFn: menuRenderFn,
onSelectOption: onSelectOption,
commandPriority: commandPriority
});
}
exports.LexicalNodeMenuPlugin = LexicalNodeMenuPlugin;
exports.MenuOption = MenuOption;
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel-core/expressions.ts"],"sourcesContent":["import type { GelColumn } from '~/gel-core/columns/index.ts';\nimport { bindIfParam } from '~/sql/expressions/index.ts';\nimport type { Placeholder, SQL, SQLChunk, SQLWrapper } from '~/sql/sql.ts';\nimport { sql } from '~/sql/sql.ts';\n\nexport * from '~/sql/expressions/index.ts';\n\nexport function concat(column: GelColumn | SQL.Aliased, value: string | Placeholder | SQLWrapper): SQL {\n\treturn sql`${column} || ${bindIfParam(value, column)}`;\n}\n\nexport function substring(\n\tcolumn: GelColumn | SQL.Aliased,\n\t{ from, for: _for }: { from?: number | Placeholder | SQLWrapper; for?: number | Placeholder | SQLWrapper },\n): SQL {\n\tconst chunks: SQLChunk[] = [sql`substring(`, column];\n\tif (from !== undefined) {\n\t\tchunks.push(sql` from `, bindIfParam(from, column));\n\t}\n\tif (_for !== undefined) {\n\t\tchunks.push(sql` for `, bindIfParam(_for, column));\n\t}\n\tchunks.push(sql`)`);\n\treturn sql.join(chunks);\n}\n"],"mappings":"AACA,SAAS,mBAAmB;AAE5B,SAAS,WAAW;AAEpB,cAAc;AAEP,SAAS,OAAO,QAAiC,OAA+C;AACtG,SAAO,MAAM,MAAM,OAAO,YAAY,OAAO,MAAM,CAAC;AACrD;AAEO,SAAS,UACf,QACA,EAAE,MAAM,KAAK,KAAK,GACZ;AACN,QAAM,SAAqB,CAAC,iBAAiB,MAAM;AACnD,MAAI,SAAS,QAAW;AACvB,WAAO,KAAK,aAAa,YAAY,MAAM,MAAM,CAAC;AAAA,EACnD;AACA,MAAI,SAAS,QAAW;AACvB,WAAO,KAAK,YAAY,YAAY,MAAM,MAAM,CAAC;AAAA,EAClD;AACA,SAAO,KAAK,MAAM;AAClB,SAAO,IAAI,KAAK,MAAM;AACvB;","names":[]}
@@ -0,0 +1,61 @@
# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
It's usually `PATH`, but on Windows it can be any casing like `Path`...
## Install
```
$ npm install path-key
```
## Usage
```js
const pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
## API
### pathKey(options?)
#### options
Type: `object`
##### env
Type: `object`<br>
Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
Use a custom environment variables object.
#### platform
Type: `string`<br>
Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
Get the PATH key for a specific platform.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-path-key?utm_source=npm-path-key&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1 @@
{"version":3,"file":"getExistingAuthToken.js","names":["cookies","getCookies","getExistingAuthToken","cookiePrefix","getAll","find","cookie","name","startsWith"],"sources":["../../src/utilities/getExistingAuthToken.ts"],"sourcesContent":["import { cookies as getCookies } from 'next/headers.js'\n\ntype Cookie = {\n name: string\n value: string\n}\nexport async function getExistingAuthToken(cookiePrefix: string): Promise<Cookie | undefined> {\n const cookies = await getCookies()\n return cookies.getAll().find((cookie) => cookie.name.startsWith(cookiePrefix))\n}\n"],"mappings":"AAAA,SAASA,OAAA,IAAWC,UAAU,QAAQ;AAMtC,OAAO,eAAeC,qBAAqBC,YAAoB;EAC7D,MAAMH,OAAA,GAAU,MAAMC,UAAA;EACtB,OAAOD,OAAA,CAAQI,MAAM,GAAGC,IAAI,CAAEC,MAAA,IAAWA,MAAA,CAAOC,IAAI,CAACC,UAAU,CAACL,YAAA;AAClE","ignoreList":[]}
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { getMilliseconds as fn } from "../getMilliseconds.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const getMilliseconds = convertToFP(fn, 1);
// Fallback for modularized imports:
export default getMilliseconds;
@@ -0,0 +1,8 @@
import { LoggerProvider } from './types/LoggerProvider';
import { Logger } from './types/Logger';
import { LoggerOptions } from './types/LoggerOptions';
export declare class NoopLoggerProvider implements LoggerProvider {
getLogger(_name: string, _version?: string | undefined, _options?: LoggerOptions | undefined): Logger;
}
export declare const NOOP_LOGGER_PROVIDER: NoopLoggerProvider;
//# sourceMappingURL=NoopLoggerProvider.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["formatAdminURL","React","Logo","ToastAndRedirect","verifyBaseClass","Verify","initPageResult","params","searchParams","collectionSlug","verify","token","segments","locale","permissions","req","i18n","payload","config","user","routes","admin","adminRoute","serverURL","textToRender","isVerified","verifyEmail","collection","t","e","_jsx","message","redirectTo","path","_jsxs","Fragment","className"],"sources":["../../../src/views/Verify/index.tsx"],"sourcesContent":["import type { AdminViewServerProps } from 'payload'\n\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport { Logo } from '../../elements/Logo/index.js'\nimport { ToastAndRedirect } from './index.client.js'\nimport './index.scss'\n\nexport const verifyBaseClass = 'verify'\n\nexport async function Verify({ initPageResult, params, searchParams }: AdminViewServerProps) {\n // /:collectionSlug/verify/:token\n\n const [collectionSlug, verify, token] = params.segments\n const { locale, permissions, req } = initPageResult\n\n const {\n i18n,\n payload: { config },\n payload,\n user,\n } = req\n\n const {\n routes: { admin: adminRoute },\n serverURL,\n } = config\n\n let textToRender\n let isVerified = false\n\n try {\n await req.payload.verifyEmail({\n collection: collectionSlug,\n token,\n })\n\n isVerified = true\n textToRender = req.t('authentication:emailVerified')\n } catch (e) {\n textToRender = req.t('authentication:unableToVerify')\n }\n\n if (isVerified) {\n return (\n <ToastAndRedirect\n message={req.t('authentication:emailVerified')}\n redirectTo={formatAdminURL({ adminRoute, path: '/login' })}\n />\n )\n }\n\n return (\n <React.Fragment>\n <div className={`${verifyBaseClass}__brand`}>\n <Logo\n i18n={i18n}\n locale={locale}\n params={params}\n payload={payload}\n permissions={permissions}\n searchParams={searchParams}\n user={user}\n />\n </div>\n <h2>{textToRender}</h2>\n </React.Fragment>\n )\n}\n"],"mappings":";AAEA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,IAAI,QAAQ;AACrB,SAASC,gBAAgB,QAAQ;AAGjC,OAAO,MAAMC,eAAA,GAAkB;AAE/B,OAAO,eAAeC,OAAO;EAAEC,cAAc;EAAEC,MAAM;EAAEC;AAAY,CAAwB;EACzF;EAEA,MAAM,CAACC,cAAA,EAAgBC,MAAA,EAAQC,KAAA,CAAM,GAAGJ,MAAA,CAAOK,QAAQ;EACvD,MAAM;IAAEC,MAAM;IAAEC,WAAW;IAAEC;EAAG,CAAE,GAAGT,cAAA;EAErC,MAAM;IACJU,IAAI;IACJC,OAAA,EAAS;MAAEC;IAAM,CAAE;IACnBD,OAAO;IACPE;EAAI,CACL,GAAGJ,GAAA;EAEJ,MAAM;IACJK,MAAA,EAAQ;MAAEC,KAAA,EAAOC;IAAU,CAAE;IAC7BC;EAAS,CACV,GAAGL,MAAA;EAEJ,IAAIM,YAAA;EACJ,IAAIC,UAAA,GAAa;EAEjB,IAAI;IACF,MAAMV,GAAA,CAAIE,OAAO,CAACS,WAAW,CAAC;MAC5BC,UAAA,EAAYlB,cAAA;MACZE;IACF;IAEAc,UAAA,GAAa;IACbD,YAAA,GAAeT,GAAA,CAAIa,CAAC,CAAC;EACvB,EAAE,OAAOC,CAAA,EAAG;IACVL,YAAA,GAAeT,GAAA,CAAIa,CAAC,CAAC;EACvB;EAEA,IAAIH,UAAA,EAAY;IACd,oBACEK,IAAA,CAAC3B,gBAAA;MACC4B,OAAA,EAAShB,GAAA,CAAIa,CAAC,CAAC;MACfI,UAAA,EAAYhC,cAAA,CAAe;QAAEsB,UAAA;QAAYW,IAAA,EAAM;MAAS;;EAG9D;EAEA,oBACEC,KAAA,CAACjC,KAAA,CAAMkC,QAAQ;4BACbL,IAAA,CAAC;MAAIM,SAAA,EAAW,GAAGhC,eAAA,SAAwB;gBACzC,aAAA0B,IAAA,CAAC5B,IAAA;QACCc,IAAA,EAAMA,IAAA;QACNH,MAAA,EAAQA,MAAA;QACRN,MAAA,EAAQA,MAAA;QACRU,OAAA,EAASA,OAAA;QACTH,WAAA,EAAaA,WAAA;QACbN,YAAA,EAAcA,YAAA;QACdW,IAAA,EAAMA;;qBAGVW,IAAA,CAAC;gBAAIN;;;AAGX","ignoreList":[]}
@@ -0,0 +1,7 @@
import './index.scss';
export declare const DocumentDrawerHeader: React.FC<{
AfterHeader?: React.ReactNode;
drawerSlug: string;
showDocumentID?: boolean;
}>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const create = require("./wasm-hash");
// #region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
const xxhash64 = new WebAssembly.Module(
Buffer.from(
// 1160 bytes
"AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACqgIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAFBIGoiASAASQ0ACyACJAAgAyQBIAQkAiAFJAMLngYCAn8CfiMEQgBSBH4jAEIBiSMBQgeJfCMCQgyJfCMDQhKJfCMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IwFCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0jAkLP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSMDQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9BULFz9my8eW66icLIwQgAK18fCEDA0AgAUEIaiICIABNBEAgAyABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQMgAiEBDAELCyABQQRqIgIgAE0EQCADIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCEDIAIhAQsDQCAAIAFHBEAgAyABMQAAQsXP2bLx5brqJ36FQguJQoeVr6+Ytt6bnn9+IQMgAUEBaiEBDAELC0EAIAMgA0IhiIVCz9bTvtLHq9lCfiIDQh2IIAOFQvnz3fGZ9pmrFn4iA0IgiCADhSIDQiCIIgRC//8Dg0IghiAEQoCA/P8Pg0IQiIQiBEL/gYCA8B+DQhCGIARCgP6DgIDgP4NCCIiEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIANC/////w+DIgNC//8Dg0IghiADQoCA/P8Pg0IQiIQiA0L/gYCA8B+DQhCGIANCgP6DgIDgP4NCCIiEIgNCj4C8gPCBwAeDQgiGIANC8IHAh4CegPgAg0IEiIQiA0KGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gA0Kw4MCBg4aMmDCEfDcDAAs=",
"base64"
)
);
// #endregion
module.exports = create.bind(null, xxhash64, [], 32, 16);
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/op-sqlite/driver.ts"],"sourcesContent":["import type { OPSQLiteConnection, QueryResult } from '@op-engineering/op-sqlite';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { OPSQLiteSession } from './session.ts';\n\nexport class OPSQLiteDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> extends BaseSQLiteDatabase<'async', QueryResult, TSchema> {\n\tstatic override readonly [entityKind]: string = 'OPSQLiteDatabase';\n}\n\nexport function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(\n\tclient: OPSQLiteConnection,\n\tconfig: DrizzleConfig<TSchema> = {},\n): OPSQLiteDatabase<TSchema> & {\n\t$client: OPSQLiteConnection;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new OPSQLiteSession(client, dialect, schema, { logger, cache: config.cache });\n\tconst db = new OPSQLiteDatabase('async', dialect, session, schema) as OPSQLiteDatabase<TSchema>;\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,OAGM;AACP,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AAEnC,SAAS,uBAAuB;AAEzB,MAAM,yBAEH,mBAAkD;AAAA,EAC3D,QAA0B,UAAU,IAAY;AACjD;AAEO,SAAS,QACf,QACA,SAAiC,CAAC,GAGjC;AACD,QAAM,UAAU,IAAI,mBAAmB,EAAE,QAAQ,OAAO,OAAO,CAAC;AAChE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,eAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,gBAAgB,QAAQ,SAAS,QAAQ,EAAE,QAAQ,OAAO,OAAO,MAAM,CAAC;AAC5F,QAAM,KAAK,IAAI,iBAAiB,SAAS,SAAS,SAAS,MAAM;AACjE,EAAO,GAAI,UAAU;AACrB,EAAO,GAAI,SAAS,OAAO;AAC3B,MAAW,GAAI,QAAQ;AACtB,IAAO,GAAI,OAAO,YAAY,IAAI,OAAO,OAAO;AAAA,EACjD;AAEA,SAAO;AACR;","names":[]}
@@ -0,0 +1,10 @@
"use strict";
exports.getISODay = void 0;
var _index = require("../getISODay.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const getISODay = (exports.getISODay = (0, _index2.convertToFP)(
_index.getISODay,
1,
));
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('cloneWith', require('../cloneWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/content.ts"],"names":[],"mappings":";;;AAOa,QAAA,OAAO,GAAqC;IACrD,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,MAAM;IACpB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,EAAE,CAAC;SACb;QAED,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAExB,IAAI,KAAK,CAAC,IAAI,yBAA0B,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM,EAAE;YAChE,OAAO,EAAE,CAAC;SACb;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC"}
@@ -0,0 +1,27 @@
"use strict";
exports.hi = void 0;
var _index = require("./hi/_lib/formatDistance.js");
var _index2 = require("./hi/_lib/formatLong.js");
var _index3 = require("./hi/_lib/formatRelative.js");
var _index4 = require("./hi/_lib/localize.js");
var _index5 = require("./hi/_lib/match.js");
/**
* @category Locales
* @summary Hindi locale (India).
* @language Hindi
* @iso-639-2 hin
* @author Mukesh Mandiwal [@mukeshmandiwal](https://github.com/mukeshmandiwal)
*/
const hi = (exports.hi = {
code: "hi",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Monday */,
firstWeekContainsDate: 4,
},
});
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { startOfISOWeekYear as fn } from "../startOfISOWeekYear.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const startOfISOWeekYear = convertToFP(fn, 1);
// Fallback for modularized imports:
export default startOfISOWeekYear;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A zC","2052":"B"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","132":"0C VC J bB K D E F A B C 4C 5C","260":"9 L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB"},D:{"1":"0 1 2 3 4 5 6 7 8 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","260":"9 J bB K D E F A B C L M G N O P cB","772":"AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB","1028":"oB pB qB rB sB tB uB vB"},E:{"1":"B C L M G PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","260":"J bB A 6C bC cC","772":"K D E F 7C 8C 9C AD"},F:{"1":"0 1 2 3 4 5 6 7 8 jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 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":"F JD","132":"B KD LD MD PC xC","644":"C ND QC","772":"9 G N O P cB AB BB CB DB EB FB GB","1028":"HB IB dB eB fB gB hB iB"},G:{"1":"XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","260":"bC OD yC VD WD","772":"E PD QD RD SD TD UD"},H:{"644":"mD"},I:{"1":"I","16":"nD oD","260":"pD","772":"VC J qD yC rD sD"},J:{"772":"D A"},K:{"1":"H","132":"A B PC xC","644":"C QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"B","2":"A"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","1028":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"const",D:true};
@@ -0,0 +1,18 @@
import util from './dist/util.js'
export const findPair = util.findPair
export const toJSON = util.toJSON
export const parseMap = util.parseMap
export const parseSeq = util.parseSeq
export const stringifyNumber = util.stringifyNumber
export const stringifyString = util.stringifyString
export const Type = util.Type
export const YAMLError = util.YAMLError
export const YAMLReferenceError = util.YAMLReferenceError
export const YAMLSemanticError = util.YAMLSemanticError
export const YAMLSyntaxError = util.YAMLSyntaxError
export const YAMLWarning = util.YAMLWarning
@@ -0,0 +1,20 @@
import { buildFolderField } from './buildFolderField.js';
export const addFolderFieldToCollection = ({ collection, collectionSpecific, folderFieldName, folderSlug })=>{
collection.fields.push(buildFolderField({
collectionSpecific,
folderFieldName,
folderSlug,
overrides: {
admin: {
allowCreate: false,
allowEdit: false,
components: {
Cell: '@payloadcms/next/rsc#FolderTableCell',
Field: '@payloadcms/next/rsc#FolderField'
}
}
}
}));
};
//# sourceMappingURL=addFolderFieldToCollection.js.map
@@ -0,0 +1,46 @@
import * as core from "../core/index.cjs";
import type { ZodType } from "./schemas.cjs";
export type {
/** @deprecated Use `z.output<T>` instead. */
output as TypeOf,
/** @deprecated Use `z.output<T>` instead. */
output as Infer,
/** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
$ZodTypes as ZodFirstPartySchemaTypes, } from "../core/index.cjs";
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export declare const ZodIssueCode: {
readonly invalid_type: "invalid_type";
readonly too_big: "too_big";
readonly too_small: "too_small";
readonly invalid_format: "invalid_format";
readonly not_multiple_of: "not_multiple_of";
readonly unrecognized_keys: "unrecognized_keys";
readonly invalid_union: "invalid_union";
readonly invalid_key: "invalid_key";
readonly invalid_element: "invalid_element";
readonly invalid_value: "invalid_value";
readonly custom: "custom";
};
/** @deprecated Use `z.$ZodFlattenedError` */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.$ZodFormattedError` */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
};
};
export { $brand, config } from "../core/index.cjs";
/** @deprecated Use `z.config(params)` instead. */
export declare function setErrorMap(map: core.$ZodErrorMap): void;
/** @deprecated Use `z.config()` instead. */
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
export type {
/** @deprecated Use z.ZodType (without generics) instead. */
ZodType as ZodTypeAny,
/** @deprecated Use `z.ZodType` */
ZodType as ZodSchema,
/** @deprecated Use `z.ZodType` */
ZodType as Schema, };
export type ZodRawShape = core.$ZodShape;
@@ -0,0 +1,30 @@
/**
* @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 HandHeart = createLucideIcon("HandHeart", [
["path", { d: "M11 14h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16", key: "1ifwr1" }],
[
"path",
{
d: "m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",
key: "17abbs"
}
],
["path", { d: "m2 15 6 6", key: "10dquu" }],
[
"path",
{
d: "M19.5 8.5c.7-.7 1.5-1.6 1.5-2.7A2.73 2.73 0 0 0 16 4a2.78 2.78 0 0 0-5 1.8c0 1.2.8 2 1.5 2.8L16 12Z",
key: "1h3036"
}
]
]);
export { HandHeart as default };
//# sourceMappingURL=hand-heart.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB,KAAK,0BAA0B,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;AAEvE,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CACxC,CAAA;AAED,KAAK,wBAAwB,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAExD,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC,0BAA0B,CAAC,GAC5E,wBAAwB,CAAA;AAE1B,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,eAAe,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAA;AAExD,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CACzD,SAAS,EACT,0BAA0B,EAC1B,wBAAwB,CACzB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CACzD,0BAA0B,EAC1B,wBAAwB,CACzB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CACnE,SAAS,EACT,0BAA0B,CAC3B,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,0BAA0B,CAAC,CAAA;AAEjG,MAAM,MAAM,mCAAmC,GAAG,+BAA+B,CAC/E,SAAS,EACT,0BAA0B,CAC3B,CAAA;AAED,MAAM,MAAM,mCAAmC,GAC7C,+BAA+B,CAAC,0BAA0B,CAAC,CAAA;AAE7D,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CACnE,SAAS,EACT,0BAA0B,CAC3B,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,0BAA0B,CAAC,CAAA;AAEjG,MAAM,MAAM,4BAA4B,GAAG,wBAAwB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;AAE/F,MAAM,MAAM,4BAA4B,GAAG,wBAAwB,CAAC,eAAe,CAAC,CAAA"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D zC","129":"E"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C 4C 5C","2":"0C VC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R 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"},E:{"1":"J bB K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"6C bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z LD MD PC xC ND QC","2":"F JD KD"},G:{"1":"E OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC"},H:{"1":"mD"},I:{"1":"VC J I nD oD pD qD yC rD sD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"JSON parsing",D:true};
@@ -0,0 +1,28 @@
var createCtor = require('./_createCtor'),
root = require('./_root');
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1;
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
module.exports = createBind;
@@ -0,0 +1,37 @@
var copyObject = require('./_copyObject'),
createAssigner = require('./_createAssigner'),
keys = require('./keys');
/**
* This method is like `_.assign` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignInWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
module.exports = assignWith;
@@ -0,0 +1,561 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/ar-SA/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u062A\u064A\u0646",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0648\u0627\u0646\u064A",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0627\u0646\u064A\u0629"
},
xSeconds: {
one: "\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u062B\u0627\u0646\u062A\u064A\u0646",
threeToTen: "{{count}} \u062B\u0648\u0627\u0646\u064A",
other: "{{count}} \u062B\u0627\u0646\u064A\u0629"
},
halfAMinute: "\u0646\u0635\u0641 \u062F\u0642\u064A\u0642\u0629",
lessThanXMinutes: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u0627\u0626\u0642",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u064A\u0642\u0629"
},
xMinutes: {
one: "\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "{{count}} \u062F\u0642\u0627\u0626\u0642",
other: "{{count}} \u062F\u0642\u064A\u0642\u0629"
},
aboutXHours: {
one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0633\u0627\u0639\u062A\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0633\u0627\u0639\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xHours: {
one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u0633\u0627\u0639\u062A\u064A\u0646",
threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A",
other: "{{count}} \u0633\u0627\u0639\u0629"
},
xDays: {
one: "\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",
two: "\u064A\u0648\u0645\u064A\u0646",
threeToTen: "{{count}} \u0623\u064A\u0627\u0645",
other: "{{count}} \u064A\u0648\u0645"
},
aboutXWeeks: {
one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0623\u0633\u0628\u0648\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xWeeks: {
one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F",
two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646",
threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639",
other: "{{count}} \u0623\u0633\u0628\u0648\u0639"
},
aboutXMonths: {
one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0634\u0647\u0631\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xMonths: {
one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",
two: "\u0634\u0647\u0631\u064A\u0646",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631",
other: "{{count}} \u0634\u0647\u0631"
},
aboutXYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",
two: "\u0639\u0627\u0645\u064A\u0646",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645",
other: "{{count}} \u0639\u0627\u0645"
},
overXYears: {
one: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645",
two: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645\u064A\u0646",
threeToTen: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0623\u0639\u0648\u0627\u0645",
other: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0639\u0627\u0645"
},
almostXYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2) {
result = tokenValue.two;
} else if (count <= 10) {
result = tokenValue.threeToTen.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0641\u064A \u062E\u0644\u0627\u0644 " + result;
} else {
return "\u0645\u0646\u0630 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/ar-SA/_lib/formatLong.js
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} '\u0639\u0646\u062F' {{time}}",
long: "{{date}} '\u0639\u0646\u062F' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/ar-SA/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\u0623\u062E\u0631' eeee '\u0639\u0646\u062F' p",
yesterday: "'\u0623\u0645\u0633 \u0639\u0646\u062F' p",
today: "'\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F' p",
tomorrow: "'\u063A\u062F\u0627\u064B \u0639\u0646\u062F' p",
nextWeek: "eeee '\u0639\u0646\u062F' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/ar-SA/_lib/localize.js
var eraValues = {
narrow: ["\u0642", "\u0628"],
abbreviated: ["\u0642.\u0645.", "\u0628.\u0645."],
wide: ["\u0642\u0628\u0644 \u0627\u0644\u0645\u064A\u0644\u0627\u062F", "\u0628\u0639\u062F \u0627\u0644\u0645\u064A\u0644\u0627\u062F"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u06311", "\u06312", "\u06313", "\u06314"],
wide: ["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0646\u064A", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0644\u062B", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"]
};
var monthValues = {
narrow: ["\u064A", "\u0641", "\u0645", "\u0623", "\u0645", "\u064A", "\u064A", "\u0623", "\u0633", "\u0623", "\u0646", "\u062F"],
abbreviated: [
"\u064A\u0646\u0627",
"\u0641\u0628\u0631",
"\u0645\u0627\u0631\u0633",
"\u0623\u0628\u0631\u064A\u0644",
"\u0645\u0627\u064A\u0648",
"\u064A\u0648\u0646\u0640",
"\u064A\u0648\u0644\u0640",
"\u0623\u063A\u0633\u0640",
"\u0633\u0628\u062A\u0640",
"\u0623\u0643\u062A\u0640",
"\u0646\u0648\u0641\u0640",
"\u062F\u064A\u0633\u0640"],
wide: [
"\u064A\u0646\u0627\u064A\u0631",
"\u0641\u0628\u0631\u0627\u064A\u0631",
"\u0645\u0627\u0631\u0633",
"\u0623\u0628\u0631\u064A\u0644",
"\u0645\u0627\u064A\u0648",
"\u064A\u0648\u0646\u064A\u0648",
"\u064A\u0648\u0644\u064A\u0648",
"\u0623\u063A\u0633\u0637\u0633",
"\u0633\u0628\u062A\u0645\u0628\u0631",
"\u0623\u0643\u062A\u0648\u0628\u0631",
"\u0646\u0648\u0641\u0645\u0628\u0631",
"\u062F\u064A\u0633\u0645\u0628\u0631"]
};
var dayValues = {
narrow: ["\u062D", "\u0646", "\u062B", "\u0631", "\u062E", "\u062C", "\u0633"],
short: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u064A\u0646", "\u062B\u0644\u0627\u062B\u0627\u0621", "\u0623\u0631\u0628\u0639\u0627\u0621", "\u062E\u0645\u064A\u0633", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
abbreviated: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u0640", "\u062B\u0644\u0627", "\u0623\u0631\u0628\u0640", "\u062E\u0645\u064A\u0640", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
wide: [
"\u0627\u0644\u0623\u062D\u062F",
"\u0627\u0644\u0627\u062B\u0646\u064A\u0646",
"\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621",
"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
"\u0627\u0644\u062E\u0645\u064A\u0633",
"\u0627\u0644\u062C\u0645\u0639\u0629",
"\u0627\u0644\u0633\u0628\u062A"]
};
var dayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646",
noon: "\u0638",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
},
abbreviated: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
},
wide: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646",
noon: "\u0638",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
},
abbreviated: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
},
wide: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
return String(dirtyNumber);
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/ar-SA/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(ق|ب)/i,
abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\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],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ar-SA.js
var arSA = {
code: "ar-SA",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/ar-SA/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), {}, {
arSA: arSA }) });
//# debugId=24E495340A38FD6564756E2164756E21
//# sourceMappingURL=cdn.js.map
})();
@@ -0,0 +1,4 @@
import { createContext, use } from 'react';
export const TableColumnContext = createContext({});
export const useTableColumns = () => use(TableColumnContext);
//# sourceMappingURL=context.js.map
@@ -0,0 +1,25 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Takes the SDK metadata and adds the user-agent header to the transport options.
* This ensures that the SDK sends the user-agent header with SDK name and version to
* all requests made by the transport.
*
* @see https://develop.sentry.dev/sdk/overview/#user-agent
*/
function addUserAgentToTransportHeaders(options) {
const sdkMetadata = options._metadata?.sdk;
const sdkUserAgent =
sdkMetadata?.name && sdkMetadata?.version ? `${sdkMetadata?.name}/${sdkMetadata?.version}` : undefined;
options.transportOptions = {
...options.transportOptions,
headers: {
...(sdkUserAgent && { 'user-agent': sdkUserAgent }),
...options.transportOptions?.headers,
},
};
}
exports.addUserAgentToTransportHeaders = addUserAgentToTransportHeaders;
//# sourceMappingURL=userAgent.js.map

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