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

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/validateTimezones.ts"],"sourcesContent":["import type { Timezone } from '../config/types.js'\n\nimport { InvalidConfiguration } from '../errors/index.js'\n\ntype ValidateTimezonesArgs = {\n /**\n * The source of the timezones for error messaging\n */\n source?: string\n /**\n * Array of timezones to validate\n */\n timezones: Timezone[] | undefined\n}\n\n/**\n * Validates a UTC offset string.\n * Only supports the ±HH:mm format (e.g., +05:30, -08:00).\n *\n * Valid ranges: hours -12 to +14, minutes 0-59\n *\n * @returns true if the offset is valid\n */\nconst isValidUtcOffset = (value: string): boolean => {\n // Strict format check: only ±HH:mm\n const match = value.match(/^([+-])(\\d{2}):(\\d{2})$/)\n if (!match) {\n return false\n }\n\n const sign = match[1] === '+' ? 1 : -1\n const hours = parseInt(match[2]!, 10)\n const minutes = parseInt(match[3]!, 10)\n\n // Minutes must be 0-59\n if (minutes > 59) {\n return false\n }\n\n // Valid range: -12:00 (-720 min) to +14:00 (+840 min)\n const totalMinutes = sign * (hours * 60 + minutes)\n return totalMinutes >= -720 && totalMinutes <= 840\n}\n\n/**\n * Checks if a timezone is supported by the current runtime.\n * Supports both IANA timezone names and UTC offset formats.\n *\n * For IANA names: Uses Intl.DateTimeFormat and Intl.supportedValuesOf\n * For UTC offsets: Uses native Date API to validate (±HH:mm format only)\n */\nconst isTimezoneSupported = (timezoneValue: string): boolean => {\n // UTC is always supported\n if (timezoneValue === 'UTC') {\n return true\n }\n\n // Check if it's a UTC offset format (starts with + or -)\n if (timezoneValue.startsWith('+') || timezoneValue.startsWith('-')) {\n return isValidUtcOffset(timezoneValue)\n }\n\n // For IANA timezone names, use Intl.DateTimeFormat as primary check\n try {\n new Intl.DateTimeFormat('en-US', { timeZone: timezoneValue })\n return true\n } catch {\n // DateTimeFormat failed, timezone is not supported\n }\n\n // Secondary check: verify against supportedValuesOf if available\n if (typeof Intl.supportedValuesOf === 'function') {\n const supportedTimezones = Intl.supportedValuesOf('timeZone')\n if (supportedTimezones.includes(timezoneValue)) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Validates that all provided timezones are supported by the current runtime's Intl API.\n * Uses both Intl.DateTimeFormat and Intl.supportedValuesOf for comprehensive validation.\n *\n * @throws InvalidConfiguration if an unsupported timezone is found\n */\nexport const validateTimezones = ({ source, timezones }: ValidateTimezonesArgs): void => {\n if (!timezones?.length) {\n return\n }\n\n for (const timezone of timezones) {\n if (!isTimezoneSupported(timezone.value)) {\n const sourceText = source ? ` in ${source}` : ''\n throw new InvalidConfiguration(\n `Timezone ${timezone.value}${sourceText} is not supported by the current runtime via the Intl API.`,\n )\n }\n }\n}\n"],"names":["InvalidConfiguration","isValidUtcOffset","value","match","sign","hours","parseInt","minutes","totalMinutes","isTimezoneSupported","timezoneValue","startsWith","Intl","DateTimeFormat","timeZone","supportedValuesOf","supportedTimezones","includes","validateTimezones","source","timezones","length","timezone","sourceText"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,qBAAoB;AAazD;;;;;;;CAOC,GACD,MAAMC,mBAAmB,CAACC;IACxB,mCAAmC;IACnC,MAAMC,QAAQD,MAAMC,KAAK,CAAC;IAC1B,IAAI,CAACA,OAAO;QACV,OAAO;IACT;IAEA,MAAMC,OAAOD,KAAK,CAAC,EAAE,KAAK,MAAM,IAAI,CAAC;IACrC,MAAME,QAAQC,SAASH,KAAK,CAAC,EAAE,EAAG;IAClC,MAAMI,UAAUD,SAASH,KAAK,CAAC,EAAE,EAAG;IAEpC,uBAAuB;IACvB,IAAII,UAAU,IAAI;QAChB,OAAO;IACT;IAEA,sDAAsD;IACtD,MAAMC,eAAeJ,OAAQC,CAAAA,QAAQ,KAAKE,OAAM;IAChD,OAAOC,gBAAgB,CAAC,OAAOA,gBAAgB;AACjD;AAEA;;;;;;CAMC,GACD,MAAMC,sBAAsB,CAACC;IAC3B,0BAA0B;IAC1B,IAAIA,kBAAkB,OAAO;QAC3B,OAAO;IACT;IAEA,yDAAyD;IACzD,IAAIA,cAAcC,UAAU,CAAC,QAAQD,cAAcC,UAAU,CAAC,MAAM;QAClE,OAAOV,iBAAiBS;IAC1B;IAEA,oEAAoE;IACpE,IAAI;QACF,IAAIE,KAAKC,cAAc,CAAC,SAAS;YAAEC,UAAUJ;QAAc;QAC3D,OAAO;IACT,EAAE,OAAM;IACN,mDAAmD;IACrD;IAEA,iEAAiE;IACjE,IAAI,OAAOE,KAAKG,iBAAiB,KAAK,YAAY;QAChD,MAAMC,qBAAqBJ,KAAKG,iBAAiB,CAAC;QAClD,IAAIC,mBAAmBC,QAAQ,CAACP,gBAAgB;YAC9C,OAAO;QACT;IACF;IAEA,OAAO;AACT;AAEA;;;;;CAKC,GACD,OAAO,MAAMQ,oBAAoB,CAAC,EAAEC,MAAM,EAAEC,SAAS,EAAyB;IAC5E,IAAI,CAACA,WAAWC,QAAQ;QACtB;IACF;IAEA,KAAK,MAAMC,YAAYF,UAAW;QAChC,IAAI,CAACX,oBAAoBa,SAASpB,KAAK,GAAG;YACxC,MAAMqB,aAAaJ,SAAS,CAAC,IAAI,EAAEA,QAAQ,GAAG;YAC9C,MAAM,IAAInB,qBACR,CAAC,SAAS,EAAEsB,SAASpB,KAAK,GAAGqB,WAAW,0DAA0D,CAAC;QAEvG;IACF;AACF,EAAC"}

View File

@@ -0,0 +1,7 @@
export declare const differenceInCalendarYearsWithOptions: import("./types.js").FPFn3<
number,
| import("../differenceInCalendarYears.js").DifferenceInCalendarYearsOptions
| undefined,
string | number | Date,
string | number | Date
>;

View File

@@ -0,0 +1,8 @@
"use strict";
function _object_destructuring_empty(o) {
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
return o;
}
exports._ = _object_destructuring_empty;

View File

@@ -0,0 +1,62 @@
import { isSameWeek } from "../../../isSameWeek.mjs";
const accusativeWeekdays = [
"жексенбіде",
"дүйсенбіде",
"сейсенбіде",
"сәрсенбіде",
"бейсенбіде",
"жұмада",
"сенбіде",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
return "'өткен " + weekday + " сағат' p'-де'";
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'" + weekday + " сағат' p'-де'";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
return "'келесі " + weekday + " сағат' p'-де'";
}
const formatRelativeLocale = {
lastWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
},
yesterday: "'кеше сағат' p'-де'",
today: "'бүгін сағат' p'-де'",
tomorrow: "'ертең сағат' p'-де'",
nextWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
},
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"ProxyTracerProvider.js","sourceRoot":"","sources":["../../../src/trace/ProxyTracerProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,oBAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAmB;IAG9B;;OAEG;IACH,SAAS,CAAC,IAAY,EAAE,OAAgB,EAAE,OAAuB;;QAC/D,OAAO,CACL,MAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,mCAC9C,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAC9C,CAAC;IACJ,CAAC;IAED,WAAW;;QACT,OAAO,MAAA,IAAI,CAAC,SAAS,mCAAI,oBAAoB,CAAC;IAChD,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,QAAwB;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAED,iBAAiB,CACf,IAAY,EACZ,OAAgB,EAChB,OAAuB;;QAEvB,OAAO,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Tracer } from './tracer';\nimport { TracerProvider } from './tracer_provider';\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nimport { TracerOptions } from './tracer_options';\n\nconst NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nexport class ProxyTracerProvider implements TracerProvider {\n private _delegate?: TracerProvider;\n\n /**\n * Get a {@link ProxyTracer}\n */\n getTracer(name: string, version?: string, options?: TracerOptions): Tracer {\n return (\n this.getDelegateTracer(name, version, options) ??\n new ProxyTracer(this, name, version, options)\n );\n }\n\n getDelegate(): TracerProvider {\n return this._delegate ?? NOOP_TRACER_PROVIDER;\n }\n\n /**\n * Set the delegate tracer provider\n */\n setDelegate(delegate: TracerProvider) {\n this._delegate = delegate;\n }\n\n getDelegateTracer(\n name: string,\n version?: string,\n options?: TracerOptions\n ): Tracer | undefined {\n return this._delegate?.getTracer(name, version, options);\n }\n}\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../src/Explorer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAEhF,cAAM,QAAS,SAAQ,YAAY,CAAC,eAAe,CAAC;gBAC/B,OAAO,EAAE,eAAe;IAI9B,MAAM,CACjB,UAAU,GAAE,MAAsB,GACjC,OAAO,CAAC,iBAAiB,CAAC;YAOf,mBAAmB;YAuBnB,eAAe;YAaf,eAAe;YAYf,eAAe;YAef,uBAAuB;IAUxB,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAyBhE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"findValueFromPath.d.ts","sourceRoot":"","sources":["../../../../src/providers/TableColumns/buildColumnState/findValueFromPath.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,MAAM,KAAG,GAE1E,CAAA"}

View File

@@ -0,0 +1,63 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as modDev from './LexicalTable.dev.mjs';
import * as modProd from './LexicalTable.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const $computeTableMap = mod.$computeTableMap;
export const $computeTableMapSkipCellCheck = mod.$computeTableMapSkipCellCheck;
export const $createTableCellNode = mod.$createTableCellNode;
export const $createTableNode = mod.$createTableNode;
export const $createTableNodeWithDimensions = mod.$createTableNodeWithDimensions;
export const $createTableRowNode = mod.$createTableRowNode;
export const $createTableSelection = mod.$createTableSelection;
export const $createTableSelectionFrom = mod.$createTableSelectionFrom;
export const $deleteTableColumn = mod.$deleteTableColumn;
export const $deleteTableColumnAtSelection = mod.$deleteTableColumnAtSelection;
export const $deleteTableColumn__EXPERIMENTAL = mod.$deleteTableColumn__EXPERIMENTAL;
export const $deleteTableRowAtSelection = mod.$deleteTableRowAtSelection;
export const $deleteTableRow__EXPERIMENTAL = mod.$deleteTableRow__EXPERIMENTAL;
export const $findCellNode = mod.$findCellNode;
export const $findTableNode = mod.$findTableNode;
export const $getElementForTableNode = mod.$getElementForTableNode;
export const $getNodeTriplet = mod.$getNodeTriplet;
export const $getTableAndElementByKey = mod.$getTableAndElementByKey;
export const $getTableCellNodeFromLexicalNode = mod.$getTableCellNodeFromLexicalNode;
export const $getTableCellNodeRect = mod.$getTableCellNodeRect;
export const $getTableColumnIndexFromTableCellNode = mod.$getTableColumnIndexFromTableCellNode;
export const $getTableNodeFromLexicalNodeOrThrow = mod.$getTableNodeFromLexicalNodeOrThrow;
export const $getTableRowIndexFromTableCellNode = mod.$getTableRowIndexFromTableCellNode;
export const $getTableRowNodeFromTableCellNodeOrThrow = mod.$getTableRowNodeFromTableCellNodeOrThrow;
export const $insertTableColumn = mod.$insertTableColumn;
export const $insertTableColumnAtSelection = mod.$insertTableColumnAtSelection;
export const $insertTableColumn__EXPERIMENTAL = mod.$insertTableColumn__EXPERIMENTAL;
export const $insertTableRow = mod.$insertTableRow;
export const $insertTableRowAtSelection = mod.$insertTableRowAtSelection;
export const $insertTableRow__EXPERIMENTAL = mod.$insertTableRow__EXPERIMENTAL;
export const $isScrollableTablesActive = mod.$isScrollableTablesActive;
export const $isTableCellNode = mod.$isTableCellNode;
export const $isTableNode = mod.$isTableNode;
export const $isTableRowNode = mod.$isTableRowNode;
export const $isTableSelection = mod.$isTableSelection;
export const $mergeCells = mod.$mergeCells;
export const $removeTableRowAtIndex = mod.$removeTableRowAtIndex;
export const $unmergeCell = mod.$unmergeCell;
export const INSERT_TABLE_COMMAND = mod.INSERT_TABLE_COMMAND;
export const TableCellHeaderStates = mod.TableCellHeaderStates;
export const TableCellNode = mod.TableCellNode;
export const TableNode = mod.TableNode;
export const TableObserver = mod.TableObserver;
export const TableRowNode = mod.TableRowNode;
export const applyTableHandlers = mod.applyTableHandlers;
export const getDOMCellFromTarget = mod.getDOMCellFromTarget;
export const getTableElement = mod.getTableElement;
export const getTableObserverFromTableElement = mod.getTableObserverFromTableElement;
export const registerTableCellUnmergeTransform = mod.registerTableCellUnmergeTransform;
export const registerTablePlugin = mod.registerTablePlugin;
export const registerTableSelectionObserver = mod.registerTableSelectionObserver;
export const setScrollableTablesActive = mod.setScrollableTablesActive;

View File

@@ -0,0 +1 @@
{"version":3,"file":"receipt-text.js","sources":["../../../src/icons/receipt-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNMTQgOEg4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxMkg4IiAvPgogIDxwYXRoIGQ9Ik0xMyAxNkg4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/receipt-text\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 ReceiptText = createLucideIcon('ReceiptText', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M14 8H8', key: '1l3xfs' }],\n ['path', { d: 'M16 12H8', key: '1fr5h0' }],\n ['path', { d: 'M13 16H8', key: 'wsln4y' }],\n]);\n\nexport default ReceiptText;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('escapeRegExp', require('../escapeRegExp'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,39 @@
import { getISOWeekYear } from "./getISOWeekYear.mjs";
import { startOfISOWeek } from "./startOfISOWeek.mjs";
import { constructFrom } from "./constructFrom.mjs";
/**
* @name endOfISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Return the end of an ISO week-numbering year for the given date.
*
* @description
* Return the end of an ISO week-numbering year,
* which always starts 3 days before the year's first Thursday.
* The result will be in the local timezone.
*
* 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 original date
*
* @returns The end of an ISO week-numbering year
*
* @example
* // The end of an ISO week-numbering year for 2 July 2005:
* const result = endOfISOWeekYear(new Date(2005, 6, 2))
* //=> Sun Jan 01 2006 23:59:59.999
*/
export function endOfISOWeekYear(date) {
const year = getISOWeekYear(date);
const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
const _date = startOfISOWeek(fourthOfJanuaryOfNextYear);
_date.setMilliseconds(_date.getMilliseconds() - 1);
return _date;
}
// Fallback for modularized imports:
export default endOfISOWeekYear;

View File

@@ -0,0 +1,37 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.InstrumentationNodeModuleFile = void 0;
const index_1 = require("./platform/index");
class InstrumentationNodeModuleFile {
name;
supportedVersions;
patch;
unpatch;
constructor(name, supportedVersions,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
patch,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
unpatch) {
this.name = (0, index_1.normalize)(name);
this.supportedVersions = supportedVersions;
this.patch = patch;
this.unpatch = unpatch;
}
}
exports.InstrumentationNodeModuleFile = InstrumentationNodeModuleFile;
//# sourceMappingURL=instrumentationNodeModuleFile.js.map

View File

@@ -0,0 +1,38 @@
@import '../../scss/styles.scss';
@layer payload-default {
.sort-complex {
background: var(--theme-elevation-100);
padding: base(0.5);
display: flex;
&__wrap {
width: 100%;
display: flex;
align-items: center;
}
&__select {
width: 50%;
margin-bottom: base(0.5);
padding: 0 base(0.5);
flex-grow: 1;
}
&__label {
color: var(--theme-elevation-400);
margin: base(0.5) 0;
}
@include mid-break {
&__wrap {
display: block;
}
&__select {
margin: 0 0 base(0.5);
width: 100%;
}
}
}
}

View File

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

View File

@@ -0,0 +1,5 @@
function _assertClassBrand(e, t, n) {
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
throw new TypeError("Private element is not present on this object");
}
module.exports = _assertClassBrand, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.beginHiddenCallStack = beginHiddenCallStack;
exports.endHiddenCallStack = endHiddenCallStack;
exports.expectedError = expectedError;
exports.injectVirtualStackFrame = injectVirtualStackFrame;
var _Object$getOwnPropert;
const ErrorToString = Function.call.bind(Error.prototype.toString);
const SUPPORTED = !!Error.captureStackTrace && ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit")) == null ? void 0 : _Object$getOwnPropert.writable) === true;
const START_HIDING = "startHiding - secret - don't use this - v1";
const STOP_HIDING = "stopHiding - secret - don't use this - v1";
const expectedErrors = new WeakSet();
const virtualFrames = new WeakMap();
function CallSite(filename) {
return Object.create({
isNative: () => false,
isConstructor: () => false,
isToplevel: () => true,
getFileName: () => filename,
getLineNumber: () => undefined,
getColumnNumber: () => undefined,
getFunctionName: () => undefined,
getMethodName: () => undefined,
getTypeName: () => undefined,
toString: () => filename
});
}
function injectVirtualStackFrame(error, filename) {
if (!SUPPORTED) return;
let frames = virtualFrames.get(error);
if (!frames) virtualFrames.set(error, frames = []);
frames.push(CallSite(filename));
return error;
}
function expectedError(error) {
if (!SUPPORTED) return;
expectedErrors.add(error);
return error;
}
function beginHiddenCallStack(fn) {
if (!SUPPORTED) return fn;
return Object.defineProperty(function (...args) {
setupPrepareStackTrace();
return fn(...args);
}, "name", {
value: STOP_HIDING
});
}
function endHiddenCallStack(fn) {
if (!SUPPORTED) return fn;
return Object.defineProperty(function (...args) {
return fn(...args);
}, "name", {
value: START_HIDING
});
}
function setupPrepareStackTrace() {
setupPrepareStackTrace = () => {};
const {
prepareStackTrace = defaultPrepareStackTrace
} = Error;
const MIN_STACK_TRACE_LIMIT = 50;
Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT));
Error.prepareStackTrace = function stackTraceRewriter(err, trace) {
let newTrace = [];
const isExpected = expectedErrors.has(err);
let status = isExpected ? "hiding" : "unknown";
for (let i = 0; i < trace.length; i++) {
const name = trace[i].getFunctionName();
if (name === START_HIDING) {
status = "hiding";
} else if (name === STOP_HIDING) {
if (status === "hiding") {
status = "showing";
if (virtualFrames.has(err)) {
newTrace.unshift(...virtualFrames.get(err));
}
} else if (status === "unknown") {
newTrace = trace;
break;
}
} else if (status !== "hiding") {
newTrace.push(trace[i]);
}
}
return prepareStackTrace(err, newTrace);
};
}
function defaultPrepareStackTrace(err, trace) {
if (trace.length === 0) return ErrorToString(err);
return `${ErrorToString(err)}\n at ${trace.join("\n at ")}`;
}
0 && 0;
//# sourceMappingURL=rewrite-stack-trace.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"error.js","sources":["../../../src/utils/error.ts"],"sourcesContent":["import type { ConsoleLevel } from '../types-hoist/instrument';\n\n/**\n * An error emitted by Sentry SDKs and related utilities.\n * @deprecated This class is no longer used and will be removed in a future version. Use `Error` instead.\n */\nexport class SentryError extends Error {\n public logLevel: ConsoleLevel;\n\n public constructor(\n public message: string,\n logLevel: ConsoleLevel = 'warn',\n ) {\n super(message);\n\n this.logLevel = logLevel;\n }\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACO,MAAM,WAAA,SAAoB,KAAA,CAAM;;AAGvC,GAAS,WAAW;AACpB,KAAW,OAAO;AAClB,IAAI,QAAQ,GAAiB,MAAM;AACnC,IAAI;AACJ,IAAI,KAAK,CAAC,OAAO,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAEjB,IAAI,IAAI,CAAC,QAAA,GAAW,QAAQ;AAC5B,EAAE;AACF;;;;"}

View File

@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLIP = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const IPv4_js_1 = require("./IPv4.js");
const IPv6_js_1 = require("./IPv6.js");
const validate = (value, ast) => {
if (typeof value !== 'string') {
throw (0, error_js_1.createGraphQLError)(`Value is not string: ${value}`, ast ? { nodes: ast } : undefined);
}
if (!IPv4_js_1.IPV4_REGEX.test(value) && !IPv6_js_1.IPV6_REGEX.test(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid IPv4 or IPv6 address: ${value}`, ast ? { nodes: ast } : undefined);
}
return value;
};
exports.GraphQLIP = new graphql_1.GraphQLScalarType({
name: `IP`,
description: `A field whose value is either an IPv4 or IPv6 address: https://en.wikipedia.org/wiki/IP_address.`,
serialize(value) {
return validate(value);
},
parseValue(value) {
return validate(value);
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate strings as IP addresses but got a: ${ast.kind}`, {
nodes: ast,
});
}
return validate(ast.value, ast);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'IP',
oneOf: [
{
type: 'string',
format: 'ipv4',
},
{
type: 'string',
format: 'ipv6',
},
],
},
},
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/errors/ValidationError.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport { status as httpStatus } from 'http-status'\n\nimport type { LabelFunction, StaticLabel } from '../config/types.js'\nimport type { PayloadRequest } from '../types/index.js'\n\nimport { APIError } from './APIError.js'\n\n// This gets dynamically reassigned during compilation\nexport let ValidationErrorName = 'ValidationError'\n\nexport type ValidationFieldError = {\n label?: LabelFunction | StaticLabel\n // The error message to display for this field\n message: string\n path: string\n}\n\nexport class ValidationError extends APIError<{\n collection?: string\n errors: ValidationFieldError[]\n global?: string\n}> {\n constructor(\n results: {\n collection?: string\n errors: ValidationFieldError[]\n global?: string\n id?: number | string\n /**\n * req needs to be passed through (if you have one) in order to resolve label functions that may be part of the errors array\n */\n req?: Partial<PayloadRequest>\n },\n t?: TFunction,\n ) {\n const message = t\n ? t('error:followingFieldsInvalid', { count: results.errors.length })\n : results.errors.length === 1\n ? en.translations.error.followingFieldsInvalid_one\n : en.translations.error.followingFieldsInvalid_other\n\n const req = results.req\n // delete to avoid logging the whole req\n delete results['req']\n\n super(\n `${message} ${results.errors\n .map((f) => {\n if (f.label) {\n if (typeof f.label === 'function') {\n if (!req || !req.i18n || !req.t) {\n return f.path\n }\n\n return f.label({ i18n: req.i18n, t: req.t })\n }\n\n if (typeof f.label === 'object') {\n if (req?.i18n?.language) {\n return f.label[req.i18n.language]\n }\n\n return f.label[Object.keys(f.label)[0]!]\n }\n\n return f.label\n }\n\n return f.path\n })\n .join(', ')}`,\n httpStatus.BAD_REQUEST,\n results,\n )\n\n ValidationErrorName = this.constructor.name\n }\n}\n"],"names":["en","status","httpStatus","APIError","ValidationErrorName","ValidationError","results","t","message","count","errors","length","translations","error","followingFieldsInvalid_one","followingFieldsInvalid_other","req","map","f","label","i18n","path","language","Object","keys","join","BAD_REQUEST","name"],"mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,SAASC,UAAUC,UAAU,QAAQ,cAAa;AAKlD,SAASC,QAAQ,QAAQ,gBAAe;AAExC,sDAAsD;AACtD,OAAO,IAAIC,sBAAsB,kBAAiB;AASlD,OAAO,MAAMC,wBAAwBF;IAKnC,YACEG,OASC,EACDC,CAAa,CACb;QACA,MAAMC,UAAUD,IACZA,EAAE,gCAAgC;YAAEE,OAAOH,QAAQI,MAAM,CAACC,MAAM;QAAC,KACjEL,QAAQI,MAAM,CAACC,MAAM,KAAK,IACxBX,GAAGY,YAAY,CAACC,KAAK,CAACC,0BAA0B,GAChDd,GAAGY,YAAY,CAACC,KAAK,CAACE,4BAA4B;QAExD,MAAMC,MAAMV,QAAQU,GAAG;QACvB,wCAAwC;QACxC,OAAOV,OAAO,CAAC,MAAM;QAErB,KAAK,CACH,GAAGE,QAAQ,CAAC,EAAEF,QAAQI,MAAM,CACzBO,GAAG,CAAC,CAACC;YACJ,IAAIA,EAAEC,KAAK,EAAE;gBACX,IAAI,OAAOD,EAAEC,KAAK,KAAK,YAAY;oBACjC,IAAI,CAACH,OAAO,CAACA,IAAII,IAAI,IAAI,CAACJ,IAAIT,CAAC,EAAE;wBAC/B,OAAOW,EAAEG,IAAI;oBACf;oBAEA,OAAOH,EAAEC,KAAK,CAAC;wBAAEC,MAAMJ,IAAII,IAAI;wBAAEb,GAAGS,IAAIT,CAAC;oBAAC;gBAC5C;gBAEA,IAAI,OAAOW,EAAEC,KAAK,KAAK,UAAU;oBAC/B,IAAIH,KAAKI,MAAME,UAAU;wBACvB,OAAOJ,EAAEC,KAAK,CAACH,IAAII,IAAI,CAACE,QAAQ,CAAC;oBACnC;oBAEA,OAAOJ,EAAEC,KAAK,CAACI,OAAOC,IAAI,CAACN,EAAEC,KAAK,CAAC,CAAC,EAAE,CAAE;gBAC1C;gBAEA,OAAOD,EAAEC,KAAK;YAChB;YAEA,OAAOD,EAAEG,IAAI;QACf,GACCI,IAAI,CAAC,OAAO,EACfvB,WAAWwB,WAAW,EACtBpB;QAGFF,sBAAsB,IAAI,CAAC,WAAW,CAACuB,IAAI;IAC7C;AACF"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrapRouteHandlerWithSentry.d.ts","sourceRoot":"","sources":["../../../src/common/wrapRouteHandlerWithSentry.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD;;;;GAIG;AAEH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC1E,YAAY,EAAE,CAAC,EACf,OAAO,EAAE,mBAAmB,GAC3B,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAwF7G"}

View File

@@ -0,0 +1,68 @@
"use strict";
var _index = require("./constants/index.cjs");
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index[key];
}
});
});
var _index2 = require("./date/index.cjs");
Object.keys(_index2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index2[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index2[key];
}
});
});
var _mini = require("./date/mini.cjs");
Object.keys(_mini).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _mini[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _mini[key];
}
});
});
var _index3 = require("./tz/index.cjs");
Object.keys(_index3).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index3[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index3[key];
}
});
});
var _index4 = require("./tzOffset/index.cjs");
Object.keys(_index4).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index4[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index4[key];
}
});
});
var _index5 = require("./tzScan/index.cjs");
Object.keys(_index5).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _index5[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _index5[key];
}
});
});

View File

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

View File

@@ -0,0 +1,14 @@
import { progress } from 'motion-utils';
const generateLinearEasing = (easing, duration, // as milliseconds
resolution = 10 // as milliseconds
) => {
let points = "";
const numPoints = Math.max(Math.round(duration / resolution), 2);
for (let i = 0; i < numPoints; i++) {
points += easing(progress(0, numPoints - 1, i)) + ", ";
}
return `linear(${points.substring(0, points.length - 2)})`;
};
export { generateLinearEasing };

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","useDraggable","React","DragHandleIcon","useLivePreviewContext","ToolbarControls","baseClass","DraggableToolbar","props","$","toolbarPosition","t0","Symbol","for","id","attributes","listeners","setNodeRef","transform","t1","t2","x","t3","y","t4","_jsxs","className","join","style","left","top","undefined","children","_jsx","ref","type","StaticToolbar","LivePreviewToolbar","draggable"],"sources":["../../../../src/elements/LivePreview/Toolbar/index.tsx"],"sourcesContent":["'use client'\nimport type { EditViewProps } from 'payload'\n\nimport { useDraggable } from '@dnd-kit/core'\nimport React from 'react'\n\nimport { DragHandleIcon } from '../../../icons/DragHandle/index.js'\nimport { useLivePreviewContext } from '../../../providers/LivePreview/context.js'\nimport { ToolbarControls } from './Controls/index.js'\nimport './index.scss'\n\nconst baseClass = 'live-preview-toolbar'\n\nconst DraggableToolbar: React.FC<EditViewProps> = (props) => {\n const { toolbarPosition } = useLivePreviewContext()\n\n const { attributes, listeners, setNodeRef, transform } = useDraggable({\n id: 'live-preview-toolbar',\n })\n\n return (\n <div\n className={[baseClass, `${baseClass}--draggable`].join(' ')}\n style={{\n left: `${toolbarPosition.x}px`,\n top: `${toolbarPosition.y}px`,\n ...(transform\n ? {\n transform: transform\n ? `translate3d(${transform?.x || 0}px, ${transform?.y || 0}px, 0)`\n : undefined,\n }\n : {}),\n }}\n >\n <button\n {...listeners}\n {...attributes}\n className={`${baseClass}__drag-handle`}\n ref={setNodeRef}\n type=\"button\"\n >\n <DragHandleIcon />\n </button>\n <ToolbarControls {...props} />\n </div>\n )\n}\n\nconst StaticToolbar: React.FC<EditViewProps> = (props) => {\n return (\n <div className={[baseClass, `${baseClass}--static`].join(' ')}>\n <ToolbarControls {...props} />\n </div>\n )\n}\n\nexport const LivePreviewToolbar: React.FC<\n {\n draggable?: boolean\n } & EditViewProps\n> = (props) => {\n const { draggable } = props\n\n if (draggable) {\n return <DraggableToolbar {...props} />\n }\n\n return <StaticToolbar {...props} />\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,YAAY,QAAQ;AAC7B,OAAOC,KAAA,MAAW;AAElB,SAASC,cAAc,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,eAAe,QAAQ;AAChC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,MAAMC,gBAAA,GAA4CC,KAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EAChD;IAAAU;EAAA,IAA4BN,qBAAA;EAAA,IAAAO,EAAA;EAAA,IAAAF,CAAA,QAAAG,MAAA,CAAAC,GAAA;IAE0CF,EAAA;MAAAG,EAAA,EAChE;IAAA;IACNL,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAFA;IAAAM,UAAA;IAAAC,SAAA;IAAAC,UAAA;IAAAC;EAAA,IAAyDjB,YAAA,CAAaU,EAEtE;EAAA,IAAAQ,EAAA;EAAA,IAAAV,CAAA,QAAAG,MAAA,CAAAC,GAAA;IAIeM,EAAA,IAAAb,SAAA,EAAY,GAAAA,SAAA,aAAyB;IAACG,CAAA,MAAAU,EAAA;EAAA;IAAAA,EAAA,GAAAV,CAAA;EAAA;EAEzC,MAAAW,EAAA,MAAGV,eAAA,CAAAW,CAAA,IAAqB;EACzB,MAAAC,EAAA,MAAGZ,eAAA,CAAAa,CAAA,IAAqB;EAAA,IAAAC,EAAA;EAAA,IAAAf,CAAA,QAAAM,UAAA,IAAAN,CAAA,QAAAO,SAAA,IAAAP,CAAA,QAAAD,KAAA,IAAAC,CAAA,QAAAQ,UAAA,IAAAR,CAAA,QAAAW,EAAA,IAAAX,CAAA,QAAAa,EAAA,IAAAb,CAAA,QAAAS,SAAA;IAJjCM,EAAA,GAAAC,KAAA,CAAC;MAAAC,SAAA,EACYP,EAAsC,CAAAQ,IAAA,CAAM;MAAAC,KAAA;QAAAC,IAAA,EAE/CT,EAAwB;QAAAU,GAAA,EACzBR,EAAwB;QAAA,IACzBJ,SAAA;UAAAA,SAAA,EAEaA,SAAA,GACP,eAAeA,SAAA,EAAAG,CAAA,KAAgB,OAAQH,SAAA,EAAAK,CAAA,KAAgB,QAAS,GAAAQ;QAChE,MAEJ;MAAA;MAAAC,QAAA,GAGRC,IAAA,CAAC;QAAA,GACKjB,SAAS;QAAA,GACTD,UAAU;QAAAW,SAAA,EACH,GAAApB,SAAA,eAA2B;QAAA4B,GAAA,EACjCjB,UAAA;QAAAkB,IAAA,EACA;QAAAH,QAAA,EAELC,IAAA,CAAA9B,cAAA,IAAC;MAAA,C,GAEH8B,IAAA,CAAA5B,eAAA;QAAA,GAAqBG;MAAK,C;;;;;;;;;;;;;SAvB5BgB,E;CA0BJ;AAEA,MAAMY,aAAA,GAA0C5B,KAAA;EAC9C,oBACEyB,IAAA,CAAC;IAAIP,SAAA,EAAW,CAACpB,SAAA,EAAW,GAAGA,SAAA,UAAmB,CAAC,CAACqB,IAAI,CAAC;cACvD,aAAAM,IAAA,CAAC5B,eAAA;MAAiB,GAAGG;;;AAG3B;AAEA,OAAO,MAAM6B,kBAAA,GAIR7B,KAAA;EACH,MAAM;IAAE8B;EAAS,CAAE,GAAG9B,KAAA;EAEtB,IAAI8B,SAAA,EAAW;IACb,oBAAOL,IAAA,CAAC1B,gBAAA;MAAkB,GAAGC;;EAC/B;EAEA,oBAAOyB,IAAA,CAACG,aAAA;IAAe,GAAG5B;;AAC5B","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,76 @@
// https://www.graphviz.org/doc/info/lang.html
(function (Prism) {
var ID = '(?:' + [
// an identifier
/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,
// a number
/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,
// a double-quoted string
/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,
// HTML-like string
/<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source
].join('|') + ')';
var IDInside = {
'markup': {
pattern: /(^<)[\s\S]+(?=>$)/,
lookbehind: true,
alias: ['language-markup', 'language-html', 'language-xml'],
inside: Prism.languages.markup
}
};
/**
* @param {string} source
* @param {string} flags
* @returns {RegExp}
*/
function withID(source, flags) {
return RegExp(source.replace(/<ID>/g, function () { return ID; }), flags);
}
Prism.languages.dot = {
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
greedy: true
},
'graph-name': {
pattern: withID(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source, 'i'),
lookbehind: true,
greedy: true,
alias: 'class-name',
inside: IDInside
},
'attr-value': {
pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
lookbehind: true,
greedy: true,
inside: IDInside
},
'attr-name': {
pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
lookbehind: true,
greedy: true,
inside: IDInside
},
'keyword': /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
'compass-point': {
pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
lookbehind: true,
alias: 'builtin'
},
'node': {
pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
lookbehind: true,
greedy: true,
inside: IDInside
},
'operator': /[=:]|-[->]/,
'punctuation': /[\[\]{};,]/
};
Prism.languages.gv = Prism.languages.dot;
}(Prism));

View File

@@ -0,0 +1,30 @@
import { formatDistance } from "./nb/_lib/formatDistance.js";
import { formatLong } from "./nb/_lib/formatLong.js";
import { formatRelative } from "./nb/_lib/formatRelative.js";
import { localize } from "./nb/_lib/localize.js";
import { match } from "./nb/_lib/match.js";
/**
* @category Locales
* @summary Norwegian Bokmål locale.
* @language Norwegian Bokmål
* @iso-639-2 nob
* @author Hans-Kristian Koren [@Hanse](https://github.com/Hanse)
* @author Mikolaj Grzyb [@mikolajgrzyb](https://github.com/mikolajgrzyb)
* @author Dag Stuan [@dagstuan](https://github.com/dagstuan)
*/
export const nb = {
code: "nb",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default nb;

View File

@@ -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: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
const md4 = new WebAssembly.Module(
Buffer.from(
// 2150 bytes
"AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvQCgEZfyMBIQUjAiECIwMhAyMEIQQDQCAAIAFLBEAgASgCBCIOIAQgAyABKAIAIg8gBSAEIAIgAyAEc3FzampBA3ciCCACIANzcXNqakEHdyEJIAEoAgwiBiACIAggASgCCCIQIAMgAiAJIAIgCHNxc2pqQQt3IgogCCAJc3FzampBE3chCyABKAIUIgcgCSAKIAEoAhAiESAIIAkgCyAJIApzcXNqakEDdyIMIAogC3Nxc2pqQQd3IQ0gASgCHCIJIAsgDCABKAIYIgggCiALIA0gCyAMc3FzampBC3ciEiAMIA1zcXNqakETdyETIAEoAiQiFCANIBIgASgCICIVIAwgDSATIA0gEnNxc2pqQQN3IgwgEiATc3FzampBB3chDSABKAIsIgsgEyAMIAEoAigiCiASIBMgDSAMIBNzcXNqakELdyISIAwgDXNxc2pqQRN3IRMgASgCNCIWIA0gEiABKAIwIhcgDCANIBMgDSASc3FzampBA3ciGCASIBNzcXNqakEHdyEZIBggASgCPCINIBMgGCABKAI4IgwgEiATIBkgEyAYc3FzampBC3ciEiAYIBlzcXNqakETdyITIBIgGXJxIBIgGXFyaiAPakGZ84nUBWpBA3ciGCATIBIgGSAYIBIgE3JxIBIgE3FyaiARakGZ84nUBWpBBXciEiATIBhycSATIBhxcmogFWpBmfOJ1AVqQQl3IhMgEiAYcnEgEiAYcXJqIBdqQZnzidQFakENdyIYIBIgE3JxIBIgE3FyaiAOakGZ84nUBWpBA3ciGSAYIBMgEiAZIBMgGHJxIBMgGHFyaiAHakGZ84nUBWpBBXciEiAYIBlycSAYIBlxcmogFGpBmfOJ1AVqQQl3IhMgEiAZcnEgEiAZcXJqIBZqQZnzidQFakENdyIYIBIgE3JxIBIgE3FyaiAQakGZ84nUBWpBA3ciGSAYIBMgEiAZIBMgGHJxIBMgGHFyaiAIakGZ84nUBWpBBXciEiAYIBlycSAYIBlxcmogCmpBmfOJ1AVqQQl3IhMgEiAZcnEgEiAZcXJqIAxqQZnzidQFakENdyIYIBIgE3JxIBIgE3FyaiAGakGZ84nUBWpBA3ciGSAYIBMgEiAZIBMgGHJxIBMgGHFyaiAJakGZ84nUBWpBBXciEiAYIBlycSAYIBlxcmogC2pBmfOJ1AVqQQl3IhMgEiAZcnEgEiAZcXJqIA1qQZnzidQFakENdyIYIBNzIBJzaiAPakGh1+f2BmpBA3ciDyAYIBMgEiAPIBhzIBNzaiAVakGh1+f2BmpBCXciEiAPcyAYc2ogEWpBodfn9gZqQQt3IhEgEnMgD3NqIBdqQaHX5/YGakEPdyIPIBFzIBJzaiAQakGh1+f2BmpBA3ciECAPIBEgEiAPIBBzIBFzaiAKakGh1+f2BmpBCXciCiAQcyAPc2ogCGpBodfn9gZqQQt3IgggCnMgEHNqIAxqQaHX5/YGakEPdyIMIAhzIApzaiAOakGh1+f2BmpBA3ciDiAMIAggCiAMIA5zIAhzaiAUakGh1+f2BmpBCXciCCAOcyAMc2ogB2pBodfn9gZqQQt3IgcgCHMgDnNqIBZqQaHX5/YGakEPdyIKIAdzIAhzaiAGakGh1+f2BmpBA3ciBiAFaiEFIAIgCiAHIAggBiAKcyAHc2ogC2pBodfn9gZqQQl3IgcgBnMgCnNqIAlqQaHX5/YGakELdyIIIAdzIAZzaiANakGh1+f2BmpBD3dqIQIgAyAIaiEDIAQgB2ohBCABQUBrIQEMAQsLIAUkASACJAIgAyQDIAQkBAsNACAAEAEjACAAaiQAC/sEAgN/AX4jACAAaq1CA4YhBCAAQcgAakFAcSICQQhrIAAiAUEBaiEAIAFBgAE6AAADQCAAIAJJQQAgAEEHcRsEQCAAQQA6AAAgAEEBaiEADAELCwNAIAAgAkkEQCAAQgA3AwAgAEEIaiEADAELCyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=",
"base64"
)
);
// #endregion
module.exports = create.bind(null, md4, [], 64, 32);

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('zipAll', require('../zip'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,325 @@
(function () {
if (typeof Prism === 'undefined' || typeof document === 'undefined') {
return;
}
if (!Prism.plugins.toolbar) {
console.warn('Show Languages plugin loaded before Toolbar plugin.');
return;
}
/* eslint-disable */
// The languages map is built automatically with gulp
var Languages = /*languages_placeholder[*/{
"none": "Plain text",
"plain": "Plain text",
"plaintext": "Plain text",
"text": "Plain text",
"txt": "Plain text",
"html": "HTML",
"xml": "XML",
"svg": "SVG",
"mathml": "MathML",
"ssml": "SSML",
"rss": "RSS",
"css": "CSS",
"clike": "C-like",
"js": "JavaScript",
"abap": "ABAP",
"abnf": "ABNF",
"al": "AL",
"antlr4": "ANTLR4",
"g4": "ANTLR4",
"apacheconf": "Apache Configuration",
"apl": "APL",
"aql": "AQL",
"ino": "Arduino",
"arff": "ARFF",
"armasm": "ARM Assembly",
"arm-asm": "ARM Assembly",
"art": "Arturo",
"asciidoc": "AsciiDoc",
"adoc": "AsciiDoc",
"aspnet": "ASP.NET (C#)",
"asm6502": "6502 Assembly",
"asmatmel": "Atmel AVR Assembly",
"autohotkey": "AutoHotkey",
"autoit": "AutoIt",
"avisynth": "AviSynth",
"avs": "AviSynth",
"avro-idl": "Avro IDL",
"avdl": "Avro IDL",
"awk": "AWK",
"gawk": "GAWK",
"sh": "Shell",
"basic": "BASIC",
"bbcode": "BBcode",
"bbj": "BBj",
"bnf": "BNF",
"rbnf": "RBNF",
"bqn": "BQN",
"bsl": "BSL (1C:Enterprise)",
"oscript": "OneScript",
"csharp": "C#",
"cs": "C#",
"dotnet": "C#",
"cpp": "C++",
"cfscript": "CFScript",
"cfc": "CFScript",
"cil": "CIL",
"cilkc": "Cilk/C",
"cilk-c": "Cilk/C",
"cilkcpp": "Cilk/C++",
"cilk-cpp": "Cilk/C++",
"cilk": "Cilk/C++",
"cmake": "CMake",
"cobol": "COBOL",
"coffee": "CoffeeScript",
"conc": "Concurnas",
"csp": "Content-Security-Policy",
"css-extras": "CSS Extras",
"csv": "CSV",
"cue": "CUE",
"dataweave": "DataWeave",
"dax": "DAX",
"django": "Django/Jinja2",
"jinja2": "Django/Jinja2",
"dns-zone-file": "DNS zone file",
"dns-zone": "DNS zone file",
"dockerfile": "Docker",
"dot": "DOT (Graphviz)",
"gv": "DOT (Graphviz)",
"ebnf": "EBNF",
"editorconfig": "EditorConfig",
"ejs": "EJS",
"etlua": "Embedded Lua templating",
"erb": "ERB",
"excel-formula": "Excel Formula",
"xlsx": "Excel Formula",
"xls": "Excel Formula",
"fsharp": "F#",
"firestore-security-rules": "Firestore security rules",
"ftl": "FreeMarker Template Language",
"gml": "GameMaker Language",
"gamemakerlanguage": "GameMaker Language",
"gap": "GAP (CAS)",
"gcode": "G-code",
"gdscript": "GDScript",
"gedcom": "GEDCOM",
"gettext": "gettext",
"po": "gettext",
"glsl": "GLSL",
"gn": "GN",
"gni": "GN",
"linker-script": "GNU Linker Script",
"ld": "GNU Linker Script",
"go-module": "Go module",
"go-mod": "Go module",
"graphql": "GraphQL",
"hbs": "Handlebars",
"hs": "Haskell",
"hcl": "HCL",
"hlsl": "HLSL",
"http": "HTTP",
"hpkp": "HTTP Public-Key-Pins",
"hsts": "HTTP Strict-Transport-Security",
"ichigojam": "IchigoJam",
"icu-message-format": "ICU Message Format",
"idr": "Idris",
"ignore": ".ignore",
"gitignore": ".gitignore",
"hgignore": ".hgignore",
"npmignore": ".npmignore",
"inform7": "Inform 7",
"javadoc": "JavaDoc",
"javadoclike": "JavaDoc-like",
"javastacktrace": "Java stack trace",
"jq": "JQ",
"jsdoc": "JSDoc",
"js-extras": "JS Extras",
"json": "JSON",
"webmanifest": "Web App Manifest",
"json5": "JSON5",
"jsonp": "JSONP",
"jsstacktrace": "JS stack trace",
"js-templates": "JS Templates",
"keepalived": "Keepalived Configure",
"kts": "Kotlin Script",
"kt": "Kotlin",
"kumir": "KuMir (КуМир)",
"kum": "KuMir (КуМир)",
"latex": "LaTeX",
"tex": "TeX",
"context": "ConTeXt",
"lilypond": "LilyPond",
"ly": "LilyPond",
"emacs": "Lisp",
"elisp": "Lisp",
"emacs-lisp": "Lisp",
"llvm": "LLVM IR",
"log": "Log file",
"lolcode": "LOLCODE",
"magma": "Magma (CAS)",
"md": "Markdown",
"markup-templating": "Markup templating",
"matlab": "MATLAB",
"maxscript": "MAXScript",
"mel": "MEL",
"metafont": "METAFONT",
"mongodb": "MongoDB",
"moon": "MoonScript",
"n1ql": "N1QL",
"n4js": "N4JS",
"n4jsd": "N4JS",
"nand2tetris-hdl": "Nand To Tetris HDL",
"naniscript": "Naninovel Script",
"nani": "Naninovel Script",
"nasm": "NASM",
"neon": "NEON",
"nginx": "nginx",
"nsis": "NSIS",
"objectivec": "Objective-C",
"objc": "Objective-C",
"ocaml": "OCaml",
"opencl": "OpenCL",
"openqasm": "OpenQasm",
"qasm": "OpenQasm",
"parigp": "PARI/GP",
"objectpascal": "Object Pascal",
"psl": "PATROL Scripting Language",
"pcaxis": "PC-Axis",
"px": "PC-Axis",
"peoplecode": "PeopleCode",
"pcode": "PeopleCode",
"php": "PHP",
"phpdoc": "PHPDoc",
"php-extras": "PHP Extras",
"plant-uml": "PlantUML",
"plantuml": "PlantUML",
"plsql": "PL/SQL",
"powerquery": "PowerQuery",
"pq": "PowerQuery",
"mscript": "PowerQuery",
"powershell": "PowerShell",
"promql": "PromQL",
"properties": ".properties",
"protobuf": "Protocol Buffers",
"purebasic": "PureBasic",
"pbfasm": "PureBasic",
"purs": "PureScript",
"py": "Python",
"qsharp": "Q#",
"qs": "Q#",
"q": "Q (kdb+ database)",
"qml": "QML",
"rkt": "Racket",
"cshtml": "Razor C#",
"razor": "Razor C#",
"jsx": "React JSX",
"tsx": "React TSX",
"renpy": "Ren'py",
"rpy": "Ren'py",
"res": "ReScript",
"rest": "reST (reStructuredText)",
"robotframework": "Robot Framework",
"robot": "Robot Framework",
"rb": "Ruby",
"sas": "SAS",
"sass": "Sass (Sass)",
"scss": "Sass (SCSS)",
"shell-session": "Shell session",
"sh-session": "Shell session",
"shellsession": "Shell session",
"sml": "SML",
"smlnj": "SML/NJ",
"solidity": "Solidity (Ethereum)",
"sol": "Solidity (Ethereum)",
"solution-file": "Solution file",
"sln": "Solution file",
"soy": "Soy (Closure Template)",
"sparql": "SPARQL",
"rq": "SPARQL",
"splunk-spl": "Splunk SPL",
"sqf": "SQF: Status Quo Function (Arma 3)",
"sql": "SQL",
"stata": "Stata Ado",
"iecst": "Structured Text (IEC 61131-3)",
"supercollider": "SuperCollider",
"sclang": "SuperCollider",
"systemd": "Systemd configuration file",
"t4-templating": "T4 templating",
"t4-cs": "T4 Text Templates (C#)",
"t4": "T4 Text Templates (C#)",
"t4-vb": "T4 Text Templates (VB)",
"tap": "TAP",
"tt2": "Template Toolkit 2",
"toml": "TOML",
"trickle": "trickle",
"troy": "troy",
"trig": "TriG",
"ts": "TypeScript",
"tsconfig": "TSConfig",
"uscript": "UnrealScript",
"uc": "UnrealScript",
"uorazor": "UO Razor Script",
"uri": "URI",
"url": "URL",
"vbnet": "VB.Net",
"vhdl": "VHDL",
"vim": "vim",
"visual-basic": "Visual Basic",
"vba": "VBA",
"vb": "Visual Basic",
"wasm": "WebAssembly",
"web-idl": "Web IDL",
"webidl": "Web IDL",
"wgsl": "WGSL",
"wiki": "Wiki markup",
"wolfram": "Wolfram language",
"nb": "Mathematica Notebook",
"wl": "Wolfram language",
"xeoracube": "XeoraCube",
"xml-doc": "XML doc (.net)",
"xojo": "Xojo (REALbasic)",
"xquery": "XQuery",
"yaml": "YAML",
"yml": "YAML",
"yang": "YANG"
}/*]*/;
/* eslint-enable */
Prism.plugins.toolbar.registerButton('show-language', function (env) {
var pre = env.element.parentNode;
if (!pre || !/pre/i.test(pre.nodeName)) {
return;
}
/**
* Tries to guess the name of a language given its id.
*
* @param {string} id The language id.
* @returns {string}
*/
function guessTitle(id) {
if (!id) {
return id;
}
return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S');
}
var language = pre.getAttribute('data-language') || Languages[env.language] || guessTitle(env.language);
if (!language) {
return;
}
var element = document.createElement('span');
element.textContent = language;
return element;
});
}());

View File

@@ -0,0 +1,15 @@
import type { Match } from "../../../locale/types.js";
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult, ParserOptions } from "../types.js";
export declare class DayParser extends Parser<number> {
priority: number;
parse(dateString: string, token: string, match: Match): ParseResult<number>;
validate<DateType extends Date>(_date: DateType, value: number): boolean;
set<DateType extends Date>(
date: DateType,
_flags: ParseFlags,
value: number,
options: ParserOptions,
): DateType;
incompatibleTokens: string[];
}

View File

@@ -0,0 +1,5 @@
export { KoaInstrumentation } from './instrumentation';
export { AttributeNames } from './enums/AttributeNames';
export { KoaLayerType } from './types';
export type { KoaInstrumentationConfig, KoaRequestCustomAttributeFunction, KoaRequestInfo, } from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"migrateDown.d.ts","sourceRoot":"","sources":["../src/migrateDown.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAMhD,wBAAsB,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DrE"}

View File

@@ -0,0 +1,114 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var utils_exports = {};
__export(utils_exports, {
convertIndexToString: () => convertIndexToString,
extractUsedTable: () => extractUsedTable,
getTableConfig: () => getTableConfig,
getViewConfig: () => getViewConfig,
toArray: () => toArray
});
module.exports = __toCommonJS(utils_exports);
var import_entity = require("../entity.cjs");
var import__ = require("../index.cjs");
var import_subquery = require("../subquery.cjs");
var import_table = require("../table.cjs");
var import_view_common = require("../view-common.cjs");
var import_checks = require("./checks.cjs");
var import_foreign_keys = require("./foreign-keys.cjs");
var import_indexes = require("./indexes.cjs");
var import_primary_keys = require("./primary-keys.cjs");
var import_table2 = require("./table.cjs");
var import_unique_constraint = require("./unique-constraint.cjs");
var import_view_common2 = require("./view-common.cjs");
function extractUsedTable(table) {
if ((0, import_entity.is)(table, import_table2.MySqlTable)) {
return [`${table[import_table.Table.Symbol.BaseName]}`];
}
if ((0, import_entity.is)(table, import_subquery.Subquery)) {
return table._.usedTables ?? [];
}
if ((0, import_entity.is)(table, import__.SQL)) {
return table.usedTables ?? [];
}
return [];
}
function getTableConfig(table) {
const columns = Object.values(table[import_table2.MySqlTable.Symbol.Columns]);
const indexes = [];
const checks = [];
const primaryKeys = [];
const uniqueConstraints = [];
const foreignKeys = Object.values(table[import_table2.MySqlTable.Symbol.InlineForeignKeys]);
const name = table[import_table.Table.Symbol.Name];
const schema = table[import_table.Table.Symbol.Schema];
const baseName = table[import_table.Table.Symbol.BaseName];
const extraConfigBuilder = table[import_table2.MySqlTable.Symbol.ExtraConfigBuilder];
if (extraConfigBuilder !== void 0) {
const extraConfig = extraConfigBuilder(table[import_table2.MySqlTable.Symbol.Columns]);
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
for (const builder of Object.values(extraValues)) {
if ((0, import_entity.is)(builder, import_indexes.IndexBuilder)) {
indexes.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_checks.CheckBuilder)) {
checks.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_unique_constraint.UniqueConstraintBuilder)) {
uniqueConstraints.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_primary_keys.PrimaryKeyBuilder)) {
primaryKeys.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_foreign_keys.ForeignKeyBuilder)) {
foreignKeys.push(builder.build(table));
}
}
}
return {
columns,
indexes,
foreignKeys,
checks,
primaryKeys,
uniqueConstraints,
name,
schema,
baseName
};
}
function getViewConfig(view) {
return {
...view[import_view_common.ViewBaseConfig],
...view[import_view_common2.MySqlViewConfig]
};
}
function convertIndexToString(indexes) {
return indexes.map((idx) => {
return typeof idx === "object" ? idx.config.name : idx;
});
}
function toArray(value) {
return Array.isArray(value) ? value : [value];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
convertIndexToString,
extractUsedTable,
getTableConfig,
getViewConfig,
toArray
});
//# sourceMappingURL=utils.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webkit-text-stroke-color.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/webkit-text-stroke-color.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAAiC;IAC/D,IAAI,EAAE,2BAA2B;IACjC,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE,KAAK;IACb,IAAI,oBAA0C;IAC9C,MAAM,EAAE,OAAO;CAClB,CAAC"}

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './chart-column.js';
//# sourceMappingURL=bar-chart-3.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["toWords","React","transformWhereToNaturalLanguage","where","or","length","and","orQuery","andQuery","key","Object","keys","operator","value","Array","isArray","map","val","join","QueryPresetsWhereCell","cellData","_jsx"],"sources":["../../../../../src/elements/QueryPresets/cells/WhereCell/index.tsx"],"sourcesContent":["import type { DefaultCellComponentProps, Where } from 'payload'\n\nimport { toWords } from 'payload/shared'\nimport React from 'react'\n\n/** @todo: improve this */\nconst transformWhereToNaturalLanguage = (where: Where): string => {\n if (where.or && where.or.length > 0 && where.or[0].and && where.or[0].and.length > 0) {\n const orQuery = where.or[0]\n const andQuery = orQuery?.and?.[0]\n\n if (!andQuery || typeof andQuery !== 'object') {\n return 'No where query'\n }\n\n const key = Object.keys(andQuery)[0]\n\n if (!key || !andQuery[key] || typeof andQuery[key] !== 'object') {\n return 'No where query'\n }\n\n const operator = Object.keys(andQuery[key])[0]\n const value = andQuery[key][operator]\n\n if (typeof value === 'string') {\n return `${toWords(key)} ${operator} ${toWords(value)}`\n } else if (Array.isArray(value)) {\n return `${toWords(key)} ${operator} ${value.map((val) => toWords(val)).join(' or ')}`\n }\n }\n\n return ''\n}\n\nexport const QueryPresetsWhereCell: React.FC<DefaultCellComponentProps> = ({ cellData }) => {\n return <div>{cellData ? transformWhereToNaturalLanguage(cellData) : 'No where query'}</div>\n}\n"],"mappings":";AAEA,SAASA,OAAO,QAAQ;AACxB,OAAOC,KAAA,MAAW;AAElB;AACA,MAAMC,+BAAA,GAAmCC,KAAA;EACvC,IAAIA,KAAA,CAAMC,EAAE,IAAID,KAAA,CAAMC,EAAE,CAACC,MAAM,GAAG,KAAKF,KAAA,CAAMC,EAAE,CAAC,EAAE,CAACE,GAAG,IAAIH,KAAA,CAAMC,EAAE,CAAC,EAAE,CAACE,GAAG,CAACD,MAAM,GAAG,GAAG;IACpF,MAAME,OAAA,GAAUJ,KAAA,CAAMC,EAAE,CAAC,EAAE;IAC3B,MAAMI,QAAA,GAAWD,OAAA,EAASD,GAAA,GAAM,EAAE;IAElC,IAAI,CAACE,QAAA,IAAY,OAAOA,QAAA,KAAa,UAAU;MAC7C,OAAO;IACT;IAEA,MAAMC,GAAA,GAAMC,MAAA,CAAOC,IAAI,CAACH,QAAA,CAAS,CAAC,EAAE;IAEpC,IAAI,CAACC,GAAA,IAAO,CAACD,QAAQ,CAACC,GAAA,CAAI,IAAI,OAAOD,QAAQ,CAACC,GAAA,CAAI,KAAK,UAAU;MAC/D,OAAO;IACT;IAEA,MAAMG,QAAA,GAAWF,MAAA,CAAOC,IAAI,CAACH,QAAQ,CAACC,GAAA,CAAI,CAAC,CAAC,EAAE;IAC9C,MAAMI,KAAA,GAAQL,QAAQ,CAACC,GAAA,CAAI,CAACG,QAAA,CAAS;IAErC,IAAI,OAAOC,KAAA,KAAU,UAAU;MAC7B,OAAO,GAAGb,OAAA,CAAQS,GAAA,KAAQG,QAAA,IAAYZ,OAAA,CAAQa,KAAA,GAAQ;IACxD,OAAO,IAAIC,KAAA,CAAMC,OAAO,CAACF,KAAA,GAAQ;MAC/B,OAAO,GAAGb,OAAA,CAAQS,GAAA,KAAQG,QAAA,IAAYC,KAAA,CAAMG,GAAG,CAAEC,GAAA,IAAQjB,OAAA,CAAQiB,GAAA,GAAMC,IAAI,CAAC,SAAS;IACvF;EACF;EAEA,OAAO;AACT;AAEA,OAAO,MAAMC,qBAAA,GAA6DA,CAAC;EAAEC;AAAQ,CAAE;EACrF,oBAAOC,IAAA,CAAC;cAAKD,QAAA,GAAWlB,+BAAA,CAAgCkB,QAAA,IAAY;;AACtE","ignoreList":[]}

View File

@@ -0,0 +1,10 @@
import collectElements from './collectElements';
/**
* Collects all parent elements of a given element.
*
* @param node the element
*/
export default function parents(node) {
return collectElements(node, 'parentElement');
}

View File

@@ -0,0 +1,28 @@
/**
* This method is like `_.tap` except that it returns the result of `interceptor`.
* The purpose of this method is to "pass thru" values replacing intermediate
* results in a method chain sequence.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Seq
* @param {*} value The value to provide to `interceptor`.
* @param {Function} interceptor The function to invoke.
* @returns {*} Returns the result of `interceptor`.
* @example
*
* _(' abc ')
* .chain()
* .trim()
* .thru(function(value) {
* return [value];
* })
* .value();
* // => ['abc']
*/
function thru(value, interceptor) {
return interceptor(value);
}
module.exports = thru;

View File

@@ -0,0 +1 @@
Prism.languages.supercollider={comment:{pattern:/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,lookbehind:!0,greedy:!0},char:{pattern:/\$(?:[^\\\r\n]|\\.)/,greedy:!0},symbol:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|arg|classvar|const|nil|var|while)\b/,boolean:/\b(?:false|true)\b/,label:{pattern:/\b[a-z_]\w*(?=\s*:)/,alias:"property"},number:/\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,"class-name":/\b[A-Z]\w*\b/,operator:/\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,punctuation:/[{}()[\].:,;]|#[[{]/},Prism.languages.sclang=Prism.languages.supercollider;

View File

@@ -0,0 +1,6 @@
import fs from 'fs';
/**
* Wrapper around `fs.watch` that provides a workaround
* for https://github.com/nodejs/node/issues/5039.
*/
export default function watchFile(filepath: string, callback: () => void): fs.FSWatcher;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EACL,IAAI,EACJ,sBAAsB,EACtB,wCAAwC,EACxC,8BAA8B,GAC/B,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAExE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAEL,2CAA2C,IAAI,2BAA2B,GAC3E,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,KAAK,EACL,eAAe,EACf,KAAK,EACL,WAAW,EACX,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,2BAA2B,EAE3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,QAAQ,EACR,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,GAAG,EACH,gBAAgB,EAChB,uBAAuB,EACvB,kCAAkC,EAClC,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,MAAM,EACN,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,EAClB,8BAA8B,EAC9B,+BAA+B,EAE/B,cAAc,EAEd,8BAA8B,EAC9B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,eAAe,EACf,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC"}

View File

@@ -0,0 +1,63 @@
'use strict';
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + `0${i.toString(16)}`.slice(-2), "");
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readInt16LE = (input, offset = 0) => getView(input, offset).getInt16(0, true);
var readUInt24LE = (input, offset = 0) => {
const view = getView(input, offset);
return view.getUint16(0, true) + (view.getUint8(2) << 16);
};
// lib/types/webp.ts
function calculateExtended(input) {
return {
height: 1 + readUInt24LE(input, 7),
width: 1 + readUInt24LE(input, 4)
};
}
function calculateLossless(input) {
return {
height: 1 + ((input[4] & 15) << 10 | input[3] << 2 | (input[2] & 192) >> 6),
width: 1 + ((input[2] & 63) << 8 | input[1])
};
}
function calculateLossy(input) {
return {
height: readInt16LE(input, 8) & 16383,
width: readInt16LE(input, 6) & 16383
};
}
var WEBP = {
validate(input) {
const riffHeader = "RIFF" === toUTF8String(input, 0, 4);
const webpHeader = "WEBP" === toUTF8String(input, 8, 12);
const vp8Header = "VP8" === toUTF8String(input, 12, 15);
return riffHeader && webpHeader && vp8Header;
},
calculate(_input) {
const chunkHeader = toUTF8String(_input, 12, 16);
const input = _input.slice(20, 30);
if (chunkHeader === "VP8X") {
const extendedHeader = input[0];
const validStart = (extendedHeader & 192) === 0;
const validEnd = (extendedHeader & 1) === 0;
if (validStart && validEnd) {
return calculateExtended(input);
}
throw new TypeError("Invalid WebP");
}
if (chunkHeader === "VP8 " && input[0] !== 47) {
return calculateLossy(input);
}
const signature = toHexString(input, 3, 6);
if (chunkHeader === "VP8L" && signature !== "9d012a") {
return calculateLossless(input);
}
throw new TypeError("Invalid WebP");
}
};
exports.WEBP = WEBP;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"optionsReducer.d.ts","sourceRoot":"","sources":["../../../../../src/elements/WhereBuilder/Condition/Relationship/optionsReducer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAWhD,QAAA,MAAM,cAAc,UAAW,MAAM,EAAE,UAAU,MAAM,KAAG,MAAM,EAuE/D,CAAA;AAED,eAAe,cAAc,CAAA"}

View File

@@ -0,0 +1,495 @@
"use strict";
var _core = require("./core.js");
var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("Flow");
const defineInterfaceishType = name => {
const isDeclareClass = name === "DeclareClass";
defineType(name, {
builder: ["id", "typeParameters", "extends", "body"],
visitor: ["id", "typeParameters", "extends", ...(isDeclareClass ? ["mixins", "implements"] : []), "body"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends"))
}, isDeclareClass ? {
mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements"))
} : {}, {
body: (0, _utils.validateType)("ObjectTypeAnnotation")
})
});
};
defineType("AnyTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ArrayTypeAnnotation", {
visitor: ["elementType"],
aliases: ["FlowType"],
fields: {
elementType: (0, _utils.validateType)("FlowType")
}
});
defineType("BooleanTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("BooleanLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("NullLiteralTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ClassImplements", {
visitor: ["id", "typeParameters"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineInterfaceishType("DeclareClass");
defineType("DeclareFunction", {
builder: ["id"],
visitor: ["id", "predicate"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
}
});
defineInterfaceishType("DeclareInterface");
defineType("DeclareModule", {
builder: ["id", "body", "kind"],
visitor: ["id", "body"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier", "StringLiteral"),
body: (0, _utils.validateType)("BlockStatement"),
kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
}
});
defineType("DeclareModuleExports", {
visitor: ["typeAnnotation"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
}
});
defineType("DeclareTypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
right: (0, _utils.validateType)("FlowType")
}
});
defineType("DeclareOpaqueType", {
visitor: ["id", "typeParameters", "supertype"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
supertype: (0, _utils.validateOptionalType)("FlowType"),
impltype: (0, _utils.validateOptionalType)("FlowType")
}
});
defineType("DeclareVariable", {
visitor: ["id"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier")
}
});
defineType("DeclareExportDeclaration", {
visitor: ["declaration", "specifiers", "source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
declaration: (0, _utils.validateOptionalType)("Flow"),
specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ExportSpecifier", "ExportNamespaceSpecifier")),
source: (0, _utils.validateOptionalType)("StringLiteral"),
default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}, _core.importAttributes)
});
defineType("DeclareExportAllDeclaration", {
visitor: ["source", "attributes"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: Object.assign({
source: (0, _utils.validateType)("StringLiteral"),
exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
}, _core.importAttributes)
});
defineType("DeclaredPredicate", {
visitor: ["value"],
aliases: ["FlowPredicate"],
fields: {
value: (0, _utils.validateType)("Flow")
}
});
defineType("ExistsTypeAnnotation", {
aliases: ["FlowType"]
});
defineType("FunctionTypeAnnotation", {
builder: ["typeParameters", "params", "rest", "returnType"],
visitor: ["typeParameters", "this", "params", "rest", "returnType"],
aliases: ["FlowType"],
fields: {
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
params: (0, _utils.validateArrayOfType)("FunctionTypeParam"),
rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
returnType: (0, _utils.validateType)("FlowType")
}
});
defineType("FunctionTypeParam", {
visitor: ["name", "typeAnnotation"],
fields: {
name: (0, _utils.validateOptionalType)("Identifier"),
typeAnnotation: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}
});
defineType("GenericTypeAnnotation", {
visitor: ["id", "typeParameters"],
aliases: ["FlowType"],
fields: {
id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineType("InferredPredicate", {
aliases: ["FlowPredicate"]
});
defineType("InterfaceExtends", {
visitor: ["id", "typeParameters"],
fields: {
id: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
}
});
defineInterfaceishType("InterfaceDeclaration");
defineType("InterfaceTypeAnnotation", {
visitor: ["extends", "body"],
aliases: ["FlowType"],
fields: {
extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
body: (0, _utils.validateType)("ObjectTypeAnnotation")
}
});
defineType("IntersectionTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("MixedTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("EmptyTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("NullableTypeAnnotation", {
visitor: ["typeAnnotation"],
aliases: ["FlowType"],
fields: {
typeAnnotation: (0, _utils.validateType)("FlowType")
}
});
defineType("NumberLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
}
});
defineType("NumberTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ObjectTypeAnnotation", {
visitor: ["properties", "indexers", "callProperties", "internalSlots"],
aliases: ["FlowType"],
builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
fields: {
properties: (0, _utils.validate)((0, _utils.arrayOfType)("ObjectTypeProperty", "ObjectTypeSpreadProperty")),
indexers: {
validate: (0, _utils.arrayOfType)("ObjectTypeIndexer"),
optional: true,
default: []
},
callProperties: {
validate: (0, _utils.arrayOfType)("ObjectTypeCallProperty"),
optional: true,
default: []
},
internalSlots: {
validate: (0, _utils.arrayOfType)("ObjectTypeInternalSlot"),
optional: true,
default: []
},
exact: {
validate: (0, _utils.assertValueType)("boolean"),
default: false
},
inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeInternalSlot", {
visitor: ["id", "value"],
builder: ["id", "value", "optional", "static", "method"],
aliases: ["UserWhitespacable"],
fields: {
id: (0, _utils.validateType)("Identifier"),
value: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeCallProperty", {
visitor: ["value"],
aliases: ["UserWhitespacable"],
fields: {
value: (0, _utils.validateType)("FlowType"),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeIndexer", {
visitor: ["variance", "id", "key", "value"],
builder: ["id", "key", "value", "variance"],
aliases: ["UserWhitespacable"],
fields: {
id: (0, _utils.validateOptionalType)("Identifier"),
key: (0, _utils.validateType)("FlowType"),
value: (0, _utils.validateType)("FlowType"),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
variance: (0, _utils.validateOptionalType)("Variance")
}
});
defineType("ObjectTypeProperty", {
visitor: ["key", "value", "variance"],
aliases: ["UserWhitespacable"],
fields: {
key: (0, _utils.validateType)("Identifier", "StringLiteral"),
value: (0, _utils.validateType)("FlowType"),
kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
variance: (0, _utils.validateOptionalType)("Variance"),
method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("ObjectTypeSpreadProperty", {
visitor: ["argument"],
aliases: ["UserWhitespacable"],
fields: {
argument: (0, _utils.validateType)("FlowType")
}
});
defineType("OpaqueType", {
visitor: ["id", "typeParameters", "supertype", "impltype"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
supertype: (0, _utils.validateOptionalType)("FlowType"),
impltype: (0, _utils.validateType)("FlowType")
}
});
defineType("QualifiedTypeIdentifier", {
visitor: ["qualification", "id"],
builder: ["id", "qualification"],
fields: {
id: (0, _utils.validateType)("Identifier"),
qualification: (0, _utils.validateType)("Identifier", "QualifiedTypeIdentifier")
}
});
defineType("StringLiteralTypeAnnotation", {
builder: ["value"],
aliases: ["FlowType"],
fields: {
value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
}
});
defineType("StringTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("SymbolTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("ThisTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("TupleTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("TypeofTypeAnnotation", {
visitor: ["argument"],
aliases: ["FlowType"],
fields: {
argument: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeAlias", {
visitor: ["id", "typeParameters", "right"],
aliases: ["FlowDeclaration", "Statement", "Declaration"],
fields: {
id: (0, _utils.validateType)("Identifier"),
typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
right: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeAnnotation", {
visitor: ["typeAnnotation"],
fields: {
typeAnnotation: (0, _utils.validateType)("FlowType")
}
});
defineType("TypeCastExpression", {
visitor: ["expression", "typeAnnotation"],
aliases: ["ExpressionWrapper", "Expression"],
fields: {
expression: (0, _utils.validateType)("Expression"),
typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
}
});
defineType("TypeParameter", {
visitor: ["bound", "default", "variance"],
fields: {
name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
default: (0, _utils.validateOptionalType)("FlowType"),
variance: (0, _utils.validateOptionalType)("Variance")
}
});
defineType("TypeParameterDeclaration", {
visitor: ["params"],
fields: {
params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
}
});
defineType("TypeParameterInstantiation", {
visitor: ["params"],
fields: {
params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("UnionTypeAnnotation", {
visitor: ["types"],
aliases: ["FlowType"],
fields: {
types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
}
});
defineType("Variance", {
builder: ["kind"],
fields: {
kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
}
});
defineType("VoidTypeAnnotation", {
aliases: ["FlowType", "FlowBaseAnnotation"]
});
defineType("EnumDeclaration", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
id: (0, _utils.validateType)("Identifier"),
body: (0, _utils.validateType)("EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody")
}
});
defineType("EnumBooleanBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumNumberBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumStringBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
members: (0, _utils.validateArrayOfType)("EnumStringMember", "EnumDefaultedMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumSymbolBody", {
aliases: ["EnumBody"],
visitor: ["members"],
fields: {
members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
defineType("EnumBooleanMember", {
aliases: ["EnumMember"],
builder: ["id"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("BooleanLiteral")
}
});
defineType("EnumNumberMember", {
aliases: ["EnumMember"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("NumericLiteral")
}
});
defineType("EnumStringMember", {
aliases: ["EnumMember"],
visitor: ["id", "init"],
fields: {
id: (0, _utils.validateType)("Identifier"),
init: (0, _utils.validateType)("StringLiteral")
}
});
defineType("EnumDefaultedMember", {
aliases: ["EnumMember"],
visitor: ["id"],
fields: {
id: (0, _utils.validateType)("Identifier")
}
});
defineType("IndexedAccessType", {
visitor: ["objectType", "indexType"],
aliases: ["FlowType"],
fields: {
objectType: (0, _utils.validateType)("FlowType"),
indexType: (0, _utils.validateType)("FlowType")
}
});
defineType("OptionalIndexedAccessType", {
visitor: ["objectType", "indexType"],
aliases: ["FlowType"],
fields: {
objectType: (0, _utils.validateType)("FlowType"),
indexType: (0, _utils.validateType)("FlowType"),
optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
}
});
//# sourceMappingURL=flow.js.map

View File

@@ -0,0 +1,149 @@
import { ReservedFieldName } from '../../errors/index.js';
import { sanitizeCollection } from '../../collections/config/sanitize.js';
import { describe, it, expect } from 'vitest';
describe('reservedFieldNames - collections -', ()=>{
const config = {
collections: [],
globals: []
};
describe('uploads -', ()=>{
const collectionWithUploads = {
slug: 'collection-with-uploads',
fields: [],
upload: true
};
it('should throw on file', async ()=>{
const fields = [
{
name: 'file',
type: 'text',
label: 'some-collection'
}
];
await expect(async ()=>{
await sanitizeCollection(// @ts-expect-error
{
...config,
collections: [
{
...collectionWithUploads,
fields
}
]
}, {
...collectionWithUploads,
fields
});
}).rejects.toThrow(ReservedFieldName);
});
it('should not throw on a custom field', async ()=>{
const fields = [
{
name: 'customField',
type: 'text',
label: 'some-collection'
}
];
await expect(async ()=>{
await sanitizeCollection(// @ts-expect-error
{
...config,
collections: [
{
...collectionWithUploads,
fields
}
]
}, {
...collectionWithUploads,
fields
});
}).not.toThrow();
});
});
describe('auth -', ()=>{
const collectionWithAuth = {
slug: 'collection-with-auth',
auth: {
loginWithUsername: true,
useAPIKey: true,
verify: true
},
fields: []
};
it('should throw on hash', async ()=>{
const fields = [
{
name: 'hash',
type: 'text',
label: 'some-collection'
}
];
await expect(async ()=>{
await sanitizeCollection(// @ts-expect-error
{
...config,
collections: [
{
...collectionWithAuth,
fields
}
]
}, {
...collectionWithAuth,
fields
});
}).rejects.toThrow(ReservedFieldName);
});
it('should throw on salt', async ()=>{
const fields = [
{
name: 'salt',
type: 'text',
label: 'some-collection'
}
];
await expect(async ()=>{
await sanitizeCollection(// @ts-expect-error
{
...config,
collections: [
{
...collectionWithAuth,
fields
}
]
}, {
...collectionWithAuth,
fields
});
}).rejects.toThrow(ReservedFieldName);
});
it('should not throw on a custom field', async ()=>{
const fields = [
{
name: 'customField',
type: 'text',
label: 'some-collection'
}
];
await expect(async ()=>{
await sanitizeCollection(// @ts-expect-error
{
...config,
collections: [
{
...collectionWithAuth,
fields
}
]
}, {
...collectionWithAuth,
fields
});
}).not.toThrow();
});
});
});
//# sourceMappingURL=reservedFieldNames.spec.js.map

View File

@@ -0,0 +1,13 @@
import type {CodeKeywordDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {checkStrictMode} from "../../compile/util"
const def: CodeKeywordDefinition = {
keyword: ["then", "else"],
schemaType: ["object", "boolean"],
code({keyword, parentSchema, it}: KeywordCxt) {
if (parentSchema.if === undefined) checkStrictMode(it, `"${keyword}" without "if" is ignored`)
},
}
export default def

View File

@@ -0,0 +1 @@
{"version":3,"file":"signal-medium.js","sources":["../../../src/icons/signal-medium.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SignalMedium\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMGguMDEiIC8+CiAgPHBhdGggZD0iTTcgMjB2LTQiIC8+CiAgPHBhdGggZD0iTTEyIDIwdi04IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/signal-medium\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 SignalMedium = createLucideIcon('SignalMedium', [\n ['path', { d: 'M2 20h.01', key: '4haj6o' }],\n ['path', { d: 'M7 20v-4', key: 'j294jx' }],\n ['path', { d: 'M12 20v-8', key: 'i3yub9' }],\n]);\n\nexport default SignalMedium;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,238 @@
declare namespace webpack {
type DeclinedEvent =
| {
type: "declined";
/** The module in question. */
moduleId: number | string;
/** the chain from where the update was propagated. */
chain: (number | string)[];
/** the module id of the declining parent */
parentId: number | string;
}
| {
type: "self-declined";
/** The module in question. */
moduleId: number | string;
/** the chain from where the update was propagated. */
chain: (number | string)[];
};
type UnacceptedEvent = {
type: "unaccepted";
/** The module in question. */
moduleId: number | string;
/** the chain from where the update was propagated. */
chain: (number | string)[];
};
type AcceptedEvent = {
type: "accepted";
/** The module in question. */
moduleId: number | string;
/** the modules that are outdated and will be disposed */
outdatedModules: (number | string)[];
/** the accepted dependencies that are outdated */
outdatedDependencies: {
[id: number]: (number | string)[];
};
};
type DisposedEvent = {
type: "disposed";
/** The module in question. */
moduleId: number | string;
};
type ErroredEvent =
| {
type: "accept-error-handler-errored";
/** The module in question. */
moduleId: number | string;
/** the module id owning the accept handler. */
dependencyId: number | string;
/** the thrown error */
error: Error;
/** the error thrown by the module before the error handler tried to handle it. */
originalError: Error;
}
| {
type: "self-accept-error-handler-errored";
/** The module in question. */
moduleId: number | string;
/** the thrown error */
error: Error;
/** the error thrown by the module before the error handler tried to handle it. */
originalError: Error;
}
| {
type: "accept-errored";
/** The module in question. */
moduleId: number | string;
/** the module id owning the accept handler. */
dependencyId: number | string;
/** the thrown error */
error: Error;
}
| {
type: "self-accept-errored";
/** The module in question. */
moduleId: number | string;
/** the thrown error */
error: Error;
};
type HotEvent =
| DeclinedEvent
| UnacceptedEvent
| AcceptedEvent
| DisposedEvent
| ErroredEvent;
interface ApplyOptions {
ignoreUnaccepted?: boolean;
ignoreDeclined?: boolean;
ignoreErrored?: boolean;
onDeclined?: (event: DeclinedEvent) => void;
onUnaccepted?: (event: UnacceptedEvent) => void;
onAccepted?: (event: AcceptedEvent) => void;
onDisposed?: (event: DisposedEvent) => void;
onErrored?: (event: ErroredEvent) => void;
}
const enum HotUpdateStatus {
idle = "idle",
check = "check",
prepare = "prepare",
ready = "ready",
dispose = "dispose",
apply = "apply",
abort = "abort",
fail = "fail"
}
interface Hot {
accept: {
(
modules: string | string[],
callback?: (outdatedDependencies: string[]) => void,
errorHandler?: (
err: Error,
context: { moduleId: string | number; dependencyId: string | number }
) => void
): void;
(
errorHandler?: (
err: Error,
ids: { moduleId: string | number; module: NodeJS.Module }
) => void
): void;
};
status(): HotUpdateStatus;
decline(module?: string | string[]): void;
dispose(callback: (data: object) => void): void;
addDisposeHandler(callback: (data: object) => void): void;
removeDisposeHandler(callback: (data: object) => void): void;
invalidate(): void;
addStatusHandler(callback: (status: HotUpdateStatus) => void): void;
removeStatusHandler(callback: (status: HotUpdateStatus) => void): void;
data: object;
check(
autoApply?: boolean | ApplyOptions
): Promise<(string | number)[] | null>;
apply(options?: ApplyOptions): Promise<(string | number)[] | null>;
}
interface ExportInfo {
used: boolean;
provideInfo: boolean | null | undefined;
useInfo: boolean | null | undefined;
canMangle: boolean;
}
interface ExportsInfo {
[k: string]: ExportInfo & ExportsInfo;
}
interface Context {
resolve(dependency: string): string | number;
keys(): Array<string>;
id: string | number;
(dependency: string): unknown;
}
}
interface ImportMetaEnv {
[key: string]: string | boolean | undefined;
}
interface ImportMeta {
url: string;
webpack: number;
webpackHot: webpack.Hot;
env: ImportMetaEnv;
webpackContext: (
request: string,
options?: {
recursive?: boolean;
regExp?: RegExp;
include?: RegExp;
exclude?: RegExp;
preload?: boolean | number;
prefetch?: boolean | number;
fetchPriority?: "low" | "high" | "auto";
chunkName?: string;
exports?: string | string[][];
mode?: "sync" | "eager" | "weak" | "lazy" | "lazy-once";
}
) => webpack.Context;
}
declare const __resourceQuery: string;
declare var __webpack_public_path__: string;
declare var __webpack_nonce__: string;
declare const __webpack_chunkname__: string;
declare var __webpack_base_uri__: string;
declare var __webpack_runtime_id__: string;
declare const __webpack_hash__: string;
declare const __webpack_modules__: Record<string | number, NodeJS.Module>;
declare const __webpack_require__: (id: string | number) => unknown;
declare var __webpack_chunk_load__: (chunkId: string | number) => Promise<void>;
declare var __webpack_get_script_filename__: (
chunkId: string | number
) => string;
declare var __webpack_is_included__: (request: string) => boolean;
declare var __webpack_exports_info__: webpack.ExportsInfo;
declare const __webpack_share_scopes__: Record<
string,
Record<
string,
{ loaded?: 1; get: () => Promise<unknown>; from: string; eager: boolean }
>
>;
declare var __webpack_init_sharing__: (scope: string) => Promise<void>;
declare var __non_webpack_require__: (id: any) => unknown;
declare const __system_context__: object;
declare namespace NodeJS {
interface Module {
hot: webpack.Hot;
}
interface Require {
ensure(
dependencies: string[],
callback: (require: (module: string) => void) => void,
errorCallback?: (error: Error) => void,
chunkName?: string
): void;
context(
request: string,
includeSubdirectories?: boolean,
filter?: RegExp,
mode?: "sync" | "eager" | "weak" | "lazy" | "lazy-once"
): webpack.Context;
include(dependency: string): void;
resolveWeak(dependency: string): void;
onError?: (error: Error) => void;
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/views/List/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IACjD,oBAAoB,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,CAAA;CACjF,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,yBAAyB,CAAA;CACtC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,QAAQ,EACR,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n SDK_INFO,\n _globalThis,\n otperformance,\n getBooleanFromEnv,\n getStringFromEnv,\n getNumberFromEnv,\n getStringListFromEnv,\n} from './node';\n"]}

View File

@@ -0,0 +1,516 @@
import { constructFrom } from "./constructFrom.mjs";
import { getDefaultOptions } from "./getDefaultOptions.mjs";
import { defaultLocale } from "./_lib/defaultLocale.mjs";
import { toDate } from "./toDate.mjs";
import { longFormatters } from "./_lib/format/longFormatters.mjs";
import {
isProtectedDayOfYearToken,
isProtectedWeekYearToken,
warnOrThrowProtectedError,
} from "./_lib/protectedTokens.mjs";
import { parsers } from "./parse/_lib/parsers.mjs";
import { DateToSystemTimezoneSetter } from "./parse/_lib/Setter.mjs";
// Rexports of internal for libraries to use.
// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
export { longFormatters, parsers };
/**
* The {@link parse} function options.
*/
// 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 notWhitespaceRegExp = /\S/;
const unescapedLatinCharacterRegExp = /[a-zA-Z]/;
/**
* @name parse
* @category Common Helpers
* @summary Parse the date.
*
* @description
* Return the date parsed from string using the given format string.
*
* > ⚠️ 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 in the format string 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.
*
* Format of the format 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 5 below the table).
*
* Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited
* and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:
*
* ```javascript
* parse('23 AM', 'HH a', new Date())
* //=> RangeError: The format string mustn't contain `HH` and `a` at the same time
* ```
*
* See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true
*
* Accepted format string patterns:
* | Unit |Prior| Pattern | Result examples | Notes |
* |---------------------------------|-----|---------|-----------------------------------|-------|
* | Era | 140 | G..GGG | AD, BC | |
* | | | GGGG | Anno Domini, Before Christ | 2 |
* | | | GGGGG | A, B | |
* | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |
* | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | yy | 44, 01, 00, 17 | 4 |
* | | | yyy | 044, 001, 123, 999 | 4 |
* | | | yyyy | 0044, 0001, 1900, 2017 | 4 |
* | | | yyyyy | ... | 2,4 |
* | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |
* | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |
* | | | YY | 44, 01, 00, 17 | 4,6 |
* | | | YYY | 044, 001, 123, 999 | 4 |
* | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |
* | | | YYYYY | ... | 2,4 |
* | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |
* | | | RR | -43, 01, 00, 17 | 4,5 |
* | | | RRR | -043, 001, 123, 999, -999 | 4,5 |
* | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |
* | | | RRRRR | ... | 2,4,5 |
* | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |
* | | | uu | -43, 01, 99, -99 | 4 |
* | | | uuu | -043, 001, 123, 999, -999 | 4 |
* | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |
* | | | uuuuu | ... | 2,4 |
* | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |
* | | | Qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | 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) | 120 | q | 1, 2, 3, 4 | |
* | | | qo | 1st, 2nd, 3rd, 4th | 5 |
* | | | qq | 01, 02, 03, 04 | |
* | | | qqq | Q1, Q2, Q3, Q4 | |
* | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
* | | | qqqqq | 1, 2, 3, 4 | 3 |
* | Month (formatting) | 110 | M | 1, 2, ..., 12 | |
* | | | Mo | 1st, 2nd, ..., 12th | 5 |
* | | | MM | 01, 02, ..., 12 | |
* | | | MMM | Jan, Feb, ..., Dec | |
* | | | MMMM | January, February, ..., December | 2 |
* | | | MMMMM | J, F, ..., D | |
* | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |
* | | | Lo | 1st, 2nd, ..., 12th | 5 |
* | | | LL | 01, 02, ..., 12 | |
* | | | LLL | Jan, Feb, ..., Dec | |
* | | | LLLL | January, February, ..., December | 2 |
* | | | LLLLL | J, F, ..., D | |
* | Local week of year | 100 | w | 1, 2, ..., 53 | |
* | | | wo | 1st, 2nd, ..., 53th | 5 |
* | | | ww | 01, 02, ..., 53 | |
* | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |
* | | | Io | 1st, 2nd, ..., 53th | 5 |
* | | | II | 01, 02, ..., 53 | 5 |
* | Day of month | 90 | d | 1, 2, ..., 31 | |
* | | | do | 1st, 2nd, ..., 31st | 5 |
* | | | dd | 01, 02, ..., 31 | |
* | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |
* | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |
* | | | DD | 01, 02, ..., 365, 366 | 7 |
* | | | DDD | 001, 002, ..., 365, 366 | |
* | | | DDDD | ... | 2 |
* | Day of week (formatting) | 90 | 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) | 90 | i | 1, 2, 3, ..., 7 | 5 |
* | | | io | 1st, 2nd, ..., 7th | 5 |
* | | | ii | 01, 02, ..., 07 | 5 |
* | | | iii | Mon, Tue, Wed, ..., Sun | 5 |
* | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |
* | | | iiiii | M, T, W, T, F, S, S | 5 |
* | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |
* | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |
* | | | eo | 2nd, 3rd, ..., 1st | 5 |
* | | | 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) | 90 | c | 2, 3, 4, ..., 1 | |
* | | | co | 2nd, 3rd, ..., 1st | 5 |
* | | | 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 | 80 | a..aaa | AM, PM | |
* | | | aaaa | a.m., p.m. | 2 |
* | | | aaaaa | a, p | |
* | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |
* | | | bbbb | a.m., p.m., noon, midnight | 2 |
* | | | bbbbb | a, p, n, mi | |
* | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |
* | | | BBBB | at night, in the morning, ... | 2 |
* | | | BBBBB | at night, in the morning, ... | |
* | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |
* | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |
* | | | hh | 01, 02, ..., 11, 12 | |
* | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |
* | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |
* | | | HH | 00, 01, 02, ..., 23 | |
* | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |
* | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |
* | | | KK | 01, 02, ..., 11, 00 | |
* | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |
* | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |
* | | | kk | 24, 01, 02, ..., 23 | |
* | Minute | 60 | m | 0, 1, ..., 59 | |
* | | | mo | 0th, 1st, ..., 59th | 5 |
* | | | mm | 00, 01, ..., 59 | |
* | Second | 50 | s | 0, 1, ..., 59 | |
* | | | so | 0th, 1st, ..., 59th | 5 |
* | | | ss | 00, 01, ..., 59 | |
* | Seconds timestamp | 40 | t | 512969520 | |
* | | | tt | ... | 2 |
* | Fraction of second | 30 | S | 0, 1, ..., 9 | |
* | | | SS | 00, 01, ..., 99 | |
* | | | SSS | 000, 001, ..., 999 | |
* | | | SSSS | ... | 2 |
* | Milliseconds timestamp | 20 | T | 512969520900 | |
* | | | TT | ... | 2 |
* | Timezone (ISO-8601 w/ Z) | 10 | 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) | 10 | 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 | |
* | Long localized date | NA | P | 05/29/1453 | 5,8 |
* | | | PP | May 29, 1453 | |
* | | | PPP | May 29th, 1453 | |
* | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |
* | Long localized time | NA | p | 12:00 AM | 5,8 |
* | | | pp | 12:00:00 AM | |
* | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |
* | | | PPpp | May 29, 1453, 12:00:00 AM | |
* | | | PPPpp | May 29th, 1453 at ... | |
* | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |
* 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.
* In `format` function, they will produce different result:
*
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
*
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
*
* `parse` will try to match both formatting and stand-alone units interchangably.
*
* 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:
* - for numerical units (`yyyyyyyy`) `parse` will try to match a number
* as wide as the sequence
* - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.
* These variations are marked with "2" in the last column of the table.
*
* 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
* These tokens represent the shortest form of the quarter.
*
* 4. 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` will try to guess the century of two digit year by proximity with `referenceDate`:
*
* `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`
*
* `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`
*
* while `uu` will just assign the year as is:
*
* `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`
*
* `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`
*
* 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 [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)
* and [setWeekYear](https://date-fns.org/docs/setWeekYear)).
*
* 5. 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
* - `o`: ordinal number modifier
* - `P`: long localized date
* - `p`: long localized time
*
* 6. `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
*
* 7. `D` and `DD` tokens represent days of the year but they are ofthen 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
*
* 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based
* on the given locale.
*
* using `en-US` locale: `P` => `MM/dd/yyyy`
* using `en-US` locale: `p` => `hh:mm a`
* using `pt-BR` locale: `P` => `dd/MM/yyyy`
* using `pt-BR` locale: `p` => `HH:mm`
*
* Values will be assigned to the date in the descending order of its unit's priority.
* Units of an equal priority overwrite each other in the order of appearance.
*
* If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),
* the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.
*
* `referenceDate` must be passed for correct work of the function.
* If you're not sure which `referenceDate` to supply, create a new instance of Date:
* `parse('02/11/2014', 'MM/dd/yyyy', new Date())`
* In this case parsing will be done in the context of the current date.
* If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,
* then `Invalid Date` will be returned.
*
* The result may vary by locale.
*
* If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.
*
* If parsing failed, `Invalid Date` will be returned.
* Invalid Date is a Date, whose time value is NaN.
* Time value of Date: http://es5.github.io/#x15.9.1.1
*
* @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 dateStr - The string to parse
* @param formatStr - The string of tokens
* @param referenceDate - defines values missing from the parsed dateString
* @param options - An object with options.
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
* see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
*
* @returns The parsed date
*
* @throws `options.locale` must contain `match` 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
* // Parse 11 February 2014 from middle-endian format:
* var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())
* //=> Tue Feb 11 2014 00:00:00
*
* @example
* // Parse 28th of February in Esperanto locale in the context of 2010 year:
* import eo from 'date-fns/locale/eo'
* var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), {
* locale: eo
* })
* //=> Sun Feb 28 2010 00:00:00
*/
export function parse(dateStr, formatStr, referenceDate, 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;
if (formatStr === "") {
if (dateStr === "") {
return toDate(referenceDate);
} else {
return constructFrom(referenceDate, NaN);
}
}
const subFnOptions = {
firstWeekContainsDate,
weekStartsOn,
locale,
};
// If timezone isn't specified, it will be set to the system timezone
const setters = [new DateToSystemTimezoneSetter()];
const tokens = formatStr
.match(longFormattingTokensRegExp)
.map((substring) => {
const firstCharacter = substring[0];
if (firstCharacter in longFormatters) {
const longFormatter = longFormatters[firstCharacter];
return longFormatter(substring, locale.formatLong);
}
return substring;
})
.join("")
.match(formattingTokensRegExp);
const usedTokens = [];
for (let token of tokens) {
if (
!options?.useAdditionalWeekYearTokens &&
isProtectedWeekYearToken(token)
) {
warnOrThrowProtectedError(token, formatStr, dateStr);
}
if (
!options?.useAdditionalDayOfYearTokens &&
isProtectedDayOfYearToken(token)
) {
warnOrThrowProtectedError(token, formatStr, dateStr);
}
const firstCharacter = token[0];
const parser = parsers[firstCharacter];
if (parser) {
const { incompatibleTokens } = parser;
if (Array.isArray(incompatibleTokens)) {
const incompatibleToken = usedTokens.find(
(usedToken) =>
incompatibleTokens.includes(usedToken.token) ||
usedToken.token === firstCharacter,
);
if (incompatibleToken) {
throw new RangeError(
`The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`,
);
}
} else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) {
throw new RangeError(
`The format string mustn't contain \`${token}\` and any other token at the same time`,
);
}
usedTokens.push({ token: firstCharacter, fullToken: token });
const parseResult = parser.run(
dateStr,
token,
locale.match,
subFnOptions,
);
if (!parseResult) {
return constructFrom(referenceDate, NaN);
}
setters.push(parseResult.setter);
dateStr = parseResult.rest;
} else {
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
throw new RangeError(
"Format string contains an unescaped latin alphabet character `" +
firstCharacter +
"`",
);
}
// Replace two single quote characters with one single quote character
if (token === "''") {
token = "'";
} else if (firstCharacter === "'") {
token = cleanEscapedString(token);
}
// Cut token from string, or, if string doesn't match the token, return Invalid Date
if (dateStr.indexOf(token) === 0) {
dateStr = dateStr.slice(token.length);
} else {
return constructFrom(referenceDate, NaN);
}
}
}
// Check if the remaining input contains something other than whitespace
if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {
return constructFrom(referenceDate, NaN);
}
const uniquePrioritySetters = setters
.map((setter) => setter.priority)
.sort((a, b) => b - a)
.filter((priority, index, array) => array.indexOf(priority) === index)
.map((priority) =>
setters
.filter((setter) => setter.priority === priority)
.sort((a, b) => b.subPriority - a.subPriority),
)
.map((setterArray) => setterArray[0]);
let date = toDate(referenceDate);
if (isNaN(date.getTime())) {
return constructFrom(referenceDate, NaN);
}
const flags = {};
for (const setter of uniquePrioritySetters) {
if (!setter.validate(date, subFnOptions)) {
return constructFrom(referenceDate, NaN);
}
const result = setter.set(date, flags, subFnOptions);
// Result is tuple (date, flags)
if (Array.isArray(result)) {
date = result[0];
Object.assign(flags, result[1]);
// Result is date
} else {
date = result;
}
}
return constructFrom(referenceDate, date);
}
function cleanEscapedString(input) {
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
}
// Fallback for modularized imports:
export default parse;

