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

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"getFileFromURL.d.ts","sourceRoot":"","sources":["../../../src/uploads/endpoints/getFileFromURL.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAc3D,eAAO,MAAM,qBAAqB,EAAE,cAqEnC,CAAA"}

View File

@@ -0,0 +1,122 @@
# Webpack Virtual Modules
[![Build Status](https://travis-ci.org/sysgears/webpack-virtual-modules.svg?branch=master)](https://travis-ci.org/sysgears/webpack-virtual-modules)
[![Twitter Follow](https://img.shields.io/twitter/follow/sysgears.svg?style=social)](https://twitter.com/sysgears)
**Webpack Virtual Modules** is a plugin that allows for dynamical generation of in-memory virtual modules for JavaScript
builds created with webpack. When virtual module is created all the parent virtual dirs that lead to the module filename are created too. This plugin supports watch mode meaning any write to a virtual module is seen by webpack as
if a real file stored on disk has changed.
## Installation
Use NPM or Yarn to install Webpack Virtual Modules as a development dependency:
```bash
# with NPM
npm install webpack-virtual-modules --save-dev
# with Yarn
yarn add webpack-virtual-modules --dev
```
## Usage
You can use Webpack Virtual Modules with webpack 5, 4 and 3. The examples below show the usage with webpack 5 or 4. If you want to use our plugin with webpack 3, check out a dedicated doc:
* [Webpack Virtual Modules with Webpack 3]
### Generating static virtual modules
Require the plugin in the webpack configuration file, then create and add virtual modules in the `plugins` array in the
webpack configuration object:
```js
var VirtualModulesPlugin = require('webpack-virtual-modules');
var virtualModules = new VirtualModulesPlugin({
'node_modules/module-foo.js': 'module.exports = { foo: "foo" };',
'node_modules/module-bar.js': 'module.exports = { bar: "bar" };'
});
module.exports = {
// ...
plugins: [
virtualModules
]
};
```
You can now import your virtual modules anywhere in the application and use them:
```js
var moduleFoo = require('module-foo');
// You can now use moduleFoo
console.log(moduleFoo.foo);
```
### Generating dynamic virtual modules
You can generate virtual modules **_dynamically_** with Webpack Virtual Modules.
Here's an example of dynamic generation of a module. All you need to do is create new virtual modules using the plugin
and add them to the `plugins` array. After that, you need to add a webpack hook. For using hooks, consult [webpack
compiler hook documentation].
```js
var webpack = require('webpack');
var VirtualModulesPlugin = require('webpack-virtual-modules');
// Create an empty set of virtual modules
const virtualModules = new VirtualModulesPlugin();
var compiler = webpack({
// ...
plugins: [
virtualModules
]
});
compiler.hooks.compilation.tap('MyPlugin', function(compilation) {
virtualModules.writeModule('node_modules/module-foo.js', '');
});
compiler.watch();
```
In other module or a Webpack plugin, you can write to the module `module-foo` whatever you need. After this write,
webpack will "see" that `module-foo.js` has changed and will restart compilation.
```js
virtualModules.writeModule(
'node_modules/module-foo.js',
'module.exports = { foo: "foo" };'
);
```
## More Examples
- [Swagger and JSDoc Example with Webpack 5]
- [Swagger and JSDoc Example with Webpack 4]
- [Swagger and JSDoc Example with Webpack 3]
## API Reference
- [API Reference]
## Inspiration
This project is inspired by [virtual-module-webpack-plugin].
## License
Copyright © 2017 [SysGears INC]. This source code is licensed under the [MIT] license.
[webpack virtual modules with webpack 3]: https://github.com/sysgears/webpack-virtual-modules/tree/master/docs/webpack3.md
[webpack compiler hook documentation]: https://webpack.js.org/api/compiler-hooks/
[swagger and jsdoc example with webpack 3]: https://github.com/sysgears/webpack-virtual-modules/tree/master/examples/swagger-webpack3
[swagger and jsdoc example with webpack 4]: https://github.com/sysgears/webpack-virtual-modules/tree/master/examples/swagger-webpack4
[swagger and jsdoc example with webpack 5]: https://github.com/sysgears/webpack-virtual-modules/tree/master/examples/swagger-webpack5
[api reference]: https://github.com/sysgears/webpack-virtual-modules/tree/master/docs/API%20Reference.md
[virtual-module-webpack-plugin]: https://github.com/rmarscher/virtual-module-webpack-plugin
[MIT]: LICENSE
[SysGears INC]: http://sysgears.com

View File

@@ -0,0 +1,50 @@
import type {AddedKeywordDefinition} from "../types"
const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"] as const
export type JSONType = (typeof _jsonTypes)[number]
const jsonTypes: Set<string> = new Set(_jsonTypes)
export function isJSONType(x: unknown): x is JSONType {
return typeof x == "string" && jsonTypes.has(x)
}
type ValidationTypes = {
[K in JSONType]: boolean | RuleGroup | undefined
}
export interface ValidationRules {
rules: RuleGroup[]
post: RuleGroup
all: {[Key in string]?: boolean | Rule} // rules that have to be validated
keywords: {[Key in string]?: boolean} // all known keywords (superset of "all")
types: ValidationTypes
}
export interface RuleGroup {
type?: JSONType
rules: Rule[]
}
// This interface wraps KeywordDefinition because definition can have multiple keywords
export interface Rule {
keyword: string
definition: AddedKeywordDefinition
}
export function getRules(): ValidationRules {
const groups: Record<"number" | "string" | "array" | "object", RuleGroup> = {
number: {type: "number", rules: []},
string: {type: "string", rules: []},
array: {type: "array", rules: []},
object: {type: "object", rules: []},
}
return {
types: {...groups, integer: true, boolean: true, null: true},
rules: [{rules: []}, groups.number, groups.string, groups.array, groups.object],
post: {rules: []},
all: {},
keywords: {},
}
}

View File

@@ -0,0 +1,149 @@
/**
* Renders the provided audit results to well-formatted and valid HTML.
*
* Do note that the rendered result is not an HTML document, it's rather
* just a component with results.
*/
export async function renderAuditResultsToHTML(results) {
const grouped = {
total: 0,
ok: [],
notice: [],
warn: [],
error: [],
};
for (const result of results) {
grouped.total++;
if (result.status === 'ok') {
grouped[result.status].push(result);
}
else {
grouped[result.status].push(result);
}
}
let report = '<i>* This report was auto-generated by graphql-http</i>\n';
report += '\n';
report += '<h1>GraphQL over HTTP audit report</h1>\n';
report += '\n';
report += '<ul>\n';
report += `<li><b>${grouped.total}</b> audits in total</li>\n`;
// font-family: monospace helps render native emojis in HTML
if (grouped.ok.length) {
report += `<li><span style="font-family: monospace">✅</span> <b>${grouped.ok.length}</b> pass</li>\n`;
}
if (grouped.notice.length) {
report += `<li><span style="font-family: monospace">💡</span> <b>${grouped.notice.length}</b> notices (suggestions)</li>\n`;
}
if (grouped.warn.length) {
report += `<li><span style="font-family: monospace">❗️</span> <b>${grouped.warn.length}</b> warnings (optional)</li>\n`;
}
if (grouped.error.length) {
report += `<li><span style="font-family: monospace">❌</span> <b>${grouped.error.length}</b> errors (required)</li>\n`;
}
report += '</ul>\n';
report += '\n';
if (grouped.ok.length) {
report += '<h2>Passing</h2>\n';
report += '<ol>\n';
for (const [, result] of grouped.ok.entries()) {
report += `<li><code>${result.id}</code> ${result.name}</li>\n`;
}
report += '</ol>\n';
report += '\n';
}
if (grouped.notice.length) {
report += `<h2>Notices</h2>\n`;
report +=
'The server <i>MAY</i> support these, but are truly optional. These are suggestions following recommended conventions.\n';
report += '<ol>\n';
for (const [, result] of grouped.notice.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.warn.length) {
report += `<h2>Warnings</h2>\n`;
report += 'The server <i>SHOULD</i> support these, but is not required.\n';
report += '<ol>\n';
for (const [, result] of grouped.warn.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.error.length) {
report += `<h2>Errors</h2>\n`;
report += 'The server <b>MUST</b> support these.\n';
report += '<ol>\n';
for (const [, result] of grouped.error.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
}
return report;
}
async function printAuditFail(result) {
var _a;
let report = '';
report += `<li><code>${result.id}</code> ${result.name}\n`;
report += '<details>\n';
report += `<summary>${truncate(result.reason)}</summary>\n`;
report += '<pre><code class="lang-json">'; // no "\n" because they count in HTML pre tags
const res = result.response;
const headers = {};
for (const [key, val] of res.headers.entries()) {
// some headers change on each run, dont report it
if (key === 'date') {
headers[key] = '<timestamp>';
}
else if (['cf-ray', 'server-timing', 'set-cookie'].includes(key)) {
headers[key] = '<omitted>';
}
else {
headers[key] = val;
}
}
let text = '', json;
try {
text = await res.text();
json = JSON.parse(text);
// is json, there shouldnt be nothing to sanitize (hopefully)
}
catch (_b) {
// is not json, avoid rendering html (rest is allowed)
if ((_a = res.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('text/html')) {
text = '<html omitted>';
}
}
const stringified = JSON.stringify({
status: res.status,
statusText: res.statusText,
headers,
body: json || ((text === null || text === void 0 ? void 0 : text.length) > 5120 ? '<body is too long>' : text) || null,
}, (_k, v) => {
if (v != null && typeof v === 'object' && !Array.isArray(v)) {
// sort object fields for stable stringify
const acc = {};
return Object.keys(v)
.sort()
.reverse() // body on bottom
.reduce((acc, k) => {
acc[k] = v[k];
return acc;
}, acc);
}
return v;
}, 2);
report += stringified + '\n';
report += '</code></pre>\n';
report += '</details>\n';
report += '</li>\n';
return report;
}
function truncate(str, len = 1024) {
if (str.length > len) {
return str.substring(0, len) + '...';
}
return str;
}

View File

@@ -0,0 +1 @@
!function(){if("undefined"!=typeof Prism){var i={pattern:/(.)\bdata:[^\/]+\/[^,]+,(?:(?!\1)[\s\S]|\\\1)+(?=\1)/,lookbehind:!0,inside:{"language-css":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?css,)[\s\S]+/,lookbehind:!0},"language-javascript":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?javascript,)[\s\S]+/,lookbehind:!0},"language-json":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?json,)[\s\S]+/,lookbehind:!0},"language-markup":{pattern:/(data:[^\/]+\/(?:[^+,]+\+)?(?:html|xml),)[\s\S]+/,lookbehind:!0}}},a=["url","attr-value","string"];Prism.plugins.dataURIHighlight={processGrammar:function(n){n&&!n["data-uri"]&&(Prism.languages.DFS(n,(function(n,r,e){a.indexOf(e)>-1&&!Array.isArray(r)&&(r.pattern||(r=this[n]={pattern:r}),r.inside=r.inside||{},"attr-value"==e?Prism.languages.insertBefore("inside",r.inside["url-link"]?"url-link":"punctuation",{"data-uri":i},r):r.inside["url-link"]?Prism.languages.insertBefore("inside","url-link",{"data-uri":i},r):r.inside["data-uri"]=i)})),n["data-uri"]=i)}},Prism.hooks.add("before-highlight",(function(a){if(i.pattern.test(a.code))for(var n in i.inside)if(i.inside.hasOwnProperty(n)&&!i.inside[n].inside&&i.inside[n].pattern.test(a.code)){var r=n.match(/^language-(.+)/)[1];Prism.languages[r]&&(i.inside[n].inside={rest:(e=Prism.languages[r],Prism.plugins.autolinker&&Prism.plugins.autolinker.processGrammar(e),e)})}var e;Prism.plugins.dataURIHighlight.processGrammar(a.grammar)}))}}();

View File

@@ -0,0 +1 @@
{"version":3,"file":"box-sizing.js","sourceRoot":"","sources":["../../../src/render/box-sizing.ts"],"names":[],"mappings":";;;AAAA,oEAAgE;AAIzD,IAAM,UAAU,GAAG,UAAC,OAAyB;IAChD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,OAAO,MAAM,CAAC,GAAG,CACb,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,cAAc,EACrB,CAAC,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC,EACnD,CAAC,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC,CACtD,CAAC;AACN,CAAC,CAAC;AATW,QAAA,UAAU,cASrB;AAEK,IAAM,UAAU,GAAG,UAAC,OAAyB;IAChD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAE9B,IAAM,WAAW,GAAG,oCAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,IAAM,YAAY,GAAG,oCAAgB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACzE,IAAM,UAAU,GAAG,oCAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACrE,IAAM,aAAa,GAAG,oCAAgB,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAE3E,OAAO,MAAM,CAAC,GAAG,CACb,WAAW,GAAG,MAAM,CAAC,eAAe,EACpC,UAAU,GAAG,MAAM,CAAC,cAAc,EAClC,CAAC,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,eAAe,GAAG,WAAW,GAAG,YAAY,CAAC,EAChF,CAAC,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,iBAAiB,GAAG,UAAU,GAAG,aAAa,CAAC,CACnF,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB"}

View File

@@ -0,0 +1,71 @@
import type * as graphqlTypes from 'graphql';
import type * as api from '@opentelemetry/api';
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue';
import type { DocumentNode } from 'graphql/language/ast';
import type { GraphQLFieldResolver, GraphQLTypeResolver } from 'graphql/type/definition';
import { OTEL_GRAPHQL_DATA_SYMBOL, OTEL_PATCHED_SYMBOL } from './symbols';
export declare const OPERATION_NOT_SUPPORTED: string;
export type executeFunctionWithObj = (args: graphqlTypes.ExecutionArgs) => PromiseOrValue<graphqlTypes.ExecutionResult>;
export type executeArgumentsArray = [
graphqlTypes.GraphQLSchema,
graphqlTypes.DocumentNode,
any,
any,
Maybe<{
[key: string]: any;
}>,
Maybe<string>,
Maybe<graphqlTypes.GraphQLFieldResolver<any, any>>,
Maybe<graphqlTypes.GraphQLTypeResolver<any, any>>
];
export type executeFunctionWithArgs = (schema: graphqlTypes.GraphQLSchema, document: graphqlTypes.DocumentNode, rootValue?: any, contextValue?: any, variableValues?: Maybe<{
[key: string]: any;
}>, operationName?: Maybe<string>, fieldResolver?: Maybe<graphqlTypes.GraphQLFieldResolver<any, any>>, typeResolver?: Maybe<graphqlTypes.GraphQLTypeResolver<any, any>>) => PromiseOrValue<graphqlTypes.ExecutionResult>;
export interface OtelExecutionArgs {
schema: graphqlTypes.GraphQLSchema;
document: DocumentNode & ObjectWithGraphQLData;
rootValue?: any;
contextValue?: any & ObjectWithGraphQLData;
variableValues?: Maybe<{
[key: string]: any;
}>;
operationName?: Maybe<string>;
fieldResolver?: Maybe<GraphQLFieldResolver<any, any> & OtelPatched>;
typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
}
export type executeType = executeFunctionWithObj | executeFunctionWithArgs;
export type parseType = (source: string | graphqlTypes.Source, options?: graphqlTypes.ParseOptions) => graphqlTypes.DocumentNode;
export type validateType = (schema: graphqlTypes.GraphQLSchema, documentAST: graphqlTypes.DocumentNode, rules?: ReadonlyArray<graphqlTypes.ValidationRule>, options?: {
maxErrors?: number;
}, typeInfo?: graphqlTypes.TypeInfo) => ReadonlyArray<graphqlTypes.GraphQLError>;
export interface GraphQLField {
span: api.Span;
}
interface OtelGraphQLData {
source?: any;
span: api.Span;
fields: {
[key: string]: GraphQLField;
};
}
export interface ObjectWithGraphQLData {
[OTEL_GRAPHQL_DATA_SYMBOL]?: OtelGraphQLData;
}
export interface OtelPatched {
[OTEL_PATCHED_SYMBOL]?: boolean;
}
export interface GraphQLPath {
prev: GraphQLPath | undefined;
key: string | number;
/**
* optional as it didn't exist yet in ver 14
*/
typename?: string | undefined;
}
/**
* Moving this type from ver 15 of graphql as it is nto available in ver. 14s
* this way it can compile against ver 14.
*/
export type Maybe<T> = null | undefined | T;
export {};
//# sourceMappingURL=internal-types.d.ts.map

View File

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

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setQuarter as fn } from "../setQuarter.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const setQuarter = convertToFP(fn, 2);
// Fallback for modularized imports:
export default setQuarter;

View File

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

View File

@@ -0,0 +1,89 @@
import { DEBUG_BUILD } from '../../debug-build.js';
import { debug } from '../../utils/debug-logger.js';
/**
* Message validation functions for MCP server instrumentation
*
* Provides JSON-RPC 2.0 message type validation and MCP server instance validation.
*/
/**
* Validates if a message is a JSON-RPC request
* @param message - Message to validate
* @returns True if message is a JSON-RPC request
*/
function isJsonRpcRequest(message) {
return (
typeof message === 'object' &&
message !== null &&
'jsonrpc' in message &&
(message ).jsonrpc === '2.0' &&
'method' in message &&
'id' in message
);
}
/**
* Validates if a message is a JSON-RPC notification
* @param message - Message to validate
* @returns True if message is a JSON-RPC notification
*/
function isJsonRpcNotification(message) {
return (
typeof message === 'object' &&
message !== null &&
'jsonrpc' in message &&
(message ).jsonrpc === '2.0' &&
'method' in message &&
!('id' in message)
);
}
/**
* Validates if a message is a JSON-RPC response
* @param message - Message to validate
* @returns True if message is a JSON-RPC response
*/
function isJsonRpcResponse(message) {
return (
typeof message === 'object' &&
message !== null &&
'jsonrpc' in message &&
(message ).jsonrpc === '2.0' &&
'id' in message &&
('result' in message || 'error' in message)
);
}
/**
* Validates MCP server instance with type checking
* @param instance - Object to validate as MCP server instance
* @returns True if instance has required MCP server methods
*/
function validateMcpServerInstance(instance) {
if (
typeof instance === 'object' &&
instance !== null &&
'resource' in instance &&
'tool' in instance &&
'prompt' in instance &&
'connect' in instance
) {
return true;
}
DEBUG_BUILD && debug.warn('Did not patch MCP server. Interface is incompatible.');
return false;
}
/**
* Check if the item is a valid content item
* @param item - The item to check
* @returns True if the item is a valid content item, false otherwise
*/
function isValidContentItem(item) {
return item != null && typeof item === 'object';
}
export { isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isValidContentItem, validateMcpServerInstance };
//# sourceMappingURL=validation.js.map

View File

@@ -0,0 +1,6 @@
{
"private": true,
"types": "../../dist/dom-mini.d.ts",
"main": "../../dist/cjs/dom-mini.js",
"module": "../../dist/es/dom-mini.mjs"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { hostDetector } from './HostDetector';\nexport { osDetector } from './OSDetector';\nexport { processDetector } from './ProcessDetector';\nexport { serviceInstanceIdDetector } from './ServiceInstanceIdDetector';\n"]}

View File

@@ -0,0 +1,129 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["v.C.", "n.C."],
abbreviated: ["v.Chr.", "n.Chr."],
wide: ["voor Christus", "na Christus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1e kwartaal", "2e kwartaal", "3e kwartaal", "4e kwartaal"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jan.",
"feb.",
"mrt.",
"apr.",
"mei",
"jun.",
"jul.",
"aug.",
"sep.",
"okt.",
"nov.",
"dec.",
],
wide: [
"januari",
"februari",
"maart",
"april",
"mei",
"juni",
"juli",
"augustus",
"september",
"oktober",
"november",
"december",
],
};
const dayValues = {
narrow: ["Z", "M", "D", "W", "D", "V", "Z"],
short: ["zo", "ma", "di", "wo", "do", "vr", "za"],
abbreviated: ["zon", "maa", "din", "woe", "don", "vri", "zat"],
wide: [
"zondag",
"maandag",
"dinsdag",
"woensdag",
"donderdag",
"vrijdag",
"zaterdag",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middaguur",
morning: "'s ochtends",
afternoon: "'s middags",
evening: "'s avonds",
night: "'s nachts",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middaguur",
morning: "'s ochtends",
afternoon: "'s middags",
evening: "'s avonds",
night: "'s nachts",
},
wide: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middaguur",
morning: "'s ochtends",
afternoon: "'s middags",
evening: "'s avonds",
night: "'s nachts",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "e";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
}),
};

View File

@@ -0,0 +1,13 @@
import { docAccessOperation, isolateObjectProperty } from 'payload';
export function docAccessResolver(collection) {
async function resolver(_, args, context) {
return docAccessOperation({
id: args.id,
collection,
req: isolateObjectProperty(context.req, 'transactionID')
});
}
return resolver;
}
//# sourceMappingURL=docAccess.js.map

View File

