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,624 @@
(() => {
var _window$dateFns;function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];return arr2;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/bg/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u043E\u0442 \u0441\u0435\u043A\u0443\u043D\u0434\u0430",
other: "\u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u043E\u0442 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0438"
},
xSeconds: {
one: "1 \u0441\u0435\u043A\u0443\u043D\u0434\u0430",
other: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0438"
},
halfAMinute: "\u043F\u043E\u043B\u043E\u0432\u0438\u043D \u043C\u0438\u043D\u0443\u0442\u0430",
lessThanXMinutes: {
one: "\u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u043E\u0442 \u043C\u0438\u043D\u0443\u0442\u0430",
other: "\u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u043E\u0442 {{count}} \u043C\u0438\u043D\u0443\u0442\u0438"
},
xMinutes: {
one: "1 \u043C\u0438\u043D\u0443\u0442\u0430",
other: "{{count}} \u043C\u0438\u043D\u0443\u0442\u0438"
},
aboutXHours: {
one: "\u043E\u043A\u043E\u043B\u043E \u0447\u0430\u0441",
other: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0447\u0430\u0441\u0430"
},
xHours: {
one: "1 \u0447\u0430\u0441",
other: "{{count}} \u0447\u0430\u0441\u0430"
},
xDays: {
one: "1 \u0434\u0435\u043D",
other: "{{count}} \u0434\u043D\u0438"
},
aboutXWeeks: {
one: "\u043E\u043A\u043E\u043B\u043E \u0441\u0435\u0434\u043C\u0438\u0446\u0430",
other: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0441\u0435\u0434\u043C\u0438\u0446\u0438"
},
xWeeks: {
one: "1 \u0441\u0435\u0434\u043C\u0438\u0446\u0430",
other: "{{count}} \u0441\u0435\u0434\u043C\u0438\u0446\u0438"
},
aboutXMonths: {
one: "\u043E\u043A\u043E\u043B\u043E \u043C\u0435\u0441\u0435\u0446",
other: "\u043E\u043A\u043E\u043B\u043E {{count}} \u043C\u0435\u0441\u0435\u0446\u0430"
},
xMonths: {
one: "1 \u043C\u0435\u0441\u0435\u0446",
other: "{{count}} \u043C\u0435\u0441\u0435\u0446\u0430"
},
aboutXYears: {
one: "\u043E\u043A\u043E\u043B\u043E \u0433\u043E\u0434\u0438\u043D\u0430",
other: "\u043E\u043A\u043E\u043B\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0438"
},
xYears: {
one: "1 \u0433\u043E\u0434\u0438\u043D\u0430",
other: "{{count}} \u0433\u043E\u0434\u0438\u043D\u0438"
},
overXYears: {
one: "\u043D\u0430\u0434 \u0433\u043E\u0434\u0438\u043D\u0430",
other: "\u043D\u0430\u0434 {{count}} \u0433\u043E\u0434\u0438\u043D\u0438"
},
almostXYears: {
one: "\u043F\u043E\u0447\u0442\u0438 \u0433\u043E\u0434\u0438\u043D\u0430",
other: "\u043F\u043E\u0447\u0442\u0438 {{count}} \u0433\u043E\u0434\u0438\u043D\u0438"
}
};
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 "\u0441\u043B\u0435\u0434 " + result;
} else {
return "\u043F\u0440\u0435\u0434\u0438 " + 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/bg/_lib/formatLong.js
var dateFormats = {
full: "EEEE, dd MMMM yyyy",
long: "dd MMMM yyyy",
medium: "dd MMM yyyy",
short: "dd.MM.yyyy"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "H:mm"
};
var dateTimeFormats = {
any: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any"
})
};
// lib/constants.js
var daysInWeek = 7;
var daysInYear = 365.2425;
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
var minTime = -maxTime;
var millisecondsInWeek = 604800000;
var millisecondsInDay = 86400000;
var millisecondsInMinute = 60000;
var millisecondsInHour = 3600000;
var millisecondsInSecond = 1000;
var minutesInYear = 525600;
var minutesInMonth = 43200;
var minutesInDay = 1440;
var minutesInHour = 60;
var monthsInQuarter = 3;
var monthsInYear = 12;
var quartersInYear = 4;
var secondsInHour = 3600;
var secondsInMinute = 60;
var secondsInDay = secondsInHour * 24;
var secondsInWeek = secondsInDay * 7;
var secondsInYear = secondsInDay * daysInYear;
var secondsInMonth = secondsInYear / 12;
var secondsInQuarter = secondsInMonth * 3;
var constructFromSymbol = Symbol.for("constructDateFrom");
// lib/constructFrom.js
function constructFrom(date, value) {
if (typeof date === "function")
return date(value);
if (date && _typeof(date) === "object" && constructFromSymbol in date)
return date[constructFromSymbol](value);
if (date instanceof Date)
return new date.constructor(value);
return new Date(value);
}
// lib/_lib/normalizeDates.js
function normalizeDates(context) {for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {dates[_key - 1] = arguments[_key];}
var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";}));
return dates.map(normalize);
}
// lib/_lib/defaultOptions.js
function getDefaultOptions() {
return defaultOptions;
}
function setDefaultOptions(newOptions) {
defaultOptions = newOptions;
}
var defaultOptions = {};
// lib/toDate.js
function toDate(argument, context) {
return constructFrom(context || argument, argument);
}
// lib/startOfWeek.js
function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions3$loca;
var defaultOptions3 = getDefaultOptions();
var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions3.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions3$loca = defaultOptions3.locale) === null || _defaultOptions3$loca === void 0 || (_defaultOptions3$loca = _defaultOptions3$loca.options) === null || _defaultOptions3$loca === void 0 ? void 0 : _defaultOptions3$loca.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0;
var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in);
var day = _date.getDay();
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
_date.setDate(_date.getDate() - diff);
_date.setHours(0, 0, 0, 0);
return _date;
}
// lib/isSameWeek.js
function isSameWeek(laterDate, earlierDate, options) {
var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1];
return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
}
// lib/locale/bg/_lib/formatRelative.js
function lastWeek(day) {
var weekday = weekdays[day];
switch (day) {
case 0:
case 3:
case 6:
return "'\u043C\u0438\u043D\u0430\u043B\u0430\u0442\u0430 " + weekday + " \u0432' p";
case 1:
case 2:
case 4:
case 5:
return "'\u043C\u0438\u043D\u0430\u043B\u0438\u044F " + weekday + " \u0432' p";
}
}
function thisWeek(day) {
var weekday = weekdays[day];
if (day === 2) {
return "'\u0432\u044A\u0432 " + weekday + " \u0432' p";
} else {
return "'\u0432 " + weekday + " \u0432' p";
}
}
function nextWeek(day) {
var weekday = weekdays[day];
switch (day) {
case 0:
case 3:
case 6:
return "'\u0441\u043B\u0435\u0434\u0432\u0430\u0449\u0430\u0442\u0430 " + weekday + " \u0432' p";
case 1:
case 2:
case 4:
case 5:
return "'\u0441\u043B\u0435\u0434\u0432\u0430\u0449\u0438\u044F " + weekday + " \u0432' p";
}
}
var weekdays = [
"\u043D\u0435\u0434\u0435\u043B\u044F",
"\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A",
"\u0432\u0442\u043E\u0440\u043D\u0438\u043A",
"\u0441\u0440\u044F\u0434\u0430",
"\u0447\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A",
"\u043F\u0435\u0442\u044A\u043A",
"\u0441\u044A\u0431\u043E\u0442\u0430"];
var lastWeekFormatToken = function lastWeekFormatToken(dirtyDate, baseDate, options) {
var date = toDate(dirtyDate);
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
};
var nextWeekFormatToken = function nextWeekFormatToken(dirtyDate, baseDate, options) {
var date = toDate(dirtyDate);
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
};
var formatRelativeLocale = {
lastWeek: lastWeekFormatToken,
yesterday: "'\u0432\u0447\u0435\u0440\u0430 \u0432' p",
today: "'\u0434\u043D\u0435\u0441 \u0432' p",
tomorrow: "'\u0443\u0442\u0440\u0435 \u0432' p",
nextWeek: nextWeekFormatToken,
other: "P"
};
var formatRelative = function formatRelative(token, date, baseDate, options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/bg/_lib/localize.js
function isFeminine(unit) {
return unit === "year" || unit === "week" || unit === "minute" || unit === "second";
}
function isNeuter(unit) {
return unit === "quarter";
}
function numberWithSuffix(number, unit, masculine, feminine, neuter) {
var suffix = isNeuter(unit) ? neuter : isFeminine(unit) ? feminine : masculine;
return number + "-" + suffix;
}
var eraValues = {
narrow: ["\u043F\u0440.\u043D.\u0435.", "\u043D.\u0435."],
abbreviated: ["\u043F\u0440\u0435\u0434\u0438 \u043D. \u0435.", "\u043D. \u0435."],
wide: ["\u043F\u0440\u0435\u0434\u0438 \u043D\u043E\u0432\u0430\u0442\u0430 \u0435\u0440\u0430", "\u043D\u043E\u0432\u0430\u0442\u0430 \u0435\u0440\u0430"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-\u0432\u043E \u0442\u0440\u0438\u043C\u0435\u0441.", "2-\u0440\u043E \u0442\u0440\u0438\u043C\u0435\u0441.", "3-\u0442\u043E \u0442\u0440\u0438\u043C\u0435\u0441.", "4-\u0442\u043E \u0442\u0440\u0438\u043C\u0435\u0441."],
wide: [
"1-\u0432\u043E \u0442\u0440\u0438\u043C\u0435\u0441\u0435\u0447\u0438\u0435",
"2-\u0440\u043E \u0442\u0440\u0438\u043C\u0435\u0441\u0435\u0447\u0438\u0435",
"3-\u0442\u043E \u0442\u0440\u0438\u043C\u0435\u0441\u0435\u0447\u0438\u0435",
"4-\u0442\u043E \u0442\u0440\u0438\u043C\u0435\u0441\u0435\u0447\u0438\u0435"]
};
var monthValues = {
abbreviated: [
"\u044F\u043D\u0443",
"\u0444\u0435\u0432",
"\u043C\u0430\u0440",
"\u0430\u043F\u0440",
"\u043C\u0430\u0439",
"\u044E\u043D\u0438",
"\u044E\u043B\u0438",
"\u0430\u0432\u0433",
"\u0441\u0435\u043F",
"\u043E\u043A\u0442",
"\u043D\u043E\u0435",
"\u0434\u0435\u043A"],
wide: [
"\u044F\u043D\u0443\u0430\u0440\u0438",
"\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438",
"\u043C\u0430\u0440\u0442",
"\u0430\u043F\u0440\u0438\u043B",
"\u043C\u0430\u0439",
"\u044E\u043D\u0438",
"\u044E\u043B\u0438",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043F\u0442\u0435\u043C\u0432\u0440\u0438",
"\u043E\u043A\u0442\u043E\u043C\u0432\u0440\u0438",
"\u043D\u043E\u0435\u043C\u0432\u0440\u0438",
"\u0434\u0435\u043A\u0435\u043C\u0432\u0440\u0438"]
};
var dayValues = {
narrow: ["\u041D", "\u041F", "\u0412", "\u0421", "\u0427", "\u041F", "\u0421"],
short: ["\u043D\u0434", "\u043F\u043D", "\u0432\u0442", "\u0441\u0440", "\u0447\u0442", "\u043F\u0442", "\u0441\u0431"],
abbreviated: ["\u043D\u0435\u0434", "\u043F\u043E\u043D", "\u0432\u0442\u043E", "\u0441\u0440\u044F", "\u0447\u0435\u0442", "\u043F\u0435\u0442", "\u0441\u044A\u0431"],
wide: [
"\u043D\u0435\u0434\u0435\u043B\u044F",
"\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A",
"\u0432\u0442\u043E\u0440\u043D\u0438\u043A",
"\u0441\u0440\u044F\u0434\u0430",
"\u0447\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A",
"\u043F\u0435\u0442\u044A\u043A",
"\u0441\u044A\u0431\u043E\u0442\u0430"]
};
var dayPeriodValues = {
wide: {
am: "\u043F\u0440\u0435\u0434\u0438 \u043E\u0431\u044F\u0434",
pm: "\u0441\u043B\u0435\u0434 \u043E\u0431\u044F\u0434",
midnight: "\u0432 \u043F\u043E\u043B\u0443\u043D\u043E\u0449",
noon: "\u043D\u0430 \u043E\u0431\u044F\u0434",
morning: "\u0441\u0443\u0442\u0440\u0438\u043D\u0442\u0430",
afternoon: "\u0441\u043B\u0435\u0434\u043E\u0431\u0435\u0434",
evening: "\u0432\u0435\u0447\u0435\u0440\u0442\u0430",
night: "\u043F\u0440\u0435\u0437 \u043D\u043E\u0449\u0442\u0430"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = options === null || options === void 0 ? void 0 : options.unit;
if (number === 0) {
return numberWithSuffix(0, unit, "\u0435\u0432", "\u0435\u0432\u0430", "\u0435\u0432\u043E");
} else if (number % 1000 === 0) {
return numberWithSuffix(number, unit, "\u0435\u043D", "\u043D\u0430", "\u043D\u043E");
} else if (number % 100 === 0) {
return numberWithSuffix(number, unit, "\u0442\u0435\u043D", "\u0442\u043D\u0430", "\u0442\u043D\u043E");
}
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return numberWithSuffix(number, unit, "\u0432\u0438", "\u0432\u0430", "\u0432\u043E");
case 2:
return numberWithSuffix(number, unit, "\u0440\u0438", "\u0440\u0430", "\u0440\u043E");
case 7:
case 8:
return numberWithSuffix(number, unit, "\u043C\u0438", "\u043C\u0430", "\u043C\u043E");
}
}
return numberWithSuffix(number, unit, "\u0442\u0438", "\u0442\u0430", "\u0442\u043E");
};
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"
})
};
// 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/bg/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^((пр)?н\.?\s?е\.?)/i,
abbreviated: /^((пр)?н\.?\s?е\.?)/i,
wide: /^(преди новата ера|новата ера|нова ера)/i
};
var parseEraPatterns = {
any: [/^п/i, /^н/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234](-?[врт]?o?)? тримес.?/i,
wide: /^[1234](-?[врт]?о?)? тримесечие/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchDayPatterns = {
narrow: /^[нпвсч]/i,
short: /^(нд|пн|вт|ср|чт|пт|сб)/i,
abbreviated: /^(нед|пон|вто|сря|чет|пет|съб)/i,
wide: /^(неделя|понеделник|вторник|сряда|четвъртък|петък|събота)/i
};
var parseDayPatterns = {
narrow: [/^н/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i],
any: [/^н[ед]/i, /^п[он]/i, /^вт/i, /^ср/i, /^ч[ет]/i, /^п[ет]/i, /^с[ъб]/i]
};
var matchMonthPatterns = {
abbreviated: /^(яну|фев|мар|апр|май|юни|юли|авг|сеп|окт|ное|дек)/i,
wide: /^(януари|февруари|март|април|май|юни|юли|август|септември|октомври|ноември|декември)/i
};
var parseMonthPatterns = {
any: [
/^я/i,
/^ф/i,
/^мар/i,
/^ап/i,
/^май/i,
/^юн/i,
/^юл/i,
/^ав/i,
/^се/i,
/^окт/i,
/^но/i,
/^де/i]
};
var matchDayPeriodPatterns = {
any: /^(преди о|след о|в по|на о|през|веч|сут|следо)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^преди о/i,
pm: /^след о/i,
midnight: /^в пол/i,
noon: /^на об/i,
morning: /^сут/i,
afternoon: /^следо/i,
evening: /^веч/i,
night: /^през н/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/bg.js
var bg = {
code: "bg",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/bg/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), {}, {
bg: bg }) });
//# debugId=E413392A6CEEEDDD64756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,6 @@
import { GraphQLScalarType } from 'graphql';
import { GraphQLNonNegativeIntConfig } from './NonNegativeInt.js';
const GraphQLUnsignedIntConfig = /*#__PURE__*/ Object.assign({}, GraphQLNonNegativeIntConfig, {
name: 'UnsignedInt',
});
export const GraphQLUnsignedInt = /*#__PURE__*/ new GraphQLScalarType(GraphQLUnsignedIntConfig);

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/mysql-core/columns/time.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumn, MySqlColumnBuilder } from './common.ts';\n\nexport type MySqlTimeBuilderInitial<TName extends string> = MySqlTimeBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'MySqlTime';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n}>;\n\nexport class MySqlTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlTime'>> extends MySqlColumnBuilder<\n\tT,\n\tTimeConfig\n> {\n\tstatic override readonly [entityKind]: string = 'MySqlTimeBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\tconfig: TimeConfig | undefined,\n\t) {\n\t\tsuper(name, 'string', 'MySqlTime');\n\t\tthis.config.fsp = config?.fsp;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlTime<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlTime<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlTime<\n\tT extends ColumnBaseConfig<'string', 'MySqlTime'>,\n> extends MySqlColumn<T, TimeConfig> {\n\tstatic override readonly [entityKind]: string = 'MySqlTime';\n\n\treadonly fsp: number | undefined = this.config.fsp;\n\n\tgetSQLType(): string {\n\t\tconst precision = this.fsp === undefined ? '' : `(${this.fsp})`;\n\t\treturn `time${precision}`;\n\t}\n}\n\nexport type TimeConfig = {\n\tfsp?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n};\n\nexport function time(): MySqlTimeBuilderInitial<''>;\nexport function time(\n\tconfig?: TimeConfig,\n): MySqlTimeBuilderInitial<''>;\nexport function time<TName extends string>(\n\tname: TName,\n\tconfig?: TimeConfig,\n): MySqlTimeBuilderInitial<TName>;\nexport function time(a?: string | TimeConfig, b?: TimeConfig) {\n\tconst { name, config } = getColumnNameAndConfig<TimeConfig>(a, b);\n\treturn new MySqlTimeBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,aAAa,0BAA0B;AAWzC,MAAM,yBAAmF,mBAG9F;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,YACC,MACA,QACC;AACD,UAAM,MAAM,UAAU,WAAW;AACjC,SAAK,OAAO,MAAM,QAAQ;AAAA,EAC3B;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAEH,YAA2B;AAAA,EACpC,QAA0B,UAAU,IAAY;AAAA,EAEvC,MAA0B,KAAK,OAAO;AAAA,EAE/C,aAAqB;AACpB,UAAM,YAAY,KAAK,QAAQ,SAAY,KAAK,IAAI,KAAK,GAAG;AAC5D,WAAO,OAAO,SAAS;AAAA,EACxB;AACD;AAcO,SAAS,KAAK,GAAyB,GAAgB;AAC7D,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAmC,GAAG,CAAC;AAChE,SAAO,IAAI,iBAAiB,MAAM,MAAM;AACzC;","names":[]}

View File

@@ -0,0 +1,345 @@
import { StringReader, StringWriter } from './strings';
import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';
const EMPTY: any[] = [];
type Line = number;
type Column = number;
type Kind = number;
type Name = number;
type Var = number;
type SourcesIndex = number;
type ScopesIndex = number;
type Mix<A, B, O> = (A & O) | (B & O);
export type OriginalScope = Mix<
[Line, Column, Line, Column, Kind],
[Line, Column, Line, Column, Kind, Name],
{ vars: Var[] }
>;
export type GeneratedRange = Mix<
[Line, Column, Line, Column],
[Line, Column, Line, Column, SourcesIndex, ScopesIndex],
{
callsite: CallSite | null;
bindings: Binding[];
isScope: boolean;
}
>;
export type CallSite = [SourcesIndex, Line, Column];
type Binding = BindingExpressionRange[];
export type BindingExpressionRange = [Name] | [Name, Line, Column];
export function decodeOriginalScopes(input: string): OriginalScope[] {
const { length } = input;
const reader = new StringReader(input);
const scopes: OriginalScope[] = [];
const stack: OriginalScope[] = [];
let line = 0;
for (; reader.pos < length; reader.pos++) {
line = decodeInteger(reader, line);
const column = decodeInteger(reader, 0);
if (!hasMoreVlq(reader, length)) {
const last = stack.pop()!;
last[2] = line;
last[3] = column;
continue;
}
const kind = decodeInteger(reader, 0);
const fields = decodeInteger(reader, 0);
const hasName = fields & 0b0001;
const scope: OriginalScope = (
hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]
) as OriginalScope;
let vars: Var[] = EMPTY;
if (hasMoreVlq(reader, length)) {
vars = [];
do {
const varsIndex = decodeInteger(reader, 0);
vars.push(varsIndex);
} while (hasMoreVlq(reader, length));
}
scope.vars = vars;
scopes.push(scope);
stack.push(scope);
}
return scopes;
}
export function encodeOriginalScopes(scopes: OriginalScope[]): string {
const writer = new StringWriter();
for (let i = 0; i < scopes.length; ) {
i = _encodeOriginalScopes(scopes, i, writer, [0]);
}
return writer.flush();
}
function _encodeOriginalScopes(
scopes: OriginalScope[],
index: number,
writer: StringWriter,
state: [
number, // GenColumn
],
): number {
const scope = scopes[index];
const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
if (index > 0) writer.write(comma);
state[0] = encodeInteger(writer, startLine, state[0]);
encodeInteger(writer, startColumn, 0);
encodeInteger(writer, kind, 0);
const fields = scope.length === 6 ? 0b0001 : 0;
encodeInteger(writer, fields, 0);
if (scope.length === 6) encodeInteger(writer, scope[5], 0);
for (const v of vars) {
encodeInteger(writer, v, 0);
}
for (index++; index < scopes.length; ) {
const next = scopes[index];
const { 0: l, 1: c } = next;
if (l > endLine || (l === endLine && c >= endColumn)) {
break;
}
index = _encodeOriginalScopes(scopes, index, writer, state);
}
writer.write(comma);
state[0] = encodeInteger(writer, endLine, state[0]);
encodeInteger(writer, endColumn, 0);
return index;
}
export function decodeGeneratedRanges(input: string): GeneratedRange[] {
const { length } = input;
const reader = new StringReader(input);
const ranges: GeneratedRange[] = [];
const stack: GeneratedRange[] = [];
let genLine = 0;
let definitionSourcesIndex = 0;
let definitionScopeIndex = 0;
let callsiteSourcesIndex = 0;
let callsiteLine = 0;
let callsiteColumn = 0;
let bindingLine = 0;
let bindingColumn = 0;
do {
const semi = reader.indexOf(';');
let genColumn = 0;
for (; reader.pos < semi; reader.pos++) {
genColumn = decodeInteger(reader, genColumn);
if (!hasMoreVlq(reader, semi)) {
const last = stack.pop()!;
last[2] = genLine;
last[3] = genColumn;
continue;
}
const fields = decodeInteger(reader, 0);
const hasDefinition = fields & 0b0001;
const hasCallsite = fields & 0b0010;
const hasScope = fields & 0b0100;
let callsite: CallSite | null = null;
let bindings: Binding[] = EMPTY;
let range: GeneratedRange;
if (hasDefinition) {
const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
definitionScopeIndex = decodeInteger(
reader,
definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,
);
definitionSourcesIndex = defSourcesIndex;
range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;
} else {
range = [genLine, genColumn, 0, 0] as GeneratedRange;
}
range.isScope = !!hasScope;
if (hasCallsite) {
const prevCsi = callsiteSourcesIndex;
const prevLine = callsiteLine;
callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
const sameSource = prevCsi === callsiteSourcesIndex;
callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
callsiteColumn = decodeInteger(
reader,
sameSource && prevLine === callsiteLine ? callsiteColumn : 0,
);
callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
}
range.callsite = callsite;
if (hasMoreVlq(reader, semi)) {
bindings = [];
do {
bindingLine = genLine;
bindingColumn = genColumn;
const expressionsCount = decodeInteger(reader, 0);
let expressionRanges: BindingExpressionRange[];
if (expressionsCount < -1) {
expressionRanges = [[decodeInteger(reader, 0)]];
for (let i = -1; i > expressionsCount; i--) {
const prevBl = bindingLine;
bindingLine = decodeInteger(reader, bindingLine);
bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
const expression = decodeInteger(reader, 0);
expressionRanges.push([expression, bindingLine, bindingColumn]);
}
} else {
expressionRanges = [[expressionsCount]];
}
bindings.push(expressionRanges);
} while (hasMoreVlq(reader, semi));
}
range.bindings = bindings;
ranges.push(range);
stack.push(range);
}
genLine++;
reader.pos = semi + 1;
} while (reader.pos < length);
return ranges;
}
export function encodeGeneratedRanges(ranges: GeneratedRange[]): string {
if (ranges.length === 0) return '';
const writer = new StringWriter();
for (let i = 0; i < ranges.length; ) {
i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
}
return writer.flush();
}
function _encodeGeneratedRanges(
ranges: GeneratedRange[],
index: number,
writer: StringWriter,
state: [
number, // GenLine
number, // GenColumn
number, // DefSourcesIndex
number, // DefScopesIndex
number, // CallSourcesIndex
number, // CallLine
number, // CallColumn
],
): number {
const range = ranges[index];
const {
0: startLine,
1: startColumn,
2: endLine,
3: endColumn,
isScope,
callsite,
bindings,
} = range;
if (state[0] < startLine) {
catchupLine(writer, state[0], startLine);
state[0] = startLine;
state[1] = 0;
} else if (index > 0) {
writer.write(comma);
}
state[1] = encodeInteger(writer, range[1], state[1]);
const fields =
(range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);
encodeInteger(writer, fields, 0);
if (range.length === 6) {
const { 4: sourcesIndex, 5: scopesIndex } = range;
if (sourcesIndex !== state[2]) {
state[3] = 0;
}
state[2] = encodeInteger(writer, sourcesIndex, state[2]);
state[3] = encodeInteger(writer, scopesIndex, state[3]);
}
if (callsite) {
const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;
if (sourcesIndex !== state[4]) {
state[5] = 0;
state[6] = 0;
} else if (callLine !== state[5]) {
state[6] = 0;
}
state[4] = encodeInteger(writer, sourcesIndex, state[4]);
state[5] = encodeInteger(writer, callLine, state[5]);
state[6] = encodeInteger(writer, callColumn, state[6]);
}
if (bindings) {
for (const binding of bindings) {
if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
const expression = binding[0][0];
encodeInteger(writer, expression, 0);
let bindingStartLine = startLine;
let bindingStartColumn = startColumn;
for (let i = 1; i < binding.length; i++) {
const expRange = binding[i];
bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);
bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);
encodeInteger(writer, expRange[0]!, 0);
}
}
}
for (index++; index < ranges.length; ) {
const next = ranges[index];
const { 0: l, 1: c } = next;
if (l > endLine || (l === endLine && c >= endColumn)) {
break;
}
index = _encodeGeneratedRanges(ranges, index, writer, state);
}
if (state[0] < endLine) {
catchupLine(writer, state[0], endLine);
state[0] = endLine;
state[1] = 0;
} else {
writer.write(comma);
}
state[1] = encodeInteger(writer, endColumn, state[1]);
return index;
}
function catchupLine(writer: StringWriter, lastLine: number, line: number) {
do {
writer.write(semicolon);
} while (++lastLine < line);
}