View File

@@ -0,0 +1,6 @@
export declare const previousWednesdayWithOptions: import("./types.js").FPFn2<
Date,
| import("../previousWednesday.js").PreviousWednesdayOptions<Date>
| undefined,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,20 @@
import { addDataAndFileToRequest } from './addDataAndFileToRequest.js';
import { addLocalesToRequestFromData } from './addLocalesToRequest.js';
export const wrapInternalEndpoints = (endpoints)=>{
return endpoints.map((endpoint)=>{
const handler = endpoint.handler;
if ([
'patch',
'post'
].includes(endpoint.method)) {
endpoint.handler = async (req)=>{
await addDataAndFileToRequest(req);
addLocalesToRequestFromData(req);
return handler(req);
};
}
return endpoint;
});
};
//# sourceMappingURL=wrapInternalEndpoints.js.map

View File

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

View File

@@ -0,0 +1,112 @@
var Symbol = require('./_Symbol'),
Uint8Array = require('./_Uint8Array'),
eq = require('./eq'),
equalArrays = require('./_equalArrays'),
mapToArray = require('./_mapToArray'),
setToArray = require('./_setToArray');
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** `Object#toString` result references. */
var boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
mapTag = '[object Map]',
numberTag = '[object Number]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]';
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
module.exports = equalByTag;