@@ -0,0 +1,44 @@
Prism.languages.nim = {
'comment': {
pattern: /#.*/,
greedy: true
},
'string': {
// Double-quoted strings can be prefixed by an identifier (Generalized raw string literals)
pattern: /(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,
greedy: true
},
'char': {
// Character literals are handled specifically to prevent issues with numeric type suffixes
pattern: /'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,
greedy: true
},
'function': {
pattern: /(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,
greedy: true,
inside: {
'operator': /\*$/
}
},
// We don't want to highlight operators (and anything really) inside backticks
'identifier': {
pattern: /`[^`\r\n]+`/,
greedy: true,
inside: {
'punctuation': /`/
}
},
// The negative look ahead prevents wrong highlighting of the .. operator
'number': /\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,
'keyword': /\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,
'operator': {
// Look behind and look ahead prevent wrong highlighting of punctuations [. .] {. .} (. .)
// but allow the slice operator .. to take precedence over them
// One can define his own operators in Nim so all combination of operators might be an operator.
pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,
lookbehind: true
},
'punctuation': /[({\[]\.|\.[)}\]]|[`(){}\[\],:]/
};

View File

@@ -0,0 +1,6 @@
import type { Span, WebFetchHeaders } from '@sentry/core';
/**
* Extracts HTTP request headers as span attributes and optionally applies them to a span.
*/
export declare function addHeadersAsAttributes(headers: WebFetchHeaders | Headers | Record<string, string | string[] | undefined> | undefined, span?: Span): Record<string, string>;
//# sourceMappingURL=addHeadersAsAttributes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/d1/driver.ts"],"sourcesContent":["/// <reference types=\"@cloudflare/workers-types\" />\nimport type { D1Database as MiniflareD1Database } from '@miniflare/d1';\nimport type { BatchItem, BatchResponse } from '~/batch.ts';\nimport { entityKind } from '~/entity.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype ExtractTablesWithRelations,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteAsyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig, IfNotImported } from '~/utils.ts';\nimport { SQLiteD1Session } from './session.ts';\n\nexport type AnyD1Database = IfNotImported<\n\tD1Database,\n\tMiniflareD1Database,\n\tD1Database | IfNotImported<MiniflareD1Database, never, MiniflareD1Database>\n>;\n\nexport class DrizzleD1Database<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> extends BaseSQLiteDatabase<'async', D1Result, TSchema> {\n\tstatic override readonly [entityKind]: string = 'D1Database';\n\n\t/** @internal */\n\tdeclare readonly session: SQLiteD1Session<TSchema, ExtractTablesWithRelations<TSchema>>;\n\n\tasync batch<U extends BatchItem<'sqlite'>, T extends Readonly<[U, ...U[]]>>(\n\t\tbatch: T,\n\t): Promise<BatchResponse<T>> {\n\t\treturn this.session.batch(batch) as Promise<BatchResponse<T>>;\n\t}\n}\n\nexport function drizzle<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n\tTClient extends AnyD1Database = AnyD1Database,\n>(\n\tclient: TClient,\n\tconfig: DrizzleConfig<TSchema> = {},\n): DrizzleD1Database<TSchema> & {\n\t$client: TClient;\n} {\n\tconst dialect = new SQLiteAsyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLiteD1Session(client as D1Database, dialect, schema, { logger, cache: config.cache });\n\tconst db = new DrizzleD1Database('async', dialect, session, schema) as DrizzleD1Database<TSchema>;\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA2B;AAC3B,oBAA8B;AAC9B,uBAMO;AACP,gBAAmC;AACnC,qBAAmC;AAEnC,qBAAgC;AAQzB,MAAM,0BAEH,6BAA+C;AAAA,EACxD,QAA0B,wBAAU,IAAY;AAAA,EAKhD,MAAM,MACL,OAC4B;AAC5B,WAAO,KAAK,QAAQ,MAAM,KAAK;AAAA,EAChC;AACD;AAEO,SAAS,QAIf,QACA,SAAiC,CAAC,GAGjC;AACD,QAAM,UAAU,IAAI,kCAAmB,EAAE,QAAQ,OAAO,OAAO,CAAC;AAChE,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,4BAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,mBAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,+BAAgB,QAAsB,SAAS,QAAQ,EAAE,QAAQ,OAAO,OAAO,MAAM,CAAC;AAC1G,QAAM,KAAK,IAAI,kBAAkB,SAAS,SAAS,SAAS,MAAM;AAClE,EAAO,GAAI,UAAU;AACrB,EAAO,GAAI,SAAS,OAAO;AAC3B,MAAW,GAAI,QAAQ;AACtB,IAAO,GAAI,OAAO,YAAY,IAAI,OAAO,OAAO;AAAA,EACjD;AAEA,SAAO;AACR;","names":[]}

View File

@@ -0,0 +1,29 @@
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgSerialBuilder extends PgColumnBuilder {
static [entityKind] = "PgSerialBuilder";
constructor(name) {
super(name, "number", "PgSerial");
this.config.hasDefault = true;
this.config.notNull = true;
}
/** @internal */
build(table) {
return new PgSerial(table, this.config);
}
}
class PgSerial extends PgColumn {
static [entityKind] = "PgSerial";
getSQLType() {
return "serial";
}
}
function serial(name) {
return new PgSerialBuilder(name ?? "");
}
export {
PgSerial,
PgSerialBuilder,
serial
};
//# sourceMappingURL=serial.js.map

View File

@@ -0,0 +1,76 @@
(function () {
if (typeof Prism === 'undefined') {
return;
}
var url = /\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&!$'()*,;@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/;
var email = /\b\S+@[\w.]+[a-z]{2}/;
var linkMd = /\[([^\]]+)\]\(([^)]+)\)/;
// Tokens that may contain URLs and emails
var candidates = ['comment', 'url', 'attr-value', 'string'];
Prism.plugins.autolinker = {
processGrammar: function (grammar) {
// Abort if grammar has already been processed
if (!grammar || grammar['url-link']) {
return;
}
Prism.languages.DFS(grammar, function (key, def, type) {
if (candidates.indexOf(type) > -1 && !Array.isArray(def)) {
if (!def.pattern) {
def = this[key] = {
pattern: def
};
}
def.inside = def.inside || {};
if (type == 'comment') {
def.inside['md-link'] = linkMd;
}
if (type == 'attr-value') {
Prism.languages.insertBefore('inside', 'punctuation', { 'url-link': url }, def);
} else {
def.inside['url-link'] = url;
}
def.inside['email-link'] = email;
}
});
grammar['url-link'] = url;
grammar['email-link'] = email;
}
};
Prism.hooks.add('before-highlight', function (env) {
Prism.plugins.autolinker.processGrammar(env.grammar);
});
Prism.hooks.add('wrap', function (env) {
if (/-link$/.test(env.type)) {
env.tag = 'a';
var href = env.content;
if (env.type == 'email-link' && href.indexOf('mailto:') != 0) {
href = 'mailto:' + href;
} else if (env.type == 'md-link') {
// Markdown
var match = env.content.match(linkMd);
href = match[2];
env.content = match[1];
}
env.attributes.href = href;
// Silently catch any error thrown by decodeURIComponent (#1186)
try {
env.content = decodeURIComponent(env.content);
} catch (e) { /* noop */ }
}
});
}());

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"diag-api.js","sourceRoot":"","sources":["../../src/diag-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,sEAAsE;AACtE,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { DiagAPI } from './api/diag';\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexport const diag = DiagAPI.instance();\n"]}

View File

@@ -0,0 +1,532 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/pt/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "menos de um segundo",
other: "menos de {{count}} segundos"
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundos"
},
halfAMinute: "meio minuto",
lessThanXMinutes: {
one: "menos de um minuto",
other: "menos de {{count}} minutos"
},
xMinutes: {
one: "1 minuto",
other: "{{count}} minutos"
},
aboutXHours: {
one: "aproximadamente 1 hora",
other: "aproximadamente {{count}} horas"
},
xHours: {
one: "1 hora",
other: "{{count}} horas"
},
xDays: {
one: "1 dia",
other: "{{count}} dias"
},
aboutXWeeks: {
one: "aproximadamente 1 semana",
other: "aproximadamente {{count}} semanas"
},
xWeeks: {
one: "1 semana",
other: "{{count}} semanas"
},
aboutXMonths: {
one: "aproximadamente 1 m\xEAs",
other: "aproximadamente {{count}} meses"
},
xMonths: {
one: "1 m\xEAs",
other: "{{count}} meses"
},
aboutXYears: {
one: "aproximadamente 1 ano",
other: "aproximadamente {{count}} anos"
},
xYears: {
one: "1 ano",
other: "{{count}} anos"
},
overXYears: {
one: "mais de 1 ano",
other: "mais de {{count}} anos"
},
almostXYears: {
one: "quase 1 ano",
other: "quase {{count}} anos"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "daqui a " + result;
} else {
return "h\xE1 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/pt/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, d 'de' MMMM 'de' y",
long: "d 'de' MMMM 'de' y",
medium: "d 'de' MMM 'de' y",
short: "dd/MM/y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} '\xE0s' {{time}}",
long: "{{date}} '\xE0s' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/pt/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: function lastWeek(date) {
var weekday = date.getDay();
var last = weekday === 0 || weekday === 6 ? "\xFAltimo" : "\xFAltima";
return "'" + last + "' eeee '\xE0s' p";
},
yesterday: "'ontem \xE0s' p",
today: "'hoje \xE0s' p",
tomorrow: "'amanh\xE3 \xE0s' p",
nextWeek: "eeee '\xE0s' p",
other: "P"
};
var formatRelative = function formatRelative(token, date, _baseDate, _options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/pt/_lib/localize.mjs
var eraValues = {
narrow: ["aC", "dC"],
abbreviated: ["a.C.", "d.C."],
wide: ["antes de Cristo", "depois de Cristo"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
};
var monthValues = {
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"jan",
"fev",
"mar",
"abr",
"mai",
"jun",
"jul",
"ago",
"set",
"out",
"nov",
"dez"],
wide: [
"janeiro",
"fevereiro",
"mar\xE7o",
"abril",
"maio",
"junho",
"julho",
"agosto",
"setembro",
"outubro",
"novembro",
"dezembro"]
};
var dayValues = {
narrow: ["d", "s", "t", "q", "q", "s", "s"],
short: ["dom", "seg", "ter", "qua", "qui", "sex", "s\xE1b"],
abbreviated: ["dom", "seg", "ter", "qua", "qui", "sex", "s\xE1b"],
wide: [
"domingo",
"segunda-feira",
"ter\xE7a-feira",
"quarta-feira",
"quinta-feira",
"sexta-feira",
"s\xE1bado"]
};
var dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "manh\xE3",
afternoon: "tarde",
evening: "noite",
night: "madrugada"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "manh\xE3",
afternoon: "tarde",
evening: "noite",
night: "madrugada"
},
wide: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "manh\xE3",
afternoon: "tarde",
evening: "noite",
night: "madrugada"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da noite",
night: "da madrugada"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da noite",
night: "da madrugada"
},
wide: {
am: "AM",
pm: "PM",
midnight: "meia-noite",
noon: "meio-dia",
morning: "da manh\xE3",
afternoon: "da tarde",
evening: "da noite",
night: "da madrugada"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + "\xBA";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/pt/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(º|ª)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
wide: /^(antes de cristo|antes da era comum|depois de cristo|era comum)/i
};
var parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes da era comum)/i,
/^(depois de cristo|era comum)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º|ª)? trimestre/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ab/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^ag/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dstq]/i,
short: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
wide: /^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^s/i, /^t/i, /^q/i, /^q/i, /^s/i, /^s/i],
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[áa]/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,
any: /^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^meia/i,
noon: /^meio/i,
morning: /manh[ãa]/i,
afternoon: /tarde/i,
evening: /noite/i,
night: /madrugada/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/pt.mjs
var pt = {
code: "pt",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/pt/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
pt: pt }) });
//# debugId=4D73EF8ED938874364756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../../lib/types/json-schema.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/resolvers/auth/resetPassword.ts"],"sourcesContent":["import type { Collection } from 'payload'\n\nimport { generatePayloadCookie, isolateObjectProperty, resetPasswordOperation } from 'payload'\n\nimport type { Context } from '../types.js'\n\nexport function resetPassword(collection: Collection): any {\n async function resolver(_, args, context: Context) {\n if (args.locale) {\n context.req.locale = args.locale\n }\n if (args.fallbackLocale) {\n context.req.fallbackLocale = args.fallbackLocale\n }\n\n const options = {\n api: 'GraphQL',\n collection,\n data: args,\n depth: 0,\n req: isolateObjectProperty(context.req, 'transactionID'),\n }\n\n const result = await resetPasswordOperation(options)\n const cookie = generatePayloadCookie({\n collectionAuthConfig: collection.config.auth,\n cookiePrefix: context.req.payload.config.cookiePrefix,\n token: result.token,\n })\n context.headers['Set-Cookie'] = cookie\n\n if (collection.config.auth.removeTokenFromResponses) {\n delete result.token\n }\n\n return result\n }\n\n return resolver\n}\n"],"names":["generatePayloadCookie","isolateObjectProperty","resetPasswordOperation","resetPassword","collection","resolver","_","args","context","locale","req","fallbackLocale","options","api","data","depth","result","cookie","collectionAuthConfig","config","auth","cookiePrefix","payload","token","headers","removeTokenFromResponses"],"mappings":"AAEA,SAASA,qBAAqB,EAAEC,qBAAqB,EAAEC,sBAAsB,QAAQ,UAAS;AAI9F,OAAO,SAASC,cAAcC,UAAsB;IAClD,eAAeC,SAASC,CAAC,EAAEC,IAAI,EAAEC,OAAgB;QAC/C,IAAID,KAAKE,MAAM,EAAE;YACfD,QAAQE,GAAG,CAACD,MAAM,GAAGF,KAAKE,MAAM;QAClC;QACA,IAAIF,KAAKI,cAAc,EAAE;YACvBH,QAAQE,GAAG,CAACC,cAAc,GAAGJ,KAAKI,cAAc;QAClD;QAEA,MAAMC,UAAU;YACdC,KAAK;YACLT;YACAU,MAAMP;YACNQ,OAAO;YACPL,KAAKT,sBAAsBO,QAAQE,GAAG,EAAE;QAC1C;QAEA,MAAMM,SAAS,MAAMd,uBAAuBU;QAC5C,MAAMK,SAASjB,sBAAsB;YACnCkB,sBAAsBd,WAAWe,MAAM,CAACC,IAAI;YAC5CC,cAAcb,QAAQE,GAAG,CAACY,OAAO,CAACH,MAAM,CAACE,YAAY;YACrDE,OAAOP,OAAOO,KAAK;QACrB;QACAf,QAAQgB,OAAO,CAAC,aAAa,GAAGP;QAEhC,IAAIb,WAAWe,MAAM,CAACC,IAAI,CAACK,wBAAwB,EAAE;YACnD,OAAOT,OAAOO,KAAK;QACrB;QAEA,OAAOP;IACT;IAEA,OAAOX;AACT"}

View File

@@ -0,0 +1,5 @@
'use strict'
const compare = require('./compare')
const gte = (a, b, loose) => compare(a, b, loose) >= 0
module.exports = gte

View File

@@ -0,0 +1,591 @@
"use strict";
// import { $ZodType } from "./schemas.js";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.$ZodCheckOverwrite = exports.$ZodCheckMimeType = exports.$ZodCheckProperty = exports.$ZodCheckEndsWith = exports.$ZodCheckStartsWith = exports.$ZodCheckIncludes = exports.$ZodCheckUpperCase = exports.$ZodCheckLowerCase = exports.$ZodCheckRegex = exports.$ZodCheckStringFormat = exports.$ZodCheckLengthEquals = exports.$ZodCheckMinLength = exports.$ZodCheckMaxLength = exports.$ZodCheckSizeEquals = exports.$ZodCheckMinSize = exports.$ZodCheckMaxSize = exports.$ZodCheckBigIntFormat = exports.$ZodCheckNumberFormat = exports.$ZodCheckMultipleOf = exports.$ZodCheckGreaterThan = exports.$ZodCheckLessThan = exports.$ZodCheck = void 0;
const core = __importStar(require("./core.cjs"));
const regexes = __importStar(require("./regexes.cjs"));
const util = __importStar(require("./util.cjs"));
exports.$ZodCheck = core.$constructor("$ZodCheck", (inst, def) => {
var _a;
inst._zod ?? (inst._zod = {});
inst._zod.def = def;
(_a = inst._zod).onattach ?? (_a.onattach = []);
});
const numericOriginMap = {
number: "number",
bigint: "bigint",
object: "date",
};
exports.$ZodCheckLessThan = core.$constructor("$ZodCheckLessThan", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const origin = numericOriginMap[typeof def.value];
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
if (def.value < curr) {
if (def.inclusive)
bag.maximum = def.value;
else
bag.exclusiveMaximum = def.value;
}
});
inst._zod.check = (payload) => {
if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
return;
}
payload.issues.push({
origin,
code: "too_big",
maximum: def.value,
input: payload.value,
inclusive: def.inclusive,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckGreaterThan = core.$constructor("$ZodCheckGreaterThan", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const origin = numericOriginMap[typeof def.value];
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
if (def.value > curr) {
if (def.inclusive)
bag.minimum = def.value;
else
bag.exclusiveMinimum = def.value;
}
});
inst._zod.check = (payload) => {
if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
return;
}
payload.issues.push({
origin,
code: "too_small",
minimum: def.value,
input: payload.value,
inclusive: def.inclusive,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckMultipleOf =
/*@__PURE__*/ core.$constructor("$ZodCheckMultipleOf", (inst, def) => {
exports.$ZodCheck.init(inst, def);
inst._zod.onattach.push((inst) => {
var _a;
(_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
});
inst._zod.check = (payload) => {
if (typeof payload.value !== typeof def.value)
throw new Error("Cannot mix number and bigint in multiple_of check.");
const isMultiple = typeof payload.value === "bigint"
? payload.value % def.value === BigInt(0)
: util.floatSafeRemainder(payload.value, def.value) === 0;
if (isMultiple)
return;
payload.issues.push({
origin: typeof payload.value,
code: "not_multiple_of",
divisor: def.value,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckNumberFormat = core.$constructor("$ZodCheckNumberFormat", (inst, def) => {
exports.$ZodCheck.init(inst, def); // no format checks
def.format = def.format || "float64";
const isInt = def.format?.includes("int");
const origin = isInt ? "int" : "number";
const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.format = def.format;
bag.minimum = minimum;
bag.maximum = maximum;
if (isInt)
bag.pattern = regexes.integer;
});
inst._zod.check = (payload) => {
const input = payload.value;
if (isInt) {
if (!Number.isInteger(input)) {
// invalid_format issue
// payload.issues.push({
// expected: def.format,
// format: def.format,
// code: "invalid_format",
// input,
// inst,
// });
// invalid_type issue
payload.issues.push({
expected: origin,
format: def.format,
code: "invalid_type",
input,
inst,
});
return;
// not_multiple_of issue
// payload.issues.push({
// code: "not_multiple_of",
// origin: "number",
// input,
// inst,
// divisor: 1,
// });
}
if (!Number.isSafeInteger(input)) {
if (input > 0) {
// too_big
payload.issues.push({
input,
code: "too_big",
maximum: Number.MAX_SAFE_INTEGER,
note: "Integers must be within the safe integer range.",
inst,
origin,
continue: !def.abort,
});
}
else {
// too_small
payload.issues.push({
input,
code: "too_small",
minimum: Number.MIN_SAFE_INTEGER,
note: "Integers must be within the safe integer range.",
inst,
origin,
continue: !def.abort,
});
}
return;
}
}
if (input < minimum) {
payload.issues.push({
origin: "number",
input,
code: "too_small",
minimum,
inclusive: true,
inst,
continue: !def.abort,
});
}
if (input > maximum) {
payload.issues.push({
origin: "number",
input,
code: "too_big",
maximum,
inst,
});
}
};
});
exports.$ZodCheckBigIntFormat = core.$constructor("$ZodCheckBigIntFormat", (inst, def) => {
exports.$ZodCheck.init(inst, def); // no format checks
const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.format = def.format;
bag.minimum = minimum;
bag.maximum = maximum;
});
inst._zod.check = (payload) => {
const input = payload.value;
if (input < minimum) {
payload.issues.push({
origin: "bigint",
input,
code: "too_small",
minimum: minimum,
inclusive: true,
inst,
continue: !def.abort,
});
}
if (input > maximum) {
payload.issues.push({
origin: "bigint",
input,
code: "too_big",
maximum,
inst,
});
}
};
});
exports.$ZodCheckMaxSize = core.$constructor("$ZodCheckMaxSize", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.size !== undefined;
});
inst._zod.onattach.push((inst) => {
const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);
if (def.maximum < curr)
inst._zod.bag.maximum = def.maximum;
});
inst._zod.check = (payload) => {
const input = payload.value;
const size = input.size;
if (size <= def.maximum)
return;
payload.issues.push({
origin: util.getSizableOrigin(input),
code: "too_big",
maximum: def.maximum,
input,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckMinSize = core.$constructor("$ZodCheckMinSize", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.size !== undefined;
});
inst._zod.onattach.push((inst) => {
const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);
if (def.minimum > curr)
inst._zod.bag.minimum = def.minimum;
});
inst._zod.check = (payload) => {
const input = payload.value;
const size = input.size;
if (size >= def.minimum)
return;
payload.issues.push({
origin: util.getSizableOrigin(input),
code: "too_small",
minimum: def.minimum,
input,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckSizeEquals = core.$constructor("$ZodCheckSizeEquals", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.size !== undefined;
});
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.minimum = def.size;
bag.maximum = def.size;
bag.size = def.size;
});
inst._zod.check = (payload) => {
const input = payload.value;
const size = input.size;
if (size === def.size)
return;
const tooBig = size > def.size;
payload.issues.push({
origin: util.getSizableOrigin(input),
...(tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }),
inclusive: true,
exact: true,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckMaxLength = core.$constructor("$ZodCheckMaxLength", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.length !== undefined;
});
inst._zod.onattach.push((inst) => {
const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);
if (def.maximum < curr)
inst._zod.bag.maximum = def.maximum;
});
inst._zod.check = (payload) => {
const input = payload.value;
const length = input.length;
if (length <= def.maximum)
return;
const origin = util.getLengthableOrigin(input);
payload.issues.push({
origin,
code: "too_big",
maximum: def.maximum,
inclusive: true,
input,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckMinLength = core.$constructor("$ZodCheckMinLength", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.length !== undefined;
});
inst._zod.onattach.push((inst) => {
const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);
if (def.minimum > curr)
inst._zod.bag.minimum = def.minimum;
});
inst._zod.check = (payload) => {
const input = payload.value;
const length = input.length;
if (length >= def.minimum)
return;
const origin = util.getLengthableOrigin(input);
payload.issues.push({
origin,
code: "too_small",
minimum: def.minimum,
inclusive: true,
input,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckLengthEquals = core.$constructor("$ZodCheckLengthEquals", (inst, def) => {
var _a;
exports.$ZodCheck.init(inst, def);
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
const val = payload.value;
return !util.nullish(val) && val.length !== undefined;
});
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.minimum = def.length;
bag.maximum = def.length;
bag.length = def.length;
});
inst._zod.check = (payload) => {
const input = payload.value;
const length = input.length;
if (length === def.length)
return;
const origin = util.getLengthableOrigin(input);
const tooBig = length > def.length;
payload.issues.push({
origin,
...(tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }),
inclusive: true,
exact: true,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckStringFormat = core.$constructor("$ZodCheckStringFormat", (inst, def) => {
var _a, _b;
exports.$ZodCheck.init(inst, def);
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.format = def.format;
if (def.pattern) {
bag.patterns ?? (bag.patterns = new Set());
bag.patterns.add(def.pattern);
}
});
if (def.pattern)
(_a = inst._zod).check ?? (_a.check = (payload) => {
def.pattern.lastIndex = 0;
if (def.pattern.test(payload.value))
return;
payload.issues.push({
origin: "string",
code: "invalid_format",
format: def.format,
input: payload.value,
...(def.pattern ? { pattern: def.pattern.toString() } : {}),
inst,
continue: !def.abort,
});
});
else
(_b = inst._zod).check ?? (_b.check = () => { });
});
exports.$ZodCheckRegex = core.$constructor("$ZodCheckRegex", (inst, def) => {
exports.$ZodCheckStringFormat.init(inst, def);
inst._zod.check = (payload) => {
def.pattern.lastIndex = 0;
if (def.pattern.test(payload.value))
return;
payload.issues.push({
origin: "string",
code: "invalid_format",
format: "regex",
input: payload.value,
pattern: def.pattern.toString(),
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckLowerCase = core.$constructor("$ZodCheckLowerCase", (inst, def) => {
def.pattern ?? (def.pattern = regexes.lowercase);
exports.$ZodCheckStringFormat.init(inst, def);
});
exports.$ZodCheckUpperCase = core.$constructor("$ZodCheckUpperCase", (inst, def) => {
def.pattern ?? (def.pattern = regexes.uppercase);
exports.$ZodCheckStringFormat.init(inst, def);
});
exports.$ZodCheckIncludes = core.$constructor("$ZodCheckIncludes", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const escapedRegex = util.escapeRegex(def.includes);
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
def.pattern = pattern;
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.patterns ?? (bag.patterns = new Set());
bag.patterns.add(pattern);
});
inst._zod.check = (payload) => {
if (payload.value.includes(def.includes, def.position))
return;
payload.issues.push({
origin: "string",
code: "invalid_format",
format: "includes",
includes: def.includes,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckStartsWith = core.$constructor("$ZodCheckStartsWith", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);
def.pattern ?? (def.pattern = pattern);
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.patterns ?? (bag.patterns = new Set());
bag.patterns.add(pattern);
});
inst._zod.check = (payload) => {
if (payload.value.startsWith(def.prefix))
return;
payload.issues.push({
origin: "string",
code: "invalid_format",
format: "starts_with",
prefix: def.prefix,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
exports.$ZodCheckEndsWith = core.$constructor("$ZodCheckEndsWith", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);
def.pattern ?? (def.pattern = pattern);
inst._zod.onattach.push((inst) => {
const bag = inst._zod.bag;
bag.patterns ?? (bag.patterns = new Set());
bag.patterns.add(pattern);
});
inst._zod.check = (payload) => {
if (payload.value.endsWith(def.suffix))
return;
payload.issues.push({
origin: "string",
code: "invalid_format",
format: "ends_with",
suffix: def.suffix,
input: payload.value,
inst,
continue: !def.abort,
});
};
});
///////////////////////////////////
///// $ZodCheckProperty /////
///////////////////////////////////
function handleCheckPropertyResult(result, payload, property) {
if (result.issues.length) {
payload.issues.push(...util.prefixIssues(property, result.issues));
}
}
exports.$ZodCheckProperty = core.$constructor("$ZodCheckProperty", (inst, def) => {
exports.$ZodCheck.init(inst, def);
inst._zod.check = (payload) => {
const result = def.schema._zod.run({
value: payload.value[def.property],
issues: [],
}, {});
if (result instanceof Promise) {
return result.then((result) => handleCheckPropertyResult(result, payload, def.property));
}
handleCheckPropertyResult(result, payload, def.property);
return;
};
});
exports.$ZodCheckMimeType = core.$constructor("$ZodCheckMimeType", (inst, def) => {
exports.$ZodCheck.init(inst, def);
const mimeSet = new Set(def.mime);
inst._zod.onattach.push((inst) => {
inst._zod.bag.mime = def.mime;
});
inst._zod.check = (payload) => {
if (mimeSet.has(payload.value.type))
return;
payload.issues.push({
code: "invalid_value",
values: def.mime,
input: payload.value.type,
inst,
});
};
});
exports.$ZodCheckOverwrite = core.$constructor("$ZodCheckOverwrite", (inst, def) => {
exports.$ZodCheck.init(inst, def);
inst._zod.check = (payload) => {
payload.value = def.tx(payload.value);
};
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"microwave.js","sources":["../../../src/icons/microwave.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Microwave\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHg9IjIiIHk9IjQiIHJ4PSIyIiAvPgogIDxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjciIHg9IjYiIHk9IjgiIHJ4PSIxIiAvPgogIDxwYXRoIGQ9Ik0xOCA4djciIC8+CiAgPHBhdGggZD0iTTYgMTl2MiIgLz4KICA8cGF0aCBkPSJNMTggMTl2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/microwave\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 Microwave = createLucideIcon('Microwave', [\n ['rect', { width: '20', height: '15', x: '2', y: '4', rx: '2', key: '2no95f' }],\n ['rect', { width: '8', height: '7', x: '6', y: '8', rx: '1', key: 'zh9wx' }],\n ['path', { d: 'M18 8v7', key: 'o5zi4n' }],\n ['path', { d: 'M6 19v2', key: '1loha6' }],\n ['path', { d: 'M18 19v2', key: '1dawf0' }],\n]);\n\nexport default Microwave;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CAC3E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,170 @@
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { DefaultBrowseByFolderView, HydrateAuthProvider } from '@payloadcms/ui';
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
import { getFolderResultsComponentAndData, upsertPreferences } from '@payloadcms/ui/rsc';
import { formatAdminURL } from '@payloadcms/ui/shared';
import { redirect } from 'next/navigation.js';
import { PREFERENCE_KEYS } from 'payload/shared';
import React from 'react';
export const buildBrowseByFolderView = async args => {
const {
browseByFolderSlugs: browseByFolderSlugsFromArgs = [],
disableBulkDelete,
disableBulkEdit,
enableRowSelections,
folderID,
initPageResult,
isInDrawer,
params,
query: queryFromArgs,
searchParams
} = args;
const {
locale: fullLocale,
permissions,
req: {
i18n,
payload,
payload: {
config
},
query: queryFromReq,
user
},
visibleEntities
} = initPageResult;
if (config.folders === false || config.folders.browseByFolder === false) {
throw new Error('not-found');
}
const foldersSlug = config.folders.slug;
/**
* All visiible folder enabled collection slugs that the user has read permissions for.
*/
const allowReadCollectionSlugs = browseByFolderSlugsFromArgs.filter(collectionSlug => permissions?.collections?.[collectionSlug]?.read && visibleEntities.collections.includes(collectionSlug));
const query = queryFromArgs || (queryFromReq ? {
...queryFromReq,
relationTo: typeof queryFromReq?.relationTo === 'string' ? JSON.parse(queryFromReq.relationTo) : undefined
} : {});
/**
* If a folderID is provided and the relationTo query param exists,
* we filter the collection slugs to only those that are allowed to be read.
*
* If no folderID is provided, only folders should be active and displayed (the root view).
*/
let collectionsToDisplay = [];
if (folderID && Array.isArray(query?.relationTo)) {
collectionsToDisplay = query.relationTo.filter(slug => allowReadCollectionSlugs.includes(slug) || slug === foldersSlug);
} else if (folderID) {
collectionsToDisplay = [...allowReadCollectionSlugs, foldersSlug];
} else {
collectionsToDisplay = [foldersSlug];
}
const {
routes: {
admin: adminRoute
}
} = config;
/**
* @todo: find a pattern to avoid setting preferences on hard navigation, i.e. direct links, page refresh, etc.
* This will ensure that prefs are only updated when explicitly set by the user
* This could potentially be done by injecting a `sessionID` into the params and comparing it against a session cookie
*/
const browseByFolderPreferences = await upsertPreferences({
key: PREFERENCE_KEYS.BROWSE_BY_FOLDER,
req: initPageResult.req,
value: {
sort: query?.sort
}
});
const sortPreference = browseByFolderPreferences?.sort || 'name';
const viewPreference = browseByFolderPreferences?.viewPreference || 'grid';
const {
breadcrumbs,
documents,
folderAssignedCollections,
FolderResultsComponent,
subfolders
} = await getFolderResultsComponentAndData({
browseByFolder: true,
collectionsToDisplay,
displayAs: viewPreference,
folderAssignedCollections: collectionsToDisplay.filter(slug => slug !== foldersSlug) || [],
folderID,
req: initPageResult.req,
sort: sortPreference
});
const resolvedFolderID = breadcrumbs[breadcrumbs.length - 1]?.id;
if (!isInDrawer && (resolvedFolderID && folderID && folderID !== resolvedFolderID || folderID && !resolvedFolderID)) {
redirect(formatAdminURL({
adminRoute,
path: config.admin.routes.browseByFolder
}));
}
const serverProps = {
documents,
i18n,
locale: fullLocale,
params,
payload,
permissions,
searchParams,
subfolders,
user
};
// const folderViewSlots = renderFolderViewSlots({
// clientProps: {
// },
// description: staticDescription,
// payload,
// serverProps,
// })
// Filter down allCollectionFolderSlugs by the ones the current folder is assingned to
const allAvailableCollectionSlugs = folderID && Array.isArray(folderAssignedCollections) && folderAssignedCollections.length ? allowReadCollectionSlugs.filter(slug => folderAssignedCollections.includes(slug)) : allowReadCollectionSlugs;
// Filter down activeCollectionFolderSlugs by the ones the current folder is assingned to
const availableActiveCollectionFolderSlugs = collectionsToDisplay.filter(slug => {
if (slug === foldersSlug) {
return permissions?.collections?.[foldersSlug]?.read;
} else {
return !folderAssignedCollections || folderAssignedCollections.includes(slug);
}
});
// Documents cannot be created without a parent folder in this view
const allowCreateCollectionSlugs = (resolvedFolderID ? [foldersSlug, ...allAvailableCollectionSlugs] : [foldersSlug]).filter(collectionSlug => {
if (collectionSlug === foldersSlug) {
return permissions?.collections?.[foldersSlug]?.create;
}
return permissions?.collections?.[collectionSlug]?.create && visibleEntities.collections.includes(collectionSlug);
});
return {
View: /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx(HydrateAuthProvider, {
permissions: permissions
}), RenderServerComponent({
clientProps: {
// ...folderViewSlots,
activeCollectionFolderSlugs: availableActiveCollectionFolderSlugs,
allCollectionFolderSlugs: allAvailableCollectionSlugs,
allowCreateCollectionSlugs,
baseFolderPath: `/browse-by-folder`,
breadcrumbs,
disableBulkDelete,
disableBulkEdit,
documents,
enableRowSelections,
folderAssignedCollections,
folderFieldName: config.folders.fieldName,
folderID: resolvedFolderID || null,
FolderResultsComponent,
sort: sortPreference,
subfolders,
viewPreference
},
// Component:config.folders?.components?.views?.BrowseByFolders?.Component,
Fallback: DefaultBrowseByFolderView,
importMap: payload.importMap,
serverProps
})]
})
};
};
//# sourceMappingURL=buildView.js.map

View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.encodeF32 = encodeF32;
exports.encodeF64 = encodeF64;
exports.decodeF32 = decodeF32;
exports.decodeF64 = decodeF64;
exports.DOUBLE_PRECISION_MANTISSA = exports.SINGLE_PRECISION_MANTISSA = exports.NUMBER_OF_BYTE_F64 = exports.NUMBER_OF_BYTE_F32 = void 0;
var _ieee = require("@xtuc/ieee754");
/**
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
* n = 32/8
*/
var NUMBER_OF_BYTE_F32 = 4;
/**
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
* n = 64/8
*/
exports.NUMBER_OF_BYTE_F32 = NUMBER_OF_BYTE_F32;
var NUMBER_OF_BYTE_F64 = 8;
exports.NUMBER_OF_BYTE_F64 = NUMBER_OF_BYTE_F64;
var SINGLE_PRECISION_MANTISSA = 23;
exports.SINGLE_PRECISION_MANTISSA = SINGLE_PRECISION_MANTISSA;
var DOUBLE_PRECISION_MANTISSA = 52;
exports.DOUBLE_PRECISION_MANTISSA = DOUBLE_PRECISION_MANTISSA;
function encodeF32(v) {
var buffer = [];
(0, _ieee.write)(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
return buffer;
}
function encodeF64(v) {
var buffer = [];
(0, _ieee.write)(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
return buffer;
}
function decodeF32(bytes) {
var buffer = new Uint8Array(bytes);
return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
}
function decodeF64(bytes) {
var buffer = new Uint8Array(bytes);
return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"renderCell.d.ts","sourceRoot":"","sources":["../../../../src/providers/TableColumns/buildColumnState/renderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EACV,WAAW,EACX,yBAAyB,EAEzB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,cAAc,EACd,SAAS,EACV,MAAM,SAAS,CAAA;AAehB,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAA;IACtE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAA;IACtB,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAA;IACrC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAC9B,CAAA;AACD,wBAAgB,UAAU,CAAC,EACzB,WAAW,EACX,cAAc,EACd,WAAW,EACX,eAAe,EACf,GAAG,EACH,mBAAmB,EACnB,IAAI,EACJ,cAAc,EACd,OAAO,EACP,GAAG,EACH,QAAQ,EACR,WAAW,EACX,QAAQ,GACT,EAAE,cAAc,+BAqLhB"}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 The Guild
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.

View File

@@ -0,0 +1,589 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpInstrumentation = void 0;
/*
* 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.
*/
const api_1 = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const url = require("url");
const version_1 = require("./version");
const instrumentation_1 = require("@opentelemetry/instrumentation");
const events_1 = require("events");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const utils_1 = require("./utils");
/**
* `node:http` and `node:https` instrumentation for OpenTelemetry
*/
class HttpInstrumentation extends instrumentation_1.InstrumentationBase {
/** keep track on spans not ended */
_spanNotEnded = new WeakSet();
_headerCapture;
_semconvStability = instrumentation_1.SemconvStability.OLD;
constructor(config = {}) {
super('@opentelemetry/instrumentation-http', version_1.VERSION, config);
this._headerCapture = this._createHeaderCapture();
this._semconvStability = (0, instrumentation_1.semconvStabilityFromStr)('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
}
_updateMetricInstruments() {
this._oldHttpServerDurationHistogram = this.meter.createHistogram('http.server.duration', {
description: 'Measures the duration of inbound HTTP requests.',
unit: 'ms',
valueType: api_1.ValueType.DOUBLE,
});
this._oldHttpClientDurationHistogram = this.meter.createHistogram('http.client.duration', {
description: 'Measures the duration of outbound HTTP requests.',
unit: 'ms',
valueType: api_1.ValueType.DOUBLE,
});
this._stableHttpServerDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_SERVER_REQUEST_DURATION, {
description: 'Duration of HTTP server requests.',
unit: 's',
valueType: api_1.ValueType.DOUBLE,
advice: {
explicitBucketBoundaries: [
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5,
7.5, 10,
],
},
});
this._stableHttpClientDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_CLIENT_REQUEST_DURATION, {
description: 'Duration of HTTP client requests.',
unit: 's',
valueType: api_1.ValueType.DOUBLE,
advice: {
explicitBucketBoundaries: [
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5,
7.5, 10,
],
},
});
}
_recordServerDuration(durationMs, oldAttributes, stableAttributes) {
if (this._semconvStability & instrumentation_1.SemconvStability.OLD) {
// old histogram is counted in MS
this._oldHttpServerDurationHistogram.record(durationMs, oldAttributes);
}
if (this._semconvStability & instrumentation_1.SemconvStability.STABLE) {
// stable histogram is counted in S
this._stableHttpServerDurationHistogram.record(durationMs / 1000, stableAttributes);
}
}
_recordClientDuration(durationMs, oldAttributes, stableAttributes) {
if (this._semconvStability & instrumentation_1.SemconvStability.OLD) {
// old histogram is counted in MS
this._oldHttpClientDurationHistogram.record(durationMs, oldAttributes);
}
if (this._semconvStability & instrumentation_1.SemconvStability.STABLE) {
// stable histogram is counted in S
this._stableHttpClientDurationHistogram.record(durationMs / 1000, stableAttributes);
}
}
setConfig(config = {}) {
super.setConfig(config);
this._headerCapture = this._createHeaderCapture();
}
init() {
return [this._getHttpsInstrumentation(), this._getHttpInstrumentation()];
}
_getHttpInstrumentation() {
return new instrumentation_1.InstrumentationNodeModuleDefinition('http', ['*'], (moduleExports) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isESM = moduleExports[Symbol.toStringTag] === 'Module';
if (!this.getConfig().disableOutgoingRequestInstrumentation) {
const patchedRequest = this._wrap(moduleExports, 'request', this._getPatchOutgoingRequestFunction('http'));
const patchedGet = this._wrap(moduleExports, 'get', this._getPatchOutgoingGetFunction(patchedRequest));
if (isESM) {
// To handle `import http from 'http'`, which returns the default
// export, we need to set `module.default.*`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports.default.request = patchedRequest;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports.default.get = patchedGet;
}
}
if (!this.getConfig().disableIncomingRequestInstrumentation) {
this._wrap(moduleExports.Server.prototype, 'emit', this._getPatchIncomingRequestFunction('http'));
}
return moduleExports;
}, (moduleExports) => {
if (moduleExports === undefined)
return;
if (!this.getConfig().disableOutgoingRequestInstrumentation) {
this._unwrap(moduleExports, 'request');
this._unwrap(moduleExports, 'get');
}
if (!this.getConfig().disableIncomingRequestInstrumentation) {
this._unwrap(moduleExports.Server.prototype, 'emit');
}
});
}
_getHttpsInstrumentation() {
return new instrumentation_1.InstrumentationNodeModuleDefinition('https', ['*'], (moduleExports) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isESM = moduleExports[Symbol.toStringTag] === 'Module';
if (!this.getConfig().disableOutgoingRequestInstrumentation) {
const patchedRequest = this._wrap(moduleExports, 'request', this._getPatchHttpsOutgoingRequestFunction('https'));
const patchedGet = this._wrap(moduleExports, 'get', this._getPatchHttpsOutgoingGetFunction(patchedRequest));
if (isESM) {
// To handle `import https from 'https'`, which returns the default
// export, we need to set `module.default.*`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports.default.request = patchedRequest;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
moduleExports.default.get = patchedGet;
}
}
if (!this.getConfig().disableIncomingRequestInstrumentation) {
this._wrap(moduleExports.Server.prototype, 'emit', this._getPatchIncomingRequestFunction('https'));
}
return moduleExports;
}, (moduleExports) => {
if (moduleExports === undefined)
return;
if (!this.getConfig().disableOutgoingRequestInstrumentation) {
this._unwrap(moduleExports, 'request');
this._unwrap(moduleExports, 'get');
}
if (!this.getConfig().disableIncomingRequestInstrumentation) {
this._unwrap(moduleExports.Server.prototype, 'emit');
}
});
}
/**
* Creates spans for incoming requests, restoring spans' context if applied.
*/
_getPatchIncomingRequestFunction(component) {
return (original) => {
return this._incomingRequestFunction(component, original);
};
}
/**
* Creates spans for outgoing requests, sending spans' context for distributed
* tracing.
*/
_getPatchOutgoingRequestFunction(component) {
return (original) => {
return this._outgoingRequestFunction(component, original);
};
}
_getPatchOutgoingGetFunction(clientRequest) {
return (_original) => {
// Re-implement http.get. This needs to be done (instead of using
// getPatchOutgoingRequestFunction to patch it) because we need to
// set the trace context header before the returned http.ClientRequest is
// ended. The Node.js docs state that the only differences between
// request and get are that (1) get defaults to the HTTP GET method and
// (2) the returned request object is ended immediately. The former is
// already true (at least in supported Node versions up to v10), so we
// simply follow the latter. Ref:
// https://nodejs.org/dist/latest/docs/api/http.html#http_http_get_options_callback
// https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/instrumentations/instrumentation-http.ts#L198
return function outgoingGetRequest(options, ...args) {
const req = clientRequest(options, ...args);
req.end();
return req;
};
};
}
/** Patches HTTPS outgoing requests */
_getPatchHttpsOutgoingRequestFunction(component) {
return (original) => {
const instrumentation = this;
return function httpsOutgoingRequest(
// eslint-disable-next-line n/no-unsupported-features/node-builtins
options, ...args) {
// Makes sure options will have default HTTPS parameters
if (component === 'https' &&
typeof options === 'object' &&
options?.constructor?.name !== 'URL') {
options = Object.assign({}, options);
instrumentation._setDefaultOptions(options);
}
return instrumentation._getPatchOutgoingRequestFunction(component)(original)(options, ...args);
};
};
}
_setDefaultOptions(options) {
options.protocol = options.protocol || 'https:';
options.port = options.port || 443;
}
/** Patches HTTPS outgoing get requests */
_getPatchHttpsOutgoingGetFunction(clientRequest) {
return (original) => {
const instrumentation = this;
return function httpsOutgoingRequest(
// eslint-disable-next-line n/no-unsupported-features/node-builtins
options, ...args) {
return instrumentation._getPatchOutgoingGetFunction(clientRequest)(original)(options, ...args);
};
};
}
/**
* Attach event listeners to a client request to end span and add span attributes.
*
* @param request The original request object.
* @param span representing the current operation
* @param startTime representing the start time of the request to calculate duration in Metric
* @param oldMetricAttributes metric attributes for old semantic conventions
* @param stableMetricAttributes metric attributes for new semantic conventions
*/
_traceClientRequest(request, span, startTime, oldMetricAttributes, stableMetricAttributes) {
if (this.getConfig().requestHook) {
this._callRequestHook(span, request);
}
/**
* Determines if the request has errored or the response has ended/errored.
*/
let responseFinished = false;
/*
* User 'response' event listeners can be added before our listener,
* force our listener to be the first, so response emitter is bound
* before any user listeners are added to it.
*/
request.prependListener('response', (response) => {
this._diag.debug('outgoingRequest on response()');
if (request.listenerCount('response') <= 1) {
response.resume();
}
const responseAttributes = (0, utils_1.getOutgoingRequestAttributesOnResponse)(response, this._semconvStability);
span.setAttributes(responseAttributes);
oldMetricAttributes = Object.assign(oldMetricAttributes, (0, utils_1.getOutgoingRequestMetricAttributesOnResponse)(responseAttributes));
stableMetricAttributes = Object.assign(stableMetricAttributes, (0, utils_1.getOutgoingStableRequestMetricAttributesOnResponse)(responseAttributes));
if (this.getConfig().responseHook) {
this._callResponseHook(span, response);
}
this._headerCapture.client.captureRequestHeaders(span, header => request.getHeader(header));
this._headerCapture.client.captureResponseHeaders(span, header => response.headers[header]);
api_1.context.bind(api_1.context.active(), response);
const endHandler = () => {
this._diag.debug('outgoingRequest on end()');
if (responseFinished) {
return;
}
responseFinished = true;
let status;
if (response.aborted && !response.complete) {
status = { code: api_1.SpanStatusCode.ERROR };
}
else {
// behaves same for new and old semconv
status = {
code: (0, utils_1.parseResponseStatus)(api_1.SpanKind.CLIENT, response.statusCode),
};
}
span.setStatus(status);
if (this.getConfig().applyCustomAttributesOnSpan) {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().applyCustomAttributesOnSpan(span, request, response), () => { }, true);
}
this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
};
response.on('end', endHandler);
response.on(events_1.errorMonitor, (error) => {
this._diag.debug('outgoingRequest on error()', error);
if (responseFinished) {
return;
}
responseFinished = true;
this._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
});
});
request.on('close', () => {
this._diag.debug('outgoingRequest on request close()');
if (request.aborted || responseFinished) {
return;
}
responseFinished = true;
this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
});
request.on(events_1.errorMonitor, (error) => {
this._diag.debug('outgoingRequest on request error()', error);
if (responseFinished) {
return;
}
responseFinished = true;
this._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
});
this._diag.debug('http.ClientRequest return request');
return request;
}
_incomingRequestFunction(component, original) {
const instrumentation = this;
return function incomingRequest(event, ...args) {
// Only traces request events
if (event !== 'request') {
return original.apply(this, [event, ...args]);
}
const request = args[0];
const response = args[1];
const method = request.method || 'GET';
instrumentation._diag.debug(`${component} instrumentation incomingRequest`);
if ((0, instrumentation_1.safeExecuteInTheMiddle)(() => instrumentation.getConfig().ignoreIncomingRequestHook?.(request), (e) => {
if (e != null) {
instrumentation._diag.error('caught ignoreIncomingRequestHook error: ', e);
}
}, true)) {
return api_1.context.with((0, core_1.suppressTracing)(api_1.context.active()), () => {
api_1.context.bind(api_1.context.active(), request);
api_1.context.bind(api_1.context.active(), response);
return original.apply(this, [event, ...args]);
});
}
const headers = request.headers;
const spanAttributes = (0, utils_1.getIncomingRequestAttributes)(request, {
component: component,
serverName: instrumentation.getConfig().serverName,
hookAttributes: instrumentation._callStartSpanHook(request, instrumentation.getConfig().startIncomingSpanHook),
semconvStability: instrumentation._semconvStability,
enableSyntheticSourceDetection: instrumentation.getConfig().enableSyntheticSourceDetection || false,
}, instrumentation._diag);
const spanOptions = {
kind: api_1.SpanKind.SERVER,
attributes: spanAttributes,
};
const startTime = (0, core_1.hrTime)();
const oldMetricAttributes = (0, utils_1.getIncomingRequestMetricAttributes)(spanAttributes);
// request method and url.scheme are both required span attributes
const stableMetricAttributes = {
[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: spanAttributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD],
[semantic_conventions_1.ATTR_URL_SCHEME]: spanAttributes[semantic_conventions_1.ATTR_URL_SCHEME],
};
// recommended if and only if one was sent, same as span recommendation
if (spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]) {
stableMetricAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] =
spanAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION];
}
const ctx = api_1.propagation.extract(api_1.ROOT_CONTEXT, headers);
const span = instrumentation._startHttpSpan(method, spanOptions, ctx);
const rpcMetadata = {
type: core_1.RPCType.HTTP,
span,
};
return api_1.context.with((0, core_1.setRPCMetadata)(api_1.trace.setSpan(ctx, span), rpcMetadata), () => {
api_1.context.bind(api_1.context.active(), request);
api_1.context.bind(api_1.context.active(), response);
if (instrumentation.getConfig().requestHook) {
instrumentation._callRequestHook(span, request);
}
if (instrumentation.getConfig().responseHook) {
instrumentation._callResponseHook(span, response);
}
instrumentation._headerCapture.server.captureRequestHeaders(span, header => request.headers[header]);
// After 'error', no further events other than 'close' should be emitted.
let hasError = false;
response.on('close', () => {
if (hasError) {
return;
}
instrumentation._onServerResponseFinish(request, response, span, oldMetricAttributes, stableMetricAttributes, startTime);
});
response.on(events_1.errorMonitor, (err) => {
hasError = true;
instrumentation._onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, err);
});
return (0, instrumentation_1.safeExecuteInTheMiddle)(() => original.apply(this, [event, ...args]), error => {
if (error) {
instrumentation._onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
throw error;
}
});
});
};
}
_outgoingRequestFunction(component, original) {
const instrumentation = this;
return function outgoingRequest(options, ...args) {
if (!(0, utils_1.isValidOptionsType)(options)) {
return original.apply(this, [options, ...args]);
}
const extraOptions = typeof args[0] === 'object' &&
(typeof options === 'string' || options instanceof url.URL)
? args.shift()
: undefined;
const { method, invalidUrl, optionsParsed } = (0, utils_1.getRequestInfo)(instrumentation._diag, options, extraOptions);
if ((0, instrumentation_1.safeExecuteInTheMiddle)(() => instrumentation
.getConfig()
.ignoreOutgoingRequestHook?.(optionsParsed), (e) => {
if (e != null) {
instrumentation._diag.error('caught ignoreOutgoingRequestHook error: ', e);
}
}, true)) {
return original.apply(this, [optionsParsed, ...args]);
}
const { hostname, port } = (0, utils_1.extractHostnameAndPort)(optionsParsed);
const attributes = (0, utils_1.getOutgoingRequestAttributes)(optionsParsed, {
component,
port,
hostname,
hookAttributes: instrumentation._callStartSpanHook(optionsParsed, instrumentation.getConfig().startOutgoingSpanHook),
redactedQueryParams: instrumentation.getConfig().redactedQueryParams, // Added config for adding custom query strings
}, instrumentation._semconvStability, instrumentation.getConfig().enableSyntheticSourceDetection || false);
const startTime = (0, core_1.hrTime)();
const oldMetricAttributes = (0, utils_1.getOutgoingRequestMetricAttributes)(attributes);
// request method, server address, and server port are both required span attributes
const stableMetricAttributes = {
[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: attributes[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD],
[semantic_conventions_1.ATTR_SERVER_ADDRESS]: attributes[semantic_conventions_1.ATTR_SERVER_ADDRESS],
[semantic_conventions_1.ATTR_SERVER_PORT]: attributes[semantic_conventions_1.ATTR_SERVER_PORT],
};
// required if and only if one was sent, same as span requirement
if (attributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]) {
stableMetricAttributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE] =
attributes[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE];
}
// recommended if and only if one was sent, same as span recommendation
if (attributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION]) {
stableMetricAttributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION] =
attributes[semantic_conventions_1.ATTR_NETWORK_PROTOCOL_VERSION];
}
const spanOptions = {
kind: api_1.SpanKind.CLIENT,
attributes,
};
const span = instrumentation._startHttpSpan(method, spanOptions);
const parentContext = api_1.context.active();
const requestContext = api_1.trace.setSpan(parentContext, span);
if (!optionsParsed.headers) {
optionsParsed.headers = {};
}
else {
// Make a copy of the headers object to avoid mutating an object the
// caller might have a reference to.
optionsParsed.headers = Object.assign({}, optionsParsed.headers);
}
api_1.propagation.inject(requestContext, optionsParsed.headers);
return api_1.context.with(requestContext, () => {
/*
* The response callback is registered before ClientRequest is bound,
* thus it is needed to bind it before the function call.
*/
const cb = args[args.length - 1];
if (typeof cb === 'function') {
args[args.length - 1] = api_1.context.bind(parentContext, cb);
}
const request = (0, instrumentation_1.safeExecuteInTheMiddle)(() => {
if (invalidUrl) {
// we know that the url is invalid, there's no point in injecting context as it will fail validation.
// Passing in what the user provided will give the user an error that matches what they'd see without
// the instrumentation.
return original.apply(this, [options, ...args]);
}
else {
return original.apply(this, [optionsParsed, ...args]);
}
}, error => {
if (error) {
instrumentation._onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error);
throw error;
}
});
instrumentation._diag.debug(`${component} instrumentation outgoingRequest`);
api_1.context.bind(parentContext, request);
return instrumentation._traceClientRequest(request, span, startTime, oldMetricAttributes, stableMetricAttributes);
});
};
}
_onServerResponseFinish(request, response, span, oldMetricAttributes, stableMetricAttributes, startTime) {
const attributes = (0, utils_1.getIncomingRequestAttributesOnResponse)(request, response, this._semconvStability);
oldMetricAttributes = Object.assign(oldMetricAttributes, (0, utils_1.getIncomingRequestMetricAttributesOnResponse)(attributes));
stableMetricAttributes = Object.assign(stableMetricAttributes, (0, utils_1.getIncomingStableRequestMetricAttributesOnResponse)(attributes));
this._headerCapture.server.captureResponseHeaders(span, header => response.getHeader(header));
span.setAttributes(attributes).setStatus({
code: (0, utils_1.parseResponseStatus)(api_1.SpanKind.SERVER, response.statusCode),
});
const route = attributes[semantic_conventions_1.ATTR_HTTP_ROUTE];
if (route) {
span.updateName(`${request.method || 'GET'} ${route}`);
}
if (this.getConfig().applyCustomAttributesOnSpan) {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().applyCustomAttributesOnSpan(span, request, response), () => { }, true);
}
this._closeHttpSpan(span, api_1.SpanKind.SERVER, startTime, oldMetricAttributes, stableMetricAttributes);
}
_onOutgoingRequestError(span, oldMetricAttributes, stableMetricAttributes, startTime, error) {
(0, utils_1.setSpanWithError)(span, error, this._semconvStability);
stableMetricAttributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error.name;
this._closeHttpSpan(span, api_1.SpanKind.CLIENT, startTime, oldMetricAttributes, stableMetricAttributes);
}
_onServerResponseError(span, oldMetricAttributes, stableMetricAttributes, startTime, error) {
(0, utils_1.setSpanWithError)(span, error, this._semconvStability);
stableMetricAttributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error.name;
this._closeHttpSpan(span, api_1.SpanKind.SERVER, startTime, oldMetricAttributes, stableMetricAttributes);
}
_startHttpSpan(name, options, ctx = api_1.context.active()) {
/*
* If a parent is required but not present, we use a `NoopSpan` to still
* propagate context without recording it.
*/
const requireParent = options.kind === api_1.SpanKind.CLIENT
? this.getConfig().requireParentforOutgoingSpans
: this.getConfig().requireParentforIncomingSpans;
let span;
const currentSpan = api_1.trace.getSpan(ctx);
if (requireParent === true &&
(!currentSpan || !api_1.trace.isSpanContextValid(currentSpan.spanContext()))) {
span = api_1.trace.wrapSpanContext(api_1.INVALID_SPAN_CONTEXT);
}
else if (requireParent === true && currentSpan?.spanContext().isRemote) {
span = currentSpan;
}
else {
span = this.tracer.startSpan(name, options, ctx);
}
this._spanNotEnded.add(span);
return span;
}
_closeHttpSpan(span, spanKind, startTime, oldMetricAttributes, stableMetricAttributes) {
if (!this._spanNotEnded.has(span)) {
return;
}
span.end();
this._spanNotEnded.delete(span);
// Record metrics
const duration = (0, core_1.hrTimeToMilliseconds)((0, core_1.hrTimeDuration)(startTime, (0, core_1.hrTime)()));
if (spanKind === api_1.SpanKind.SERVER) {
this._recordServerDuration(duration, oldMetricAttributes, stableMetricAttributes);
}
else if (spanKind === api_1.SpanKind.CLIENT) {
this._recordClientDuration(duration, oldMetricAttributes, stableMetricAttributes);
}
}
_callResponseHook(span, response) {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().responseHook(span, response), () => { }, true);
}
_callRequestHook(span, request) {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => this.getConfig().requestHook(span, request), () => { }, true);
}
_callStartSpanHook(request, hookFunc) {
if (typeof hookFunc === 'function') {
return (0, instrumentation_1.safeExecuteInTheMiddle)(() => hookFunc(request), () => { }, true);
}
}
_createHeaderCapture() {
const config = this.getConfig();
return {
client: {
captureRequestHeaders: (0, utils_1.headerCapture)('request', config.headersToSpanAttributes?.client?.requestHeaders ?? []),
captureResponseHeaders: (0, utils_1.headerCapture)('response', config.headersToSpanAttributes?.client?.responseHeaders ?? []),
},
server: {
captureRequestHeaders: (0, utils_1.headerCapture)('request', config.headersToSpanAttributes?.server?.requestHeaders ?? []),
captureResponseHeaders: (0, utils_1.headerCapture)('response', config.headersToSpanAttributes?.server?.responseHeaders ?? []),
},
};
}
}
exports.HttpInstrumentation = HttpInstrumentation;
//# sourceMappingURL=http.js.map

View File

@@ -0,0 +1,15 @@
import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from "../../column-builder.cjs";
import { entityKind } from "../../entity.cjs";
import type { GelSequenceOptions } from "../sequence.cjs";
import { GelColumnBuilder } from "./common.cjs";
export declare abstract class GelIntColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends GelColumnBuilder<T, {
generatedIdentity: GeneratedIdentityConfig;
}> {
static readonly [entityKind]: string;
generatedAlwaysAsIdentity(sequence?: GelSequenceOptions & {
name?: string;
}): IsIdentity<this, 'always'>;
generatedByDefaultAsIdentity(sequence?: GelSequenceOptions & {
name?: string;
}): IsIdentity<this, 'byDefault'>;
}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleOff = createLucideIcon("CircleOff", [
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M8.35 2.69A10 10 0 0 1 21.3 15.65", key: "1pfsoa" }],
["path", { d: "M19.08 19.08A10 10 0 1 1 4.92 4.92", key: "1ablyi" }]
]);
export { CircleOff as default };
//# sourceMappingURL=circle-off.js.map

View File

@@ -0,0 +1,92 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.js");
var _index2 = require("../../../toDate.js");
const accusativeWeekdays = [
"нядзелю",
"панядзелак",
"аўторак",
"сераду",
"чацьвер",
"пятніцу",
"суботу",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у мінулую " + weekday + " а' p";
case 1:
case 2:
case 4:
return "'у мінулы " + weekday + " а' p";
}
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'у " + weekday + " а' p";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
switch (day) {
case 0:
case 3:
case 5:
case 6:
return "'у наступную " + weekday + " а' p";
case 1:
case 2:
case 4:
return "'у наступны " + weekday + " а' p";
}
}
const lastWeekFormat = (dirtyDate, baseDate, options) => {
const date = (0, _index2.toDate)(dirtyDate);
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
};
const nextWeekFormat = (dirtyDate, baseDate, options) => {
const date = (0, _index2.toDate)(dirtyDate);
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
};
const formatRelativeLocale = {
lastWeek: lastWeekFormat,
yesterday: "'учора а' p",
today: "'сёньня а' p",
tomorrow: "'заўтра а' p",
nextWeek: nextWeekFormat,
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,144 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(q|w)/i,
abbreviated: /^(q\.?\s?k\.?|b\.?\s?c\.?\s?e\.?|w\.?\s?k\.?)/i,
wide: /^(qabel kristu|before common era|wara kristu|common era)/i,
};
const parseEraPatterns = {
any: [/^(q|b)/i, /^(w|c)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^k[1234]/i,
wide: /^[1234](\.)? kwart/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmaglsond]/i,
abbreviated: /^(jan|fra|mar|apr|mej|ġun|lul|aww|set|ott|nov|diċ)/i,
wide: /^(jannar|frar|marzu|april|mejju|ġunju|lulju|awwissu|settembru|ottubru|novembru|diċembru)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^ġ/i,
/^l/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mej/i,
/^ġ/i,
/^l/i,
/^aw/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[ħteġs]/i,
short: /^(ħa|tn|tl|er|ħa|ġi|si)/i,
abbreviated: /^(ħad|tne|tli|erb|ħam|ġim|sib)/i,
wide: /^(il-ħadd|it-tnejn|it-tlieta|l-erbgħa|il-ħamis|il-ġimgħa|is-sibt)/i,
};
const parseDayPatterns = {
narrow: [/^ħ/i, /^t/i, /^t/i, /^e/i, /^ħ/i, /^ġ/i, /^s/i],
any: [
/^(il-)?ħad/i,
/^(it-)?tn/i,
/^(it-)?tl/i,
/^(l-)?er/i,
/^(il-)?ham/i,
/^(il-)?ġi/i,
/^(is-)?si/i,
],
};
const matchDayPeriodPatterns = {
narrow:
/^(a|p|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i,
any: /^([ap]\.?\s?m\.?|f'nofsillejl|f'nofsinhar|(ta') (għodwa|wara nofsinhar|filgħaxija|lejl))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^f'nofsillejl/i,
noon: /^f'nofsinhar/i,
morning: /għodwa/i,
afternoon: /wara(\s.*)nofsinhar/i,
evening: /filgħaxija/i,
night: /lejl/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

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

View File

@@ -0,0 +1,31 @@
"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 tracing_utils_exports = {};
__export(tracing_utils_exports, {
iife: () => iife
});
module.exports = __toCommonJS(tracing_utils_exports);
function iife(fn, ...args) {
return fn(...args);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
iife
});
//# sourceMappingURL=tracing-utils.cjs.map

View File

@@ -0,0 +1,206 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const DescriptionFileUtils = require("./DescriptionFileUtils");
const forEachBail = require("./forEachBail");
const { processExportsField } = require("./util/entrypoints");
const { parseIdentifier } = require("./util/identifier");
const {
deprecatedInvalidSegmentRegEx,
invalidSegmentRegEx,
} = require("./util/path");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").JsonObject} JsonObject */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
/** @typedef {import("./util/entrypoints").ExportsField} ExportsField */
/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */
module.exports = class ExportsFieldPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {Set<string>} conditionNames condition names
* @param {string | string[]} fieldNamePath name path
* @param {string | ResolveStepHook} target target
*/
constructor(source, conditionNames, fieldNamePath, target) {
this.source = source;
this.target = target;
this.conditionNames = conditionNames;
this.fieldName = fieldNamePath;
/** @type {WeakMap<JsonObject, FieldProcessor>} */
this.fieldProcessorCache = new WeakMap();
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("ExportsFieldPlugin", (request, resolveContext, callback) => {
// When there is no description file, abort
if (!request.descriptionFilePath) return callback();
if (
// When the description file is inherited from parent, abort
// (There is no description file inside of this package)
request.relativePath !== "." ||
request.request === undefined
) {
return callback();
}
const remainingRequest =
request.query || request.fragment
? (request.request === "." ? "./" : request.request) +
request.query +
request.fragment
: request.request;
const exportsField =
/** @type {ExportsField | null | undefined} */
(
DescriptionFileUtils.getField(
/** @type {JsonObject} */ (request.descriptionFileData),
this.fieldName,
)
);
if (!exportsField) return callback();
if (request.directory) {
return callback(
new Error(
`Resolving to directories is not possible with the exports field (request was ${remainingRequest}/)`,
),
);
}
/** @type {string[]} */
let paths;
/** @type {string | null} */
let usedField;
try {
// We attach the cache to the description file instead of the exportsField value
// because we use a WeakMap and the exportsField could be a string too.
// Description file is always an object when exports field can be accessed.
let fieldProcessor = this.fieldProcessorCache.get(
/** @type {JsonObject} */ (request.descriptionFileData),
);
if (fieldProcessor === undefined) {
fieldProcessor = processExportsField(exportsField);
this.fieldProcessorCache.set(
/** @type {JsonObject} */ (request.descriptionFileData),
fieldProcessor,
);
}
[paths, usedField] = fieldProcessor(
remainingRequest,
this.conditionNames,
);
} catch (/** @type {unknown} */ err) {
if (resolveContext.log) {
resolveContext.log(
`Exports field in ${request.descriptionFilePath} can't be processed: ${err}`,
);
}
return callback(/** @type {Error} */ (err));
}
if (paths.length === 0) {
const conditions = [...this.conditionNames];
const conditionsStr =
conditions.length === 1
? `the condition "${conditions[0]}"`
: `the conditions ${JSON.stringify(conditions)}`;
return callback(
new Error(
`"${remainingRequest}" is not exported under ${conditionsStr} from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`,
),
);
}
forEachBail(
paths,
/**
* @param {string} path path
* @param {(err?: null | Error, result?: null | ResolveRequest) => void} callback callback
* @param {number} i index
* @returns {void}
*/
(path, callback, i) => {
const parsedIdentifier = parseIdentifier(path);
if (!parsedIdentifier) return callback();
const [relativePath, query, fragment] = parsedIdentifier;
if (relativePath.length === 0 || !relativePath.startsWith("./")) {
if (paths.length === i) {
return callback(
new Error(
`Invalid "exports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`,
),
);
}
return callback();
}
if (
invalidSegmentRegEx.exec(relativePath.slice(2)) !== null &&
deprecatedInvalidSegmentRegEx.test(relativePath.slice(2))
) {
if (paths.length === i) {
return callback(
new Error(
`Invalid "exports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`,
),
);
}
return callback();
}
/** @type {ResolveRequest} */
const obj = {
...request,
request: undefined,
path: resolver.join(
/** @type {string} */ (request.descriptionFileRoot),
relativePath,
),
relativePath,
query,
fragment,
};
resolver.doResolve(
target,
obj,
`using exports field: ${path}`,
resolveContext,
(err, result) => {
if (err) return callback(err);
// Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400
if (result === undefined) return callback(null, null);
callback(null, result);
},
);
},
/**
* @param {(null | Error)=} err error
* @param {(null | ResolveRequest)=} result result
* @returns {void}
*/
(err, result) => callback(err, result || null),
);
});
}
};