View File

@@ -0,0 +1,19 @@
/**
* @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 Gavel = createLucideIcon("Gavel", [
["path", { d: "m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8", key: "15492f" }],
["path", { d: "m16 16 6-6", key: "vzrcl6" }],
["path", { d: "m8 8 6-6", key: "18bi4p" }],
["path", { d: "m9 7 8 8", key: "5jnvq1" }],
["path", { d: "m21 11-8-8", key: "z4y7zo" }]
]);
export { Gavel as default };
//# sourceMappingURL=gavel.js.map

View File

@@ -0,0 +1,24 @@
import { DirectusActivity } from "../../../schema/activity.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/activity.d.ts
type ReadActivityOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusActivity<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Returns a list of activity actions.
* @param query The query parameters
* @returns An array of up to limit activity objects. If no items are available, data will be an empty array.
*/
declare const readActivities: <Schema, const TQuery extends Query<Schema, DirectusActivity<Schema>>>(query?: TQuery) => RestCommand<ReadActivityOutput<Schema, TQuery>[], Schema>;
/**
* Returns a single activity action by primary key.
* @param key The primary key of the activity
* @param query The query parameters
* @returns Returns an activity object if a valid identifier was provided.
* @throws Will throw if key is empty
*/
declare const readActivity: <Schema, const TQuery extends Query<Schema, DirectusActivity<Schema>>>(key: DirectusActivity<Schema>["id"], query?: TQuery) => RestCommand<ReadActivityOutput<Schema, TQuery>, Schema>;
//#endregion
export { ReadActivityOutput, readActivities, readActivity };
//# sourceMappingURL=activity.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["useWindowInfo","WindowInfoProvider"],"sources":["../../../src/elements/WindowInfo/index.tsx"],"sourcesContent":["'use client'\nimport { useWindowInfo, WindowInfoProvider } from '@faceless-ui/window-info'\nexport { useWindowInfo, WindowInfoProvider }\n"],"mappings":"AAAA;;AACA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ;AAClD,SAASD,aAAa,EAAEC,kBAAkB","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getExternalFile.d.ts","sourceRoot":"","sources":["../../src/uploads/getExternalFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAM9D,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,cAAc,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,eAAe,gCAAuC,IAAI,KAAG,OAAO,CAAC,IAAI,CAyFrF,CAAA"}

View File

@@ -0,0 +1,43 @@
import { Context, TextMapGetter, TextMapSetter } from '@opentelemetry/api';
import { W3CBaggagePropagator } from '@opentelemetry/core';
import { Client, continueTrace, DynamicSamplingContext, Scope } from '@sentry/core';
/**
* Injects and extracts `sentry-trace` and `baggage` headers from carriers.
*/
export declare class SentryPropagator extends W3CBaggagePropagator {
/** A map of URLs that have already been checked for if they match tracePropagationTargets. */
private _urlMatchesTargetsMap;
constructor();
/**
* @inheritDoc
*/
inject(context: Context, carrier: unknown, setter: TextMapSetter): void;
/**
* @inheritDoc
*/
extract(context: Context, carrier: unknown, getter: TextMapGetter): Context;
/**
* @inheritDoc
*/
fields(): string[];
}
export { shouldPropagateTraceForUrl } from '@sentry/core';
/**
* Get propagation injection data for the given context.
* The additional options can be passed to override the scope and client that is otherwise derived from the context.
*/
export declare function getInjectionData(context: Context, options?: {
scope?: Scope;
client?: Client;
}): {
dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined;
traceId: string | undefined;
spanId: string | undefined;
sampled: boolean | undefined;
};
/**
* Takes trace strings and propagates them as a remote active span.
* This should be used in addition to `continueTrace` in OTEL-powered environments.
*/
export declare function continueTraceAsRemoteSpan<T>(ctx: Context, options: Parameters<typeof continueTrace>[0], callback: () => T): T;
//# sourceMappingURL=propagator.d.ts.map

View File

@@ -0,0 +1,28 @@
export const RANGE_EMPTY = 2
export const RANGE_LB_INC = 4
export const RANGE_UB_INC = 8
export const RANGE_LB_INF = 16
export const RANGE_UB_INF = 32
export class Range<T> {
constructor(lower: T | null, upper: T | null, mask: number);
lower: T | null;
upper: T | null;
hasMask (flag: number): boolean;
isEmpty (): boolean;
isBounded (): boolean;
isLowerBoundClosed (): boolean;
isUpperBoundClosed (): boolean;
hasLowerBound (): boolean;
hasUpperBound (): boolean;
containsPoint (point: T): boolean;
containsRange (range: Range<T>): boolean;
toPostgres (prepareValue: (value: any) => string): string;
}
export function parse(input: string): Range<string>;
export function parse<T>(source: string, transform: (value: string) => T): Range<T>;
export function serialize<T>(range: Range<T>): string;
export function serialize<T>(range: Range<T>, format: (value: T) => string): string;

View File