View File

@@ -0,0 +1,6 @@
/**
* Returns the owner document of a given element.
*
* @param node the element
*/
export default function ownerDocument(node?: Element): Document;

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvYXJyYXktb3Itc2luZ2xlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBBcnJheU9yU2luZ2xlPFR5cGU+ID0gVHlwZSB8IFR5cGVbXTtcbiJdfQ==

View File

@@ -0,0 +1,29 @@
"use strict";
exports.lastDayOfISOWeek = lastDayOfISOWeek;
var _index = require("./lastDayOfWeek.js");
/**
* @name lastDayOfISOWeek
* @category ISO Week Helpers
* @summary Return the last day of an ISO week for the given date.
*
* @description
* Return the last day of an ISO week for the given date.
* The result will be in the local timezone.
*
* 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 original date
*
* @returns The last day of an ISO week
*
* @example
* // The last day of an ISO week for 2 September 2014 11:55:00:
* const result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
* //=> Sun Sep 07 2014 00:00:00
*/
function lastDayOfISOWeek(date) {
return (0, _index.lastDayOfWeek)(date, { weekStartsOn: 1 });
}

View File

@@ -0,0 +1,37 @@
import { toDate } from "./toDate.mjs";
/**
* @name differenceInCalendarMonths
* @category Month Helpers
* @summary Get the number of calendar months between the given dates.
*
* @description
* Get the number of calendar months between the given dates.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
*
* @returns The number of calendar months
*
* @example
* // How many calendar months are between 31 January 2014 and 1 September 2014?
* const result = differenceInCalendarMonths(
* new Date(2014, 8, 1),
* new Date(2014, 0, 31)
* )
* //=> 8
*/
export function differenceInCalendarMonths(dateLeft, dateRight) {
const _dateLeft = toDate(dateLeft);
const _dateRight = toDate(dateRight);
const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();
const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();
return yearDiff * 12 + monthDiff;
}
// Fallback for modularized imports:
export default differenceInCalendarMonths;