View File

@@ -0,0 +1,30 @@
export { compactDecrypt } from './jwe/compact/decrypt.js';
export { flattenedDecrypt } from './jwe/flattened/decrypt.js';
export { generalDecrypt } from './jwe/general/decrypt.js';
export { GeneralEncrypt } from './jwe/general/encrypt.js';
export { compactVerify } from './jws/compact/verify.js';
export { flattenedVerify } from './jws/flattened/verify.js';
export { generalVerify } from './jws/general/verify.js';
export { jwtVerify } from './jwt/verify.js';
export { jwtDecrypt } from './jwt/decrypt.js';
export { CompactEncrypt } from './jwe/compact/encrypt.js';
export { FlattenedEncrypt } from './jwe/flattened/encrypt.js';
export { CompactSign } from './jws/compact/sign.js';
export { FlattenedSign } from './jws/flattened/sign.js';
export { GeneralSign } from './jws/general/sign.js';
export { SignJWT } from './jwt/sign.js';
export { EncryptJWT } from './jwt/encrypt.js';
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';
export { EmbeddedJWK } from './jwk/embedded.js';
export { createLocalJWKSet } from './jwks/local.js';
export { createRemoteJWKSet, jwksCache, experimental_jwksCache } from './jwks/remote.js';
export { UnsecuredJWT } from './jwt/unsecured.js';
export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';
export { decodeProtectedHeader } from './util/decode_protected_header.js';
export { decodeJwt } from './util/decode_jwt.js';
export * as errors from './util/errors.js';
export { generateKeyPair } from './key/generate_key_pair.js';
export { generateSecret } from './key/generate_secret.js';
export * as base64url from './util/base64url.js';
export { default as cryptoRuntime } from './util/runtime.js';