@@ -0,0 +1,2 @@
export * from "./array.js";
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,44 @@
Prism.languages.twig = {
'comment': /^\{#[\s\S]*?#\}$/,
'tag-name': {
pattern: /(^\{%-?\s*)\w+/,
lookbehind: true,
alias: 'keyword'
},
'delimiter': {
pattern: /^\{[{%]-?|-?[%}]\}$/,
alias: 'punctuation'
},
'string': {
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
inside: {
'punctuation': /^['"]|['"]$/
}
},
'keyword': /\b(?:even|if|odd)\b/,
'boolean': /\b(?:false|null|true)\b/,
'number': /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,
'operator': [
{
pattern: /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,
lookbehind: true
},
/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/
],
'punctuation': /[()\[\]{}:.,]/
};
Prism.hooks.add('before-tokenize', function (env) {
if (env.language !== 'twig') {
return;
}
var pattern = /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g;
Prism.languages['markup-templating'].buildPlaceholders(env, 'twig', pattern);
});
Prism.hooks.add('after-tokenize', function (env) {
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'twig');
});

View File

@@ -0,0 +1,95 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
const baseClass = 'simple-table';
export const SimpleTable = ({
appearance,
className,
headerCells: headers,
tableRows: rows
}) => {
return /*#__PURE__*/_jsx("div", {
className: [className, baseClass, appearance && `${baseClass}--appearance-${appearance}`].filter(Boolean).join(' '),
children: /*#__PURE__*/_jsxs("table", {
cellPadding: 0,
cellSpacing: 0,
className: `${baseClass}__table`,
children: [/*#__PURE__*/_jsx(TableHead, {
children: /*#__PURE__*/_jsx(TableRow, {
children: headers
})
}), /*#__PURE__*/_jsx(TableBody, {
children: rows
})]
})
});
};
export const TableHead = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("thead", {
className: `${baseClass}__thead ${className || ''}`.trim(),
...rest,
children: children
});
};
export const TableBody = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("tbody", {
className: `${baseClass}__tbody ${className || ''}`.trim(),
...rest,
children: children
});
};
export const TableRow = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("tr", {
className: `${baseClass}__tr ${className || ''}`.trim(),
...rest,
children: children
});
};
export const TableCell = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("td", {
className: `${baseClass}__td ${className || ''}`.trim(),
...rest,
children: children
});
};
export const TableHeader = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("th", {
className: `${baseClass}__th ${className || ''}`.trim(),
...rest,
children: children
});
};
export const HiddenCell = ({
children,
className,
...rest
}) => {
return /*#__PURE__*/_jsx("td", {
className: `${baseClass}__hidden-cell ${className || ''}`.trim(),
...rest,
children: children
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,102 @@
import type { Day, Era, Month, Quarter } from "../../types.js";
import type {
LocaleDayPeriod,
LocaleUnitValue,
LocaleWidth,
LocalizeFn,
} from "../types.js";
export type BuildLocalizeFnArgs<
Value extends LocaleUnitValue,
ArgCallback extends LocalizeFnArgCallback<Value> | undefined,
> = {
values: LocalizePeriodValuesMap<Value>;
defaultWidth: LocaleWidth;
formattingValues?: LocalizePeriodValuesMap<Value>;
defaultFormattingWidth?: LocaleWidth;
} & (ArgCallback extends undefined
? {
argumentCallback?: undefined;
}
: {
argumentCallback: LocalizeFnArgCallback<Value>;
});
/**
* The localize function argument callback which allows to convert raw value to
* the actual type.
*
* @param value - The value to convert
*
* @returns The converted value
*/
export type LocalizeFnArgCallback<Value extends LocaleUnitValue | number> = (
value: Value,
) => LocalizeUnitIndex<Value>;
/**
* The map of localized values for each width.
*/
export type LocalizePeriodValuesMap<Value extends LocaleUnitValue> = {
[Pattern in LocaleWidth]?: LocalizeValues<Value>;
};
/**
* The index type of the locale unit value. It types conversion of units of
* values that don't start at 0 (i.e. quarters).
*/
export type LocalizeUnitIndex<Value extends LocaleUnitValue | number> =
Value extends LocaleUnitValue ? keyof LocalizeValues<Value> : number;
/**
* Converts the unit value to the tuple of values.
*/
export type LocalizeValues<Value extends LocaleUnitValue> =
Value extends LocaleDayPeriod
? Record<LocaleDayPeriod, string>
: Value extends Era
? LocalizeEraValues
: Value extends Quarter
? LocalizeQuarterValues
: Value extends Day
? LocalizeDayValues
: Value extends Month
? LocalizeMonthValues
: never;
/**
* The tuple of localized era values. The first element represents BC,
* the second element represents AD.
*/
export type LocalizeEraValues = readonly [string, string];
/**
* The tuple of localized quarter values. The first element represents Q1.
*/
export type LocalizeQuarterValues = readonly [string, string, string, string];
/**
* The tuple of localized day values. The first element represents Sunday.
*/
export type LocalizeDayValues = readonly [
string,
string,
string,
string,
string,
string,
string,
];
/**
* The tuple of localized month values. The first element represents January.
*/
export type LocalizeMonthValues = readonly [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
];
export declare function buildLocalizeFn<
Value extends LocaleUnitValue,
ArgCallback extends LocalizeFnArgCallback<Value> | undefined,
>(args: BuildLocalizeFnArgs<Value, ArgCallback>): LocalizeFn<Value>;

View File

@@ -0,0 +1,13 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const select_1 = __importDefault(require("../definitions/select"));
const select = (ajv, opts) => {
(0, select_1.default)(opts).forEach((d) => ajv.addKeyword(d));
return ajv;
};
exports.default = select;
module.exports = select;
//# sourceMappingURL=select.js.map

View File

@@ -0,0 +1,86 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { LinkNode, TOGGLE_LINK_COMMAND, $toggleLink } from '@lexical/link';
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { mergeRegister, objectKlassEquals } from '@lexical/utils';
import { COMMAND_PRIORITY_LOW, PASTE_COMMAND, $getSelection, $isRangeSelection, $isElementNode } from 'lexical';
import { useEffect } from 'react';
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function LinkPlugin({
validateUrl,
attributes
}) {
const [editor] = useLexicalComposerContext();
useEffect(() => {
if (!editor.hasNodes([LinkNode])) {
throw new Error('LinkPlugin: LinkNode not registered on editor');
}
return mergeRegister(editor.registerCommand(TOGGLE_LINK_COMMAND, payload => {
if (payload === null) {
$toggleLink(payload);
return true;
} else if (typeof payload === 'string') {
if (validateUrl === undefined || validateUrl(payload)) {
$toggleLink(payload, attributes);
return true;
}
return false;
} else {
const {
url,
target,
rel,
title
} = payload;
$toggleLink(url, {
...attributes,
rel,
target,
title
});
return true;
}
}, COMMAND_PRIORITY_LOW), validateUrl !== undefined ? editor.registerCommand(PASTE_COMMAND, event => {
const selection = $getSelection();
if (!$isRangeSelection(selection) || selection.isCollapsed() || !objectKlassEquals(event, ClipboardEvent)) {
return false;
}
if (event.clipboardData === null) {
return false;
}
const clipboardText = event.clipboardData.getData('text');
if (!validateUrl(clipboardText)) {
return false;
}
// If we select nodes that are elements then avoid applying the link.
if (!selection.getNodes().some(node => $isElementNode(node))) {
editor.dispatchCommand(TOGGLE_LINK_COMMAND, {
...attributes,
url: clipboardText
});
event.preventDefault();
return true;
}
return false;
}, COMMAND_PRIORITY_LOW) : () => {
// Don't paste arbitrary text as a link when there's no validate function
});
}, [editor, validateUrl, attributes]);
return null;
}
export { LinkPlugin };

View File

@@ -0,0 +1,72 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
function nest<TData extends z.ZodType>(schema: TData) {
return z.object({
nested: schema,
});
}
test("generics", () => {
const a = nest(z.object({ a: z.string() }));
type a = z.infer<typeof a>;
expectTypeOf<a>().toEqualTypeOf<{ nested: { a: string } }>();
const b = nest(z.object({ a: z.string().optional() }));
type b = z.infer<typeof b>;
expectTypeOf<b>().toEqualTypeOf<{ nested: { a?: string | undefined } }>();
});
test("generics with optional", () => {
async function stripOuter<TData extends z.ZodType>(schema: TData, data: unknown) {
return z
.object({
nested: schema.optional(),
})
.transform((data) => {
return data.nested;
})
.parse({ nested: data });
}
const result = stripOuter(z.object({ a: z.string() }), { a: "asdf" });
expectTypeOf<typeof result>().toEqualTypeOf<Promise<{ a: string } | undefined>>();
});
// test("assignability", () => {
// const createSchemaAndParse = <K extends string, VS extends z.ZodString>(key: K, valueSchema: VS, data: unknown) => {
// const schema = z.object({
// [key]: valueSchema,
// });
// // return { [key]: valueSchema };
// const parsed = schema.parse(data);
// return parsed;
// // const inferred: z.infer<z.ZodObject<{ [k in K]: VS }>> = parsed;
// // return inferred;
// };
// const parsed = createSchemaAndParse("foo", z.string(), { foo: "" });
// expectTypeOf<typeof parsed>().toEqualTypeOf<{ foo: string }>();
// });
test("nested no undefined", () => {
const inner = z.string().or(z.array(z.string()));
const outer = z.object({ inner });
type outerSchema = z.infer<typeof outer>;
expectTypeOf<outerSchema>().toEqualTypeOf<{ inner: string | string[] }>();
expect(outer.safeParse({ inner: undefined }).success).toEqual(false);
});
test("generic on output type", () => {
const createV4Schema = <Output>(opts: {
schema: z.ZodType<Output>;
}) => {
return opts.schema;
};
createV4Schema({
schema: z.object({
name: z.string(),
}),
})?._zod?.output?.name;
});

View File

@@ -0,0 +1 @@
export { parse, safeParse, parseAsync, safeParseAsync } from "../core/index.cjs";

View File

@@ -0,0 +1,33 @@
/**
* Generate URL-friendly unique ID. This method uses the non-secure
* predictable random generator with bigger collision probability.
*
* ```js
* import { nanoid } from 'nanoid/non-secure'
* model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
* ```
*
* @param size Size of the ID. The default size is 21.
* @returns A random string.
*/
export function nanoid(size?: number): string
/**
* Generate a unique ID based on a custom alphabet.
* This method uses the non-secure predictable random generator
* with bigger collision probability.
*
* @param alphabet Alphabet used to generate the ID.
* @param defaultSize Size of the ID. The default size is 21.
* @returns A random string generator.
*
* ```js
* import { customAlphabet } from 'nanoid/non-secure'
* const nanoid = customAlphabet('0123456789абвгдеё', 5)
* model.id = //=> "8ё56а"
* ```
*/
export function customAlphabet(
alphabet: string,
defaultSize?: number
): (size?: number) => string

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sqlite-core/unique-constraint.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAInB,SAAS,cAAc,OAAoB,SAAmB;AACpE,SAAO,GAAG,MAAM,SAAS,CAAC,IAAI,QAAQ,KAAK,GAAG,CAAC;AAChD;AAEO,SAAS,OAAO,MAA0C;AAChE,SAAO,IAAI,0BAA0B,IAAI;AAC1C;AAEO,MAAM,wBAAwB;AAAA,EAMpC,YACC,SACQ,MACP;AADO;AAER,SAAK,UAAU;AAAA,EAChB;AAAA,EAVA,QAAiB,UAAU,IAAY;AAAA;AAAA,EAGvC;AAAA;AAAA,EAUA,MAAM,OAAsC;AAC3C,WAAO,IAAI,iBAAiB,OAAO,KAAK,SAAS,KAAK,IAAI;AAAA,EAC3D;AACD;AAEO,MAAM,0BAA0B;AAAA,EACtC,QAAiB,UAAU,IAAY;AAAA;AAAA,EAGvC;AAAA,EAEA,YACC,MACC;AACD,SAAK,OAAO;AAAA,EACb;AAAA,EAEA,MAAM,SAA4C;AACjD,WAAO,IAAI,wBAAwB,SAAS,KAAK,IAAI;AAAA,EACtD;AACD;AAEO,MAAM,iBAAiB;AAAA,EAM7B,YAAqB,OAAoB,SAAyB,MAAe;AAA5D;AACpB,SAAK,UAAU;AACf,SAAK,OAAO,QAAQ,cAAc,KAAK,OAAO,KAAK,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC;AAAA,EACxF;AAAA,EARA,QAAiB,UAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAAA,EAOT,UAAU;AACT,WAAO,KAAK;AAAA,EACb;AACD;","names":[]}

View File

@@ -0,0 +1,50 @@
@import '../../scss/styles.scss';
@layer payload-default {
.point {
position: relative;
& .input-wrapper {
position: relative;
}
&__wrap {
display: flex;
width: calc(100% + #{base(1)});
margin: 0;
margin-left: base(-0.5);
margin-right: base(-0.5);
list-style: none;
padding: 0;
li {
padding: 0 base(0.5);
width: 50%;
}
}
input {
@include formInput;
}
}
html[data-theme='light'] {
.point {
&.error {
input {
@include lightInputError;
}
}
}
}
html[data-theme='dark'] {
.point {
&.error {
input {
@include darkInputError;
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
"use strict";
function _class_check_private_static_field_descriptor(descriptor, action) {
if (descriptor === undefined) {
throw new TypeError("attempted to " + action + " private static field before its declaration");
}
}
exports._ = _class_check_private_static_field_descriptor;

View File

@@ -0,0 +1,62 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { DragOverlay } from '@dnd-kit/core';
import { getEventCoordinates } from '@dnd-kit/utilities';
import { FolderFileCard } from '../FolderFileCard/index.js';
import './index.scss';
const baseClass = 'drag-overlay-selection';
export function DragOverlaySelection({
item,
selectedCount
}) {
return /*#__PURE__*/_jsx(DragOverlay, {
dropAnimation: null,
modifiers: [snapTopLeftToCursor],
style: {
height: 'unset',
maxWidth: '220px'
},
children: /*#__PURE__*/_jsxs("div", {
className: `${baseClass}__cards`,
children: [Array.from({
length: selectedCount > 1 ? 2 : 1
}).map((_, index) => /*#__PURE__*/_jsx("div", {
className: `${baseClass}__card`,
style: {
right: `${index * 3}px`,
top: `-${index * 3}px`
},
children: /*#__PURE__*/_jsx(FolderFileCard, {
id: null,
isSelected: true,
itemKey: "overlay-card",
title: item.value._folderOrDocumentTitle,
type: "folder"
})
}, index)), selectedCount > 1 ? /*#__PURE__*/_jsx("span", {
className: `${baseClass}__card-count`,
children: selectedCount
}) : null]
})
});
}
export const snapTopLeftToCursor = ({
activatorEvent,
draggingNodeRect,
transform
}) => {
if (draggingNodeRect && activatorEvent) {
const activatorCoordinates = getEventCoordinates(activatorEvent);
if (!activatorCoordinates) {
return transform;
}
const offsetX = activatorCoordinates.x - draggingNodeRect.left;
const offsetY = activatorCoordinates.y - draggingNodeRect.top;
return {
...transform,
x: transform.x + offsetX + 5,
y: transform.y + offsetY + 5
};
}
return transform;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"spanExporter.d.ts","sourceRoot":"","sources":["../../src/spanExporter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,EAKV,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAqCtB;;GAEG;AACH,qBAAa,kBAAkB;IAiB7B,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,mBAAmB,CAA4C;IACvE,OAAO,CAAC,wBAAwB,CAAS;IAGzC,OAAO,CAAC,UAAU,CAAsB;IAExC,OAAO,CAAC,eAAe,CAA8B;gBAElC,OAAO,CAAC,EAAE;QAC3B,4IAA4I;QAC5I,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IASD;;;OAGG;IACI,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAoCvC;;;;OAIG;IACI,KAAK,IAAI,IAAI;IA4BpB;;;OAGG;IACI,KAAK,IAAI,IAAI;IAMpB;;;;;;;;OAQG;IACH,OAAO,CAAC,UAAU;IA4ClB,kEAAkE;IAClE,OAAO,CAAC,mBAAmB;IAU3B,4FAA4F;IAC5F,OAAO,CAAC,uCAAuC;IAI/C,wDAAwD;IACxD,OAAO,CAAC,sBAAsB;CAK/B;AAYD,+BAA+B;AAC/B,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,gBAAgB,CAoEjF"}

View File

@@ -0,0 +1,10 @@
import type { PayloadRequest, RelationshipField } from 'payload';
import type { RelationshipValue } from './index.js';
export declare const generateLabelFromValue: ({ field, locale, parentIsLocalized, req, value, }: {
field: RelationshipField;
locale: string;
parentIsLocalized: boolean;
req: PayloadRequest;
value: RelationshipValue;
}) => Promise<string>;
//# sourceMappingURL=generateLabelFromValue.d.ts.map

View File

@@ -0,0 +1,313 @@
'use strict';
var React = require('react');
var createCache = require('@emotion/cache');
var _extends = require('@babel/runtime/helpers/extends');
var weakMemoize = require('@emotion/weak-memoize');
var _isolatedHnrs_dist_emotionReact_isolatedHnrs = require('../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
var useInsertionEffectWithFallbacks = require('@emotion/use-insertion-effect-with-fallbacks');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var createCache__default = /*#__PURE__*/_interopDefault(createCache);
var weakMemoize__default = /*#__PURE__*/_interopDefault(weakMemoize);
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache__default["default"]({
key: 'css'
}) : null);
{
EmotionCacheContext.displayName = 'EmotionCacheContext';
}
var CacheProvider = EmotionCacheContext.Provider;
var __unsafe_useEmotionCache = function useEmotionCache() {
return React.useContext(EmotionCacheContext);
};
exports.withEmotionCache = function withEmotionCache(func) {
return /*#__PURE__*/React.forwardRef(function (props, ref) {
// the cache will never be null in the browser
var cache = React.useContext(EmotionCacheContext);
return func(props, cache, ref);
});
};
{
exports.withEmotionCache = function withEmotionCache(func) {
return function (props) {
var cache = React.useContext(EmotionCacheContext);
if (cache === null) {
// yes, we're potentially creating this on every render
// it doesn't actually matter though since it's only on the server
// so there will only every be a single render
// that could change in the future because of suspense and etc. but for now,
// this works and i don't want to optimise for a future thing that we aren't sure about
cache = createCache__default["default"]({
key: 'css'
});
return /*#__PURE__*/React__namespace.createElement(EmotionCacheContext.Provider, {
value: cache
}, func(props, cache));
} else {
return func(props, cache);
}
};
};
}
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
{
ThemeContext.displayName = 'EmotionThemeContext';
}
var useTheme = function useTheme() {
return React__namespace.useContext(ThemeContext);
};
var getTheme = function getTheme(outerTheme, theme) {
if (typeof theme === 'function') {
var mergedTheme = theme(outerTheme);
if ((mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
}
return mergedTheme;
}
if ((theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
}
return _extends({}, outerTheme, theme);
};
var createCacheWithTheme = /* #__PURE__ */weakMemoize__default["default"](function (outerTheme) {
return weakMemoize__default["default"](function (theme) {
return getTheme(outerTheme, theme);
});
});
var ThemeProvider = function ThemeProvider(props) {
var theme = React__namespace.useContext(ThemeContext);
if (props.theme !== theme) {
theme = createCacheWithTheme(theme)(props.theme);
}
return /*#__PURE__*/React__namespace.createElement(ThemeContext.Provider, {
value: theme
}, props.children);
};
function withTheme(Component) {
var componentName = Component.displayName || Component.name || 'Component';
var WithTheme = /*#__PURE__*/React__namespace.forwardRef(function render(props, ref) {
var theme = React__namespace.useContext(ThemeContext);
return /*#__PURE__*/React__namespace.createElement(Component, _extends({
theme: theme,
ref: ref
}, props));
});
WithTheme.displayName = "WithTheme(" + componentName + ")";
return _isolatedHnrs_dist_emotionReact_isolatedHnrs["default"](WithTheme, Component);
}
var hasOwn = {}.hasOwnProperty;
var getLastPart = function getLastPart(functionName) {
// The match may be something like 'Object.createEmotionProps' or
// 'Loader.prototype.render'
var parts = functionName.split('.');
return parts[parts.length - 1];
};
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
// V8
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
if (match) return getLastPart(match[1]); // Safari / Firefox
match = /^([A-Za-z0-9$.]+)@/.exec(line);
if (match) return getLastPart(match[1]);
return undefined;
};
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
// identifiers, thus we only need to replace what is a valid character for JS,
// but not for CSS.
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
if (!stackTrace) return undefined;
var lines = stackTrace.split('\n');
for (var i = 0; i < lines.length; i++) {
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
// uppercase letter
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
}
return undefined;
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
}
var newProps = {};
for (var _key in props) {
if (hasOwn.call(props, _key)) {
newProps[_key] = props[_key];
}
}
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
// - It causes hydration warnings when using Safari and SSR
// - It can degrade performance if there are a huge number of elements
//
// Even if the flag is set, we still don't compute the label if it has already
// been determined by the Babel plugin.
if (typeof globalThis !== 'undefined' && !!globalThis.EMOTION_RUNTIME_AUTO_LABEL && !!props.css && (typeof props.css !== 'object' || !('name' in props.css) || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
var label = getLabelFromStackTrace(new Error().stack);
if (label) newProps[labelPropName] = label;
}
return newProps;
};
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serialized = _ref.serialized,
isStringTag = _ref.isStringTag;
utils.registerStyles(cache, serialized, isStringTag);
var rules = useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function () {
return utils.insertStyles(cache, serialized, isStringTag);
});
if (rules !== undefined) {
var _ref2;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
__html: rules
}, _ref2.nonce = cache.sheet.nonce, _ref2));
}
return null;
};
var Emotion = /* #__PURE__ */exports.withEmotionCache(function (props, cache, ref) {
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var WrappedComponent = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = utils.getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serialize.serializeStyles(registeredStyles, undefined, React__namespace.useContext(ThemeContext));
if (serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serialize.serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var _key2 in props) {
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (_key2 !== labelPropName)) {
newProps[_key2] = props[_key2];
}
}
newProps.className = className;
if (ref) {
newProps.ref = ref;
}
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
cache: cache,
serialized: serialized,
isStringTag: typeof WrappedComponent === 'string'
}), /*#__PURE__*/React__namespace.createElement(WrappedComponent, newProps));
});
{
Emotion.displayName = 'EmotionCssPropInternal';
}
var Emotion$1 = Emotion;
exports.CacheProvider = CacheProvider;
exports.Emotion = Emotion$1;
exports.ThemeContext = ThemeContext;
exports.ThemeProvider = ThemeProvider;
exports.__unsafe_useEmotionCache = __unsafe_useEmotionCache;
exports.createEmotionProps = createEmotionProps;
exports.hasOwn = hasOwn;
exports.useTheme = useTheme;
exports.withTheme = withTheme;

View File

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

View File

@@ -0,0 +1,39 @@
var baseFor = require('./_baseFor'),
castFunction = require('./_castFunction'),
keysIn = require('./keysIn');
/**
* Iterates over own and inherited enumerable string keyed properties of an
* object and invokes `iteratee` for each property. The iteratee is invoked
* with three arguments: (value, key, object). Iteratee functions may exit
* iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forInRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forIn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
*/
function forIn(object, iteratee) {
return object == null
? object
: baseFor(object, castFunction(iteratee), keysIn);
}
module.exports = forIn;

View File

@@ -0,0 +1,13 @@
export const mergeFieldStyles = field => ({
...(field?.admin?.style || {}),
...(field?.admin?.width ? {
'--field-width': field.admin.width
} : {
flex: '1 1 auto'
}),
// allow flex overrides to still take precedence over the fallback
...(field?.admin?.style?.flex ? {
flex: field.admin.style.flex
} : {})
});
//# sourceMappingURL=mergeFieldStyles.js.map

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BotOff = createLucideIcon("BotOff", [
["path", { d: "M13.67 8H18a2 2 0 0 1 2 2v4.33", key: "7az073" }],
["path", { d: "M2 14h2", key: "vft8re" }],
["path", { d: "M20 14h2", key: "4cs60a" }],
["path", { d: "M22 22 2 2", key: "1r8tn9" }],
["path", { d: "M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586", key: "s09a7a" }],
["path", { d: "M9 13v2", key: "rq6x2g" }],
["path", { d: "M9.67 4H12v2.33", key: "110xot" }]
]);
export { BotOff as default };
//# sourceMappingURL=bot-off.js.map

View File

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

View File

@@ -0,0 +1,82 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const types = require('../../types.js');
const bindReporter = require('./lib/bindReporter.js');
const getActivationStart = require('./lib/getActivationStart.js');
const getNavigationEntry = require('./lib/getNavigationEntry.js');
const initMetric = require('./lib/initMetric.js');
const whenActivated = require('./lib/whenActivated.js');
/*
* Copyright 2020 Google LLC
*
* 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.
*/
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */
const TTFBThresholds = [800, 1800];
/**
* Runs in the next task after the page is done loading and/or prerendering.
* @param callback
*/
const whenReady = (callback) => {
if (types.WINDOW.document?.prerendering) {
whenActivated.whenActivated(() => whenReady(callback));
} else if (types.WINDOW.document?.readyState !== 'complete') {
addEventListener('load', () => whenReady(callback), true);
} else {
// Queue a task so the callback runs after `loadEventEnd`.
setTimeout(callback);
}
};
/**
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
* current page and calls the `callback` function once the page has loaded,
* along with the relevant `navigation` performance entry used to determine the
* value. The reported value is a `DOMHighResTimeStamp`.
*
* Note, this function waits until after the page is loaded to call `callback`
* in order to ensure all properties of the `navigation` entry are populated.
* This is useful if you want to report on other metrics exposed by the
* [Navigation Timing API](https://w3c.github.io/navigation-timing/). For
* example, the TTFB metric starts from the page's [time
* origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it
* includes time spent on DNS lookup, connection negotiation, network latency,
* and server processing time.
*/
const onTTFB = (onReport, opts = {}) => {
const metric = initMetric.initMetric('TTFB');
const report = bindReporter.bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
whenReady(() => {
const navigationEntry = getNavigationEntry.getNavigationEntry();
if (navigationEntry) {
// The activationStart reference is used because TTFB should be
// relative to page activation rather than navigation start if the
// page was prerendered. But in cases where `activationStart` occurs
// after the first byte is received, this time should be clamped at 0.
metric.value = Math.max(navigationEntry.responseStart - getActivationStart.getActivationStart(), 0);
metric.entries = [navigationEntry];
report(true);
}
});
};
exports.TTFBThresholds = TTFBThresholds;
exports.onTTFB = onTTFB;
//# sourceMappingURL=onTTFB.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../../src/utils/is.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAK9D;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,KAAK,CAUlD;AAYD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,mBAAmB,CAO9E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,gBAAgB,CAE7D;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,CAG5D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AAGH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,CAM7D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,YAAY,GAAG,KAAK,CAQxE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,OAAO,CAE9D"}

View File

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

View File

@@ -0,0 +1,216 @@
'use strict'
const {
BalancedPoolMissingUpstreamError,
InvalidArgumentError
} = require('../core/errors')
const {
PoolBase,
kClients,
kNeedDrain,
kAddClient,
kRemoveClient,
kGetDispatcher
} = require('./pool-base')
const Pool = require('./pool')
const { kUrl } = require('../core/symbols')
const { parseOrigin } = require('../core/util')
const kFactory = Symbol('factory')
const kOptions = Symbol('options')
const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor')
const kCurrentWeight = Symbol('kCurrentWeight')
const kIndex = Symbol('kIndex')
const kWeight = Symbol('kWeight')
const kMaxWeightPerServer = Symbol('kMaxWeightPerServer')
const kErrorPenalty = Symbol('kErrorPenalty')
/**
* Calculate the greatest common divisor of two numbers by
* using the Euclidean algorithm.
*
* @param {number} a
* @param {number} b
* @returns {number}
*/
function getGreatestCommonDivisor (a, b) {
if (a === 0) return b
while (b !== 0) {
const t = b
b = a % b
a = t
}
return a
}
function defaultFactory (origin, opts) {
return new Pool(origin, opts)
}
class BalancedPool extends PoolBase {
constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {
if (typeof factory !== 'function') {
throw new InvalidArgumentError('factory must be a function.')
}
super()
this[kOptions] = opts
this[kIndex] = -1
this[kCurrentWeight] = 0
this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100
this[kErrorPenalty] = this[kOptions].errorPenalty || 15
if (!Array.isArray(upstreams)) {
upstreams = [upstreams]
}
this[kFactory] = factory
for (const upstream of upstreams) {
this.addUpstream(upstream)
}
this._updateBalancedPoolStats()
}
addUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin
if (this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
pool.closed !== true &&
pool.destroyed !== true
))) {
return this
}
const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions]))
this[kAddClient](pool)
pool.on('connect', () => {
pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty])
})
pool.on('connectionError', () => {
pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])
this._updateBalancedPoolStats()
})
pool.on('disconnect', (...args) => {
const err = args[2]
if (err && err.code === 'UND_ERR_SOCKET') {
// decrease the weight of the pool.
pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty])
this._updateBalancedPoolStats()
}
})
for (const client of this[kClients]) {
client[kWeight] = this[kMaxWeightPerServer]
}
this._updateBalancedPoolStats()
return this
}
_updateBalancedPoolStats () {
let result = 0
for (let i = 0; i < this[kClients].length; i++) {
result = getGreatestCommonDivisor(this[kClients][i][kWeight], result)
}
this[kGreatestCommonDivisor] = result
}
removeUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin
const pool = this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
pool.closed !== true &&
pool.destroyed !== true
))
if (pool) {
this[kRemoveClient](pool)
}
return this
}
getUpstream (upstream) {
const upstreamOrigin = parseOrigin(upstream).origin
return this[kClients].find((pool) => (
pool[kUrl].origin === upstreamOrigin &&
pool.closed !== true &&
pool.destroyed !== true
))
}
get upstreams () {
return this[kClients]
.filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true)
.map((p) => p[kUrl].origin)
}
[kGetDispatcher] () {
// We validate that pools is greater than 0,
// otherwise we would have to wait until an upstream
// is added, which might never happen.
if (this[kClients].length === 0) {
throw new BalancedPoolMissingUpstreamError()
}
const dispatcher = this[kClients].find(dispatcher => (
!dispatcher[kNeedDrain] &&
dispatcher.closed !== true &&
dispatcher.destroyed !== true
))
if (!dispatcher) {
return
}
const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true)
if (allClientsBusy) {
return
}
let counter = 0
let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain])
while (counter++ < this[kClients].length) {
this[kIndex] = (this[kIndex] + 1) % this[kClients].length
const pool = this[kClients][this[kIndex]]
// find pool index with the largest weight
if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) {
maxWeightIndex = this[kIndex]
}
// decrease the current weight every `this[kClients].length`.
if (this[kIndex] === 0) {
// Set the current weight to the next lower weight.
this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]
if (this[kCurrentWeight] <= 0) {
this[kCurrentWeight] = this[kMaxWeightPerServer]
}
}
if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) {
return pool
}
}
this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]
this[kIndex] = maxWeightIndex
return this[kClients][maxWeightIndex]
}
}
module.exports = BalancedPool