View File

@@ -0,0 +1,24 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
export type SingleStoreJsonBuilderInitial<TName extends string> = SingleStoreJsonBuilder<{
name: TName;
dataType: 'json';
columnType: 'SingleStoreJson';
data: unknown;
driverParam: string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'SingleStoreJson'>> extends SingleStoreColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class SingleStoreJson<T extends ColumnBaseConfig<'json', 'SingleStoreJson'>> extends SingleStoreColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapToDriverValue(value: T['data']): string;
}
export declare function json(): SingleStoreJsonBuilderInitial<''>;
export declare function json<TName extends string>(name: TName): SingleStoreJsonBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"sanitizeWhereQuery.d.ts","sourceRoot":"","sources":["../../src/database/sanitizeWhereQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,kBAAkB,gCAI5B;IACD,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,CAAA;CACb,SAiDA,CAAA"}

View File

@@ -0,0 +1,147 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseFunctionArgs = exports.nonFunctionArgSeparator = exports.nonWhiteSpace = exports.isIdentWithValue = exports.isStringToken = exports.isIdentToken = exports.isNumberToken = exports.isDimensionToken = exports.Parser = void 0;
var tokenizer_1 = require("./tokenizer");
var Parser = /** @class */ (function () {
function Parser(tokens) {
this._tokens = tokens;
}
Parser.create = function (value) {
var tokenizer = new tokenizer_1.Tokenizer();
tokenizer.write(value);
return new Parser(tokenizer.read());
};
Parser.parseValue = function (value) {
return Parser.create(value).parseComponentValue();
};
Parser.parseValues = function (value) {
return Parser.create(value).parseComponentValues();
};
Parser.prototype.parseComponentValue = function () {
var token = this.consumeToken();
while (token.type === 31 /* WHITESPACE_TOKEN */) {
token = this.consumeToken();
}
if (token.type === 32 /* EOF_TOKEN */) {
throw new SyntaxError("Error parsing CSS component value, unexpected EOF");
}
this.reconsumeToken(token);
var value = this.consumeComponentValue();
do {
token = this.consumeToken();
} while (token.type === 31 /* WHITESPACE_TOKEN */);
if (token.type === 32 /* EOF_TOKEN */) {
return value;
}
throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one");
};
Parser.prototype.parseComponentValues = function () {
var values = [];
while (true) {
var value = this.consumeComponentValue();
if (value.type === 32 /* EOF_TOKEN */) {
return values;
}
values.push(value);
values.push();
}
};
Parser.prototype.consumeComponentValue = function () {
var token = this.consumeToken();
switch (token.type) {
case 11 /* LEFT_CURLY_BRACKET_TOKEN */:
case 28 /* LEFT_SQUARE_BRACKET_TOKEN */:
case 2 /* LEFT_PARENTHESIS_TOKEN */:
return this.consumeSimpleBlock(token.type);
case 19 /* FUNCTION_TOKEN */:
return this.consumeFunction(token);
}
return token;
};
Parser.prototype.consumeSimpleBlock = function (type) {
var block = { type: type, values: [] };
var token = this.consumeToken();
while (true) {
if (token.type === 32 /* EOF_TOKEN */ || isEndingTokenFor(token, type)) {
return block;
}
this.reconsumeToken(token);
block.values.push(this.consumeComponentValue());
token = this.consumeToken();
}
};
Parser.prototype.consumeFunction = function (functionToken) {
var cssFunction = {
name: functionToken.value,
values: [],
type: 18 /* FUNCTION */
};
while (true) {
var token = this.consumeToken();
if (token.type === 32 /* EOF_TOKEN */ || token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */) {
return cssFunction;
}
this.reconsumeToken(token);
cssFunction.values.push(this.consumeComponentValue());
}
};
Parser.prototype.consumeToken = function () {
var token = this._tokens.shift();
return typeof token === 'undefined' ? tokenizer_1.EOF_TOKEN : token;
};
Parser.prototype.reconsumeToken = function (token) {
this._tokens.unshift(token);
};
return Parser;
}());
exports.Parser = Parser;
var isDimensionToken = function (token) { return token.type === 15 /* DIMENSION_TOKEN */; };
exports.isDimensionToken = isDimensionToken;
var isNumberToken = function (token) { return token.type === 17 /* NUMBER_TOKEN */; };
exports.isNumberToken = isNumberToken;
var isIdentToken = function (token) { return token.type === 20 /* IDENT_TOKEN */; };
exports.isIdentToken = isIdentToken;
var isStringToken = function (token) { return token.type === 0 /* STRING_TOKEN */; };
exports.isStringToken = isStringToken;
var isIdentWithValue = function (token, value) {
return exports.isIdentToken(token) && token.value === value;
};
exports.isIdentWithValue = isIdentWithValue;
var nonWhiteSpace = function (token) { return token.type !== 31 /* WHITESPACE_TOKEN */; };
exports.nonWhiteSpace = nonWhiteSpace;
var nonFunctionArgSeparator = function (token) {
return token.type !== 31 /* WHITESPACE_TOKEN */ && token.type !== 4 /* COMMA_TOKEN */;
};
exports.nonFunctionArgSeparator = nonFunctionArgSeparator;
var parseFunctionArgs = function (tokens) {
var args = [];
var arg = [];
tokens.forEach(function (token) {
if (token.type === 4 /* COMMA_TOKEN */) {
if (arg.length === 0) {
throw new Error("Error parsing function args, zero tokens for arg");
}
args.push(arg);
arg = [];
return;
}
if (token.type !== 31 /* WHITESPACE_TOKEN */) {
arg.push(token);
}
});
if (arg.length) {
args.push(arg);
}
return args;
};
exports.parseFunctionArgs = parseFunctionArgs;
var isEndingTokenFor = function (token, type) {
if (type === 11 /* LEFT_CURLY_BRACKET_TOKEN */ && token.type === 12 /* RIGHT_CURLY_BRACKET_TOKEN */) {
return true;
}
if (type === 28 /* LEFT_SQUARE_BRACKET_TOKEN */ && token.type === 29 /* RIGHT_SQUARE_BRACKET_TOKEN */) {
return true;
}
return type === 2 /* LEFT_PARENTHESIS_TOKEN */ && token.type === 3 /* RIGHT_PARENTHESIS_TOKEN */;
};
//# sourceMappingURL=parser.js.map