View File

@@ -0,0 +1,24 @@
import { entityKind } from "../entity.js";
import type { MySqlColumn } from "./columns/index.js";
import type { MySqlTable } from "./table.js";
export declare function unique(name?: string): UniqueOnConstraintBuilder;
export declare function uniqueKeyName(table: MySqlTable, columns: string[]): string;
export declare class UniqueConstraintBuilder {
private name?;
static readonly [entityKind]: string;
constructor(columns: MySqlColumn[], name?: string | undefined);
}
export declare class UniqueOnConstraintBuilder {
static readonly [entityKind]: string;
constructor(name?: string);
on(...columns: [MySqlColumn, ...MySqlColumn[]]): UniqueConstraintBuilder;
}
export declare class UniqueConstraint {
readonly table: MySqlTable;
static readonly [entityKind]: string;
readonly columns: MySqlColumn[];
readonly name?: string;
readonly nullsNotDistinct: boolean;
constructor(table: MySqlTable, columns: MySqlColumn[], name?: string);
getName(): string | undefined;
}

View File

@@ -0,0 +1,38 @@
{
"name": "immutable",
"version": "5.1.4",
"description": "Immutable Data Collections",
"license": "MIT",
"homepage": "https://immutable-js.com",
"author": {
"name": "Lee Byron",
"url": "https://github.com/leebyron"
},
"repository": {
"type": "git",
"url": "git://github.com/immutable-js/immutable-js.git"
},
"bugs": {
"url": "https://github.com/immutable-js/immutable-js/issues"
},
"main": "dist/immutable.js",
"module": "dist/immutable.es.js",
"types": "dist/immutable.d.ts",
"files": [
"dist",
"README.md",
"LICENSE"
],
"keywords": [
"immutable",
"persistent",
"lazy",
"data",
"datastructure",
"functional",
"collection",
"stateless",
"sequence",
"iteration"
]
}

View File

@@ -0,0 +1,11 @@
import { ElementContainer } from '../element-container';
import { Color } from '../../css/types/color';
import { Context } from '../../core/context';
export declare class IFrameElementContainer extends ElementContainer {
src: string;
width: number;
height: number;
tree?: ElementContainer;
backgroundColor: Color;
constructor(context: Context, iframe: HTMLIFrameElement);
}

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _skipFirstGeneratorNext;
function _skipFirstGeneratorNext(fn) {
return function () {
var it = fn.apply(this, arguments);
it.next();
return it;
};
}
//# sourceMappingURL=skipFirstGeneratorNext.js.map

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env node
import path from 'node:path'
import { fileURLToPath, pathToFileURL } from 'node:url'
const useSwc = process.argv.includes('--use-swc')
const disableTranspile = process.argv.includes('--disable-transpile')
if (disableTranspile) {
// Remove --disable-transpile from arguments
process.argv = process.argv.filter((arg) => arg !== '--disable-transpile')
const start = async () => {
const { bin } = await import('./dist/bin/index.js')
await bin()
}
void start()
} else {
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
const url = pathToFileURL(dirname).toString() + '/'
if (!useSwc) {
const start = async () => {
// Use tsx
let tsImport = (await import('tsx/esm/api')).tsImport
const { bin } = await tsImport('./dist/bin/index.js', url)
await bin()
}
void start()
} else if (useSwc) {
const { register } = await import('node:module')
// Remove --use-swc from arguments
process.argv = process.argv.filter((arg) => arg !== '--use-swc')
try {
register('@swc-node/register/esm', url)
} catch (_) {
console.error(
'@swc-node/register is not installed. Please install @swc-node/register in your project, if you want to use swc in payload run.',
)
}
const start = async () => {
const { bin } = await import('./dist/bin/index.js')
await bin()
}
void start()
}
}

View File