View File

@@ -0,0 +1,14 @@
import type { I18n } from '@payloadcms/translations';
import type { FieldSchemaMap, SanitizedConfig } from 'payload';
/**
* Flattens the config fields into a map of field schemas
*/
export declare const buildFieldSchemaMap: (args: {
collectionSlug?: string;
config: SanitizedConfig;
globalSlug?: string;
i18n: I18n;
}) => {
fieldSchemaMap: FieldSchemaMap;
};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,79 @@
'use strict';
var parseCst = require('./parse-cst.js');
var Document$1 = require('./Document-9b4560a1.js');
var Schema = require('./Schema-88e323a7.js');
var PlainValue = require('./PlainValue-ec8e588e.js');
var warnings = require('./warnings-1000a372.js');
require('./resolveSeq-d03cb037.js');
function createNode(value, wrapScalars = true, tag) {
if (tag === undefined && typeof wrapScalars === 'string') {
tag = wrapScalars;
wrapScalars = true;
}
const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions);
const schema = new Schema.Schema(options);
return schema.createNode(value, wrapScalars, tag);
}
class Document extends Document$1.Document {
constructor(options) {
super(Object.assign({}, Document$1.defaultOptions, options));
}
}
function parseAllDocuments(src, options) {
const stream = [];
let prev;
for (const cstDoc of parseCst.parse(src)) {
const doc = new Document(options);
doc.parse(cstDoc, prev);
stream.push(doc);
prev = doc;
}
return stream;
}
function parseDocument(src, options) {
const cst = parseCst.parse(src);
const doc = new Document(options).parse(cst[0]);
if (cst.length > 1) {
const errMsg = 'Source contains multiple documents; please use YAML.parseAllDocuments()';
doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg));
}
return doc;
}
function parse(src, options) {
const doc = parseDocument(src, options);
doc.warnings.forEach(warning => warnings.warn(warning));
if (doc.errors.length > 0) throw doc.errors[0];
return doc.toJSON();
}
function stringify(value, options) {
const doc = new Document(options);
doc.contents = value;
return String(doc);
}
const YAML = {
createNode,
defaultOptions: Document$1.defaultOptions,
Document,
parse,
parseAllDocuments,
parseCST: parseCst.parse,
parseDocument,
scalarOptions: Document$1.scalarOptions,
stringify
};
exports.YAML = YAML;

View File

