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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,5 @@
export { ReactRouterOptions } from './instrumentation';
export { createReactRouterV6CompatibleTracingIntegration, createV6CompatibleWithSentryReactRouterRouting, createV6CompatibleWrapCreateBrowserRouter, createV6CompatibleWrapCreateMemoryRouter, createV6CompatibleWrapUseRoutes, handleNavigation, addResolvedRoutesToParent, processResolvedRoutes, updateNavigationSpan, } from './instrumentation';
export { resolveRouteNameAndSource, getNormalizedName, initializeRouterUtils, locationIsInsideDescendantRoute, prefixWithSlash, rebuildRoutePathFromAllRoutes, pathEndsWithWildcard, pathIsWildcardAndHasChildren, getNumberOfUrlSegments, transactionNameHasWildcard, getActiveRootSpan, setNavigationContext, clearNavigationContext, getNavigationContext, } from './utils';
export { createAsyncHandlerProxy, handleAsyncHandlerResult, checkRouteForAsyncHandler } from './lazy-routes';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"linkederrors.js","sources":["../../../src/integrations/linkederrors.ts"],"sourcesContent":["import { defineIntegration } from '../integration';\nimport type { IntegrationFn } from '../types-hoist/integration';\nimport { applyAggregateErrorsToEvent } from '../utils/aggregate-errors';\nimport { exceptionFromError } from '../utils/eventbuilder';\n\ninterface LinkedErrorsOptions {\n key?: string;\n limit?: number;\n}\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options: LinkedErrorsOptions = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(exceptionFromError, options.stackParser, key, limit, event, hint);\n },\n };\n}) satisfies IntegrationFn;\n\nexport const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n"],"names":["applyAggregateErrorsToEvent","exceptionFromError","defineIntegration"],"mappings":";;;;;;AAUA,MAAM,WAAA,GAAc,OAAO;AAC3B,MAAM,aAAA,GAAgB,CAAC;;AAEvB,MAAM,gBAAA,GAAmB,cAAc;;AAEvC,MAAM,wBAAA,IAA4B,CAAC,OAAO,GAAwB,EAAE,KAAK;AACzE,EAAE,MAAM,KAAA,GAAQ,OAAO,CAAC,KAAA,IAAS,aAAa;AAC9C,EAAE,MAAM,GAAA,GAAM,OAAO,CAAC,GAAA,IAAO,WAAW;;AAExC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;AACzC,MAAM,MAAM,OAAA,GAAU,MAAM,CAAC,UAAU,EAAE;;AAEzC,MAAMA,2CAA2B,CAACC,+BAAkB,EAAE,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC;AACnG,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;MAEY,uBAAA,GAA0BC,6BAAiB,CAAC,wBAAwB;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"Trie.js","sourceRoot":"","sources":["../../src/Trie.ts"],"names":[],"mappings":";;;AAAA,+BAAgE;AAIhE,uDAAuD;AAC1C,QAAA,cAAc,GAAG,CAAC,CAAC;AAEhC,uDAAuD;AAC1C,QAAA,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAEpC;;;;;GAKG;AACU,QAAA,kBAAkB,GAAG,CAAC,CAAC;AAEpC;;;GAGG;AACU,QAAA,gBAAgB,GAAG,sBAAc,GAAG,sBAAc,CAAC;AAEhE;;;;;GAKG;AACU,QAAA,0BAA0B,GAAG,OAAO,IAAI,sBAAc,CAAC;AAEpE,iDAAiD;AACpC,QAAA,wBAAwB,GAAG,CAAC,IAAI,sBAAc,CAAC;AAC5D,oEAAoE;AACvD,QAAA,gBAAgB,GAAG,gCAAwB,GAAG,CAAC,CAAC;AAEhD,QAAA,0BAA0B,GAAG,KAAK,IAAI,sBAAc,CAAC;AAClE,uDAAuD;AAC1C,QAAA,yBAAyB,GAAG,kCAA0B,GAAG,kCAA0B,CAAC;AACjG;;;GAGG;AACU,QAAA,6BAA6B,GAAG,iCAAyB,CAAC;AAC1D,QAAA,6BAA6B,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,uDAAuD;AAChH;;;;;;;;;;;GAWG;AACU,QAAA,qBAAqB,GAAG,qCAA6B,GAAG,qCAA6B,CAAC;AAEnG;;;GAGG;AACU,QAAA,iCAAiC,GAAG,OAAO,IAAI,sBAAc,CAAC;AAE3E,qDAAqD;AACxC,QAAA,2BAA2B,GAAG,CAAC,IAAI,wBAAgB,CAAC;AACjE,uEAAuE;AAC1D,QAAA,mBAAmB,GAAG,mCAA2B,GAAG,CAAC,CAAC;AAEnE,IAAM,OAAO,GAAG,UAAC,IAA4B,EAAE,KAAa,EAAE,GAAY;IACtE,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACjC;IAED,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,IAAM,OAAO,GAAG,UAAC,IAA4B,EAAE,KAAa,EAAE,GAAY;IACtE,IAAI,IAAI,CAAC,KAAK,EAAE;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACjC;IAED,OAAO,IAAI,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AACzE,CAAC,CAAC;AAEK,IAAM,oBAAoB,GAAG,UAAC,MAAc,EAAE,WAAmB;IACpE,IAAM,MAAM,GAAG,aAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,sBAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACzF,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,sBAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACzF,IAAM,YAAY,GAAG,EAAE,CAAC;IAExB,IAAM,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,IAAM,IAAI,GACN,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;QACX,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACjD,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAErE,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC7E,CAAC,CAAC;AAbW,QAAA,oBAAoB,wBAa/B;AAEF;IAQI,cACI,YAAiB,EACjB,UAAe,EACf,SAAc,EACd,cAAmB,EACnB,KAA6B,EAC7B,IAA0C;QAE1C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,kBAAG,GAAH,UAAI,SAAiB;QACjB,IAAI,EAAE,CAAC;QACP,IAAI,SAAS,IAAI,CAAC,EAAE;YAChB,IAAI,SAAS,GAAG,OAAO,IAAI,CAAC,SAAS,GAAG,OAAO,IAAI,SAAS,IAAI,OAAO,CAAC,EAAE;gBACtE,yDAAyD;gBACzD,oFAAoF;gBACpF,mDAAmD;gBACnD,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,sBAAc,CAAC,CAAC;gBAC7C,EAAE,GAAG,CAAC,EAAE,IAAI,0BAAkB,CAAC,GAAG,CAAC,SAAS,GAAG,wBAAgB,CAAC,CAAC;gBACjE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aACxB;YAED,IAAI,SAAS,IAAI,MAAM,EAAE;gBACrB,qEAAqE;gBACrE,6CAA6C;gBAC7C,2CAA2C;gBAC3C,oDAAoD;gBACpD,kFAAkF;gBAClF,kFAAkF;gBAClF,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,kCAA0B,GAAG,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,sBAAc,CAAC,CAAC,CAAC;gBACvF,EAAE,GAAG,CAAC,EAAE,IAAI,0BAAkB,CAAC,GAAG,CAAC,SAAS,GAAG,wBAAgB,CAAC,CAAC;gBACjE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aACxB;YAED,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE;gBAC5B,iDAAiD;gBACjD,EAAE,GAAG,6BAAqB,GAAG,yCAAiC,GAAG,CAAC,SAAS,IAAI,sBAAc,CAAC,CAAC;gBAC/F,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACpB,EAAE,IAAI,CAAC,SAAS,IAAI,sBAAc,CAAC,GAAG,2BAAmB,CAAC;gBAC1D,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACpB,EAAE,GAAG,CAAC,EAAE,IAAI,0BAAkB,CAAC,GAAG,CAAC,SAAS,GAAG,wBAAgB,CAAC,CAAC;gBACjE,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aACxB;YACD,IAAI,SAAS,IAAI,QAAQ,EAAE;gBACvB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aACzC;SACJ;QAED,8EAA8E;QAC9E,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IACL,WAAC;AAAD,CAAC,AAvED,IAuEC;AAvEY,oBAAI"}
@@ -0,0 +1,27 @@
/**
* @name differenceInCalendarQuarters
* @category Quarter Helpers
* @summary Get the number of calendar quarters between the given dates.
*
* @description
* Get the number of calendar quarters 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 quarters
*
* @example
* // How many calendar quarters are between 31 December 2013 and 2 July 2014?
* const result = differenceInCalendarQuarters(
* new Date(2014, 6, 2),
* new Date(2013, 11, 31)
* )
* //=> 3
*/
export declare function differenceInCalendarQuarters<DateType extends Date>(
dateLeft: DateType | number | string,
dateRight: DateType | number | string,
): number;
@@ -0,0 +1,190 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
standalone: "manje od 1 sekunde",
withPrepositionAgo: "manje od 1 sekunde",
withPrepositionIn: "manje od 1 sekundu",
},
dual: "manje od {{count}} sekunde",
other: "manje od {{count}} sekundi",
},
xSeconds: {
one: {
standalone: "1 sekunda",
withPrepositionAgo: "1 sekunde",
withPrepositionIn: "1 sekundu",
},
dual: "{{count}} sekunde",
other: "{{count}} sekundi",
},
halfAMinute: "pola minute",
lessThanXMinutes: {
one: {
standalone: "manje od 1 minute",
withPrepositionAgo: "manje od 1 minute",
withPrepositionIn: "manje od 1 minutu",
},
dual: "manje od {{count}} minute",
other: "manje od {{count}} minuta",
},
xMinutes: {
one: {
standalone: "1 minuta",
withPrepositionAgo: "1 minute",
withPrepositionIn: "1 minutu",
},
dual: "{{count}} minute",
other: "{{count}} minuta",
},
aboutXHours: {
one: {
standalone: "oko 1 sat",
withPrepositionAgo: "oko 1 sat",
withPrepositionIn: "oko 1 sat",
},
dual: "oko {{count}} sata",
other: "oko {{count}} sati",
},
xHours: {
one: {
standalone: "1 sat",
withPrepositionAgo: "1 sat",
withPrepositionIn: "1 sat",
},
dual: "{{count}} sata",
other: "{{count}} sati",
},
xDays: {
one: {
standalone: "1 dan",
withPrepositionAgo: "1 dan",
withPrepositionIn: "1 dan",
},
dual: "{{count}} dana",
other: "{{count}} dana",
},
aboutXWeeks: {
one: {
standalone: "oko 1 sedmicu",
withPrepositionAgo: "oko 1 sedmicu",
withPrepositionIn: "oko 1 sedmicu",
},
dual: "oko {{count}} sedmice",
other: "oko {{count}} sedmice",
},
xWeeks: {
one: {
standalone: "1 sedmicu",
withPrepositionAgo: "1 sedmicu",
withPrepositionIn: "1 sedmicu",
},
dual: "{{count}} sedmice",
other: "{{count}} sedmice",
},
aboutXMonths: {
one: {
standalone: "oko 1 mjesec",
withPrepositionAgo: "oko 1 mjesec",
withPrepositionIn: "oko 1 mjesec",
},
dual: "oko {{count}} mjeseca",
other: "oko {{count}} mjeseci",
},
xMonths: {
one: {
standalone: "1 mjesec",
withPrepositionAgo: "1 mjesec",
withPrepositionIn: "1 mjesec",
},
dual: "{{count}} mjeseca",
other: "{{count}} mjeseci",
},
aboutXYears: {
one: {
standalone: "oko 1 godinu",
withPrepositionAgo: "oko 1 godinu",
withPrepositionIn: "oko 1 godinu",
},
dual: "oko {{count}} godine",
other: "oko {{count}} godina",
},
xYears: {
one: {
standalone: "1 godina",
withPrepositionAgo: "1 godine",
withPrepositionIn: "1 godinu",
},
dual: "{{count}} godine",
other: "{{count}} godina",
},
overXYears: {
one: {
standalone: "preko 1 godinu",
withPrepositionAgo: "preko 1 godinu",
withPrepositionIn: "preko 1 godinu",
},
dual: "preko {{count}} godine",
other: "preko {{count}} godina",
},
almostXYears: {
one: {
standalone: "gotovo 1 godinu",
withPrepositionAgo: "gotovo 1 godinu",
withPrepositionIn: "gotovo 1 godinu",
},
dual: "gotovo {{count}} godine",
other: "gotovo {{count}} godina",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
result = tokenValue.one.withPrepositionIn;
} else {
result = tokenValue.one.withPrepositionAgo;
}
} else {
result = tokenValue.one.standalone;
}
} else if (
count % 10 > 1 &&
count % 10 < 5 && // if last digit is between 2 and 4
String(count).substr(-2, 1) !== "1" // unless the 2nd to last digit is "1"
) {
result = tokenValue.dual.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "za " + result;
} else {
return "prije " + result;
}
}
return result;
};
@@ -0,0 +1,13 @@
import type { DraggableSyntheticListeners } from '@dnd-kit/core';
import type { Column } from 'payload';
import type { HTMLAttributes, Ref } from 'react';
export type Props = {
readonly cellMap: Record<string, number>;
readonly columns: Column[];
readonly dragAttributes?: HTMLAttributes<unknown>;
readonly dragListeners?: DraggableSyntheticListeners;
readonly ref?: Ref<HTMLTableRowElement>;
readonly rowId: number | string;
} & HTMLAttributes<HTMLTableRowElement>;
export declare const OrderableRow: ({ cellMap, columns, dragAttributes, dragListeners, rowId, ...rest }: Props) => import("react").JSX.Element;
//# sourceMappingURL=OrderableRow.d.ts.map
@@ -0,0 +1,5 @@
import React from 'react';
import type { DefaultVersionsViewProps } from './types.js';
import './index.scss';
export declare const DefaultVersionView: React.FC<DefaultVersionsViewProps>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
/**
* Runs the passed callback during the next idle period, or immediately
* if the browser's visibility state is (or becomes) hidden.
*/
export declare const whenIdleOrHidden: (cb: () => void) => void;
//# sourceMappingURL=whenIdleOrHidden.d.ts.map
@@ -0,0 +1,20 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { JSX } from 'react';
import { HeadingTagType } from '@lexical/rich-text';
import { LexicalEditor, NodeKey } from 'lexical';
export type TableOfContentsEntry = [
key: NodeKey,
text: string,
tag: HeadingTagType
];
type Props = {
children: (values: Array<TableOfContentsEntry>, editor: LexicalEditor) => JSX.Element;
};
export declare function TableOfContentsPlugin({ children }: Props): JSX.Element;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qCAAkE;AAGlE,8CAAuD;AAE1C,QAAA,6BAA6B,GAAG,GAAG,CAAC;AACpC,QAAA,oCAAoC,GAAG,QAAQ,CAAC;AAE7D;;;GAGG;AACH,SAAgB,WAAW,CAAC,UAAwB;IAKlD,MAAM,mBAAmB,GAA0B;QACjD,OAAO,EAAE,IAAA,4BAAmB,GAAE;KAC/B,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,0BAAiB,GAAE,CAAC;IAE3C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAC1B,EAAE,EACF,cAAc,EACd,mBAAmB,EACnB,UAAU,CACX,CAAC;IAEF,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,CAClC,EAAE,EACF,cAAc,CAAC,aAAa,EAC5B,UAAU,CAAC,aAAa,IAAI,EAAE,CAC/B,CAAC;IAEF,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAC/B,EAAE,EACF,cAAc,CAAC,UAAU,EACzB,UAAU,CAAC,UAAU,IAAI,EAAE,CAC5B,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AA/BD,kCA+BC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,UAAwB;IACxD,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAE5D;;OAEG;IACH,UAAU,CAAC,mBAAmB;QAC5B,UAAU,CAAC,UAAU,EAAE,mBAAmB;YAC1C,UAAU,CAAC,aAAa,EAAE,mBAAmB;YAC7C,IAAA,uBAAgB,EAAC,iCAAiC,CAAC;YACnD,IAAA,uBAAgB,EAAC,4BAA4B,CAAC;YAC9C,qCAA6B,CAAC;IAEhC;;OAEG;IACH,UAAU,CAAC,yBAAyB;QAClC,UAAU,CAAC,UAAU,EAAE,yBAAyB;YAChD,UAAU,CAAC,aAAa,EAAE,yBAAyB;YACnD,IAAA,uBAAgB,EAAC,wCAAwC,CAAC;YAC1D,IAAA,uBAAgB,EAAC,mCAAmC,CAAC;YACrD,4CAAoC,CAAC;IAEvC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AACvD,CAAC;AAxBD,8CAwBC","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 { buildSamplerFromEnv, loadDefaultConfig } from './config';\nimport { Sampler } from './Sampler';\nimport { SpanLimits, TracerConfig, GeneralLimits } from './types';\nimport { getNumberFromEnv } from '@opentelemetry/core';\n\nexport const DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\nexport const DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\n\n/**\n * Function to merge Default configuration (as specified in './config') with\n * user provided configurations.\n */\nexport function mergeConfig(userConfig: TracerConfig): TracerConfig & {\n sampler: Sampler;\n spanLimits: SpanLimits;\n generalLimits: GeneralLimits;\n} {\n const perInstanceDefaults: Partial<TracerConfig> = {\n sampler: buildSamplerFromEnv(),\n };\n\n const DEFAULT_CONFIG = loadDefaultConfig();\n\n const target = Object.assign(\n {},\n DEFAULT_CONFIG,\n perInstanceDefaults,\n userConfig\n );\n\n target.generalLimits = Object.assign(\n {},\n DEFAULT_CONFIG.generalLimits,\n userConfig.generalLimits || {}\n );\n\n target.spanLimits = Object.assign(\n {},\n DEFAULT_CONFIG.spanLimits,\n userConfig.spanLimits || {}\n );\n\n return target;\n}\n\n/**\n * When general limits are provided and model specific limits are not,\n * configures the model specific limits by using the values from the general ones.\n * @param userConfig User provided tracer configuration\n */\nexport function reconfigureLimits(userConfig: TracerConfig): TracerConfig {\n const spanLimits = Object.assign({}, userConfig.spanLimits);\n\n /**\n * Reassign span attribute count limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeCountLimit =\n userConfig.spanLimits?.attributeCountLimit ??\n userConfig.generalLimits?.attributeCountLimit ??\n getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ??\n getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ??\n DEFAULT_ATTRIBUTE_COUNT_LIMIT;\n\n /**\n * Reassign span attribute value length limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeValueLengthLimit =\n userConfig.spanLimits?.attributeValueLengthLimit ??\n userConfig.generalLimits?.attributeValueLengthLimit ??\n getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;\n\n return Object.assign({}, userConfig, { spanLimits });\n}\n"]}
@@ -0,0 +1,73 @@
import { RouteManifest } from '../manifest/types';
import { NextConfigObject, SentryBuildOptions, TurbopackOptions } from '../types';
import { VercelCronsConfigResult } from './getFinalConfigObjectUtils';
/**
* Information about the active bundler and feature support based on Next.js version.
*/
export type BundlerInfo = {
isTurbopack: boolean;
isWebpack: boolean;
isTurbopackSupported: boolean;
};
/**
* Detects which bundler is active (webpack vs turbopack) and whether turbopack features are supported.
*/
export declare function getBundlerInfo(nextJsVersion: string | undefined): BundlerInfo;
/**
* Warns if turbopack is in use but the detected Next.js version is unsupported.
*/
export declare function maybeWarnAboutUnsupportedTurbopack(nextJsVersion: string | undefined, bundlerInfo: BundlerInfo): void;
/**
* Warns if `useRunAfterProductionCompileHook` is enabled in webpack mode but the Next.js version is unsupported.
*/
export declare function maybeWarnAboutUnsupportedRunAfterProductionCompileHook(nextJsVersion: string | undefined, userSentryOptions: SentryBuildOptions, bundlerInfo: BundlerInfo): void;
/**
* Constructs turbopack config when turbopack is active.
*/
export declare function maybeConstructTurbopackConfig(incomingUserNextConfigObject: NextConfigObject, userSentryOptions: SentryBuildOptions, routeManifest: RouteManifest | undefined, nextJsVersion: string | undefined, bundlerInfo: BundlerInfo, vercelCronsConfigResult: VercelCronsConfigResult): TurbopackOptions | undefined;
/**
* Resolves whether to use the `runAfterProductionCompile` hook based on options and bundler.
*/
export declare function resolveUseRunAfterProductionCompileHookOption(userSentryOptions: SentryBuildOptions, bundlerInfo: BundlerInfo): boolean;
/**
* Hooks into Next.js' `compiler.runAfterProductionCompile` to run Sentry release/sourcemap handling.
*
* Note: this mutates `incomingUserNextConfigObject`.
*/
export declare function maybeSetUpRunAfterProductionCompileHook({ incomingUserNextConfigObject, userSentryOptions, releaseName, nextJsVersion, bundlerInfo, turboPackConfig, shouldUseRunAfterProductionCompileHook, }: {
incomingUserNextConfigObject: NextConfigObject;
userSentryOptions: SentryBuildOptions;
releaseName: string | undefined;
nextJsVersion: string | undefined;
bundlerInfo: BundlerInfo;
turboPackConfig: TurbopackOptions | undefined;
shouldUseRunAfterProductionCompileHook: boolean;
}): void;
/**
* For supported turbopack builds, auto-enables browser sourcemaps and defaults to deleting them after upload.
*
* Note: this mutates both `incomingUserNextConfigObject` and `userSentryOptions`.
*/
export declare function maybeEnableTurbopackSourcemaps(incomingUserNextConfigObject: NextConfigObject, userSentryOptions: SentryBuildOptions, bundlerInfo: BundlerInfo): void;
/**
* Returns the patch which ensures server-side auto-instrumented packages are externalized.
*/
export declare function getServerExternalPackagesPatch(incomingUserNextConfigObject: NextConfigObject, nextMajor: number | undefined): Partial<NextConfigObject>;
/**
* Returns the patch for injecting Sentry's webpack config function (if enabled and applicable).
*/
export declare function getWebpackPatch({ incomingUserNextConfigObject, userSentryOptions, releaseName, routeManifest, nextJsVersion, shouldUseRunAfterProductionCompileHook, bundlerInfo, vercelCronsConfigResult, }: {
incomingUserNextConfigObject: NextConfigObject;
userSentryOptions: SentryBuildOptions;
releaseName: string | undefined;
routeManifest: RouteManifest | undefined;
nextJsVersion: string | undefined;
shouldUseRunAfterProductionCompileHook: boolean;
bundlerInfo: BundlerInfo;
vercelCronsConfigResult: VercelCronsConfigResult;
}): Partial<NextConfigObject>;
/**
* Returns the patch for adding turbopack config (if enabled and supported).
*/
export declare function getTurbopackPatch(bundlerInfo: BundlerInfo, turboPackConfig: TurbopackOptions | undefined): Partial<NextConfigObject>;
//# sourceMappingURL=getFinalConfigObjectBundlerUtils.d.ts.map
@@ -0,0 +1 @@
export declare function useCombinedRefs<T>(...refs: ((node: T) => void)[]): (node: T) => void;
@@ -0,0 +1 @@
{"version":3,"file":"isBuild.js","sources":["../../../../src/common/utils/isBuild.ts"],"sourcesContent":["import { PHASE_PRODUCTION_BUILD } from 'next/constants';\n\n/**\n * Decide if the currently running process is part of the build phase or happening at runtime.\n */\nexport function isBuild(): boolean {\n return process.env.NEXT_PHASE === PHASE_PRODUCTION_BUILD;\n}\n"],"names":["PHASE_PRODUCTION_BUILD"],"mappings":";;;;AAEA;AACA;AACA;AACO,SAAS,OAAO,GAAY;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,UAAA,KAAeA,gCAAsB;AAC1D;;;;"}
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, d. MMMM y",
long: "d. MMMM y",
medium: "d. MMM y",
short: "dd.MM.y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'kell' {{time}}",
long: "{{date}} 'kell' {{time}}",
medium: "{{date}}. {{time}}",
short: "{{date}}. {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1 @@
{"version":3,"file":"droplet.js","sources":["../../../src/icons/droplet.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Droplet\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJhNyA3IDAgMCAwIDctN2MwLTItMS0zLjktMy01LjVzLTMuNS00LTQtNi41Yy0uNSAyLjUtMiA0LjktNCA2LjVDNiAxMS4xIDUgMTMgNSAxNWE3IDcgMCAwIDAgNyA3eiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/droplet\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 Droplet = createLucideIcon('Droplet', [\n [\n 'path',\n {\n d: 'M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z',\n key: 'c7niix',\n },\n ],\n]);\n\nexport default Droplet;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"facebook.js","sources":["../../../src/icons/facebook.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Facebook\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMmgtM2E1IDUgMCAwIDAtNSA1djNIN3Y0aDN2OGg0di04aDNsMS00aC00VjdhMSAxIDAgMCAxIDEtMWgzeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/facebook\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 * @deprecated Brand icons have been deprecated and are due to be removed, please refer to https://github.com/lucide-icons/lucide/issues/670. We recommend using https://simpleicons.org/?q=facebook instead. This icon will be removed in v1.0\n */\nconst Facebook = createLucideIcon('Facebook', [\n [\n 'path',\n { d: 'M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z', key: '1jg4f8' },\n ],\n]);\n\nexport default Facebook;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,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,CAAqE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC1F,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,11 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.popup-divider {
width: 100%;
height: 1px;
background-color: var(--theme-elevation-150);
border: none;
margin: calc(var(--base) * 0.75) 0;
}
}
@@ -0,0 +1 @@
{"version":3,"file":"square-check.js","sources":["../../../src/icons/square-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Im05IDEyIDIgMiA0LTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-check\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 SquareCheck = createLucideIcon('SquareCheck', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'm9 12 2 2 4-4', key: 'dzmm74' }],\n]);\n\nexport default SquareCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,27 @@
"use strict";
exports.af = void 0;
var _index = require("./af/_lib/formatDistance.cjs");
var _index2 = require("./af/_lib/formatLong.cjs");
var _index3 = require("./af/_lib/formatRelative.cjs");
var _index4 = require("./af/_lib/localize.cjs");
var _index5 = require("./af/_lib/match.cjs");
/**
* @category Locales
* @summary Afrikaans locale.
* @language Afrikaans
* @iso-639-2 afr
* @author Marnus Weststrate [@marnusw](https://github.com/marnusw)
*/
const af = (exports.af = {
code: "af",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});
@@ -0,0 +1 @@
{"version":3,"file":"maskAttribute.d.ts","sourceRoot":"","sources":["../../../../src/util/maskAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,UAAU,mBAAmB;IAC3B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,WAAW,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,GAAG,EACH,cAAc,EACd,WAAW,EACX,cAAc,EACd,KAAK,GACN,EAAE,mBAAmB,GAAG,MAAM,CAqB9B"}
@@ -0,0 +1,72 @@
/**
* The set of allowed kind values for AST nodes.
*/
declare enum Kind {
/** Name */
NAME = 'Name',
/** Document */
DOCUMENT = 'Document',
OPERATION_DEFINITION = 'OperationDefinition',
VARIABLE_DEFINITION = 'VariableDefinition',
SELECTION_SET = 'SelectionSet',
FIELD = 'Field',
ARGUMENT = 'Argument',
/** Fragments */
FRAGMENT_SPREAD = 'FragmentSpread',
INLINE_FRAGMENT = 'InlineFragment',
FRAGMENT_DEFINITION = 'FragmentDefinition',
/** Values */
VARIABLE = 'Variable',
INT = 'IntValue',
FLOAT = 'FloatValue',
STRING = 'StringValue',
BOOLEAN = 'BooleanValue',
NULL = 'NullValue',
ENUM = 'EnumValue',
LIST = 'ListValue',
OBJECT = 'ObjectValue',
OBJECT_FIELD = 'ObjectField',
/** Directives */
DIRECTIVE = 'Directive',
/** Types */
NAMED_TYPE = 'NamedType',
LIST_TYPE = 'ListType',
NON_NULL_TYPE = 'NonNullType',
/** Type System Definitions */
SCHEMA_DEFINITION = 'SchemaDefinition',
OPERATION_TYPE_DEFINITION = 'OperationTypeDefinition',
/** Type Definitions */
SCALAR_TYPE_DEFINITION = 'ScalarTypeDefinition',
OBJECT_TYPE_DEFINITION = 'ObjectTypeDefinition',
FIELD_DEFINITION = 'FieldDefinition',
INPUT_VALUE_DEFINITION = 'InputValueDefinition',
INTERFACE_TYPE_DEFINITION = 'InterfaceTypeDefinition',
UNION_TYPE_DEFINITION = 'UnionTypeDefinition',
ENUM_TYPE_DEFINITION = 'EnumTypeDefinition',
ENUM_VALUE_DEFINITION = 'EnumValueDefinition',
INPUT_OBJECT_TYPE_DEFINITION = 'InputObjectTypeDefinition',
/** Directive Definitions */
DIRECTIVE_DEFINITION = 'DirectiveDefinition',
/** Type System Extensions */
SCHEMA_EXTENSION = 'SchemaExtension',
/** Type Extensions */
SCALAR_TYPE_EXTENSION = 'ScalarTypeExtension',
OBJECT_TYPE_EXTENSION = 'ObjectTypeExtension',
INTERFACE_TYPE_EXTENSION = 'InterfaceTypeExtension',
UNION_TYPE_EXTENSION = 'UnionTypeExtension',
ENUM_TYPE_EXTENSION = 'EnumTypeExtension',
INPUT_OBJECT_TYPE_EXTENSION = 'InputObjectTypeExtension',
/** Schema Coordinates */
TYPE_COORDINATE = 'TypeCoordinate',
MEMBER_COORDINATE = 'MemberCoordinate',
ARGUMENT_COORDINATE = 'ArgumentCoordinate',
DIRECTIVE_COORDINATE = 'DirectiveCoordinate',
DIRECTIVE_ARGUMENT_COORDINATE = 'DirectiveArgumentCoordinate',
}
export { Kind };
/**
* The enum type representing the possible kind values of AST nodes.
*
* @deprecated Please use `Kind`. Will be remove in v17.
*/
export declare type KindEnum = typeof Kind;
@@ -0,0 +1,4 @@
export declare const startOfDecade: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1,50 @@
"use strict";
// this spawns a child process that listens for SIGHUP when the
// parent process exits, and after 200ms, sends a SIGKILL to the
// child, in case it did not terminate.
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchdog = void 0;
const child_process_1 = require("child_process");
const watchdogCode = String.raw `
const pid = parseInt(process.argv[1], 10)
process.title = 'node (foreground-child watchdog pid=' + pid + ')'
if (!isNaN(pid)) {
let barked = false
// keepalive
const interval = setInterval(() => {}, 60000)
const bark = () => {
clearInterval(interval)
if (barked) return
barked = true
process.removeListener('SIGHUP', bark)
setTimeout(() => {
try {
process.kill(pid, 'SIGKILL')
setTimeout(() => process.exit(), 200)
} catch (_) {}
}, 500)
})
process.on('SIGHUP', bark)
}
`;
/**
* Pass in a ChildProcess, and this will spawn a watchdog process that
* will make sure it exits if the parent does, thus preventing any
* dangling detached zombie processes.
*
* If the child ends before the parent, then the watchdog will terminate.
*/
const watchdog = (child) => {
let dogExited = false;
const dog = (0, child_process_1.spawn)(process.execPath, ['-e', watchdogCode, String(child.pid)], {
stdio: 'ignore',
});
dog.on('exit', () => (dogExited = true));
child.on('exit', () => {
if (!dogExited)
dog.kill('SIGKILL');
});
return dog;
};
exports.watchdog = watchdog;
//# sourceMappingURL=watchdog.js.map
@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{mergeRegister as t}from"@lexical/utils";import{UNDO_COMMAND as e,COMMAND_PRIORITY_EDITOR as n,REDO_COMMAND as r,CLEAR_EDITOR_COMMAND as o,CLEAR_HISTORY_COMMAND as i,CAN_REDO_COMMAND as c,CAN_UNDO_COMMAND as s,HISTORIC_TAG as a,HISTORY_PUSH_TAG as u,HISTORY_MERGE_TAG as d,$isRangeSelection as l,$isTextNode as f,$isRootNode as p}from"lexical";const m=0,h=1,_=2,g=0,S=1,k=2,y=3,C=4;function x(t,e,n,r,o){if(null===t||0===n.size&&0===r.size&&!o)return g;const i=e._selection,c=t._selection;if(o)return S;if(!(l(i)&&l(c)&&c.isCollapsed()&&i.isCollapsed()))return g;const s=function(t,e,n){const r=t._nodeMap,o=[];for(const t of e){const e=r.get(t);void 0!==e&&o.push(e)}for(const[t,e]of n){if(!e)continue;const n=r.get(t);void 0===n||p(n)||o.push(n)}return o}(e,n,r);if(0===s.length)return g;if(s.length>1){const n=e._nodeMap,r=n.get(i.anchor.key),o=n.get(c.anchor.key);return r&&o&&!t._nodeMap.has(r.__key)&&f(r)&&1===r.__text.length&&1===i.anchor.offset?k:g}const a=s[0],u=t._nodeMap.get(a.__key);if(!f(u)||!f(a)||u.__mode!==a.__mode)return g;const d=u.__text,m=a.__text;if(d===m)return g;const h=i.anchor,_=c.anchor;if(h.key!==_.key||"text"!==h.type)return g;const x=h.offset,M=_.offset,z=m.length-d.length;return 1===z&&M===x-1?k:-1===z&&M===x+1?y:-1===z&&M===x?C:g}function M(t,e){let n=Date.now(),r=g;return(o,i,c,s,p,S)=>{const k=Date.now();if(S.has(a))return r=g,n=k,_;const y=x(o,i,s,p,t.isComposing()),C=(()=>{const a=null===c||c.editor===t,C=S.has(u);if(!C&&a&&S.has(d))return m;if(null===o)return h;const x=i._selection;if(!(s.size>0||p.size>0))return null!==x?m:_;if(!1===C&&y!==g&&y===r&&k<n+e&&a)return m;if(1===s.size){if(function(t,e,n){const r=e._nodeMap.get(t),o=n._nodeMap.get(t),i=e._selection,c=n._selection;return!(l(i)&&l(c)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===c.anchor.type&&"text"===c.focus.type||!f(r)||!f(o)||r.__parent!==o.__parent)&&JSON.stringify(e.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i))return m}return h})();return n=k,r=y,C}}function z(t){t.undoStack=[],t.redoStack=[],t.current=null}function v(u,d,l){const f=M(u,l),p=t(u.registerCommand(e,(()=>(function(t,e){const n=e.redoStack,r=e.undoStack;if(0!==r.length){const o=e.current,i=r.pop();null!==o&&(n.push(o),t.dispatchCommand(c,!0)),0===r.length&&t.dispatchCommand(s,!1),e.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:a})}}(u,d),!0)),n),u.registerCommand(r,(()=>(function(t,e){const n=e.redoStack,r=e.undoStack;if(0!==n.length){const o=e.current;null!==o&&(r.push(o),t.dispatchCommand(s,!0));const i=n.pop();0===n.length&&t.dispatchCommand(c,!1),e.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:a})}}(u,d),!0)),n),u.registerCommand(o,(()=>(z(d),!1)),n),u.registerCommand(i,(()=>(z(d),u.dispatchCommand(c,!1),u.dispatchCommand(s,!1),!0)),n),u.registerUpdateListener((({editorState:t,prevEditorState:e,dirtyLeaves:n,dirtyElements:r,tags:o})=>{const i=d.current,a=d.redoStack,l=d.undoStack,p=null===i?null:i.editorState;if(null!==i&&t===p)return;const m=f(e,t,i,n,r,o);if(m===h)0!==a.length&&(d.redoStack=[],u.dispatchCommand(c,!1)),null!==i&&(l.push({...i}),u.dispatchCommand(s,!0));else if(m===_)return;d.current={editor:u,editorState:t}})));return p}function E(){return{current:null,redoStack:[],undoStack:[]}}export{E as createEmptyHistoryState,v as registerHistory};
@@ -0,0 +1,13 @@
import type { ZodErrorMap } from "./ZodError.js";
import defaultErrorMap from "./locales/en.js";
let overrideErrorMap = defaultErrorMap;
export { defaultErrorMap };
export function setErrorMap(map: ZodErrorMap) {
overrideErrorMap = map;
}
export function getErrorMap() {
return overrideErrorMap;
}
@@ -0,0 +1,63 @@
/* eslint-disable */
// Inspired by https://github.com/garycourt/murmurhash-js
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
export default function murmur2(str: string): string {
// 'm' and 'r' are mixing constants generated offline.
// They're not really 'magic', they just happen to work well.
// const m = 0x5bd1e995;
// const r = 24;
// Initialize the hash
var h = 0
// Mix 4 bytes at a time into the hash
var k,
i = 0,
len = str.length
for (; len >= 4; ++i, len -= 4) {
k =
(str.charCodeAt(i) & 0xff) |
((str.charCodeAt(++i) & 0xff) << 8) |
((str.charCodeAt(++i) & 0xff) << 16) |
((str.charCodeAt(++i) & 0xff) << 24)
k =
/* Math.imul(k, m): */
(k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16)
k ^= /* k >>> r: */ k >>> 24
h =
/* Math.imul(k, m): */
((k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0xe995) << 16)) ^
/* Math.imul(h, m): */
((h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16))
}
// Handle the last few bytes of the input array
switch (len) {
case 3:
h ^= (str.charCodeAt(i + 2) & 0xff) << 16
case 2:
h ^= (str.charCodeAt(i + 1) & 0xff) << 8
case 1:
h ^= str.charCodeAt(i) & 0xff
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16)
}
// Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
h ^= h >>> 13
h =
/* Math.imul(h, m): */
(h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0xe995) << 16)
return ((h ^ (h >>> 15)) >>> 0).toString(36)
}
@@ -0,0 +1,52 @@
"use strict";
exports.isSameWeek = isSameWeek;
var _index = require("./_lib/normalizeDates.cjs");
var _index2 = require("./startOfWeek.cjs");
/**
* The {@link isSameWeek} function options.
*/
/**
* @name isSameWeek
* @category Week Helpers
* @summary Are the given dates in the same week (and month and year)?
*
* @description
* Are the given dates in the same week (and month and year)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
* @param options - An object with options
*
* @returns The dates are in the same week (and month and year)
*
* @example
* // Are 31 August 2014 and 4 September 2014 in the same week?
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
* //=> true
*
* @example
* // If week starts with Monday,
* // are 31 August 2014 and 4 September 2014 in the same week?
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
* weekStartsOn: 1
* })
* //=> false
*
* @example
* // Are 1 January 2014 and 1 January 2015 in the same week?
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
* //=> false
*/
function isSameWeek(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = (0, _index.normalizeDates)(
options?.in,
laterDate,
earlierDate,
);
return (
+(0, _index2.startOfWeek)(laterDate_, options) ===
+(0, _index2.startOfWeek)(earlierDate_, options)
);
}
@@ -0,0 +1,43 @@
@import '../../scss/styles.scss';
@layer payload-default {
.dropzone {
position: relative;
display: flex;
align-items: center;
padding: calc(var(--base) * 0.9) var(--base);
background: transparent;
border: 1px dotted var(--theme-elevation-400);
border-radius: var(--style-radius-s);
height: 100%;
width: 100%;
box-shadow: 0 0 0 0 transparent;
transition: all 100ms cubic-bezier(0, 0.2, 0.2, 1);
.btn {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
&.dragging {
border-color: var(--theme-success-500);
background: var(--theme-success-150);
@include shadow-m;
* {
pointer-events: none;
}
}
@include mid-break {
display: block;
text-align: center;
}
&.dropzoneStyle--none {
all: unset;
}
}
}
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ReceiptJapaneseYen = createLucideIcon("ReceiptJapaneseYen", [
[
"path",
{ d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z", key: "q3az6g" }
],
["path", { d: "m12 10 3-3", key: "1mc12w" }],
["path", { d: "m9 7 3 3v7.5", key: "39i0xv" }],
["path", { d: "M9 11h6", key: "1fldmi" }],
["path", { d: "M9 15h6", key: "cctwl0" }]
]);
export { ReceiptJapaneseYen as default };
//# sourceMappingURL=receipt-japanese-yen.js.map
@@ -0,0 +1,151 @@
import { logError } from 'payload';
export const fetchVersion = async ({
id,
collectionSlug,
depth,
globalSlug,
locale,
overrideAccess,
req,
select,
user
}) => {
try {
if (collectionSlug) {
return await req.payload.findVersionByID({
id: String(id),
collection: collectionSlug,
depth,
locale,
overrideAccess,
req,
select,
user
});
} else if (globalSlug) {
return await req.payload.findGlobalVersionByID({
id: String(id),
slug: globalSlug,
depth,
locale,
overrideAccess,
req,
select,
user
});
}
} catch (err) {
logError({
err,
payload: req.payload
});
return null;
}
};
export const fetchVersions = async ({
collectionSlug,
depth,
draft,
globalSlug,
limit,
locale,
overrideAccess,
page,
parentID,
req,
select,
sort,
user,
where: whereFromArgs
}) => {
const where = {
and: [...(whereFromArgs ? [whereFromArgs] : [])]
};
try {
if (collectionSlug) {
if (parentID) {
where.and.push({
parent: {
equals: parentID
}
});
}
return await req.payload.findVersions({
collection: collectionSlug,
depth,
draft,
limit,
locale,
overrideAccess,
page,
req,
select,
sort,
user,
where
});
} else if (globalSlug) {
return await req.payload.findGlobalVersions({
slug: globalSlug,
depth,
limit,
locale,
overrideAccess,
page,
req,
select,
sort,
user,
where
});
}
} catch (err) {
logError({
err,
payload: req.payload
});
return null;
}
};
export const fetchLatestVersion = async ({
collectionSlug,
depth,
globalSlug,
locale,
overrideAccess,
parentID,
req,
select,
status,
user,
where
}) => {
// Get the entity config to check if drafts are enabled
const entityConfig = collectionSlug ? req.payload.collections[collectionSlug]?.config : globalSlug ? req.payload.globals[globalSlug]?.config : undefined;
// Only query by _status if drafts are enabled (since _status field only exists with drafts)
const draftsEnabled = entityConfig?.versions?.drafts;
const and = [...(draftsEnabled ? [{
'version._status': {
equals: status
}
}] : []), ...(where ? [where] : [])];
const latest = await fetchVersions({
collectionSlug,
depth,
draft: true,
globalSlug,
limit: 1,
locale,
overrideAccess,
parentID,
req,
select,
sort: '-updatedAt',
user,
where: {
and
}
});
return latest?.docs?.length ? latest.docs[0] : null;
};
//# sourceMappingURL=fetchVersions.js.map
@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("react"),n=require("@lexical/overflow"),r=require("@lexical/text"),i=require("@lexical/utils"),o=require("lexical"),s=require("react/jsx-runtime");function l(e,s,l=Object.freeze({})){const{strlen:f=(e=>e.length),remainingCharacters:g=(()=>{})}=l;t.useEffect((()=>{e.hasNodes([n.OverflowNode])||function(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const e of t)r.append("v",e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(57)}),[e]),t.useEffect((()=>{let t=e.getEditorState().read(r.$rootTextContent),l=0;return i.mergeRegister(e.registerTextContentListener((e=>{t=e})),e.registerUpdateListener((({dirtyLeaves:r,dirtyElements:u})=>{const d=e.isComposing(),h=r.size>0||u.size>0;if(d||!h)return;const m=f(t),x=m>s||null!==l&&l>s;if(g(s-m),null===l||x){const r=function(e,t,n){const r=Intl.Segmenter;let i=0,o=0;if("function"==typeof r){const s=(new r).segment(e);for(const{segment:e}of s){const r=o+n(e);if(r>t)break;o=r,i+=e.length}}else{const r=Array.from(e),s=r.length;for(let e=0;e<s;e++){const s=r[e],l=o+n(s);if(l>t)break;o=l,i+=s.length}}return i}(t,s,f);e.update((()=>{!function(e){const t=i.$dfs(),r=t.length;let s=0;for(let l=0;l<r;l+=1){const{node:r}=t[l],f=o.$isLeafNode(r)&&!i.$findMatchingParent(r,n.$isOverflowNode);if(n.$isOverflowNode(r)){const t=s;if(s+r.getTextContentSize()<=e){const e=r.getParent(),t=r.getPreviousSibling(),n=r.getNextSibling();i.$unwrapNode(r);const s=o.$getSelection();!o.$isRangeSelection(s)||s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()||(o.$isTextNode(t)?t.select():o.$isTextNode(n)?n.select():null!==e&&e.select())}else if(t<e){const n=r.getFirstDescendant(),s=t+(null!==n?n.getTextContentSize():0);(o.$isTextNode(n)&&n.isSimpleText()||s<=e)&&i.$unwrapNode(r)}}else if(f){const t=s;if(s+=r.getTextContentSize(),s>e&&!n.$isOverflowNode(r.getParent())){const n=o.$getSelection();let i;if(t<e&&o.$isTextNode(r)&&r.isSimpleText()){const[,n]=r.splitText(e-t);i=c(n)}else i=c(r);null!==n&&o.$setSelection(n),a(i)}}}}(r)}),{tag:o.HISTORY_MERGE_TAG})}l=m})),e.registerCommand(o.DELETE_CHARACTER_COMMAND,(e=>{const t=o.$getSelection();if(!o.$isRangeSelection(t))return!1;const n=t.anchor.getNode().getParent(),r=n?n.getParent():null,i=r?r.getNextSibling():null;return t.deleteCharacter(e),r&&r.isEmpty()?r.remove():o.$isElementNode(i)&&i.isEmpty()&&i.remove(),!0}),o.COMMAND_PRIORITY_LOW))}),[e,s,g,f])}function c(e){const t=n.$createOverflowNode();return e.replace(t),t.append(e),t}function a(e){const t=e.getPreviousSibling();if(!n.$isOverflowNode(t))return;const r=e.getFirstChild(),i=t.getChildren(),s=i.length;if(null===r)e.append(...i);else for(let e=0;e<s;e++)r.insertBefore(i[e]);const l=o.$getSelection();if(o.$isRangeSelection(l)){const n=l.anchor,r=n.getNode(),i=l.focus,o=n.getNode();r.is(t)?n.set(e.getKey(),n.offset,"element"):r.is(e)&&n.set(e.getKey(),s+n.offset,"element"),o.is(t)?i.set(e.getKey(),i.offset,"element"):o.is(e)&&i.set(e.getKey(),s+i.offset,"element")}t.remove()}let f=null;function g(e){const t=void 0===window.TextEncoder?null:(null===f&&(f=new window.TextEncoder),f);if(null===t){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}return t.encode(e).length}function u({remainingCharacters:e}){return s.jsx("span",{className:"characters-limit "+(e<0?"characters-limit-exceeded":""),children:e})}exports.CharacterLimitPlugin=function({charset:n="UTF-16",maxLength:r=5,renderer:i=u}){const[o]=e.useLexicalComposerContext(),[s,c]=t.useState(r),a=t.useMemo((()=>({remainingCharacters:c,strlen:e=>{if("UTF-8"===n)return g(e);if("UTF-16"===n)return e.length;throw new Error("Unrecognized charset")}})),[n]);return l(o,r,a),i({remainingCharacters:s})};
@@ -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 FolderCode = createLucideIcon("FolderCode", [
["path", { d: "M10 10.5 8 13l2 2.5", key: "m4t9c1" }],
["path", { d: "m14 10.5 2 2.5-2 2.5", key: "14w2eb" }],
[
"path",
{
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",
key: "1u1bxd"
}
]
]);
export { FolderCode as default };
//# sourceMappingURL=folder-code.js.map
@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgCidrBuilderInitial<TName extends string> = PgCidrBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgCidr';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgCidrBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgCidr'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgCidr<T extends ColumnBaseConfig<'string', 'PgCidr'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function cidr(): PgCidrBuilderInitial<''>;
export declare function cidr<TName extends string>(name: TName): PgCidrBuilderInitial<TName>;
@@ -0,0 +1,18 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Maps a log severity level to a log severity number.
*
* @see LogSeverityLevel
*/
const SEVERITY_TEXT_TO_SEVERITY_NUMBER = {
trace: 1,
debug: 5,
info: 9,
warn: 13,
error: 17,
fatal: 21,
};
exports.SEVERITY_TEXT_TO_SEVERITY_NUMBER = SEVERITY_TEXT_TO_SEVERITY_NUMBER;
//# sourceMappingURL=constants.js.map
@@ -0,0 +1,34 @@
"use client";
import { jsx } from 'react/jsx-runtime';
import { invariant } from 'motion-utils';
import { forwardRef, useContext } from 'react';
import { ReorderContext } from '../../context/ReorderContext.mjs';
import { motion } from '../../render/components/motion/proxy.mjs';
import { useConstant } from '../../utils/use-constant.mjs';
import { useMotionValue } from '../../value/use-motion-value.mjs';
import { useTransform } from '../../value/use-transform.mjs';
import { isMotionValue } from '../../value/utils/is-motion-value.mjs';
function useDefaultMotionValue(value, defaultValue = 0) {
return isMotionValue(value) ? value : useMotionValue(defaultValue);
}
function ReorderItemComponent({ children, style = {}, value, as = "li", onDrag, layout = true, ...props }, externalRef) {
const Component = useConstant(() => motion[as]);
const context = useContext(ReorderContext);
const point = {
x: useDefaultMotionValue(style.x),
y: useDefaultMotionValue(style.y),
};
const zIndex = useTransform([point.x, point.y], ([latestX, latestY]) => latestX || latestY ? 1 : "unset");
invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
const { axis, registerItem, updateOrder } = context;
return (jsx(Component, { drag: axis, ...props, dragSnapToOrigin: true, style: { ...style, x: point.x, y: point.y, zIndex }, layout: layout, onDrag: (event, gesturePoint) => {
const { velocity } = gesturePoint;
velocity[axis] &&
updateOrder(value, point[axis].get(), velocity[axis]);
onDrag && onDrag(event, gesturePoint);
}, onLayoutMeasure: (measured) => registerItem(value, measured), ref: externalRef, ignoreStrict: true, children: children }));
}
const ReorderItem = /*@__PURE__*/ forwardRef(ReorderItemComponent);
export { ReorderItem, ReorderItemComponent };
@@ -0,0 +1 @@
{"version":3,"file":"firebase.js","sources":["../../../../../src/integrations/tracing/firebase/firebase.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { captureException, defineIntegration, flush, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\nimport { FirebaseInstrumentation, type FirebaseInstrumentationConfig } from './otel';\n\nconst INTEGRATION_NAME = 'Firebase';\n\nconst config: FirebaseInstrumentationConfig = {\n firestoreSpanCreationHook: span => {\n addOriginToSpan(span, 'auto.firebase.otel.firestore');\n\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'db.query');\n },\n functions: {\n requestHook: span => {\n addOriginToSpan(span, 'auto.firebase.otel.functions');\n\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.request');\n },\n errorHook: async (_, error) => {\n if (error) {\n captureException(error, {\n mechanism: {\n type: 'auto.firebase.otel.functions',\n handled: false,\n },\n });\n await flush(2000);\n }\n },\n },\n};\n\nexport const instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME, () => new FirebaseInstrumentation(config));\n\nconst _firebaseIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentFirebase();\n },\n };\n}) satisfies IntegrationFn;\n\nexport const firebaseIntegration = defineIntegration(_firebaseIntegration);\n"],"names":["addOriginToSpan","SEMANTIC_ATTRIBUTE_SENTRY_OP","captureException","flush","generateInstrumentOnce","FirebaseInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,UAAU;;AAEnC,MAAM,MAAM,GAAkC;AAC9C,EAAE,yBAAyB,EAAE,IAAA,IAAQ;AACrC,IAAIA,wBAAe,CAAC,IAAI,EAAE,8BAA8B,CAAC;;AAEzD,IAAI,IAAI,CAAC,YAAY,CAACC,iCAA4B,EAAE,UAAU,CAAC;AAC/D,EAAE,CAAC;AACH,EAAE,SAAS,EAAE;AACb,IAAI,WAAW,EAAE,IAAA,IAAQ;AACzB,MAAMD,wBAAe,CAAC,IAAI,EAAE,8BAA8B,CAAC;;AAE3D,MAAM,IAAI,CAAC,YAAY,CAACC,iCAA4B,EAAE,cAAc,CAAC;AACrE,IAAI,CAAC;AACL,IAAI,SAAS,EAAE,OAAO,CAAC,EAAE,KAAK,KAAK;AACnC,MAAM,IAAI,KAAK,EAAE;AACjB,QAAQC,qBAAgB,CAAC,KAAK,EAAE;AAChC,UAAU,SAAS,EAAE;AACrB,YAAY,IAAI,EAAE,8BAA8B;AAChD,YAAY,OAAO,EAAE,KAAK;AAC1B,WAAW;AACX,SAAS,CAAC;AACV,QAAQ,MAAMC,UAAK,CAAC,IAAI,CAAC;AACzB,MAAM;AACN,IAAI,CAAC;AACL,GAAG;AACH,CAAC;;AAEM,MAAM,kBAAA,GAAqBC,+BAAsB,CAAC,gBAAgB,EAAE,MAAM,IAAIC,+CAAuB,CAAC,MAAM,CAAC;;AAEpH,MAAM,oBAAA,IAAwB,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,kBAAkB,EAAE;AAC1B,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;MAEY,mBAAA,GAAsBC,sBAAiB,CAAC,oBAAoB;;;;;"}
@@ -0,0 +1 @@
export declare function useScrollableAncestors(node: HTMLElement | null): Element[];
@@ -0,0 +1,214 @@
var path = require('path');
var test = require('tape');
var resolve = require('../');
test('mock', function (t) {
t.plan(4);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.equal(
resolve.sync('./baz', opts('/foo/bar')),
path.resolve('/foo/bar/baz.js')
);
t.equal(
resolve.sync('./baz.js', opts('/foo/bar')),
path.resolve('/foo/bar/baz.js')
);
t.throws(function () {
resolve.sync('baz', opts('/foo/bar'));
});
t.throws(function () {
resolve.sync('../baz', opts('/foo/bar'));
});
});
test('mock package', function (t) {
t.plan(1);
var files = {};
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.equal(
resolve.sync('bar', opts('/foo')),
path.resolve('/foo/node_modules/bar/baz.js')
);
});
test('symlinked', function (t) {
t.plan(2);
var files = {};
files[path.resolve('/foo/bar/baz.js')] = 'beep';
files[path.resolve('/foo/bar/symlinked/baz.js')] = 'beep';
var dirs = {};
dirs[path.resolve('/foo/bar')] = true;
dirs[path.resolve('/foo/bar/symlinked')] = true;
function opts(basedir) {
return {
preserveSymlinks: false,
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
var resolved = path.resolve(file);
if (resolved.indexOf('symlinked') >= 0) {
return resolved;
}
var ext = path.extname(resolved);
if (ext) {
var dir = path.dirname(resolved);
var base = path.basename(resolved);
return path.join(dir, 'symlinked', base);
}
return path.join(resolved, 'symlinked');
}
};
}
t.equal(
resolve.sync('./baz', opts('/foo/bar')),
path.resolve('/foo/bar/symlinked/baz.js')
);
t.equal(
resolve.sync('./baz.js', opts('/foo/bar')),
path.resolve('/foo/bar/symlinked/baz.js')
);
});
test('readPackageSync', function (t) {
t.plan(3);
var files = {};
files[path.resolve('/foo/node_modules/bar/something-else.js')] = 'beep';
files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({
main: './baz.js'
});
files[path.resolve('/foo/node_modules/bar/baz.js')] = 'boop';
var dirs = {};
dirs[path.resolve('/foo')] = true;
dirs[path.resolve('/foo/node_modules')] = true;
function opts(basedir, useReadPackage) {
return {
basedir: path.resolve(basedir),
isFile: function (file) {
return Object.prototype.hasOwnProperty.call(files, path.resolve(file));
},
isDirectory: function (dir) {
return !!dirs[path.resolve(dir)];
},
readFileSync: useReadPackage ? null : function (file) {
return files[path.resolve(file)];
},
realpathSync: function (file) {
return file;
}
};
}
t.test('with readFile', function (st) {
st.plan(1);
st.equal(
resolve.sync('bar', opts('/foo')),
path.resolve('/foo/node_modules/bar/baz.js')
);
});
var readPackageSync = function (readFileSync, file) {
if (file.indexOf(path.join('bar', 'package.json')) >= 0) {
return { main: './something-else.js' };
}
return JSON.parse(files[path.resolve(file)]);
};
t.test('with readPackage', function (st) {
st.plan(1);
var options = opts('/foo');
delete options.readFileSync;
options.readPackageSync = readPackageSync;
st.equal(
resolve.sync('bar', options),
path.resolve('/foo/node_modules/bar/something-else.js')
);
});
t.test('with readFile and readPackage', function (st) {
st.plan(1);
var options = opts('/foo');
options.readPackageSync = readPackageSync;
st.throws(
function () { resolve.sync('bar', options); },
TypeError,
'errors when both readFile and readPackage are provided'
);
});
});
@@ -0,0 +1,36 @@
#!/usr/bin/env node
const execa = require('execa')
const fs = require('node:fs')
const existsSync = fs.existsSync
const stat = fs.promises.stat
// Hardcoded parameters
const esVersions = ['es5', 'es6', 'es2017', 'esnext']
const filesToTranspile = ['to-file-transport.ts']
async function transpile () {
process.chdir(__dirname)
for (const sourceFileName of filesToTranspile) {
const sourceStat = await stat(sourceFileName)
for (const esVersion of esVersions) {
const intermediateFileName = sourceFileName.replace(/\.ts$/, '.js')
const targetFileName = sourceFileName.replace(/\.ts$/, `.${esVersion}.cjs`)
const shouldTranspile = !existsSync(targetFileName) || (await stat(targetFileName)).mtimeMs < sourceStat.mtimeMs
if (shouldTranspile) {
await execa('tsc', ['--target', esVersion, '--module', 'commonjs', sourceFileName])
await execa('mv', [intermediateFileName, targetFileName])
}
}
}
}
transpile().catch(err => {
process.exitCode = 1
throw err
})
@@ -0,0 +1,45 @@
import { entityKind } from "../entity.js";
import { DefaultLogger } from "../logger.js";
import { PgDatabase } from "../pg-core/db.js";
import { PgDialect } from "../pg-core/dialect.js";
import {
createTableRelationsHelpers,
extractTablesRelationalConfig
} from "../relations.js";
import { PgRemoteSession } from "./session.js";
class PgRemoteDatabase extends PgDatabase {
static [entityKind] = "PgRemoteDatabase";
}
function drizzle(callback, config = {}, _dialect = () => new PgDialect({ casing: config.casing })) {
const dialect = _dialect();
let logger;
if (config.logger === true) {
logger = new DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = extractTablesRelationalConfig(
config.schema,
createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new PgRemoteSession(callback, dialect, schema, { logger, cache: config.cache });
const db = new PgRemoteDatabase(dialect, session, schema);
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
export {
PgRemoteDatabase,
drizzle
};
//# sourceMappingURL=driver.js.map
@@ -0,0 +1,17 @@
/**
Check if a file path is a binary file.
@example
```
import isBinaryPath = require('is-binary-path');
isBinaryPath('source/unicorn.png');
//=> true
isBinaryPath('source/unicorn.txt');
//=> false
```
*/
declare function isBinaryPath(filePath: string): boolean;
export = isBinaryPath;
@@ -0,0 +1,88 @@
import { debug } from '@sentry/core';
import { supportsNativeDebugIds } from '../util.js';
import { generateValueInjectionRules } from './generateValueInjectionRules.js';
/**
* Construct a Turbopack config object from a Next.js config object and a Turbopack options object.
*
* @param userNextConfig - The Next.js config object.
* @param userSentryOptions - The Sentry build options object.
* @param routeManifest - The route manifest object.
* @param nextJsVersion - The Next.js version.
* @param vercelCronsConfig - The Vercel crons configuration from vercel.json.
* @returns The Turbopack config object.
*/
function constructTurbopackConfig({
userNextConfig,
userSentryOptions,
routeManifest,
nextJsVersion,
vercelCronsConfig,
}
) {
// If sourcemaps are disabled, we don't need to enable native debug ids as this will add build time.
const shouldEnableNativeDebugIds =
(supportsNativeDebugIds(nextJsVersion ?? '') && userNextConfig?.turbopack?.debugIds) ??
userSentryOptions?.sourcemaps?.disable !== true;
const newConfig = {
...userNextConfig.turbopack,
...(shouldEnableNativeDebugIds ? { debugIds: true } : {}),
};
const tunnelPath =
userSentryOptions?.tunnelRoute !== undefined &&
userNextConfig.output !== 'export' &&
typeof userSentryOptions.tunnelRoute === 'string'
? `${userNextConfig.basePath ?? ''}${userSentryOptions.tunnelRoute}`
: undefined;
const valueInjectionRules = generateValueInjectionRules({
routeManifest,
nextJsVersion,
tunnelPath,
vercelCronsConfig,
});
for (const { matcher, rule } of valueInjectionRules) {
newConfig.rules = safelyAddTurbopackRule(newConfig.rules, { matcher, rule });
}
return newConfig;
}
/**
* Safely add a Turbopack rule to the existing rules.
*
* @param existingRules - The existing rules.
* @param matcher - The matcher for the rule.
* @param rule - The rule to add.
* @returns The updated rules object.
*/
function safelyAddTurbopackRule(
existingRules,
{ matcher, rule },
) {
if (!existingRules) {
return {
[matcher]: rule,
};
}
// If the rule already exists, we don't want to mess with it.
if (existingRules[matcher]) {
debug.log(
`[@sentry/nextjs] - Turbopack rule already exists for ${matcher}. Please remove it from your Next.js config in order for Sentry to work properly.`,
);
return existingRules;
}
return {
...existingRules,
[matcher]: rule,
};
}
export { constructTurbopackConfig, safelyAddTurbopackRule };
//# sourceMappingURL=constructTurbopackConfig.js.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Wind = createLucideIcon("Wind", [
["path", { d: "M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2", key: "1k4u03" }],
["path", { d: "M9.6 4.6A2 2 0 1 1 11 8H2", key: "b7d0fd" }],
["path", { d: "M12.6 19.4A2 2 0 1 0 14 16H2", key: "1p5cb3" }]
]);
export { Wind as default };
//# sourceMappingURL=wind.js.map
@@ -0,0 +1,559 @@
(function (global, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined') {
factory(module, require('@jridgewell/resolve-uri'), require('@jridgewell/sourcemap-codec'));
module.exports = def(module);
} else if (typeof define === 'function' && define.amd) {
define(['module', '@jridgewell/resolve-uri', '@jridgewell/sourcemap-codec'], function(mod) {
factory.apply(this, arguments);
mod.exports = def(mod);
});
} else {
const mod = { exports: {} };
factory(mod, global.resolveURI, global.sourcemapCodec);
global = typeof globalThis !== 'undefined' ? globalThis : global || self;
global.traceMapping = def(mod);
}
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
})(this, (function (module, require_resolveURI, require_sourcemapCodec) {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// umd:@jridgewell/sourcemap-codec
var require_sourcemap_codec = __commonJS({
"umd:@jridgewell/sourcemap-codec"(exports, module2) {
module2.exports = require_sourcemapCodec;
}
});
// umd:@jridgewell/resolve-uri
var require_resolve_uri = __commonJS({
"umd:@jridgewell/resolve-uri"(exports, module2) {
module2.exports = require_resolveURI;
}
});
// src/trace-mapping.ts
var trace_mapping_exports = {};
__export(trace_mapping_exports, {
AnyMap: () => FlattenMap,
FlattenMap: () => FlattenMap,
GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND,
LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND,
TraceMap: () => TraceMap,
allGeneratedPositionsFor: () => allGeneratedPositionsFor,
decodedMap: () => decodedMap,
decodedMappings: () => decodedMappings,
eachMapping: () => eachMapping,
encodedMap: () => encodedMap,
encodedMappings: () => encodedMappings,
generatedPositionFor: () => generatedPositionFor,
isIgnored: () => isIgnored,
originalPositionFor: () => originalPositionFor,
presortedDecodedMap: () => presortedDecodedMap,
sourceContentFor: () => sourceContentFor,
traceSegment: () => traceSegment
});
module.exports = __toCommonJS(trace_mapping_exports);
var import_sourcemap_codec = __toESM(require_sourcemap_codec());
// src/resolve.ts
var import_resolve_uri = __toESM(require_resolve_uri());
// src/strip-filename.ts
function stripFilename(path) {
if (!path) return "";
const index = path.lastIndexOf("/");
return path.slice(0, index + 1);
}
// src/resolve.ts
function resolver(mapUrl, sourceRoot) {
const from = stripFilename(mapUrl);
const prefix = sourceRoot ? sourceRoot + "/" : "";
return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from);
}
// src/sourcemap-segment.ts
var COLUMN = 0;
var SOURCES_INDEX = 1;
var SOURCE_LINE = 2;
var SOURCE_COLUMN = 3;
var NAMES_INDEX = 4;
var REV_GENERATED_LINE = 1;
var REV_GENERATED_COLUMN = 2;
// src/sort.ts
function maybeSort(mappings, owned) {
const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
if (unsortedIndex === mappings.length) return mappings;
if (!owned) mappings = mappings.slice();
for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
mappings[i] = sortSegments(mappings[i], owned);
}
return mappings;
}
function nextUnsortedSegmentLine(mappings, start) {
for (let i = start; i < mappings.length; i++) {
if (!isSorted(mappings[i])) return i;
}
return mappings.length;
}
function isSorted(line) {
for (let j = 1; j < line.length; j++) {
if (line[j][COLUMN] < line[j - 1][COLUMN]) {
return false;
}
}
return true;
}
function sortSegments(line, owned) {
if (!owned) line = line.slice();
return line.sort(sortComparator);
}
function sortComparator(a, b) {
return a[COLUMN] - b[COLUMN];
}
// src/by-source.ts
function buildBySources(decoded, memos) {
const sources = memos.map(() => []);
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
if (seg.length === 1) continue;
const sourceIndex2 = seg[SOURCES_INDEX];
const sourceLine = seg[SOURCE_LINE];
const sourceColumn = seg[SOURCE_COLUMN];
const source = sources[sourceIndex2];
const segs = source[sourceLine] || (source[sourceLine] = []);
segs.push([sourceColumn, i, seg[COLUMN]]);
}
}
for (let i = 0; i < sources.length; i++) {
const source = sources[i];
for (let j = 0; j < source.length; j++) {
const line = source[j];
if (line) line.sort(sortComparator);
}
}
return sources;
}
// src/binary-search.ts
var found = false;
function binarySearch(haystack, needle, low, high) {
while (low <= high) {
const mid = low + (high - low >> 1);
const cmp = haystack[mid][COLUMN] - needle;
if (cmp === 0) {
found = true;
return mid;
}
if (cmp < 0) {
low = mid + 1;
} else {
high = mid - 1;
}
}
found = false;
return low - 1;
}
function upperBound(haystack, needle, index) {
for (let i = index + 1; i < haystack.length; index = i++) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
function lowerBound(haystack, needle, index) {
for (let i = index - 1; i >= 0; index = i--) {
if (haystack[i][COLUMN] !== needle) break;
}
return index;
}
function memoizedState() {
return {
lastKey: -1,
lastNeedle: -1,
lastIndex: -1
};
}
function memoizedBinarySearch(haystack, needle, state, key) {
const { lastKey, lastNeedle, lastIndex } = state;
let low = 0;
let high = haystack.length - 1;
if (key === lastKey) {
if (needle === lastNeedle) {
found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
return lastIndex;
}
if (needle >= lastNeedle) {
low = lastIndex === -1 ? 0 : lastIndex;
} else {
high = lastIndex;
}
}
state.lastKey = key;
state.lastNeedle = needle;
return state.lastIndex = binarySearch(haystack, needle, low, high);
}
// src/types.ts
function parse(map) {
return typeof map === "string" ? JSON.parse(map) : map;
}
// src/flatten-map.ts
var FlattenMap = function(map, mapUrl) {
const parsed = parse(map);
if (!("sections" in parsed)) {
return new TraceMap(parsed, mapUrl);
}
const mappings = [];
const sources = [];
const sourcesContent = [];
const names = [];
const ignoreList = [];
recurse(
parsed,
mapUrl,
mappings,
sources,
sourcesContent,
names,
ignoreList,
0,
0,
Infinity,
Infinity
);
const joined = {
version: 3,
file: parsed.file,
names,
sources,
sourcesContent,
mappings,
ignoreList
};
return presortedDecodedMap(joined);
};
function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const { sections } = input;
for (let i = 0; i < sections.length; i++) {
const { map, offset } = sections[i];
let sl = stopLine;
let sc = stopColumn;
if (i + 1 < sections.length) {
const nextOffset = sections[i + 1].offset;
sl = Math.min(stopLine, lineOffset + nextOffset.line);
if (sl === stopLine) {
sc = Math.min(stopColumn, columnOffset + nextOffset.column);
} else if (sl < stopLine) {
sc = columnOffset + nextOffset.column;
}
}
addSection(
map,
mapUrl,
mappings,
sources,
sourcesContent,
names,
ignoreList,
lineOffset + offset.line,
columnOffset + offset.column,
sl,
sc
);
}
}
function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
const parsed = parse(input);
if ("sections" in parsed) return recurse(...arguments);
const map = new TraceMap(parsed, mapUrl);
const sourcesOffset = sources.length;
const namesOffset = names.length;
const decoded = decodedMappings(map);
const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
append(sources, resolvedSources);
append(names, map.names);
if (contents) append(sourcesContent, contents);
else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
for (let i = 0; i < decoded.length; i++) {
const lineI = lineOffset + i;
if (lineI > stopLine) return;
const out = getLine(mappings, lineI);
const cOffset = i === 0 ? columnOffset : 0;
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const column = cOffset + seg[COLUMN];
if (lineI === stopLine && column >= stopColumn) return;
if (seg.length === 1) {
out.push([column]);
continue;
}
const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
const sourceLine = seg[SOURCE_LINE];
const sourceColumn = seg[SOURCE_COLUMN];
out.push(
seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
);
}
}
}
function append(arr, other) {
for (let i = 0; i < other.length; i++) arr.push(other[i]);
}
function getLine(arr, index) {
for (let i = arr.length; i <= index; i++) arr[i] = [];
return arr[index];
}
// src/trace-mapping.ts
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
var LEAST_UPPER_BOUND = -1;
var GREATEST_LOWER_BOUND = 1;
var TraceMap = class {
constructor(map, mapUrl) {
const isString = typeof map === "string";
if (!isString && map._decodedMemo) return map;
const parsed = parse(map);
const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
this.version = version;
this.file = file;
this.names = names || [];
this.sourceRoot = sourceRoot;
this.sources = sources;
this.sourcesContent = sourcesContent;
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
const resolve = resolver(mapUrl, sourceRoot);
this.resolvedSources = sources.map(resolve);
const { mappings } = parsed;
if (typeof mappings === "string") {
this._encoded = mappings;
this._decoded = void 0;
} else if (Array.isArray(mappings)) {
this._encoded = void 0;
this._decoded = maybeSort(mappings, isString);
} else if (parsed.sections) {
throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
} else {
throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
}
this._decodedMemo = memoizedState();
this._bySources = void 0;
this._bySourceMemos = void 0;
}
};
function cast(map) {
return map;
}
function encodedMappings(map) {
var _a, _b;
return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded);
}
function decodedMappings(map) {
var _a;
return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded));
}
function traceSegment(map, line, column) {
const decoded = decodedMappings(map);
if (line >= decoded.length) return null;
const segments = decoded[line];
const index = traceSegmentInternal(
segments,
cast(map)._decodedMemo,
line,
column,
GREATEST_LOWER_BOUND
);
return index === -1 ? null : segments[index];
}
function originalPositionFor(map, needle) {
let { line, column, bias } = needle;
line--;
if (line < 0) throw new Error(LINE_GTR_ZERO);
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
const decoded = decodedMappings(map);
if (line >= decoded.length) return OMapping(null, null, null, null);
const segments = decoded[line];
const index = traceSegmentInternal(
segments,
cast(map)._decodedMemo,
line,
column,
bias || GREATEST_LOWER_BOUND
);
if (index === -1) return OMapping(null, null, null, null);
const segment = segments[index];
if (segment.length === 1) return OMapping(null, null, null, null);
const { names, resolvedSources } = map;
return OMapping(
resolvedSources[segment[SOURCES_INDEX]],
segment[SOURCE_LINE] + 1,
segment[SOURCE_COLUMN],
segment.length === 5 ? names[segment[NAMES_INDEX]] : null
);
}
function generatedPositionFor(map, needle) {
const { source, line, column, bias } = needle;
return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
}
function allGeneratedPositionsFor(map, needle) {
const { source, line, column, bias } = needle;
return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
}
function eachMapping(map, cb) {
const decoded = decodedMappings(map);
const { names, resolvedSources } = map;
for (let i = 0; i < decoded.length; i++) {
const line = decoded[i];
for (let j = 0; j < line.length; j++) {
const seg = line[j];
const generatedLine = i + 1;
const generatedColumn = seg[0];
let source = null;
let originalLine = null;
let originalColumn = null;
let name = null;
if (seg.length !== 1) {
source = resolvedSources[seg[1]];
originalLine = seg[2] + 1;
originalColumn = seg[3];
}
if (seg.length === 5) name = names[seg[4]];
cb({
generatedLine,
generatedColumn,
source,
originalLine,
originalColumn,
name
});
}
}
}
function sourceIndex(map, source) {
const { sources, resolvedSources } = map;
let index = sources.indexOf(source);
if (index === -1) index = resolvedSources.indexOf(source);
return index;
}
function sourceContentFor(map, source) {
const { sourcesContent } = map;
if (sourcesContent == null) return null;
const index = sourceIndex(map, source);
return index === -1 ? null : sourcesContent[index];
}
function isIgnored(map, source) {
const { ignoreList } = map;
if (ignoreList == null) return false;
const index = sourceIndex(map, source);
return index === -1 ? false : ignoreList.includes(index);
}
function presortedDecodedMap(map, mapUrl) {
const tracer = new TraceMap(clone(map, []), mapUrl);
cast(tracer)._decoded = map.mappings;
return tracer;
}
function decodedMap(map) {
return clone(map, decodedMappings(map));
}
function encodedMap(map) {
return clone(map, encodedMappings(map));
}
function clone(map, mappings) {
return {
version: map.version,
file: map.file,
names: map.names,
sourceRoot: map.sourceRoot,
sources: map.sources,
sourcesContent: map.sourcesContent,
mappings,
ignoreList: map.ignoreList || map.x_google_ignoreList
};
}
function OMapping(source, line, column, name) {
return { source, line, column, name };
}
function GMapping(line, column) {
return { line, column };
}
function traceSegmentInternal(segments, memo, line, column, bias) {
let index = memoizedBinarySearch(segments, column, memo, line);
if (found) {
index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
} else if (bias === LEAST_UPPER_BOUND) index++;
if (index === -1 || index === segments.length) return -1;
return index;
}
function sliceGeneratedPositions(segments, memo, line, column, bias) {
let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
if (!found && bias === LEAST_UPPER_BOUND) min++;
if (min === -1 || min === segments.length) return [];
const matchedColumn = found ? column : segments[min][COLUMN];
if (!found) min = lowerBound(segments, matchedColumn, min);
const max = upperBound(segments, matchedColumn, min);
const result = [];
for (; min <= max; min++) {
const segment = segments[min];
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
}
return result;
}
function generatedPosition(map, source, line, column, bias, all) {
var _a, _b;
line--;
if (line < 0) throw new Error(LINE_GTR_ZERO);
if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
const { sources, resolvedSources } = map;
let sourceIndex2 = sources.indexOf(source);
if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));
const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));
const segments = generated[sourceIndex2][line];
if (segments == null) return all ? [] : GMapping(null, null);
const memo = bySourceMemos[sourceIndex2];
if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
const index = traceSegmentInternal(segments, memo, line, column, bias);
if (index === -1) return GMapping(null, null);
const segment = segments[index];
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
}
}));
//# sourceMappingURL=trace-mapping.umd.js.map
@@ -0,0 +1,10 @@
"use strict";
exports.isTuesday = void 0;
var _index = require("../isTuesday.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isTuesday = (exports.isTuesday = (0, _index2.convertToFP)(
_index.isTuesday,
1,
));
@@ -0,0 +1,96 @@
"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 bigint_exports = {};
__export(bigint_exports, {
SingleStoreBigInt53: () => SingleStoreBigInt53,
SingleStoreBigInt53Builder: () => SingleStoreBigInt53Builder,
SingleStoreBigInt64: () => SingleStoreBigInt64,
SingleStoreBigInt64Builder: () => SingleStoreBigInt64Builder,
bigint: () => bigint
});
module.exports = __toCommonJS(bigint_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreBigInt53Builder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreBigInt53Builder";
constructor(name, unsigned = false) {
super(name, "number", "SingleStoreBigInt53");
this.config.unsigned = unsigned;
}
/** @internal */
build(table) {
return new SingleStoreBigInt53(
table,
this.config
);
}
}
class SingleStoreBigInt53 extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreBigInt53";
getSQLType() {
return `bigint${this.config.unsigned ? " unsigned" : ""}`;
}
mapFromDriverValue(value) {
if (typeof value === "number") {
return value;
}
return Number(value);
}
}
class SingleStoreBigInt64Builder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreBigInt64Builder";
constructor(name, unsigned = false) {
super(name, "bigint", "SingleStoreBigInt64");
this.config.unsigned = unsigned;
}
/** @internal */
build(table) {
return new SingleStoreBigInt64(
table,
this.config
);
}
}
class SingleStoreBigInt64 extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreBigInt64";
getSQLType() {
return `bigint${this.config.unsigned ? " unsigned" : ""}`;
}
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
mapFromDriverValue(value) {
return BigInt(value);
}
}
function bigint(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
if (config.mode === "number") {
return new SingleStoreBigInt53Builder(name, config.unsigned);
}
return new SingleStoreBigInt64Builder(name, config.unsigned);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreBigInt53,
SingleStoreBigInt53Builder,
SingleStoreBigInt64,
SingleStoreBigInt64Builder,
bigint
});
//# sourceMappingURL=bigint.cjs.map
@@ -0,0 +1,39 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// Based on https://github.com/sindresorhus/escape-string-regexp but with modifications to:
// a) reduce the size by skipping the runtime type - checking
// b) ensure it gets down - compiled for old versions of Node(the published package only supports Node 14+).
//
// MIT License
//
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files(the "Software"), to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and
// to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of
// the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
/**
* Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
* `new RegExp()`.
*
* @param regexString The string to escape
* @returns An version of the string with all special regex characters escaped
*/
function escapeStringForRegex(regexString) {
// escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
// discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
}
exports.escapeStringForRegex = escapeStringForRegex;
//# sourceMappingURL=escapeStringForRegex.js.map
@@ -0,0 +1,143 @@
export declare enum QuoteType {
NoValue = 0,
Unquoted = 1,
Single = 2,
Double = 3
}
export interface Callbacks {
onattribdata(start: number, endIndex: number): void;
onattribentity(codepoint: number): void;
onattribend(quote: QuoteType, endIndex: number): void;
onattribname(start: number, endIndex: number): void;
oncdata(start: number, endIndex: number, endOffset: number): void;
onclosetag(start: number, endIndex: number): void;
oncomment(start: number, endIndex: number, endOffset: number): void;
ondeclaration(start: number, endIndex: number): void;
onend(): void;
onopentagend(endIndex: number): void;
onopentagname(start: number, endIndex: number): void;
onprocessinginstruction(start: number, endIndex: number): void;
onselfclosingtag(endIndex: number): void;
ontext(start: number, endIndex: number): void;
ontextentity(codepoint: number): void;
}
export default class Tokenizer {
private readonly cbs;
/** The current state the tokenizer is in. */
private state;
/** The read buffer. */
private buffer;
/** The beginning of the section that is currently being read. */
private sectionStart;
/** The index within the buffer that we are currently looking at. */
private index;
/** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
private baseState;
/** For special parsing behavior inside of script and style tags. */
private isSpecial;
/** Indicates whether the tokenizer has been paused. */
running: boolean;
/** The offset of the current buffer. */
private offset;
private readonly xmlMode;
private readonly decodeEntities;
private readonly entityTrie;
constructor({ xmlMode, decodeEntities, }: {
xmlMode?: boolean;
decodeEntities?: boolean;
}, cbs: Callbacks);
reset(): void;
write(chunk: string): void;
end(): void;
pause(): void;
resume(): void;
/**
* The current index within all of the written data.
*/
getIndex(): number;
/**
* The start of the current section.
*/
getSectionStart(): number;
private stateText;
private currentSequence;
private sequenceIndex;
private stateSpecialStartSequence;
/** Look for an end tag. For <title> tags, also decode entities. */
private stateInSpecialTag;
private stateCDATASequence;
/**
* When we wait for one specific character, we can speed things up
* by skipping through the buffer until we find it.
*
* @returns Whether the character was found.
*/
private fastForwardTo;
/**
* Comments and CDATA end with `-->` and `]]>`.
*
* Their common qualities are:
* - Their end sequences have a distinct character they start with.
* - That character is then repeated, so we have to check multiple repeats.
* - All characters but the start character of the sequence can be skipped.
*/
private stateInCommentLike;
/**
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
*
* XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
* We allow anything that wouldn't end the tag.
*/
private isTagStartChar;
private startSpecial;
private stateBeforeTagName;
private stateInTagName;
private stateBeforeClosingTagName;
private stateInClosingTagName;
private stateAfterClosingTagName;
private stateBeforeAttributeName;
private stateInSelfClosingTag;
private stateInAttributeName;
private stateAfterAttributeName;
private stateBeforeAttributeValue;
private handleInAttributeValue;
private stateInAttributeValueDoubleQuotes;
private stateInAttributeValueSingleQuotes;
private stateInAttributeValueNoQuotes;
private stateBeforeDeclaration;
private stateInDeclaration;
private stateInProcessingInstruction;
private stateBeforeComment;
private stateInSpecialComment;
private stateBeforeSpecialS;
private trieIndex;
private trieCurrent;
/** For named entities, the index of the value. For numeric entities, the code point. */
private entityResult;
private entityExcess;
private stateBeforeEntity;
private stateInNamedEntity;
private emitNamedEntity;
private stateBeforeNumericEntity;
private emitNumericEntity;
private stateInNumericEntity;
private stateInHexEntity;
private allowLegacyEntity;
/**
* Remove data that has already been consumed from the buffer.
*/
private cleanup;
private shouldContinue;
/**
* Iterates through the buffer, calling the function corresponding to the current state.
*
* States that are more likely to be hit are higher up, as a performance improvement.
*/
private parse;
private finish;
/** Handle any trailing data. */
private handleTrailingData;
private emitPartial;
private emitCodePoint;
}
//# sourceMappingURL=Tokenizer.d.ts.map
@@ -0,0 +1,35 @@
/**
* Extracts the value from an option-like object or string.
*/ const getOptionValue = (option)=>{
if (typeof option === 'string') {
return option;
}
return option.value;
};
/**
* Compares two arrays of options by their values.
* Returns true if both arrays contain the same values (order-independent).
*/ export const optionsAreEqual = (options1, options2)=>{
if (!options1 && !options2) {
return true;
}
if (!options1 || !options2) {
return false;
}
if (options1.length !== options2.length) {
return false;
}
const values1 = new Set(options1.map(getOptionValue));
const values2 = new Set(options2.map(getOptionValue));
if (values1.size !== values2.size) {
return false;
}
for (const value of values1){
if (!values2.has(value)) {
return false;
}
}
return true;
};
//# sourceMappingURL=optionsAreEqual.js.map
@@ -0,0 +1,25 @@
/**
* Checks if `value` is `null` or `undefined`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
* @example
*
* _.isNil(null);
* // => true
*
* _.isNil(void 0);
* // => true
*
* _.isNil(NaN);
* // => false
*/
function isNil(value) {
return value == null;
}
module.exports = isNil;
@@ -0,0 +1,56 @@
import { Attributes, AttributeValue } from '@opentelemetry/api';
import { SpanKind } from '@opentelemetry/api';
import { SpanAttributes, TransactionSource } from '@sentry/core';
import { AbstractSpan } from '../types';
interface SpanDescription {
op: string | undefined;
description: string;
source: TransactionSource;
data?: Record<string, string | undefined>;
}
/**
* Infer the op & description for a set of name, attributes and kind of a span.
*/
export declare function inferSpanData(spanName: string, attributes: SpanAttributes, kind: SpanKind): SpanDescription;
/**
* Extract better op/description from an otel span.
*
* Does not overwrite the span name if the source is already set to custom to ensure
* that user-updated span names are preserved. In this case, we only adjust the op but
* leave span description and source unchanged.
*
* Based on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7422ce2a06337f68a59b552b8c5a2ac125d6bae5/exporter/sentryexporter/sentry_exporter.go#L306
*/
export declare function parseSpanDescription(span: AbstractSpan): SpanDescription;
/** Only exported for tests. */
export declare function descriptionForHttpMethod({ name, kind, attributes }: {
name: string;
attributes: Attributes;
kind: SpanKind;
}, httpMethod: AttributeValue): SpanDescription;
/** Exported for tests only */
export declare function getSanitizedUrl(attributes: Attributes, kind: SpanKind): {
url: string | undefined;
urlPath: string | undefined;
query: string | undefined;
fragment: string | undefined;
hasRoute: boolean;
};
/**
* Because Otel instrumentation sometimes mutates span names via `span.updateName`, the only way
* to ensure that a user-set span name is preserved is to store it as a tmp attribute on the span.
* We delete this attribute once we're done with it when preparing the event envelope.
*
* This temp attribute always takes precedence over the original name.
*
* We also need to take care of setting the correct source. Users can always update the source
* after updating the name, so we need to respect that.
*
* @internal exported only for testing
*/
export declare function getUserUpdatedNameAndSource(originalName: string, attributes: Attributes, fallbackSource?: TransactionSource): {
description: string;
source: TransactionSource;
};
export {};
//# sourceMappingURL=parseSpanDescription.d.ts.map
@@ -0,0 +1,5 @@
export declare const differenceInMilliseconds: import("./types.js").FPFn2<
number,
string | number | Date,
string | number | Date
>;
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _readOnlyError;
function _readOnlyError(name) {
throw new TypeError('"' + name + '" is read-only');
}
//# sourceMappingURL=readOnlyError.js.map
@@ -0,0 +1,8 @@
import React from 'react';
import type { DocumentInfoContext, DocumentInfoProps } from './types.js';
export type * from './types.js';
export declare const useDocumentInfo: () => DocumentInfoContext;
export declare const DocumentInfoProvider: React.FC<{
readonly children: React.ReactNode;
} & DocumentInfoProps>;
//# sourceMappingURL=index.d.ts.map
@@ -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 HandHelping = createLucideIcon("HandHelping", [
["path", { d: "M11 12h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 14", key: "1j4xps" }],
[
"path",
{
d: "m7 18 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",
key: "uospg8"
}
],
["path", { d: "m2 13 6 6", key: "16e5sb" }]
]);
export { HandHelping as default };
//# sourceMappingURL=hand-helping.js.map
@@ -0,0 +1,65 @@
import type { BuildColumns } from "../column-builder.cjs";
import { entityKind } from "../entity.cjs";
import type { TypedQueryBuilder } from "../query-builders/query-builder.cjs";
import type { AddAliasToSelection } from "../query-builders/select.types.cjs";
import type { ColumnsSelection, SQL } from "../sql/sql.cjs";
import type { SingleStoreColumnBuilderBase } from "./columns/index.cjs";
import { QueryBuilder } from "./query-builders/query-builder.cjs";
import type { SelectedFields } from "./query-builders/select.types.cjs";
import { SingleStoreViewBase } from "./view-base.cjs";
import { SingleStoreViewConfig } from "./view-common.cjs";
export interface ViewBuilderConfig {
algorithm?: 'undefined' | 'merge' | 'temptable';
definer?: string;
sqlSecurity?: 'definer' | 'invoker';
withCheckOption?: 'cascaded' | 'local';
}
export declare class ViewBuilderCore<TConfig extends {
name: string;
columns?: unknown;
}> {
protected name: TConfig['name'];
protected schema: string | undefined;
static readonly [entityKind]: string;
readonly _: {
readonly name: TConfig['name'];
readonly columns: TConfig['columns'];
};
constructor(name: TConfig['name'], schema: string | undefined);
protected config: ViewBuilderConfig;
algorithm(algorithm: Exclude<ViewBuilderConfig['algorithm'], undefined>): this;
definer(definer: Exclude<ViewBuilderConfig['definer'], undefined>): this;
sqlSecurity(sqlSecurity: Exclude<ViewBuilderConfig['sqlSecurity'], undefined>): this;
withCheckOption(withCheckOption?: Exclude<ViewBuilderConfig['withCheckOption'], undefined>): this;
}
export declare class ViewBuilder<TName extends string = string> extends ViewBuilderCore<{
name: TName;
}> {
static readonly [entityKind]: string;
as<TSelectedFields extends SelectedFields>(qb: TypedQueryBuilder<TSelectedFields> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelectedFields>)): SingleStoreViewWithSelection<TName, false, AddAliasToSelection<TSelectedFields, TName, 'singlestore'>>;
}
export declare class ManualViewBuilder<TName extends string = string, TColumns extends Record<string, SingleStoreColumnBuilderBase> = Record<string, SingleStoreColumnBuilderBase>> extends ViewBuilderCore<{
name: TName;
columns: TColumns;
}> {
static readonly [entityKind]: string;
private columns;
constructor(name: TName, columns: TColumns, schema: string | undefined);
existing(): SingleStoreViewWithSelection<TName, true, BuildColumns<TName, TColumns, 'singlestore'>>;
as(query: SQL): SingleStoreViewWithSelection<TName, false, BuildColumns<TName, TColumns, 'singlestore'>>;
}
export declare class SingleStoreView<TName extends string = string, TExisting extends boolean = boolean, TSelectedFields extends ColumnsSelection = ColumnsSelection> extends SingleStoreViewBase<TName, TExisting, TSelectedFields> {
static readonly [entityKind]: string;
protected $SingleStoreViewBrand: 'SingleStoreView';
[SingleStoreViewConfig]: ViewBuilderConfig | undefined;
constructor({ singlestoreConfig, config }: {
singlestoreConfig: ViewBuilderConfig | undefined;
config: {
name: TName;
schema: string | undefined;
selectedFields: SelectedFields;
query: SQL | undefined;
};
});
}
export type SingleStoreViewWithSelection<TName extends string, TExisting extends boolean, TSelectedFields extends ColumnsSelection> = SingleStoreView<TName, TExisting, TSelectedFields> & TSelectedFields;
@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{AutoLinkNode as t,$isAutoLinkNode as e,$isLinkNode as n,TOGGLE_LINK_COMMAND as r,$createAutoLinkNode as l}from"@lexical/link";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{mergeRegister as i}from"@lexical/utils";import{TextNode as s,$getSelection as u,$isRangeSelection as g,COMMAND_PRIORITY_LOW as c,$isTextNode as a,$isElementNode as f,$isLineBreakNode as x,$createTextNode as h,$isNodeSelection as p}from"lexical";import{useEffect as d}from"react";function m(t,e=(t=>t)){return n=>{const r=t.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function T(t,e){for(let n=0;n<e.length;n++){const r=e[n](t);if(r)return r}return null}const C=/[.,;\s]/;function S(t){return C.test(t)}function b(t){return S(t[t.length-1])}function U(t){return S(t[0])}function v(t){let e=t.getPreviousSibling();return f(e)&&(e=e.getLastDescendant()),null===e||x(e)||a(e)&&b(e.getTextContent())}function L(t){let e=t.getNextSibling();return f(e)&&(e=e.getFirstDescendant()),null===e||x(e)||a(e)&&U(e.getTextContent())}function R(t,e,n,r){if(!(t>0?S(n[t-1]):v(r[0])))return!1;return e<n.length?S(n[e]):L(r[r.length-1])}function k(t,e,n){const r=[],l=[],o=[];let i=0,s=0;const u=[...t];for(;u.length>0;){const t=u[0],g=t.getTextContent().length,c=s;s+g<=e?(r.push(t),i+=g):c>=n?o.push(t):l.push(t),s+=g,u.shift()}return[i,r,l,o]}function D(t,e,n,r){const o=l(r.url,r.attributes);if(1===t.length){let l,i=t[0];0===e?[l,i]=i.splitText(n):[,l,i]=i.splitText(e,n);const s=h(r.text);return s.setFormat(l.getFormat()),s.setDetail(l.getDetail()),s.setStyle(l.getStyle()),o.append(s),l.replace(o),i}if(t.length>1){const r=t[0];let l,i=r.getTextContent().length;0===e?l=r:[,l]=r.splitText(e);const s=[];let c;for(let e=1;e<t.length;e++){const r=t[e],l=r.getTextContent().length,o=i;if(o<n)if(i+l<=n)s.push(r);else{const[t,e]=r.splitText(n-o);s.push(t),c=e}i+=l}const f=u(),x=f?f.getNodes().find(a):void 0,d=h(l.getTextContent());return d.setFormat(l.getFormat()),d.setDetail(l.getDetail()),d.setStyle(l.getStyle()),o.append(d,...s),x&&x===l&&(g(f)?d.select(f.anchor.offset,f.focus.offset):p(f)&&d.select(0,d.getTextContent().length)),l.replace(o),c}}function N(t,e,n){const r=t.getChildren(),l=r.length;for(let e=0;e<l;e++){const l=r[e];if(!a(l)||!l.isSimpleText())return I(t),void n(null,t.getURL())}const o=t.getTextContent(),i=T(o,e);if(null===i||i.text!==o)return I(t),void n(null,t.getURL());if(!v(t)||!L(t))return I(t),void n(null,t.getURL());const s=t.getURL();if(s!==i.url&&(t.setURL(i.url),n(i.url,s)),i.attributes){const e=t.getRel();e!==i.attributes.rel&&(t.setRel(i.attributes.rel||null),n(i.attributes.rel||null,e));const r=t.getTarget();r!==i.attributes.target&&(t.setTarget(i.attributes.target||null),n(i.attributes.target||null,r))}}function I(t){const e=t.getChildren();for(let n=e.length-1;n>=0;n--)t.insertAfter(e[n]);return t.remove(),e.map((t=>t.getLatest()))}function P(l,o,f){d((()=>{l.hasNodes([t])||function(t,...e){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",t);for(const t of e)r.append("v",t);throw n.search=r.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(77);const x=(t,e)=>{f&&f(t,e)};return i(l.registerNodeTransform(s,(t=>{const r=t.getParentOrThrow(),l=t.getPreviousSibling();if(e(r)&&!r.getIsUnlinked())N(r,o,x);else if(!n(r)){if(t.isSimpleText()&&(U(t.getTextContent())||!e(l))){const e=function(t){const e=[t];let n=t.getNextSibling();for(;null!==n&&a(n)&&n.isSimpleText()&&(e.push(n),!/[\s]/.test(n.getTextContent()));)n=n.getNextSibling();return e}(t);!function(t,e,n){let r=[...t];const l=r.map((t=>t.getTextContent())).join("");let o,i=l,s=0;for(;(o=T(i,e))&&null!==o;){const t=o.index,e=t+o.length;if(R(s+t,s+e,l,r)){const[l,,i,u]=k(r,s+t,s+e),g=D(i,s+t-l,s+e-l,o);r=g?[g,...u]:u,n(o.url,null),s=0}else s+=e;i=i.substring(e)}}(e,o,x)}!function(t,n,r){const l=t.getPreviousSibling(),o=t.getNextSibling(),i=t.getTextContent();var s;!e(l)||l.getIsUnlinked()||U(i)&&(s=i,!(l.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(s):/^\.[a-zA-Z0-9]{1,}/.test(s)))||(l.append(t),N(l,n,r),r(null,l.getURL())),!e(o)||o.getIsUnlinked()||b(i)||(I(o),N(o,n,r),r(null,o.getURL()))}(t,o,x)}})),l.registerCommand(r,(t=>{const n=u();if(null!==t||!g(n))return!1;return n.extract().forEach((t=>{const n=t.getParent();e(n)&&(n.setIsUnlinked(!n.getIsUnlinked()),n.markDirty())})),!1}),c))}),[l,o,f])}function w({matchers:t,onChange:e}){const[n]=o();return P(n,t,e),null}export{w as AutoLinkPlugin,m as createLinkMatcherWithRegExp};
@@ -0,0 +1 @@
{"version":3,"file":"section.js","sources":["../../../src/icons/section.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Section\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgNWE0IDMgMCAwIDAtOCAwYzAgNCA4IDMgOCA3YTQgMyAwIDAgMS04IDAiIC8+CiAgPHBhdGggZD0iTTggMTlhNCAzIDAgMCAwIDggMGMwLTQtOC0zLTgtN2E0IDMgMCAwIDEgOCAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/section\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 Section = createLucideIcon('Section', [\n ['path', { d: 'M16 5a4 3 0 0 0-8 0c0 4 8 3 8 7a4 3 0 0 1-8 0', key: 'vqan6v' }],\n ['path', { d: 'M8 19a4 3 0 0 0 8 0c0-4-8-3-8-7a4 3 0 0 1 8 0', key: 'wdjd8o' }],\n]);\n\nexport default Section;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,21 @@
import { type ReactNode } from 'react';
import type AbstractIntlMessages from './AbstractIntlMessages.js';
import type Formats from './Formats.js';
import type { InitializedIntlConfig } from './IntlConfig.js';
import IntlError from './IntlError.js';
import type { MessageKeys, NestedKeyOf, NestedValueOf } from './MessageKeys.js';
import type { MarkupTranslationValues, RichTranslationValues, TranslationValues } from './TranslationValues.js';
import type { Formatters, IntlCache } from './formatters.js';
export type CreateBaseTranslatorProps<Messages> = InitializedIntlConfig & {
cache: IntlCache;
formatters: Formatters;
namespace?: string;
messagesOrError: Messages | IntlError;
};
export default function createBaseTranslator<Messages extends AbstractIntlMessages, NestedKey extends NestedKeyOf<Messages>>(config: Omit<CreateBaseTranslatorProps<Messages>, 'messagesOrError'>): {
<TargetKey extends MessageKeys<NestedValueOf<Messages, NestedKey>, NestedKeyOf<NestedValueOf<Messages, NestedKey>>>>(key: TargetKey, values?: TranslationValues, formats?: Formats, _fallback?: never): string;
rich: (key: string, values?: RichTranslationValues, formats?: Formats, _fallback?: never) => ReactNode;
markup(key: Parameters<(key: string, values?: RichTranslationValues, formats?: Formats, _fallback?: never) => ReactNode>[0], values: MarkupTranslationValues, formats?: Parameters<(key: string, values?: RichTranslationValues, formats?: Formats, _fallback?: never) => ReactNode>[2], _fallback?: never): string;
raw(key: string): any;
has(key: string): boolean;
};
@@ -0,0 +1,22 @@
import { DirectusFile } from "../../../schema/file.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/delete/files.d.ts
/**
* Delete multiple files at once.
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deleteFiles: <Schema>(keys: DirectusFile<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing file.
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deleteFile: <Schema>(key: DirectusFile<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deleteFile, deleteFiles };
//# sourceMappingURL=files.d.ts.map
@@ -0,0 +1,13 @@
@import '../../scss/styles';
@layer payload-default {
.icon--more {
height: $baseline;
width: $baseline;
.fill {
fill: var(--theme-elevation-800);
stroke: currentColor;
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"assets.js","names":["onResponseHandler: ResponseTransformer"],"sources":["../../../../src/rest/commands/read/assets.ts"],"sourcesContent":["import type { DirectusFile, DirectusFolder } from '../../../schema/index.js';\nimport type { AssetResponse, AssetsQuery, ResponseTransformer } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Read the contents of a file as a ReadableStream\n *\n * @param {string} key\n * @param {AssetsQuery} query\n * @returns {ReadableStream<Uint8Array>}\n */\nexport const readAssetRaw =\n\t<Schema>(key: DirectusFile<Schema>['id'], query?: AssetsQuery): RestCommand<ReadableStream<Uint8Array>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/assets/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t\tonResponse: (response) => response.body,\n\t\t};\n\t};\n\n/**\n * Read the contents of a file as a Blob\n *\n * @param {string} key\n * @param {AssetsQuery} query\n * @returns {Blob}\n */\nexport const readAssetBlob =\n\t<Schema>(key: DirectusFile<Schema>['id'], query?: AssetsQuery): RestCommand<Blob, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/assets/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t\tonResponse: (response) => response.blob(),\n\t\t};\n\t};\n\n/**\n * Read the contents of a file as a ArrayBuffer\n *\n * @param {string} key\n * @param {AssetsQuery} query\n * @returns {ArrayBuffer}\n */\nexport const readAssetArrayBuffer =\n\t<Schema>(key: DirectusFile<Schema>['id'], query?: AssetsQuery): RestCommand<ArrayBuffer, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/assets/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t\tonResponse: (response) => response.arrayBuffer(),\n\t\t};\n\t};\n\n/**\n * Download a ZIP archive containing the specified files.\n *\n * @param keys An array of file IDs to include in the ZIP archive, must contain at least one ID.\n * @param options\n */\nexport const downloadFilesZip =\n\t<Schema, R extends keyof AssetResponse = 'raw'>(\n\t\tkeys: DirectusFile<Schema>['id'][],\n\t\toptions?: { output: R },\n\t): RestCommand<AssetResponse[R], Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(keys), 'Keys cannot be empty');\n\n\t\tlet onResponseHandler: ResponseTransformer = (response) => response.body;\n\n\t\tif (options?.output === 'arrayBuffer') {\n\t\t\tonResponseHandler = (response) => response.arrayBuffer();\n\t\t} else if (options?.output === 'blob') {\n\t\t\tonResponseHandler = (response) => response.blob();\n\t\t}\n\n\t\treturn {\n\t\t\tpath: `/assets/files/`,\n\t\t\tbody: JSON.stringify({\n\t\t\t\tids: keys,\n\t\t\t}),\n\t\t\tmethod: 'POST',\n\t\t\tonResponse: onResponseHandler,\n\t\t};\n\t};\n\n/**\n * Download a ZIP archive of an entire folder tree.\n *\n * @param key The root folder ID to download.\n * @param options\n */\nexport const downloadFolderZip =\n\t<Schema, R extends keyof AssetResponse = 'raw'>(\n\t\tkey: DirectusFolder<Schema>['id'],\n\t\toptions?: { output: R },\n\t): RestCommand<AssetResponse[R], Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\tlet onResponseHandler: ResponseTransformer = (response) => response.body;\n\n\t\tif (options?.output === 'arrayBuffer') {\n\t\t\tonResponseHandler = (response) => response.arrayBuffer();\n\t\t} else if (options?.output === 'blob') {\n\t\t\tonResponseHandler = (response) => response.blob();\n\t\t}\n\n\t\treturn {\n\t\t\tpath: `/assets/folder/${key}`,\n\t\t\tmethod: 'POST',\n\t\t\tonResponse: onResponseHandler,\n\t\t};\n\t};\n"],"mappings":"6DAYA,MAAa,GACH,EAAiC,SAEzC,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,WAAW,IACjB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,WAAa,GAAa,EAAS,KACnC,EAUU,GACH,EAAiC,SAEzC,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,WAAW,IACjB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,WAAa,GAAa,EAAS,MAAM,CACzC,EAUU,GACH,EAAiC,SAEzC,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,WAAW,IACjB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,WAAa,GAAa,EAAS,aAAa,CAChD,EASU,GAEX,EACA,QAEK,CACL,EAAa,OAAO,EAAK,CAAE,uBAAuB,CAElD,IAAIA,EAA0C,GAAa,EAAS,KAQpE,OANI,GAAS,SAAW,cACvB,EAAqB,GAAa,EAAS,aAAa,CAC9C,GAAS,SAAW,SAC9B,EAAqB,GAAa,EAAS,MAAM,EAG3C,CACN,KAAM,iBACN,KAAM,KAAK,UAAU,CACpB,IAAK,EACL,CAAC,CACF,OAAQ,OACR,WAAY,EACZ,EASU,GAEX,EACA,QAEK,CACL,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEhD,IAAIA,EAA0C,GAAa,EAAS,KAQpE,OANI,GAAS,SAAW,cACvB,EAAqB,GAAa,EAAS,aAAa,CAC9C,GAAS,SAAW,SAC9B,EAAqB,GAAa,EAAS,MAAM,EAG3C,CACN,KAAM,kBAAkB,IACxB,OAAQ,OACR,WAAY,EACZ"}
@@ -0,0 +1,34 @@
import { addHours } from "./addHours.js";
/**
* The {@link subHours} function options.
*/
/**
* @name subHours
* @category Hour Helpers
* @summary Subtract the specified number of hours from the given date.
*
* @description
* Subtract the specified number of hours from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of hours to be subtracted.
* @param options - The options
*
* @returns The new date with the hours subtracted
*
* @example
* // Subtract 2 hours from 11 July 2014 01:00:00:
* const result = subHours(new Date(2014, 6, 11, 1, 0), 2)
* //=> Thu Jul 10 2014 23:00:00
*/
export function subHours(date, amount, options) {
return addHours(date, -amount, options);
}
// Fallback for modularized imports:
export default subHours;
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/vector.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { SQL } from '~/sql/index.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreColumn, SingleStoreColumnBuilder, SingleStoreGeneratedColumnConfig } from './common.ts';\n\nexport type SingleStoreVectorBuilderInitial<TName extends string> = SingleStoreVectorBuilder<{\n\tname: TName;\n\tdataType: 'array';\n\tcolumnType: 'SingleStoreVector';\n\tdata: Array<number>;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class SingleStoreVectorBuilder<T extends ColumnBuilderBaseConfig<'array', 'SingleStoreVector'>>\n\textends SingleStoreColumnBuilder<T, SingleStoreVectorConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreVectorBuilder';\n\n\tconstructor(name: T['name'], config: SingleStoreVectorConfig) {\n\t\tsuper(name, 'array', 'SingleStoreVector');\n\t\tthis.config.dimensions = config.dimensions;\n\t\tthis.config.elementType = config.elementType;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreVector<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreVector<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n\n\t/** @internal */\n\toverride generatedAlwaysAs(as: SQL<unknown> | (() => SQL) | T['data'], config?: SingleStoreGeneratedColumnConfig) {\n\t\tthrow new Error('not implemented');\n\t}\n}\n\nexport class SingleStoreVector<T extends ColumnBaseConfig<'array', 'SingleStoreVector'>>\n\textends SingleStoreColumn<T, SingleStoreVectorConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreVector';\n\n\tdimensions: number = this.config.dimensions;\n\telementType: ElementType | undefined = this.config.elementType;\n\n\tgetSQLType(): string {\n\t\treturn `vector(${this.dimensions}, ${this.elementType || 'F32'})`;\n\t}\n\n\toverride mapToDriverValue(value: Array<number>) {\n\t\treturn JSON.stringify(value);\n\t}\n\n\toverride mapFromDriverValue(value: string): Array<number> {\n\t\treturn JSON.parse(value);\n\t}\n}\n\ntype ElementType = 'I8' | 'I16' | 'I32' | 'I64' | 'F32' | 'F64';\n\nexport interface SingleStoreVectorConfig {\n\tdimensions: number;\n\telementType?: ElementType;\n}\n\nexport function vector(\n\tconfig: SingleStoreVectorConfig,\n): SingleStoreVectorBuilderInitial<''>;\nexport function vector<TName extends string>(\n\tname: TName,\n\tconfig: SingleStoreVectorConfig,\n): SingleStoreVectorBuilderInitial<TName>;\nexport function vector(a: string | SingleStoreVectorConfig, b?: SingleStoreVectorConfig) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreVectorConfig>(a, b);\n\treturn new SingleStoreVectorBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAG3B,SAAS,8BAA8B;AACvC,SAAS,mBAAmB,gCAAkE;AAWvF,MAAM,iCACJ,yBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAiC;AAC7D,UAAM,MAAM,SAAS,mBAAmB;AACxC,SAAK,OAAO,aAAa,OAAO;AAChC,SAAK,OAAO,cAAc,OAAO;AAAA,EAClC;AAAA;AAAA,EAGS,MACR,OACqD;AACrD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AAAA;AAAA,EAGS,kBAAkB,IAA4C,QAA2C;AACjH,UAAM,IAAI,MAAM,iBAAiB;AAAA,EAClC;AACD;AAEO,MAAM,0BACJ,kBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB,KAAK,OAAO;AAAA,EACjC,cAAuC,KAAK,OAAO;AAAA,EAEnD,aAAqB;AACpB,WAAO,UAAU,KAAK,UAAU,KAAK,KAAK,eAAe,KAAK;AAAA,EAC/D;AAAA,EAES,iBAAiB,OAAsB;AAC/C,WAAO,KAAK,UAAU,KAAK;AAAA,EAC5B;AAAA,EAES,mBAAmB,OAA8B;AACzD,WAAO,KAAK,MAAM,KAAK;AAAA,EACxB;AACD;AAgBO,SAAS,OAAO,GAAqC,GAA6B;AACxF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAgD,GAAG,CAAC;AAC7E,SAAO,IAAI,yBAAyB,MAAM,MAAM;AACjD;","names":[]}
@@ -0,0 +1 @@
{"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","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 { UndiciRequest, UndiciResponse } from './types';\n\nexport interface ListenerRecord {\n name: string;\n unsubscribe: () => void;\n}\n\nexport interface RequestMessage {\n request: UndiciRequest;\n}\n\nexport interface RequestHeadersMessage {\n request: UndiciRequest;\n socket: any;\n}\n\nexport interface ResponseHeadersMessage {\n request: UndiciRequest;\n response: UndiciResponse;\n}\n\nexport interface RequestTrailersMessage {\n request: UndiciRequest;\n response: UndiciResponse;\n}\n\nexport interface RequestErrorMessage {\n request: UndiciRequest;\n error: Error;\n}\n"]}
@@ -0,0 +1,242 @@
'use strict'
const http = require('http')
const os = require('node:os')
const semver = require('semver')
const { test, skip } = require('tap')
const { sink, once } = require('./helper')
const pino = require('../')
const { pid } = process
const hostname = os.hostname()
test('http request support', async ({ ok, same, error, teardown }) => {
let originalReq
const instance = pino(sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
pid,
hostname,
level: 30,
msg: 'my request',
req: {
method: originalReq.method,
url: originalReq.url,
headers: originalReq.headers,
remoteAddress: originalReq.socket.remoteAddress,
remotePort: originalReq.socket.remotePort
}
})
}))
const server = http.createServer((req, res) => {
originalReq = req
instance.info(req, 'my request')
res.end('hello')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
test('http request support via serializer', async ({ ok, same, error, teardown }) => {
let originalReq
const instance = pino({
serializers: {
req: pino.stdSerializers.req
}
}, sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
pid,
hostname,
level: 30,
msg: 'my request',
req: {
method: originalReq.method,
url: originalReq.url,
headers: originalReq.headers,
remoteAddress: originalReq.socket.remoteAddress,
remotePort: originalReq.socket.remotePort
}
})
}))
const server = http.createServer(function (req, res) {
originalReq = req
instance.info({ req }, 'my request')
res.end('hello')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
// skipped because request connection is deprecated since v13, and request socket is always available
skip('http request support via serializer without request connection', async ({ ok, same, error, teardown }) => {
let originalReq
const instance = pino({
serializers: {
req: pino.stdSerializers.req
}
}, sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
const expected = {
pid,
hostname,
level: 30,
msg: 'my request',
req: {
method: originalReq.method,
url: originalReq.url,
headers: originalReq.headers
}
}
if (semver.gte(process.version, '13.0.0')) {
expected.req.remoteAddress = originalReq.socket.remoteAddress
expected.req.remotePort = originalReq.socket.remotePort
}
same(chunk, expected)
}))
const server = http.createServer(function (req, res) {
originalReq = req
delete req.connection
instance.info({ req }, 'my request')
res.end('hello')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
test('http response support', async ({ ok, same, error, teardown }) => {
let originalRes
const instance = pino(sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
pid,
hostname,
level: 30,
msg: 'my response',
res: {
statusCode: originalRes.statusCode,
headers: originalRes.getHeaders()
}
})
}))
const server = http.createServer(function (req, res) {
originalRes = res
res.end('hello')
instance.info(res, 'my response')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
test('http response support via a serializer', async ({ ok, same, error, teardown }) => {
const instance = pino({
serializers: {
res: pino.stdSerializers.res
}
}, sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
pid,
hostname,
level: 30,
msg: 'my response',
res: {
statusCode: 200,
headers: {
'x-single': 'y',
'x-multi': [1, 2]
}
}
})
}))
const server = http.createServer(function (req, res) {
res.setHeader('x-single', 'y')
res.setHeader('x-multi', [1, 2])
res.end('hello')
instance.info({ res }, 'my response')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
test('http request support via serializer in a child', async ({ ok, same, error, teardown }) => {
let originalReq
const instance = pino({
serializers: {
req: pino.stdSerializers.req
}
}, sink((chunk, enc) => {
ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()')
delete chunk.time
same(chunk, {
pid,
hostname,
level: 30,
msg: 'my request',
req: {
method: originalReq.method,
url: originalReq.url,
headers: originalReq.headers,
remoteAddress: originalReq.socket.remoteAddress,
remotePort: originalReq.socket.remotePort
}
})
}))
const server = http.createServer(function (req, res) {
originalReq = req
const child = instance.child({ req })
child.info('my request')
res.end('hello')
})
server.unref()
server.listen()
const err = await once(server, 'listening')
error(err)
const res = await once(http.get('http://localhost:' + server.address().port), 'response')
res.resume()
server.close()
})
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('countBy', require('../countBy'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,3 @@
type MaybeParams<T> = (err: Error | any | null, result?: T) => void;
export default function maybe<T>(cb: MaybeParams<T> | undefined, promise: Promise<T>): Promise<T> | void;
export {};
@@ -0,0 +1,281 @@
"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.InstrumentationBase = void 0;
const path = require("path");
const util_1 = require("util");
const semver_1 = require("../../semver");
const shimmer_1 = require("../../shimmer");
const instrumentation_1 = require("../../instrumentation");
const RequireInTheMiddleSingleton_1 = require("./RequireInTheMiddleSingleton");
const import_in_the_middle_1 = require("import-in-the-middle");
const api_1 = require("@opentelemetry/api");
const require_in_the_middle_1 = require("require-in-the-middle");
const fs_1 = require("fs");
const utils_1 = require("../../utils");
/**
* Base abstract class for instrumenting node plugins
*/
class InstrumentationBase extends instrumentation_1.InstrumentationAbstract {
_modules;
_hooks = [];
_requireInTheMiddleSingleton = RequireInTheMiddleSingleton_1.RequireInTheMiddleSingleton.getInstance();
_enabled = false;
constructor(instrumentationName, instrumentationVersion, config) {
super(instrumentationName, instrumentationVersion, config);
let modules = this.init();
if (modules && !Array.isArray(modules)) {
modules = [modules];
}
this._modules = modules || [];
if (this._config.enabled) {
this.enable();
}
}
_wrap = (moduleExports, name, wrapper) => {
if ((0, utils_1.isWrapped)(moduleExports[name])) {
this._unwrap(moduleExports, name);
}
if (!util_1.types.isProxy(moduleExports)) {
return (0, shimmer_1.wrap)(moduleExports, name, wrapper);
}
else {
const wrapped = (0, shimmer_1.wrap)(Object.assign({}, moduleExports), name, wrapper);
Object.defineProperty(moduleExports, name, {
value: wrapped,
});
return wrapped;
}
};
_unwrap = (moduleExports, name) => {
if (!util_1.types.isProxy(moduleExports)) {
return (0, shimmer_1.unwrap)(moduleExports, name);
}
else {
return Object.defineProperty(moduleExports, name, {
value: moduleExports[name],
});
}
};
_massWrap = (moduleExportsArray, names, wrapper) => {
if (!moduleExportsArray) {
api_1.diag.error('must provide one or more modules to patch');
return;
}
else if (!Array.isArray(moduleExportsArray)) {
moduleExportsArray = [moduleExportsArray];
}
if (!(names && Array.isArray(names))) {
api_1.diag.error('must provide one or more functions to wrap on modules');
return;
}
moduleExportsArray.forEach(moduleExports => {
names.forEach(name => {
this._wrap(moduleExports, name, wrapper);
});
});
};
_massUnwrap = (moduleExportsArray, names) => {
if (!moduleExportsArray) {
api_1.diag.error('must provide one or more modules to patch');
return;
}
else if (!Array.isArray(moduleExportsArray)) {
moduleExportsArray = [moduleExportsArray];
}
if (!(names && Array.isArray(names))) {
api_1.diag.error('must provide one or more functions to wrap on modules');
return;
}
moduleExportsArray.forEach(moduleExports => {
names.forEach(name => {
this._unwrap(moduleExports, name);
});
});
};
_warnOnPreloadedModules() {
this._modules.forEach((module) => {
const { name } = module;
try {
const resolvedModule = require.resolve(name);
if (require.cache[resolvedModule]) {
// Module is already cached, which means the instrumentation hook might not work
this._diag.warn(`Module ${name} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${name}`);
}
}
catch {
// Module isn't available, we can simply skip
}
});
}
_extractPackageVersion(baseDir) {
try {
const json = (0, fs_1.readFileSync)(path.join(baseDir, 'package.json'), {
encoding: 'utf8',
});
const version = JSON.parse(json).version;
return typeof version === 'string' ? version : undefined;
}
catch {
api_1.diag.warn('Failed extracting version', baseDir);
}
return undefined;
}
_onRequire(module, exports, name, baseDir) {
if (!baseDir) {
if (typeof module.patch === 'function') {
module.moduleExports = exports;
if (this._enabled) {
this._diag.debug('Applying instrumentation patch for nodejs core module on require hook', {
module: module.name,
});
return module.patch(exports);
}
}
return exports;
}
const version = this._extractPackageVersion(baseDir);
module.moduleVersion = version;
if (module.name === name) {
// main module
if (isSupported(module.supportedVersions, version, module.includePrerelease)) {
if (typeof module.patch === 'function') {
module.moduleExports = exports;
if (this._enabled) {
this._diag.debug('Applying instrumentation patch for module on require hook', {
module: module.name,
version: module.moduleVersion,
baseDir,
});
return module.patch(exports, module.moduleVersion);
}
}
}
return exports;
}
// internal file
const files = module.files ?? [];
const normalizedName = path.normalize(name);
const supportedFileInstrumentations = files.filter(f => f.name === normalizedName &&
isSupported(f.supportedVersions, version, module.includePrerelease));
return supportedFileInstrumentations.reduce((patchedExports, file) => {
file.moduleExports = patchedExports;
if (this._enabled) {
this._diag.debug('Applying instrumentation patch for nodejs module file on require hook', {
module: module.name,
version: module.moduleVersion,
fileName: file.name,
baseDir,
});
// patch signature is not typed, so we cast it assuming it's correct
return file.patch(patchedExports, module.moduleVersion);
}
return patchedExports;
}, exports);
}
enable() {
if (this._enabled) {
return;
}
this._enabled = true;
// already hooked, just call patch again
if (this._hooks.length > 0) {
for (const module of this._modules) {
if (typeof module.patch === 'function' && module.moduleExports) {
this._diag.debug('Applying instrumentation patch for nodejs module on instrumentation enabled', {
module: module.name,
version: module.moduleVersion,
});
module.patch(module.moduleExports, module.moduleVersion);
}
for (const file of module.files) {
if (file.moduleExports) {
this._diag.debug('Applying instrumentation patch for nodejs module file on instrumentation enabled', {
module: module.name,
version: module.moduleVersion,
fileName: file.name,
});
file.patch(file.moduleExports, module.moduleVersion);
}
}
}
return;
}
this._warnOnPreloadedModules();
for (const module of this._modules) {
const hookFn = (exports, name, baseDir) => {
if (!baseDir && path.isAbsolute(name)) {
const parsedPath = path.parse(name);
name = parsedPath.name;
baseDir = parsedPath.dir;
}
return this._onRequire(module, exports, name, baseDir);
};
const onRequire = (exports, name, baseDir) => {
return this._onRequire(module, exports, name, baseDir);
};
// `RequireInTheMiddleSingleton` does not support absolute paths.
// For an absolute paths, we must create a separate instance of the
// require-in-the-middle `Hook`.
const hook = path.isAbsolute(module.name)
? new require_in_the_middle_1.Hook([module.name], { internals: true }, onRequire)
: this._requireInTheMiddleSingleton.register(module.name, onRequire);
this._hooks.push(hook);
const esmHook = new import_in_the_middle_1.Hook([module.name], { internals: false }, hookFn);
this._hooks.push(esmHook);
}
}
disable() {
if (!this._enabled) {
return;
}
this._enabled = false;
for (const module of this._modules) {
if (typeof module.unpatch === 'function' && module.moduleExports) {
this._diag.debug('Removing instrumentation patch for nodejs module on instrumentation disabled', {
module: module.name,
version: module.moduleVersion,
});
module.unpatch(module.moduleExports, module.moduleVersion);
}
for (const file of module.files) {
if (file.moduleExports) {
this._diag.debug('Removing instrumentation patch for nodejs module file on instrumentation disabled', {
module: module.name,
version: module.moduleVersion,
fileName: file.name,
});
file.unpatch(file.moduleExports, module.moduleVersion);
}
}
}
}
isEnabled() {
return this._enabled;
}
}
exports.InstrumentationBase = InstrumentationBase;
function isSupported(supportedVersions, version, includePrerelease) {
if (typeof version === 'undefined') {
// If we don't have the version, accept the wildcard case only
return supportedVersions.includes('*');
}
return supportedVersions.some(supportedVersion => {
return (0, semver_1.satisfies)(version, supportedVersion, { includePrerelease });
});
}
//# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { formatDistance as fn } from "../formatDistance.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const formatDistanceWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default formatDistanceWithOptions;
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const AlignVerticalSpaceBetween = createLucideIcon("AlignVerticalSpaceBetween", [
["rect", { width: "14", height: "6", x: "5", y: "15", rx: "2", key: "1w91an" }],
["rect", { width: "10", height: "6", x: "7", y: "3", rx: "2", key: "17wqzy" }],
["path", { d: "M2 21h20", key: "1nyx9w" }],
["path", { d: "M2 3h20", key: "91anmk" }]
]);
export { AlignVerticalSpaceBetween as default };
//# sourceMappingURL=align-vertical-space-between.js.map
@@ -0,0 +1,9 @@
import type { SQL, SQLWrapper } from "../sql/sql.cjs";
import type { SQLiteColumn } from "./columns/index.cjs";
export * from "../sql/expressions/index.cjs";
export declare function concat(column: SQLiteColumn | SQL.Aliased, value: string | SQLWrapper): SQL;
export declare function substring(column: SQLiteColumn | SQL.Aliased, { from, for: _for }: {
from?: number | SQLWrapper;
for?: number | SQLWrapper;
}): SQL;
export declare function rowId(): SQL<number>;
@@ -0,0 +1 @@
{"version":3,"file":"handleBeforeSendEvent.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleBeforeSendEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,KAAK,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,uBAAuB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEtD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,uBAAuB,CAQtF"}
@@ -0,0 +1,4 @@
export declare const addSelectGenericsToGeneratedTypes: ({ compiledGeneratedTypes, }: {
compiledGeneratedTypes: string;
}) => string;
//# sourceMappingURL=addSelectGenericsToGeneretedTypes.d.ts.map
@@ -0,0 +1,43 @@
var baseAssignValue = require('./_baseAssignValue'),
baseForOwn = require('./_baseForOwn'),
baseIteratee = require('./_baseIteratee');
/**
* Creates an object with the same keys as `object` and values generated
* by running each own enumerable string keyed property of `object` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, key, object).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapKeys
* @example
*
* var users = {
* 'fred': { 'user': 'fred', 'age': 40 },
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
* };
*
* _.mapValues(users, function(o) { return o.age; });
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*
* // The `_.property` iteratee shorthand.
* _.mapValues(users, 'age');
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
function mapValues(object, iteratee) {
var result = {};
iteratee = baseIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
module.exports = mapValues;
@@ -0,0 +1,30 @@
"use strict";
exports.pl = void 0;
var _index = require("./pl/_lib/formatDistance.cjs");
var _index2 = require("./pl/_lib/formatLong.cjs");
var _index3 = require("./pl/_lib/formatRelative.cjs");
var _index4 = require("./pl/_lib/localize.cjs");
var _index5 = require("./pl/_lib/match.cjs");
/**
* @category Locales
* @summary Polish locale.
* @language Polish
* @iso-639-2 pol
* @author Mateusz Derks [@ertrzyiks](https://github.com/ertrzyiks)
* @author Just RAG [@justrag](https://github.com/justrag)
* @author Mikolaj Grzyb [@mikolajgrzyb](https://github.com/mikolajgrzyb)
* @author Mateusz Tokarski [@mutisz](https://github.com/mutisz)
*/
const pl = (exports.pl = {
code: "pl",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});
@@ -0,0 +1,8 @@
import { Event } from '../types-hoist/event';
/**
* Deduplication filter.
*/
export declare const dedupeIntegration: () => import("../types-hoist/integration").Integration;
/** only exported for tests. */
export declare function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean;
//# sourceMappingURL=dedupe.d.ts.map
@@ -0,0 +1,16 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { createContext, use } from 'react';
export const Context = /*#__PURE__*/createContext(false);
export const RowProvider = ({
children,
withinRow = true
}) => {
return /*#__PURE__*/_jsx(Context, {
value: withinRow,
children: children
});
};
export const useRow = () => use(Context);
//# sourceMappingURL=provider.js.map
@@ -0,0 +1,639 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var emotionElement = require('./emotion-element-4787f564.browser.development.cjs.js');
var React = require('react');
var utils = require('@emotion/utils');
var useInsertionEffectWithFallbacks = require('@emotion/use-insertion-effect-with-fallbacks');
var serialize = require('@emotion/serialize');
require('@emotion/cache');
require('@babel/runtime/helpers/extends');
require('@emotion/weak-memoize');
require('../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.cjs.js');
require('hoist-non-react-statics');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var isDevelopment = true;
var pkg = {
name: "@emotion/react",
version: "11.14.0",
main: "dist/emotion-react.cjs.js",
module: "dist/emotion-react.esm.js",
types: "dist/emotion-react.cjs.d.ts",
exports: {
".": {
types: {
"import": "./dist/emotion-react.cjs.mjs",
"default": "./dist/emotion-react.cjs.js"
},
development: {
"edge-light": {
module: "./dist/emotion-react.development.edge-light.esm.js",
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
"default": "./dist/emotion-react.development.edge-light.cjs.js"
},
worker: {
module: "./dist/emotion-react.development.edge-light.esm.js",
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
"default": "./dist/emotion-react.development.edge-light.cjs.js"
},
workerd: {
module: "./dist/emotion-react.development.edge-light.esm.js",
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
"default": "./dist/emotion-react.development.edge-light.cjs.js"
},
browser: {
module: "./dist/emotion-react.browser.development.esm.js",
"import": "./dist/emotion-react.browser.development.cjs.mjs",
"default": "./dist/emotion-react.browser.development.cjs.js"
},
module: "./dist/emotion-react.development.esm.js",
"import": "./dist/emotion-react.development.cjs.mjs",
"default": "./dist/emotion-react.development.cjs.js"
},
"edge-light": {
module: "./dist/emotion-react.edge-light.esm.js",
"import": "./dist/emotion-react.edge-light.cjs.mjs",
"default": "./dist/emotion-react.edge-light.cjs.js"
},
worker: {
module: "./dist/emotion-react.edge-light.esm.js",
"import": "./dist/emotion-react.edge-light.cjs.mjs",
"default": "./dist/emotion-react.edge-light.cjs.js"
},
workerd: {
module: "./dist/emotion-react.edge-light.esm.js",
"import": "./dist/emotion-react.edge-light.cjs.mjs",
"default": "./dist/emotion-react.edge-light.cjs.js"
},
browser: {
module: "./dist/emotion-react.browser.esm.js",
"import": "./dist/emotion-react.browser.cjs.mjs",
"default": "./dist/emotion-react.browser.cjs.js"
},
module: "./dist/emotion-react.esm.js",
"import": "./dist/emotion-react.cjs.mjs",
"default": "./dist/emotion-react.cjs.js"
},
"./jsx-runtime": {
types: {
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
},
development: {
"edge-light": {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
},
worker: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
},
workerd: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
},
browser: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.js"
},
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.development.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js"
},
"edge-light": {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
},
worker: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
},
workerd: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
},
browser: {
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.js"
},
module: "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js",
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
},
"./_isolated-hnrs": {
types: {
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
},
development: {
"edge-light": {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
},
worker: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
},
workerd: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
},
browser: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.cjs.js"
},
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.js"
},
"edge-light": {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
},
worker: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
},
workerd: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
},
browser: {
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.js"
},
module: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js",
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
},
"./jsx-dev-runtime": {
types: {
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
},
development: {
"edge-light": {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
},
worker: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
},
workerd: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
},
browser: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.js"
},
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js"
},
"edge-light": {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
},
worker: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
},
workerd: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
},
browser: {
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js"
},
module: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js",
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
},
"./package.json": "./package.json",
"./types/css-prop": "./types/css-prop.d.ts",
"./macro": {
types: {
"import": "./macro.d.mts",
"default": "./macro.d.ts"
},
"default": "./macro.js"
}
},
imports: {
"#is-development": {
development: "./src/conditions/true.ts",
"default": "./src/conditions/false.ts"
},
"#is-browser": {
"edge-light": "./src/conditions/false.ts",
workerd: "./src/conditions/false.ts",
worker: "./src/conditions/false.ts",
browser: "./src/conditions/true.ts",
"default": "./src/conditions/is-browser.ts"
}
},
files: [
"src",
"dist",
"jsx-runtime",
"jsx-dev-runtime",
"_isolated-hnrs",
"types/css-prop.d.ts",
"macro.*"
],
sideEffects: false,
author: "Emotion Contributors",
license: "MIT",
scripts: {
"test:typescript": "dtslint types"
},
dependencies: {
"@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.13.5",
"@emotion/cache": "^11.14.0",
"@emotion/serialize": "^1.3.3",
"@emotion/use-insertion-effect-with-fallbacks": "^1.2.0",
"@emotion/utils": "^1.4.2",
"@emotion/weak-memoize": "^0.4.0",
"hoist-non-react-statics": "^3.3.1"
},
peerDependencies: {
react: ">=16.8.0"
},
peerDependenciesMeta: {
"@types/react": {
optional: true
}
},
devDependencies: {
"@definitelytyped/dtslint": "0.0.112",
"@emotion/css": "11.13.5",
"@emotion/css-prettifier": "1.2.0",
"@emotion/server": "11.11.0",
"@emotion/styled": "11.14.0",
"@types/hoist-non-react-statics": "^3.3.5",
"html-tag-names": "^1.1.2",
react: "16.14.0",
"svg-tag-names": "^1.1.1",
typescript: "^5.4.5"
},
repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
publishConfig: {
access: "public"
},
"umd:main": "dist/emotion-react.umd.min.js",
preconstruct: {
entrypoints: [
"./index.ts",
"./jsx-runtime.ts",
"./jsx-dev-runtime.ts",
"./_isolated-hnrs.ts"
],
umdName: "emotionReact",
exports: {
extra: {
"./types/css-prop": "./types/css-prop.d.ts",
"./macro": {
types: {
"import": "./macro.d.mts",
"default": "./macro.d.ts"
},
"default": "./macro.js"
}
}
}
}
};
exports.jsx = function jsx(type, props) {
// eslint-disable-next-line prefer-rest-params
var args = arguments;
if (props == null || !emotionElement.hasOwn.call(props, 'css')) {
return React__namespace.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = emotionElement.Emotion;
createElementArgArray[1] = emotionElement.createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
}
return React__namespace.createElement.apply(null, createElementArgArray);
};
(function (_jsx) {
var JSX;
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
})(exports.jsx || (exports.jsx = {}));
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var Global = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
if (!warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// I don't really want to add it to the type since it shouldn't be used
'className' in props && props.className || 'css' in props && props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
var serialized = serialize.serializeStyles([styles], undefined, React__namespace.useContext(emotionElement.ThemeContext));
// but it is based on a constant that will never change at runtime
// it's effectively like having two implementations and switching them out
// so it's not actually breaking anything
var sheetRef = React__namespace.useRef();
useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function () {
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
var sheet = new cache.sheet.constructor({
key: key,
nonce: cache.sheet.nonce,
container: cache.sheet.container,
speedy: cache.sheet.isSpeedy
});
var rehydrating = false;
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
if (cache.sheet.tags.length) {
sheet.before = cache.sheet.tags[0];
}
if (node !== null) {
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
node.setAttribute('data-emotion', key);
sheet.hydrate([node]);
}
sheetRef.current = [sheet, rehydrating];
return function () {
sheet.flush();
};
}, [cache]);
useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function () {
var sheetRefCurrent = sheetRef.current;
var sheet = sheetRefCurrent[0],
rehydrating = sheetRefCurrent[1];
if (rehydrating) {
sheetRefCurrent[1] = false;
return;
}
if (serialized.next !== undefined) {
// insert keyframes
utils.insertStyles(cache, serialized.next, true);
}
if (sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
sheet.before = element;
sheet.flush();
}
cache.insert("", serialized, sheet, false);
}, [cache, serialized.name]);
return null;
});
{
Global.displayName = 'EmotionGlobal';
}
function css() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return serialize.serializeStyles(args);
}
function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name;
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
}
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
if (arg.styles !== undefined && arg.name !== undefined) {
console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
}
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = utils.getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serializedArr = _ref.serializedArr;
useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function () {
for (var i = 0; i < serializedArr.length; i++) {
utils.insertStyles(cache, serializedArr[i], false);
}
});
return null;
};
var ClassNames = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
var hasRendered = false;
var serializedArr = [];
var css = function css() {
if (hasRendered && isDevelopment) {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serialize.serializeStyles(args, cache.registered);
serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
utils.registerStyles(cache, serialized, false);
return cache.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && isDevelopment) {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(cache.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: React__namespace.useContext(emotionElement.ThemeContext)
};
var ele = props.children(content);
hasRendered = true;
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
cache: cache,
serializedArr: serializedArr
}), ele);
});
{
ClassNames.displayName = 'EmotionClassNames';
}
{
var isBrowser = typeof document !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';
if (isBrowser && !isTestEnv) {
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
var globalContext = typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
: isBrowser ? window : global;
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
if (globalContext[globalKey]) {
console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
}
globalContext[globalKey] = true;
}
}
exports.CacheProvider = emotionElement.CacheProvider;
exports.ThemeContext = emotionElement.ThemeContext;
exports.ThemeProvider = emotionElement.ThemeProvider;
exports.__unsafe_useEmotionCache = emotionElement.__unsafe_useEmotionCache;
exports.useTheme = emotionElement.useTheme;
exports.withEmotionCache = emotionElement.withEmotionCache;
exports.withTheme = emotionElement.withTheme;
exports.ClassNames = ClassNames;
exports.Global = Global;
exports.createElement = exports.jsx;
exports.css = css;
exports.keyframes = keyframes;
@@ -0,0 +1,146 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i,
};
const parseEraPatterns = {
any: [/^p/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i,
};
const parseQuarterPatterns = {
narrow: [/1/i, /2/i, /3/i, /4/i],
any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i],
};
const matchMonthPatterns = {
narrow: /^[slmkcwpg]/i,
abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i,
};
const parseMonthPatterns = {
narrow: [
/^s/i,
/^l/i,
/^m/i,
/^k/i,
/^m/i,
/^c/i,
/^l/i,
/^s/i,
/^w/i,
/^p/i,
/^l/i,
/^g/i,
],
any: [
/^st/i,
/^lu/i,
/^mar/i,
/^k/i,
/^maj/i,
/^c/i,
/^lip/i,
/^si/i,
/^w/i,
/^p/i,
/^lis/i,
/^g/i,
],
};
const matchDayPatterns = {
narrow: /^[npwścs]/i,
short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i,
};
const parseDayPeriodPatterns = {
narrow: {
am: /^a$/i,
pm: /^p$/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/i,
},
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};
@@ -0,0 +1,19 @@
import type { FlattenedField, Payload, PayloadRequest } from 'payload';
import type { BasePostgresAdapter, PostgresDB } from '../../../types.js';
import type { DocsToResave } from '../types.js';
type Args = {
adapter: BasePostgresAdapter;
collectionSlug?: string;
db: PostgresDB;
debug: boolean;
docsToResave: DocsToResave;
fields: FlattenedField[];
globalSlug?: string;
isVersions: boolean;
payload: Payload;
req?: Partial<PayloadRequest>;
tableName: string;
};
export declare const fetchAndResave: ({ adapter, collectionSlug, db, debug, docsToResave, fields, globalSlug, isVersions, payload, req, tableName, }: Args) => Promise<void>;
export {};
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,122 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "文字", verb: "である" },
file: { unit: "バイト", verb: "である" },
array: { unit: "要素", verb: "である" },
set: { unit: "要素", verb: "である" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "数値";
}
case "object": {
if (Array.isArray(data)) {
return "配列";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "入力値",
email: "メールアドレス",
url: "URL",
emoji: "絵文字",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO日時",
date: "ISO日付",
time: "ISO時刻",
duration: "ISO期間",
ipv4: "IPv4アドレス",
ipv6: "IPv6アドレス",
cidrv4: "IPv4範囲",
cidrv6: "IPv6範囲",
base64: "base64エンコード文字列",
base64url: "base64urlエンコード文字列",
json_string: "JSON文字列",
e164: "E.164番号",
jwt: "JWT",
template_literal: "入力値",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `無効な入力: ${issue.expected}が期待されましたが、${parsedType(issue.input)}が入力されました`;
case "invalid_value":
if (issue.values.length === 1) return `無効な入力: ${util.stringifyPrimitive(issue.values[0])}が期待されました`;
return `無効な選択: ${util.joinValues(issue.values, "、")}のいずれかである必要があります`;
case "too_big": {
const adj = issue.inclusive ? "以下である" : "より小さい";
const sizing = getSizing(issue.origin);
if (sizing)
return `大きすぎる値: ${issue.origin ?? "値"}は${issue.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
return `大きすぎる値: ${issue.origin ?? "値"}は${issue.maximum.toString()}${adj}必要があります`;
}
case "too_small": {
const adj = issue.inclusive ? "以上である" : "より大きい";
const sizing = getSizing(issue.origin);
if (sizing)
return `小さすぎる値: ${issue.origin}は${issue.minimum.toString()}${sizing.unit}${adj}必要があります`;
return `小さすぎる値: ${issue.origin}は${issue.minimum.toString()}${adj}必要があります`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `無効な文字列: "${_issue.prefix}"で始まる必要があります`;
if (_issue.format === "ends_with") return `無効な文字列: "${_issue.suffix}"で終わる必要があります`;
if (_issue.format === "includes") return `無効な文字列: "${_issue.includes}"を含む必要があります`;
if (_issue.format === "regex") return `無効な文字列: パターン${_issue.pattern}に一致する必要があります`;
return `無効な${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `無効な数値: ${issue.divisor}の倍数である必要があります`;
case "unrecognized_keys":
return `認識されていないキー${issue.keys.length > 1 ? "群" : ""}: ${util.joinValues(issue.keys, "、")}`;
case "invalid_key":
return `${issue.origin}内の無効なキー`;
case "invalid_union":
return "無効な入力";
case "invalid_element":
return `${issue.origin}内の無効な値`;
default:
return `無効な入力`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, d MMMM yyyy",
long: "d MMMM yyyy",
medium: "d MMM yyyy",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'am' {{time}}",
long: "{{date}} 'am' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
@@ -0,0 +1,61 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { ElementNode, LexicalEditor, LexicalNode } from 'lexical';
/**
* Creates a selection range for the DOM.
* @param editor - The lexical editor.
* @param anchorNode - The anchor node of a selection.
* @param _anchorOffset - The amount of space offset from the anchor to the focus.
* @param focusNode - The current focus.
* @param _focusOffset - The amount of space offset from the focus to the anchor.
* @returns The range of selection for the DOM that was created.
*/
export declare function createDOMRange(editor: LexicalEditor, anchorNode: LexicalNode, _anchorOffset: number, focusNode: LexicalNode, _focusOffset: number): Range | null;
/**
* Creates DOMRects, generally used to help the editor find a specific location on the screen.
* @param editor - The lexical editor
* @param range - A fragment of a document that can contain nodes and parts of text nodes.
* @returns The selectionRects as an array.
*/
export declare function createRectsFromDOMRange(editor: LexicalEditor, range: Range): Array<ClientRect>;
/**
* Creates an object containing all the styles and their values provided in the CSS string.
* @param css - The CSS string of styles and their values.
* @returns The styleObject containing all the styles and their values.
*/
export declare function getStyleObjectFromRawCSS(css: string): Record<string, string>;
/**
* Given a CSS string, returns an object from the style cache.
* @param css - The CSS property as a string.
* @returns The value of the given CSS property.
*/
export declare function getStyleObjectFromCSS(css: string): Record<string, string>;
/**
* Gets the CSS styles from the style object.
* @param styles - The style object containing the styles to get.
* @returns A string containing the CSS styles and their values.
*/
export declare function getCSSFromStyleObject(styles: Record<string, string>): string;
/**
* Gets the computed DOM styles of the element.
* @param node - The node to check the styles for.
* @returns the computed styles of the element or null if there is no DOM element or no default view for the document.
*/
export declare function $getComputedStyleForElement(element: ElementNode): CSSStyleDeclaration | null;
/**
* Gets the computed DOM styles of the parent of the node.
* @param node - The node to check its parent's styles for.
* @returns the computed styles of the node or null if there is no DOM element or no default view for the document.
*/
export declare function $getComputedStyleForParent(node: LexicalNode): CSSStyleDeclaration | null;
/**
* Determines whether a node's parent is RTL.
* @param node - The node to check whether it is RTL.
* @returns whether the node is RTL.
*/
export declare function $isParentRTL(node: LexicalNode): boolean;
@@ -0,0 +1,58 @@
var Symbol = require('./_Symbol'),
copyArray = require('./_copyArray'),
getTag = require('./_getTag'),
isArrayLike = require('./isArrayLike'),
isString = require('./isString'),
iteratorToArray = require('./_iteratorToArray'),
mapToArray = require('./_mapToArray'),
setToArray = require('./_setToArray'),
stringToArray = require('./_stringToArray'),
values = require('./values');
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/** Built-in value references. */
var symIterator = Symbol ? Symbol.iterator : undefined;
/**
* Converts `value` to an array.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to convert.
* @returns {Array} Returns the converted array.
* @example
*
* _.toArray({ 'a': 1, 'b': 2 });
* // => [1, 2]
*
* _.toArray('abc');
* // => ['a', 'b', 'c']
*
* _.toArray(1);
* // => []
*
* _.toArray(null);
* // => []
*/
function toArray(value) {
if (!value) {
return [];
}
if (isArrayLike(value)) {
return isString(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
return iteratorToArray(value[symIterator]());
}
var tag = getTag(value),
func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
return func(value);
}
module.exports = toArray;

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