@@ -0,0 +1,36 @@
'use client';
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
import { jsx as _jsx } from "react/jsx-runtime";
import { useModal } from '../useModal/index.js';
export const togglerBaseClass = 'modal-toggler';
export const ModalToggler = (props) => {
const { slug, htmlElement: Tag = 'button', children, onClick, className } = props, rest = __rest(props, ["slug", "htmlElement", "children", "onClick", "className"]);
const { modalState, toggleModal, classPrefix, } = useModal();
const baseClass = classPrefix ? `${classPrefix}__${togglerBaseClass}` : togglerBaseClass;
const isOpen = modalState[slug] && modalState[slug].isOpen;
return (_jsx(Tag, Object.assign({ className: [
baseClass,
`${baseClass}--slug-${slug}`,
isOpen && `${baseClass}--slug-${slug}--is-open`,
className,
].filter(Boolean).join(' '),
role: 'button',
'aria-expanded': isOpen ? 'true' : 'false',
'aria-controls': slug,
'aria-label': `${!isOpen ? 'Open' : 'Close'} modal ${slug}` }, rest, { onClick: (e) => {
toggleModal(slug);
if (typeof onClick === 'function')
onClick(e);
}, children: children && children })));
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"square-split-horizontal.js","sources":["../../../src/icons/square-split-horizontal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareSplitHorizontal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAxOUg1Yy0xIDAtMi0xLTItMlY3YzAtMSAxLTIgMi0yaDMiIC8+CiAgPHBhdGggZD0iTTE2IDVoM2MxIDAgMiAxIDIgMnYxMGMwIDEtMSAyLTIgMmgtMyIgLz4KICA8bGluZSB4MT0iMTIiIHgyPSIxMiIgeTE9IjQiIHkyPSIyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-split-horizontal\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 SquareSplitHorizontal = createLucideIcon('SquareSplitHorizontal', [\n ['path', { d: 'M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3', key: 'lubmu8' }],\n ['path', { d: 'M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3', key: '1ag34g' }],\n ['line', { x1: '12', x2: '12', y1: '4', y2: '20', key: '1tx1rr' }],\n]);\n\nexport default SquareSplitHorizontal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB,iBAAiB,uBAAyB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACrE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACtE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,631 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/de/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
standalone: {
one: "weniger als 1 Sekunde",
other: "weniger als {{count}} Sekunden"
},
withPreposition: {
one: "weniger als 1 Sekunde",
other: "weniger als {{count}} Sekunden"
}
},
xSeconds: {
standalone: {
one: "1 Sekunde",
other: "{{count}} Sekunden"
},
withPreposition: {
one: "1 Sekunde",
other: "{{count}} Sekunden"
}
},
halfAMinute: {
standalone: "eine halbe Minute",
withPreposition: "einer halben Minute"
},
lessThanXMinutes: {
standalone: {
one: "weniger als 1 Minute",
other: "weniger als {{count}} Minuten"
},
withPreposition: {
one: "weniger als 1 Minute",
other: "weniger als {{count}} Minuten"
}
},
xMinutes: {
standalone: {
one: "1 Minute",
other: "{{count}} Minuten"
},
withPreposition: {
one: "1 Minute",
other: "{{count}} Minuten"
}
},
aboutXHours: {
standalone: {
one: "etwa 1 Stunde",
other: "etwa {{count}} Stunden"
},
withPreposition: {
one: "etwa 1 Stunde",
other: "etwa {{count}} Stunden"
}
},
xHours: {
standalone: {
one: "1 Stunde",
other: "{{count}} Stunden"
},
withPreposition: {
one: "1 Stunde",
other: "{{count}} Stunden"
}
},
xDays: {
standalone: {
one: "1 Tag",
other: "{{count}} Tage"
},
withPreposition: {
one: "1 Tag",
other: "{{count}} Tagen"
}
},
aboutXWeeks: {
standalone: {
one: "etwa 1 Woche",
other: "etwa {{count}} Wochen"
},
withPreposition: {
one: "etwa 1 Woche",
other: "etwa {{count}} Wochen"
}
},
xWeeks: {
standalone: {
one: "1 Woche",
other: "{{count}} Wochen"
},
withPreposition: {
one: "1 Woche",
other: "{{count}} Wochen"
}
},
aboutXMonths: {
standalone: {
one: "etwa 1 Monat",
other: "etwa {{count}} Monate"
},
withPreposition: {
one: "etwa 1 Monat",
other: "etwa {{count}} Monaten"
}
},
xMonths: {
standalone: {
one: "1 Monat",
other: "{{count}} Monate"
},
withPreposition: {
one: "1 Monat",
other: "{{count}} Monaten"
}
},
aboutXYears: {
standalone: {
one: "etwa 1 Jahr",
other: "etwa {{count}} Jahre"
},
withPreposition: {
one: "etwa 1 Jahr",
other: "etwa {{count}} Jahren"
}
},
xYears: {
standalone: {
one: "1 Jahr",
other: "{{count}} Jahre"
},
withPreposition: {
one: "1 Jahr",
other: "{{count}} Jahren"
}
},
overXYears: {
standalone: {
one: "mehr als 1 Jahr",
other: "mehr als {{count}} Jahre"
},
withPreposition: {
one: "mehr als 1 Jahr",
other: "mehr als {{count}} Jahren"
}
},
almostXYears: {
standalone: {
one: "fast 1 Jahr",
other: "fast {{count}} Jahre"
},
withPreposition: {
one: "fast 1 Jahr",
other: "fast {{count}} Jahren"
}
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = options !== null && options !== void 0 && options.addSuffix ? formatDistanceLocale[token].withPreposition : formatDistanceLocale[token].standalone;
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "in " + result;
} else {
return "vor " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/de/_lib/formatLong.js
var dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
short: "dd.MM.y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'um' {{time}}",
long: "{{date}} 'um' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/de/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'letzten' eeee 'um' p",
yesterday: "'gestern um' p",
today: "'heute um' p",
tomorrow: "'morgen um' p",
nextWeek: "eeee 'um' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/de/_lib/localize.js
var eraValues = {
narrow: ["v.Chr.", "n.Chr."],
abbreviated: ["v.Chr.", "n.Chr."],
wide: ["vor Christus", "nach Christus"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"]
};
var monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"M\xE4r",
"Apr",
"Mai",
"Jun",
"Jul",
"Aug",
"Sep",
"Okt",
"Nov",
"Dez"],
wide: [
"Januar",
"Februar",
"M\xE4rz",
"April",
"Mai",
"Juni",
"Juli",
"August",
"September",
"Oktober",
"November",
"Dezember"]
};
var formattingMonthValues = {
narrow: monthValues.narrow,
abbreviated: [
"Jan.",
"Feb.",
"M\xE4rz",
"Apr.",
"Mai",
"Juni",
"Juli",
"Aug.",
"Sep.",
"Okt.",
"Nov.",
"Dez."],
wide: monthValues.wide
};
var dayValues = {
narrow: ["S", "M", "D", "M", "D", "F", "S"],
short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
abbreviated: ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."],
wide: [
"Sonntag",
"Montag",
"Dienstag",
"Mittwoch",
"Donnerstag",
"Freitag",
"Samstag"]
};
var dayPeriodValues = {
narrow: {
am: "vm.",
pm: "nm.",
midnight: "Mitternacht",
noon: "Mittag",
morning: "Morgen",
afternoon: "Nachm.",
evening: "Abend",
night: "Nacht"
},
abbreviated: {
am: "vorm.",
pm: "nachm.",
midnight: "Mitternacht",
noon: "Mittag",
morning: "Morgen",
afternoon: "Nachmittag",
evening: "Abend",
night: "Nacht"
},
wide: {
am: "vormittags",
pm: "nachmittags",
midnight: "Mitternacht",
noon: "Mittag",
morning: "Morgen",
afternoon: "Nachmittag",
evening: "Abend",
night: "Nacht"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "vm.",
pm: "nm.",
midnight: "Mitternacht",
noon: "Mittag",
morning: "morgens",
afternoon: "nachm.",
evening: "abends",
night: "nachts"
},
abbreviated: {
am: "vorm.",
pm: "nachm.",
midnight: "Mitternacht",
noon: "Mittag",
morning: "morgens",
afternoon: "nachmittags",
evening: "abends",
night: "nachts"
},
wide: {
am: "vormittags",
pm: "nachmittags",
midnight: "Mitternacht",
noon: "Mittag",
morning: "morgens",
afternoon: "nachmittags",
evening: "abends",
night: "nachts"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
var number = Number(dirtyNumber);
return number + ".";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
formattingValues: formattingMonthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/de/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
abbreviated: /^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,
wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i
};
var parseEraPatterns = {
any: [/^v/i, /^n/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](\.)? Quartal/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,
wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^j[aä]/i,
/^f/i,
/^mär/i,
/^ap/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[smdmf]/i,
short: /^(so|mo|di|mi|do|fr|sa)/i,
abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,
wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i
};
var parseDayPatterns = {
any: [/^so/i, /^mo/i, /^di/i, /^mi/i, /^do/i, /^f/i, /^sa/i]
};
var matchDayPeriodPatterns = {
narrow: /^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
abbreviated: /^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,
wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^v/i,
pm: /^n/i,
midnight: /^Mitte/i,
noon: /^Mitta/i,
morning: /morgens/i,
afternoon: /nachmittags/i,
evening: /abends/i,
night: /nachts/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/de.js
var de = {
code: "de",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/de/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
de: de }) });
//# debugId=54F078E7AAE2E8D364756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,11 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Thai locale.
* @language Thai
* @iso-639-2 tha
* @author Athiwat Hirunworawongkun [@athivvat](https://github.com/athivvat)
* @author [@hawkup](https://github.com/hawkup)
* @author Jirawat I. [@nodtem66](https://github.com/nodtem66)
*/
export declare const th: Locale;

View File

@@ -0,0 +1,26 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.cjs";
import type { SingleStoreIntConfig } from "./int.cjs";
export type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{
name: TName;
dataType: 'number';
columnType: 'SingleStoreTinyInt';
data: number;
driverParam: number | string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config?: SingleStoreIntConfig);
}
export declare class SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export declare function tinyint(): SingleStoreTinyIntBuilderInitial<''>;
export declare function tinyint(config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<''>;
export declare function tinyint<TName extends string>(name: TName, config?: SingleStoreIntConfig): SingleStoreTinyIntBuilderInitial<TName>;

View File

@@ -0,0 +1,190 @@
"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 session_exports = {};
__export(session_exports, {
PlanetScalePreparedQuery: () => PlanetScalePreparedQuery,
PlanetScaleTransaction: () => PlanetScaleTransaction,
PlanetscaleSession: () => PlanetscaleSession
});
module.exports = __toCommonJS(session_exports);
var import_core = require("../cache/core/index.cjs");
var import_column = require("../column.cjs");
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_session = require("../mysql-core/session.cjs");
var import_sql = require("../sql/sql.cjs");
var import_utils = require("../utils.cjs");
class PlanetScalePreparedQuery extends import_session.MySqlPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, customResultMapper, generatedIds, returningIds) {
super(cache, queryMetadata, cacheConfig);
this.client = client;
this.queryString = queryString;
this.params = params;
this.logger = logger;
this.fields = fields;
this.customResultMapper = customResultMapper;
this.generatedIds = generatedIds;
this.returningIds = returningIds;
}
static [import_entity.entityKind] = "PlanetScalePreparedQuery";
rawQuery = { as: "object" };
query = { as: "array" };
async execute(placeholderValues = {}) {
const params = (0, import_sql.fillPlaceholders)(this.params, placeholderValues);
this.logger.logQuery(this.queryString, params);
const {
fields,
client,
queryString,
rawQuery,
query,
joinsNotNullableMap,
customResultMapper,
returningIds,
generatedIds
} = this;
if (!fields && !customResultMapper) {
const res = await this.queryWithCache(queryString, params, async () => {
return await client.execute(queryString, params, rawQuery);
});
const insertId = Number.parseFloat(res.insertId);
const affectedRows = res.rowsAffected;
if (returningIds) {
const returningResponse = [];
let j = 0;
for (let i = insertId; i < insertId + affectedRows; i++) {
for (const column of returningIds) {
const key = returningIds[0].path[0];
if ((0, import_entity.is)(column.field, import_column.Column)) {
if (column.field.primary && column.field.autoIncrement) {
returningResponse.push({ [key]: i });
}
if (column.field.defaultFn && generatedIds) {
returningResponse.push({ [key]: generatedIds[j][key] });
}
}
}
j++;
}
return returningResponse;
}
return res;
}
const { rows } = await this.queryWithCache(queryString, params, async () => {
return await client.execute(queryString, params, query);
});
if (customResultMapper) {
return customResultMapper(rows);
}
return rows.map((row) => (0, import_utils.mapResultRow)(fields, row, joinsNotNullableMap));
}
iterator(_placeholderValues) {
throw new Error("Streaming is not supported by the PlanetScale Serverless driver");
}
}
class PlanetscaleSession extends import_session.MySqlSession {
constructor(baseClient, dialect, tx, schema, options = {}) {
super(dialect);
this.baseClient = baseClient;
this.schema = schema;
this.options = options;
this.client = tx ?? baseClient;
this.logger = options.logger ?? new import_logger.NoopLogger();
this.cache = options.cache ?? new import_core.NoopCache();
}
static [import_entity.entityKind] = "PlanetscaleSession";
logger;
client;
cache;
prepareQuery(query, fields, customResultMapper, generatedIds, returningIds, queryMetadata, cacheConfig) {
return new PlanetScalePreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
customResultMapper,
generatedIds,
returningIds
);
}
async query(query, params) {
this.logger.logQuery(query, params);
return await this.client.execute(query, params, { as: "array" });
}
async queryObjects(query, params) {
return this.client.execute(query, params, { as: "object" });
}
all(query) {
const querySql = this.dialect.sqlToQuery(query);
this.logger.logQuery(querySql.sql, querySql.params);
return this.client.execute(querySql.sql, querySql.params, { as: "object" }).then((eQuery) => eQuery.rows);
}
async count(sql2) {
const res = await this.execute(sql2);
return Number(
res["rows"][0]["count"]
);
}
transaction(transaction) {
return this.baseClient.transaction((pstx) => {
const session = new PlanetscaleSession(this.baseClient, this.dialect, pstx, this.schema, this.options);
const tx = new PlanetScaleTransaction(
this.dialect,
session,
this.schema
);
return transaction(tx);
});
}
}
class PlanetScaleTransaction extends import_session.MySqlTransaction {
static [import_entity.entityKind] = "PlanetScaleTransaction";
constructor(dialect, session, schema, nestedIndex = 0) {
super(dialect, session, schema, nestedIndex, "planetscale");
}
async transaction(transaction) {
const savepointName = `sp${this.nestedIndex + 1}`;
const tx = new PlanetScaleTransaction(
this.dialect,
this.session,
this.schema,
this.nestedIndex + 1
);
await tx.execute(import_sql.sql.raw(`savepoint ${savepointName}`));
try {
const result = await transaction(tx);
await tx.execute(import_sql.sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (err) {
await tx.execute(import_sql.sql.raw(`rollback to savepoint ${savepointName}`));
throw err;
}
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PlanetScalePreparedQuery,
PlanetScaleTransaction,
PlanetscaleSession
});
//# sourceMappingURL=session.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/Login/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAI5D,eAAO,MAAM,yBAAyB,EAAE,oBAOpC,CAAA"}

View File

@@ -0,0 +1,109 @@
"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 delete_exports = {};
__export(delete_exports, {
GelDeleteBase: () => GelDeleteBase
});
module.exports = __toCommonJS(delete_exports);
var import_entity = require("../../entity.cjs");
var import_query_promise = require("../../query-promise.cjs");
var import_table = require("../../table.cjs");
var import_tracing = require("../../tracing.cjs");
var import_utils = require("../../utils.cjs");
var import_utils2 = require("../utils.cjs");
class GelDeleteBase extends import_query_promise.QueryPromise {
constructor(table, session, dialect, withList) {
super();
this.session = session;
this.dialect = dialect;
this.config = { table, withList };
}
static [import_entity.entityKind] = "GelDelete";
config;
/**
* Adds a `where` clause to the query.
*
* Calling this method will delete only those rows that fulfill a specified condition.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param where the `where` clause.
*
* @example
* You can use conditional operators and `sql function` to filter the rows to be deleted.
*
* ```ts
* // Delete all cars with green color
* await db.delete(cars).where(eq(cars.color, 'green'));
* // or
* await db.delete(cars).where(sql`${cars.color} = 'green'`)
* ```
*
* You can logically combine conditional operators with `and()` and `or()` operators:
*
* ```ts
* // Delete all BMW cars with a green color
* await db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));
*
* // Delete all cars with the green or blue color
* await db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));
* ```
*/
where(where) {
this.config.where = where;
return this;
}
returning(fields = this.config.table[import_table.Table.Symbol.Columns]) {
this.config.returning = (0, import_utils.orderSelectedFields)(fields);
return this;
}
/** @internal */
getSQL() {
return this.dialect.buildDeleteQuery(this.config);
}
toSQL() {
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
return rest;
}
/** @internal */
_prepare(name) {
return import_tracing.tracer.startActiveSpan("drizzle.prepareQuery", () => {
return this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()), this.config.returning, name, true, void 0, {
type: "delete",
tables: (0, import_utils2.extractUsedTable)(this.config.table)
});
});
}
prepare(name) {
return this._prepare(name);
}
execute = (placeholderValues) => {
return import_tracing.tracer.startActiveSpan("drizzle.operation", () => {
return this._prepare().execute(placeholderValues);
});
};
$dynamic() {
return this;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelDeleteBase
});
//# sourceMappingURL=delete.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"addHeadersAsAttributes.js","sources":["../../../../src/common/utils/addHeadersAsAttributes.ts"],"sourcesContent":["import type { Span, WebFetchHeaders } from '@sentry/core';\nimport { getClient, httpHeadersToSpanAttributes, winterCGHeadersToDict } from '@sentry/core';\n\n/**\n * Extracts HTTP request headers as span attributes and optionally applies them to a span.\n */\nexport function addHeadersAsAttributes(\n headers: WebFetchHeaders | Headers | Record<string, string | string[] | undefined> | undefined,\n span?: Span,\n): Record<string, string> {\n if (!headers) {\n return {};\n }\n\n const headersDict: Record<string, string | string[] | undefined> =\n headers instanceof Headers || (typeof headers === 'object' && 'get' in headers)\n ? winterCGHeadersToDict(headers as Headers)\n : headers;\n\n const headerAttributes = httpHeadersToSpanAttributes(headersDict, getClient()?.getOptions().sendDefaultPii ?? false);\n\n if (span) {\n span.setAttributes(headerAttributes);\n }\n\n return headerAttributes;\n}\n"],"names":["winterCGHeadersToDict","httpHeadersToSpanAttributes","getClient"],"mappings":";;;;AAGA;AACA;AACA;AACO,SAAS,sBAAsB;AACtC,EAAE,OAAO;AACT,EAAE,IAAI;AACN,EAA0B;AAC1B,EAAE,IAAI,CAAC,OAAO,EAAE;AAChB,IAAI,OAAO,EAAE;AACb,EAAE;;AAEF,EAAE,MAAM,WAAW;AACnB,IAAI,OAAA,YAAmB,OAAA,KAAY,OAAO,OAAA,KAAY,QAAA,IAAY,KAAA,IAAS,OAAO;AAClF,QAAQA,0BAAqB,CAAC,OAAA;AAC9B,QAAQ,OAAO;;AAEf,EAAE,MAAM,gBAAA,GAAmBC,gCAA2B,CAAC,WAAW,EAAEC,cAAS,EAAE,EAAE,UAAU,EAAE,CAAC,cAAA,IAAkB,KAAK,CAAC;;AAEtH,EAAE,IAAI,IAAI,EAAE;AACZ,IAAI,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC;AACxC,EAAE;;AAEF,EAAE,OAAO,gBAAgB;AACzB;;;;"}

View File

@@ -0,0 +1,159 @@
import { context } from '@opentelemetry/api';
import { isTracingSuppressed } from '@opentelemetry/core';
import { InstrumentationBase } from '@opentelemetry/instrumentation';
import { SDK_VERSION, LRUMap } from '@sentry/core';
import * as diagch from 'diagnostics_channel';
import { NODE_MAJOR, NODE_MINOR } from '../../nodeVersion.js';
import { addTracePropagationHeadersToFetchRequest, addFetchRequestBreadcrumb, getAbsoluteUrl } from '../../utils/outgoingFetchRequest.js';
/**
* This custom node-fetch instrumentation is used to instrument outgoing fetch requests.
* It does not emit any spans.
*
* The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,
* which would lead to Sentry not working as expected.
*
* This is heavily inspired & adapted from:
* https://github.com/open-telemetry/opentelemetry-js-contrib/blob/28e209a9da36bc4e1f8c2b0db7360170ed46cb80/plugins/node/instrumentation-undici/src/undici.ts
*/
class SentryNodeFetchInstrumentation extends InstrumentationBase {
// Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for
// unsubscribing.
constructor(config = {}) {
super('@sentry/instrumentation-node-fetch', SDK_VERSION, config);
this._channelSubs = [];
this._propagationDecisionMap = new LRUMap(100);
this._ignoreOutgoingRequestsMap = new WeakMap();
}
/** No need to instrument files/modules. */
init() {
return undefined;
}
/** Disable the instrumentation. */
disable() {
super.disable();
this._channelSubs.forEach(sub => sub.unsubscribe());
this._channelSubs = [];
}
/** Enable the instrumentation. */
enable() {
// "enabled" handling is currently a bit messy with InstrumentationBase.
// If constructed with `{enabled: false}`, this `.enable()` is still called,
// and `this.getConfig().enabled !== this.isEnabled()`, creating confusion.
//
// For now, this class will setup for instrumenting if `.enable()` is
// called, but use `this.getConfig().enabled` to determine if
// instrumentation should be generated. This covers the more likely common
// case of config being given a construction time, rather than later via
// `instance.enable()`, `.disable()`, or `.setConfig()` calls.
super.enable();
// This method is called by the super-class constructor before ours is
// called. So we need to ensure the property is initalized.
this._channelSubs = this._channelSubs || [];
// Avoid to duplicate subscriptions
if (this._channelSubs.length > 0) {
return;
}
this._subscribeToChannel('undici:request:create', this._onRequestCreated.bind(this));
this._subscribeToChannel('undici:request:headers', this._onResponseHeaders.bind(this));
}
/**
* This method is called when a request is created.
* You can still mutate the request here before it is sent.
*/
_onRequestCreated({ request }) {
const config = this.getConfig();
const enabled = config.enabled !== false;
if (!enabled) {
return;
}
const shouldIgnore = this._shouldIgnoreOutgoingRequest(request);
// We store this decisision for later so we do not need to re-evaluate it
// Additionally, the active context is not correct in _onResponseHeaders, so we need to make sure it is evaluated here
this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
if (shouldIgnore) {
return;
}
addTracePropagationHeadersToFetchRequest(request, this._propagationDecisionMap);
}
/**
* This method is called when a response is received.
*/
_onResponseHeaders({ request, response }) {
const config = this.getConfig();
const enabled = config.enabled !== false;
if (!enabled) {
return;
}
const _breadcrumbs = config.breadcrumbs;
const breadCrumbsEnabled = typeof _breadcrumbs === 'undefined' ? true : _breadcrumbs;
const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request);
if (breadCrumbsEnabled && !shouldIgnore) {
addFetchRequestBreadcrumb(request, response);
}
}
/** Subscribe to a diagnostics channel. */
_subscribeToChannel(
diagnosticChannel,
onMessage,
) {
// `diagnostics_channel` had a ref counting bug until v18.19.0.
// https://github.com/nodejs/node/pull/47520
const useNewSubscribe = NODE_MAJOR > 18 || (NODE_MAJOR === 18 && NODE_MINOR >= 19);
let unsubscribe;
if (useNewSubscribe) {
diagch.subscribe?.(diagnosticChannel, onMessage);
unsubscribe = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);
} else {
const channel = diagch.channel(diagnosticChannel);
channel.subscribe(onMessage);
unsubscribe = () => channel.unsubscribe(onMessage);
}
this._channelSubs.push({
name: diagnosticChannel,
unsubscribe,
});
}
/**
* Check if the given outgoing request should be ignored.
*/
_shouldIgnoreOutgoingRequest(request) {
if (isTracingSuppressed(context.active())) {
return true;
}
// Add trace propagation headers
const url = getAbsoluteUrl(request.origin, request.path);
const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
if (typeof ignoreOutgoingRequests !== 'function' || !url) {
return false;
}
return ignoreOutgoingRequests(url);
}
}
export { SentryNodeFetchInstrumentation };
//# sourceMappingURL=SentryNodeFetchInstrumentation.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.01129,"52":0.00564,"101":0.00564,"115":0.1411,"121":0.00564,"123":0.00564,"125":0.00564,"127":0.00564,"128":0.02258,"136":0.00564,"138":0.01693,"140":0.01693,"141":0.00564,"142":0.01129,"143":0.01129,"144":0.01129,"145":0.53054,"146":0.96512,"147":0.01129,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 122 124 126 129 130 131 132 133 134 135 137 139 148 149 3.5 3.6"},D:{"39":0.02258,"40":0.02258,"41":0.02822,"42":0.02258,"43":0.02822,"44":0.02258,"45":0.02822,"46":0.02258,"47":0.02822,"48":0.02258,"49":0.02822,"50":0.02258,"51":0.02258,"52":0.02258,"53":0.02822,"54":0.02258,"55":0.02822,"56":0.02822,"57":0.02258,"58":0.02822,"59":0.02822,"60":0.02258,"65":0.00564,"68":0.00564,"69":0.01129,"70":0.00564,"73":0.00564,"75":0.00564,"76":0.02822,"78":0.00564,"79":0.02258,"85":0.01129,"86":0.03951,"87":0.0508,"89":0.06208,"91":0.06773,"92":0.02258,"93":0.11852,"94":0.0508,"98":0.01693,"100":0.00564,"101":0.00564,"102":0.02822,"103":1.81737,"104":0.02822,"105":0.20883,"106":0.02822,"107":0.02822,"108":0.03386,"109":1.4618,"110":0.02822,"111":0.07337,"112":1.14009,"113":0.02258,"114":0.09595,"115":0.01129,"116":0.10159,"117":0.02822,"118":0.00564,"119":0.01693,"120":0.05644,"121":0.01693,"122":0.11852,"123":0.02822,"124":0.0508,"125":0.4233,"126":0.77887,"127":0.02822,"128":0.06773,"129":0.06208,"130":0.02822,"131":0.21447,"132":0.08466,"133":0.11288,"134":0.0508,"135":0.05644,"136":0.09595,"137":0.18061,"138":0.27656,"139":0.1919,"140":0.12417,"141":0.47974,"142":12.84574,"143":18.86225,"144":0.02822,"145":0.01693,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 66 67 71 72 74 77 80 81 83 84 88 90 95 96 97 99 146"},F:{"92":0.00564,"93":0.07337,"95":0.01693,"119":0.01693,"123":0.00564,"124":0.42894,"125":0.17496,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 120 121 122 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00564,"109":0.01129,"114":0.00564,"120":0.01129,"122":0.00564,"131":0.00564,"132":0.00564,"133":0.00564,"134":0.00564,"135":0.01129,"136":0.00564,"137":0.00564,"138":0.01129,"139":0.00564,"140":0.00564,"141":0.03386,"142":0.98206,"143":2.83329,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 121 123 124 125 126 127 128 129 130"},E:{"13":0.00564,_:"0 4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 16.4 26.3","13.1":0.03386,"14.1":0.04515,"15.4":0.00564,"15.5":0.00564,"15.6":0.05644,"16.0":0.00564,"16.1":0.00564,"16.2":0.00564,"16.3":0.01693,"16.5":0.01129,"16.6":0.06773,"17.0":0.00564,"17.1":0.03386,"17.2":0.01129,"17.3":0.01129,"17.4":0.02258,"17.5":0.02822,"17.6":0.12417,"18.0":0.01129,"18.1":0.02258,"18.2":0.01129,"18.3":0.03951,"18.4":0.04515,"18.5-18.6":0.11288,"26.0":0.17496,"26.1":0.40072,"26.2":0.07337},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00224,"5.0-5.1":0,"6.0-6.1":0.00448,"7.0-7.1":0.00336,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00897,"10.0-10.2":0.00112,"10.3":0.01569,"11.0-11.2":0.19278,"11.3-11.4":0.0056,"12.0-12.1":0.00448,"12.2-12.5":0.05044,"13.0-13.1":0.00112,"13.2":0.00785,"13.3":0.00224,"13.4-13.7":0.00785,"14.0-14.4":0.01569,"14.5-14.8":0.01681,"15.0-15.1":0.01793,"15.2-15.3":0.01345,"15.4":0.01457,"15.5":0.01569,"15.6-15.8":0.24321,"16.0":0.02802,"16.1":0.0538,"16.2":0.02802,"16.3":0.05044,"16.4":0.01233,"16.5":0.0213,"16.6-16.7":0.31607,"17.0":0.01793,"17.1":0.02914,"17.2":0.0213,"17.3":0.0325,"17.4":0.05492,"17.5":0.1076,"17.6-17.7":0.24882,"18.0":0.05604,"18.1":0.11656,"18.2":0.06164,"18.3":0.20062,"18.4":0.10311,"18.5-18.7":7.404,"26.0":0.14458,"26.1":1.20262,"26.2":0.22864,"26.3":0.01009},P:{"4":0.02094,"21":0.01047,"23":0.01047,"25":0.01047,"26":0.01047,"27":0.02094,"28":0.06281,"29":1.0469,_:"20 22 24 5.0-5.4 6.2-6.4 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.03141,"8.2":0.01047,"9.2":0.01047},I:{"0":0.01305,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},A:{"11":0.06773,_:"6 7 8 9 10 5.5"},K:{"0":0.61855,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.00436},O:{"0":0.10454},H:{"0":0},L:{"0":35.62272},R:{_:"0"},M:{"0":0.25265}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"fetchVersions.d.ts","sourceRoot":"","sources":["../../../src/views/Version/fetchVersions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,KAAK,EACX,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,YAAY,GAAU,YAAY,SAAS,MAAM,kGAU3D;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,KAAG,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,YAAY,CAAC,CA6B/C,CAAA;AAED,eAAO,MAAM,aAAa,GAAU,YAAY,SAAS,MAAM,wJAe5D;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,KAAG,OAAO,CAAC,IAAI,GAAG,aAAa,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CA8C9D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAU,YAAY,SAAS,MAAM,uHAYjE;IACD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,MAAM,EAAE,OAAO,GAAG,WAAW,CAAA;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,KAAG,OAAO,CAAC,IAAI,GAAG,eAAe,CAAC,YAAY,CAAC,CAyC/C,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","FieldDiffContainer","getHTMLDiffComponents","useTranslation","React","baseClass","formatValue","value","tokenizeByCharacter","String","JSON","stringify","undefined","Text","t0","$","comparisonValue","valueFrom","field","locale","nestingLevel","versionValue","valueTo","i18n","placeholder","t1","label","formattedValueFrom","formattedValueTo","length","renderedValueFrom","renderedValueTo","From","To","fromHTML","toHTML","_jsx","className"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Text/index.tsx"],"sourcesContent":["'use client'\nimport type { TextFieldDiffClientComponent } from 'payload'\n\nimport { FieldDiffContainer, getHTMLDiffComponents, useTranslation } from '@payloadcms/ui'\n\nimport './index.scss'\n\nimport React from 'react'\n\nconst baseClass = 'text-diff'\n\nfunction formatValue(value: unknown): {\n tokenizeByCharacter: boolean\n value: string\n} {\n if (typeof value === 'string') {\n return { tokenizeByCharacter: true, value }\n }\n if (typeof value === 'number') {\n return {\n tokenizeByCharacter: true,\n value: String(value),\n }\n }\n if (typeof value === 'boolean') {\n return {\n tokenizeByCharacter: false,\n value: String(value),\n }\n }\n\n if (value && typeof value === 'object') {\n return {\n tokenizeByCharacter: false,\n value: `<pre>${JSON.stringify(value, null, 2)}</pre>`,\n }\n }\n\n return {\n tokenizeByCharacter: true,\n value: undefined,\n }\n}\n\nexport const Text: TextFieldDiffClientComponent = ({\n comparisonValue: valueFrom,\n field,\n locale,\n nestingLevel,\n versionValue: valueTo,\n}) => {\n const { i18n } = useTranslation()\n\n let placeholder = ''\n\n if (valueTo == valueFrom) {\n placeholder = `<span class=\"html-diff-no-value\"><span>`\n }\n\n const formattedValueFrom = formatValue(valueFrom)\n const formattedValueTo = formatValue(valueTo)\n\n let tokenizeByCharacter = true\n if (formattedValueFrom.value?.length) {\n tokenizeByCharacter = formattedValueFrom.tokenizeByCharacter\n } else if (formattedValueTo.value?.length) {\n tokenizeByCharacter = formattedValueTo.tokenizeByCharacter\n }\n\n const renderedValueFrom = formattedValueFrom.value ?? placeholder\n const renderedValueTo: string = formattedValueTo.value ?? placeholder\n\n const { From, To } = getHTMLDiffComponents({\n fromHTML: '<p>' + renderedValueFrom + '</p>',\n toHTML: '<p>' + renderedValueTo + '</p>',\n tokenizeByCharacter,\n })\n\n return (\n <FieldDiffContainer\n className={baseClass}\n From={From}\n i18n={i18n}\n label={{\n label: field.label,\n locale,\n }}\n nestingLevel={nestingLevel}\n To={To}\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,kBAAkB,EAAEC,qBAAqB,EAAEC,cAAc,QAAQ;AAI1E,OAAOC,KAAA,MAAW;AAElB,MAAMC,SAAA,GAAY;AAElB,SAASC,YAAYC,KAAc;EAIjC,IAAI,OAAOA,KAAA,KAAU,UAAU;IAC7B,OAAO;MAAEC,mBAAA,EAAqB;MAAMD;IAAM;EAC5C;EACA,IAAI,OAAOA,KAAA,KAAU,UAAU;IAC7B,OAAO;MACLC,mBAAA,EAAqB;MACrBD,KAAA,EAAOE,MAAA,CAAOF,KAAA;IAChB;EACF;EACA,IAAI,OAAOA,KAAA,KAAU,WAAW;IAC9B,OAAO;MACLC,mBAAA,EAAqB;MACrBD,KAAA,EAAOE,MAAA,CAAOF,KAAA;IAChB;EACF;EAEA,IAAIA,KAAA,IAAS,OAAOA,KAAA,KAAU,UAAU;IACtC,OAAO;MACLC,mBAAA,EAAqB;MACrBD,KAAA,EAAO,QAAQG,IAAA,CAAKC,SAAS,CAACJ,KAAA,EAAO,MAAM;IAC7C;EACF;EAEA,OAAO;IACLC,mBAAA,EAAqB;IACrBD,KAAA,EAAOK;EACT;AACF;AAEA,OAAO,MAAMC,IAAA,GAAqCC,EAAA;EAAA,MAAAC,CAAA,GAAAf,EAAA;EAAC;IAAAgB,eAAA,EAAAC,SAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,YAAA;IAAAC,YAAA,EAAAC;EAAA,IAAAR,EAMlD;EACC;IAAAS;EAAA,IAAiBpB,cAAA;EAEjB,IAAAqB,WAAA,GAAkB;EAAA,IAEdF,OAAA,IAAWL,SAAA;IACbO,WAAA,CAAAA,CAAA,CAAcA,2CAAyC;EAAvD;EAAA,IAAAC,EAAA;EAAA,IAAAV,CAAA,QAAAG,KAAA,CAAAQ,KAAA,IAAAX,CAAA,QAAAQ,IAAA,IAAAR,CAAA,QAAAI,MAAA,IAAAJ,CAAA,QAAAK,YAAA,IAAAL,CAAA,QAAAS,WAAA,IAAAT,CAAA,QAAAE,SAAA,IAAAF,CAAA,QAAAO,OAAA;IAGF,MAAAK,kBAAA,GAA2BrB,WAAA,CAAYW,SAAA;IACvC,MAAAW,gBAAA,GAAyBtB,WAAA,CAAYgB,OAAA;IAErC,IAAAd,mBAAA;IAA0B,IACtBmB,kBAAA,CAAApB,KAAA,EAAAsB,MAAA;MACFrB,mBAAA,CAAAA,CAAA,CAAsBmB,kBAAA,CAAAnB,mBAAA;IAAtB;MAAA,IACSoB,gBAAA,CAAArB,KAAA,EAAAsB,MAAA;QACTrB,mBAAA,CAAAA,CAAA,CAAsBoB,gBAAA,CAAApB,mBAAA;MAAtB;IAAA;IAGF,MAAAsB,iBAAA,GAA0BH,kBAAA,CAAApB,KAAA,IAA4BiB,WAAA;IACtD,MAAAO,eAAA,GAAgCH,gBAAA,CAAArB,KAAA,IAA0BiB,WAAA;IAE1D;MAAAQ,IAAA;MAAAC;IAAA,IAAqB/B,qBAAA;MAAAgC,QAAA,EACT,QAAQJ,iBAAA,GAAoB;MAAAK,MAAA,EAC9B,QAAQJ,eAAA,GAAkB;MAAAvB;IAAA,CAEpC;IAGEiB,EAAA,GAAAW,IAAA,CAAAnC,kBAAA;MAAAoC,SAAA,EAAAhC,SAAA;MAAA2B,IAAA;MAAAT,IAAA;MAAAG,KAAA;QAAAA,KAAA,EAKWR,KAAA,CAAAQ,KAAA;QAAAP;MAAA;MAAAC,YAAA;MAAAa;IAAA,C;;;;;;;;;;;;SALXR,E;CAYJ","ignoreList":[]}