@@ -0,0 +1 @@
{"version":3,"file":"mail-question.js","sources":["../../../src/icons/mail-question.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MailQuestion\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTAuNVY2YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAydjEyYzAgMS4xLjkgMiAyIDJoMTIuNSIgLz4KICA8cGF0aCBkPSJtMjIgNy04Ljk3IDUuN2ExLjk0IDEuOTQgMCAwIDEtMi4wNiAwTDIgNyIgLz4KICA8cGF0aCBkPSJNMTggMTUuMjhjLjItLjQuNS0uOC45LTFhMi4xIDIuMSAwIDAgMSAyLjYuNGMuMy40LjUuOC41IDEuMyAwIDEuMy0yIDItMiAyIiAvPgogIDxwYXRoIGQ9Ik0yMCAyMnYuMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mail-question\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 MailQuestion = createLucideIcon('MailQuestion', [\n ['path', { d: 'M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5', key: 'e61zoh' }],\n ['path', { d: 'm22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7', key: '1ocrg3' }],\n [\n 'path',\n {\n d: 'M18 15.28c.2-.4.5-.8.9-1a2.1 2.1 0 0 1 2.6.4c.3.4.5.8.5 1.3 0 1.3-2 2-2 2',\n key: '7z9rxb',\n },\n ],\n ['path', { d: 'M20 22v.01', key: '12bgn6' }],\n]);\n\nexport default MailQuestion;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC/F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1E,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
"use strict";var g=Object.defineProperty;var o=(r,s)=>g(r,"name",{value:s,configurable:!0});var p=require("node:module"),v=require("node:worker_threads"),f=require("./register-D46fvsV_.cjs"),h=require("node:url"),m=typeof document<"u"?document.currentScript:null;const w=o(r=>(s,e)=>{if(!e)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const n=e.startsWith(f.fileUrlPrefix)?e:h.pathToFileURL(e).toString();return import(`tsx://${JSON.stringify({specifier:s,parentURL:n,namespace:r})}`)},"createScopedImport");let l=!1;const _=o(r=>{if(!p.register)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.19 or v20.6 and above.`);if(!l){const{_resolveFilename:t}=p;p._resolveFilename=(c,...u)=>t(f.interopCjsExports(c),...u),l=!0}const{sourceMapsEnabled:s}=process;process.setSourceMapsEnabled(!0);const{port1:e,port2:n}=new v.MessageChannel;p.register(`./esm/index.mjs?${Date.now()}`,{parentURL:typeof document>"u"?require("url").pathToFileURL(__filename).href:m&&m.src||new URL("register-2sWVXuRQ.cjs",document.baseURI).href,data:{port:n,namespace:r?.namespace,tsconfig:r?.tsconfig},transferList:[n]});const d=r?.onImport,a=d&&(t=>{t.type==="load"&&d(t.url)});a&&(e.on("message",a),e.unref());const i=o(()=>(s===!1&&process.setSourceMapsEnabled(!1),a&&e.off("message",a),e.postMessage("deactivate"),new Promise(t=>{const c=o(u=>{u.type==="deactivated"&&(t(),e.off("message",c))},"onDeactivated");e.on("message",c)})),"unregister");return r?.namespace&&(i.import=w(r.namespace),i.unregister=i),i},"register");exports.register=_;

View File

@@ -0,0 +1,36 @@
import { DirectusRole } from "../../../schema/role.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/update/roles.d.ts
type UpdateRoleOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusRole<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Update multiple existing roles.
* @param keys
* @param item
* @param query
* @returns Returns the role objects for the updated roles.
* @throws Will throw if keys is empty
*/
declare const updateRoles: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(keys: DirectusRole<Schema>["id"][], item: NestedPartial<DirectusRole<Schema>>, query?: TQuery) => RestCommand<UpdateRoleOutput<Schema, TQuery>[], Schema>;
/**
* Update multiple roles as batch.
* @param items
* @param query
* @returns Returns the role objects for the updated roles.
*/
declare const updateRolesBatch: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(items: NestedPartial<DirectusRole<Schema>>[], query?: TQuery) => RestCommand<UpdateRoleOutput<Schema, TQuery>[], Schema>;
/**
* Update an existing role.
* @param key
* @param item
* @param query
* @returns Returns the role object for the updated role.
* @throws Will throw if key is empty
*/
declare const updateRole: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(key: DirectusRole<Schema>["id"], item: NestedPartial<DirectusRole<Schema>>, query?: TQuery) => RestCommand<UpdateRoleOutput<Schema, TQuery>, Schema>;
//#endregion
export { UpdateRoleOutput, updateRole, updateRoles, updateRolesBatch };
//# sourceMappingURL=roles.d.ts.map

View File

@@ -0,0 +1,345 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var lexical = require('lexical');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Returns the root's text content.
* @returns The root's text content.
*/
function $rootTextContent() {
const root = lexical.$getRoot();
return root.getTextContent();
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Determines if the root has any text content and can trim any whitespace if it does.
* @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?
* @param trim - Should the root text have its whitespaced trimmed? Defaults to true.
* @returns true if text content is empty, false if there is text or isEditorComposing is true.
*/
function $isRootTextContentEmpty(isEditorComposing, trim = true) {
if (isEditorComposing) {
return false;
}
let text = $rootTextContent();
if (trim) {
text = text.trim();
}
return text === '';
}
/**
* Returns a function that executes {@link $isRootTextContentEmpty}
* @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?
* @param trim - Should the root text have its whitespaced trimmed? Defaults to true.
* @returns A function that executes $isRootTextContentEmpty based on arguments.
*/
function $isRootTextContentEmptyCurry(isEditorComposing, trim) {
return () => $isRootTextContentEmpty(isEditorComposing, trim);
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Determines if the input should show the placeholder. If anything is in
* in the root the placeholder should not be shown.
* @param isComposing - Is the editor in composition mode due to an active Input Method Editor?
* @returns true if the input should show the placeholder, false otherwise.
*/
function $canShowPlaceholder(isComposing) {
if (!$isRootTextContentEmpty(isComposing, false)) {
return false;
}
const root = lexical.$getRoot();
const children = root.getChildren();
const childrenLength = children.length;
if (childrenLength > 1) {
return false;
}
for (let i = 0; i < childrenLength; i++) {
const topBlock = children[i];
if (lexical.$isDecoratorNode(topBlock)) {
return false;
}
if (lexical.$isElementNode(topBlock)) {
if (!lexical.$isParagraphNode(topBlock)) {
return false;
}
if (topBlock.__indent !== 0) {
return false;
}
const topBlockChildren = topBlock.getChildren();
const topBlockChildrenLength = topBlockChildren.length;
for (let s = 0; s < topBlockChildrenLength; s++) {
const child = topBlockChildren[i];
if (!lexical.$isTextNode(child)) {
return false;
}
}
}
}
return true;
}
/**
* Returns a function that executes {@link $canShowPlaceholder}
* @param isEditorComposing - Is the editor in composition mode due to an active Input Method Editor?
* @returns A function that executes $canShowPlaceholder with arguments.
*/
function $canShowPlaceholderCurry(isEditorComposing) {
return () => $canShowPlaceholder(isEditorComposing);
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
/**
* Finds a TextNode with a size larger than targetCharacters and returns
* the node along with the remaining length of the text.
* @param root - The RootNode.
* @param targetCharacters - The number of characters whose TextNode must be larger than.
* @returns The TextNode and the intersections offset, or null if no TextNode is found.
*/
function $findTextIntersectionFromCharacters(root, targetCharacters) {
let node = root.getFirstChild();
let currentCharacters = 0;
mainLoop: while (node !== null) {
if (lexical.$isElementNode(node)) {
const child = node.getFirstChild();
if (child !== null) {
node = child;
continue;
}
} else if (lexical.$isTextNode(node)) {
const characters = node.getTextContentSize();
if (currentCharacters + characters > targetCharacters) {
return {
node,
offset: targetCharacters - currentCharacters
};
}
currentCharacters += characters;
}
const sibling = node.getNextSibling();
if (sibling !== null) {
node = sibling;
continue;
}
let parent = node.getParent();
while (parent !== null) {
const parentSibling = parent.getNextSibling();
if (parentSibling !== null) {
node = parentSibling;
continue mainLoop;
}
parent = parent.getParent();
}
break;
}
return null;
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
// Do not require this module directly! Use normal `invariant` calls.
function formatDevErrorMessage(message) {
throw new Error(message);
}
/**
* Returns a tuple that can be rested (...) into mergeRegister to clean up
* node transforms listeners that transforms text into another node, eg. a HashtagNode.
* @example
* ```ts
* useEffect(() => {
return mergeRegister(
...registerLexicalTextEntity(editor, getMatch, targetNode, createNode),
);
}, [createNode, editor, getMatch, targetNode]);
* ```
* Where targetNode is the type of node containing the text you want to transform (like a text input),
* then getMatch uses a regex to find a matching text and creates the proper node to include the matching text.
* @param editor - The lexical editor.
* @param getMatch - Finds a matching string that satisfies a regex expression.
* @param targetNode - The node type that contains text to match with. eg. HashtagNode
* @param createNode - A function that creates a new node to contain the matched text. eg createHashtagNode
* @returns An array containing the plain text and reverse node transform listeners.
*/
function registerLexicalTextEntity(editor, getMatch, targetNode, createNode) {
const isTargetNode = node => {
return node instanceof targetNode;
};
const $replaceWithSimpleText = node => {
const textNode = lexical.$createTextNode(node.getTextContent());
textNode.setFormat(node.getFormat());
node.replace(textNode);
};
const getMode = node => {
return node.getLatest().__mode;
};
const $textNodeTransform = node => {
if (!node.isSimpleText()) {
return;
}
let prevSibling = node.getPreviousSibling();
let text = node.getTextContent();
let currentNode = node;
let match;
if (lexical.$isTextNode(prevSibling)) {
const previousText = prevSibling.getTextContent();
const combinedText = previousText + text;
const prevMatch = getMatch(combinedText);
if (isTargetNode(prevSibling)) {
if (prevMatch === null || getMode(prevSibling) !== 0) {
$replaceWithSimpleText(prevSibling);
return;
} else {
const diff = prevMatch.end - previousText.length;
if (diff > 0) {
const concatText = text.slice(0, diff);
const newTextContent = previousText + concatText;
prevSibling.select();
prevSibling.setTextContent(newTextContent);
if (diff === text.length) {
node.remove();
} else {
const remainingText = text.slice(diff);
node.setTextContent(remainingText);
}
return;
}
}
} else if (prevMatch === null || prevMatch.start < previousText.length) {
return;
}
}
let prevMatchLengthToSkip = 0;
// eslint-disable-next-line no-constant-condition
while (true) {
match = getMatch(text);
let nextText = match === null ? '' : text.slice(match.end);
text = nextText;
if (nextText === '') {
const nextSibling = currentNode.getNextSibling();
if (lexical.$isTextNode(nextSibling)) {
nextText = currentNode.getTextContent() + nextSibling.getTextContent();
const nextMatch = getMatch(nextText);
if (nextMatch === null) {
if (isTargetNode(nextSibling)) {
$replaceWithSimpleText(nextSibling);
} else {
nextSibling.markDirty();
}
return;
} else if (nextMatch.start !== 0) {
return;
}
}
}
if (match === null) {
return;
}
if (match.start === 0 && lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {
prevMatchLengthToSkip += match.end;
continue;
}
let nodeToReplace;
if (match.start === 0) {
[nodeToReplace, currentNode] = currentNode.splitText(match.end);
} else {
[, nodeToReplace, currentNode] = currentNode.splitText(match.start + prevMatchLengthToSkip, match.end + prevMatchLengthToSkip);
}
if (!(nodeToReplace !== undefined)) {
formatDevErrorMessage(`${'nodeToReplace'} should not be undefined. You may want to check splitOffsets passed to the splitText.`);
}
const replacementNode = createNode(nodeToReplace);
replacementNode.setFormat(nodeToReplace.getFormat());
nodeToReplace.replace(replacementNode);
if (currentNode == null) {
return;
}
prevMatchLengthToSkip = 0;
prevSibling = replacementNode;
}
};
const $reverseNodeTransform = node => {
const text = node.getTextContent();
const match = getMatch(text);
if (match === null || match.start !== 0) {
$replaceWithSimpleText(node);
return;
}
if (text.length > match.end) {
// This will split out the rest of the text as simple text
node.splitText(match.end);
return;
}
const prevSibling = node.getPreviousSibling();
if (lexical.$isTextNode(prevSibling) && prevSibling.isTextEntity()) {
$replaceWithSimpleText(prevSibling);
$replaceWithSimpleText(node);
}
const nextSibling = node.getNextSibling();
if (lexical.$isTextNode(nextSibling) && nextSibling.isTextEntity()) {
$replaceWithSimpleText(nextSibling);
// This may have already been converted in the previous block
if (isTargetNode(node)) {
$replaceWithSimpleText(node);
}
}
};
const removePlainTextTransform = editor.registerNodeTransform(lexical.TextNode, $textNodeTransform);
const removeReverseNodeTransform = editor.registerNodeTransform(targetNode, $reverseNodeTransform);
return [removePlainTextTransform, removeReverseNodeTransform];
}
exports.$canShowPlaceholder = $canShowPlaceholder;
exports.$canShowPlaceholderCurry = $canShowPlaceholderCurry;
exports.$findTextIntersectionFromCharacters = $findTextIntersectionFromCharacters;
exports.$isRootTextContentEmpty = $isRootTextContentEmpty;
exports.$isRootTextContentEmptyCurry = $isRootTextContentEmptyCurry;
exports.$rootTextContent = $rootTextContent;
exports.registerLexicalTextEntity = registerLexicalTextEntity;

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useInitialRect(node: HTMLElement | null, measure: (node: HTMLElement) => ClientRect): ClientRect | null;

View File

@@ -0,0 +1,47 @@
import { mixNumber } from './number.mjs';
import { warning } from 'motion-utils';
import { hslaToRgba } from '../hsla-to-rgba.mjs';
import { hex } from '../../value/types/color/hex.mjs';
import { rgba } from '../../value/types/color/rgba.mjs';
import { hsla } from '../../value/types/color/hsla.mjs';
import { mixImmediate } from './immediate.mjs';
// Linear color space blending
// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw
// Demonstrated http://codepen.io/osublake/pen/xGVVaN
const mixLinearColor = (from, to, v) => {
const fromExpo = from * from;
const expo = v * (to * to - fromExpo) + fromExpo;
return expo < 0 ? 0 : Math.sqrt(expo);
};
const colorTypes = [hex, rgba, hsla];
const getColorType = (v) => colorTypes.find((type) => type.test(v));
function asRGBA(color) {
const type = getColorType(color);
warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);
if (!Boolean(type))
return false;
let model = type.parse(color);
if (type === hsla) {
// TODO Remove this cast - needed since Motion's stricter typing
model = hslaToRgba(model);
}
return model;
}
const mixColor = (from, to) => {
const fromRGBA = asRGBA(from);
const toRGBA = asRGBA(to);
if (!fromRGBA || !toRGBA) {
return mixImmediate(from, to);
}
const blended = { ...fromRGBA };
return (v) => {
blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);
blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);
return rgba.transform(blended);
};
};
export { mixColor, mixLinearColor };

View File

@@ -0,0 +1 @@
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../../src/integrations/supabase.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,6BAA6B,UAWlC,CAAC;AAEF,QAAA,MAAM,mCAAmC,UAOxC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B3B,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAAqD,CAAC;AAE9F,KAAK,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAChE,KAAK,iBAAiB,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,KAAK,sBAAsB,GAAG,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AACnF,KAAK,yBAAyB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,sBAAsB,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC;KACxD,GAAG,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC;CAC1C;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;CACH;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE;QACT,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,qBAAqB,CAAC;KAChD,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,CAAC,CAAC,EACN,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EACvD,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,KACtD,OAAO,CAAC,CAAC,CAAC,CAAC;CACjB;AAsBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAsB7F;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA8B9E;AAsSD,eAAO,MAAM,wBAAwB,GAAI,gBAAgB,OAAO,KAAG,IAUlE,CAAC;AAaF,eAAO,MAAM,mBAAmB;oBAAiD,GAAG;sDAE1D,CAAC"}

View File

@@ -0,0 +1,87 @@
import { CaptureContext, SdkProcessingMetadata } from '../scope';
import { Attachment } from './attachment';
import { Breadcrumb } from './breadcrumb';
import { Contexts } from './context';
import { DebugMeta } from './debugMeta';
import { Exception } from './exception';
import { Extras } from './extra';
import { Measurements } from './measurement';
import { Mechanism } from './mechanism';
import { Primitive } from './misc';
import { RequestEventData } from './request';
import { SdkInfo } from './sdkinfo';
import { SeverityLevel } from './severity';
import { SpanJSON } from './span';
import { Thread } from './thread';
import { TransactionSource } from './transaction';
import { User } from './user';
/** An event to be sent to Sentry. */
export interface Event {
event_id?: string;
message?: string;
logentry?: {
message?: string;
params?: unknown[];
};
timestamp?: number;
start_timestamp?: number;
level?: SeverityLevel;
platform?: string;
logger?: string;
server_name?: string;
release?: string;
dist?: string;
environment?: string;
sdk?: SdkInfo;
request?: RequestEventData;
transaction?: string;
modules?: {
[key: string]: string;
};
fingerprint?: string[];
exception?: {
values?: Exception[];
};
breadcrumbs?: Breadcrumb[];
contexts?: Contexts;
tags?: {
[key: string]: Primitive;
};
extra?: Extras;
user?: User;
type?: EventType;
spans?: SpanJSON[];
measurements?: Measurements;
debug_meta?: DebugMeta;
sdkProcessingMetadata?: SdkProcessingMetadata;
transaction_info?: {
source: TransactionSource;
};
threads?: {
values: Thread[];
};
}
/**
* The type of an `Event`.
* Note that `ErrorEvent`s do not have a type (hence its undefined),
* while all other events are required to have one.
*/
export type EventType = 'transaction' | 'profile' | 'replay_event' | 'feedback' | undefined;
export interface ErrorEvent extends Event {
type: undefined;
}
export interface TransactionEvent extends Event {
type: 'transaction';
}
/** JSDoc */
export interface EventHint {
event_id?: string;
captureContext?: CaptureContext;
mechanism?: Partial<Mechanism>;
syntheticException?: Error | null;
originalException?: unknown;
attachments?: Attachment[];
data?: any;
integrations?: string[];
}
//# sourceMappingURL=event.d.ts.map

View File

@@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.mapAsyncIterator = mapAsyncIterator;
/**
* Given an AsyncIterable and a callback function, return an AsyncIterator
* which produces values mapped via calling the callback function.
*/
function mapAsyncIterator(iterable, callback) {
const iterator = iterable[Symbol.asyncIterator]();
async function mapResult(result) {
if (result.done) {
return result;
}
try {
return {
value: await callback(result.value),
done: false,
};
} catch (error) {
/* c8 ignore start */
// FIXME: add test case
if (typeof iterator.return === 'function') {
try {
await iterator.return();
} catch (_e) {
/* ignore error */
}
}
throw error;
/* c8 ignore stop */
}
}
return {
async next() {
return mapResult(await iterator.next());
},
async return() {
// If iterator.return() does not exist, then type R must be undefined.
return typeof iterator.return === 'function'
? mapResult(await iterator.return())
: {
value: undefined,
done: true,
};
},
async throw(error) {
if (typeof iterator.throw === 'function') {
return mapResult(await iterator.throw(error));
}
throw error;
},
[Symbol.asyncIterator]() {
return this;
},
};
}

View File

@@ -0,0 +1 @@
{"version":3,"names":["require","_utils","_placeholders","_deprecatedAliases","Object","keys","DEPRECATED_ALIASES","forEach","deprecatedAlias","FLIPPED_ALIAS_KEYS","types","set","allExpandedTypes","type","aliases","add","TYPES","exports","concat","VISITOR_KEYS","DEPRECATED_KEYS"],"sources":["../../src/definitions/index.ts"],"sourcesContent":["import \"./core.ts\";\nimport \"./flow.ts\";\nimport \"./jsx.ts\";\nimport \"./misc.ts\";\nimport \"./experimental.ts\";\nimport \"./typescript.ts\";\nimport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n NODE_UNION_SHAPES__PRIVATE,\n allExpandedTypes,\n} from \"./utils.ts\";\nimport {\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n} from \"./placeholders.ts\";\nimport { DEPRECATED_ALIASES } from \"./deprecated-aliases.ts\";\n\n(\n Object.keys(DEPRECATED_ALIASES) as (keyof typeof DEPRECATED_ALIASES)[]\n).forEach(deprecatedAlias => {\n FLIPPED_ALIAS_KEYS[deprecatedAlias] =\n FLIPPED_ALIAS_KEYS[DEPRECATED_ALIASES[deprecatedAlias]];\n});\n\nfor (const { types, set } of allExpandedTypes) {\n for (const type of types) {\n const aliases = FLIPPED_ALIAS_KEYS[type];\n if (aliases) {\n aliases.forEach(set.add, set);\n } else {\n set.add(type);\n }\n }\n}\n\nconst TYPES: string[] = [].concat(\n Object.keys(VISITOR_KEYS),\n Object.keys(FLIPPED_ALIAS_KEYS),\n Object.keys(DEPRECATED_KEYS),\n);\n\n/**\n * @internal\n */\nexport { NODE_UNION_SHAPES__PRIVATE };\n\nexport {\n VISITOR_KEYS,\n ALIAS_KEYS,\n FLIPPED_ALIAS_KEYS,\n NODE_FIELDS,\n BUILDER_KEYS,\n DEPRECATED_ALIASES,\n DEPRECATED_KEYS,\n NODE_PARENT_VALIDATIONS,\n PLACEHOLDERS,\n PLACEHOLDERS_ALIAS,\n PLACEHOLDERS_FLIPPED_ALIAS,\n TYPES,\n};\n\nexport type { FieldOptions } from \"./utils.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACAA,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAWA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,kBAAA,GAAAH,OAAA;AAGEI,MAAM,CAACC,IAAI,CAACC,qCAAkB,CAAC,CAC/BC,OAAO,CAACC,eAAe,IAAI;EAC3BC,yBAAkB,CAACD,eAAe,CAAC,GACjCC,yBAAkB,CAACH,qCAAkB,CAACE,eAAe,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF,KAAK,MAAM;EAAEE,KAAK;EAAEC;AAAI,CAAC,IAAIC,uBAAgB,EAAE;EAC7C,KAAK,MAAMC,IAAI,IAAIH,KAAK,EAAE;IACxB,MAAMI,OAAO,GAAGL,yBAAkB,CAACI,IAAI,CAAC;IACxC,IAAIC,OAAO,EAAE;MACXA,OAAO,CAACP,OAAO,CAACI,GAAG,CAACI,GAAG,EAAEJ,GAAG,CAAC;IAC/B,CAAC,MAAM;MACLA,GAAG,CAACI,GAAG,CAACF,IAAI,CAAC;IACf;EACF;AACF;AAEA,MAAMG,KAAe,GAAAC,OAAA,CAAAD,KAAA,GAAG,EAAE,CAACE,MAAM,CAC/Bd,MAAM,CAACC,IAAI,CAACc,mBAAY,CAAC,EACzBf,MAAM,CAACC,IAAI,CAACI,yBAAkB,CAAC,EAC/BL,MAAM,CAACC,IAAI,CAACe,sBAAe,CAC7B,CAAC","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","useSortable","useDraggableSortable","props","$","id","disabled","t0","Symbol","for","duration","easing","t1","transition","attributes","isDragging","listeners","setNodeRef","transform","t2","t3","cursor","t4","style","t5","x","y","t6"],"sources":["../../../../src/elements/DraggableSortable/useDraggableSortable/index.tsx"],"sourcesContent":["'use client'\nimport type { UseDraggableArguments } from '@dnd-kit/core'\n\nimport { useSortable } from '@dnd-kit/sortable'\n\nimport type { UseDraggableSortableReturn } from './types.js'\n\nexport const useDraggableSortable = (props: UseDraggableArguments): UseDraggableSortableReturn => {\n const { id, disabled } = props\n\n const { attributes, isDragging, listeners, setNodeRef, transform, transition } = useSortable({\n id,\n disabled,\n transition: {\n duration: 250,\n easing: 'cubic-bezier(0, 0.2, 0.2, 1)',\n },\n })\n\n return {\n attributes: {\n ...attributes,\n style: {\n cursor: isDragging ? 'grabbing' : 'grab',\n transition,\n },\n },\n isDragging,\n listeners,\n setNodeRef,\n transform: transform && `translate3d(${transform.x}px, ${transform.y}px, 0)`, // translate3d is faster than translate in most browsers\n transition,\n }\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAGA,SAASC,WAAW,QAAQ;AAI5B,OAAO,MAAMC,oBAAA,GAAuBC,KAAA;EAAA,MAAAC,CAAA,GAAAJ,EAAA;EAClC;IAAAK,EAAA;IAAAC;EAAA,IAAyBH,KAAA;EAAA,IAAAI,EAAA;EAAA,IAAAH,CAAA,QAAAI,MAAA,CAAAC,GAAA;IAKXF,EAAA;MAAAG,QAAA;MAAAC,MAAA,EAEF;IAAA;IACVP,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,IAAAQ,EAAA;EAAA,IAAAR,CAAA,QAAAE,QAAA,IAAAF,CAAA,QAAAC,EAAA;IAN2FO,EAAA;MAAAP,EAAA;MAAAC,QAAA;MAAAO,UAAA,EAG/EN;IAGZ;IACFH,CAAA,MAAAE,QAAA;IAAAF,CAAA,MAAAC,EAAA;IAAAD,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAPA;IAAAU,UAAA;IAAAC,UAAA;IAAAC,SAAA;IAAAC,UAAA;IAAAC,SAAA;IAAAL;EAAA,IAAiFZ,WAAA,CAAYW,EAO7F;EAMc,MAAAO,EAAA,GAAAJ,UAAA,GAAa,aAAa;EAAA,IAAAK,EAAA;EAAA,IAAAhB,CAAA,QAAAe,EAAA,IAAAf,CAAA,QAAAS,UAAA;IAD7BO,EAAA;MAAAC,MAAA,EACGF,EAA0B;MAAAN;IAAA;IAEpCT,CAAA,MAAAe,EAAA;IAAAf,CAAA,MAAAS,UAAA;IAAAT,CAAA,MAAAgB,EAAA;EAAA;IAAAA,EAAA,GAAAhB,CAAA;EAAA;EAAA,IAAAkB,EAAA;EAAA,IAAAlB,CAAA,QAAAU,UAAA,IAAAV,CAAA,QAAAgB,EAAA;IALUE,EAAA;MAAA,GACPR,UAAU;MAAAS,KAAA,EACNH;IAGP;IACFhB,CAAA,MAAAU,UAAA;IAAAV,CAAA,MAAAgB,EAAA;IAAAhB,CAAA,MAAAkB,EAAA;EAAA;IAAAA,EAAA,GAAAlB,CAAA;EAAA;EAIW,MAAAoB,EAAA,GAAAN,SAAA,IAAa,eAAeA,SAAA,CAAAO,CAAA,OAAkBP,SAAA,CAAAQ,CAAA,QAAmB;EAAA,IAAAC,EAAA;EAAA,IAAAvB,CAAA,SAAAW,UAAA,IAAAX,CAAA,SAAAY,SAAA,IAAAZ,CAAA,SAAAa,UAAA,IAAAb,CAAA,SAAAkB,EAAA,IAAAlB,CAAA,SAAAoB,EAAA,IAAApB,CAAA,SAAAS,UAAA;IAXvEc,EAAA;MAAAb,UAAA,EACOQ,EAMZ;MAAAP,UAAA;MAAAC,SAAA;MAAAC,UAAA;MAAAC,SAAA,EAIWM,EAAiE;MAAAX;IAAA;IAE9ET,CAAA,OAAAW,UAAA;IAAAX,CAAA,OAAAY,SAAA;IAAAZ,CAAA,OAAAa,UAAA;IAAAb,CAAA,OAAAkB,EAAA;IAAAlB,CAAA,OAAAoB,EAAA;IAAApB,CAAA,OAAAS,UAAA;IAAAT,CAAA,OAAAuB,EAAA;EAAA;IAAAA,EAAA,GAAAvB,CAAA;EAAA;EAAA,OAbOuB,EAaP;AAAA,CACF","ignoreList":[]}

View File

@@ -0,0 +1,364 @@
/**
* @license React
* scheduler.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function performWorkUntilDeadline() {
if (isMessageLoopRunning) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasMoreWork = !0;
try {
a: {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
localClearTimeout(taskTimeoutID),
(taskTimeoutID = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
b: {
advanceTimers(currentTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
!(
currentTask.expirationTime > currentTime &&
shouldYieldToHost()
);
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= currentTime
);
currentTime = exports.unstable_now();
if ("function" === typeof continuationCallback) {
currentTask.callback = continuationCallback;
advanceTimers(currentTime);
hasMoreWork = !0;
break b;
}
currentTask === peek(taskQueue) && pop(taskQueue);
advanceTimers(currentTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) hasMoreWork = !0;
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
hasMoreWork = !1;
}
}
break a;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
hasMoreWork = void 0;
}
} finally {
hasMoreWork
? schedulePerformWorkUntilDeadline()
: (isMessageLoopRunning = !1);
}
}
}
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node),
(heap[index] = parent),
(index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), requestHostCallback();
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
requestHostTimeout(
handleTimeout,
firstTimer.startTime - currentTime
);
}
}
function shouldYieldToHost() {
return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
}
function requestHostCallback() {
isMessageLoopRunning ||
((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function () {
callback(exports.unstable_now());
}, ms);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
exports.unstable_now = void 0;
if (
"object" === typeof performance &&
"function" === typeof performance.now
) {
var localPerformance = performance;
exports.unstable_now = function () {
return localPerformance.now();
};
} else {
var localDate = Date,
initialTime = localDate.now();
exports.unstable_now = function () {
return localDate.now() - initialTime;
};
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
localClearTimeout =
"function" === typeof clearTimeout ? clearTimeout : null,
localSetImmediate =
"undefined" !== typeof setImmediate ? setImmediate : null,
isMessageLoopRunning = !1,
taskTimeoutID = -1,
frameInterval = 5,
startTime = -1;
if ("function" === typeof localSetImmediate)
var schedulePerformWorkUntilDeadline = function () {
localSetImmediate(performWorkUntilDeadline);
};
else if ("undefined" !== typeof MessageChannel) {
var channel = new MessageChannel(),
port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function () {
port.postMessage(null);
};
} else
schedulePerformWorkUntilDeadline = function () {
localSetTimeout(performWorkUntilDeadline, 0);
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_continueExecution = function () {
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), requestHostCallback());
};
exports.unstable_forceFrameRate = function (fps) {
0 > fps || 125 < fps
? console.error(
"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
)
: (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_getFirstCallbackNode = function () {
return peek(taskQueue);
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_pauseExecution = function () {};
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = exports.unstable_now();
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
: (isHostTimeoutScheduled = !0),
requestHostTimeout(handleTimeout, options - currentTime)))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), requestHostCallback()));
return priorityLevel;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();

View File

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

View File

@@ -0,0 +1,37 @@
import { APIError } from 'payload';
import toSnakeCase from 'to-snake-case';
/**
* Used to name database enums and tables
* Returns the table or enum name for a given entity
*/ export const createTableName = ({ adapter, config: { name, slug }, config, parentTableName, prefix = '', target = 'dbName', throwValidationError = false, versions = false, versionsCustomName = false })=>{
let customNameDefinition = config[target];
let defaultTableName = `${prefix}${toSnakeCase(name ?? slug)}`;
if (versions) {
defaultTableName = `_${defaultTableName}${adapter.versionsSuffix}`;
}
let customTableNameResult;
if (!customNameDefinition && target === 'enumName') {
customNameDefinition = config['dbName'];
}
if (customNameDefinition) {
customTableNameResult = typeof customNameDefinition === 'function' ? customNameDefinition({
tableName: parentTableName
}) : customNameDefinition;
if (versionsCustomName) {
customTableNameResult = `_${customTableNameResult}${adapter.versionsSuffix}`;
}
}
const result = customTableNameResult || defaultTableName;
adapter.tableNameMap.set(defaultTableName, result);
if (!throwValidationError) {
return result;
}
if (result.length > 63) {
throw new APIError(`Exceeded max identifier length for table or enum name of 63 characters. Invalid name: ${result}.
Tip: You can use the dbName property to reduce the table name length.
`);
}
return result;
};
//# sourceMappingURL=createTableName.js.map

View File

@@ -0,0 +1,10 @@
import { consoleLoggingIntegrationShim, feedbackIntegrationShim, loggerShim } from '@sentry-internal/integration-shims';
export * from './index.bundle.base';
export { consoleLoggingIntegrationShim as consoleLoggingIntegration, loggerShim as logger };
export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
export { reportPageLoaded } from './tracing/reportPageLoaded';
export { setActiveSpanInBrowser } from './tracing/setActiveSpan';
export { feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration };
export { replayIntegration, getReplay } from '@sentry-internal/replay';
//# sourceMappingURL=index.bundle.tracing.replay.d.ts.map

View File

@@ -0,0 +1,60 @@
import type { ContextOptions, Interval } from "./types.js";
/**
* The {@link areIntervalsOverlapping} function options.
*/
export interface AreIntervalsOverlappingOptions extends ContextOptions<Date> {
/** Whether the comparison is inclusive or not */
inclusive?: boolean;
}
/**
* @name areIntervalsOverlapping
* @category Interval Helpers
* @summary Is the given time interval overlapping with another time interval?
*
* @description
* Is the given time interval overlapping with another time interval? Adjacent intervals do not count as overlapping unless `inclusive` is set to `true`.
*
* @param intervalLeft - The first interval to compare.
* @param intervalRight - The second interval to compare.
* @param options - The object with options
*
* @returns Whether the time intervals are overlapping
*
* @example
* // For overlapping time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) }
* )
* //=> true
*
* @example
* // For non-overlapping time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) }
* )
* //=> false
*
* @example
* // For adjacent time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 20), end: new Date(2014, 0, 30) }
* )
* //=> false
*
* @example
* // Using the inclusive option:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 20), end: new Date(2014, 0, 24) },
* { inclusive: true }
* )
* //=> true
*/
export declare function areIntervalsOverlapping(
intervalLeft: Interval,
intervalRight: Interval,
options?: AreIntervalsOverlappingOptions,
): boolean;

View File

@@ -0,0 +1,43 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const worldwide = require('../utils/worldwide.js');
const handlers = require('./handlers.js');
let _oldOnUnhandledRejectionHandler = null;
/**
* Add an instrumentation handler for when an unhandled promise rejection is captured.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
function addGlobalUnhandledRejectionInstrumentationHandler(
handler,
) {
const type = 'unhandledrejection';
handlers.addHandler(type, handler);
handlers.maybeInstrument(type, instrumentUnhandledRejection);
}
function instrumentUnhandledRejection() {
_oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection;
// Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')
// is that we are using this handler in the Loader Script, to handle buffered rejections consistently
worldwide.GLOBAL_OBJ.onunhandledrejection = function (e) {
const handlerData = e;
handlers.triggerHandlers('unhandledrejection', handlerData);
if (_oldOnUnhandledRejectionHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnUnhandledRejectionHandler.apply(this, arguments);
}
return true;
};
worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
}
exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler;
//# sourceMappingURL=globalUnhandledRejection.js.map

View File

@@ -0,0 +1,152 @@
"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.Tracer = void 0;
const api = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const Span_1 = require("./Span");
const utility_1 = require("./utility");
const platform_1 = require("./platform");
/**
* This class represents a basic tracer.
*/
class Tracer {
_sampler;
_generalLimits;
_spanLimits;
_idGenerator;
instrumentationScope;
_resource;
_spanProcessor;
/**
* Constructs a new Tracer instance.
*/
constructor(instrumentationScope, config, resource, spanProcessor) {
const localConfig = (0, utility_1.mergeConfig)(config);
this._sampler = localConfig.sampler;
this._generalLimits = localConfig.generalLimits;
this._spanLimits = localConfig.spanLimits;
this._idGenerator = config.idGenerator || new platform_1.RandomIdGenerator();
this._resource = resource;
this._spanProcessor = spanProcessor;
this.instrumentationScope = instrumentationScope;
}
/**
* Starts a new Span or returns the default NoopSpan based on the sampling
* decision.
*/
startSpan(name, options = {}, context = api.context.active()) {
// remove span from context in case a root span is requested via options
if (options.root) {
context = api.trace.deleteSpan(context);
}
const parentSpan = api.trace.getSpan(context);
if ((0, core_1.isTracingSuppressed)(context)) {
api.diag.debug('Instrumentation suppressed, returning Noop Span');
const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
return nonRecordingSpan;
}
const parentSpanContext = parentSpan?.spanContext();
const spanId = this._idGenerator.generateSpanId();
let validParentSpanContext;
let traceId;
let traceState;
if (!parentSpanContext ||
!api.trace.isSpanContextValid(parentSpanContext)) {
// New root span.
traceId = this._idGenerator.generateTraceId();
}
else {
// New child span.
traceId = parentSpanContext.traceId;
traceState = parentSpanContext.traceState;
validParentSpanContext = parentSpanContext;
}
const spanKind = options.kind ?? api.SpanKind.INTERNAL;
const links = (options.links ?? []).map(link => {
return {
context: link.context,
attributes: (0, core_1.sanitizeAttributes)(link.attributes),
};
});
const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
// make sampling decision
const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);
traceState = samplingResult.traceState ?? traceState;
const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED
? api.TraceFlags.SAMPLED
: api.TraceFlags.NONE;
const spanContext = { traceId, spanId, traceFlags, traceState };
if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {
api.diag.debug('Recording is off, propagating context in a non-recording span');
const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);
return nonRecordingSpan;
}
// Set initial span attributes. The attributes object may have been mutated
// by the sampler, so we sanitize the merged attributes before setting them.
const initAttributes = (0, core_1.sanitizeAttributes)(Object.assign(attributes, samplingResult.attributes));
const span = new Span_1.SpanImpl({
resource: this._resource,
scope: this.instrumentationScope,
context,
spanContext,
name,
kind: spanKind,
links,
parentSpanContext: validParentSpanContext,
attributes: initAttributes,
startTime: options.startTime,
spanProcessor: this._spanProcessor,
spanLimits: this._spanLimits,
});
return span;
}
startActiveSpan(name, arg2, arg3, arg4) {
let opts;
let ctx;
let fn;
if (arguments.length < 2) {
return;
}
else if (arguments.length === 2) {
fn = arg2;
}
else if (arguments.length === 3) {
opts = arg2;
fn = arg3;
}
else {
opts = arg2;
ctx = arg3;
fn = arg4;
}
const parentContext = ctx ?? api.context.active();
const span = this.startSpan(name, opts, parentContext);
const contextWithSpanSet = api.trace.setSpan(parentContext, span);
return api.context.with(contextWithSpanSet, fn, undefined, span);
}
/** Returns the active {@link GeneralLimits}. */
getGeneralLimits() {
return this._generalLimits;
}
/** Returns the active {@link SpanLimits}. */
getSpanLimits() {
return this._spanLimits;
}
}
exports.Tracer = Tracer;
//# sourceMappingURL=Tracer.js.map

View File

@@ -0,0 +1,101 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "mwens pase yon segond",
other: "mwens pase {{count}} segond",
},
xSeconds: {
one: "1 segond",
other: "{{count}} segond",
},
halfAMinute: "30 segond",
lessThanXMinutes: {
one: "mwens pase yon minit",
other: "mwens pase {{count}} minit",
},
xMinutes: {
one: "1 minit",
other: "{{count}} minit",
},
aboutXHours: {
one: "anviwon inè",
other: "anviwon {{count}} è",
},
xHours: {
one: "1 lè",
other: "{{count}} lè",
},
xDays: {
one: "1 jou",
other: "{{count}} jou",
},
aboutXWeeks: {
one: "anviwon 1 semèn",
other: "anviwon {{count}} semèn",
},
xWeeks: {
one: "1 semèn",
other: "{{count}} semèn",
},
aboutXMonths: {
one: "anviwon 1 mwa",
other: "anviwon {{count}} mwa",
},
xMonths: {
one: "1 mwa",
other: "{{count}} mwa",
},
aboutXYears: {
one: "anviwon 1 an",
other: "anviwon {{count}} an",
},
xYears: {
one: "1 an",
other: "{{count}} an",
},
overXYears: {
one: "plis pase 1 an",
other: "plis pase {{count}} an",
},
almostXYears: {
one: "prèske 1 an",
other: "prèske {{count}} an",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "nan " + result;
} else {
return "sa fè " + result;
}
}
return result;
};

View File

@@ -0,0 +1,9 @@
/**
* Triggers an event on a given element.
*
* @param node the element
* @param eventName the event name to trigger
* @param bubbles whether the event should bubble up
* @param cancelable whether the event should be cancelable
*/
export default function triggerEvent<K extends keyof HTMLElementEventMap>(node: HTMLElement | null, eventName: K, bubbles?: boolean, cancelable?: boolean): void;

View File

@@ -0,0 +1,120 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule;
exports.KnownArgumentNamesRule = KnownArgumentNamesRule;
var _didYouMean = require('../../jsutils/didYouMean.js');
var _suggestionList = require('../../jsutils/suggestionList.js');
var _GraphQLError = require('../../error/GraphQLError.js');
var _kinds = require('../../language/kinds.js');
var _directives = require('../../type/directives.js');
/**
* Known argument names
*
* A GraphQL field is only valid if all supplied arguments are defined by
* that field.
*
* See https://spec.graphql.org/draft/#sec-Argument-Names
* See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations
*/
function KnownArgumentNamesRule(context) {
return {
// eslint-disable-next-line new-cap
...KnownArgumentNamesOnDirectivesRule(context),
Argument(argNode) {
const argDef = context.getArgument();
const fieldDef = context.getFieldDef();
const parentType = context.getParentType();
if (!argDef && fieldDef && parentType) {
const argName = argNode.name.value;
const knownArgsNames = fieldDef.args.map((arg) => arg.name);
const suggestions = (0, _suggestionList.suggestionList)(
argName,
knownArgsNames,
);
context.reportError(
new _GraphQLError.GraphQLError(
`Unknown argument "${argName}" on field "${parentType.name}.${fieldDef.name}".` +
(0, _didYouMean.didYouMean)(suggestions),
{
nodes: argNode,
},
),
);
}
},
};
}
/**
* @internal
*/
function KnownArgumentNamesOnDirectivesRule(context) {
const directiveArgs = Object.create(null);
const schema = context.getSchema();
const definedDirectives = schema
? schema.getDirectives()
: _directives.specifiedDirectives;
for (const directive of definedDirectives) {
directiveArgs[directive.name] = directive.args.map((arg) => arg.name);
}
const astDefinitions = context.getDocument().definitions;
for (const def of astDefinitions) {
if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {
var _def$arguments;
// FIXME: https://github.com/graphql/graphql-js/issues/2203
/* c8 ignore next */
const argsNodes =
(_def$arguments = def.arguments) !== null && _def$arguments !== void 0
? _def$arguments
: [];
directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value);
}
}
return {
Directive(directiveNode) {
const directiveName = directiveNode.name.value;
const knownArgs = directiveArgs[directiveName];
if (directiveNode.arguments && knownArgs) {
for (const argNode of directiveNode.arguments) {
const argName = argNode.name.value;
if (!knownArgs.includes(argName)) {
const suggestions = (0, _suggestionList.suggestionList)(
argName,
knownArgs,
);
context.reportError(
new _GraphQLError.GraphQLError(
`Unknown argument "${argName}" on directive "@${directiveName}".` +
(0, _didYouMean.didYouMean)(suggestions),
{
nodes: argNode,
},
),
);
}
}
}
return false;
},
};
}

View File

@@ -0,0 +1,8 @@
import { mirrorEasing } from './modifiers/mirror.mjs';
import { reverseEasing } from './modifiers/reverse.mjs';
const circIn = (p) => 1 - Math.sin(Math.acos(p));
const circOut = reverseEasing(circIn);
const circInOut = mirrorEasing(circIn);
export { circIn, circInOut, circOut };

View File

@@ -0,0 +1,72 @@
"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 double_exports = {};
__export(double_exports, {
SingleStoreDouble: () => SingleStoreDouble,
SingleStoreDoubleBuilder: () => SingleStoreDoubleBuilder,
double: () => double
});
module.exports = __toCommonJS(double_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreDoubleBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDoubleBuilder";
constructor(name, config) {
super(name, "number", "SingleStoreDouble");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDouble(
table,
this.config
);
}
}
class SingleStoreDouble extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDouble";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `double(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "double";
} else {
type += `double(${this.precision})`;
}
return this.unsigned ? `${type} unsigned` : type;
}
}
function double(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new SingleStoreDoubleBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreDouble,
SingleStoreDoubleBuilder,
double
});
//# sourceMappingURL=double.cjs.map

View File

@@ -0,0 +1,34 @@
import { entityKind } from "../../../entity.js";
import { getColumnNameAndConfig } from "../../../utils.js";
import { PgColumn, PgColumnBuilder } from "../common.js";
class PgSparseVectorBuilder extends PgColumnBuilder {
static [entityKind] = "PgSparseVectorBuilder";
constructor(name, config) {
super(name, "string", "PgSparseVector");
this.config.dimensions = config.dimensions;
}
/** @internal */
build(table) {
return new PgSparseVector(
table,
this.config
);
}
}
class PgSparseVector extends PgColumn {
static [entityKind] = "PgSparseVector";
dimensions = this.config.dimensions;
getSQLType() {
return `sparsevec(${this.dimensions})`;
}
}
function sparsevec(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new PgSparseVectorBuilder(name, config);
}
export {
PgSparseVector,
PgSparseVectorBuilder,
sparsevec
};
//# sourceMappingURL=sparsevec.js.map

View File

@@ -0,0 +1,4 @@
export declare const startOfISOWeekYear: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=t=>()=>(e(t,`Keys cannot be empty`),{path:`/shares`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e(String(t),`Key cannot be empty`),{path:`/shares/${t}`,method:`DELETE`});export{n as deleteShare,t as deleteShares};
//# sourceMappingURL=shares.js.map

View File

@@ -0,0 +1,41 @@
import { px } from '../../value/types/numbers/units.mjs';
function pixelsToPercent(pixels, axis) {
if (axis.max === axis.min)
return 0;
return (pixels / (axis.max - axis.min)) * 100;
}
/**
* We always correct borderRadius as a percentage rather than pixels to reduce paints.
* For example, if you are projecting a box that is 100px wide with a 10px borderRadius
* into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
* borderRadius in both states. If we animate between the two in pixels that will trigger
* a paint each time. If we animate between the two in percentage we'll avoid a paint.
*/
const correctBorderRadius = {
correct: (latest, node) => {
if (!node.target)
return latest;
/**
* If latest is a string, if it's a percentage we can return immediately as it's
* going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
*/
if (typeof latest === "string") {
if (px.test(latest)) {
latest = parseFloat(latest);
}
else {
return latest;
}
}
/**
* If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
* pixel value as a percentage of each axis
*/
const x = pixelsToPercent(latest, node.target.x);
const y = pixelsToPercent(latest, node.target.y);
return `${x}% ${y}%`;
},
};
export { correctBorderRadius, pixelsToPercent };

View File

@@ -0,0 +1 @@
{"version":3,"file":"fan.js","sources":["../../../src/icons/fan.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Fan\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAuODI3IDE2LjM3OWE2LjA4MiA2LjA4MiAwIDAgMS04LjYxOC03LjAwMmw1LjQxMiAxLjQ1YTYuMDgyIDYuMDgyIDAgMCAxIDcuMDAyLTguNjE4bC0xLjQ1IDUuNDEyYTYuMDgyIDYuMDgyIDAgMCAxIDguNjE4IDcuMDAybC01LjQxMi0xLjQ1YTYuMDgyIDYuMDgyIDAgMCAxLTcuMDAyIDguNjE4bDEuNDUtNS40MTJaIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMnYuMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/fan\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 Fan = createLucideIcon('Fan', [\n [\n 'path',\n {\n d: 'M10.827 16.379a6.082 6.082 0 0 1-8.618-7.002l5.412 1.45a6.082 6.082 0 0 1 7.002-8.618l-1.45 5.412a6.082 6.082 0 0 1 8.618 7.002l-5.412-1.45a6.082 6.082 0 0 1-7.002 8.618l1.45-5.412Z',\n key: '484a7f',\n },\n ],\n ['path', { d: 'M12 12v.01', key: 'u5ubse' }],\n]);\n\nexport default Fan;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "eeee 'passat a' p",
yesterday: "'ièr a' p",
today: "'uèi a' p",
tomorrow: "'deman a' p",
nextWeek: "eeee 'a' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

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

View File

@@ -0,0 +1,505 @@
/***********************************************************************
A JavaScript tokenizer / parser / beautifier / compressor.
https://github.com/mishoo/UglifyJS2
-------------------------------- (C) ---------------------------------
Author: Mihai Bazon
<mihai.bazon@gmail.com>
http://mihai.bazon.net/blog
Distributed under the BSD license:
Copyright 2012 (c) Mihai Bazon <mihai.bazon@gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
***********************************************************************/
import {
AST_Accessor,
AST_Assign,
AST_BlockStatement,
AST_Call,
AST_Class,
AST_ClassExpression,
AST_ClassStaticBlock,
AST_DefaultAssign,
AST_DefClass,
AST_Definitions,
AST_Defun,
AST_Destructuring,
AST_EmptyStatement,
AST_Expansion,
AST_Export,
AST_For,
AST_ForIn,
AST_Function,
AST_LabeledStatement,
AST_Lambda,
AST_Number,
AST_Scope,
AST_Sequence,
AST_SimpleStatement,
AST_SymbolBlockDeclaration,
AST_SymbolCatch,
AST_SymbolDeclaration,
AST_SymbolFunarg,
AST_SymbolRef,
AST_SymbolVar,
AST_Toplevel,
AST_Unary,
AST_Var,
TreeTransformer,
TreeWalker,
walk,
} from "../ast.js";
import {
keep_name,
make_node,
map_add,
MAP,
remove,
return_false,
} from "../utils/index.js";
import { SymbolDef } from "../scope.js";
import {
WRITE_ONLY,
UNUSED,
has_flag,
set_flag,
} from "./compressor-flags.js";
import {
make_sequence,
maintain_this_binding,
is_empty,
is_ref_of,
can_be_evicted_from_block,
} from "./common.js";
import { is_used_in_expression } from "./inference.js";
const r_keep_assign = /keep_assign/;
/** Drop unused variables from this scope */
AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
if (!compressor.option("unused")) return;
if (compressor.has_directive("use asm")) return;
if (!this.variables) return; // not really a scope (eg: AST_Class)
var self = this;
if (self.pinned()) return;
var drop_funcs = !(self instanceof AST_Toplevel) || compressor.toplevel.funcs;
var drop_vars = !(self instanceof AST_Toplevel) || compressor.toplevel.vars;
const assign_as_unused = r_keep_assign.test(compressor.option("unused")) ? return_false : function(node) {
if (node instanceof AST_Assign
&& !node.logical
&& (has_flag(node, WRITE_ONLY) || node.operator == "=")
) {
return node.left;
}
if (node instanceof AST_Unary && has_flag(node, WRITE_ONLY)) {
return node.expression;
}
};
var in_use_ids = new Map();
var fixed_ids = new Map();
if (self instanceof AST_Toplevel && compressor.top_retain) {
self.variables.forEach(function(def) {
if (compressor.top_retain(def)) {
in_use_ids.set(def.id, def);
}
});
}
var var_defs_by_id = new Map();
var initializations = new Map();
// pass 1: find out which symbols are directly used in
// this scope (not in nested scopes).
var scope = this;
var tw = new TreeWalker(function(node, descend) {
if (node instanceof AST_Lambda && node.uses_arguments && !tw.has_directive("use strict")) {
node.argnames.forEach(function(argname) {
if (!(argname instanceof AST_SymbolDeclaration)) return;
var def = argname.definition();
in_use_ids.set(def.id, def);
});
}
if (node === self) return;
if (node instanceof AST_Class && node.has_side_effects(compressor)) {
if (node.is_self_referential()) {
descend();
} else {
node.visit_nondeferred_class_parts(tw);
}
}
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
var node_def = node.name.definition();
const in_export = tw.parent() instanceof AST_Export;
if (in_export || !drop_funcs && scope === self) {
if (node_def.global) {
in_use_ids.set(node_def.id, node_def);
}
}
map_add(initializations, node_def.id, node);
return true; // don't go in nested scopes
}
// In the root scope, we drop things. In inner scopes, we just check for uses.
const in_root_scope = scope === self;
if (node instanceof AST_SymbolFunarg && in_root_scope) {
map_add(var_defs_by_id, node.definition().id, node);
}
if (node instanceof AST_Definitions && in_root_scope) {
const in_export = tw.parent() instanceof AST_Export;
node.definitions.forEach(function(def) {
if (def.name instanceof AST_SymbolVar) {
map_add(var_defs_by_id, def.name.definition().id, def);
}
if (in_export || !drop_vars) {
walk(def.name, node => {
if (node instanceof AST_SymbolDeclaration) {
const def = node.definition();
if (def.global) {
in_use_ids.set(def.id, def);
}
}
});
}
if (def.name instanceof AST_Destructuring) {
def.walk(tw);
}
if (def.name instanceof AST_SymbolDeclaration && def.value) {
var node_def = def.name.definition();
map_add(initializations, node_def.id, def.value);
if (!node_def.chained && def.name.fixed_value() === def.value) {
fixed_ids.set(node_def.id, def);
}
if (def.value.has_side_effects(compressor)) {
def.value.walk(tw);
}
}
});
return true;
}
return scan_ref_scoped(node, descend);
});
self.walk(tw);
// pass 2: for every used symbol we need to walk its
// initialization code to figure out if it uses other
// symbols (that may not be in_use).
tw = new TreeWalker(scan_ref_scoped);
in_use_ids.forEach(function (def) {
var init = initializations.get(def.id);
if (init) init.forEach(function(init) {
init.walk(tw);
});
});
// pass 3: we should drop declarations not in_use
var tt = new TreeTransformer(
function before(node, descend, in_list) {
var parent = tt.parent();
if (drop_vars) {
const sym = assign_as_unused(node);
if (sym instanceof AST_SymbolRef) {
var def = sym.definition();
var in_use = in_use_ids.has(def.id);
if (node instanceof AST_Assign) {
if (!in_use || fixed_ids.has(def.id) && fixed_ids.get(def.id) !== node) {
const assignee = node.right.transform(tt);
if (!in_use && !assignee.has_side_effects(compressor) && !is_used_in_expression(tt)) {
return in_list ? MAP.skip : make_node(AST_Number, node, { value: 0 });
}
return maintain_this_binding(parent, node, assignee);
}
} else if (!in_use) {
return in_list ? MAP.skip : make_node(AST_Number, node, { value: 0 });
}
}
}
if (scope !== self) return;
var def;
if (node.name
&& (node instanceof AST_ClassExpression
&& !keep_name(compressor.option("keep_classnames"), (def = node.name.definition()).name)
|| node instanceof AST_Function
&& !keep_name(compressor.option("keep_fnames"), (def = node.name.definition()).name))) {
// any declarations with same name will overshadow
// name of this anonymous function and can therefore
// never be used anywhere
if (!in_use_ids.has(def.id) || def.orig.length > 1) node.name = null;
}
if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) {
var trim =
!compressor.option("keep_fargs")
// Is this an IIFE that won't refer to its name?
|| parent instanceof AST_Call
&& parent.expression === node
&& !node.pinned()
&& (!node.name || node.name.unreferenced());
for (var a = node.argnames, i = a.length; --i >= 0;) {
var sym = a[i];
if (sym instanceof AST_Expansion) {
sym = sym.expression;
}
if (sym instanceof AST_DefaultAssign) {
sym = sym.left;
}
// Do not drop destructuring arguments.
// They constitute a type assertion of sorts
if (
!(sym instanceof AST_Destructuring)
&& !in_use_ids.has(sym.definition().id)
) {
set_flag(sym, UNUSED);
if (trim) {
a.pop();
}
} else {
trim = false;
}
}
}
if (node instanceof AST_DefClass && node !== self) {
const def = node.name.definition();
descend(node, this);
const keep_class = def.global && !drop_funcs || in_use_ids.has(def.id);
if (!keep_class) {
const kept = node.drop_side_effect_free(compressor);
if (kept == null) {
def.eliminated++;
return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
}
return kept;
}
return node;
}
if (node instanceof AST_Defun && node !== self) {
const def = node.name.definition();
const keep = def.global && !drop_funcs || in_use_ids.has(def.id);
if (!keep) {
def.eliminated++;
return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
}
}
if (node instanceof AST_Definitions && !(parent instanceof AST_ForIn && parent.init === node)) {
var drop_block = !(parent instanceof AST_Toplevel) && !(node instanceof AST_Var);
// place uninitialized names at the start
var body = [], head = [], tail = [];
// for unused names whose initialization has
// side effects, we can cascade the init. code
// into the next one, or next statement.
var side_effects = [];
node.definitions.forEach(function(def) {
if (def.value) def.value = def.value.transform(tt);
var is_destructure = def.name instanceof AST_Destructuring;
var sym = is_destructure
? new SymbolDef(null, { name: "<destructure>" }) /* fake SymbolDef */
: def.name.definition();
if (drop_block && sym.global) return tail.push(def);
if (!(drop_vars || drop_block)
|| is_destructure
&& (def.name.names.length
|| def.name.is_array
|| compressor.option("pure_getters") != true)
|| in_use_ids.has(sym.id)
) {
if (def.value && fixed_ids.has(sym.id) && fixed_ids.get(sym.id) !== def) {
def.value = def.value.drop_side_effect_free(compressor);
}
if (def.name instanceof AST_SymbolVar) {
var var_defs = var_defs_by_id.get(sym.id);
if (var_defs.length > 1 && (!def.value || sym.orig.indexOf(def.name) > sym.eliminated)) {
if (def.value) {
var ref = make_node(AST_SymbolRef, def.name, def.name);
sym.references.push(ref);
var assign = make_node(AST_Assign, def, {
operator: "=",
logical: false,
left: ref,
right: def.value
});
if (fixed_ids.get(sym.id) === def) {
fixed_ids.set(sym.id, assign);
}
side_effects.push(assign.transform(tt));
}
remove(var_defs, def);
sym.eliminated++;
return;
}
}
if (def.value) {
if (side_effects.length > 0) {
if (tail.length > 0) {
side_effects.push(def.value);
def.value = make_sequence(def.value, side_effects);
} else {
body.push(make_node(AST_SimpleStatement, node, {
body: make_sequence(node, side_effects)
}));
}
side_effects = [];
}
tail.push(def);
} else {
head.push(def);
}
} else if (sym.orig[0] instanceof AST_SymbolCatch) {
var value = def.value && def.value.drop_side_effect_free(compressor);
if (value) side_effects.push(value);
def.value = null;
head.push(def);
} else {
var value = def.value && def.value.drop_side_effect_free(compressor);
if (value) {
side_effects.push(value);
}
sym.eliminated++;
}
});
if (head.length > 0 || tail.length > 0) {
node.definitions = head.concat(tail);
body.push(node);
}
if (side_effects.length > 0) {
body.push(make_node(AST_SimpleStatement, node, {
body: make_sequence(node, side_effects)
}));
}
switch (body.length) {
case 0:
return in_list ? MAP.skip : make_node(AST_EmptyStatement, node);
case 1:
return body[0];
default:
return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { body });
}
}
// certain combination of unused name + side effect leads to:
// https://github.com/mishoo/UglifyJS2/issues/44
// https://github.com/mishoo/UglifyJS2/issues/1830
// https://github.com/mishoo/UglifyJS2/issues/1838
// that's an invalid AST.
// We fix it at this stage by moving the `var` outside the `for`.
if (node instanceof AST_For) {
descend(node, this);
var block;
if (node.init instanceof AST_BlockStatement) {
block = node.init;
node.init = block.body.pop();
block.body.push(node);
}
if (node.init instanceof AST_SimpleStatement) {
node.init = node.init.body;
} else if (is_empty(node.init)) {
node.init = null;
}
return !block ? node : in_list ? MAP.splice(block.body) : block;
}
if (node instanceof AST_LabeledStatement
&& node.body instanceof AST_For
) {
descend(node, this);
if (node.body instanceof AST_BlockStatement) {
var block = node.body;
node.body = block.body.pop();
block.body.push(node);
return in_list ? MAP.splice(block.body) : block;
}
return node;
}
if (node instanceof AST_BlockStatement) {
descend(node, this);
if (in_list && node.body.every(can_be_evicted_from_block)) {
return MAP.splice(node.body);
}
return node;
}
if (node instanceof AST_Scope && !(node instanceof AST_ClassStaticBlock)) {
const save_scope = scope;
scope = node;
descend(node, this);
scope = save_scope;
return node;
}
},
function after(node, in_list) {
if (node instanceof AST_Sequence) {
switch (node.expressions.length) {
case 0: return in_list ? MAP.skip : make_node(AST_Number, node, { value: 0 });
case 1: return node.expressions[0];
}
}
}
);
self.transform(tt);
function scan_ref_scoped(node, descend) {
var node_def;
const sym = assign_as_unused(node);
if (sym instanceof AST_SymbolRef
&& !is_ref_of(node.left, AST_SymbolBlockDeclaration)
&& self.variables.get(sym.name) === (node_def = sym.definition())
) {
if (node instanceof AST_Assign) {
node.right.walk(tw);
if (!node_def.chained && node.left.fixed_value() === node.right) {
fixed_ids.set(node_def.id, node);
}
}
return true;
}
if (node instanceof AST_SymbolRef) {
node_def = node.definition();
if (!in_use_ids.has(node_def.id)) {
in_use_ids.set(node_def.id, node_def);
if (node_def.orig[0] instanceof AST_SymbolCatch) {
const redef = node_def.scope.is_block_scope()
&& node_def.scope.get_defun_scope().variables.get(node_def.name);
if (redef) in_use_ids.set(redef.id, redef);
}
}
return true;
}
if (node instanceof AST_Class) {
descend();
return true;
}
if (node instanceof AST_Scope && !(node instanceof AST_ClassStaticBlock)) {
var save_scope = scope;
scope = node;
descend();
scope = save_scope;
return true;
}
}
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"folder-key.js","sources":["../../../src/icons/folder-key.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderKey\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjIwIiByPSIyIiAvPgogIDxwYXRoIGQ9Ik0xMCAyMEg0YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDMuOWEyIDIgMCAwIDEgMS42OS45bC44MSAxLjJhMiAyIDAgMCAwIDEuNjcuOUgyMGEyIDIgMCAwIDEgMiAydjIiIC8+CiAgPHBhdGggZD0ibTIyIDE0LTQuNSA0LjUiIC8+CiAgPHBhdGggZD0ibTIxIDE1IDEgMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/folder-key\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 FolderKey = createLucideIcon('FolderKey', [\n ['circle', { cx: '16', cy: '20', r: '2', key: '1vifvg' }],\n [\n 'path',\n {\n d: 'M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2',\n key: '3hgo9p',\n },\n ],\n ['path', { d: 'm22 14-4.5 4.5', key: '1ef6z8' }],\n ['path', { d: 'm21 15 1 1', key: '1ejcpy' }],\n]);\n\nexport default FolderKey;\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,CAC9C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/database/createDatabaseAdapter.ts"],"sourcesContent":["import type { MarkOptional } from 'ts-essentials'\n\nimport type {\n BaseDatabaseAdapter,\n BeginTransaction,\n CommitTransaction,\n RollbackTransaction,\n} from './types.js'\n\nimport { defaultUpdateJobs } from './defaultUpdateJobs.js'\nimport { createMigration } from './migrations/createMigration.js'\nimport { migrate } from './migrations/migrate.js'\nimport { migrateDown } from './migrations/migrateDown.js'\nimport { migrateRefresh } from './migrations/migrateRefresh.js'\nimport { migrateReset } from './migrations/migrateReset.js'\nimport { migrateStatus } from './migrations/migrateStatus.js'\n\nconst beginTransaction: BeginTransaction = () => Promise.resolve(null)\n// @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\nconst rollbackTransaction: RollbackTransaction = () => Promise.resolve(null)\n// @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\nconst commitTransaction: CommitTransaction = () => Promise.resolve(null)\n\nexport function createDatabaseAdapter<T extends BaseDatabaseAdapter>(\n args: MarkOptional<\n T,\n | 'allowIDOnCreate'\n | 'bulkOperationsSingleTransaction'\n | 'createMigration'\n | 'migrate'\n | 'migrateDown'\n | 'migrateFresh'\n | 'migrateRefresh'\n | 'migrateReset'\n | 'migrateStatus'\n | 'migrationDir'\n | 'updateJobs'\n >,\n): T {\n return {\n // Default 'null' transaction functions\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n beginTransaction,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n commitTransaction,\n createMigration,\n migrate,\n migrateDown,\n migrateFresh: () => Promise.resolve(null),\n migrateRefresh,\n migrateReset,\n migrateStatus,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n rollbackTransaction,\n updateJobs: defaultUpdateJobs,\n\n ...args,\n // Ensure migrationDir is set\n migrationDir: args.migrationDir || 'migrations',\n // Set default for bulkOperationsSingleTransaction if not provided\n bulkOperationsSingleTransaction: args.bulkOperationsSingleTransaction ?? false,\n } as T\n}\n"],"names":["defaultUpdateJobs","createMigration","migrate","migrateDown","migrateRefresh","migrateReset","migrateStatus","beginTransaction","Promise","resolve","rollbackTransaction","commitTransaction","createDatabaseAdapter","args","migrateFresh","updateJobs","migrationDir","bulkOperationsSingleTransaction"],"mappings":"AASA,SAASA,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,eAAe,QAAQ,kCAAiC;AACjE,SAASC,OAAO,QAAQ,0BAAyB;AACjD,SAASC,WAAW,QAAQ,8BAA6B;AACzD,SAASC,cAAc,QAAQ,iCAAgC;AAC/D,SAASC,YAAY,QAAQ,+BAA8B;AAC3D,SAASC,aAAa,QAAQ,gCAA+B;AAE7D,MAAMC,mBAAqC,IAAMC,QAAQC,OAAO,CAAC;AACjE,oFAAoF;AACpF,MAAMC,sBAA2C,IAAMF,QAAQC,OAAO,CAAC;AACvE,oFAAoF;AACpF,MAAME,oBAAuC,IAAMH,QAAQC,OAAO,CAAC;AAEnE,OAAO,SAASG,sBACdC,IAaC;IAED,OAAO;QACL,uCAAuC;QACvC,oFAAoF;QACpFN;QACA,oFAAoF;QACpFI;QACAV;QACAC;QACAC;QACAW,cAAc,IAAMN,QAAQC,OAAO,CAAC;QACpCL;QACAC;QACAC;QACA,oFAAoF;QACpFI;QACAK,YAAYf;QAEZ,GAAGa,IAAI;QACP,6BAA6B;QAC7BG,cAAcH,KAAKG,YAAY,IAAI;QACnC,kEAAkE;QAClEC,iCAAiCJ,KAAKI,+BAA+B,IAAI;IAC3E;AACF"}