View File

@@ -0,0 +1,32 @@
"use strict";
exports.nextSunday = nextSunday;
var _index = require("./nextDay.cjs");
/**
* The {@link nextSunday} function options.
*/
/**
* @name nextSunday
* @category Weekday Helpers
* @summary When is the next Sunday?
*
* @description
* When is the next Sunday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned if a context is provided.
*
* @param date - The date to start counting from
* @param options - An object with options
*
* @returns The next Sunday
*
* @example
* // When is the next Sunday after March 22, 2020?
* const result = nextSunday(new Date(2020, 2, 22))
* //=> Sun Mar 29 2020 00:00:00
*/
function nextSunday(date, options) {
return (0, _index.nextDay)(date, 0, options);
}

View File

@@ -0,0 +1,4 @@
export {
Fragment,
jsxDEV
} from "./emotion-react-jsx-dev-runtime.browser.development.cjs.js";

View File

@@ -0,0 +1,26 @@
/**
* @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 Projector = createLucideIcon("Projector", [
["path", { d: "M5 7 3 5", key: "1yys58" }],
["path", { d: "M9 6V3", key: "1ptz9u" }],
["path", { d: "m13 7 2-2", key: "1w3vmq" }],
["circle", { cx: "9", cy: "13", r: "3", key: "1mma13" }],
[
"path",
{
d: "M11.83 12H20a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.17",
key: "2frwzc"
}
],
["path", { d: "M16 16h2", key: "dnq2od" }]
]);
export { Projector as default };
//# sourceMappingURL=projector.js.map

View File

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

View File

@@ -0,0 +1,30 @@
/**
* A set of attribute names that are always read/written as camel case.
*/
const camelCaseAttributes = new Set([
"baseFrequency",
"diffuseConstant",
"kernelMatrix",
"kernelUnitLength",
"keySplines",
"keyTimes",
"limitingConeAngle",
"markerHeight",
"markerWidth",
"numOctaves",
"targetX",
"targetY",
"surfaceScale",
"specularConstant",
"specularExponent",
"stdDeviation",
"tableValues",
"viewBox",
"gradientTransform",
"pathLength",
"startOffset",
"textLength",
"lengthAdjust",
]);
export { camelCaseAttributes };