View File

@@ -0,0 +1,876 @@
'use strict';
const Char = {
ANCHOR: '&',
COMMENT: '#',
TAG: '!',
DIRECTIVES_END: '-',
DOCUMENT_END: '.'
};
const Type = {
ALIAS: 'ALIAS',
BLANK_LINE: 'BLANK_LINE',
BLOCK_FOLDED: 'BLOCK_FOLDED',
BLOCK_LITERAL: 'BLOCK_LITERAL',
COMMENT: 'COMMENT',
DIRECTIVE: 'DIRECTIVE',
DOCUMENT: 'DOCUMENT',
FLOW_MAP: 'FLOW_MAP',
FLOW_SEQ: 'FLOW_SEQ',
MAP: 'MAP',
MAP_KEY: 'MAP_KEY',
MAP_VALUE: 'MAP_VALUE',
PLAIN: 'PLAIN',
QUOTE_DOUBLE: 'QUOTE_DOUBLE',
QUOTE_SINGLE: 'QUOTE_SINGLE',
SEQ: 'SEQ',
SEQ_ITEM: 'SEQ_ITEM'
};
const defaultTagPrefix = 'tag:yaml.org,2002:';
const defaultTags = {
MAP: 'tag:yaml.org,2002:map',
SEQ: 'tag:yaml.org,2002:seq',
STR: 'tag:yaml.org,2002:str'
};
function findLineStarts(src) {
const ls = [0];
let offset = src.indexOf('\n');
while (offset !== -1) {
offset += 1;
ls.push(offset);
offset = src.indexOf('\n', offset);
}
return ls;
}
function getSrcInfo(cst) {
let lineStarts, src;
if (typeof cst === 'string') {
lineStarts = findLineStarts(cst);
src = cst;
} else {
if (Array.isArray(cst)) cst = cst[0];
if (cst && cst.context) {
if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src);
lineStarts = cst.lineStarts;
src = cst.context.src;
}
}
return {
lineStarts,
src
};
}
/**
* @typedef {Object} LinePos - One-indexed position in the source
* @property {number} line
* @property {number} col
*/
/**
* Determine the line/col position matching a character offset.
*
* Accepts a source string or a CST document as the second parameter. With
* the latter, starting indices for lines are cached in the document as
* `lineStarts: number[]`.
*
* Returns a one-indexed `{ line, col }` location if found, or
* `undefined` otherwise.
*
* @param {number} offset
* @param {string|Document|Document[]} cst
* @returns {?LinePos}
*/
function getLinePos(offset, cst) {
if (typeof offset !== 'number' || offset < 0) return null;
const {
lineStarts,
src
} = getSrcInfo(cst);
if (!lineStarts || !src || offset > src.length) return null;
for (let i = 0; i < lineStarts.length; ++i) {
const start = lineStarts[i];
if (offset < start) {
return {
line: i,
col: offset - lineStarts[i - 1] + 1
};
}
if (offset === start) return {
line: i + 1,
col: 1
};
}
const line = lineStarts.length;
return {
line,
col: offset - lineStarts[line - 1] + 1
};
}
/**
* Get a specified line from the source.
*
* Accepts a source string or a CST document as the second parameter. With
* the latter, starting indices for lines are cached in the document as
* `lineStarts: number[]`.
*
* Returns the line as a string if found, or `null` otherwise.
*
* @param {number} line One-indexed line number
* @param {string|Document|Document[]} cst
* @returns {?string}
*/
function getLine(line, cst) {
const {
lineStarts,
src
} = getSrcInfo(cst);
if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null;
const start = lineStarts[line - 1];
let end = lineStarts[line]; // undefined for last line; that's ok for slice()
while (end && end > start && src[end - 1] === '\n') --end;
return src.slice(start, end);
}
/**
* Pretty-print the starting line from the source indicated by the range `pos`
*
* Trims output to `maxWidth` chars while keeping the starting column visible,
* using `…` at either end to indicate dropped characters.
*
* Returns a two-line string (or `null`) with `\n` as separator; the second line
* will hold appropriately indented `^` marks indicating the column range.
*
* @param {Object} pos
* @param {LinePos} pos.start
* @param {LinePos} [pos.end]
* @param {string|Document|Document[]*} cst
* @param {number} [maxWidth=80]
* @returns {?string}
*/
function getPrettyContext({
start,
end
}, cst, maxWidth = 80) {
let src = getLine(start.line, cst);
if (!src) return null;
let {
col
} = start;
if (src.length > maxWidth) {
if (col <= maxWidth - 10) {
src = src.substr(0, maxWidth - 1) + '…';
} else {
const halfWidth = Math.round(maxWidth / 2);
if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + '…';
col -= src.length - maxWidth;
src = '…' + src.substr(1 - maxWidth);
}
}
let errLen = 1;
let errEnd = '';
if (end) {
if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) {
errLen = end.col - start.col;
} else {
errLen = Math.min(src.length + 1, maxWidth) - col;
errEnd = '…';
}
}
const offset = col > 1 ? ' '.repeat(col - 1) : '';
const err = '^'.repeat(errLen);
return `${src}\n${offset}${err}${errEnd}`;
}
class Range {
static copy(orig) {
return new Range(orig.start, orig.end);
}
constructor(start, end) {
this.start = start;
this.end = end || start;
}
isEmpty() {
return typeof this.start !== 'number' || !this.end || this.end <= this.start;
}
/**
* Set `origStart` and `origEnd` to point to the original source range for
* this node, which may differ due to dropped CR characters.
*
* @param {number[]} cr - Positions of dropped CR characters
* @param {number} offset - Starting index of `cr` from the last call
* @returns {number} - The next offset, matching the one found for `origStart`
*/
setOrigRange(cr, offset) {
const {
start,
end
} = this;
if (cr.length === 0 || end <= cr[0]) {
this.origStart = start;
this.origEnd = end;
return offset;
}
let i = offset;
while (i < cr.length) {
if (cr[i] > start) break;else ++i;
}
this.origStart = start + i;
const nextOffset = i;
while (i < cr.length) {
// if end was at \n, it should now be at \r
if (cr[i] >= end) break;else ++i;
}
this.origEnd = end + i;
return nextOffset;
}
}
/** Root class of all nodes */
class Node {
static addStringTerminator(src, offset, str) {
if (str[str.length - 1] === '\n') return str;
const next = Node.endOfWhiteSpace(src, offset);
return next >= src.length || src[next] === '\n' ? str + '\n' : str;
} // ^(---|...)
static atDocumentBoundary(src, offset, sep) {
const ch0 = src[offset];
if (!ch0) return true;
const prev = src[offset - 1];
if (prev && prev !== '\n') return false;
if (sep) {
if (ch0 !== sep) return false;
} else {
if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false;
}
const ch1 = src[offset + 1];
const ch2 = src[offset + 2];
if (ch1 !== ch0 || ch2 !== ch0) return false;
const ch3 = src[offset + 3];
return !ch3 || ch3 === '\n' || ch3 === '\t' || ch3 === ' ';
}
static endOfIdentifier(src, offset) {
let ch = src[offset];
const isVerbatim = ch === '<';
const notOk = isVerbatim ? ['\n', '\t', ' ', '>'] : ['\n', '\t', ' ', '[', ']', '{', '}', ','];
while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1];
if (isVerbatim && ch === '>') offset += 1;
return offset;
}
static endOfIndent(src, offset) {
let ch = src[offset];
while (ch === ' ') ch = src[offset += 1];
return offset;
}
static endOfLine(src, offset) {
let ch = src[offset];
while (ch && ch !== '\n') ch = src[offset += 1];
return offset;
}
static endOfWhiteSpace(src, offset) {
let ch = src[offset];
while (ch === '\t' || ch === ' ') ch = src[offset += 1];
return offset;
}
static startOfLine(src, offset) {
let ch = src[offset - 1];
if (ch === '\n') return offset;
while (ch && ch !== '\n') ch = src[offset -= 1];
return offset + 1;
}
/**
* End of indentation, or null if the line's indent level is not more
* than `indent`
*
* @param {string} src
* @param {number} indent
* @param {number} lineStart
* @returns {?number}
*/
static endOfBlockIndent(src, indent, lineStart) {
const inEnd = Node.endOfIndent(src, lineStart);
if (inEnd > lineStart + indent) {
return inEnd;
} else {
const wsEnd = Node.endOfWhiteSpace(src, inEnd);
const ch = src[wsEnd];
if (!ch || ch === '\n') return wsEnd;
}
return null;
}
static atBlank(src, offset, endAsBlank) {
const ch = src[offset];
return ch === '\n' || ch === '\t' || ch === ' ' || endAsBlank && !ch;
}
static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) {
if (!ch || indentDiff < 0) return false;
if (indentDiff > 0) return true;
return indicatorAsIndent && ch === '-';
} // should be at line or string end, or at next non-whitespace char
static normalizeOffset(src, offset) {
const ch = src[offset];
return !ch ? offset : ch !== '\n' && src[offset - 1] === '\n' ? offset - 1 : Node.endOfWhiteSpace(src, offset);
} // fold single newline into space, multiple newlines to N - 1 newlines
// presumes src[offset] === '\n'
static foldNewline(src, offset, indent) {
let inCount = 0;
let error = false;
let fold = '';
let ch = src[offset + 1];
while (ch === ' ' || ch === '\t' || ch === '\n') {
switch (ch) {
case '\n':
inCount = 0;
offset += 1;
fold += '\n';
break;
case '\t':
if (inCount <= indent) error = true;
offset = Node.endOfWhiteSpace(src, offset + 2) - 1;
break;
case ' ':
inCount += 1;
offset += 1;
break;
}
ch = src[offset + 1];
}
if (!fold) fold = ' ';
if (ch && inCount <= indent) error = true;
return {
fold,
offset,
error
};
}
constructor(type, props, context) {
Object.defineProperty(this, 'context', {
value: context || null,
writable: true
});
this.error = null;
this.range = null;
this.valueRange = null;
this.props = props || [];
this.type = type;
this.value = null;
}
getPropValue(idx, key, skipKey) {
if (!this.context) return null;
const {
src
} = this.context;
const prop = this.props[idx];
return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null;
}
get anchor() {
for (let i = 0; i < this.props.length; ++i) {
const anchor = this.getPropValue(i, Char.ANCHOR, true);
if (anchor != null) return anchor;
}
return null;
}
get comment() {
const comments = [];
for (let i = 0; i < this.props.length; ++i) {
const comment = this.getPropValue(i, Char.COMMENT, true);
if (comment != null) comments.push(comment);
}
return comments.length > 0 ? comments.join('\n') : null;
}
commentHasRequiredWhitespace(start) {
const {
src
} = this.context;
if (this.header && start === this.header.end) return false;
if (!this.valueRange) return false;
const {
end
} = this.valueRange;
return start !== end || Node.atBlank(src, end - 1);
}
get hasComment() {
if (this.context) {
const {
src
} = this.context;
for (let i = 0; i < this.props.length; ++i) {
if (src[this.props[i].start] === Char.COMMENT) return true;
}
}
return false;
}
get hasProps() {
if (this.context) {
const {
src
} = this.context;
for (let i = 0; i < this.props.length; ++i) {
if (src[this.props[i].start] !== Char.COMMENT) return true;
}
}
return false;
}
get includesTrailingLines() {
return false;
}
get jsonLike() {
const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE];
return jsonLikeTypes.indexOf(this.type) !== -1;
}
get rangeAsLinePos() {
if (!this.range || !this.context) return undefined;
const start = getLinePos(this.range.start, this.context.root);
if (!start) return undefined;
const end = getLinePos(this.range.end, this.context.root);
return {
start,
end
};
}
get rawValue() {
if (!this.valueRange || !this.context) return null;
const {
start,
end
} = this.valueRange;
return this.context.src.slice(start, end);
}
get tag() {
for (let i = 0; i < this.props.length; ++i) {
const tag = this.getPropValue(i, Char.TAG, false);
if (tag != null) {
if (tag[1] === '<') {
return {
verbatim: tag.slice(2, -1)
};
} else {
// eslint-disable-next-line no-unused-vars
const [_, handle, suffix] = tag.match(/^(.*!)([^!]*)$/);
return {
handle,
suffix
};
}
}
}
return null;
}
get valueRangeContainsNewline() {
if (!this.valueRange || !this.context) return false;
const {
start,
end
} = this.valueRange;
const {
src
} = this.context;
for (let i = start; i < end; ++i) {
if (src[i] === '\n') return true;
}
return false;
}
parseComment(start) {
const {
src
} = this.context;
if (src[start] === Char.COMMENT) {
const end = Node.endOfLine(src, start + 1);
const commentRange = new Range(start, end);
this.props.push(commentRange);
return end;
}
return start;
}
/**
* Populates the `origStart` and `origEnd` values of all ranges for this
* node. Extended by child classes to handle descendant nodes.
*
* @param {number[]} cr - Positions of dropped CR characters
* @param {number} offset - Starting index of `cr` from the last call
* @returns {number} - The next offset, matching the one found for `origStart`
*/
setOrigRanges(cr, offset) {
if (this.range) offset = this.range.setOrigRange(cr, offset);
if (this.valueRange) this.valueRange.setOrigRange(cr, offset);
this.props.forEach(prop => prop.setOrigRange(cr, offset));
return offset;
}
toString() {
const {
context: {
src
},
range,
value
} = this;
if (value != null) return value;
const str = src.slice(range.start, range.end);
return Node.addStringTerminator(src, range.end, str);
}
}
class YAMLError extends Error {
constructor(name, source, message) {
if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`);
super();
this.name = name;
this.message = message;
this.source = source;
}
makePretty() {
if (!this.source) return;
this.nodeType = this.source.type;
const cst = this.source.context && this.source.context.root;
if (typeof this.offset === 'number') {
this.range = new Range(this.offset, this.offset + 1);
const start = cst && getLinePos(this.offset, cst);
if (start) {
const end = {
line: start.line,
col: start.col + 1
};
this.linePos = {
start,
end
};
}
delete this.offset;
} else {
this.range = this.source.range;
this.linePos = this.source.rangeAsLinePos;
}
if (this.linePos) {
const {
line,
col
} = this.linePos.start;
this.message += ` at line ${line}, column ${col}`;
const ctx = cst && getPrettyContext(this.linePos, cst);
if (ctx) this.message += `:\n\n${ctx}\n`;
}
delete this.source;
}
}
class YAMLReferenceError extends YAMLError {
constructor(source, message) {
super('YAMLReferenceError', source, message);
}
}
class YAMLSemanticError extends YAMLError {
constructor(source, message) {
super('YAMLSemanticError', source, message);
}
}
class YAMLSyntaxError extends YAMLError {
constructor(source, message) {
super('YAMLSyntaxError', source, message);
}
}
class YAMLWarning extends YAMLError {
constructor(source, message) {
super('YAMLWarning', source, message);
}
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
class PlainValue extends Node {
static endOfLine(src, start, inFlow) {
let ch = src[start];
let offset = start;
while (ch && ch !== '\n') {
if (inFlow && (ch === '[' || ch === ']' || ch === '{' || ch === '}' || ch === ',')) break;
const next = src[offset + 1];
if (ch === ':' && (!next || next === '\n' || next === '\t' || next === ' ' || inFlow && next === ',')) break;
if ((ch === ' ' || ch === '\t') && next === '#') break;
offset += 1;
ch = next;
}
return offset;
}
get strValue() {
if (!this.valueRange || !this.context) return null;
let {
start,
end
} = this.valueRange;
const {
src
} = this.context;
let ch = src[end - 1];
while (start < end && (ch === '\n' || ch === '\t' || ch === ' ')) ch = src[--end - 1];
let str = '';
for (let i = start; i < end; ++i) {
const ch = src[i];
if (ch === '\n') {
const {
fold,
offset
} = Node.foldNewline(src, i, -1);
str += fold;
i = offset;
} else if (ch === ' ' || ch === '\t') {
// trim trailing whitespace
const wsStart = i;
let next = src[i + 1];
while (i < end && (next === ' ' || next === '\t')) {
i += 1;
next = src[i + 1];
}
if (next !== '\n') str += i > wsStart ? src.slice(wsStart, i + 1) : ch;
} else {
str += ch;
}
}
const ch0 = src[start];
switch (ch0) {
case '\t':
{
const msg = 'Plain value cannot start with a tab character';
const errors = [new YAMLSemanticError(this, msg)];
return {
errors,
str
};
}
case '@':
case '`':
{
const msg = `Plain value cannot start with reserved character ${ch0}`;
const errors = [new YAMLSemanticError(this, msg)];
return {
errors,
str
};
}
default:
return str;
}
}
parseBlockValue(start) {
const {
indent,
inFlow,
src
} = this.context;
let offset = start;
let valueEnd = start;
for (let ch = src[offset]; ch === '\n'; ch = src[offset]) {
if (Node.atDocumentBoundary(src, offset + 1)) break;
const end = Node.endOfBlockIndent(src, indent, offset + 1);
if (end === null || src[end] === '#') break;
if (src[end] === '\n') {
offset = end;
} else {
valueEnd = PlainValue.endOfLine(src, end, inFlow);
offset = valueEnd;
}
}
if (this.valueRange.isEmpty()) this.valueRange.start = start;
this.valueRange.end = valueEnd;
return valueEnd;
}
/**
* Parses a plain value from the source
*
* Accepted forms are:
* ```
* #comment
*
* first line
*
* first line #comment
*
* first line
* block
* lines
*
* #comment
* block
* lines
* ```
* where block lines are empty or have an indent level greater than `indent`.
*
* @param {ParseContext} context
* @param {number} start - Index of first character
* @returns {number} - Index of the character after this scalar, may be `\n`
*/
parse(context, start) {
this.context = context;
const {
inFlow,
src
} = context;
let offset = start;
const ch = src[offset];
if (ch && ch !== '#' && ch !== '\n') {
offset = PlainValue.endOfLine(src, start, inFlow);
}
this.valueRange = new Range(start, offset);
offset = Node.endOfWhiteSpace(src, offset);
offset = this.parseComment(offset);
if (!this.hasComment || this.valueRange.isEmpty()) {
offset = this.parseBlockValue(offset);
}
return offset;
}
}
exports.Char = Char;
exports.Node = Node;
exports.PlainValue = PlainValue;
exports.Range = Range;
exports.Type = Type;
exports.YAMLError = YAMLError;
exports.YAMLReferenceError = YAMLReferenceError;
exports.YAMLSemanticError = YAMLSemanticError;
exports.YAMLSyntaxError = YAMLSyntaxError;
exports.YAMLWarning = YAMLWarning;
exports._defineProperty = _defineProperty;
exports.defaultTagPrefix = defaultTagPrefix;
exports.defaultTags = defaultTags;

View File

@@ -0,0 +1,118 @@
import { fieldAffectsData, tabHasName } from '../fields/config/types.js';
const traverseFields = ({ data, // parent,
fields, result })=>{
fields.forEach((field)=>{
switch(field.type){
case 'collapsible':
case 'row':
{
traverseFields({
data,
fields: field.fields,
result
});
break;
}
case 'group':
{
if (fieldAffectsData(field)) {
let targetResult;
if (typeof field.saveToJWT === 'string') {
targetResult = field.saveToJWT;
result[field.saveToJWT] = data[field.name];
} else if (field.saveToJWT) {
targetResult = field.name;
result[field.name] = data[field.name];
}
const groupData = data[field.name];
const groupResult = targetResult ? result[targetResult] : result;
traverseFields({
data: groupData,
fields: field.fields,
result: groupResult
});
break;
} else {
traverseFields({
data,
fields: field.fields,
result
});
break;
}
}
case 'tab':
{
if (tabHasName(field)) {
let targetResult;
if (typeof field.saveToJWT === 'string') {
targetResult = field.saveToJWT;
result[field.saveToJWT] = data[field.name];
} else if (field.saveToJWT) {
targetResult = field.name;
result[field.name] = data[field.name];
}
const tabData = data[field.name];
const tabResult = targetResult ? result[targetResult] : result;
traverseFields({
data: tabData,
fields: field.fields,
result: tabResult
});
} else {
traverseFields({
data,
fields: field.fields,
result
});
}
break;
}
case 'tabs':
{
traverseFields({
data,
fields: field.tabs.map((tab)=>({
...tab,
type: 'tab'
})),
result
});
break;
}
default:
if (fieldAffectsData(field)) {
if (field.saveToJWT) {
if (typeof field.saveToJWT === 'string') {
result[field.saveToJWT] = data[field.name];
delete result[field.name];
} else {
result[field.name] = data[field.name];
}
} else if (field.saveToJWT === false) {
delete result[field.name];
}
}
}
});
return result;
};
export const getFieldsToSign = (args)=>{
const { collectionConfig, email, sid, user } = args;
const result = {
id: user?.id,
collection: collectionConfig.slug,
email
};
if (sid) {
result.sid = sid;
}
traverseFields({
data: user,
fields: collectionConfig.fields,
result
});
return result;
};
//# sourceMappingURL=getFieldsToSign.js.map

View File