View File

@@ -0,0 +1,25 @@
import type { Integration } from '@sentry/core';
export interface NativeNodeFetchIntegrationOptions {
/**
* Whether breadcrumbs should be recorded for requests.
*
* @default `true`
*/
breadcrumbs?: boolean;
/**
* Do not capture breadcrumbs or inject headers for outgoing fetch requests to URLs
* where the given callback returns `true`.
*
* @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.
*/
ignoreOutgoingRequests?: (url: string) => boolean;
}
/**
* This integration handles outgoing fetch (undici) requests in light mode (without OpenTelemetry).
* It propagates trace headers and creates breadcrumbs for responses.
*/
export declare const nativeNodeFetchIntegration: (options?: NativeNodeFetchIntegrationOptions) => Integration & {
name: "NodeFetch";
setupOnce: () => void;
};
//# sourceMappingURL=nativeNodeFetchIntegration.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"meh.js","sources":["../../../src/icons/meh.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Meh\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8bGluZSB4MT0iOCIgeDI9IjE2IiB5MT0iMTUiIHkyPSIxNSIgLz4KICA8bGluZSB4MT0iOSIgeDI9IjkuMDEiIHkxPSI5IiB5Mj0iOSIgLz4KICA8bGluZSB4MT0iMTUiIHgyPSIxNS4wMSIgeTE9IjkiIHkyPSI5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/meh\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 Meh = createLucideIcon('Meh', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['line', { x1: '8', x2: '16', y1: '15', y2: '15', key: '1xb1d9' }],\n ['line', { x1: '9', x2: '9.01', y1: '9', y2: '9', key: 'yxxnd0' }],\n ['line', { x1: '15', x2: '15.01', y1: '9', y2: '9', key: '1p4y9e' }],\n]);\n\nexport default Meh;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,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,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,29 @@
"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.diag = void 0;
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
const diag_1 = require("./api/diag");
/**
* Entrypoint for Diag API.
* Defines Diagnostic handler used for internal diagnostic logging operations.
* The default provides a Noop DiagLogger implementation which may be changed via the
* diag.setLogger(logger: DiagLogger) function.
*/
exports.diag = diag_1.DiagAPI.instance();
//# sourceMappingURL=diag-api.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"separator-vertical.js","sources":["../../../src/icons/separator-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SeparatorVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMTIiIHgyPSIxMiIgeTE9IjMiIHkyPSIyMSIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSI4IDggNCAxMiA4IDE2IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjE2IDE2IDIwIDEyIDE2IDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/separator-vertical\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 SeparatorVertical = createLucideIcon('SeparatorVertical', [\n ['line', { x1: '12', x2: '12', y1: '3', y2: '21', key: '1efggb' }],\n ['polyline', { points: '8 8 4 12 8 16', key: 'bnfmv4' }],\n ['polyline', { points: '16 16 20 12 16 8', key: 'u90052' }],\n]);\n\nexport default SeparatorVertical;\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,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAC9D,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,CAAA;AAAA,CAAA,CACjE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"message-circle.js","sources":["../../../src/icons/message-circle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageCircle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNy45IDIwQTkgOSAwIDEgMCA0IDE2LjFMMiAyMloiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/message-circle\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 MessageCircle = createLucideIcon('MessageCircle', [\n ['path', { d: 'M7.9 20A9 9 0 1 0 4 16.1L2 22Z', key: 'vv11sd' }],\n]);\n\nexport default MessageCircle;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACjE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvZGVlcC1waWNrL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBbnlSZWNvcmQgfSBmcm9tIFwiLi4vYW55LXJlY29yZFwiO1xuaW1wb3J0IHsgQnVpbHRpbiB9IGZyb20gXCIuLi9idWlsdC1pblwiO1xuXG5leHBvcnQgdHlwZSBEZWVwUGljazxUeXBlLCBGaWx0ZXI+ID0gVHlwZSBleHRlbmRzIEJ1aWx0aW5cbiAgPyBUeXBlXG4gIDogVHlwZSBleHRlbmRzIE1hcDxpbmZlciBLZXlzLCBpbmZlciBWYWx1ZXM+XG4gID8gRmlsdGVyIGV4dGVuZHMgTWFwPEtleXMsIGluZmVyIEZpbHRlclZhbHVlcz5cbiAgICA/IE1hcDxLZXlzLCBEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFJlYWRvbmx5TWFwPGluZmVyIEtleXMsIGluZmVyIFZhbHVlcz5cbiAgPyBGaWx0ZXIgZXh0ZW5kcyBSZWFkb25seU1hcDxLZXlzLCBpbmZlciBGaWx0ZXJWYWx1ZXM+XG4gICAgPyBSZWFkb25seU1hcDxLZXlzLCBEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFdlYWtNYXA8aW5mZXIgS2V5cywgaW5mZXIgVmFsdWVzPlxuICA/IEZpbHRlciBleHRlbmRzIFdlYWtNYXA8S2V5cywgaW5mZXIgRmlsdGVyVmFsdWVzPlxuICAgID8gV2Vha01hcDxLZXlzLCBEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFNldDxpbmZlciBWYWx1ZXM+XG4gID8gRmlsdGVyIGV4dGVuZHMgU2V0PGluZmVyIEZpbHRlclZhbHVlcz5cbiAgICA/IFNldDxEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFJlYWRvbmx5U2V0PGluZmVyIFZhbHVlcz5cbiAgPyBGaWx0ZXIgZXh0ZW5kcyBSZWFkb25seVNldDxpbmZlciBGaWx0ZXJWYWx1ZXM+XG4gICAgPyBSZWFkb25seVNldDxEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFdlYWtTZXQ8aW5mZXIgVmFsdWVzPlxuICA/IEZpbHRlciBleHRlbmRzIFdlYWtTZXQ8aW5mZXIgRmlsdGVyVmFsdWVzPlxuICAgID8gV2Vha1NldDxEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIEFycmF5PGluZmVyIFZhbHVlcz5cbiAgPyBGaWx0ZXIgZXh0ZW5kcyBBcnJheTxpbmZlciBGaWx0ZXJWYWx1ZXM+XG4gICAgPyBBcnJheTxEZWVwUGljazxWYWx1ZXMsIEZpbHRlclZhbHVlcz4+XG4gICAgOiBUeXBlXG4gIDogVHlwZSBleHRlbmRzIFByb21pc2U8aW5mZXIgVmFsdWU+XG4gID8gRmlsdGVyIGV4dGVuZHMgUHJvbWlzZTxpbmZlciBGaWx0ZXJWYWx1ZT5cbiAgICA/IFByb21pc2U8RGVlcFBpY2s8VmFsdWUsIEZpbHRlclZhbHVlPj5cbiAgICA6IFR5cGVcbiAgOiBGaWx0ZXIgZXh0ZW5kcyBBbnlSZWNvcmRcbiAgPyB7XG4gICAgICAvLyBpdGVyYXRlIG92ZXIga2V5cyBvZiBUeXBlLCB3aGljaCBrZWVwcyB0aGUgaW5mb3JtYXRpb24gYWJvdXQga2V5czogb3B0aW9uYWwsIHJlcXVpcmVkIG9yIHJlYWRvbmx5XG4gICAgICBbS2V5IGluIGtleW9mIFR5cGUgYXMgS2V5IGV4dGVuZHMga2V5b2YgRmlsdGVyID8gS2V5IDogbmV2ZXJdOiBGaWx0ZXJbS2V5ICYga2V5b2YgRmlsdGVyXSBleHRlbmRzIHRydWVcbiAgICAgICAgPyBUeXBlW0tleV1cbiAgICAgICAgOiBLZXkgZXh0ZW5kcyBrZXlvZiBGaWx0ZXJcbiAgICAgICAgPyBEZWVwUGljazxUeXBlW0tleV0sIEZpbHRlcltLZXldPlxuICAgICAgICA6IG5ldmVyO1xuICAgIH1cbiAgOiBuZXZlcjtcbiJdfQ==

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Wrench = createLucideIcon("Wrench", [
[
"path",
{
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",
key: "cbrjhi"
}
]
]);
export { Wrench as default };
//# sourceMappingURL=wrench.js.map