View File

@@ -0,0 +1,38 @@
'use client';
export const separateRows = (path, fields) => {
const remainingFields = {};
const rows = Object.entries(fields).reduce((incomingRows, [fieldPath, field]) => {
const newRows = incomingRows;
if (fieldPath.indexOf(`${path}.`) === 0) {
const [rowIndex] = fieldPath.replace(`${path}.`, '').split('.');
if (!newRows[rowIndex]) {
newRows[rowIndex] = {};
}
newRows[rowIndex][fieldPath.replace(`${path}.${String(rowIndex)}.`, '')] = {
...field
};
} else {
remainingFields[fieldPath] = field;
}
return newRows;
}, []);
return {
remainingFields,
rows
};
};
export const flattenRows = (path, rows) => {
return rows.reduce((fields, row, i) => ({
...fields,
...Object.entries(row).reduce((subFields, [subPath, subField]) => {
return {
...subFields,
[`${path}.${i}.${subPath}`]: {
...subField
}
};
}, {})
}), {});
};
//# sourceMappingURL=rows.js.map

View File

@@ -0,0 +1,75 @@
'use strict'
const { test } = require('node:test')
const assert = require('node:assert')
const sinon = require('sinon')
const pino = require('../')
test('child logger methods should be independently wrappable with sinon when created with options', () => {
// Create parent logger
const parent = pino({ level: 'info' }, { write () {} })
// Wrap parent's info method with sinon
sinon.spy(parent, 'info')
// Create child logger with options (same level)
// This triggers the bug: child inherits parent's wrapped method
const child = parent.child({ name: 'child' }, { level: 'info' })
// Try to wrap child's info method - this should NOT throw
// In the bug, child.info is the same reference as parent.info (which is already wrapped)
assert.doesNotThrow(() => {
sinon.spy(child, 'info')
}, 'should be able to wrap child logger methods independently')
// Verify they are different function references
assert.strictEqual(child.info === parent.info, false, 'child and parent should have different method references')
// Cleanup
sinon.restore()
})
test('child logger info method should be independently wrappable after parent is spied', () => {
// This closely mimics the real-world scenario from the bug report
const parent = pino({ level: 'info' }, { write () {} })
// Spy on parent's info method
sinon.spy(parent, 'info')
// Create child with explicit level option (even though it's the same)
const child = parent.child({ name: 'child' }, { level: 'info' })
// Try to spy on child's info method - this should NOT throw
assert.doesNotThrow(() => {
sinon.spy(child, 'info')
}, 'should be able to wrap child info method independently')
// Verify they are different function references
assert.strictEqual(child.info === parent.info, false, 'child and parent should have different info method references')
// Cleanup
sinon.restore()
})
test('child logger without explicit level gets own methods when parent is tampered', () => {
// When parent methods have been wrapped, child should get its own methods
// even without explicit level option to prevent Sinon wrapping errors
const parent = pino({ level: 'info' }, { write () {} })
// Spy on parent's info method (this makes it an own property)
sinon.spy(parent, 'info')
// Create child WITHOUT level option
const child = parent.child({ name: 'child' })
// Child should have different method reference due to tampering detection
assert.strictEqual(child.info === parent.info, false, 'child should have own methods when parent is tampered')
// Should be able to wrap child's method independently
assert.doesNotThrow(() => {
sinon.spy(child, 'info')
}, 'should be able to wrap child method independently')
// Cleanup
sinon.restore()
})

View File

@@ -0,0 +1,17 @@
import { ShimWrapped } from './types';
export declare const wrap: <Nodule extends object, FieldName extends keyof Nodule>(nodule: Nodule, name: FieldName, wrapper: (original: Nodule[FieldName], name: FieldName) => Nodule[FieldName]) => ShimWrapped | undefined;
export declare const massWrap: <Nodule extends object, FieldName extends keyof Nodule>(nodules: Nodule[], names: FieldName[], wrapper: (original: Nodule[FieldName]) => Nodule[FieldName]) => void;
export declare const unwrap: <Nodule extends object>(nodule: Nodule, name: keyof Nodule) => void;
export declare const massUnwrap: <Nodule extends object>(nodules: Nodule[], names: (keyof Nodule)[]) => void;
export interface ShimmerOptions {
logger?: typeof console.error;
}
declare function shimmer(options: ShimmerOptions): void;
declare namespace shimmer {
var wrap: <Nodule extends object, FieldName extends keyof Nodule>(nodule: Nodule, name: FieldName, wrapper: (original: Nodule[FieldName], name: FieldName) => Nodule[FieldName]) => ShimWrapped | undefined;
var massWrap: <Nodule extends object, FieldName extends keyof Nodule>(nodules: Nodule[], names: FieldName[], wrapper: (original: Nodule[FieldName]) => Nodule[FieldName]) => void;
var unwrap: <Nodule extends object>(nodule: Nodule, name: keyof Nodule) => void;
var massUnwrap: <Nodule extends object>(nodules: Nodule[], names: (keyof Nodule)[]) => void;
}
export default shimmer;
//# sourceMappingURL=shimmer.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/providers/TableColumns/buildColumnState/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAEV,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,MAAM,EACN,yBAAyB,EACzB,QAAQ,EACR,KAAK,EACL,aAAa,EACb,OAAO,EACP,cAAc,EACd,yBAAyB,EACzB,0BAA0B,EAG1B,SAAS,EACV,MAAM,SAAS,CAAA;AAUhB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAY5E,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAA;IAC1C,eAAe,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAA;IAC7D,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,0BAA0B,CAAA;IAC7C,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,YAAY,EAAE,KAAK,EAAE,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAC1C,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,GAAG,CACA;IACE,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,aAAa,CAAA;IACvB,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC5B,GACD;IACE,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,EAAE,aAAa,CAAA;IACvB,IAAI,EAAE;QACJ,UAAU,EAAE,cAAc,CAAA;QAC1B,KAAK,EAAE,QAAQ,CAAA;KAChB,EAAE,CAAA;CACJ,CACJ,CAAA;AAED,eAAO,MAAM,gBAAgB,SAAU,oBAAoB,KAAG,MAAM,EA4NnE,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"incrementLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/incrementLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAErF,OAAO,EAAmB,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGjF,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAID,eAAO,MAAM,sBAAsB,mCAIhC,IAAI,KAAG,OAAO,CAAC,IAAI,CAuIrB,CAAA"}