@@ -0,0 +1,114 @@
import type { SourceMapSegment } from './sourcemap-segment';
import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';
export interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
export interface Section {
offset: { line: number; column: number };
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
export interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
export type OriginalMapping = {
source: string | null;
line: number;
column: number;
name: string | null;
};
export type InvalidOriginalMapping = {
source: null;
line: null;
column: null;
name: null;
};
export type GeneratedMapping = {
line: number;
column: number;
};
export type InvalidGeneratedMapping = {
line: null;
column: null;
};
export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] };
export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
export type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
export type Needle = { line: number; column: number; bias?: Bias };
export type SourceNeedle = { source: string; line: number; column: number; bias?: Bias };
export type EachMapping =
| {
generatedLine: number;
generatedColumn: number;
source: null;
originalLine: null;
originalColumn: null;
name: null;
}
| {
generatedLine: number;
generatedColumn: number;
source: string | null;
originalLine: number;
originalColumn: number;
name: string | null;
};
export abstract class SourceMap {
declare version: SourceMapV3['version'];
declare file: SourceMapV3['file'];
declare names: SourceMapV3['names'];
declare sourceRoot: SourceMapV3['sourceRoot'];
declare sources: SourceMapV3['sources'];
declare sourcesContent: SourceMapV3['sourcesContent'];
declare resolvedSources: SourceMapV3['sources'];
declare ignoreList: SourceMapV3['ignoreList'];
}
export type Ro<T> =
T extends Array<infer V>
? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>>
: T extends object
? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>>
: T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = { [K in keyof T]: T[K] | Ro<T[K]> };
export function parse<T>(map: T): Exclude<T, string> {
return typeof map === 'string' ? JSON.parse(map) : (map as Exclude<T, string>);
}

View File

@@ -0,0 +1,115 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(-ლი|-ე)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ჩვ?\.წ)/i,
abbreviated: /^(ჩვ?\.წ)/i,
wide: /^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე|ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i,
};
const parseEraPatterns = {
any: [
/^(ჩვენს წელთაღრიცხვამდე|ქრისტეშობამდე)/i,
/^(ჩვენი წელთაღრიცხვით|ქრისტეშობიდან)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]-(ლი|ე)? კვ/i,
wide: /^[1234]-(ლი|ე)? კვარტალი/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
any: /^(ია|თე|მა|აპ|მს|ვნ|ვლ|აგ|სე|ოქ|ნო|დე)/i,
};
const parseMonthPatterns = {
any: [
/^ია/i,
/^თ/i,
/^მარ/i,
/^აპ/i,
/^მაი/i,
/^ი?ვნ/i,
/^ი?ვლ/i,
/^აგ/i,
/^ს/i,
/^ო/i,
/^ნ/i,
/^დ/i,
],
};
const matchDayPatterns = {
narrow: /^(კვ|ორ|სა|ოთ|ხუ|პა|შა)/i,
short: /^(კვი|ორშ|სამ|ოთხ|ხუთ|პარ|შაბ)/i,
wide: /^(კვირა|ორშაბათი|სამშაბათი|ოთხშაბათი|ხუთშაბათი|პარასკევი|შაბათი)/i,
};
const parseDayPatterns = {
any: [/^კვ/i, /^ორ/i, /^სა/i, /^ოთ/i, /^ხუ/i, /^პა/i, /^შა/i],
};
const matchDayPeriodPatterns = {
any: /^([ap]\.?\s?m\.?|შუაღ|დილ)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^შუაღ/i,
noon: /^შუადღ/i,
morning: /^დილ/i,
afternoon: /ნაშუადღევს/i,
evening: /საღამო/i,
night: /ღამ/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: "any",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,305 @@
"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.HapiInstrumentation = void 0;
const api = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const instrumentation_1 = require("@opentelemetry/instrumentation");
/** @knipignore */
const version_1 = require("./version");
const internal_types_1 = require("./internal-types");
const utils_1 = require("./utils");
/** Hapi instrumentation for OpenTelemetry */
class HapiInstrumentation extends instrumentation_1.InstrumentationBase {
_semconvStability;
constructor(config = {}) {
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
this._semconvStability = (0, instrumentation_1.semconvStabilityFromStr)('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
}
init() {
return new instrumentation_1.InstrumentationNodeModuleDefinition(internal_types_1.HapiComponentName, ['>=17.0.0 <22'], (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module' ? module.default : module;
if (!(0, instrumentation_1.isWrapped)(moduleExports.server)) {
this._wrap(moduleExports, 'server', this._getServerPatch.bind(this));
}
if (!(0, instrumentation_1.isWrapped)(moduleExports.Server)) {
this._wrap(moduleExports, 'Server', this._getServerPatch.bind(this));
}
return moduleExports;
}, (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module' ? module.default : module;
this._massUnwrap([moduleExports], ['server', 'Server']);
});
}
/**
* Patches the Hapi.server and Hapi.Server functions in order to instrument
* the server.route, server.ext, and server.register functions via calls to the
* @function _getServerRoutePatch, @function _getServerExtPatch, and
* @function _getServerRegisterPatch functions
* @param original - the original Hapi Server creation function
*/
_getServerPatch(original) {
const instrumentation = this;
const self = this;
return function server(opts) {
const newServer = original.apply(this, [opts]);
self._wrap(newServer, 'route', originalRouter => {
return instrumentation._getServerRoutePatch.bind(instrumentation)(originalRouter);
});
// Casting as any is necessary here due to multiple overloads on the Hapi.ext
// function, which requires supporting a variety of different parameters
// as extension inputs
self._wrap(newServer, 'ext', originalExtHandler => {
return instrumentation._getServerExtPatch.bind(instrumentation)(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
originalExtHandler);
});
// Casting as any is necessary here due to multiple overloads on the Hapi.Server.register
// function, which requires supporting a variety of different types of Plugin inputs
self._wrap(newServer, 'register',
// eslint-disable-next-line @typescript-eslint/no-explicit-any
instrumentation._getServerRegisterPatch.bind(instrumentation));
return newServer;
};
}
/**
* Patches the plugin register function used by the Hapi Server. This function
* goes through each plugin that is being registered and adds instrumentation
* via a call to the @function _wrapRegisterHandler function.
* @param {RegisterFunction<T>} original - the original register function which
* registers each plugin on the server
*/
_getServerRegisterPatch(original) {
const instrumentation = this;
return function register(pluginInput, options) {
if (Array.isArray(pluginInput)) {
for (const pluginObj of pluginInput) {
const plugin = (0, utils_1.getPluginFromInput)(pluginObj);
instrumentation._wrapRegisterHandler(plugin);
}
}
else {
const plugin = (0, utils_1.getPluginFromInput)(pluginInput);
instrumentation._wrapRegisterHandler(plugin);
}
return original.apply(this, [pluginInput, options]);
};
}
/**
* Patches the Server.ext function which adds extension methods to the specified
* point along the request lifecycle. This function accepts the full range of
* accepted input into the standard Hapi `server.ext` function. For each extension,
* it adds instrumentation to the handler via a call to the @function _wrapExtMethods
* function.
* @param original - the original ext function which adds the extension method to the server
* @param {string} [pluginName] - if present, represents the name of the plugin responsible
* for adding this server extension. Else, signifies that the extension was added directly
*/
_getServerExtPatch(original, pluginName) {
const instrumentation = this;
return function ext(...args) {
if (Array.isArray(args[0])) {
const eventsList = args[0];
for (let i = 0; i < eventsList.length; i++) {
const eventObj = eventsList[i];
if ((0, utils_1.isLifecycleExtType)(eventObj.type)) {
const lifecycleEventObj = eventObj;
const handler = instrumentation._wrapExtMethods(lifecycleEventObj.method, eventObj.type, pluginName);
lifecycleEventObj.method = handler;
eventsList[i] = lifecycleEventObj;
}
}
return original.apply(this, args);
}
else if ((0, utils_1.isDirectExtInput)(args)) {
const extInput = args;
const method = extInput[1];
const handler = instrumentation._wrapExtMethods(method, extInput[0], pluginName);
return original.apply(this, [extInput[0], handler, extInput[2]]);
}
else if ((0, utils_1.isLifecycleExtEventObj)(args[0])) {
const lifecycleEventObj = args[0];
const handler = instrumentation._wrapExtMethods(lifecycleEventObj.method, lifecycleEventObj.type, pluginName);
lifecycleEventObj.method = handler;
return original.call(this, lifecycleEventObj);
}
return original.apply(this, args);
};
}
/**
* Patches the Server.route function. This function accepts either one or an array
* of Hapi.ServerRoute objects and adds instrumentation on each route via a call to
* the @function _wrapRouteHandler function.
* @param {HapiServerRouteInputMethod} original - the original route function which adds
* the route to the server
* @param {string} [pluginName] - if present, represents the name of the plugin responsible
* for adding this server route. Else, signifies that the route was added directly
*/
_getServerRoutePatch(original, pluginName) {
const instrumentation = this;
return function route(route) {
if (Array.isArray(route)) {
for (let i = 0; i < route.length; i++) {
const newRoute = instrumentation._wrapRouteHandler.call(instrumentation, route[i], pluginName);
route[i] = newRoute;
}
}
else {
route = instrumentation._wrapRouteHandler.call(instrumentation, route, pluginName);
}
return original.apply(this, [route]);
};
}
/**
* Wraps newly registered plugins to add instrumentation to the plugin's clone of
* the original server. Specifically, wraps the server.route and server.ext functions
* via calls to @function _getServerRoutePatch and @function _getServerExtPatch
* @param {Hapi.Plugin<T>} plugin - the new plugin which is being instrumented
*/
_wrapRegisterHandler(plugin) {
const instrumentation = this;
const pluginName = (0, utils_1.getPluginName)(plugin);
const oldRegister = plugin.register;
const self = this;
const newRegisterHandler = function (server, options) {
self._wrap(server, 'route', original => {
return instrumentation._getServerRoutePatch.bind(instrumentation)(original, pluginName);
});
// Casting as any is necessary here due to multiple overloads on the Hapi.ext
// function, which requires supporting a variety of different parameters
// as extension inputs
self._wrap(server, 'ext', originalExtHandler => {
return instrumentation._getServerExtPatch.bind(instrumentation)(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
originalExtHandler, pluginName);
});
return oldRegister.call(this, server, options);
};
plugin.register = newRegisterHandler;
}
/**
* Wraps request extension methods to add instrumentation to each new extension handler.
* Patches each individual extension in order to create the
* span and propagate context. It does not create spans when there is no parent span.
* @param {PatchableExtMethod | PatchableExtMethod[]} method - the request extension
* handler which is being instrumented
* @param {Hapi.ServerRequestExtType} extPoint - the point in the Hapi request lifecycle
* which this extension targets
* @param {string} [pluginName] - if present, represents the name of the plugin responsible
* for adding this server route. Else, signifies that the route was added directly
*/
_wrapExtMethods(method, extPoint, pluginName) {
const instrumentation = this;
if (method instanceof Array) {
for (let i = 0; i < method.length; i++) {
method[i] = instrumentation._wrapExtMethods(method[i], extPoint);
}
return method;
}
else if ((0, utils_1.isPatchableExtMethod)(method)) {
if (method[internal_types_1.handlerPatched] === true)
return method;
method[internal_types_1.handlerPatched] = true;
const newHandler = async function (...params) {
if (api.trace.getSpan(api.context.active()) === undefined) {
return await method.apply(this, params);
}
const metadata = (0, utils_1.getExtMetadata)(extPoint, pluginName);
const span = instrumentation.tracer.startSpan(metadata.name, {
attributes: metadata.attributes,
});
try {
return await api.context.with(api.trace.setSpan(api.context.active(), span), method, undefined, ...params);
}
catch (err) {
span.recordException(err);
span.setStatus({
code: api.SpanStatusCode.ERROR,
message: err.message,
});
throw err;
}
finally {
span.end();
}
};
return newHandler;
}
return method;
}
/**
* Patches each individual route handler method in order to create the
* span and propagate context. It does not create spans when there is no parent span.
* @param {PatchableServerRoute} route - the route handler which is being instrumented
* @param {string} [pluginName] - if present, represents the name of the plugin responsible
* for adding this server route. Else, signifies that the route was added directly
*/
_wrapRouteHandler(route, pluginName) {
const instrumentation = this;
if (route[internal_types_1.handlerPatched] === true)
return route;
route[internal_types_1.handlerPatched] = true;
const wrapHandler = oldHandler => {
return async function (...params) {
if (api.trace.getSpan(api.context.active()) === undefined) {
return await oldHandler.call(this, ...params);
}
const rpcMetadata = (0, core_1.getRPCMetadata)(api.context.active());
if (rpcMetadata?.type === core_1.RPCType.HTTP) {
rpcMetadata.route = route.path;
}
const metadata = (0, utils_1.getRouteMetadata)(route, instrumentation._semconvStability, pluginName);
const span = instrumentation.tracer.startSpan(metadata.name, {
attributes: metadata.attributes,
});
try {
return await api.context.with(api.trace.setSpan(api.context.active(), span), () => oldHandler.call(this, ...params));
}
catch (err) {
span.recordException(err);
span.setStatus({
code: api.SpanStatusCode.ERROR,
message: err.message,
});
throw err;
}
finally {
span.end();
}
};
};
if (typeof route.handler === 'function') {
route.handler = wrapHandler(route.handler);
}
else if (typeof route.options === 'function') {
const oldOptions = route.options;
route.options = function (server) {
const options = oldOptions(server);
if (typeof options.handler === 'function') {
options.handler = wrapHandler(options.handler);
}
return options;
};
}
else if (typeof route.options?.handler === 'function') {
route.options.handler = wrapHandler(route.options.handler);
}
return route;
}
}
exports.HapiInstrumentation = HapiInstrumentation;
//# sourceMappingURL=instrumentation.js.map

View File

@@ -0,0 +1,11 @@
@import 'vars';
@import 'z-index';
//////////////////////////////
// IMPORT OVERRIDES
//////////////////////////////
@import 'type';
@import 'queries';
@import 'resets';
@import 'svg';

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ElementContainer = void 0;
var index_1 = require("../css/index");
var bounds_1 = require("../css/layout/bounds");
var node_parser_1 = require("./node-parser");
var debugger_1 = require("../core/debugger");
var ElementContainer = /** @class */ (function () {
function ElementContainer(context, element) {
this.context = context;
this.textNodes = [];
this.elements = [];
this.flags = 0;
if (debugger_1.isDebugging(element, 3 /* PARSE */)) {
debugger;
}
this.styles = new index_1.CSSParsedDeclaration(context, window.getComputedStyle(element, null));
if (node_parser_1.isHTMLElementNode(element)) {
if (this.styles.animationDuration.some(function (duration) { return duration > 0; })) {
element.style.animationDuration = '0s';
}
if (this.styles.transform !== null) {
// getBoundingClientRect takes transforms into account
element.style.transform = 'none';
}
}
this.bounds = bounds_1.parseBounds(this.context, element);
if (debugger_1.isDebugging(element, 4 /* RENDER */)) {
this.flags |= 16 /* DEBUG_RENDER */;
}
}
return ElementContainer;
}());
exports.ElementContainer = ElementContainer;
//# sourceMappingURL=element-container.js.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CirclePlus = createLucideIcon("CirclePlus", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["path", { d: "M12 8v8", key: "napkw2" }]
]);
export { CirclePlus as default };
//# sourceMappingURL=circle-plus.js.map

View File

@@ -0,0 +1,13 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
# [*.md]
# trim_trailing_whitespace = false

View File

@@ -0,0 +1,11 @@
"use strict";
var _array_without_holes = require("./_array_without_holes.cjs");
var _iterable_to_array = require("./_iterable_to_array.cjs");
var _non_iterable_spread = require("./_non_iterable_spread.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _to_consumable_array(arr) {
return _array_without_holes._(arr) || _iterable_to_array._(arr) || _unsupported_iterable_to_array._(arr) || _non_iterable_spread._();
}
exports._ = _to_consumable_array;

View File

@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,mCAAmC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.30.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-fs';\n"]}

View File