View File

@@ -0,0 +1,77 @@
import { CustomTypesConfig } from '..';
declare enum builtins {
BOOL = 16,
BYTEA = 17,
CHAR = 18,
INT8 = 20,
INT2 = 21,
INT4 = 23,
REGPROC = 24,
TEXT = 25,
OID = 26,
TID = 27,
XID = 28,
CID = 29,
JSON = 114,
XML = 142,
PG_NODE_TREE = 194,
SMGR = 210,
PATH = 602,
POLYGON = 604,
CIDR = 650,
FLOAT4 = 700,
FLOAT8 = 701,
ABSTIME = 702,
RELTIME = 703,
TINTERVAL = 704,
CIRCLE = 718,
MACADDR8 = 774,
MONEY = 790,
MACADDR = 829,
INET = 869,
ACLITEM = 1033,
BPCHAR = 1042,
VARCHAR = 1043,
DATE = 1082,
TIME = 1083,
TIMESTAMP = 1114,
TIMESTAMPTZ = 1184,
INTERVAL = 1186,
TIMETZ = 1266,
BIT = 1560,
VARBIT = 1562,
NUMERIC = 1700,
REFCURSOR = 1790,
REGPROCEDURE = 2202,
REGOPER = 2203,
REGOPERATOR = 2204,
REGCLASS = 2205,
REGTYPE = 2206,
UUID = 2950,
TXID_SNAPSHOT = 2970,
PG_LSN = 3220,
PG_NDISTINCT = 3361,
PG_DEPENDENCIES = 3402,
TSVECTOR = 3614,
TSQUERY = 3615,
GTSVECTOR = 3642,
REGCONFIG = 3734,
REGDICTIONARY = 3769,
JSONB = 3802,
REGNAMESPACE = 4089,
REGROLE = 4096
}
type TypeId = builtins;
type TypeParser<I extends (string | Buffer), T> = (value: I) => T;
export = TypeOverrides;
declare class TypeOverrides implements CustomTypesConfig {
constructor(types?: CustomTypesConfig);
setTypeParser<T>(oid: number | TypeId, parseFn: TypeParser<string, T>): void;
setTypeParser<T>(oid: number | TypeId, format: 'text', parseFn: TypeParser<string, T>): void;
setTypeParser<T>(oid: number | TypeId, format: 'binary', parseFn: TypeParser<Buffer, T>): void;
getTypeParser<T>(oid: number | TypeId, format?: 'text'): TypeParser<string, T | string>;
getTypeParser<T>(oid: number | TypeId, format: 'binary'): TypeParser<Buffer, T | string>;
}