View File

@@ -0,0 +1,90 @@
import css from './css';
import hyphenate from './hyphenate';
import isTransform from './isTransform';
import transitionEnd from './transitionEnd';
var reset = {
transition: '',
'transition-duration': '',
'transition-delay': '',
'transition-timing-function': ''
};
// super lean animate function for transitions
// doesn't support all translations to keep it matching the jquery API
/**
* code in part from: Zepto 1.1.4 | zeptojs.com/license
*/
function _animate(_ref) {
var node = _ref.node,
properties = _ref.properties,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 200 : _ref$duration,
easing = _ref.easing,
callback = _ref.callback;
var cssProperties = [];
var cssValues = {};
var transforms = '';
Object.keys(properties).forEach(function (key) {
var value = properties[key];
if (isTransform(key)) transforms += key + "(" + value + ") ";else {
cssValues[key] = value;
cssProperties.push(hyphenate(key));
}
});
if (transforms) {
cssValues.transform = transforms;
cssProperties.push('transform');
}
function done(event) {
if (event.target !== event.currentTarget) return;
css(node, reset);
if (callback) callback.call(this, event);
}
if (duration > 0) {
cssValues.transition = cssProperties.join(', ');
cssValues['transition-duration'] = duration / 1000 + "s";
cssValues['transition-delay'] = '0s';
cssValues['transition-timing-function'] = easing || 'linear';
}
var removeListener = transitionEnd(node, done, duration); // eslint-disable-next-line no-unused-expressions
node.clientLeft; // trigger page reflow
css(node, cssValues);
return {
cancel: function cancel() {
removeListener();
css(node, reset);
}
};
}
function animate(nodeOrOptions, properties, duration, easing, callback) {
if (!('nodeType' in nodeOrOptions)) {
return _animate(nodeOrOptions);
}
if (!properties) {
throw new Error('must include properties to animate');
}
if (typeof easing === 'function') {
callback = easing;
easing = '';
}
return _animate({
node: nodeOrOptions,
properties: properties,
duration: duration,
easing: easing,
callback: callback
});
}
export default animate;

View File

@@ -0,0 +1,106 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = keyForCrypto;
const node_crypto_1 = require("node:crypto");
const get_named_curve_js_1 = require("./get_named_curve.js");
const errors_js_1 = require("../util/errors.js");
const check_key_length_js_1 = require("./check_key_length.js");
const ecCurveAlgMap = new Map([
['ES256', 'P-256'],
['ES256K', 'secp256k1'],
['ES384', 'P-384'],
['ES512', 'P-521'],
]);
function keyForCrypto(alg, key) {
let asymmetricKeyType;
let asymmetricKeyDetails;
let isJWK;
if (key instanceof node_crypto_1.KeyObject) {
asymmetricKeyType = key.asymmetricKeyType;
asymmetricKeyDetails = key.asymmetricKeyDetails;
}
else {
isJWK = true;
switch (key.kty) {
case 'RSA':
asymmetricKeyType = 'rsa';
break;
case 'EC':
asymmetricKeyType = 'ec';
break;
case 'OKP': {
if (key.crv === 'Ed25519') {
asymmetricKeyType = 'ed25519';
break;
}
if (key.crv === 'Ed448') {
asymmetricKeyType = 'ed448';
break;
}
throw new TypeError('Invalid key for this operation, its crv must be Ed25519 or Ed448');
}
default:
throw new TypeError('Invalid key for this operation, its kty must be RSA, OKP, or EC');
}
}
let options;
switch (alg) {
case 'EdDSA':
if (!['ed25519', 'ed448'].includes(asymmetricKeyType)) {
throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448');
}
break;
case 'RS256':
case 'RS384':
case 'RS512':
if (asymmetricKeyType !== 'rsa') {
throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa');
}
(0, check_key_length_js_1.default)(key, alg);
break;
case 'PS256':
case 'PS384':
case 'PS512':
if (asymmetricKeyType === 'rsa-pss') {
const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = asymmetricKeyDetails;
const length = parseInt(alg.slice(-3), 10);
if (hashAlgorithm !== undefined &&
(hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm)) {
throw new TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${alg}`);
}
if (saltLength !== undefined && saltLength > length >> 3) {
throw new TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${alg}`);
}
}
else if (asymmetricKeyType !== 'rsa') {
throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss');
}
(0, check_key_length_js_1.default)(key, alg);
options = {
padding: node_crypto_1.constants.RSA_PKCS1_PSS_PADDING,
saltLength: node_crypto_1.constants.RSA_PSS_SALTLEN_DIGEST,
};
break;
case 'ES256':
case 'ES256K':
case 'ES384':
case 'ES512': {
if (asymmetricKeyType !== 'ec') {
throw new TypeError('Invalid key for this operation, its asymmetricKeyType must be ec');
}
const actual = (0, get_named_curve_js_1.default)(key);
const expected = ecCurveAlgMap.get(alg);
if (actual !== expected) {
throw new TypeError(`Invalid key curve for the algorithm, its curve must be ${expected}, got ${actual}`);
}
options = { dsaEncoding: 'ieee-p1363' };
break;
}
default:
throw new errors_js_1.JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
}
if (isJWK) {
return { format: 'jwk', key, ...options };
}
return options ? { ...options, key } : key;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/query-presets/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAShD,eAAO,MAAM,0BAA0B,0BAA0B,CAAA;AAEjE,eAAO,MAAM,qBAAqB,WAAY,MAAM,KAAG,gBA4KrD,CAAA"}

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './captions.js';
//# sourceMappingURL=subtitles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useEffectEvent.js","names":["React","useCallback","useInsertionEffect","useRef","useEffectEvent","fn","ref","current","args","latestFn"],"sources":["../../src/hooks/useEffectEvent.ts"],"sourcesContent":["'use client'\n\n/**\n\nPolyfill taken and modified from https://github.com/bluesky-social/social-app/blob/ce0bf867ff3b50a495d8db242a7f55371bffeadc/src/lib/hooks/useNonReactiveCallback.ts\n\nCopyright 20232025 Bluesky PBC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport React, { useCallback, useInsertionEffect, useRef } from 'react'\n\n// This should be used sparingly. It erases reactivity, i.e. when the inputs\n// change, the function itself will remain the same. This means that if you\n// use this at a higher level of your tree, and then some state you read in it\n// changes, there is no mechanism for anything below in the tree to \"react\"\n// to this change (e.g. by knowing to call your function again).\n//\n// Also, you should avoid calling the returned function during rendering\n// since the values captured by it are going to lag behind.\n\nexport const useEffectEvent =\n 'useEffectEvent' in React && typeof React.useEffectEvent === 'function'\n ? // useEffectEvent is available in Next.js 16 / newer versions of React\n React.useEffectEvent\n : // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n <T extends Function>(fn: T): T => {\n // useEffectEvent is not available in older versions of React, so we need to polyfill it\n const ref = useRef(fn)\n useInsertionEffect(() => {\n ref.current = fn\n }, [fn])\n return useCallback((...args: any) => {\n const latestFn = ref.current\n return latestFn(...args)\n }, []) as unknown as T\n }\n"],"mappings":"AAAA;;AAEA;;;;;;;;;;;;AAaA,OAAOA,KAAA,IAASC,WAAW,EAAEC,kBAAkB,EAAEC,MAAM,QAAQ;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,OAAO,MAAMC,cAAA,GACX,oBAAoBJ,KAAA,IAAS,OAAOA,KAAA,CAAMI,cAAc,KAAK,aAEzDJ,KAAA,CAAMI,cAAc,GAECC,EAAA;EACnB;EACA,MAAMC,GAAA,GAAMH,MAAA,CAAOE,EAAA;EACnBH,kBAAA,CAAmB;IACjBI,GAAA,CAAIC,OAAO,GAAGF,EAAA;EAChB,GAAG,CAACA,EAAA,CAAG;EACP,OAAOJ,WAAA,CAAY,CAAC,GAAGO,IAAA;IACrB,MAAMC,QAAA,GAAWH,GAAA,CAAIC,OAAO;IAC5B,OAAOE,QAAA,IAAYD,IAAA;EACrB,GAAG,EAAE;AACP","ignoreList":[]}

View File

@@ -0,0 +1,23 @@
/**
* @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 NotebookTabs = createLucideIcon("NotebookTabs", [
["path", { d: "M2 6h4", key: "aawbzj" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", key: "1nb95v" }],
["path", { d: "M15 2v20", key: "dcj49h" }],
["path", { d: "M15 7h5", key: "1xj5lc" }],
["path", { d: "M15 12h5", key: "w5shd9" }],
["path", { d: "M15 17h5", key: "1qaofu" }]
]);
export { NotebookTabs as default };
//# sourceMappingURL=notebook-tabs.js.map

View File

@@ -0,0 +1,29 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareDashedKanban = createLucideIcon("SquareDashedKanban", [
["path", { d: "M8 7v7", key: "1x2jlm" }],
["path", { d: "M12 7v4", key: "xawao1" }],
["path", { d: "M16 7v9", key: "1hp2iy" }],
["path", { d: "M5 3a2 2 0 0 0-2 2", key: "y57alp" }],
["path", { d: "M9 3h1", key: "1yesri" }],
["path", { d: "M14 3h1", key: "1ec4yj" }],
["path", { d: "M19 3a2 2 0 0 1 2 2", key: "18rm91" }],
["path", { d: "M21 9v1", key: "mxsmne" }],
["path", { d: "M21 14v1", key: "169vum" }],
["path", { d: "M21 19a2 2 0 0 1-2 2", key: "1j7049" }],
["path", { d: "M14 21h1", key: "v9vybs" }],
["path", { d: "M9 21h1", key: "15o7lz" }],
["path", { d: "M5 21a2 2 0 0 1-2-2", key: "sbafld" }],
["path", { d: "M3 14v1", key: "vnatye" }],
["path", { d: "M3 9v1", key: "1r0deq" }]
]);
export { SquareDashedKanban as default };
//# sourceMappingURL=square-dashed-kanban.js.map

View File

@@ -0,0 +1,25 @@
declare module 'cloudflare:sockets' {
export class Socket {
public readonly readable: any
public readonly writable: any
public readonly closed: Promise<void>
public close(): Promise<void>
public startTls(options: TlsOptions): Socket
}
export type TlsOptions = {
expectedServerHostname?: string
}
export type SocketAddress = {
hostname: string
port: number
}
export type SocketOptions = {
secureTransport?: 'off' | 'on' | 'starttls'
allowHalfOpen?: boolean
}
export function connect(address: string | SocketAddress, options?: SocketOptions): Socket
}

View File

@@ -0,0 +1,12 @@
import type { SanitizedCollectionConfig } from '../../collections/config/types.js';
import type { SanitizedConfig } from '../../config/types.js';
import type { AddToImportMap, Imports, InternalImportMap } from './index.js';
export declare function iterateCollections({ addToImportMap, baseDir, collections, config, importMap, imports, }: {
addToImportMap: AddToImportMap;
baseDir: string;
collections: SanitizedCollectionConfig[];
config: SanitizedConfig;
importMap: InternalImportMap;
imports: Imports;
}): void;
//# sourceMappingURL=iterateCollections.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore-core/schema.ts"],"sourcesContent":["import { entityKind, is } from '~/entity.ts';\nimport { type SingleStoreTableFn, singlestoreTableWithSchema } from './table.ts';\n/* import { type singlestoreView, singlestoreViewWithSchema } from './view.ts'; */\n\nexport class SingleStoreSchema<TName extends string = string> {\n\tstatic readonly [entityKind]: string = 'SingleStoreSchema';\n\n\tconstructor(\n\t\tpublic readonly schemaName: TName,\n\t) {}\n\n\ttable: SingleStoreTableFn<TName> = (name, columns, extraConfig) => {\n\t\treturn singlestoreTableWithSchema(name, columns, extraConfig, this.schemaName);\n\t};\n\t/*\n\tview = ((name, columns) => {\n\t\treturn singlestoreViewWithSchema(name, columns, this.schemaName);\n\t}) as typeof singlestoreView; */\n}\n\n/** @deprecated - use `instanceof SingleStoreSchema` */\nexport function isSingleStoreSchema(obj: unknown): obj is SingleStoreSchema {\n\treturn is(obj, SingleStoreSchema);\n}\n\n/**\n * Create a SingleStore schema.\n * https://docs.singlestore.com/cloud/create-a-database/\n *\n * @param name singlestore use schema name\n * @returns SingleStore schema\n */\nexport function singlestoreDatabase<TName extends string>(name: TName) {\n\treturn new SingleStoreSchema(name);\n}\n\n/**\n * @see singlestoreDatabase\n */\nexport const singlestoreSchema = singlestoreDatabase;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA+B;AAC/B,mBAAoE;AAG7D,MAAM,kBAAiD;AAAA,EAG7D,YACiB,YACf;AADe;AAAA,EACd;AAAA,EAJH,QAAiB,wBAAU,IAAY;AAAA,EAMvC,QAAmC,CAAC,MAAM,SAAS,gBAAgB;AAClE,eAAO,yCAA2B,MAAM,SAAS,aAAa,KAAK,UAAU;AAAA,EAC9E;AAAA;AAAA;AAAA;AAAA;AAKD;AAGO,SAAS,oBAAoB,KAAwC;AAC3E,aAAO,kBAAG,KAAK,iBAAiB;AACjC;AASO,SAAS,oBAA0C,MAAa;AACtE,SAAO,IAAI,kBAAkB,IAAI;AAClC;AAKO,MAAM,oBAAoB;","names":[]}

View File