@@ -0,0 +1,13 @@
import { cache } from 'react';
import getConfig from './getConfig.js';
async function getTimeZoneCachedImpl(locale) {
const config = await getConfig(locale);
return config.timeZone;
}
const getTimeZoneCached = cache(getTimeZoneCachedImpl);
async function getTimeZone(opts) {
return getTimeZoneCached(opts?.locale);
}
export { getTimeZone as default };

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "znakov", verb: "imeti" },
file: { unit: "bajtov", verb: "imeti" },
array: { unit: "elementov", verb: "imeti" },
set: { unit: "elementov", verb: "imeti" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "število";
}
case "object": {
if (Array.isArray(data)) {
return "tabela";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "vnos",
email: "e-poštni naslov",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datum in čas",
date: "ISO datum",
time: "ISO čas",
duration: "ISO trajanje",
ipv4: "IPv4 naslov",
ipv6: "IPv6 naslov",
cidrv4: "obseg IPv4",
cidrv6: "obseg IPv6",
base64: "base64 kodiran niz",
base64url: "base64url kodiran niz",
json_string: "JSON niz",
e164: "E.164 številka",
jwt: "JWT",
template_literal: "vnos",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Neveljaven vnos: pričakovano ${issue.expected}, prejeto ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Neveljaven vnos: pričakovano ${util.stringifyPrimitive(issue.values[0])}`;
return `Neveljavna možnost: pričakovano eno izmed ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Preveliko: pričakovano, da bo ${issue.origin ?? "vrednost"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementov"}`;
return `Preveliko: pričakovano, da bo ${issue.origin ?? "vrednost"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Premajhno: pričakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Premajhno: pričakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Neveljaven niz: mora se začeti z "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Neveljaven niz: mora se končati z "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Neveljaven niz: mora vsebovati "${_issue.includes}"`;
if (_issue.format === "regex")
return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;
return `Neveljaven ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Neveljavno število: mora biti večkratnik ${issue.divisor}`;
case "unrecognized_keys":
return `Neprepoznan${issue.keys.length > 1 ? "i ključi" : " ključ"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Neveljaven ključ v ${issue.origin}`;
case "invalid_union":
return "Neveljaven vnos";
case "invalid_element":
return `Neveljavna vrednost v ${issue.origin}`;
default:
return "Neveljaven vnos";
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -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: "yy-MM-dd",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'à' {{time}}",
long: "{{date}} 'à' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/duration.ts"],"sourcesContent":["import type { Duration } from 'gel';\nimport type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelDurationBuilderInitial<TName extends string> = GelDurationBuilder<{\n\tname: TName;\n\tdataType: 'duration';\n\tcolumnType: 'GelDuration';\n\tdata: Duration;\n\tdriverParam: Duration;\n\tenumValues: undefined;\n}>;\n\nexport class GelDurationBuilder<T extends ColumnBuilderBaseConfig<'duration', 'GelDuration'>>\n\textends GelColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelDurationBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'duration', 'GelDuration');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelDuration<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelDuration<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelDuration<T extends ColumnBaseConfig<'duration', 'GelDuration'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelDuration';\n\n\tgetSQLType(): string {\n\t\treturn `duration`;\n\t}\n}\n\nexport function duration(): GelDurationBuilderInitial<''>;\nexport function duration<TName extends string>(name: TName): GelDurationBuilderInitial<TName>;\nexport function duration(name?: string) {\n\treturn new GelDurationBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,2BACJ,+BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,YAAY,aAAa;AAAA,EACtC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBAA2E,wBAAa;AAAA,EACpG,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,SAAS,MAAe;AACvC,SAAO,IAAI,mBAAmB,QAAQ,EAAE;AACzC;","names":[]}

View File

@@ -0,0 +1,8 @@
export declare function getScrollElementRect(element: Element): {
top: number;
left: number;
right: number;
bottom: number;
width: number;
height: number;
};

View File

@@ -0,0 +1,23 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var utils_exports = {};
module.exports = __toCommonJS(utils_exports);
__reExport(utils_exports, require("./array.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./array.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"circle-fading-arrow-up.js","sources":["../../../src/icons/circle-fading-arrow-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleFadingArrowUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMmExMCAxMCAwIDAgMSA3LjM4IDE2Ljc1IiAvPgogIDxwYXRoIGQ9Im0xNiAxMi00LTQtNCA0IiAvPgogIDxwYXRoIGQ9Ik0xMiAxNlY4IiAvPgogIDxwYXRoIGQ9Ik0yLjUgOC44NzVhMTAgMTAgMCAwIDAtLjUgMyIgLz4KICA8cGF0aCBkPSJNMi44MyAxNmExMCAxMCAwIDAgMCAyLjQzIDMuNCIgLz4KICA8cGF0aCBkPSJNNC42MzYgNS4yMzVhMTAgMTAgMCAwIDEgLjg5MS0uODU3IiAvPgogIDxwYXRoIGQ9Ik04LjY0NCAyMS40MmExMCAxMCAwIDAgMCA3LjYzMS0uMzgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/circle-fading-arrow-up\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 CircleFadingArrowUp = createLucideIcon('CircleFadingArrowUp', [\n ['path', { d: 'M12 2a10 10 0 0 1 7.38 16.75', key: '175t95' }],\n ['path', { d: 'm16 12-4-4-4 4', key: '177agl' }],\n ['path', { d: 'M12 16V8', key: '1sbj14' }],\n ['path', { d: 'M2.5 8.875a10 10 0 0 0-.5 3', key: '1vce0s' }],\n ['path', { d: 'M2.83 16a10 10 0 0 0 2.43 3.4', key: 'o3fkw4' }],\n ['path', { d: 'M4.636 5.235a10 10 0 0 1 .891-.857', key: '1szpfk' }],\n ['path', { d: 'M8.644 21.42a10 10 0 0 0 7.631-.38', key: '9yhvd4' }],\n]);\n\nexport default CircleFadingArrowUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB,iBAAiB,qBAAuB,CAAA,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,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,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACrE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,29 @@
"use strict";
exports.sv = void 0;
var _index = require("./sv/_lib/formatDistance.cjs");
var _index2 = require("./sv/_lib/formatLong.cjs");
var _index3 = require("./sv/_lib/formatRelative.cjs");
var _index4 = require("./sv/_lib/localize.cjs");
var _index5 = require("./sv/_lib/match.cjs");
/**
* @category Locales
* @summary Swedish locale.
* @language Swedish
* @iso-639-2 swe
* @author Johannes Ulén [@ejulen](https://github.com/ejulen)
* @author Alexander Nanberg [@alexandernanberg](https://github.com/alexandernanberg)
* @author Henrik Andersson [@limelights](https://github.com/limelights)
*/
const sv = (exports.sv = {
code: "sv",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/RouteCache/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA6D,MAAM,OAAO,CAAA;AAIjF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAOD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CA4CxF,CAAA;AAED,eAAO,MAAM,aAAa,yBAAqB,CAAA"}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').asyncify;

View File

@@ -0,0 +1,390 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const memoize = require("./util/memoize");
/** @typedef {import("./ChunkGraph")} ChunkGraph */
/** @typedef {import("./DependenciesBlock")} DependenciesBlock */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./ModuleGraph")} ModuleGraph */
/** @typedef {import("./ModuleGraphConnection")} ModuleGraphConnection */
/** @typedef {import("./ModuleGraphConnection").ConnectionState} ConnectionState */
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("./WebpackError")} WebpackError */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./util/Hash")} Hash */
/** @typedef {import("./util/runtime").RuntimeSpec} RuntimeSpec */
/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */
/**
* @typedef {object} UpdateHashContext
* @property {ChunkGraph} chunkGraph
* @property {RuntimeSpec} runtime
* @property {RuntimeTemplate=} runtimeTemplate
*/
/**
* @typedef {object} SourcePosition
* @property {number} line
* @property {number=} column
*/
/**
* @typedef {object} RealDependencyLocation
* @property {SourcePosition} start
* @property {SourcePosition=} end
* @property {number=} index
*/
/**
* @typedef {object} SyntheticDependencyLocation
* @property {string} name
* @property {number=} index
*/
/** @typedef {SyntheticDependencyLocation | RealDependencyLocation} DependencyLocation */
/** @typedef {string} ExportInfoName */
/**
* @typedef {object} ExportSpec
* @property {ExportInfoName} name the name of the export
* @property {boolean=} canMangle can the export be renamed (defaults to true)
* @property {boolean=} terminalBinding is the export a terminal binding that should be checked for export star conflicts
* @property {(string | ExportSpec)[]=} exports nested exports
* @property {ModuleGraphConnection=} from when reexported: from which module
* @property {string[] | null=} export when reexported: from which export
* @property {number=} priority when reexported: with which priority
* @property {boolean=} hidden export is not visible, because another export blends over it
*/
/** @typedef {Set<string>} ExportsSpecExcludeExports */
/**
* @typedef {object} ExportsSpec
* @property {(string | ExportSpec)[] | true | null} exports exported names, true for unknown exports or null for no exports
* @property {ExportsSpecExcludeExports=} excludeExports when exports = true, list of unaffected exports
* @property {(Set<string> | null)=} hideExports list of maybe prior exposed, but now hidden exports
* @property {ModuleGraphConnection=} from when reexported: from which module
* @property {number=} priority when reexported: with which priority
* @property {boolean=} canMangle can the export be renamed (defaults to true)
* @property {boolean=} terminalBinding are the exports terminal bindings that should be checked for export star conflicts
* @property {Module[]=} dependencies module on which the result depends on
*/
/**
* @typedef {object} ReferencedExport
* @property {string[]} name name of the referenced export
* @property {boolean=} canMangle when false, referenced export can not be mangled, defaults to true
*/
/** @typedef {string[][]} RawReferencedExports */
/** @typedef {(string[] | ReferencedExport)[]} ReferencedExports */
/** @typedef {(moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState} GetConditionFn */
const TRANSITIVE = Symbol("transitive");
const getIgnoredModule = memoize(() => {
const RawModule = require("./RawModule");
const module = new RawModule("/* (ignored) */", "ignored", "(ignored)");
module.factoryMeta = { sideEffectFree: true };
return module;
});
class Dependency {
constructor() {
/** @type {Module | undefined} */
this._parentModule = undefined;
/** @type {DependenciesBlock | undefined} */
this._parentDependenciesBlock = undefined;
/** @type {number} */
this._parentDependenciesBlockIndex = -1;
// TODO check if this can be moved into ModuleDependency
/** @type {boolean} */
this.weak = false;
// TODO check if this can be moved into ModuleDependency
/** @type {boolean | undefined} */
this.optional = false;
this._locSL = 0;
this._locSC = 0;
this._locEL = 0;
this._locEC = 0;
/** @type {undefined | number} */
this._locI = undefined;
/** @type {undefined | string} */
this._locN = undefined;
/** @type {undefined | DependencyLocation} */
this._loc = undefined;
}
/**
* @returns {string} a display name for the type of dependency
*/
get type() {
return "unknown";
}
/**
* @returns {string} a dependency category, typical categories are "commonjs", "amd", "esm"
*/
get category() {
return "unknown";
}
/**
* @returns {DependencyLocation} location
*/
get loc() {
if (this._loc !== undefined) return this._loc;
/** @type {SyntheticDependencyLocation & RealDependencyLocation} */
const loc = {};
if (this._locSL > 0) {
loc.start = { line: this._locSL, column: this._locSC };
}
if (this._locEL > 0) {
loc.end = { line: this._locEL, column: this._locEC };
}
if (this._locN !== undefined) {
loc.name = this._locN;
}
if (this._locI !== undefined) {
loc.index = this._locI;
}
return (this._loc = loc);
}
set loc(loc) {
if ("start" in loc && typeof loc.start === "object") {
this._locSL = loc.start.line || 0;
this._locSC = loc.start.column || 0;
} else {
this._locSL = 0;
this._locSC = 0;
}
if ("end" in loc && typeof loc.end === "object") {
this._locEL = loc.end.line || 0;
this._locEC = loc.end.column || 0;
} else {
this._locEL = 0;
this._locEC = 0;
}
this._locI = "index" in loc ? loc.index : undefined;
this._locN = "name" in loc ? loc.name : undefined;
this._loc = loc;
}
/**
* @param {number} startLine start line
* @param {number} startColumn start column
* @param {number} endLine end line
* @param {number} endColumn end column
*/
setLoc(startLine, startColumn, endLine, endColumn) {
this._locSL = startLine;
this._locSC = startColumn;
this._locEL = endLine;
this._locEC = endColumn;
this._locI = undefined;
this._locN = undefined;
this._loc = undefined;
}
/**
* @returns {string | undefined} a request context
*/
getContext() {
return undefined;
}
/**
* @returns {string | null} an identifier to merge equal requests
*/
getResourceIdentifier() {
return null;
}
/**
* @returns {boolean | TRANSITIVE} true, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module
*/
couldAffectReferencingModule() {
return TRANSITIVE;
}
/**
* Returns the referenced module and export
* @deprecated
* @param {ModuleGraph} moduleGraph module graph
* @returns {never} throws error
*/
getReference(moduleGraph) {
throw new Error(
"Dependency.getReference was removed in favor of Dependency.getReferencedExports, ModuleGraph.getModule and ModuleGraph.getConnection().active"
);
}
/**
* Returns list of exports referenced by this dependency
* @param {ModuleGraph} moduleGraph module graph
* @param {RuntimeSpec} runtime the runtime for which the module is analysed
* @returns {ReferencedExports} referenced exports
*/
getReferencedExports(moduleGraph, runtime) {
return Dependency.EXPORTS_OBJECT_REFERENCED;
}
/**
* @param {ModuleGraph} moduleGraph module graph
* @returns {null | false | GetConditionFn} function to determine if the connection is active
*/
getCondition(moduleGraph) {
return null;
}
/**
* Returns the exported names
* @param {ModuleGraph} moduleGraph module graph
* @returns {ExportsSpec | undefined} export names
*/
getExports(moduleGraph) {
return undefined;
}
/**
* Returns warnings
* @param {ModuleGraph} moduleGraph module graph
* @returns {WebpackError[] | null | undefined} warnings
*/
getWarnings(moduleGraph) {
return null;
}
/**
* Returns errors
* @param {ModuleGraph} moduleGraph module graph
* @returns {WebpackError[] | null | undefined} errors
*/
getErrors(moduleGraph) {
return null;
}
/**
* Update the hash
* @param {Hash} hash hash to be updated
* @param {UpdateHashContext} context context
* @returns {void}
*/
updateHash(hash, context) {}
/**
* implement this method to allow the occurrence order plugin to count correctly
* @returns {number} count how often the id is used in this dependency
*/
getNumberOfIdOccurrences() {
return 1;
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @returns {ConnectionState} how this dependency connects the module to referencing modules
*/
getModuleEvaluationSideEffectsState(moduleGraph) {
return true;
}
/**
* @param {string} context context directory
* @returns {Module} ignored module
*/
createIgnoredModule(context) {
return getIgnoredModule();
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize({ write }) {
write(this.weak);
write(this.optional);
write(this._locSL);
write(this._locSC);
write(this._locEL);
write(this._locEC);
write(this._locI);
write(this._locN);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize({ read }) {
this.weak = read();
this.optional = read();
this._locSL = read();
this._locSC = read();
this._locEL = read();
this._locEC = read();
this._locI = read();
this._locN = read();
}
}
/** @type {RawReferencedExports} */
Dependency.NO_EXPORTS_REFERENCED = [];
/** @type {RawReferencedExports} */
Dependency.EXPORTS_OBJECT_REFERENCED = [[]];
// TODO remove in webpack 6
Object.defineProperty(Dependency.prototype, "module", {
/**
* @deprecated
* @returns {EXPECTED_ANY} throws
*/
get() {
throw new Error(
"module property was removed from Dependency (use compilation.moduleGraph.getModule(dependency) instead)"
);
},
/**
* @deprecated
* @returns {never} throws
*/
set() {
throw new Error(
"module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)"
);
}
});
/**
* @param {Dependency} dependency dep
* @returns {boolean} true if the dependency is a low priority dependency
*/
Dependency.isLowPriorityDependency = (dependency) =>
/** @type {ModuleDependency} */ (dependency).sourceOrder === Infinity;
// TODO remove in webpack 6
Object.defineProperty(Dependency.prototype, "disconnect", {
/**
* @deprecated
* @returns {EXPECTED_ANY} throws
*/
get() {
throw new Error(
"disconnect was removed from Dependency (Dependency no longer carries graph specific information)"
);
}
});
Dependency.TRANSITIVE = TRANSITIVE;
module.exports = Dependency;

View File

@@ -0,0 +1 @@
"undefined"!=typeof Prism&&Prism.hooks.add("wrap",(function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)}));

View File

@@ -0,0 +1 @@
{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GACjB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAazE,CAAA"}

View File

@@ -0,0 +1,31 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';
export async function getMachineId() {
const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];
for (const path of paths) {
try {
const result = await fs.readFile(path, { encoding: 'utf8' });
return result.trim();
}
catch (e) {
diag.debug(`error reading machine id: ${e}`);
}
}
return undefined;
}
//# sourceMappingURL=getMachineId-linux.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/runnable-query.ts"],"sourcesContent":["import type { Dialect } from './column-builder.ts';\nimport type { PreparedQuery } from './session.ts';\n\nexport interface RunnableQuery<T, TDialect extends Dialect> {\n\treadonly _: {\n\t\treadonly dialect: TDialect;\n\t\treadonly result: T;\n\t};\n\n\t/** @internal */\n\t_prepare(): PreparedQuery;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"rotate-ccw.js","sources":["../../../src/icons/rotate-ccw.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RotateCcw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAxMmE5IDkgMCAxIDAgOS05IDkuNzUgOS43NSAwIDAgMC02Ljc0IDIuNzRMMyA4IiAvPgogIDxwYXRoIGQ9Ik0zIDN2NWg1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/rotate-ccw\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 RotateCcw = createLucideIcon('RotateCcw', [\n ['path', { d: 'M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8', key: '1357e3' }],\n ['path', { d: 'M3 3v5h5', key: '1xhq8a' }],\n]);\n\nexport default RotateCcw;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAClF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,313 @@
import { expect, expectTypeOf, test } from "vitest";
import { z } from "zod/v4";
test("basic defaults", () => {
expect(z.string().default("default").parse(undefined)).toBe("default");
});
test("default with optional", () => {
const schema = z.string().optional().default("default");
expect(schema.parse(undefined)).toBe("default");
expect(schema.unwrap().parse(undefined)).toBe(undefined);
});
test("default with transform", () => {
const stringWithDefault = z
.string()
.transform((val) => val.toUpperCase())
.default("default");
expect(stringWithDefault.parse(undefined)).toBe("default");
expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
expect(stringWithDefault.unwrap()).toBeInstanceOf(z.ZodPipe);
expect(stringWithDefault.unwrap().in).toBeInstanceOf(z.ZodString);
expect(stringWithDefault.unwrap().out).toBeInstanceOf(z.ZodTransform);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("default on existing optional", () => {
const stringWithDefault = z.string().optional().default("asdf");
expect(stringWithDefault.parse(undefined)).toBe("asdf");
expect(stringWithDefault).toBeInstanceOf(z.ZodDefault);
expect(stringWithDefault.unwrap()).toBeInstanceOf(z.ZodOptional);
expect(stringWithDefault.unwrap().unwrap()).toBeInstanceOf(z.ZodString);
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("optional on default", () => {
const stringWithDefault = z.string().default("asdf").optional();
type inp = z.input<typeof stringWithDefault>;
expectTypeOf<inp>().toEqualTypeOf<string | undefined>();
type out = z.output<typeof stringWithDefault>;
expectTypeOf<out>().toEqualTypeOf<string | undefined>();
expect(stringWithDefault.parse(undefined)).toBe("asdf");
});
// test("complex chain example", () => {
// const complex = z
// .string()
// .default("asdf")
// .transform((val) => val.toUpperCase())
// .default("qwer")
// .unwrap()
// .optional()
// .default("asdfasdf");
// expect(complex.parse(undefined)).toBe("asdfasdf");
// });
test("removeDefault", () => {
const stringWithRemovedDefault = z.string().default("asdf").removeDefault();
type out = z.output<typeof stringWithRemovedDefault>;
expectTypeOf<out>().toEqualTypeOf<string>();
});
test("apply default at output", () => {
const schema = z
.string()
.transform((_) => (Math.random() > 0 ? undefined : _))
.default("asdf");
expect(schema.parse("")).toEqual("asdf");
});
test("nested", () => {
const inner = z.string().default("asdf");
const outer = z.object({ inner }).default({
inner: "qwer",
});
type input = z.input<typeof outer>;
expectTypeOf<input>().toEqualTypeOf<{ inner?: string | undefined } | undefined>();
type out = z.output<typeof outer>;
expectTypeOf<out>().toEqualTypeOf<{ inner: string }>();
expect(outer.parse(undefined)).toEqual({ inner: "qwer" });
expect(outer.parse({})).toEqual({ inner: "asdf" });
expect(outer.parse({ inner: undefined })).toEqual({ inner: "asdf" });
});
test("chained defaults", () => {
const stringWithDefault = z.string().default("inner").default("outer");
const result = stringWithDefault.parse(undefined);
expect(result).toEqual("outer");
});
test("object optionality", () => {
const schema = z.object({
hi: z.string().default("hi"),
});
type schemaInput = z.input<typeof schema>;
type schemaOutput = z.output<typeof schema>;
expectTypeOf<schemaInput>().toEqualTypeOf<{ hi?: string | undefined }>();
expectTypeOf<schemaOutput>().toEqualTypeOf<{ hi: string }>();
expect(schema.parse({})).toEqual({
hi: "hi",
});
});
test("nested prefault/default", () => {
const a = z
.string()
.default("a")
.refine((val) => val.startsWith("a"));
const b = z
.string()
.refine((val) => val.startsWith("b"))
.default("b");
const c = z
.string()
.prefault("c")
.refine((val) => val.startsWith("c"));
const d = z
.string()
.refine((val) => val.startsWith("d"))
.prefault("d");
const obj = z.object({
a,
b,
c,
d,
});
expect(obj.safeParse({ a: "a1", b: "b1", c: "c1", d: "d1" })).toMatchInlineSnapshot(`
{
"data": {
"a": "a1",
"b": "b1",
"c": "c1",
"d": "d1",
},
"success": true,
}
`);
expect(obj.safeParse({ a: "f", b: "f", c: "f", d: "f" })).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"path": [
"a"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"b"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"c"
],
"message": "Invalid input"
},
{
"code": "custom",
"path": [
"d"
],
"message": "Invalid input"
}
]],
"success": false,
}
`);
expect(obj.safeParse({})).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
expect(obj.safeParse({ a: undefined, b: undefined, c: undefined, d: undefined })).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
const obj2 = z.object({
a: a.optional(),
b: b.optional(),
c: c.optional(),
d: d.optional(),
});
expect(obj2.safeParse({ a: undefined, b: undefined, c: undefined, d: undefined })).toMatchInlineSnapshot(`
{
"data": {
"a": "a",
"b": "b",
"c": "c",
"d": "d",
},
"success": true,
}
`);
expect(a.parse(undefined)).toBe("a");
expect(b.parse(undefined)).toBe("b");
expect(c.parse(undefined)).toBe("c");
expect(d.parse(undefined)).toBe("d");
});
test("failing default", () => {
const a = z
.string()
.default("z")
.refine((val) => val.startsWith("a"));
const b = z
.string()
.refine((val) => val.startsWith("b"))
.default("z");
const c = z
.string()
.prefault("z")
.refine((val) => val.startsWith("c"));
const d = z
.string()
.refine((val) => val.startsWith("d"))
.prefault("z");
const obj = z.object({
a,
b,
c,
d,
});
expect(
obj.safeParse({
a: undefined,
b: undefined,
c: undefined,
d: undefined,
}).error!.issues
).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Invalid input",
"path": [
"a",
],
},
{
"code": "custom",
"message": "Invalid input",
"path": [
"c",
],
},
{
"code": "custom",
"message": "Invalid input",
"path": [
"d",
],
},
]
`);
});
test("partial should not clobber defaults", () => {
const objWithDefaults = z.object({
a: z.string().default("defaultA"),
b: z.string().default("defaultB"),
c: z.string().default("defaultC"),
});
const objPartialWithOneRequired = objWithDefaults.partial(); //.required({ a: true });
const test = objPartialWithOneRequired.parse({});
expect(test).toMatchInlineSnapshot(`
{
"a": "defaultA",
"b": "defaultB",
"c": "defaultC",
}
`);
});

View File

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

View File

@@ -0,0 +1,75 @@
import { Client, ContinuousProfiler, Span } from '@sentry/core';
/**
* UIProfiler (Profiling V2):
* Supports two lifecycle modes:
* - 'manual': controlled explicitly via start()/stop()
* - 'trace': automatically runs while there are active sampled root spans
*
* Profiles are emitted as standalone `profile_chunk` envelopes either when:
* - there are no more sampled root spans, or
* - the 60s chunk timer elapses while profiling is running.
*/
export declare class UIProfiler implements ContinuousProfiler<Client> {
private _client;
private _profiler;
private _chunkTimer;
private _profilerId;
private _isRunning;
private _sessionSampled;
private _lifecycleMode;
private _activeRootSpanIds;
private _rootSpanTimeouts;
constructor();
/**
* Initialize the profiler with client, session sampling and lifecycle mode.
*/
initialize(client: Client): void;
/** Starts UI profiling (only effective in 'manual' mode and when sampled). */
start(): void;
/** Stops UI profiling (only effective in 'manual' mode). */
stop(): void;
/** Handle an already-active root span at integration setup time (used only in trace mode). */
notifyRootSpanActive(rootSpan: Span): void;
/**
* Begin profiling if not already running.
*/
private _beginProfiling;
/** End profiling session; final chunk will be collected and sent. */
private _endProfiling;
/** Trace-mode: attach spanStart/spanEnd listeners. */
private _setupTraceLifecycleListeners;
/**
* Resets profiling information from scope and resets running state (used on failure)
*/
private _resetProfilerInfo;
/**
* Clear and reset all per-root-span timeouts.
*/
private _clearAllRootSpanTimeouts;
/** Keep track of root spans and schedule safeguard timeout (trace mode). */
private _registerTraceRootSpan;
/**
* Start a profiler instance if needed.
*/
private _startProfilerInstance;
/**
* Schedule the next 60s chunk while running.
* Each tick collects a chunk and restarts the profiler.
* A chunk should be closed when there are no active root spans anymore OR when the maximum chunk interval is reached.
*/
private _startPeriodicChunking;
/**
* Handle timeout for a specific root span ID to avoid indefinitely running profiler if `spanEnd` never fires.
* If this was the last active root span, collect the current chunk and stop profiling.
*/
private _onRootSpanTimeout;
/**
* Stop current profiler instance, convert profile to chunk & send.
*/
private _collectCurrentChunk;
/**
* Send a profile chunk as a standalone envelope.
*/
private _sendProfileChunk;
}
//# sourceMappingURL=UIProfiler.d.ts.map

View File

@@ -0,0 +1,11 @@
import type { Maybe } from '../jsutils/Maybe';
import type { DocumentNode, OperationDefinitionNode } from '../language/ast';
/**
* Returns an operation AST given a document AST and optionally an operation
* name. If a name is not provided, an operation is only returned if only one is
* provided in the document.
*/
export declare function getOperationAST(
documentAST: DocumentNode,
operationName?: Maybe<string>,
): Maybe<OperationDefinitionNode>;

View File

@@ -0,0 +1,60 @@
import { entityKind } from "../entity.js";
class IndexBuilderOn {
constructor(name, unique) {
this.name = name;
this.unique = unique;
}
static [entityKind] = "SingleStoreIndexBuilderOn";
on(...columns) {
return new IndexBuilder(this.name, columns, this.unique);
}
}
class IndexBuilder {
static [entityKind] = "SingleStoreIndexBuilder";
/** @internal */
config;
constructor(name, columns, unique) {
this.config = {
name,
columns,
unique
};
}
using(using) {
this.config.using = using;
return this;
}
algorythm(algorythm) {
this.config.algorythm = algorythm;
return this;
}
lock(lock) {
this.config.lock = lock;
return this;
}
/** @internal */
build(table) {
return new Index(this.config, table);
}
}
class Index {
static [entityKind] = "SingleStoreIndex";
config;
constructor(config, table) {
this.config = { ...config, table };
}
}
function index(name) {
return new IndexBuilderOn(name, false);
}
function uniqueIndex(name) {
return new IndexBuilderOn(name, true);
}
export {
Index,
IndexBuilder,
IndexBuilderOn,
index,
uniqueIndex
};
//# sourceMappingURL=indexes.js.map

View File

@@ -0,0 +1,179 @@
'use strict';
var fs = require('fs');
var path = require('path');
Object.defineProperty(exports, 'commentRegex', {
get: function getCommentRegex () {
return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
}
});
Object.defineProperty(exports, 'mapFileCommentRegex', {
get: function getMapFileCommentRegex () {
// Matches sourceMappingURL in either // or /* comment styles.
return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
}
});
var decodeBase64;
if (typeof Buffer !== 'undefined') {
if (typeof Buffer.from === 'function') {
decodeBase64 = decodeBase64WithBufferFrom;
} else {
decodeBase64 = decodeBase64WithNewBuffer;
}
} else {
decodeBase64 = decodeBase64WithAtob;
}
function decodeBase64WithBufferFrom(base64) {
return Buffer.from(base64, 'base64').toString();
}
function decodeBase64WithNewBuffer(base64) {
if (typeof value === 'number') {
throw new TypeError('The value to decode must not be of type number.');
}
return new Buffer(base64, 'base64').toString();
}
function decodeBase64WithAtob(base64) {
return decodeURIComponent(escape(atob(base64)));
}
function stripComment(sm) {
return sm.split(',').pop();
}
function readFromFileMap(sm, dir) {
// NOTE: this will only work on the server since it attempts to read the map file
var r = exports.mapFileCommentRegex.exec(sm);
// for some odd reason //# .. captures in 1 and /* .. */ in 2
var filename = r[1] || r[2];
var filepath = path.resolve(dir, filename);
try {
return fs.readFileSync(filepath, 'utf8');
} catch (e) {
throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
}
}
function Converter (sm, opts) {
opts = opts || {};
if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
if (opts.hasComment) sm = stripComment(sm);
if (opts.isEncoded) sm = decodeBase64(sm);
if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
this.sourcemap = sm;
}
Converter.prototype.toJSON = function (space) {
return JSON.stringify(this.sourcemap, null, space);
};
if (typeof Buffer !== 'undefined') {
if (typeof Buffer.from === 'function') {
Converter.prototype.toBase64 = encodeBase64WithBufferFrom;
} else {
Converter.prototype.toBase64 = encodeBase64WithNewBuffer;
}
} else {
Converter.prototype.toBase64 = encodeBase64WithBtoa;
}
function encodeBase64WithBufferFrom() {
var json = this.toJSON();
return Buffer.from(json, 'utf8').toString('base64');
}
function encodeBase64WithNewBuffer() {
var json = this.toJSON();
if (typeof json === 'number') {
throw new TypeError('The json to encode must not be of type number.');
}
return new Buffer(json, 'utf8').toString('base64');
}
function encodeBase64WithBtoa() {
var json = this.toJSON();
return btoa(unescape(encodeURIComponent(json)));
}
Converter.prototype.toComment = function (options) {
var base64 = this.toBase64();
var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
};
// returns copy instead of original
Converter.prototype.toObject = function () {
return JSON.parse(this.toJSON());
};
Converter.prototype.addProperty = function (key, value) {
if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
return this.setProperty(key, value);
};
Converter.prototype.setProperty = function (key, value) {
this.sourcemap[key] = value;
return this;
};
Converter.prototype.getProperty = function (key) {
return this.sourcemap[key];
};
exports.fromObject = function (obj) {
return new Converter(obj);
};
exports.fromJSON = function (json) {
return new Converter(json, { isJSON: true });
};
exports.fromBase64 = function (base64) {
return new Converter(base64, { isEncoded: true });
};
exports.fromComment = function (comment) {
comment = comment
.replace(/^\/\*/g, '//')
.replace(/\*\/$/g, '');
return new Converter(comment, { isEncoded: true, hasComment: true });
};
exports.fromMapFileComment = function (comment, dir) {
return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true });
};
// Finds last sourcemap comment in file or returns null if none was found
exports.fromSource = function (content) {
var m = content.match(exports.commentRegex);
return m ? exports.fromComment(m.pop()) : null;
};
// Finds last sourcemap comment in file or returns null if none was found
exports.fromMapFileSource = function (content, dir) {
var m = content.match(exports.mapFileCommentRegex);
return m ? exports.fromMapFileComment(m.pop(), dir) : null;
};
exports.removeComments = function (src) {
return src.replace(exports.commentRegex, '');
};
exports.removeMapFileComments = function (src) {
return src.replace(exports.mapFileCommentRegex, '');
};
exports.generateMapFileComment = function (file, options) {
var data = 'sourceMappingURL=' + file;
return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
};

View File

@@ -0,0 +1,113 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
const ModifyClientFunctionContext = /*#__PURE__*/React.createContext({
addClientFunction: () => null,
removeClientFunction: () => null
});
const ClientFunctionsContext = /*#__PURE__*/React.createContext({});
export const ClientFunctionProvider = t0 => {
const $ = _c(6);
const {
children
} = t0;
let t1;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t1 = {};
$[0] = t1;
} else {
t1 = $[0];
}
const [clientFunctions, setClientFunctions] = React.useState(t1);
let t2;
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
t2 = args => {
setClientFunctions(state => {
const newState = {
...state
};
newState[args.key] = args.func;
return newState;
});
};
$[1] = t2;
} else {
t2 = $[1];
}
const addClientFunction = t2;
let t3;
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
t3 = args_0 => {
setClientFunctions(state_0 => {
const newState_0 = {
...state_0
};
delete newState_0[args_0.key];
return newState_0;
});
};
$[2] = t3;
} else {
t3 = $[2];
}
const removeClientFunction = t3;
let t4;
if ($[3] !== children || $[4] !== clientFunctions) {
t4 = _jsx(ModifyClientFunctionContext, {
value: {
addClientFunction,
removeClientFunction
},
children: _jsx(ClientFunctionsContext, {
value: clientFunctions,
children
})
});
$[3] = children;
$[4] = clientFunctions;
$[5] = t4;
} else {
t4 = $[5];
}
return t4;
};
export const useAddClientFunction = (key, func) => {
const $ = _c(6);
const {
addClientFunction,
removeClientFunction
} = React.use(ModifyClientFunctionContext);
let t0;
let t1;
if ($[0] !== addClientFunction || $[1] !== func || $[2] !== key || $[3] !== removeClientFunction) {
t0 = () => {
addClientFunction({
func,
key
});
return () => {
removeClientFunction({
func,
key
});
};
};
t1 = [func, key, addClientFunction, removeClientFunction];
$[0] = addClientFunction;
$[1] = func;
$[2] = key;
$[3] = removeClientFunction;
$[4] = t0;
$[5] = t1;
} else {
t0 = $[4];
t1 = $[5];
}
React.useEffect(t0, t1);
};
export const useClientFunctions = () => {
return React.use(ClientFunctionsContext);
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,41 @@
{
"name": "@lexical/offset",
"description": "This package contains selection offset helpers for Lexical.",
"keywords": [
"lexical",
"editor",
"rich-text",
"offset"
],
"license": "MIT",
"version": "0.35.0",
"main": "LexicalOffset.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/facebook/lexical",
"directory": "packages/lexical-offset"
},
"module": "LexicalOffset.mjs",
"sideEffects": false,
"exports": {
".": {
"import": {
"types": "./index.d.ts",
"development": "./LexicalOffset.dev.mjs",
"production": "./LexicalOffset.prod.mjs",
"node": "./LexicalOffset.node.mjs",
"default": "./LexicalOffset.mjs"
},
"require": {
"types": "./index.d.ts",
"development": "./LexicalOffset.dev.js",
"production": "./LexicalOffset.prod.js",
"default": "./LexicalOffset.js"
}
}
},
"dependencies": {
"lexical": "0.35.0"
}
}

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