View File

@@ -0,0 +1,16 @@
'use strict'
process.env.TZ = 'UTC'
const { test } = require('node:test')
const isValidDate = require('./is-valid-date')
test('returns true for valid dates', t => {
t.assert.strictEqual(isValidDate(new Date()), true)
})
test('returns false for non-dates and invalid dates', t => {
t.plan(2)
t.assert.strictEqual(isValidDate('20210621'), false)
t.assert.strictEqual(isValidDate(new Date('2021-41-99')), false)
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,mCAAqC;AAErC;;GAEG;AACH,MAAa,gBAAiB,SAAQ,qBAAY;IAUhD,YAAqB,GAAY;QAC/B,KAAK,EAAE,CAAA;QADY,QAAG,GAAH,GAAG,CAAS;QATjC,aAAQ,GAAG,KAAK,CAAA;QAChB,cAAS,GAAG,KAAK,CAAA;QAET,eAAU,GAAG,KAAK,CAAA;QAClB,cAAS,GAAG,KAAK,CAAA;QACjB,cAAS,GAAkB,IAAI,CAAA;QAC/B,cAAS,GAAuC,IAAI,CAAA;QACpD,cAAS,GAAuC,IAAI,CAAA;IAI5D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;IACD,YAAY;QACV,OAAO,IAAI,CAAA;IACb,CAAC;IACD,GAAG;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IACD,KAAK;QACH,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,IAAY,EAAE,eAA8C;QACtF,IAAI;YACF,GAAG,CAAC,YAAY,CAAC,CAAA;YACjB,IAAI,eAAe;gBAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;YAE1D,MAAM,OAAO,GAAkB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YAC9E,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAA;YAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;YAC3B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;YACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAA;YAExB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;YACpD,IAAI,IAAI,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;aACvD;iBAAM;gBACL,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;aACnD;YAED,MAAM,IAAI,CAAC,SAAU,CAAC,KAAK,CAAA;YAC3B,GAAG,CAAC,cAAc,CAAC,CAAA;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;YACpB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YAEpB,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;SACtB;IACH,CAAC;IAED,KAAK,CAAC,OAAO;QACX,iDAAiD;QACjD,OAAO,IAAI,EAAE;YACX,GAAG,CAAC,iCAAiC,CAAC,CAAA;YACtC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,SAAU,CAAC,IAAI,EAAE,CAAA;YACpD,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;YACvC,IAAI,IAAI,EAAE;gBACR,GAAG,CAAC,MAAM,CAAC,CAAA;gBACX,MAAK;aACN;YACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;SACtC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,GAAG,CAAC,uCAAuC,CAAC,CAAA;QAC5C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,SAAU,CAAC,IAAI,EAAE,CAAA;QACpD,GAAG,CAAC,2BAA2B,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACvC,CAAC;IAED,KAAK,CACH,IAAyB,EACzB,WAA2B,MAAM,EACjC,WAAyC,GAAG,EAAE,GAAE,CAAC;QAEjD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,QAAQ,EAAE,CAAA;QACxC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QAEhE,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAA;QACjC,IAAI,CAAC,SAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAC9B,GAAG,EAAE;YACH,GAAG,CAAC,WAAW,CAAC,CAAA;YAChB,QAAQ,EAAE,CAAA;QACZ,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;YACtB,QAAQ,CAAC,GAAG,CAAC,CAAA;QACf,CAAC,CACF,CAAA;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,WAA2B,MAAM,EAAE,WAAyC,GAAG,EAAE,GAAE,CAAC;QAC9G,GAAG,CAAC,kBAAkB,CAAC,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;YACjC,IAAI,CAAC,SAAU,CAAC,KAAK,EAAE,CAAA;YACvB,IAAI,QAAQ;gBAAE,QAAQ,CAAC,GAAG,CAAC,CAAA;QAC7B,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,OAAO,IAAI,CAAC,GAAG,EAAE,CAAA;IACnB,CAAC;IAED,QAAQ,CAAC,OAAmB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,8BAA8B;YAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAA;YACzE,OAAM;SACP;QACD,IAAI,CAAC,SAAU,CAAC,WAAW,EAAE,CAAA;QAC7B,IAAI,CAAC,SAAU,CAAC,WAAW,EAAE,CAAA;QAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;QACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAA;QACxB,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;IACpD,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,SAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,GAAG,CAAC,kBAAkB,CAAC,CAAA;gBACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;gBACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACnB;iBAAM;gBACL,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;gBACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;aACtB;QACH,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;CACF;AA/ID,4CA+IC;AAED,MAAM,KAAK,GAAG,KAAK,CAAA;AAEnB,SAAS,IAAI,CAAC,IAAa;IACzB,IAAI,IAAI,YAAY,UAAU,IAAI,IAAI,YAAY,WAAW,EAAE;QAC7D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,eAAe,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,GAAG,IAAI,CAAA;KACtE;SAAM;QACL,OAAO,IAAI,CAAA;KACZ;AACH,CAAC;AAED,SAAS,GAAG,CAAC,GAAG,IAAe;IAC7B,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;AACzC,CAAC"}

View File

@@ -0,0 +1,7 @@
import type { h as hType, VNode } from 'preact';
interface FactoryParams {
h: typeof hType;
}
export default function IconCloseFactory({ h, }: FactoryParams): () => VNode;
export {};
//# sourceMappingURL=IconClose.d.ts.map

View File

@@ -0,0 +1,29 @@
import { DirectusRole } from "../../../schema/role.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/roles.d.ts
type CreateRoleOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusRole<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new roles.
*
* @param items The roles to create
* @param query Optional return data query
*
* @returns Returns the role objects for the created roles.
*/
declare const createRoles: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(items: NestedPartial<DirectusRole<Schema>>[], query?: TQuery) => RestCommand<CreateRoleOutput<Schema, TQuery>[], Schema>;
/**
* Create a new role.
*
* @param item The role to create
* @param query Optional return data query
*
* @returns Returns the role object for the created role.
*/
declare const createRole: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(item: NestedPartial<DirectusRole<Schema>>, query?: TQuery) => RestCommand<CreateRoleOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateRoleOutput, createRole, createRoles };
//# sourceMappingURL=roles.d.ts.map

View File

@@ -0,0 +1,106 @@
# @dnd-kit/modifiers
[![Stable release](https://img.shields.io/npm/v/@dnd-kit/modifiers.svg)](https://npm.im/@dnd-kit/sortable)
Modifiers let you dynamically modify the movement coordinates that are detected by sensors. They can be used for a wide range of use cases, for example:
- Restricting motion to a single axis
- Restricting motion to the draggable node container's bounding rectangle
- Restricting motion to the draggable node's scroll container bounding rectangle
- Applying resistance or clamping the motion
## Installation
To start using modifiers, install the modifiers package via yarn or npm:
```
npm install @dnd-kit/modifiers
```
## Usage
The modifiers repository contains a number of useful modifiers that can be applied on `DndContext` as well as `DragOverlay`.
```jsx
import {DndContext, DragOverlay} from '@dnd-kit';
import {
restrictToVerticalAxis,
restrictToWindowEdges,
} from '@dnd-kit/modifiers';
function App() {
return (
<DndContext modifiers={[restrictToVerticalAxis]}>
{/* ... */}
<DragOverlay modifiers={[restrictToWindowEdges]}>{/* ... */}</DragOverlay>
</DndContext>
);
}
```
As you can see from the example above, `DndContext` and `DragOverlay` can both have different modifiers.
## Built-in modifiers
### Restricting motion to an axis
#### `restrictToHorizontalAxis`
Restrict movement to only the horizontal axis.
#### `restrictToVerticalAxis`
Restrict movement to only the vertical axis.
### Restrict motion to a container's bounding rectangle
#### `restrictToWindowEdges`
Restrict movement to the edges of the window. This modifier can be useful to prevent the `DragOverlay` from being moved outside of the bounds of the window.
#### `restrictToParentElement`
Restrict movement to the parent element of the draggable item that is picked up.
#### `restrictToFirstScrollableAncestor`
Restrict movement to the first scrollable ancestor of the draggable item that is picked up.
### Snap to grid
#### `createSnapModifier`
Function to create modifiers to snap to a given grid size.
```javascript
import {createSnapModifier} from '@dnd-kit/modifiers';
const gridSize = 20; // pixels
const snapToGridModifier = createSnapModifier(gridSize);
```
### Snap to cursor
#### `snapCenterToCursor`
Snaps the center of the draggable item to the cursor when it is picked up. Has no effect when using the Keyboard sensor.
## Building custom modifiers
To build your own custom modifiers, refer to the implementation of the built-in modifiers of this package.
For example, here is an implementation to create a modifier to snap to grid:
```javascript
const gridSize = 20;
function snapToGrid(args) {
const {transform} = args;
return {
...transform,
x: Math.ceil(transform.x / gridSize) * gridSize,
y: Math.ceil(transform.y / gridSize) * gridSize,
};
}
```

View File

@@ -0,0 +1,31 @@
"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.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;
const NoopMeter_1 = require("./NoopMeter");
/**
* An implementation of the {@link MeterProvider} which returns an impotent Meter
* for all calls to `getMeter`
*/
class NoopMeterProvider {
getMeter(_name, _version, _options) {
return NoopMeter_1.NOOP_METER;
}
}
exports.NoopMeterProvider = NoopMeterProvider;
exports.NOOP_METER_PROVIDER = new NoopMeterProvider();
//# sourceMappingURL=NoopMeterProvider.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH;;;;;;;;GAQG;AACU,QAAA,yBAAyB,GAAG,sBAA+B,CAAC;AAEzE;;;;;;;;;GASG;AACU,QAAA,YAAY,GAAG,SAAkB,CAAC;AAE/C;;;;;;;;;GASG;AACU,QAAA,iBAAiB,GAAG,cAAuB,CAAC;AAEzD;;;;;;GAMG;AACU,QAAA,cAAc,GAAG,WAAoB,CAAC;AAEnD;;;;;;;;;GASG;AACU,QAAA,YAAY,GAAG,SAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,eAAwB,CAAC;AAE3D;;;;;;GAMG;AACU,QAAA,qBAAqB,GAAG,OAAgB,CAAC;AAEtD;;;;;;GAMG;AACU,QAAA,kCAAkC,GAC7C,6BAAsC,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/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Deprecated, use `server.address`, `server.port` attributes instead.\n *\n * @example \"Server=(localdb)\\\\v11.0;Integrated Security=true;\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Deprecated, use `db.namespace` instead.\n *\n * @example customers\n * @example main\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * The database statement being executed.\n *\n * @example SELECT * FROM wuser_table\n * @example SET mykey \"WuValue\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.query.text`.\n */\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\n\n/**\n * Deprecated, use `db.system.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * Deprecated, no replacement at this time.\n *\n * @example readonly_user\n * @example reporting_user\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Removed, no replacement at this time.\n */\nexport const ATTR_DB_USER = 'db.user' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * Enum value \"mysql\" for attribute {@link ATTR_DB_SYSTEM}.\n *\n * MySQL\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const DB_SYSTEM_VALUE_MYSQL = 'mysql' as const;\n\n/**\n * Deprecated, use `db.client.connection.count` instead.\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.client.connection.count`.\n */\nexport const METRIC_DB_CLIENT_CONNECTIONS_USAGE =\n 'db.client.connections.usage' as const;\n"]}

View File

@@ -0,0 +1,122 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const SINGLE_ARG_COMMANDS = ['get', 'set', 'setex'];
const GET_COMMANDS = ['get', 'mget'];
const SET_COMMANDS = ['set', 'setex'];
// todo: del, expire
/** Checks if a given command is in the list of redis commands.
* Useful because commands can come in lowercase or uppercase (depending on the library). */
function isInCommands(redisCommands, command) {
return redisCommands.includes(command.toLowerCase());
}
/** Determine cache operation based on redis statement */
function getCacheOperation(
command,
) {
if (isInCommands(GET_COMMANDS, command)) {
return 'cache.get';
} else if (isInCommands(SET_COMMANDS, command)) {
return 'cache.put';
} else {
return undefined;
}
}
function keyHasPrefix(key, prefixes) {
return prefixes.some(prefix => key.startsWith(prefix));
}
/** Safely converts a redis key to a string (comma-separated if there are multiple keys) */
function getCacheKeySafely(redisCommand, cmdArgs) {
try {
if (cmdArgs.length === 0) {
return undefined;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const processArg = (arg) => {
if (typeof arg === 'string' || typeof arg === 'number' || Buffer.isBuffer(arg)) {
return [arg.toString()];
} else if (Array.isArray(arg)) {
return flatten(arg.map(arg => processArg(arg)));
} else {
return ['<unknown>'];
}
};
const firstArg = cmdArgs[0];
if (isInCommands(SINGLE_ARG_COMMANDS, redisCommand) && firstArg != null) {
return processArg(firstArg);
}
return flatten(cmdArgs.map(arg => processArg(arg)));
} catch {
return undefined;
}
}
/** Determines whether a redis operation should be considered as "cache operation" by checking if a key is prefixed.
* We only support certain commands (such as 'set', 'get', 'mget'). */
function shouldConsiderForCache(redisCommand, keys, prefixes) {
if (!getCacheOperation(redisCommand)) {
return false;
}
for (const key of keys) {
if (keyHasPrefix(key, prefixes)) {
return true;
}
}
return false;
}
/** Calculates size based on the cache response value */
function calculateCacheItemSize(response) {
const getSize = (value) => {
try {
if (Buffer.isBuffer(value)) return value.byteLength;
else if (typeof value === 'string') return value.length;
else if (typeof value === 'number') return value.toString().length;
else if (value === null || value === undefined) return 0;
return JSON.stringify(value).length;
} catch {
return undefined;
}
};
return Array.isArray(response)
? response.reduce((acc, curr) => {
const size = getSize(curr);
return typeof size === 'number' ? (acc !== undefined ? acc + size : size) : acc;
}, 0)
: getSize(response);
}
function flatten(input) {
const result = [];
const flattenHelper = (input) => {
input.forEach((el) => {
if (Array.isArray(el)) {
flattenHelper(el);
} else {
result.push(el);
}
});
};
flattenHelper(input);
return result;
}
exports.GET_COMMANDS = GET_COMMANDS;
exports.SET_COMMANDS = SET_COMMANDS;
exports.calculateCacheItemSize = calculateCacheItemSize;
exports.getCacheKeySafely = getCacheKeySafely;
exports.getCacheOperation = getCacheOperation;
exports.isInCommands = isInCommands;
exports.shouldConsiderForCache = shouldConsiderForCache;
//# sourceMappingURL=redisCache.js.map

View File

@@ -0,0 +1,5 @@
import type { AddAliasToSelection } from "../query-builders/select.types.cjs";
import type { ColumnsSelection } from "../sql/sql.cjs";
import type { Subquery, WithSubquery } from "../subquery.cjs";
export type SubqueryWithSelection<TSelection extends ColumnsSelection, TAlias extends string> = Subquery<TAlias, AddAliasToSelection<TSelection, TAlias, 'gel'>> & AddAliasToSelection<TSelection, TAlias, 'gel'>;
export type WithSubqueryWithSelection<TSelection extends ColumnsSelection, TAlias extends string> = WithSubquery<TAlias, AddAliasToSelection<TSelection, TAlias, 'gel'>> & AddAliasToSelection<TSelection, TAlias, 'gel'>;

View File

@@ -0,0 +1,10 @@
import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
import { useMotionValue } from './use-motion-value.mjs';
function useTime() {
const time = useMotionValue(0);
useAnimationFrame((t) => time.set(t));
return time;
}
export { useTime };

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