@@ -0,0 +1,8 @@
import type { AbstractSpan } from '../types';
/**
*
* @param otelSpan Checks whether a given OTEL Span is an http request to sentry.
* @returns boolean
*/
export declare function isSentryRequestSpan(span: AbstractSpan): boolean;
//# sourceMappingURL=isSentryRequest.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["notFound","buildBrowseByFolderView","BrowseByFolder","args","View","error","message","console"],"sources":["../../../src/views/BrowseByFolder/index.tsx"],"sourcesContent":["import type React from 'react'\n\nimport { notFound } from 'next/navigation.js'\n\nimport type { BuildFolderViewArgs } from './buildView.js'\n\nimport { buildBrowseByFolderView } from './buildView.js'\n\nexport const BrowseByFolder: React.FC<BuildFolderViewArgs> = async (args) => {\n try {\n const { View } = await buildBrowseByFolderView(args)\n return View\n } catch (error) {\n if (error?.message === 'NEXT_REDIRECT') {\n throw error\n }\n if (error.message === 'not-found') {\n notFound()\n } else {\n console.error(error) // eslint-disable-line no-console\n }\n }\n}\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ;AAIzB,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,cAAA,GAAgD,MAAOC,IAAA;EAClE,IAAI;IACF,MAAM;MAAEC;IAAI,CAAE,GAAG,MAAMH,uBAAA,CAAwBE,IAAA;IAC/C,OAAOC,IAAA;EACT,EAAE,OAAOC,KAAA,EAAO;IACd,IAAIA,KAAA,EAAOC,OAAA,KAAY,iBAAiB;MACtC,MAAMD,KAAA;IACR;IACA,IAAIA,KAAA,CAAMC,OAAO,KAAK,aAAa;MACjCN,QAAA;IACF,OAAO;MACLO,OAAA,CAAQF,KAAK,CAACA,KAAA,GAAO;IACvB;EACF;AACF","ignoreList":[]}

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./gl/_lib/formatDistance.mjs";
import { formatLong } from "./gl/_lib/formatLong.mjs";
import { formatRelative } from "./gl/_lib/formatRelative.mjs";
import { localize } from "./gl/_lib/localize.mjs";
import { match } from "./gl/_lib/match.mjs";
/**
* @category Locales
* @summary Galician locale.
* @language Galician
* @iso-639-2 glg
* @author Alberto Doval - Cocodin Technology[@cocodinTech](https://github.com/cocodinTech)
* @author Fidel Pita [@fidelpita](https://github.com/fidelpita)
*/
export const gl = {
code: "gl",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default gl;

View File

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

View File

@@ -0,0 +1,906 @@
import * as checks from "./checks.js";
import * as schemas from "./schemas.js";
import * as util from "./util.js";
export function _string(Class, params) {
return new Class({
type: "string",
...util.normalizeParams(params),
});
}
export function _coercedString(Class, params) {
return new Class({
type: "string",
coerce: true,
...util.normalizeParams(params),
});
}
export function _email(Class, params) {
return new Class({
type: "string",
format: "email",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _guid(Class, params) {
return new Class({
type: "string",
format: "guid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _uuid(Class, params) {
return new Class({
type: "string",
format: "uuid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _uuidv4(Class, params) {
return new Class({
type: "string",
format: "uuid",
check: "string_format",
abort: false,
version: "v4",
...util.normalizeParams(params),
});
}
export function _uuidv6(Class, params) {
return new Class({
type: "string",
format: "uuid",
check: "string_format",
abort: false,
version: "v6",
...util.normalizeParams(params),
});
}
export function _uuidv7(Class, params) {
return new Class({
type: "string",
format: "uuid",
check: "string_format",
abort: false,
version: "v7",
...util.normalizeParams(params),
});
}
export function _url(Class, params) {
return new Class({
type: "string",
format: "url",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _emoji(Class, params) {
return new Class({
type: "string",
format: "emoji",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _nanoid(Class, params) {
return new Class({
type: "string",
format: "nanoid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _cuid(Class, params) {
return new Class({
type: "string",
format: "cuid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _cuid2(Class, params) {
return new Class({
type: "string",
format: "cuid2",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _ulid(Class, params) {
return new Class({
type: "string",
format: "ulid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _xid(Class, params) {
return new Class({
type: "string",
format: "xid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _ksuid(Class, params) {
return new Class({
type: "string",
format: "ksuid",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _ipv4(Class, params) {
return new Class({
type: "string",
format: "ipv4",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _ipv6(Class, params) {
return new Class({
type: "string",
format: "ipv6",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _cidrv4(Class, params) {
return new Class({
type: "string",
format: "cidrv4",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _cidrv6(Class, params) {
return new Class({
type: "string",
format: "cidrv6",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _base64(Class, params) {
return new Class({
type: "string",
format: "base64",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _base64url(Class, params) {
return new Class({
type: "string",
format: "base64url",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _e164(Class, params) {
return new Class({
type: "string",
format: "e164",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export function _jwt(Class, params) {
return new Class({
type: "string",
format: "jwt",
check: "string_format",
abort: false,
...util.normalizeParams(params),
});
}
export const TimePrecision = {
Any: null,
Minute: -1,
Second: 0,
Millisecond: 3,
Microsecond: 6,
};
export function _isoDateTime(Class, params) {
return new Class({
type: "string",
format: "datetime",
check: "string_format",
offset: false,
local: false,
precision: null,
...util.normalizeParams(params),
});
}
export function _isoDate(Class, params) {
return new Class({
type: "string",
format: "date",
check: "string_format",
...util.normalizeParams(params),
});
}
export function _isoTime(Class, params) {
return new Class({
type: "string",
format: "time",
check: "string_format",
precision: null,
...util.normalizeParams(params),
});
}
export function _isoDuration(Class, params) {
return new Class({
type: "string",
format: "duration",
check: "string_format",
...util.normalizeParams(params),
});
}
export function _number(Class, params) {
return new Class({
type: "number",
checks: [],
...util.normalizeParams(params),
});
}
export function _coercedNumber(Class, params) {
return new Class({
type: "number",
coerce: true,
checks: [],
...util.normalizeParams(params),
});
}
export function _int(Class, params) {
return new Class({
type: "number",
check: "number_format",
abort: false,
format: "safeint",
...util.normalizeParams(params),
});
}
export function _float32(Class, params) {
return new Class({
type: "number",
check: "number_format",
abort: false,
format: "float32",
...util.normalizeParams(params),
});
}
export function _float64(Class, params) {
return new Class({
type: "number",
check: "number_format",
abort: false,
format: "float64",
...util.normalizeParams(params),
});
}
export function _int32(Class, params) {
return new Class({
type: "number",
check: "number_format",
abort: false,
format: "int32",
...util.normalizeParams(params),
});
}
export function _uint32(Class, params) {
return new Class({
type: "number",
check: "number_format",
abort: false,
format: "uint32",
...util.normalizeParams(params),
});
}
export function _boolean(Class, params) {
return new Class({
type: "boolean",
...util.normalizeParams(params),
});
}
export function _coercedBoolean(Class, params) {
return new Class({
type: "boolean",
coerce: true,
...util.normalizeParams(params),
});
}
export function _bigint(Class, params) {
return new Class({
type: "bigint",
...util.normalizeParams(params),
});
}
export function _coercedBigint(Class, params) {
return new Class({
type: "bigint",
coerce: true,
...util.normalizeParams(params),
});
}
export function _int64(Class, params) {
return new Class({
type: "bigint",
check: "bigint_format",
abort: false,
format: "int64",
...util.normalizeParams(params),
});
}
export function _uint64(Class, params) {
return new Class({
type: "bigint",
check: "bigint_format",
abort: false,
format: "uint64",
...util.normalizeParams(params),
});
}
export function _symbol(Class, params) {
return new Class({
type: "symbol",
...util.normalizeParams(params),
});
}
export function _undefined(Class, params) {
return new Class({
type: "undefined",
...util.normalizeParams(params),
});
}
export function _null(Class, params) {
return new Class({
type: "null",
...util.normalizeParams(params),
});
}
export function _any(Class) {
return new Class({
type: "any",
});
}
export function _unknown(Class) {
return new Class({
type: "unknown",
});
}
export function _never(Class, params) {
return new Class({
type: "never",
...util.normalizeParams(params),
});
}
export function _void(Class, params) {
return new Class({
type: "void",
...util.normalizeParams(params),
});
}
export function _date(Class, params) {
return new Class({
type: "date",
...util.normalizeParams(params),
});
}
export function _coercedDate(Class, params) {
return new Class({
type: "date",
coerce: true,
...util.normalizeParams(params),
});
}
export function _nan(Class, params) {
return new Class({
type: "nan",
...util.normalizeParams(params),
});
}
export function _lt(value, params) {
return new checks.$ZodCheckLessThan({
check: "less_than",
...util.normalizeParams(params),
value,
inclusive: false,
});
}
export function _lte(value, params) {
return new checks.$ZodCheckLessThan({
check: "less_than",
...util.normalizeParams(params),
value,
inclusive: true,
});
}
export {
/** @deprecated Use `z.lte()` instead. */
_lte as _max, };
export function _gt(value, params) {
return new checks.$ZodCheckGreaterThan({
check: "greater_than",
...util.normalizeParams(params),
value,
inclusive: false,
});
}
export function _gte(value, params) {
return new checks.$ZodCheckGreaterThan({
check: "greater_than",
...util.normalizeParams(params),
value,
inclusive: true,
});
}
export {
/** @deprecated Use `z.gte()` instead. */
_gte as _min, };
export function _positive(params) {
return _gt(0, params);
}
// negative
export function _negative(params) {
return _lt(0, params);
}
// nonpositive
export function _nonpositive(params) {
return _lte(0, params);
}
// nonnegative
export function _nonnegative(params) {
return _gte(0, params);
}
export function _multipleOf(value, params) {
return new checks.$ZodCheckMultipleOf({
check: "multiple_of",
...util.normalizeParams(params),
value,
});
}
export function _maxSize(maximum, params) {
return new checks.$ZodCheckMaxSize({
check: "max_size",
...util.normalizeParams(params),
maximum,
});
}
export function _minSize(minimum, params) {
return new checks.$ZodCheckMinSize({
check: "min_size",
...util.normalizeParams(params),
minimum,
});
}
export function _size(size, params) {
return new checks.$ZodCheckSizeEquals({
check: "size_equals",
...util.normalizeParams(params),
size,
});
}
export function _maxLength(maximum, params) {
const ch = new checks.$ZodCheckMaxLength({
check: "max_length",
...util.normalizeParams(params),
maximum,
});
return ch;
}
export function _minLength(minimum, params) {
return new checks.$ZodCheckMinLength({
check: "min_length",
...util.normalizeParams(params),
minimum,
});
}
export function _length(length, params) {
return new checks.$ZodCheckLengthEquals({
check: "length_equals",
...util.normalizeParams(params),
length,
});
}
export function _regex(pattern, params) {
return new checks.$ZodCheckRegex({
check: "string_format",
format: "regex",
...util.normalizeParams(params),
pattern,
});
}
export function _lowercase(params) {
return new checks.$ZodCheckLowerCase({
check: "string_format",
format: "lowercase",
...util.normalizeParams(params),
});
}
export function _uppercase(params) {
return new checks.$ZodCheckUpperCase({
check: "string_format",
format: "uppercase",
...util.normalizeParams(params),
});
}
export function _includes(includes, params) {
return new checks.$ZodCheckIncludes({
check: "string_format",
format: "includes",
...util.normalizeParams(params),
includes,
});
}
export function _startsWith(prefix, params) {
return new checks.$ZodCheckStartsWith({
check: "string_format",
format: "starts_with",
...util.normalizeParams(params),
prefix,
});
}
export function _endsWith(suffix, params) {
return new checks.$ZodCheckEndsWith({
check: "string_format",
format: "ends_with",
...util.normalizeParams(params),
suffix,
});
}
export function _property(property, schema, params) {
return new checks.$ZodCheckProperty({
check: "property",
property,
schema,
...util.normalizeParams(params),
});
}
export function _mime(types, params) {
return new checks.$ZodCheckMimeType({
check: "mime_type",
mime: types,
...util.normalizeParams(params),
});
}
export function _overwrite(tx) {
return new checks.$ZodCheckOverwrite({
check: "overwrite",
tx,
});
}
// normalize
export function _normalize(form) {
return _overwrite((input) => input.normalize(form));
}
// trim
export function _trim() {
return _overwrite((input) => input.trim());
}
// toLowerCase
export function _toLowerCase() {
return _overwrite((input) => input.toLowerCase());
}
// toUpperCase
export function _toUpperCase() {
return _overwrite((input) => input.toUpperCase());
}
export function _array(Class, element, params) {
return new Class({
type: "array",
element,
// get element() {
// return element;
// },
...util.normalizeParams(params),
});
}
export function _union(Class, options, params) {
return new Class({
type: "union",
options,
...util.normalizeParams(params),
});
}
export function _discriminatedUnion(Class, discriminator, options, params) {
return new Class({
type: "union",
options,
discriminator,
...util.normalizeParams(params),
});
}
export function _intersection(Class, left, right) {
return new Class({
type: "intersection",
left,
right,
});
}
// export function _tuple(
// Class: util.SchemaClass<schemas.$ZodTuple>,
// items: [],
// params?: string | $ZodTupleParams
// ): schemas.$ZodTuple<[], null>;
export function _tuple(Class, items, _paramsOrRest, _params) {
const hasRest = _paramsOrRest instanceof schemas.$ZodType;
const params = hasRest ? _params : _paramsOrRest;
const rest = hasRest ? _paramsOrRest : null;
return new Class({
type: "tuple",
items,
rest,
...util.normalizeParams(params),
});
}
export function _record(Class, keyType, valueType, params) {
return new Class({
type: "record",
keyType,
valueType,
...util.normalizeParams(params),
});
}
export function _map(Class, keyType, valueType, params) {
return new Class({
type: "map",
keyType,
valueType,
...util.normalizeParams(params),
});
}
export function _set(Class, valueType, params) {
return new Class({
type: "set",
valueType,
...util.normalizeParams(params),
});
}
export function _enum(Class, values, params) {
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
// if (Array.isArray(values)) {
// for (const value of values) {
// entries[value] = value;
// }
// } else {
// Object.assign(entries, values);
// }
// const entries: util.EnumLike = {};
// for (const val of values) {
// entries[val] = val;
// }
return new Class({
type: "enum",
entries,
...util.normalizeParams(params),
});
}
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
*
* ```ts
* enum Colors { red, green, blue }
* z.enum(Colors);
* ```
*/
export function _nativeEnum(Class, entries, params) {
return new Class({
type: "enum",
entries,
...util.normalizeParams(params),
});
}
export function _literal(Class, value, params) {
return new Class({
type: "literal",
values: Array.isArray(value) ? value : [value],
...util.normalizeParams(params),
});
}
export function _file(Class, params) {
return new Class({
type: "file",
...util.normalizeParams(params),
});
}
export function _transform(Class, fn) {
return new Class({
type: "transform",
transform: fn,
});
}
export function _optional(Class, innerType) {
return new Class({
type: "optional",
innerType,
});
}
export function _nullable(Class, innerType) {
return new Class({
type: "nullable",
innerType,
});
}
export function _default(Class, innerType, defaultValue) {
return new Class({
type: "default",
innerType,
get defaultValue() {
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
},
});
}
export function _nonoptional(Class, innerType, params) {
return new Class({
type: "nonoptional",
innerType,
...util.normalizeParams(params),
});
}
export function _success(Class, innerType) {
return new Class({
type: "success",
innerType,
});
}
export function _catch(Class, innerType, catchValue) {
return new Class({
type: "catch",
innerType,
catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue),
});
}
export function _pipe(Class, in_, out) {
return new Class({
type: "pipe",
in: in_,
out,
});
}
export function _readonly(Class, innerType) {
return new Class({
type: "readonly",
innerType,
});
}
export function _templateLiteral(Class, parts, params) {
return new Class({
type: "template_literal",
parts,
...util.normalizeParams(params),
});
}
export function _lazy(Class, getter) {
return new Class({
type: "lazy",
getter,
});
}
export function _promise(Class, innerType) {
return new Class({
type: "promise",
innerType,
});
}
export function _custom(Class, fn, _params) {
const norm = util.normalizeParams(_params);
norm.abort ?? (norm.abort = true); // default to abort:false
const schema = new Class({
type: "custom",
check: "custom",
fn: fn,
...norm,
});
return schema;
}
// export function _refine<T>(
// Class: util.SchemaClass<schemas.$ZodCustom>,
// fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>,
// _params: string | $ZodCustomParams = {}
// ): checks.$ZodCheck<T> {
// return _custom(Class, fn, _params);
// }
// same as _custom but defaults to abort:false
export function _refine(Class, fn, _params) {
const schema = new Class({
type: "custom",
check: "custom",
fn: fn,
...util.normalizeParams(_params),
});
return schema;
}
export function _stringbool(Classes, _params) {
const params = util.normalizeParams(_params);
let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
if (params.case !== "sensitive") {
truthyArray = truthyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
falsyArray = falsyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
}
const truthySet = new Set(truthyArray);
const falsySet = new Set(falsyArray);
const _Pipe = Classes.Pipe ?? schemas.$ZodPipe;
const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;
const _String = Classes.String ?? schemas.$ZodString;
const _Transform = Classes.Transform ?? schemas.$ZodTransform;
const tx = new _Transform({
type: "transform",
transform: (input, payload) => {
let data = input;
if (params.case !== "sensitive")
data = data.toLowerCase();
if (truthySet.has(data)) {
return true;
}
else if (falsySet.has(data)) {
return false;
}
else {
payload.issues.push({
code: "invalid_value",
expected: "stringbool",
values: [...truthySet, ...falsySet],
input: payload.value,
inst: tx,
});
return {};
}
},
error: params.error,
});
// params.error;
const innerPipe = new _Pipe({
type: "pipe",
in: new _String({ type: "string", error: params.error }),
out: tx,
error: params.error,
});
const outerPipe = new _Pipe({
type: "pipe",
in: innerPipe,
out: new _Boolean({
type: "boolean",
error: params.error,
}),
error: params.error,
});
return outerPipe;
}
export function _stringFormat(Class, format, fnOrRegex, _params = {}) {
const params = util.normalizeParams(_params);
const def = {
...util.normalizeParams(_params),
check: "string_format",
type: "string",
format,
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
...params,
};
if (fnOrRegex instanceof RegExp) {
def.pattern = fnOrRegex;
}
const inst = new Class(def);
return inst;
}

View File

@@ -0,0 +1,61 @@
/** A special constant with type `never` */
export const NEVER = Object.freeze({
status: "aborted",
});
export /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {
function init(inst, def) {
var _a;
Object.defineProperty(inst, "_zod", {
value: inst._zod ?? {},
enumerable: false,
});
(_a = inst._zod).traits ?? (_a.traits = new Set());
inst._zod.traits.add(name);
initializer(inst, def);
// support prototype modifications
for (const k in _.prototype) {
if (!(k in inst))
Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
}
inst._zod.constr = _;
inst._zod.def = def;
}
// doesn't work if Parent has a constructor with arguments
const Parent = params?.Parent ?? Object;
class Definition extends Parent {
}
Object.defineProperty(Definition, "name", { value: name });
function _(def) {
var _a;
const inst = params?.Parent ? new Definition() : this;
init(inst, def);
(_a = inst._zod).deferred ?? (_a.deferred = []);
for (const fn of inst._zod.deferred) {
fn();
}
return inst;
}
Object.defineProperty(_, "init", { value: init });
Object.defineProperty(_, Symbol.hasInstance, {
value: (inst) => {
if (params?.Parent && inst instanceof params.Parent)
return true;
return inst?._zod?.traits?.has(name);
},
});
Object.defineProperty(_, "name", { value: name });
return _;
}
////////////////////////////// UTILITIES ///////////////////////////////////////
export const $brand = Symbol("zod_brand");
export class $ZodAsyncError extends Error {
constructor() {
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
}
}
export const globalConfig = {};
export function config(newConfig) {
if (newConfig)
Object.assign(globalConfig, newConfig);
return globalConfig;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"timestamp.js","names":["timestamp","label","process","env","PAYLOAD_TIME","String","Date","getTime","now","console","log","Number"],"sources":["../../src/utilities/timestamp.ts"],"sourcesContent":["export const timestamp = (label: string) => {\n if (!process.env.PAYLOAD_TIME) {\n process.env.PAYLOAD_TIME = String(new Date().getTime())\n }\n const now = new Date()\n console.log(`[${now.getTime() - Number(process.env.PAYLOAD_TIME)}ms] ${label}`)\n}\n"],"mappings":"AAAA,OAAO,MAAMA,SAAA,GAAaC,KAAA;EACxB,IAAI,CAACC,OAAA,CAAQC,GAAG,CAACC,YAAY,EAAE;IAC7BF,OAAA,CAAQC,GAAG,CAACC,YAAY,GAAGC,MAAA,CAAO,IAAIC,IAAA,GAAOC,OAAO;EACtD;EACA,MAAMC,GAAA,GAAM,IAAIF,IAAA;EAChBG,OAAA,CAAQC,GAAG,CAAC,IAAIF,GAAA,CAAID,OAAO,KAAKI,MAAA,CAAOT,OAAA,CAAQC,GAAG,CAACC,YAAY,QAAQH,KAAA,EAAO;AAChF","ignoreList":[]}

View File

@@ -0,0 +1,4 @@
export * from './cookies.js';
export { extractJWT } from './extractJWT.js';
export * from './types.js';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,8 @@
import { APIError } from './APIError.js';
export class DuplicateGlobal extends APIError {
constructor(config){
super(`Global label "${config.label}" is already in use`);
}
}
//# sourceMappingURL=DuplicateGlobal.js.map

View File

@@ -0,0 +1,59 @@
import type {CodeKeywordDefinition, AnySchema, AnySchemaObject} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_} from "../../compile/codegen"
import {alwaysValidSchema, mergeEvaluated, checkStrictMode} from "../../compile/util"
import {validateArray} from "../code"
const def: CodeKeywordDefinition = {
keyword: "items",
type: "array",
schemaType: ["object", "array", "boolean"],
before: "uniqueItems",
code(cxt: KeywordCxt) {
const {schema, it} = cxt
if (Array.isArray(schema)) return validateTuple(cxt, "additionalItems", schema)
it.items = true
if (alwaysValidSchema(it, schema)) return
cxt.ok(validateArray(cxt))
},
}
export function validateTuple(
cxt: KeywordCxt,
extraItems: string,
schArr: AnySchema[] = cxt.schema
): void {
const {gen, parentSchema, data, keyword, it} = cxt
checkStrictTuple(parentSchema)
if (it.opts.unevaluated && schArr.length && it.items !== true) {
it.items = mergeEvaluated.items(gen, schArr.length, it.items)
}
const valid = gen.name("valid")
const len = gen.const("len", _`${data}.length`)
schArr.forEach((sch: AnySchema, i: number) => {
if (alwaysValidSchema(it, sch)) return
gen.if(_`${len} > ${i}`, () =>
cxt.subschema(
{
keyword,
schemaProp: i,
dataProp: i,
},
valid
)
)
cxt.ok(valid)
})
function checkStrictTuple(sch: AnySchemaObject): void {
const {opts, errSchemaPath} = it
const l = schArr.length
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)
if (opts.strictTuples && !fullTuple) {
const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`
checkStrictMode(it, msg, opts.strictTuples)
}
}
}
export default def

View File

@@ -0,0 +1,24 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.cjs";
export type SingleStoreBooleanBuilderInitial<TName extends string> = SingleStoreBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'SingleStoreBoolean';
data: boolean;
driverParam: number | boolean;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'SingleStoreBoolean'>> extends SingleStoreColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class SingleStoreBoolean<T extends ColumnBaseConfig<'boolean', 'SingleStoreBoolean'>> extends SingleStoreColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | boolean): boolean;
}
export declare function boolean(): SingleStoreBooleanBuilderInitial<''>;
export declare function boolean<TName extends string>(name: TName): SingleStoreBooleanBuilderInitial<TName>;

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