@helpwave/hightide 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components/branding/HelpwaveBadge.js +8 -5
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +8 -5
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +10 -10
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +4 -4
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +2 -2
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +5 -5
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +8 -8
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.js +2912 -33
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +2941 -33
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Tag.js +2912 -1
- package/dist/components/icons-and-geometry/Tag.js.map +1 -1
- package/dist/components/icons-and-geometry/Tag.mjs +2931 -1
- package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.mts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.ts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.js +2 -2
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +2 -2
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +6 -6
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +10 -10
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +10 -10
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +4 -4
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +2 -2
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +9 -10
- package/dist/components/layout-and-navigation/Tile.d.ts +9 -10
- package/dist/components/layout-and-navigation/Tile.js +21 -4
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +20 -4
- package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +2 -2
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +2 -2
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +8 -8
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +8 -8
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +8 -8
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +21 -22
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +45 -46
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +21 -22
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +46 -47
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +1 -1
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +3 -3
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +1 -1
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +3 -3
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +0 -1
- package/dist/components/properties/MultiSelectProperty.d.ts +0 -1
- package/dist/components/properties/MultiSelectProperty.js +745 -740
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +762 -757
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +1 -1
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +3 -3
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +1 -1
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +3 -3
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +0 -1
- package/dist/components/properties/SelectProperty.d.ts +0 -1
- package/dist/components/properties/SelectProperty.js +24 -25
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +45 -46
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +1 -1
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +7 -7
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +26 -26
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +4 -4
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +2 -2
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +12 -12
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +0 -1
- package/dist/components/user-action/MultiSelect.d.ts +0 -1
- package/dist/components/user-action/MultiSelect.js +617 -612
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +642 -637
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/ScrollPicker.js +1 -1
- package/dist/components/user-action/ScrollPicker.js.map +1 -1
- package/dist/components/user-action/ScrollPicker.mjs +1 -1
- package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +2 -2
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.d.mts +1 -4
- package/dist/components/user-action/Select.d.ts +1 -4
- package/dist/components/user-action/Select.js +21 -24
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +27 -29
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +175 -179
- package/dist/css/uncompiled/globals.css +3 -3
- package/dist/css/uncompiled/textstyles.css +5 -5
- package/dist/css/uncompiled/theme/colors-basic.css +13 -5
- package/dist/css/uncompiled/theme/colors-component.css +56 -41
- package/dist/css/uncompiled/theme/colors-semantic.css +76 -83
- package/dist/css/uncompiled/theme/index.css +1 -2
- package/dist/hooks/useLocalStorage.js +1 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +3 -4
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3161 -377
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3098 -314
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +0 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +5 -8
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +2 -2
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.js +4 -7
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +9 -12
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/css/uncompiled/theme/theme.css +0 -0
package/dist/index.js
CHANGED
|
@@ -29,37 +29,2900 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
));
|
|
30
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
31
|
|
|
32
|
+
// node_modules/@swc/helpers/cjs/_interop_require_default.cjs
|
|
33
|
+
var require_interop_require_default = __commonJS({
|
|
34
|
+
"node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
|
|
35
|
+
"use strict";
|
|
36
|
+
function _interop_require_default(obj) {
|
|
37
|
+
return obj && obj.__esModule ? obj : { default: obj };
|
|
38
|
+
}
|
|
39
|
+
exports2._ = _interop_require_default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// node_modules/next/dist/shared/lib/utils/warn-once.js
|
|
44
|
+
var require_warn_once = __commonJS({
|
|
45
|
+
"node_modules/next/dist/shared/lib/utils/warn-once.js"(exports2) {
|
|
46
|
+
"use strict";
|
|
47
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
48
|
+
value: true
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports2, "warnOnce", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function() {
|
|
53
|
+
return warnOnce;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var warnOnce = (_) => {
|
|
57
|
+
};
|
|
58
|
+
if (process.env.NODE_ENV !== "production") {
|
|
59
|
+
const warnings = /* @__PURE__ */ new Set();
|
|
60
|
+
warnOnce = (msg) => {
|
|
61
|
+
if (!warnings.has(msg)) {
|
|
62
|
+
console.warn(msg);
|
|
63
|
+
}
|
|
64
|
+
warnings.add(msg);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// node_modules/next/dist/shared/lib/image-blur-svg.js
|
|
71
|
+
var require_image_blur_svg = __commonJS({
|
|
72
|
+
"node_modules/next/dist/shared/lib/image-blur-svg.js"(exports2) {
|
|
73
|
+
"use strict";
|
|
74
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
75
|
+
value: true
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports2, "getImageBlurSvg", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function() {
|
|
80
|
+
return getImageBlurSvg;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
function getImageBlurSvg(param) {
|
|
84
|
+
let { widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit } = param;
|
|
85
|
+
const std = 20;
|
|
86
|
+
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
|
|
87
|
+
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
|
|
88
|
+
const viewBox = svgWidth && svgHeight ? "viewBox='0 0 " + svgWidth + " " + svgHeight + "'" : "";
|
|
89
|
+
const preserveAspectRatio = viewBox ? "none" : objectFit === "contain" ? "xMidYMid" : objectFit === "cover" ? "xMidYMid slice" : "none";
|
|
90
|
+
return "%3Csvg xmlns='http://www.w3.org/2000/svg' " + viewBox + "%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='" + std + "'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='" + preserveAspectRatio + "' style='filter: url(%23b);' href='" + blurDataURL + "'/%3E%3C/svg%3E";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// node_modules/next/dist/shared/lib/image-config.js
|
|
96
|
+
var require_image_config = __commonJS({
|
|
97
|
+
"node_modules/next/dist/shared/lib/image-config.js"(exports2) {
|
|
98
|
+
"use strict";
|
|
99
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
100
|
+
value: true
|
|
101
|
+
});
|
|
102
|
+
function _export(target, all) {
|
|
103
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: all[name]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
_export(exports2, {
|
|
109
|
+
VALID_LOADERS: function() {
|
|
110
|
+
return VALID_LOADERS;
|
|
111
|
+
},
|
|
112
|
+
imageConfigDefault: function() {
|
|
113
|
+
return imageConfigDefault;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
var VALID_LOADERS = [
|
|
117
|
+
"default",
|
|
118
|
+
"imgix",
|
|
119
|
+
"cloudinary",
|
|
120
|
+
"akamai",
|
|
121
|
+
"custom"
|
|
122
|
+
];
|
|
123
|
+
var imageConfigDefault = {
|
|
124
|
+
deviceSizes: [
|
|
125
|
+
640,
|
|
126
|
+
750,
|
|
127
|
+
828,
|
|
128
|
+
1080,
|
|
129
|
+
1200,
|
|
130
|
+
1920,
|
|
131
|
+
2048,
|
|
132
|
+
3840
|
|
133
|
+
],
|
|
134
|
+
imageSizes: [
|
|
135
|
+
16,
|
|
136
|
+
32,
|
|
137
|
+
48,
|
|
138
|
+
64,
|
|
139
|
+
96,
|
|
140
|
+
128,
|
|
141
|
+
256,
|
|
142
|
+
384
|
|
143
|
+
],
|
|
144
|
+
path: "/_next/image",
|
|
145
|
+
loader: "default",
|
|
146
|
+
loaderFile: "",
|
|
147
|
+
domains: [],
|
|
148
|
+
disableStaticImages: false,
|
|
149
|
+
minimumCacheTTL: 60,
|
|
150
|
+
formats: [
|
|
151
|
+
"image/webp"
|
|
152
|
+
],
|
|
153
|
+
dangerouslyAllowSVG: false,
|
|
154
|
+
contentSecurityPolicy: "script-src 'none'; frame-src 'none'; sandbox;",
|
|
155
|
+
contentDispositionType: "attachment",
|
|
156
|
+
localPatterns: void 0,
|
|
157
|
+
remotePatterns: [],
|
|
158
|
+
qualities: void 0,
|
|
159
|
+
unoptimized: false
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// node_modules/next/dist/shared/lib/get-img-props.js
|
|
165
|
+
var require_get_img_props = __commonJS({
|
|
166
|
+
"node_modules/next/dist/shared/lib/get-img-props.js"(exports2) {
|
|
167
|
+
"use strict";
|
|
168
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
169
|
+
value: true
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(exports2, "getImgProps", {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
get: function() {
|
|
174
|
+
return getImgProps;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
var _warnonce = require_warn_once();
|
|
178
|
+
var _imageblursvg = require_image_blur_svg();
|
|
179
|
+
var _imageconfig = require_image_config();
|
|
180
|
+
var VALID_LOADING_VALUES = [
|
|
181
|
+
"lazy",
|
|
182
|
+
"eager",
|
|
183
|
+
void 0
|
|
184
|
+
];
|
|
185
|
+
var INVALID_BACKGROUND_SIZE_VALUES = [
|
|
186
|
+
"-moz-initial",
|
|
187
|
+
"fill",
|
|
188
|
+
"none",
|
|
189
|
+
"scale-down",
|
|
190
|
+
void 0
|
|
191
|
+
];
|
|
192
|
+
function isStaticRequire(src) {
|
|
193
|
+
return src.default !== void 0;
|
|
194
|
+
}
|
|
195
|
+
function isStaticImageData(src) {
|
|
196
|
+
return src.src !== void 0;
|
|
197
|
+
}
|
|
198
|
+
function isStaticImport(src) {
|
|
199
|
+
return !!src && typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src));
|
|
200
|
+
}
|
|
201
|
+
var allImgs = /* @__PURE__ */ new Map();
|
|
202
|
+
var perfObserver;
|
|
203
|
+
function getInt(x) {
|
|
204
|
+
if (typeof x === "undefined") {
|
|
205
|
+
return x;
|
|
206
|
+
}
|
|
207
|
+
if (typeof x === "number") {
|
|
208
|
+
return Number.isFinite(x) ? x : NaN;
|
|
209
|
+
}
|
|
210
|
+
if (typeof x === "string" && /^[0-9]+$/.test(x)) {
|
|
211
|
+
return parseInt(x, 10);
|
|
212
|
+
}
|
|
213
|
+
return NaN;
|
|
214
|
+
}
|
|
215
|
+
function getWidths(param, width, sizes) {
|
|
216
|
+
let { deviceSizes, allSizes } = param;
|
|
217
|
+
if (sizes) {
|
|
218
|
+
const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g;
|
|
219
|
+
const percentSizes = [];
|
|
220
|
+
for (let match; match = viewportWidthRe.exec(sizes); match) {
|
|
221
|
+
percentSizes.push(parseInt(match[2]));
|
|
222
|
+
}
|
|
223
|
+
if (percentSizes.length) {
|
|
224
|
+
const smallestRatio = Math.min(...percentSizes) * 0.01;
|
|
225
|
+
return {
|
|
226
|
+
widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),
|
|
227
|
+
kind: "w"
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
widths: allSizes,
|
|
232
|
+
kind: "w"
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
if (typeof width !== "number") {
|
|
236
|
+
return {
|
|
237
|
+
widths: deviceSizes,
|
|
238
|
+
kind: "w"
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const widths = [
|
|
242
|
+
...new Set(
|
|
243
|
+
// > This means that most OLED screens that say they are 3x resolution,
|
|
244
|
+
// > are actually 3x in the green color, but only 1.5x in the red and
|
|
245
|
+
// > blue colors. Showing a 3x resolution image in the app vs a 2x
|
|
246
|
+
// > resolution image will be visually the same, though the 3x image
|
|
247
|
+
// > takes significantly more data. Even true 3x resolution screens are
|
|
248
|
+
// > wasteful as the human eye cannot see that level of detail without
|
|
249
|
+
// > something like a magnifying glass.
|
|
250
|
+
// https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html
|
|
251
|
+
[
|
|
252
|
+
width,
|
|
253
|
+
width * 2
|
|
254
|
+
/*, width * 3*/
|
|
255
|
+
].map((w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1])
|
|
256
|
+
)
|
|
257
|
+
];
|
|
258
|
+
return {
|
|
259
|
+
widths,
|
|
260
|
+
kind: "x"
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function generateImgAttrs(param) {
|
|
264
|
+
let { config, src, unoptimized, width, quality, sizes, loader } = param;
|
|
265
|
+
if (unoptimized) {
|
|
266
|
+
return {
|
|
267
|
+
src,
|
|
268
|
+
srcSet: void 0,
|
|
269
|
+
sizes: void 0
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
const { widths, kind } = getWidths(config, width, sizes);
|
|
273
|
+
const last = widths.length - 1;
|
|
274
|
+
return {
|
|
275
|
+
sizes: !sizes && kind === "w" ? "100vw" : sizes,
|
|
276
|
+
srcSet: widths.map((w, i) => loader({
|
|
277
|
+
config,
|
|
278
|
+
src,
|
|
279
|
+
quality,
|
|
280
|
+
width: w
|
|
281
|
+
}) + " " + (kind === "w" ? w : i + 1) + kind).join(", "),
|
|
282
|
+
// It's intended to keep `src` the last attribute because React updates
|
|
283
|
+
// attributes in order. If we keep `src` the first one, Safari will
|
|
284
|
+
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
285
|
+
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
286
|
+
// and `sizes` are defined.
|
|
287
|
+
// This bug cannot be reproduced in Chrome or Firefox.
|
|
288
|
+
src: loader({
|
|
289
|
+
config,
|
|
290
|
+
src,
|
|
291
|
+
quality,
|
|
292
|
+
width: widths[last]
|
|
293
|
+
})
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function getImgProps(param, _state) {
|
|
297
|
+
let { src, sizes, unoptimized = false, priority = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = "empty", blurDataURL, fetchPriority, decoding = "async", layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest } = param;
|
|
298
|
+
const { imgConf, showAltText, blurComplete, defaultLoader } = _state;
|
|
299
|
+
let config;
|
|
300
|
+
let c = imgConf || _imageconfig.imageConfigDefault;
|
|
301
|
+
if ("allSizes" in c) {
|
|
302
|
+
config = c;
|
|
303
|
+
} else {
|
|
304
|
+
var _c_qualities;
|
|
305
|
+
const allSizes = [
|
|
306
|
+
...c.deviceSizes,
|
|
307
|
+
...c.imageSizes
|
|
308
|
+
].sort((a, b) => a - b);
|
|
309
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
310
|
+
const qualities = (_c_qualities = c.qualities) == null ? void 0 : _c_qualities.sort((a, b) => a - b);
|
|
311
|
+
config = {
|
|
312
|
+
...c,
|
|
313
|
+
allSizes,
|
|
314
|
+
deviceSizes,
|
|
315
|
+
qualities
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
if (typeof defaultLoader === "undefined") {
|
|
319
|
+
throw Object.defineProperty(new Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"), "__NEXT_ERROR_CODE", {
|
|
320
|
+
value: "E163",
|
|
321
|
+
enumerable: false,
|
|
322
|
+
configurable: true
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
let loader = rest.loader || defaultLoader;
|
|
326
|
+
delete rest.loader;
|
|
327
|
+
delete rest.srcSet;
|
|
328
|
+
const isDefaultLoader = "__next_img_default" in loader;
|
|
329
|
+
if (isDefaultLoader) {
|
|
330
|
+
if (config.loader === "custom") {
|
|
331
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader'), "__NEXT_ERROR_CODE", {
|
|
332
|
+
value: "E252",
|
|
333
|
+
enumerable: false,
|
|
334
|
+
configurable: true
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
} else {
|
|
338
|
+
const customImageLoader = loader;
|
|
339
|
+
loader = (obj) => {
|
|
340
|
+
const { config: _, ...opts } = obj;
|
|
341
|
+
return customImageLoader(opts);
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
if (layout) {
|
|
345
|
+
if (layout === "fill") {
|
|
346
|
+
fill = true;
|
|
347
|
+
}
|
|
348
|
+
const layoutToStyle = {
|
|
349
|
+
intrinsic: {
|
|
350
|
+
maxWidth: "100%",
|
|
351
|
+
height: "auto"
|
|
352
|
+
},
|
|
353
|
+
responsive: {
|
|
354
|
+
width: "100%",
|
|
355
|
+
height: "auto"
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
const layoutToSizes = {
|
|
359
|
+
responsive: "100vw",
|
|
360
|
+
fill: "100vw"
|
|
361
|
+
};
|
|
362
|
+
const layoutStyle = layoutToStyle[layout];
|
|
363
|
+
if (layoutStyle) {
|
|
364
|
+
style = {
|
|
365
|
+
...style,
|
|
366
|
+
...layoutStyle
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
const layoutSizes = layoutToSizes[layout];
|
|
370
|
+
if (layoutSizes && !sizes) {
|
|
371
|
+
sizes = layoutSizes;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
let staticSrc = "";
|
|
375
|
+
let widthInt = getInt(width);
|
|
376
|
+
let heightInt = getInt(height);
|
|
377
|
+
let blurWidth;
|
|
378
|
+
let blurHeight;
|
|
379
|
+
if (isStaticImport(src)) {
|
|
380
|
+
const staticImageData = isStaticRequire(src) ? src.default : src;
|
|
381
|
+
if (!staticImageData.src) {
|
|
382
|
+
throw Object.defineProperty(new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received " + JSON.stringify(staticImageData)), "__NEXT_ERROR_CODE", {
|
|
383
|
+
value: "E460",
|
|
384
|
+
enumerable: false,
|
|
385
|
+
configurable: true
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (!staticImageData.height || !staticImageData.width) {
|
|
389
|
+
throw Object.defineProperty(new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received " + JSON.stringify(staticImageData)), "__NEXT_ERROR_CODE", {
|
|
390
|
+
value: "E48",
|
|
391
|
+
enumerable: false,
|
|
392
|
+
configurable: true
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
blurWidth = staticImageData.blurWidth;
|
|
396
|
+
blurHeight = staticImageData.blurHeight;
|
|
397
|
+
blurDataURL = blurDataURL || staticImageData.blurDataURL;
|
|
398
|
+
staticSrc = staticImageData.src;
|
|
399
|
+
if (!fill) {
|
|
400
|
+
if (!widthInt && !heightInt) {
|
|
401
|
+
widthInt = staticImageData.width;
|
|
402
|
+
heightInt = staticImageData.height;
|
|
403
|
+
} else if (widthInt && !heightInt) {
|
|
404
|
+
const ratio = widthInt / staticImageData.width;
|
|
405
|
+
heightInt = Math.round(staticImageData.height * ratio);
|
|
406
|
+
} else if (!widthInt && heightInt) {
|
|
407
|
+
const ratio = heightInt / staticImageData.height;
|
|
408
|
+
widthInt = Math.round(staticImageData.width * ratio);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
src = typeof src === "string" ? src : staticSrc;
|
|
413
|
+
let isLazy = !priority && (loading === "lazy" || typeof loading === "undefined");
|
|
414
|
+
if (!src || src.startsWith("data:") || src.startsWith("blob:")) {
|
|
415
|
+
unoptimized = true;
|
|
416
|
+
isLazy = false;
|
|
417
|
+
}
|
|
418
|
+
if (config.unoptimized) {
|
|
419
|
+
unoptimized = true;
|
|
420
|
+
}
|
|
421
|
+
if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split("?", 1)[0].endsWith(".svg")) {
|
|
422
|
+
unoptimized = true;
|
|
423
|
+
}
|
|
424
|
+
const qualityInt = getInt(quality);
|
|
425
|
+
if (process.env.NODE_ENV !== "production") {
|
|
426
|
+
if (config.output === "export" && isDefaultLoader && !unoptimized) {
|
|
427
|
+
throw Object.defineProperty(new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api"), "__NEXT_ERROR_CODE", {
|
|
428
|
+
value: "E500",
|
|
429
|
+
enumerable: false,
|
|
430
|
+
configurable: true
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
if (!src) {
|
|
434
|
+
unoptimized = true;
|
|
435
|
+
} else {
|
|
436
|
+
if (fill) {
|
|
437
|
+
if (width) {
|
|
438
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "width" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
439
|
+
value: "E96",
|
|
440
|
+
enumerable: false,
|
|
441
|
+
configurable: true
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
if (height) {
|
|
445
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "height" and "fill" properties. Only one should be used.'), "__NEXT_ERROR_CODE", {
|
|
446
|
+
value: "E115",
|
|
447
|
+
enumerable: false,
|
|
448
|
+
configurable: true
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
if ((style == null ? void 0 : style.position) && style.position !== "absolute") {
|
|
452
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
453
|
+
value: "E216",
|
|
454
|
+
enumerable: false,
|
|
455
|
+
configurable: true
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
if ((style == null ? void 0 : style.width) && style.width !== "100%") {
|
|
459
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
460
|
+
value: "E73",
|
|
461
|
+
enumerable: false,
|
|
462
|
+
configurable: true
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
if ((style == null ? void 0 : style.height) && style.height !== "100%") {
|
|
466
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.'), "__NEXT_ERROR_CODE", {
|
|
467
|
+
value: "E404",
|
|
468
|
+
enumerable: false,
|
|
469
|
+
configurable: true
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
} else {
|
|
473
|
+
if (typeof widthInt === "undefined") {
|
|
474
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "width" property.'), "__NEXT_ERROR_CODE", {
|
|
475
|
+
value: "E451",
|
|
476
|
+
enumerable: false,
|
|
477
|
+
configurable: true
|
|
478
|
+
});
|
|
479
|
+
} else if (isNaN(widthInt)) {
|
|
480
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "width" property. Expected a numeric value in pixels but received "' + width + '".'), "__NEXT_ERROR_CODE", {
|
|
481
|
+
value: "E66",
|
|
482
|
+
enumerable: false,
|
|
483
|
+
configurable: true
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
if (typeof heightInt === "undefined") {
|
|
487
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" is missing required "height" property.'), "__NEXT_ERROR_CODE", {
|
|
488
|
+
value: "E397",
|
|
489
|
+
enumerable: false,
|
|
490
|
+
configurable: true
|
|
491
|
+
});
|
|
492
|
+
} else if (isNaN(heightInt)) {
|
|
493
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "height" property. Expected a numeric value in pixels but received "' + height + '".'), "__NEXT_ERROR_CODE", {
|
|
494
|
+
value: "E444",
|
|
495
|
+
enumerable: false,
|
|
496
|
+
configurable: true
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
if (/^[\x00-\x20]/.test(src)) {
|
|
500
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.'), "__NEXT_ERROR_CODE", {
|
|
501
|
+
value: "E176",
|
|
502
|
+
enumerable: false,
|
|
503
|
+
configurable: true
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
if (/[\x00-\x20]$/.test(src)) {
|
|
507
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.'), "__NEXT_ERROR_CODE", {
|
|
508
|
+
value: "E21",
|
|
509
|
+
enumerable: false,
|
|
510
|
+
configurable: true
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (!VALID_LOADING_VALUES.includes(loading)) {
|
|
516
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "loading" property. Provided "' + loading + '" should be one of ' + VALID_LOADING_VALUES.map(String).join(",") + "."), "__NEXT_ERROR_CODE", {
|
|
517
|
+
value: "E357",
|
|
518
|
+
enumerable: false,
|
|
519
|
+
configurable: true
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
if (priority && loading === "lazy") {
|
|
523
|
+
throw Object.defineProperty(new Error('Image with src "' + src + `" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", {
|
|
524
|
+
value: "E218",
|
|
525
|
+
enumerable: false,
|
|
526
|
+
configurable: true
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
if (placeholder !== "empty" && placeholder !== "blur" && !placeholder.startsWith("data:image/")) {
|
|
530
|
+
throw Object.defineProperty(new Error('Image with src "' + src + '" has invalid "placeholder" property "' + placeholder + '".'), "__NEXT_ERROR_CODE", {
|
|
531
|
+
value: "E431",
|
|
532
|
+
enumerable: false,
|
|
533
|
+
configurable: true
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
if (placeholder !== "empty") {
|
|
537
|
+
if (widthInt && heightInt && widthInt * heightInt < 1600) {
|
|
538
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.');
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (placeholder === "blur" && !blurDataURL) {
|
|
542
|
+
const VALID_BLUR_EXT = [
|
|
543
|
+
"jpeg",
|
|
544
|
+
"png",
|
|
545
|
+
"webp",
|
|
546
|
+
"avif"
|
|
547
|
+
];
|
|
548
|
+
throw Object.defineProperty(new Error('Image with src "' + src + `" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
549
|
+
Possible solutions:
|
|
550
|
+
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
551
|
+
- Change the "src" property to a static import with one of the supported file types: ` + VALID_BLUR_EXT.join(",") + ' (animated images not supported)\n - Remove the "placeholder" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url'), "__NEXT_ERROR_CODE", {
|
|
552
|
+
value: "E371",
|
|
553
|
+
enumerable: false,
|
|
554
|
+
configurable: true
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
if ("ref" in rest) {
|
|
558
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using unsupported "ref" property. Consider using the "onLoad" property instead.');
|
|
559
|
+
}
|
|
560
|
+
if (!unoptimized && !isDefaultLoader) {
|
|
561
|
+
const urlStr = loader({
|
|
562
|
+
config,
|
|
563
|
+
src,
|
|
564
|
+
width: widthInt || 400,
|
|
565
|
+
quality: qualityInt || 75
|
|
566
|
+
});
|
|
567
|
+
let url;
|
|
568
|
+
try {
|
|
569
|
+
url = new URL(urlStr);
|
|
570
|
+
} catch (err) {
|
|
571
|
+
}
|
|
572
|
+
if (urlStr === src || url && url.pathname === src && !url.search) {
|
|
573
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width');
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
if (onLoadingComplete) {
|
|
577
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');
|
|
578
|
+
}
|
|
579
|
+
for (const [legacyKey, legacyValue] of Object.entries({
|
|
580
|
+
layout,
|
|
581
|
+
objectFit,
|
|
582
|
+
objectPosition,
|
|
583
|
+
lazyBoundary,
|
|
584
|
+
lazyRoot
|
|
585
|
+
})) {
|
|
586
|
+
if (legacyValue) {
|
|
587
|
+
(0, _warnonce.warnOnce)('Image with src "' + src + '" has legacy prop "' + legacyKey + '". Did you forget to run the codemod?\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13');
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
if (typeof window !== "undefined" && !perfObserver && window.PerformanceObserver) {
|
|
591
|
+
perfObserver = new PerformanceObserver((entryList) => {
|
|
592
|
+
for (const entry of entryList.getEntries()) {
|
|
593
|
+
var _entry_element;
|
|
594
|
+
const imgSrc = (entry == null ? void 0 : (_entry_element = entry.element) == null ? void 0 : _entry_element.src) || "";
|
|
595
|
+
const lcpImage = allImgs.get(imgSrc);
|
|
596
|
+
if (lcpImage && !lcpImage.priority && lcpImage.placeholder === "empty" && !lcpImage.src.startsWith("data:") && !lcpImage.src.startsWith("blob:")) {
|
|
597
|
+
(0, _warnonce.warnOnce)('Image with src "' + lcpImage.src + '" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.\nRead more: https://nextjs.org/docs/api-reference/next/image#priority');
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
try {
|
|
602
|
+
perfObserver.observe({
|
|
603
|
+
type: "largest-contentful-paint",
|
|
604
|
+
buffered: true
|
|
605
|
+
});
|
|
606
|
+
} catch (err) {
|
|
607
|
+
console.error(err);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
const imgStyle = Object.assign(fill ? {
|
|
612
|
+
position: "absolute",
|
|
613
|
+
height: "100%",
|
|
614
|
+
width: "100%",
|
|
615
|
+
left: 0,
|
|
616
|
+
top: 0,
|
|
617
|
+
right: 0,
|
|
618
|
+
bottom: 0,
|
|
619
|
+
objectFit,
|
|
620
|
+
objectPosition
|
|
621
|
+
} : {}, showAltText ? {} : {
|
|
622
|
+
color: "transparent"
|
|
623
|
+
}, style);
|
|
624
|
+
const backgroundImage = !blurComplete && placeholder !== "empty" ? placeholder === "blur" ? 'url("data:image/svg+xml;charset=utf-8,' + (0, _imageblursvg.getImageBlurSvg)({
|
|
625
|
+
widthInt,
|
|
626
|
+
heightInt,
|
|
627
|
+
blurWidth,
|
|
628
|
+
blurHeight,
|
|
629
|
+
blurDataURL: blurDataURL || "",
|
|
630
|
+
objectFit: imgStyle.objectFit
|
|
631
|
+
}) + '")' : 'url("' + placeholder + '")' : null;
|
|
632
|
+
const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === "fill" ? "100% 100%" : "cover";
|
|
633
|
+
let placeholderStyle = backgroundImage ? {
|
|
634
|
+
backgroundSize,
|
|
635
|
+
backgroundPosition: imgStyle.objectPosition || "50% 50%",
|
|
636
|
+
backgroundRepeat: "no-repeat",
|
|
637
|
+
backgroundImage
|
|
638
|
+
} : {};
|
|
639
|
+
if (process.env.NODE_ENV === "development") {
|
|
640
|
+
if (placeholderStyle.backgroundImage && placeholder === "blur" && (blurDataURL == null ? void 0 : blurDataURL.startsWith("/"))) {
|
|
641
|
+
placeholderStyle.backgroundImage = 'url("' + blurDataURL + '")';
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
const imgAttributes = generateImgAttrs({
|
|
645
|
+
config,
|
|
646
|
+
src,
|
|
647
|
+
unoptimized,
|
|
648
|
+
width: widthInt,
|
|
649
|
+
quality: qualityInt,
|
|
650
|
+
sizes,
|
|
651
|
+
loader
|
|
652
|
+
});
|
|
653
|
+
if (process.env.NODE_ENV !== "production") {
|
|
654
|
+
if (typeof window !== "undefined") {
|
|
655
|
+
let fullUrl;
|
|
656
|
+
try {
|
|
657
|
+
fullUrl = new URL(imgAttributes.src);
|
|
658
|
+
} catch (e) {
|
|
659
|
+
fullUrl = new URL(imgAttributes.src, window.location.href);
|
|
660
|
+
}
|
|
661
|
+
allImgs.set(fullUrl.href, {
|
|
662
|
+
src,
|
|
663
|
+
priority,
|
|
664
|
+
placeholder
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
const props = {
|
|
669
|
+
...rest,
|
|
670
|
+
loading: isLazy ? "lazy" : loading,
|
|
671
|
+
fetchPriority,
|
|
672
|
+
width: widthInt,
|
|
673
|
+
height: heightInt,
|
|
674
|
+
decoding,
|
|
675
|
+
className,
|
|
676
|
+
style: {
|
|
677
|
+
...imgStyle,
|
|
678
|
+
...placeholderStyle
|
|
679
|
+
},
|
|
680
|
+
sizes: imgAttributes.sizes,
|
|
681
|
+
srcSet: imgAttributes.srcSet,
|
|
682
|
+
src: overrideSrc || imgAttributes.src
|
|
683
|
+
};
|
|
684
|
+
const meta = {
|
|
685
|
+
unoptimized,
|
|
686
|
+
priority,
|
|
687
|
+
placeholder,
|
|
688
|
+
fill
|
|
689
|
+
};
|
|
690
|
+
return {
|
|
691
|
+
props,
|
|
692
|
+
meta
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
|
|
32
698
|
// node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs
|
|
33
699
|
var require_interop_require_wildcard = __commonJS({
|
|
34
700
|
"node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs"(exports2) {
|
|
35
701
|
"use strict";
|
|
36
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
37
|
-
if (typeof WeakMap !== "function") return null;
|
|
38
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
39
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
40
|
-
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
41
|
-
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
42
|
-
})(nodeInterop);
|
|
702
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
703
|
+
if (typeof WeakMap !== "function") return null;
|
|
704
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
705
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
706
|
+
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
707
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
708
|
+
})(nodeInterop);
|
|
709
|
+
}
|
|
710
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
711
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
712
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj };
|
|
713
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
714
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
715
|
+
var newObj = { __proto__: null };
|
|
716
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
717
|
+
for (var key in obj) {
|
|
718
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
719
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
720
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
721
|
+
else newObj[key] = obj[key];
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
newObj.default = obj;
|
|
725
|
+
if (cache) cache.set(obj, newObj);
|
|
726
|
+
return newObj;
|
|
727
|
+
}
|
|
728
|
+
exports2._ = _interop_require_wildcard;
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
// node_modules/next/dist/shared/lib/side-effect.js
|
|
733
|
+
var require_side_effect = __commonJS({
|
|
734
|
+
"node_modules/next/dist/shared/lib/side-effect.js"(exports2) {
|
|
735
|
+
"use strict";
|
|
736
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
737
|
+
value: true
|
|
738
|
+
});
|
|
739
|
+
Object.defineProperty(exports2, "default", {
|
|
740
|
+
enumerable: true,
|
|
741
|
+
get: function() {
|
|
742
|
+
return SideEffect;
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
var _react = require("react");
|
|
746
|
+
var isServer = typeof window === "undefined";
|
|
747
|
+
var useClientOnlyLayoutEffect = isServer ? () => {
|
|
748
|
+
} : _react.useLayoutEffect;
|
|
749
|
+
var useClientOnlyEffect = isServer ? () => {
|
|
750
|
+
} : _react.useEffect;
|
|
751
|
+
function SideEffect(props) {
|
|
752
|
+
const { headManager, reduceComponentsToState } = props;
|
|
753
|
+
function emitChange() {
|
|
754
|
+
if (headManager && headManager.mountedInstances) {
|
|
755
|
+
const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
|
|
756
|
+
headManager.updateHead(reduceComponentsToState(headElements, props));
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
if (isServer) {
|
|
760
|
+
var _headManager_mountedInstances;
|
|
761
|
+
headManager == null ? void 0 : (_headManager_mountedInstances = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances.add(props.children);
|
|
762
|
+
emitChange();
|
|
763
|
+
}
|
|
764
|
+
useClientOnlyLayoutEffect(() => {
|
|
765
|
+
var _headManager_mountedInstances2;
|
|
766
|
+
headManager == null ? void 0 : (_headManager_mountedInstances2 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances2.add(props.children);
|
|
767
|
+
return () => {
|
|
768
|
+
var _headManager_mountedInstances3;
|
|
769
|
+
headManager == null ? void 0 : (_headManager_mountedInstances3 = headManager.mountedInstances) == null ? void 0 : _headManager_mountedInstances3.delete(props.children);
|
|
770
|
+
};
|
|
771
|
+
});
|
|
772
|
+
useClientOnlyLayoutEffect(() => {
|
|
773
|
+
if (headManager) {
|
|
774
|
+
headManager._pendingUpdate = emitChange;
|
|
775
|
+
}
|
|
776
|
+
return () => {
|
|
777
|
+
if (headManager) {
|
|
778
|
+
headManager._pendingUpdate = emitChange;
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
});
|
|
782
|
+
useClientOnlyEffect(() => {
|
|
783
|
+
if (headManager && headManager._pendingUpdate) {
|
|
784
|
+
headManager._pendingUpdate();
|
|
785
|
+
headManager._pendingUpdate = null;
|
|
786
|
+
}
|
|
787
|
+
return () => {
|
|
788
|
+
if (headManager && headManager._pendingUpdate) {
|
|
789
|
+
headManager._pendingUpdate();
|
|
790
|
+
headManager._pendingUpdate = null;
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
});
|
|
794
|
+
return null;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
|
|
799
|
+
// node_modules/next/dist/shared/lib/amp-context.shared-runtime.js
|
|
800
|
+
var require_amp_context_shared_runtime = __commonJS({
|
|
801
|
+
"node_modules/next/dist/shared/lib/amp-context.shared-runtime.js"(exports2) {
|
|
802
|
+
"use strict";
|
|
803
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
804
|
+
value: true
|
|
805
|
+
});
|
|
806
|
+
Object.defineProperty(exports2, "AmpStateContext", {
|
|
807
|
+
enumerable: true,
|
|
808
|
+
get: function() {
|
|
809
|
+
return AmpStateContext;
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
var _interop_require_default = require_interop_require_default();
|
|
813
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
814
|
+
var AmpStateContext = _react.default.createContext({});
|
|
815
|
+
if (process.env.NODE_ENV !== "production") {
|
|
816
|
+
AmpStateContext.displayName = "AmpStateContext";
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
// node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js
|
|
822
|
+
var require_head_manager_context_shared_runtime = __commonJS({
|
|
823
|
+
"node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js"(exports2) {
|
|
824
|
+
"use strict";
|
|
825
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
826
|
+
value: true
|
|
827
|
+
});
|
|
828
|
+
Object.defineProperty(exports2, "HeadManagerContext", {
|
|
829
|
+
enumerable: true,
|
|
830
|
+
get: function() {
|
|
831
|
+
return HeadManagerContext;
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
var _interop_require_default = require_interop_require_default();
|
|
835
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
836
|
+
var HeadManagerContext = _react.default.createContext({});
|
|
837
|
+
if (process.env.NODE_ENV !== "production") {
|
|
838
|
+
HeadManagerContext.displayName = "HeadManagerContext";
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
|
|
843
|
+
// node_modules/next/dist/shared/lib/amp-mode.js
|
|
844
|
+
var require_amp_mode = __commonJS({
|
|
845
|
+
"node_modules/next/dist/shared/lib/amp-mode.js"(exports2) {
|
|
846
|
+
"use strict";
|
|
847
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
848
|
+
value: true
|
|
849
|
+
});
|
|
850
|
+
Object.defineProperty(exports2, "isInAmpMode", {
|
|
851
|
+
enumerable: true,
|
|
852
|
+
get: function() {
|
|
853
|
+
return isInAmpMode;
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
function isInAmpMode(param) {
|
|
857
|
+
let { ampFirst = false, hybrid = false, hasQuery = false } = param === void 0 ? {} : param;
|
|
858
|
+
return ampFirst || hybrid && hasQuery;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
|
|
863
|
+
// node_modules/next/dist/shared/lib/head.js
|
|
864
|
+
var require_head = __commonJS({
|
|
865
|
+
"node_modules/next/dist/shared/lib/head.js"(exports2, module2) {
|
|
866
|
+
"use client";
|
|
867
|
+
"use strict";
|
|
868
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
869
|
+
value: true
|
|
870
|
+
});
|
|
871
|
+
function _export(target, all) {
|
|
872
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
873
|
+
enumerable: true,
|
|
874
|
+
get: all[name]
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
_export(exports2, {
|
|
878
|
+
default: function() {
|
|
879
|
+
return _default;
|
|
880
|
+
},
|
|
881
|
+
defaultHead: function() {
|
|
882
|
+
return defaultHead;
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
var _interop_require_default = require_interop_require_default();
|
|
886
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
887
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
888
|
+
var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
|
|
889
|
+
var _sideeffect = /* @__PURE__ */ _interop_require_default._(require_side_effect());
|
|
890
|
+
var _ampcontextsharedruntime = require_amp_context_shared_runtime();
|
|
891
|
+
var _headmanagercontextsharedruntime = require_head_manager_context_shared_runtime();
|
|
892
|
+
var _ampmode = require_amp_mode();
|
|
893
|
+
var _warnonce = require_warn_once();
|
|
894
|
+
function defaultHead(inAmpMode) {
|
|
895
|
+
if (inAmpMode === void 0) inAmpMode = false;
|
|
896
|
+
const head = [
|
|
897
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
|
|
898
|
+
charSet: "utf-8"
|
|
899
|
+
}, "charset")
|
|
900
|
+
];
|
|
901
|
+
if (!inAmpMode) {
|
|
902
|
+
head.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("meta", {
|
|
903
|
+
name: "viewport",
|
|
904
|
+
content: "width=device-width"
|
|
905
|
+
}, "viewport"));
|
|
906
|
+
}
|
|
907
|
+
return head;
|
|
908
|
+
}
|
|
909
|
+
function onlyReactElement(list, child) {
|
|
910
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
911
|
+
return list;
|
|
912
|
+
}
|
|
913
|
+
if (child.type === _react.default.Fragment) {
|
|
914
|
+
return list.concat(
|
|
915
|
+
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
916
|
+
_react.default.Children.toArray(child.props.children).reduce(
|
|
917
|
+
// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
|
|
918
|
+
(fragmentList, fragmentChild) => {
|
|
919
|
+
if (typeof fragmentChild === "string" || typeof fragmentChild === "number") {
|
|
920
|
+
return fragmentList;
|
|
921
|
+
}
|
|
922
|
+
return fragmentList.concat(fragmentChild);
|
|
923
|
+
},
|
|
924
|
+
[]
|
|
925
|
+
)
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
return list.concat(child);
|
|
929
|
+
}
|
|
930
|
+
var METATYPES = [
|
|
931
|
+
"name",
|
|
932
|
+
"httpEquiv",
|
|
933
|
+
"charSet",
|
|
934
|
+
"itemProp"
|
|
935
|
+
];
|
|
936
|
+
function unique() {
|
|
937
|
+
const keys = /* @__PURE__ */ new Set();
|
|
938
|
+
const tags = /* @__PURE__ */ new Set();
|
|
939
|
+
const metaTypes = /* @__PURE__ */ new Set();
|
|
940
|
+
const metaCategories = {};
|
|
941
|
+
return (h) => {
|
|
942
|
+
let isUnique = true;
|
|
943
|
+
let hasKey = false;
|
|
944
|
+
if (h.key && typeof h.key !== "number" && h.key.indexOf("$") > 0) {
|
|
945
|
+
hasKey = true;
|
|
946
|
+
const key = h.key.slice(h.key.indexOf("$") + 1);
|
|
947
|
+
if (keys.has(key)) {
|
|
948
|
+
isUnique = false;
|
|
949
|
+
} else {
|
|
950
|
+
keys.add(key);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
switch (h.type) {
|
|
954
|
+
case "title":
|
|
955
|
+
case "base":
|
|
956
|
+
if (tags.has(h.type)) {
|
|
957
|
+
isUnique = false;
|
|
958
|
+
} else {
|
|
959
|
+
tags.add(h.type);
|
|
960
|
+
}
|
|
961
|
+
break;
|
|
962
|
+
case "meta":
|
|
963
|
+
for (let i = 0, len = METATYPES.length; i < len; i++) {
|
|
964
|
+
const metatype = METATYPES[i];
|
|
965
|
+
if (!h.props.hasOwnProperty(metatype)) continue;
|
|
966
|
+
if (metatype === "charSet") {
|
|
967
|
+
if (metaTypes.has(metatype)) {
|
|
968
|
+
isUnique = false;
|
|
969
|
+
} else {
|
|
970
|
+
metaTypes.add(metatype);
|
|
971
|
+
}
|
|
972
|
+
} else {
|
|
973
|
+
const category = h.props[metatype];
|
|
974
|
+
const categories = metaCategories[metatype] || /* @__PURE__ */ new Set();
|
|
975
|
+
if ((metatype !== "name" || !hasKey) && categories.has(category)) {
|
|
976
|
+
isUnique = false;
|
|
977
|
+
} else {
|
|
978
|
+
categories.add(category);
|
|
979
|
+
metaCategories[metatype] = categories;
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
return isUnique;
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
function reduceComponents(headChildrenElements, props) {
|
|
989
|
+
const { inAmpMode } = props;
|
|
990
|
+
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(inAmpMode).reverse()).filter(unique()).reverse().map((c, i) => {
|
|
991
|
+
const key = c.key || i;
|
|
992
|
+
if (process.env.NODE_ENV !== "development" && process.env.__NEXT_OPTIMIZE_FONTS && !inAmpMode) {
|
|
993
|
+
if (c.type === "link" && c.props["href"] && // TODO(prateekbh@): Replace this with const from `constants` when the tree shaking works.
|
|
994
|
+
[
|
|
995
|
+
"https://fonts.googleapis.com/css",
|
|
996
|
+
"https://use.typekit.net/"
|
|
997
|
+
].some((url) => c.props["href"].startsWith(url))) {
|
|
998
|
+
const newProps = {
|
|
999
|
+
...c.props || {}
|
|
1000
|
+
};
|
|
1001
|
+
newProps["data-href"] = newProps["href"];
|
|
1002
|
+
newProps["href"] = void 0;
|
|
1003
|
+
newProps["data-optimized-fonts"] = true;
|
|
1004
|
+
return /* @__PURE__ */ _react.default.cloneElement(c, newProps);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
if (process.env.NODE_ENV === "development") {
|
|
1008
|
+
if (c.type === "script" && c.props["type"] !== "application/ld+json") {
|
|
1009
|
+
const srcMessage = c.props["src"] ? '<script> tag with src="' + c.props["src"] + '"' : "inline <script>";
|
|
1010
|
+
(0, _warnonce.warnOnce)("Do not add <script> tags using next/head (see " + srcMessage + "). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component");
|
|
1011
|
+
} else if (c.type === "link" && c.props["rel"] === "stylesheet") {
|
|
1012
|
+
(0, _warnonce.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="' + c.props["href"] + '"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component');
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
return /* @__PURE__ */ _react.default.cloneElement(c, {
|
|
1016
|
+
key
|
|
1017
|
+
});
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function Head(param) {
|
|
1021
|
+
let { children } = param;
|
|
1022
|
+
const ampState = (0, _react.useContext)(_ampcontextsharedruntime.AmpStateContext);
|
|
1023
|
+
const headManager = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
|
|
1024
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_sideeffect.default, {
|
|
1025
|
+
reduceComponentsToState: reduceComponents,
|
|
1026
|
+
headManager,
|
|
1027
|
+
inAmpMode: (0, _ampmode.isInAmpMode)(ampState),
|
|
1028
|
+
children
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
var _default = Head;
|
|
1032
|
+
if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
|
|
1033
|
+
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
1034
|
+
Object.assign(exports2.default, exports2);
|
|
1035
|
+
module2.exports = exports2.default;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
// node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js
|
|
1041
|
+
var require_image_config_context_shared_runtime = __commonJS({
|
|
1042
|
+
"node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js"(exports2) {
|
|
1043
|
+
"use strict";
|
|
1044
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1045
|
+
value: true
|
|
1046
|
+
});
|
|
1047
|
+
Object.defineProperty(exports2, "ImageConfigContext", {
|
|
1048
|
+
enumerable: true,
|
|
1049
|
+
get: function() {
|
|
1050
|
+
return ImageConfigContext;
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
var _interop_require_default = require_interop_require_default();
|
|
1054
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
1055
|
+
var _imageconfig = require_image_config();
|
|
1056
|
+
var ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
|
|
1057
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1058
|
+
ImageConfigContext.displayName = "ImageConfigContext";
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
// node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
1064
|
+
var require_router_context_shared_runtime = __commonJS({
|
|
1065
|
+
"node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
|
|
1066
|
+
"use strict";
|
|
1067
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
1068
|
+
value: true
|
|
1069
|
+
});
|
|
1070
|
+
Object.defineProperty(exports2, "RouterContext", {
|
|
1071
|
+
enumerable: true,
|
|
1072
|
+
get: function() {
|
|
1073
|
+
return RouterContext;
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
var _interop_require_default = require_interop_require_default();
|
|
1077
|
+
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
1078
|
+
var RouterContext = _react.default.createContext(null);
|
|
1079
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1080
|
+
RouterContext.displayName = "RouterContext";
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1084
|
+
|
|
1085
|
+
// node_modules/next/dist/compiled/picomatch/index.js
|
|
1086
|
+
var require_picomatch = __commonJS({
|
|
1087
|
+
"node_modules/next/dist/compiled/picomatch/index.js"(exports2, module2) {
|
|
1088
|
+
(() => {
|
|
1089
|
+
"use strict";
|
|
1090
|
+
var t = { 170: (t2, e2, u2) => {
|
|
1091
|
+
const n = u2(510);
|
|
1092
|
+
const isWindows = () => {
|
|
1093
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
1094
|
+
const t3 = navigator.platform.toLowerCase();
|
|
1095
|
+
return t3 === "win32" || t3 === "windows";
|
|
1096
|
+
}
|
|
1097
|
+
if (typeof process !== "undefined" && process.platform) {
|
|
1098
|
+
return process.platform === "win32";
|
|
1099
|
+
}
|
|
1100
|
+
return false;
|
|
1101
|
+
};
|
|
1102
|
+
function picomatch(t3, e3, u3 = false) {
|
|
1103
|
+
if (e3 && (e3.windows === null || e3.windows === void 0)) {
|
|
1104
|
+
e3 = { ...e3, windows: isWindows() };
|
|
1105
|
+
}
|
|
1106
|
+
return n(t3, e3, u3);
|
|
1107
|
+
}
|
|
1108
|
+
Object.assign(picomatch, n);
|
|
1109
|
+
t2.exports = picomatch;
|
|
1110
|
+
}, 154: (t2) => {
|
|
1111
|
+
const e2 = "\\\\/";
|
|
1112
|
+
const u2 = `[^${e2}]`;
|
|
1113
|
+
const n = "\\.";
|
|
1114
|
+
const o = "\\+";
|
|
1115
|
+
const s = "\\?";
|
|
1116
|
+
const r = "\\/";
|
|
1117
|
+
const a = "(?=.)";
|
|
1118
|
+
const i = "[^/]";
|
|
1119
|
+
const c = `(?:${r}|$)`;
|
|
1120
|
+
const p = `(?:^|${r})`;
|
|
1121
|
+
const l = `${n}{1,2}${c}`;
|
|
1122
|
+
const f = `(?!${n})`;
|
|
1123
|
+
const A = `(?!${p}${l})`;
|
|
1124
|
+
const _ = `(?!${n}{0,1}${c})`;
|
|
1125
|
+
const R = `(?!${l})`;
|
|
1126
|
+
const E = `[^.${r}]`;
|
|
1127
|
+
const h = `${i}*?`;
|
|
1128
|
+
const g = "/";
|
|
1129
|
+
const b = { DOT_LITERAL: n, PLUS_LITERAL: o, QMARK_LITERAL: s, SLASH_LITERAL: r, ONE_CHAR: a, QMARK: i, END_ANCHOR: c, DOTS_SLASH: l, NO_DOT: f, NO_DOTS: A, NO_DOT_SLASH: _, NO_DOTS_SLASH: R, QMARK_NO_DOT: E, STAR: h, START_ANCHOR: p, SEP: g };
|
|
1130
|
+
const C = { ...b, SLASH_LITERAL: `[${e2}]`, QMARK: u2, STAR: `${u2}*?`, DOTS_SLASH: `${n}{1,2}(?:[${e2}]|$)`, NO_DOT: `(?!${n})`, NO_DOTS: `(?!(?:^|[${e2}])${n}{1,2}(?:[${e2}]|$))`, NO_DOT_SLASH: `(?!${n}{0,1}(?:[${e2}]|$))`, NO_DOTS_SLASH: `(?!${n}{1,2}(?:[${e2}]|$))`, QMARK_NO_DOT: `[^.${e2}]`, START_ANCHOR: `(?:^|[${e2}])`, END_ANCHOR: `(?:[${e2}]|$)`, SEP: "\\" };
|
|
1131
|
+
const y = { alnum: "a-zA-Z0-9", alpha: "a-zA-Z", ascii: "\\x00-\\x7F", blank: " \\t", cntrl: "\\x00-\\x1F\\x7F", digit: "0-9", graph: "\\x21-\\x7E", lower: "a-z", print: "\\x20-\\x7E ", punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", space: " \\t\\r\\n\\v\\f", upper: "A-Z", word: "A-Za-z0-9_", xdigit: "A-Fa-f0-9" };
|
|
1132
|
+
t2.exports = { MAX_LENGTH: 1024 * 64, POSIX_REGEX_SOURCE: y, REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, REPLACEMENTS: { "***": "*", "**/**": "**", "**/**/**": "**" }, CHAR_0: 48, CHAR_9: 57, CHAR_UPPERCASE_A: 65, CHAR_LOWERCASE_A: 97, CHAR_UPPERCASE_Z: 90, CHAR_LOWERCASE_Z: 122, CHAR_LEFT_PARENTHESES: 40, CHAR_RIGHT_PARENTHESES: 41, CHAR_ASTERISK: 42, CHAR_AMPERSAND: 38, CHAR_AT: 64, CHAR_BACKWARD_SLASH: 92, CHAR_CARRIAGE_RETURN: 13, CHAR_CIRCUMFLEX_ACCENT: 94, CHAR_COLON: 58, CHAR_COMMA: 44, CHAR_DOT: 46, CHAR_DOUBLE_QUOTE: 34, CHAR_EQUAL: 61, CHAR_EXCLAMATION_MARK: 33, CHAR_FORM_FEED: 12, CHAR_FORWARD_SLASH: 47, CHAR_GRAVE_ACCENT: 96, CHAR_HASH: 35, CHAR_HYPHEN_MINUS: 45, CHAR_LEFT_ANGLE_BRACKET: 60, CHAR_LEFT_CURLY_BRACE: 123, CHAR_LEFT_SQUARE_BRACKET: 91, CHAR_LINE_FEED: 10, CHAR_NO_BREAK_SPACE: 160, CHAR_PERCENT: 37, CHAR_PLUS: 43, CHAR_QUESTION_MARK: 63, CHAR_RIGHT_ANGLE_BRACKET: 62, CHAR_RIGHT_CURLY_BRACE: 125, CHAR_RIGHT_SQUARE_BRACKET: 93, CHAR_SEMICOLON: 59, CHAR_SINGLE_QUOTE: 39, CHAR_SPACE: 32, CHAR_TAB: 9, CHAR_UNDERSCORE: 95, CHAR_VERTICAL_LINE: 124, CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, extglobChars(t3) {
|
|
1133
|
+
return { "!": { type: "negate", open: "(?:(?!(?:", close: `))${t3.STAR})` }, "?": { type: "qmark", open: "(?:", close: ")?" }, "+": { type: "plus", open: "(?:", close: ")+" }, "*": { type: "star", open: "(?:", close: ")*" }, "@": { type: "at", open: "(?:", close: ")" } };
|
|
1134
|
+
}, globChars(t3) {
|
|
1135
|
+
return t3 === true ? C : b;
|
|
1136
|
+
} };
|
|
1137
|
+
}, 697: (t2, e2, u2) => {
|
|
1138
|
+
const n = u2(154);
|
|
1139
|
+
const o = u2(96);
|
|
1140
|
+
const { MAX_LENGTH: s, POSIX_REGEX_SOURCE: r, REGEX_NON_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_BACKREF: i, REPLACEMENTS: c } = n;
|
|
1141
|
+
const expandRange = (t3, e3) => {
|
|
1142
|
+
if (typeof e3.expandRange === "function") {
|
|
1143
|
+
return e3.expandRange(...t3, e3);
|
|
1144
|
+
}
|
|
1145
|
+
t3.sort();
|
|
1146
|
+
const u3 = `[${t3.join("-")}]`;
|
|
1147
|
+
try {
|
|
1148
|
+
new RegExp(u3);
|
|
1149
|
+
} catch (e4) {
|
|
1150
|
+
return t3.map((t4) => o.escapeRegex(t4)).join("..");
|
|
1151
|
+
}
|
|
1152
|
+
return u3;
|
|
1153
|
+
};
|
|
1154
|
+
const syntaxError = (t3, e3) => `Missing ${t3}: "${e3}" - use "\\\\${e3}" to match literal characters`;
|
|
1155
|
+
const parse = (t3, e3) => {
|
|
1156
|
+
if (typeof t3 !== "string") {
|
|
1157
|
+
throw new TypeError("Expected a string");
|
|
1158
|
+
}
|
|
1159
|
+
t3 = c[t3] || t3;
|
|
1160
|
+
const u3 = { ...e3 };
|
|
1161
|
+
const p = typeof u3.maxLength === "number" ? Math.min(s, u3.maxLength) : s;
|
|
1162
|
+
let l = t3.length;
|
|
1163
|
+
if (l > p) {
|
|
1164
|
+
throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${p}`);
|
|
1165
|
+
}
|
|
1166
|
+
const f = { type: "bos", value: "", output: u3.prepend || "" };
|
|
1167
|
+
const A = [f];
|
|
1168
|
+
const _ = u3.capture ? "" : "?:";
|
|
1169
|
+
const R = n.globChars(u3.windows);
|
|
1170
|
+
const E = n.extglobChars(R);
|
|
1171
|
+
const { DOT_LITERAL: h, PLUS_LITERAL: g, SLASH_LITERAL: b, ONE_CHAR: C, DOTS_SLASH: y, NO_DOT: $, NO_DOT_SLASH: x, NO_DOTS_SLASH: S, QMARK: H, QMARK_NO_DOT: v, STAR: d, START_ANCHOR: L } = R;
|
|
1172
|
+
const globstar = (t4) => `(${_}(?:(?!${L}${t4.dot ? y : h}).)*?)`;
|
|
1173
|
+
const T = u3.dot ? "" : $;
|
|
1174
|
+
const O = u3.dot ? H : v;
|
|
1175
|
+
let k = u3.bash === true ? globstar(u3) : d;
|
|
1176
|
+
if (u3.capture) {
|
|
1177
|
+
k = `(${k})`;
|
|
1178
|
+
}
|
|
1179
|
+
if (typeof u3.noext === "boolean") {
|
|
1180
|
+
u3.noextglob = u3.noext;
|
|
1181
|
+
}
|
|
1182
|
+
const m = { input: t3, index: -1, start: 0, dot: u3.dot === true, consumed: "", output: "", prefix: "", backtrack: false, negated: false, brackets: 0, braces: 0, parens: 0, quotes: 0, globstar: false, tokens: A };
|
|
1183
|
+
t3 = o.removePrefix(t3, m);
|
|
1184
|
+
l = t3.length;
|
|
1185
|
+
const w = [];
|
|
1186
|
+
const N = [];
|
|
1187
|
+
const I = [];
|
|
1188
|
+
let B = f;
|
|
1189
|
+
let G;
|
|
1190
|
+
const eos = () => m.index === l - 1;
|
|
1191
|
+
const D = m.peek = (e4 = 1) => t3[m.index + e4];
|
|
1192
|
+
const M = m.advance = () => t3[++m.index] || "";
|
|
1193
|
+
const remaining = () => t3.slice(m.index + 1);
|
|
1194
|
+
const consume = (t4 = "", e4 = 0) => {
|
|
1195
|
+
m.consumed += t4;
|
|
1196
|
+
m.index += e4;
|
|
1197
|
+
};
|
|
1198
|
+
const append = (t4) => {
|
|
1199
|
+
m.output += t4.output != null ? t4.output : t4.value;
|
|
1200
|
+
consume(t4.value);
|
|
1201
|
+
};
|
|
1202
|
+
const negate = () => {
|
|
1203
|
+
let t4 = 1;
|
|
1204
|
+
while (D() === "!" && (D(2) !== "(" || D(3) === "?")) {
|
|
1205
|
+
M();
|
|
1206
|
+
m.start++;
|
|
1207
|
+
t4++;
|
|
1208
|
+
}
|
|
1209
|
+
if (t4 % 2 === 0) {
|
|
1210
|
+
return false;
|
|
1211
|
+
}
|
|
1212
|
+
m.negated = true;
|
|
1213
|
+
m.start++;
|
|
1214
|
+
return true;
|
|
1215
|
+
};
|
|
1216
|
+
const increment = (t4) => {
|
|
1217
|
+
m[t4]++;
|
|
1218
|
+
I.push(t4);
|
|
1219
|
+
};
|
|
1220
|
+
const decrement = (t4) => {
|
|
1221
|
+
m[t4]--;
|
|
1222
|
+
I.pop();
|
|
1223
|
+
};
|
|
1224
|
+
const push = (t4) => {
|
|
1225
|
+
if (B.type === "globstar") {
|
|
1226
|
+
const e4 = m.braces > 0 && (t4.type === "comma" || t4.type === "brace");
|
|
1227
|
+
const u4 = t4.extglob === true || w.length && (t4.type === "pipe" || t4.type === "paren");
|
|
1228
|
+
if (t4.type !== "slash" && t4.type !== "paren" && !e4 && !u4) {
|
|
1229
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1230
|
+
B.type = "star";
|
|
1231
|
+
B.value = "*";
|
|
1232
|
+
B.output = k;
|
|
1233
|
+
m.output += B.output;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
if (w.length && t4.type !== "paren") {
|
|
1237
|
+
w[w.length - 1].inner += t4.value;
|
|
1238
|
+
}
|
|
1239
|
+
if (t4.value || t4.output) append(t4);
|
|
1240
|
+
if (B && B.type === "text" && t4.type === "text") {
|
|
1241
|
+
B.output = (B.output || B.value) + t4.value;
|
|
1242
|
+
B.value += t4.value;
|
|
1243
|
+
return;
|
|
1244
|
+
}
|
|
1245
|
+
t4.prev = B;
|
|
1246
|
+
A.push(t4);
|
|
1247
|
+
B = t4;
|
|
1248
|
+
};
|
|
1249
|
+
const extglobOpen = (t4, e4) => {
|
|
1250
|
+
const n2 = { ...E[e4], conditions: 1, inner: "" };
|
|
1251
|
+
n2.prev = B;
|
|
1252
|
+
n2.parens = m.parens;
|
|
1253
|
+
n2.output = m.output;
|
|
1254
|
+
const o2 = (u3.capture ? "(" : "") + n2.open;
|
|
1255
|
+
increment("parens");
|
|
1256
|
+
push({ type: t4, value: e4, output: m.output ? "" : C });
|
|
1257
|
+
push({ type: "paren", extglob: true, value: M(), output: o2 });
|
|
1258
|
+
w.push(n2);
|
|
1259
|
+
};
|
|
1260
|
+
const extglobClose = (t4) => {
|
|
1261
|
+
let n2 = t4.close + (u3.capture ? ")" : "");
|
|
1262
|
+
let o2;
|
|
1263
|
+
if (t4.type === "negate") {
|
|
1264
|
+
let s2 = k;
|
|
1265
|
+
if (t4.inner && t4.inner.length > 1 && t4.inner.includes("/")) {
|
|
1266
|
+
s2 = globstar(u3);
|
|
1267
|
+
}
|
|
1268
|
+
if (s2 !== k || eos() || /^\)+$/.test(remaining())) {
|
|
1269
|
+
n2 = t4.close = `)$))${s2}`;
|
|
1270
|
+
}
|
|
1271
|
+
if (t4.inner.includes("*") && (o2 = remaining()) && /^\.[^\\/.]+$/.test(o2)) {
|
|
1272
|
+
const u4 = parse(o2, { ...e3, fastpaths: false }).output;
|
|
1273
|
+
n2 = t4.close = `)${u4})${s2})`;
|
|
1274
|
+
}
|
|
1275
|
+
if (t4.prev.type === "bos") {
|
|
1276
|
+
m.negatedExtglob = true;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
push({ type: "paren", extglob: true, value: G, output: n2 });
|
|
1280
|
+
decrement("parens");
|
|
1281
|
+
};
|
|
1282
|
+
if (u3.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(t3)) {
|
|
1283
|
+
let n2 = false;
|
|
1284
|
+
let s2 = t3.replace(i, (t4, e4, u4, o2, s3, r2) => {
|
|
1285
|
+
if (o2 === "\\") {
|
|
1286
|
+
n2 = true;
|
|
1287
|
+
return t4;
|
|
1288
|
+
}
|
|
1289
|
+
if (o2 === "?") {
|
|
1290
|
+
if (e4) {
|
|
1291
|
+
return e4 + o2 + (s3 ? H.repeat(s3.length) : "");
|
|
1292
|
+
}
|
|
1293
|
+
if (r2 === 0) {
|
|
1294
|
+
return O + (s3 ? H.repeat(s3.length) : "");
|
|
1295
|
+
}
|
|
1296
|
+
return H.repeat(u4.length);
|
|
1297
|
+
}
|
|
1298
|
+
if (o2 === ".") {
|
|
1299
|
+
return h.repeat(u4.length);
|
|
1300
|
+
}
|
|
1301
|
+
if (o2 === "*") {
|
|
1302
|
+
if (e4) {
|
|
1303
|
+
return e4 + o2 + (s3 ? k : "");
|
|
1304
|
+
}
|
|
1305
|
+
return k;
|
|
1306
|
+
}
|
|
1307
|
+
return e4 ? t4 : `\\${t4}`;
|
|
1308
|
+
});
|
|
1309
|
+
if (n2 === true) {
|
|
1310
|
+
if (u3.unescape === true) {
|
|
1311
|
+
s2 = s2.replace(/\\/g, "");
|
|
1312
|
+
} else {
|
|
1313
|
+
s2 = s2.replace(/\\+/g, (t4) => t4.length % 2 === 0 ? "\\\\" : t4 ? "\\" : "");
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
if (s2 === t3 && u3.contains === true) {
|
|
1317
|
+
m.output = t3;
|
|
1318
|
+
return m;
|
|
1319
|
+
}
|
|
1320
|
+
m.output = o.wrapOutput(s2, m, e3);
|
|
1321
|
+
return m;
|
|
1322
|
+
}
|
|
1323
|
+
while (!eos()) {
|
|
1324
|
+
G = M();
|
|
1325
|
+
if (G === "\0") {
|
|
1326
|
+
continue;
|
|
1327
|
+
}
|
|
1328
|
+
if (G === "\\") {
|
|
1329
|
+
const t4 = D();
|
|
1330
|
+
if (t4 === "/" && u3.bash !== true) {
|
|
1331
|
+
continue;
|
|
1332
|
+
}
|
|
1333
|
+
if (t4 === "." || t4 === ";") {
|
|
1334
|
+
continue;
|
|
1335
|
+
}
|
|
1336
|
+
if (!t4) {
|
|
1337
|
+
G += "\\";
|
|
1338
|
+
push({ type: "text", value: G });
|
|
1339
|
+
continue;
|
|
1340
|
+
}
|
|
1341
|
+
const e5 = /^\\+/.exec(remaining());
|
|
1342
|
+
let n3 = 0;
|
|
1343
|
+
if (e5 && e5[0].length > 2) {
|
|
1344
|
+
n3 = e5[0].length;
|
|
1345
|
+
m.index += n3;
|
|
1346
|
+
if (n3 % 2 !== 0) {
|
|
1347
|
+
G += "\\";
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (u3.unescape === true) {
|
|
1351
|
+
G = M();
|
|
1352
|
+
} else {
|
|
1353
|
+
G += M();
|
|
1354
|
+
}
|
|
1355
|
+
if (m.brackets === 0) {
|
|
1356
|
+
push({ type: "text", value: G });
|
|
1357
|
+
continue;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
if (m.brackets > 0 && (G !== "]" || B.value === "[" || B.value === "[^")) {
|
|
1361
|
+
if (u3.posix !== false && G === ":") {
|
|
1362
|
+
const t4 = B.value.slice(1);
|
|
1363
|
+
if (t4.includes("[")) {
|
|
1364
|
+
B.posix = true;
|
|
1365
|
+
if (t4.includes(":")) {
|
|
1366
|
+
const t5 = B.value.lastIndexOf("[");
|
|
1367
|
+
const e5 = B.value.slice(0, t5);
|
|
1368
|
+
const u4 = B.value.slice(t5 + 2);
|
|
1369
|
+
const n3 = r[u4];
|
|
1370
|
+
if (n3) {
|
|
1371
|
+
B.value = e5 + n3;
|
|
1372
|
+
m.backtrack = true;
|
|
1373
|
+
M();
|
|
1374
|
+
if (!f.output && A.indexOf(B) === 1) {
|
|
1375
|
+
f.output = C;
|
|
1376
|
+
}
|
|
1377
|
+
continue;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
if (G === "[" && D() !== ":" || G === "-" && D() === "]") {
|
|
1383
|
+
G = `\\${G}`;
|
|
1384
|
+
}
|
|
1385
|
+
if (G === "]" && (B.value === "[" || B.value === "[^")) {
|
|
1386
|
+
G = `\\${G}`;
|
|
1387
|
+
}
|
|
1388
|
+
if (u3.posix === true && G === "!" && B.value === "[") {
|
|
1389
|
+
G = "^";
|
|
1390
|
+
}
|
|
1391
|
+
B.value += G;
|
|
1392
|
+
append({ value: G });
|
|
1393
|
+
continue;
|
|
1394
|
+
}
|
|
1395
|
+
if (m.quotes === 1 && G !== '"') {
|
|
1396
|
+
G = o.escapeRegex(G);
|
|
1397
|
+
B.value += G;
|
|
1398
|
+
append({ value: G });
|
|
1399
|
+
continue;
|
|
1400
|
+
}
|
|
1401
|
+
if (G === '"') {
|
|
1402
|
+
m.quotes = m.quotes === 1 ? 0 : 1;
|
|
1403
|
+
if (u3.keepQuotes === true) {
|
|
1404
|
+
push({ type: "text", value: G });
|
|
1405
|
+
}
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
if (G === "(") {
|
|
1409
|
+
increment("parens");
|
|
1410
|
+
push({ type: "paren", value: G });
|
|
1411
|
+
continue;
|
|
1412
|
+
}
|
|
1413
|
+
if (G === ")") {
|
|
1414
|
+
if (m.parens === 0 && u3.strictBrackets === true) {
|
|
1415
|
+
throw new SyntaxError(syntaxError("opening", "("));
|
|
1416
|
+
}
|
|
1417
|
+
const t4 = w[w.length - 1];
|
|
1418
|
+
if (t4 && m.parens === t4.parens + 1) {
|
|
1419
|
+
extglobClose(w.pop());
|
|
1420
|
+
continue;
|
|
1421
|
+
}
|
|
1422
|
+
push({ type: "paren", value: G, output: m.parens ? ")" : "\\)" });
|
|
1423
|
+
decrement("parens");
|
|
1424
|
+
continue;
|
|
1425
|
+
}
|
|
1426
|
+
if (G === "[") {
|
|
1427
|
+
if (u3.nobracket === true || !remaining().includes("]")) {
|
|
1428
|
+
if (u3.nobracket !== true && u3.strictBrackets === true) {
|
|
1429
|
+
throw new SyntaxError(syntaxError("closing", "]"));
|
|
1430
|
+
}
|
|
1431
|
+
G = `\\${G}`;
|
|
1432
|
+
} else {
|
|
1433
|
+
increment("brackets");
|
|
1434
|
+
}
|
|
1435
|
+
push({ type: "bracket", value: G });
|
|
1436
|
+
continue;
|
|
1437
|
+
}
|
|
1438
|
+
if (G === "]") {
|
|
1439
|
+
if (u3.nobracket === true || B && B.type === "bracket" && B.value.length === 1) {
|
|
1440
|
+
push({ type: "text", value: G, output: `\\${G}` });
|
|
1441
|
+
continue;
|
|
1442
|
+
}
|
|
1443
|
+
if (m.brackets === 0) {
|
|
1444
|
+
if (u3.strictBrackets === true) {
|
|
1445
|
+
throw new SyntaxError(syntaxError("opening", "["));
|
|
1446
|
+
}
|
|
1447
|
+
push({ type: "text", value: G, output: `\\${G}` });
|
|
1448
|
+
continue;
|
|
1449
|
+
}
|
|
1450
|
+
decrement("brackets");
|
|
1451
|
+
const t4 = B.value.slice(1);
|
|
1452
|
+
if (B.posix !== true && t4[0] === "^" && !t4.includes("/")) {
|
|
1453
|
+
G = `/${G}`;
|
|
1454
|
+
}
|
|
1455
|
+
B.value += G;
|
|
1456
|
+
append({ value: G });
|
|
1457
|
+
if (u3.literalBrackets === false || o.hasRegexChars(t4)) {
|
|
1458
|
+
continue;
|
|
1459
|
+
}
|
|
1460
|
+
const e5 = o.escapeRegex(B.value);
|
|
1461
|
+
m.output = m.output.slice(0, -B.value.length);
|
|
1462
|
+
if (u3.literalBrackets === true) {
|
|
1463
|
+
m.output += e5;
|
|
1464
|
+
B.value = e5;
|
|
1465
|
+
continue;
|
|
1466
|
+
}
|
|
1467
|
+
B.value = `(${_}${e5}|${B.value})`;
|
|
1468
|
+
m.output += B.value;
|
|
1469
|
+
continue;
|
|
1470
|
+
}
|
|
1471
|
+
if (G === "{" && u3.nobrace !== true) {
|
|
1472
|
+
increment("braces");
|
|
1473
|
+
const t4 = { type: "brace", value: G, output: "(", outputIndex: m.output.length, tokensIndex: m.tokens.length };
|
|
1474
|
+
N.push(t4);
|
|
1475
|
+
push(t4);
|
|
1476
|
+
continue;
|
|
1477
|
+
}
|
|
1478
|
+
if (G === "}") {
|
|
1479
|
+
const t4 = N[N.length - 1];
|
|
1480
|
+
if (u3.nobrace === true || !t4) {
|
|
1481
|
+
push({ type: "text", value: G, output: G });
|
|
1482
|
+
continue;
|
|
1483
|
+
}
|
|
1484
|
+
let e5 = ")";
|
|
1485
|
+
if (t4.dots === true) {
|
|
1486
|
+
const t5 = A.slice();
|
|
1487
|
+
const n3 = [];
|
|
1488
|
+
for (let e6 = t5.length - 1; e6 >= 0; e6--) {
|
|
1489
|
+
A.pop();
|
|
1490
|
+
if (t5[e6].type === "brace") {
|
|
1491
|
+
break;
|
|
1492
|
+
}
|
|
1493
|
+
if (t5[e6].type !== "dots") {
|
|
1494
|
+
n3.unshift(t5[e6].value);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
e5 = expandRange(n3, u3);
|
|
1498
|
+
m.backtrack = true;
|
|
1499
|
+
}
|
|
1500
|
+
if (t4.comma !== true && t4.dots !== true) {
|
|
1501
|
+
const u4 = m.output.slice(0, t4.outputIndex);
|
|
1502
|
+
const n3 = m.tokens.slice(t4.tokensIndex);
|
|
1503
|
+
t4.value = t4.output = "\\{";
|
|
1504
|
+
G = e5 = "\\}";
|
|
1505
|
+
m.output = u4;
|
|
1506
|
+
for (const t5 of n3) {
|
|
1507
|
+
m.output += t5.output || t5.value;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
push({ type: "brace", value: G, output: e5 });
|
|
1511
|
+
decrement("braces");
|
|
1512
|
+
N.pop();
|
|
1513
|
+
continue;
|
|
1514
|
+
}
|
|
1515
|
+
if (G === "|") {
|
|
1516
|
+
if (w.length > 0) {
|
|
1517
|
+
w[w.length - 1].conditions++;
|
|
1518
|
+
}
|
|
1519
|
+
push({ type: "text", value: G });
|
|
1520
|
+
continue;
|
|
1521
|
+
}
|
|
1522
|
+
if (G === ",") {
|
|
1523
|
+
let t4 = G;
|
|
1524
|
+
const e5 = N[N.length - 1];
|
|
1525
|
+
if (e5 && I[I.length - 1] === "braces") {
|
|
1526
|
+
e5.comma = true;
|
|
1527
|
+
t4 = "|";
|
|
1528
|
+
}
|
|
1529
|
+
push({ type: "comma", value: G, output: t4 });
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
if (G === "/") {
|
|
1533
|
+
if (B.type === "dot" && m.index === m.start + 1) {
|
|
1534
|
+
m.start = m.index + 1;
|
|
1535
|
+
m.consumed = "";
|
|
1536
|
+
m.output = "";
|
|
1537
|
+
A.pop();
|
|
1538
|
+
B = f;
|
|
1539
|
+
continue;
|
|
1540
|
+
}
|
|
1541
|
+
push({ type: "slash", value: G, output: b });
|
|
1542
|
+
continue;
|
|
1543
|
+
}
|
|
1544
|
+
if (G === ".") {
|
|
1545
|
+
if (m.braces > 0 && B.type === "dot") {
|
|
1546
|
+
if (B.value === ".") B.output = h;
|
|
1547
|
+
const t4 = N[N.length - 1];
|
|
1548
|
+
B.type = "dots";
|
|
1549
|
+
B.output += G;
|
|
1550
|
+
B.value += G;
|
|
1551
|
+
t4.dots = true;
|
|
1552
|
+
continue;
|
|
1553
|
+
}
|
|
1554
|
+
if (m.braces + m.parens === 0 && B.type !== "bos" && B.type !== "slash") {
|
|
1555
|
+
push({ type: "text", value: G, output: h });
|
|
1556
|
+
continue;
|
|
1557
|
+
}
|
|
1558
|
+
push({ type: "dot", value: G, output: h });
|
|
1559
|
+
continue;
|
|
1560
|
+
}
|
|
1561
|
+
if (G === "?") {
|
|
1562
|
+
const t4 = B && B.value === "(";
|
|
1563
|
+
if (!t4 && u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1564
|
+
extglobOpen("qmark", G);
|
|
1565
|
+
continue;
|
|
1566
|
+
}
|
|
1567
|
+
if (B && B.type === "paren") {
|
|
1568
|
+
const t5 = D();
|
|
1569
|
+
let e5 = G;
|
|
1570
|
+
if (B.value === "(" && !/[!=<:]/.test(t5) || t5 === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
1571
|
+
e5 = `\\${G}`;
|
|
1572
|
+
}
|
|
1573
|
+
push({ type: "text", value: G, output: e5 });
|
|
1574
|
+
continue;
|
|
1575
|
+
}
|
|
1576
|
+
if (u3.dot !== true && (B.type === "slash" || B.type === "bos")) {
|
|
1577
|
+
push({ type: "qmark", value: G, output: v });
|
|
1578
|
+
continue;
|
|
1579
|
+
}
|
|
1580
|
+
push({ type: "qmark", value: G, output: H });
|
|
1581
|
+
continue;
|
|
1582
|
+
}
|
|
1583
|
+
if (G === "!") {
|
|
1584
|
+
if (u3.noextglob !== true && D() === "(") {
|
|
1585
|
+
if (D(2) !== "?" || !/[!=<:]/.test(D(3))) {
|
|
1586
|
+
extglobOpen("negate", G);
|
|
1587
|
+
continue;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
if (u3.nonegate !== true && m.index === 0) {
|
|
1591
|
+
negate();
|
|
1592
|
+
continue;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
if (G === "+") {
|
|
1596
|
+
if (u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1597
|
+
extglobOpen("plus", G);
|
|
1598
|
+
continue;
|
|
1599
|
+
}
|
|
1600
|
+
if (B && B.value === "(" || u3.regex === false) {
|
|
1601
|
+
push({ type: "plus", value: G, output: g });
|
|
1602
|
+
continue;
|
|
1603
|
+
}
|
|
1604
|
+
if (B && (B.type === "bracket" || B.type === "paren" || B.type === "brace") || m.parens > 0) {
|
|
1605
|
+
push({ type: "plus", value: G });
|
|
1606
|
+
continue;
|
|
1607
|
+
}
|
|
1608
|
+
push({ type: "plus", value: g });
|
|
1609
|
+
continue;
|
|
1610
|
+
}
|
|
1611
|
+
if (G === "@") {
|
|
1612
|
+
if (u3.noextglob !== true && D() === "(" && D(2) !== "?") {
|
|
1613
|
+
push({ type: "at", extglob: true, value: G, output: "" });
|
|
1614
|
+
continue;
|
|
1615
|
+
}
|
|
1616
|
+
push({ type: "text", value: G });
|
|
1617
|
+
continue;
|
|
1618
|
+
}
|
|
1619
|
+
if (G !== "*") {
|
|
1620
|
+
if (G === "$" || G === "^") {
|
|
1621
|
+
G = `\\${G}`;
|
|
1622
|
+
}
|
|
1623
|
+
const t4 = a.exec(remaining());
|
|
1624
|
+
if (t4) {
|
|
1625
|
+
G += t4[0];
|
|
1626
|
+
m.index += t4[0].length;
|
|
1627
|
+
}
|
|
1628
|
+
push({ type: "text", value: G });
|
|
1629
|
+
continue;
|
|
1630
|
+
}
|
|
1631
|
+
if (B && (B.type === "globstar" || B.star === true)) {
|
|
1632
|
+
B.type = "star";
|
|
1633
|
+
B.star = true;
|
|
1634
|
+
B.value += G;
|
|
1635
|
+
B.output = k;
|
|
1636
|
+
m.backtrack = true;
|
|
1637
|
+
m.globstar = true;
|
|
1638
|
+
consume(G);
|
|
1639
|
+
continue;
|
|
1640
|
+
}
|
|
1641
|
+
let e4 = remaining();
|
|
1642
|
+
if (u3.noextglob !== true && /^\([^?]/.test(e4)) {
|
|
1643
|
+
extglobOpen("star", G);
|
|
1644
|
+
continue;
|
|
1645
|
+
}
|
|
1646
|
+
if (B.type === "star") {
|
|
1647
|
+
if (u3.noglobstar === true) {
|
|
1648
|
+
consume(G);
|
|
1649
|
+
continue;
|
|
1650
|
+
}
|
|
1651
|
+
const n3 = B.prev;
|
|
1652
|
+
const o2 = n3.prev;
|
|
1653
|
+
const s2 = n3.type === "slash" || n3.type === "bos";
|
|
1654
|
+
const r2 = o2 && (o2.type === "star" || o2.type === "globstar");
|
|
1655
|
+
if (u3.bash === true && (!s2 || e4[0] && e4[0] !== "/")) {
|
|
1656
|
+
push({ type: "star", value: G, output: "" });
|
|
1657
|
+
continue;
|
|
1658
|
+
}
|
|
1659
|
+
const a2 = m.braces > 0 && (n3.type === "comma" || n3.type === "brace");
|
|
1660
|
+
const i2 = w.length && (n3.type === "pipe" || n3.type === "paren");
|
|
1661
|
+
if (!s2 && n3.type !== "paren" && !a2 && !i2) {
|
|
1662
|
+
push({ type: "star", value: G, output: "" });
|
|
1663
|
+
continue;
|
|
1664
|
+
}
|
|
1665
|
+
while (e4.slice(0, 3) === "/**") {
|
|
1666
|
+
const u4 = t3[m.index + 4];
|
|
1667
|
+
if (u4 && u4 !== "/") {
|
|
1668
|
+
break;
|
|
1669
|
+
}
|
|
1670
|
+
e4 = e4.slice(3);
|
|
1671
|
+
consume("/**", 3);
|
|
1672
|
+
}
|
|
1673
|
+
if (n3.type === "bos" && eos()) {
|
|
1674
|
+
B.type = "globstar";
|
|
1675
|
+
B.value += G;
|
|
1676
|
+
B.output = globstar(u3);
|
|
1677
|
+
m.output = B.output;
|
|
1678
|
+
m.globstar = true;
|
|
1679
|
+
consume(G);
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1682
|
+
if (n3.type === "slash" && n3.prev.type !== "bos" && !r2 && eos()) {
|
|
1683
|
+
m.output = m.output.slice(0, -(n3.output + B.output).length);
|
|
1684
|
+
n3.output = `(?:${n3.output}`;
|
|
1685
|
+
B.type = "globstar";
|
|
1686
|
+
B.output = globstar(u3) + (u3.strictSlashes ? ")" : "|$)");
|
|
1687
|
+
B.value += G;
|
|
1688
|
+
m.globstar = true;
|
|
1689
|
+
m.output += n3.output + B.output;
|
|
1690
|
+
consume(G);
|
|
1691
|
+
continue;
|
|
1692
|
+
}
|
|
1693
|
+
if (n3.type === "slash" && n3.prev.type !== "bos" && e4[0] === "/") {
|
|
1694
|
+
const t4 = e4[1] !== void 0 ? "|$" : "";
|
|
1695
|
+
m.output = m.output.slice(0, -(n3.output + B.output).length);
|
|
1696
|
+
n3.output = `(?:${n3.output}`;
|
|
1697
|
+
B.type = "globstar";
|
|
1698
|
+
B.output = `${globstar(u3)}${b}|${b}${t4})`;
|
|
1699
|
+
B.value += G;
|
|
1700
|
+
m.output += n3.output + B.output;
|
|
1701
|
+
m.globstar = true;
|
|
1702
|
+
consume(G + M());
|
|
1703
|
+
push({ type: "slash", value: "/", output: "" });
|
|
1704
|
+
continue;
|
|
1705
|
+
}
|
|
1706
|
+
if (n3.type === "bos" && e4[0] === "/") {
|
|
1707
|
+
B.type = "globstar";
|
|
1708
|
+
B.value += G;
|
|
1709
|
+
B.output = `(?:^|${b}|${globstar(u3)}${b})`;
|
|
1710
|
+
m.output = B.output;
|
|
1711
|
+
m.globstar = true;
|
|
1712
|
+
consume(G + M());
|
|
1713
|
+
push({ type: "slash", value: "/", output: "" });
|
|
1714
|
+
continue;
|
|
1715
|
+
}
|
|
1716
|
+
m.output = m.output.slice(0, -B.output.length);
|
|
1717
|
+
B.type = "globstar";
|
|
1718
|
+
B.output = globstar(u3);
|
|
1719
|
+
B.value += G;
|
|
1720
|
+
m.output += B.output;
|
|
1721
|
+
m.globstar = true;
|
|
1722
|
+
consume(G);
|
|
1723
|
+
continue;
|
|
1724
|
+
}
|
|
1725
|
+
const n2 = { type: "star", value: G, output: k };
|
|
1726
|
+
if (u3.bash === true) {
|
|
1727
|
+
n2.output = ".*?";
|
|
1728
|
+
if (B.type === "bos" || B.type === "slash") {
|
|
1729
|
+
n2.output = T + n2.output;
|
|
1730
|
+
}
|
|
1731
|
+
push(n2);
|
|
1732
|
+
continue;
|
|
1733
|
+
}
|
|
1734
|
+
if (B && (B.type === "bracket" || B.type === "paren") && u3.regex === true) {
|
|
1735
|
+
n2.output = G;
|
|
1736
|
+
push(n2);
|
|
1737
|
+
continue;
|
|
1738
|
+
}
|
|
1739
|
+
if (m.index === m.start || B.type === "slash" || B.type === "dot") {
|
|
1740
|
+
if (B.type === "dot") {
|
|
1741
|
+
m.output += x;
|
|
1742
|
+
B.output += x;
|
|
1743
|
+
} else if (u3.dot === true) {
|
|
1744
|
+
m.output += S;
|
|
1745
|
+
B.output += S;
|
|
1746
|
+
} else {
|
|
1747
|
+
m.output += T;
|
|
1748
|
+
B.output += T;
|
|
1749
|
+
}
|
|
1750
|
+
if (D() !== "*") {
|
|
1751
|
+
m.output += C;
|
|
1752
|
+
B.output += C;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
push(n2);
|
|
1756
|
+
}
|
|
1757
|
+
while (m.brackets > 0) {
|
|
1758
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
1759
|
+
m.output = o.escapeLast(m.output, "[");
|
|
1760
|
+
decrement("brackets");
|
|
1761
|
+
}
|
|
1762
|
+
while (m.parens > 0) {
|
|
1763
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
|
|
1764
|
+
m.output = o.escapeLast(m.output, "(");
|
|
1765
|
+
decrement("parens");
|
|
1766
|
+
}
|
|
1767
|
+
while (m.braces > 0) {
|
|
1768
|
+
if (u3.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
|
|
1769
|
+
m.output = o.escapeLast(m.output, "{");
|
|
1770
|
+
decrement("braces");
|
|
1771
|
+
}
|
|
1772
|
+
if (u3.strictSlashes !== true && (B.type === "star" || B.type === "bracket")) {
|
|
1773
|
+
push({ type: "maybe_slash", value: "", output: `${b}?` });
|
|
1774
|
+
}
|
|
1775
|
+
if (m.backtrack === true) {
|
|
1776
|
+
m.output = "";
|
|
1777
|
+
for (const t4 of m.tokens) {
|
|
1778
|
+
m.output += t4.output != null ? t4.output : t4.value;
|
|
1779
|
+
if (t4.suffix) {
|
|
1780
|
+
m.output += t4.suffix;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
return m;
|
|
1785
|
+
};
|
|
1786
|
+
parse.fastpaths = (t3, e3) => {
|
|
1787
|
+
const u3 = { ...e3 };
|
|
1788
|
+
const r2 = typeof u3.maxLength === "number" ? Math.min(s, u3.maxLength) : s;
|
|
1789
|
+
const a2 = t3.length;
|
|
1790
|
+
if (a2 > r2) {
|
|
1791
|
+
throw new SyntaxError(`Input length: ${a2}, exceeds maximum allowed length: ${r2}`);
|
|
1792
|
+
}
|
|
1793
|
+
t3 = c[t3] || t3;
|
|
1794
|
+
const { DOT_LITERAL: i2, SLASH_LITERAL: p, ONE_CHAR: l, DOTS_SLASH: f, NO_DOT: A, NO_DOTS: _, NO_DOTS_SLASH: R, STAR: E, START_ANCHOR: h } = n.globChars(u3.windows);
|
|
1795
|
+
const g = u3.dot ? _ : A;
|
|
1796
|
+
const b = u3.dot ? R : A;
|
|
1797
|
+
const C = u3.capture ? "" : "?:";
|
|
1798
|
+
const y = { negated: false, prefix: "" };
|
|
1799
|
+
let $ = u3.bash === true ? ".*?" : E;
|
|
1800
|
+
if (u3.capture) {
|
|
1801
|
+
$ = `(${$})`;
|
|
1802
|
+
}
|
|
1803
|
+
const globstar = (t4) => {
|
|
1804
|
+
if (t4.noglobstar === true) return $;
|
|
1805
|
+
return `(${C}(?:(?!${h}${t4.dot ? f : i2}).)*?)`;
|
|
1806
|
+
};
|
|
1807
|
+
const create = (t4) => {
|
|
1808
|
+
switch (t4) {
|
|
1809
|
+
case "*":
|
|
1810
|
+
return `${g}${l}${$}`;
|
|
1811
|
+
case ".*":
|
|
1812
|
+
return `${i2}${l}${$}`;
|
|
1813
|
+
case "*.*":
|
|
1814
|
+
return `${g}${$}${i2}${l}${$}`;
|
|
1815
|
+
case "*/*":
|
|
1816
|
+
return `${g}${$}${p}${l}${b}${$}`;
|
|
1817
|
+
case "**":
|
|
1818
|
+
return g + globstar(u3);
|
|
1819
|
+
case "**/*":
|
|
1820
|
+
return `(?:${g}${globstar(u3)}${p})?${b}${l}${$}`;
|
|
1821
|
+
case "**/*.*":
|
|
1822
|
+
return `(?:${g}${globstar(u3)}${p})?${b}${$}${i2}${l}${$}`;
|
|
1823
|
+
case "**/.*":
|
|
1824
|
+
return `(?:${g}${globstar(u3)}${p})?${i2}${l}${$}`;
|
|
1825
|
+
default: {
|
|
1826
|
+
const e4 = /^(.*?)\.(\w+)$/.exec(t4);
|
|
1827
|
+
if (!e4) return;
|
|
1828
|
+
const u4 = create(e4[1]);
|
|
1829
|
+
if (!u4) return;
|
|
1830
|
+
return u4 + i2 + e4[2];
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
const x = o.removePrefix(t3, y);
|
|
1835
|
+
let S = create(x);
|
|
1836
|
+
if (S && u3.strictSlashes !== true) {
|
|
1837
|
+
S += `${p}?`;
|
|
1838
|
+
}
|
|
1839
|
+
return S;
|
|
1840
|
+
};
|
|
1841
|
+
t2.exports = parse;
|
|
1842
|
+
}, 510: (t2, e2, u2) => {
|
|
1843
|
+
const n = u2(716);
|
|
1844
|
+
const o = u2(697);
|
|
1845
|
+
const s = u2(96);
|
|
1846
|
+
const r = u2(154);
|
|
1847
|
+
const isObject = (t3) => t3 && typeof t3 === "object" && !Array.isArray(t3);
|
|
1848
|
+
const picomatch = (t3, e3, u3 = false) => {
|
|
1849
|
+
if (Array.isArray(t3)) {
|
|
1850
|
+
const n3 = t3.map((t4) => picomatch(t4, e3, u3));
|
|
1851
|
+
const arrayMatcher = (t4) => {
|
|
1852
|
+
for (const e4 of n3) {
|
|
1853
|
+
const u4 = e4(t4);
|
|
1854
|
+
if (u4) return u4;
|
|
1855
|
+
}
|
|
1856
|
+
return false;
|
|
1857
|
+
};
|
|
1858
|
+
return arrayMatcher;
|
|
1859
|
+
}
|
|
1860
|
+
const n2 = isObject(t3) && t3.tokens && t3.input;
|
|
1861
|
+
if (t3 === "" || typeof t3 !== "string" && !n2) {
|
|
1862
|
+
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1863
|
+
}
|
|
1864
|
+
const o2 = e3 || {};
|
|
1865
|
+
const s2 = o2.windows;
|
|
1866
|
+
const r2 = n2 ? picomatch.compileRe(t3, e3) : picomatch.makeRe(t3, e3, false, true);
|
|
1867
|
+
const a = r2.state;
|
|
1868
|
+
delete r2.state;
|
|
1869
|
+
let isIgnored = () => false;
|
|
1870
|
+
if (o2.ignore) {
|
|
1871
|
+
const t4 = { ...e3, ignore: null, onMatch: null, onResult: null };
|
|
1872
|
+
isIgnored = picomatch(o2.ignore, t4, u3);
|
|
1873
|
+
}
|
|
1874
|
+
const matcher = (u4, n3 = false) => {
|
|
1875
|
+
const { isMatch: i, match: c, output: p } = picomatch.test(u4, r2, e3, { glob: t3, posix: s2 });
|
|
1876
|
+
const l = { glob: t3, state: a, regex: r2, posix: s2, input: u4, output: p, match: c, isMatch: i };
|
|
1877
|
+
if (typeof o2.onResult === "function") {
|
|
1878
|
+
o2.onResult(l);
|
|
1879
|
+
}
|
|
1880
|
+
if (i === false) {
|
|
1881
|
+
l.isMatch = false;
|
|
1882
|
+
return n3 ? l : false;
|
|
1883
|
+
}
|
|
1884
|
+
if (isIgnored(u4)) {
|
|
1885
|
+
if (typeof o2.onIgnore === "function") {
|
|
1886
|
+
o2.onIgnore(l);
|
|
1887
|
+
}
|
|
1888
|
+
l.isMatch = false;
|
|
1889
|
+
return n3 ? l : false;
|
|
1890
|
+
}
|
|
1891
|
+
if (typeof o2.onMatch === "function") {
|
|
1892
|
+
o2.onMatch(l);
|
|
1893
|
+
}
|
|
1894
|
+
return n3 ? l : true;
|
|
1895
|
+
};
|
|
1896
|
+
if (u3) {
|
|
1897
|
+
matcher.state = a;
|
|
1898
|
+
}
|
|
1899
|
+
return matcher;
|
|
1900
|
+
};
|
|
1901
|
+
picomatch.test = (t3, e3, u3, { glob: n2, posix: o2 } = {}) => {
|
|
1902
|
+
if (typeof t3 !== "string") {
|
|
1903
|
+
throw new TypeError("Expected input to be a string");
|
|
1904
|
+
}
|
|
1905
|
+
if (t3 === "") {
|
|
1906
|
+
return { isMatch: false, output: "" };
|
|
1907
|
+
}
|
|
1908
|
+
const r2 = u3 || {};
|
|
1909
|
+
const a = r2.format || (o2 ? s.toPosixSlashes : null);
|
|
1910
|
+
let i = t3 === n2;
|
|
1911
|
+
let c = i && a ? a(t3) : t3;
|
|
1912
|
+
if (i === false) {
|
|
1913
|
+
c = a ? a(t3) : t3;
|
|
1914
|
+
i = c === n2;
|
|
1915
|
+
}
|
|
1916
|
+
if (i === false || r2.capture === true) {
|
|
1917
|
+
if (r2.matchBase === true || r2.basename === true) {
|
|
1918
|
+
i = picomatch.matchBase(t3, e3, u3, o2);
|
|
1919
|
+
} else {
|
|
1920
|
+
i = e3.exec(c);
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
return { isMatch: Boolean(i), match: i, output: c };
|
|
1924
|
+
};
|
|
1925
|
+
picomatch.matchBase = (t3, e3, u3) => {
|
|
1926
|
+
const n2 = e3 instanceof RegExp ? e3 : picomatch.makeRe(e3, u3);
|
|
1927
|
+
return n2.test(s.basename(t3));
|
|
1928
|
+
};
|
|
1929
|
+
picomatch.isMatch = (t3, e3, u3) => picomatch(e3, u3)(t3);
|
|
1930
|
+
picomatch.parse = (t3, e3) => {
|
|
1931
|
+
if (Array.isArray(t3)) return t3.map((t4) => picomatch.parse(t4, e3));
|
|
1932
|
+
return o(t3, { ...e3, fastpaths: false });
|
|
1933
|
+
};
|
|
1934
|
+
picomatch.scan = (t3, e3) => n(t3, e3);
|
|
1935
|
+
picomatch.compileRe = (t3, e3, u3 = false, n2 = false) => {
|
|
1936
|
+
if (u3 === true) {
|
|
1937
|
+
return t3.output;
|
|
1938
|
+
}
|
|
1939
|
+
const o2 = e3 || {};
|
|
1940
|
+
const s2 = o2.contains ? "" : "^";
|
|
1941
|
+
const r2 = o2.contains ? "" : "$";
|
|
1942
|
+
let a = `${s2}(?:${t3.output})${r2}`;
|
|
1943
|
+
if (t3 && t3.negated === true) {
|
|
1944
|
+
a = `^(?!${a}).*$`;
|
|
1945
|
+
}
|
|
1946
|
+
const i = picomatch.toRegex(a, e3);
|
|
1947
|
+
if (n2 === true) {
|
|
1948
|
+
i.state = t3;
|
|
1949
|
+
}
|
|
1950
|
+
return i;
|
|
1951
|
+
};
|
|
1952
|
+
picomatch.makeRe = (t3, e3 = {}, u3 = false, n2 = false) => {
|
|
1953
|
+
if (!t3 || typeof t3 !== "string") {
|
|
1954
|
+
throw new TypeError("Expected a non-empty string");
|
|
1955
|
+
}
|
|
1956
|
+
let s2 = { negated: false, fastpaths: true };
|
|
1957
|
+
if (e3.fastpaths !== false && (t3[0] === "." || t3[0] === "*")) {
|
|
1958
|
+
s2.output = o.fastpaths(t3, e3);
|
|
1959
|
+
}
|
|
1960
|
+
if (!s2.output) {
|
|
1961
|
+
s2 = o(t3, e3);
|
|
1962
|
+
}
|
|
1963
|
+
return picomatch.compileRe(s2, e3, u3, n2);
|
|
1964
|
+
};
|
|
1965
|
+
picomatch.toRegex = (t3, e3) => {
|
|
1966
|
+
try {
|
|
1967
|
+
const u3 = e3 || {};
|
|
1968
|
+
return new RegExp(t3, u3.flags || (u3.nocase ? "i" : ""));
|
|
1969
|
+
} catch (t4) {
|
|
1970
|
+
if (e3 && e3.debug === true) throw t4;
|
|
1971
|
+
return /$^/;
|
|
1972
|
+
}
|
|
1973
|
+
};
|
|
1974
|
+
picomatch.constants = r;
|
|
1975
|
+
t2.exports = picomatch;
|
|
1976
|
+
}, 716: (t2, e2, u2) => {
|
|
1977
|
+
const n = u2(96);
|
|
1978
|
+
const { CHAR_ASTERISK: o, CHAR_AT: s, CHAR_BACKWARD_SLASH: r, CHAR_COMMA: a, CHAR_DOT: i, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: p, CHAR_LEFT_CURLY_BRACE: l, CHAR_LEFT_PARENTHESES: f, CHAR_LEFT_SQUARE_BRACKET: A, CHAR_PLUS: _, CHAR_QUESTION_MARK: R, CHAR_RIGHT_CURLY_BRACE: E, CHAR_RIGHT_PARENTHESES: h, CHAR_RIGHT_SQUARE_BRACKET: g } = u2(154);
|
|
1979
|
+
const isPathSeparator = (t3) => t3 === p || t3 === r;
|
|
1980
|
+
const depth = (t3) => {
|
|
1981
|
+
if (t3.isPrefix !== true) {
|
|
1982
|
+
t3.depth = t3.isGlobstar ? Infinity : 1;
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
const scan = (t3, e3) => {
|
|
1986
|
+
const u3 = e3 || {};
|
|
1987
|
+
const b = t3.length - 1;
|
|
1988
|
+
const C = u3.parts === true || u3.scanToEnd === true;
|
|
1989
|
+
const y = [];
|
|
1990
|
+
const $ = [];
|
|
1991
|
+
const x = [];
|
|
1992
|
+
let S = t3;
|
|
1993
|
+
let H = -1;
|
|
1994
|
+
let v = 0;
|
|
1995
|
+
let d = 0;
|
|
1996
|
+
let L = false;
|
|
1997
|
+
let T = false;
|
|
1998
|
+
let O = false;
|
|
1999
|
+
let k = false;
|
|
2000
|
+
let m = false;
|
|
2001
|
+
let w = false;
|
|
2002
|
+
let N = false;
|
|
2003
|
+
let I = false;
|
|
2004
|
+
let B = false;
|
|
2005
|
+
let G = false;
|
|
2006
|
+
let D = 0;
|
|
2007
|
+
let M;
|
|
2008
|
+
let P;
|
|
2009
|
+
let K = { value: "", depth: 0, isGlob: false };
|
|
2010
|
+
const eos = () => H >= b;
|
|
2011
|
+
const peek = () => S.charCodeAt(H + 1);
|
|
2012
|
+
const advance = () => {
|
|
2013
|
+
M = P;
|
|
2014
|
+
return S.charCodeAt(++H);
|
|
2015
|
+
};
|
|
2016
|
+
while (H < b) {
|
|
2017
|
+
P = advance();
|
|
2018
|
+
let t4;
|
|
2019
|
+
if (P === r) {
|
|
2020
|
+
N = K.backslashes = true;
|
|
2021
|
+
P = advance();
|
|
2022
|
+
if (P === l) {
|
|
2023
|
+
w = true;
|
|
2024
|
+
}
|
|
2025
|
+
continue;
|
|
2026
|
+
}
|
|
2027
|
+
if (w === true || P === l) {
|
|
2028
|
+
D++;
|
|
2029
|
+
while (eos() !== true && (P = advance())) {
|
|
2030
|
+
if (P === r) {
|
|
2031
|
+
N = K.backslashes = true;
|
|
2032
|
+
advance();
|
|
2033
|
+
continue;
|
|
2034
|
+
}
|
|
2035
|
+
if (P === l) {
|
|
2036
|
+
D++;
|
|
2037
|
+
continue;
|
|
2038
|
+
}
|
|
2039
|
+
if (w !== true && P === i && (P = advance()) === i) {
|
|
2040
|
+
L = K.isBrace = true;
|
|
2041
|
+
O = K.isGlob = true;
|
|
2042
|
+
G = true;
|
|
2043
|
+
if (C === true) {
|
|
2044
|
+
continue;
|
|
2045
|
+
}
|
|
2046
|
+
break;
|
|
2047
|
+
}
|
|
2048
|
+
if (w !== true && P === a) {
|
|
2049
|
+
L = K.isBrace = true;
|
|
2050
|
+
O = K.isGlob = true;
|
|
2051
|
+
G = true;
|
|
2052
|
+
if (C === true) {
|
|
2053
|
+
continue;
|
|
2054
|
+
}
|
|
2055
|
+
break;
|
|
2056
|
+
}
|
|
2057
|
+
if (P === E) {
|
|
2058
|
+
D--;
|
|
2059
|
+
if (D === 0) {
|
|
2060
|
+
w = false;
|
|
2061
|
+
L = K.isBrace = true;
|
|
2062
|
+
G = true;
|
|
2063
|
+
break;
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
if (C === true) {
|
|
2068
|
+
continue;
|
|
2069
|
+
}
|
|
2070
|
+
break;
|
|
2071
|
+
}
|
|
2072
|
+
if (P === p) {
|
|
2073
|
+
y.push(H);
|
|
2074
|
+
$.push(K);
|
|
2075
|
+
K = { value: "", depth: 0, isGlob: false };
|
|
2076
|
+
if (G === true) continue;
|
|
2077
|
+
if (M === i && H === v + 1) {
|
|
2078
|
+
v += 2;
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
d = H + 1;
|
|
2082
|
+
continue;
|
|
2083
|
+
}
|
|
2084
|
+
if (u3.noext !== true) {
|
|
2085
|
+
const t5 = P === _ || P === s || P === o || P === R || P === c;
|
|
2086
|
+
if (t5 === true && peek() === f) {
|
|
2087
|
+
O = K.isGlob = true;
|
|
2088
|
+
k = K.isExtglob = true;
|
|
2089
|
+
G = true;
|
|
2090
|
+
if (P === c && H === v) {
|
|
2091
|
+
B = true;
|
|
2092
|
+
}
|
|
2093
|
+
if (C === true) {
|
|
2094
|
+
while (eos() !== true && (P = advance())) {
|
|
2095
|
+
if (P === r) {
|
|
2096
|
+
N = K.backslashes = true;
|
|
2097
|
+
P = advance();
|
|
2098
|
+
continue;
|
|
2099
|
+
}
|
|
2100
|
+
if (P === h) {
|
|
2101
|
+
O = K.isGlob = true;
|
|
2102
|
+
G = true;
|
|
2103
|
+
break;
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
continue;
|
|
2107
|
+
}
|
|
2108
|
+
break;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
if (P === o) {
|
|
2112
|
+
if (M === o) m = K.isGlobstar = true;
|
|
2113
|
+
O = K.isGlob = true;
|
|
2114
|
+
G = true;
|
|
2115
|
+
if (C === true) {
|
|
2116
|
+
continue;
|
|
2117
|
+
}
|
|
2118
|
+
break;
|
|
2119
|
+
}
|
|
2120
|
+
if (P === R) {
|
|
2121
|
+
O = K.isGlob = true;
|
|
2122
|
+
G = true;
|
|
2123
|
+
if (C === true) {
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
break;
|
|
2127
|
+
}
|
|
2128
|
+
if (P === A) {
|
|
2129
|
+
while (eos() !== true && (t4 = advance())) {
|
|
2130
|
+
if (t4 === r) {
|
|
2131
|
+
N = K.backslashes = true;
|
|
2132
|
+
advance();
|
|
2133
|
+
continue;
|
|
2134
|
+
}
|
|
2135
|
+
if (t4 === g) {
|
|
2136
|
+
T = K.isBracket = true;
|
|
2137
|
+
O = K.isGlob = true;
|
|
2138
|
+
G = true;
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
if (C === true) {
|
|
2143
|
+
continue;
|
|
2144
|
+
}
|
|
2145
|
+
break;
|
|
2146
|
+
}
|
|
2147
|
+
if (u3.nonegate !== true && P === c && H === v) {
|
|
2148
|
+
I = K.negated = true;
|
|
2149
|
+
v++;
|
|
2150
|
+
continue;
|
|
2151
|
+
}
|
|
2152
|
+
if (u3.noparen !== true && P === f) {
|
|
2153
|
+
O = K.isGlob = true;
|
|
2154
|
+
if (C === true) {
|
|
2155
|
+
while (eos() !== true && (P = advance())) {
|
|
2156
|
+
if (P === f) {
|
|
2157
|
+
N = K.backslashes = true;
|
|
2158
|
+
P = advance();
|
|
2159
|
+
continue;
|
|
2160
|
+
}
|
|
2161
|
+
if (P === h) {
|
|
2162
|
+
G = true;
|
|
2163
|
+
break;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
continue;
|
|
2167
|
+
}
|
|
2168
|
+
break;
|
|
2169
|
+
}
|
|
2170
|
+
if (O === true) {
|
|
2171
|
+
G = true;
|
|
2172
|
+
if (C === true) {
|
|
2173
|
+
continue;
|
|
2174
|
+
}
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2178
|
+
if (u3.noext === true) {
|
|
2179
|
+
k = false;
|
|
2180
|
+
O = false;
|
|
2181
|
+
}
|
|
2182
|
+
let U = S;
|
|
2183
|
+
let X2 = "";
|
|
2184
|
+
let F = "";
|
|
2185
|
+
if (v > 0) {
|
|
2186
|
+
X2 = S.slice(0, v);
|
|
2187
|
+
S = S.slice(v);
|
|
2188
|
+
d -= v;
|
|
2189
|
+
}
|
|
2190
|
+
if (U && O === true && d > 0) {
|
|
2191
|
+
U = S.slice(0, d);
|
|
2192
|
+
F = S.slice(d);
|
|
2193
|
+
} else if (O === true) {
|
|
2194
|
+
U = "";
|
|
2195
|
+
F = S;
|
|
2196
|
+
} else {
|
|
2197
|
+
U = S;
|
|
2198
|
+
}
|
|
2199
|
+
if (U && U !== "" && U !== "/" && U !== S) {
|
|
2200
|
+
if (isPathSeparator(U.charCodeAt(U.length - 1))) {
|
|
2201
|
+
U = U.slice(0, -1);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
if (u3.unescape === true) {
|
|
2205
|
+
if (F) F = n.removeBackslashes(F);
|
|
2206
|
+
if (U && N === true) {
|
|
2207
|
+
U = n.removeBackslashes(U);
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
const Q = { prefix: X2, input: t3, start: v, base: U, glob: F, isBrace: L, isBracket: T, isGlob: O, isExtglob: k, isGlobstar: m, negated: I, negatedExtglob: B };
|
|
2211
|
+
if (u3.tokens === true) {
|
|
2212
|
+
Q.maxDepth = 0;
|
|
2213
|
+
if (!isPathSeparator(P)) {
|
|
2214
|
+
$.push(K);
|
|
2215
|
+
}
|
|
2216
|
+
Q.tokens = $;
|
|
2217
|
+
}
|
|
2218
|
+
if (u3.parts === true || u3.tokens === true) {
|
|
2219
|
+
let e4;
|
|
2220
|
+
for (let n2 = 0; n2 < y.length; n2++) {
|
|
2221
|
+
const o2 = e4 ? e4 + 1 : v;
|
|
2222
|
+
const s2 = y[n2];
|
|
2223
|
+
const r2 = t3.slice(o2, s2);
|
|
2224
|
+
if (u3.tokens) {
|
|
2225
|
+
if (n2 === 0 && v !== 0) {
|
|
2226
|
+
$[n2].isPrefix = true;
|
|
2227
|
+
$[n2].value = X2;
|
|
2228
|
+
} else {
|
|
2229
|
+
$[n2].value = r2;
|
|
2230
|
+
}
|
|
2231
|
+
depth($[n2]);
|
|
2232
|
+
Q.maxDepth += $[n2].depth;
|
|
2233
|
+
}
|
|
2234
|
+
if (n2 !== 0 || r2 !== "") {
|
|
2235
|
+
x.push(r2);
|
|
2236
|
+
}
|
|
2237
|
+
e4 = s2;
|
|
2238
|
+
}
|
|
2239
|
+
if (e4 && e4 + 1 < t3.length) {
|
|
2240
|
+
const n2 = t3.slice(e4 + 1);
|
|
2241
|
+
x.push(n2);
|
|
2242
|
+
if (u3.tokens) {
|
|
2243
|
+
$[$.length - 1].value = n2;
|
|
2244
|
+
depth($[$.length - 1]);
|
|
2245
|
+
Q.maxDepth += $[$.length - 1].depth;
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
Q.slashes = y;
|
|
2249
|
+
Q.parts = x;
|
|
2250
|
+
}
|
|
2251
|
+
return Q;
|
|
2252
|
+
};
|
|
2253
|
+
t2.exports = scan;
|
|
2254
|
+
}, 96: (t2, e2, u2) => {
|
|
2255
|
+
const { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: o, REGEX_SPECIAL_CHARS: s, REGEX_SPECIAL_CHARS_GLOBAL: r } = u2(154);
|
|
2256
|
+
e2.isObject = (t3) => t3 !== null && typeof t3 === "object" && !Array.isArray(t3);
|
|
2257
|
+
e2.hasRegexChars = (t3) => s.test(t3);
|
|
2258
|
+
e2.isRegexChar = (t3) => t3.length === 1 && e2.hasRegexChars(t3);
|
|
2259
|
+
e2.escapeRegex = (t3) => t3.replace(r, "\\$1");
|
|
2260
|
+
e2.toPosixSlashes = (t3) => t3.replace(n, "/");
|
|
2261
|
+
e2.removeBackslashes = (t3) => t3.replace(o, (t4) => t4 === "\\" ? "" : t4);
|
|
2262
|
+
e2.escapeLast = (t3, u3, n2) => {
|
|
2263
|
+
const o2 = t3.lastIndexOf(u3, n2);
|
|
2264
|
+
if (o2 === -1) return t3;
|
|
2265
|
+
if (t3[o2 - 1] === "\\") return e2.escapeLast(t3, u3, o2 - 1);
|
|
2266
|
+
return `${t3.slice(0, o2)}\\${t3.slice(o2)}`;
|
|
2267
|
+
};
|
|
2268
|
+
e2.removePrefix = (t3, e3 = {}) => {
|
|
2269
|
+
let u3 = t3;
|
|
2270
|
+
if (u3.startsWith("./")) {
|
|
2271
|
+
u3 = u3.slice(2);
|
|
2272
|
+
e3.prefix = "./";
|
|
2273
|
+
}
|
|
2274
|
+
return u3;
|
|
2275
|
+
};
|
|
2276
|
+
e2.wrapOutput = (t3, e3 = {}, u3 = {}) => {
|
|
2277
|
+
const n2 = u3.contains ? "" : "^";
|
|
2278
|
+
const o2 = u3.contains ? "" : "$";
|
|
2279
|
+
let s2 = `${n2}(?:${t3})${o2}`;
|
|
2280
|
+
if (e3.negated === true) {
|
|
2281
|
+
s2 = `(?:^(?!${s2}).*$)`;
|
|
2282
|
+
}
|
|
2283
|
+
return s2;
|
|
2284
|
+
};
|
|
2285
|
+
e2.basename = (t3, { windows: e3 } = {}) => {
|
|
2286
|
+
const u3 = t3.split(e3 ? /[\\/]/ : "/");
|
|
2287
|
+
const n2 = u3[u3.length - 1];
|
|
2288
|
+
if (n2 === "") {
|
|
2289
|
+
return u3[u3.length - 2];
|
|
2290
|
+
}
|
|
2291
|
+
return n2;
|
|
2292
|
+
};
|
|
2293
|
+
} };
|
|
2294
|
+
var e = {};
|
|
2295
|
+
function __nccwpck_require__(u2) {
|
|
2296
|
+
var n = e[u2];
|
|
2297
|
+
if (n !== void 0) {
|
|
2298
|
+
return n.exports;
|
|
2299
|
+
}
|
|
2300
|
+
var o = e[u2] = { exports: {} };
|
|
2301
|
+
var s = true;
|
|
2302
|
+
try {
|
|
2303
|
+
t[u2](o, o.exports, __nccwpck_require__);
|
|
2304
|
+
s = false;
|
|
2305
|
+
} finally {
|
|
2306
|
+
if (s) delete e[u2];
|
|
2307
|
+
}
|
|
2308
|
+
return o.exports;
|
|
2309
|
+
}
|
|
2310
|
+
if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/";
|
|
2311
|
+
var u = __nccwpck_require__(170);
|
|
2312
|
+
module2.exports = u;
|
|
2313
|
+
})();
|
|
2314
|
+
}
|
|
2315
|
+
});
|
|
2316
|
+
|
|
2317
|
+
// node_modules/next/dist/shared/lib/match-local-pattern.js
|
|
2318
|
+
var require_match_local_pattern = __commonJS({
|
|
2319
|
+
"node_modules/next/dist/shared/lib/match-local-pattern.js"(exports2) {
|
|
2320
|
+
"use strict";
|
|
2321
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2322
|
+
value: true
|
|
2323
|
+
});
|
|
2324
|
+
function _export(target, all) {
|
|
2325
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2326
|
+
enumerable: true,
|
|
2327
|
+
get: all[name]
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
_export(exports2, {
|
|
2331
|
+
hasLocalMatch: function() {
|
|
2332
|
+
return hasLocalMatch;
|
|
2333
|
+
},
|
|
2334
|
+
matchLocalPattern: function() {
|
|
2335
|
+
return matchLocalPattern;
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
var _picomatch = require_picomatch();
|
|
2339
|
+
function matchLocalPattern(pattern, url) {
|
|
2340
|
+
if (pattern.search !== void 0) {
|
|
2341
|
+
if (pattern.search !== url.search) {
|
|
2342
|
+
return false;
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
var _pattern_pathname;
|
|
2346
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : "**", {
|
|
2347
|
+
dot: true
|
|
2348
|
+
}).test(url.pathname)) {
|
|
2349
|
+
return false;
|
|
2350
|
+
}
|
|
2351
|
+
return true;
|
|
2352
|
+
}
|
|
2353
|
+
function hasLocalMatch(localPatterns, urlPathAndQuery) {
|
|
2354
|
+
if (!localPatterns) {
|
|
2355
|
+
return true;
|
|
2356
|
+
}
|
|
2357
|
+
const url = new URL(urlPathAndQuery, "http://n");
|
|
2358
|
+
return localPatterns.some((p) => matchLocalPattern(p, url));
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
});
|
|
2362
|
+
|
|
2363
|
+
// node_modules/next/dist/shared/lib/match-remote-pattern.js
|
|
2364
|
+
var require_match_remote_pattern = __commonJS({
|
|
2365
|
+
"node_modules/next/dist/shared/lib/match-remote-pattern.js"(exports2) {
|
|
2366
|
+
"use strict";
|
|
2367
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2368
|
+
value: true
|
|
2369
|
+
});
|
|
2370
|
+
function _export(target, all) {
|
|
2371
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2372
|
+
enumerable: true,
|
|
2373
|
+
get: all[name]
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
_export(exports2, {
|
|
2377
|
+
hasRemoteMatch: function() {
|
|
2378
|
+
return hasRemoteMatch;
|
|
2379
|
+
},
|
|
2380
|
+
matchRemotePattern: function() {
|
|
2381
|
+
return matchRemotePattern;
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
var _picomatch = require_picomatch();
|
|
2385
|
+
function matchRemotePattern(pattern, url) {
|
|
2386
|
+
if (pattern.protocol !== void 0) {
|
|
2387
|
+
if (pattern.protocol.replace(/:$/, "") !== url.protocol.replace(/:$/, "")) {
|
|
2388
|
+
return false;
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
if (pattern.port !== void 0) {
|
|
2392
|
+
if (pattern.port !== url.port) {
|
|
2393
|
+
return false;
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
if (pattern.hostname === void 0) {
|
|
2397
|
+
throw Object.defineProperty(new Error("Pattern should define hostname but found\n" + JSON.stringify(pattern)), "__NEXT_ERROR_CODE", {
|
|
2398
|
+
value: "E410",
|
|
2399
|
+
enumerable: false,
|
|
2400
|
+
configurable: true
|
|
2401
|
+
});
|
|
2402
|
+
} else {
|
|
2403
|
+
if (!(0, _picomatch.makeRe)(pattern.hostname).test(url.hostname)) {
|
|
2404
|
+
return false;
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
if (pattern.search !== void 0) {
|
|
2408
|
+
if (pattern.search !== url.search) {
|
|
2409
|
+
return false;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
var _pattern_pathname;
|
|
2413
|
+
if (!(0, _picomatch.makeRe)((_pattern_pathname = pattern.pathname) != null ? _pattern_pathname : "**", {
|
|
2414
|
+
dot: true
|
|
2415
|
+
}).test(url.pathname)) {
|
|
2416
|
+
return false;
|
|
2417
|
+
}
|
|
2418
|
+
return true;
|
|
2419
|
+
}
|
|
2420
|
+
function hasRemoteMatch(domains, remotePatterns, url) {
|
|
2421
|
+
return domains.some((domain) => url.hostname === domain) || remotePatterns.some((p) => matchRemotePattern(p, url));
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
|
|
2426
|
+
// node_modules/next/dist/shared/lib/image-loader.js
|
|
2427
|
+
var require_image_loader = __commonJS({
|
|
2428
|
+
"node_modules/next/dist/shared/lib/image-loader.js"(exports2) {
|
|
2429
|
+
"use strict";
|
|
2430
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2431
|
+
value: true
|
|
2432
|
+
});
|
|
2433
|
+
Object.defineProperty(exports2, "default", {
|
|
2434
|
+
enumerable: true,
|
|
2435
|
+
get: function() {
|
|
2436
|
+
return _default;
|
|
2437
|
+
}
|
|
2438
|
+
});
|
|
2439
|
+
var DEFAULT_Q = 75;
|
|
2440
|
+
function defaultLoader(param) {
|
|
2441
|
+
let { config, src, width, quality } = param;
|
|
2442
|
+
var _config_qualities;
|
|
2443
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2444
|
+
const missingValues = [];
|
|
2445
|
+
if (!src) missingValues.push("src");
|
|
2446
|
+
if (!width) missingValues.push("width");
|
|
2447
|
+
if (missingValues.length > 0) {
|
|
2448
|
+
throw Object.defineProperty(new Error("Next Image Optimization requires " + missingValues.join(", ") + " to be provided. Make sure you pass them as props to the `next/image` component. Received: " + JSON.stringify({
|
|
2449
|
+
src,
|
|
2450
|
+
width,
|
|
2451
|
+
quality
|
|
2452
|
+
})), "__NEXT_ERROR_CODE", {
|
|
2453
|
+
value: "E188",
|
|
2454
|
+
enumerable: false,
|
|
2455
|
+
configurable: true
|
|
2456
|
+
});
|
|
2457
|
+
}
|
|
2458
|
+
if (src.startsWith("//")) {
|
|
2459
|
+
throw Object.defineProperty(new Error('Failed to parse src "' + src + '" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)'), "__NEXT_ERROR_CODE", {
|
|
2460
|
+
value: "E360",
|
|
2461
|
+
enumerable: false,
|
|
2462
|
+
configurable: true
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
if (src.startsWith("/") && config.localPatterns) {
|
|
2466
|
+
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
|
|
2467
|
+
process.env.NEXT_RUNTIME !== "edge") {
|
|
2468
|
+
const { hasLocalMatch } = require_match_local_pattern();
|
|
2469
|
+
if (!hasLocalMatch(config.localPatterns, src)) {
|
|
2470
|
+
throw Object.defineProperty(new Error("Invalid src prop (" + src + ") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns"), "__NEXT_ERROR_CODE", {
|
|
2471
|
+
value: "E426",
|
|
2472
|
+
enumerable: false,
|
|
2473
|
+
configurable: true
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
if (!src.startsWith("/") && (config.domains || config.remotePatterns)) {
|
|
2479
|
+
let parsedSrc;
|
|
2480
|
+
try {
|
|
2481
|
+
parsedSrc = new URL(src);
|
|
2482
|
+
} catch (err) {
|
|
2483
|
+
console.error(err);
|
|
2484
|
+
throw Object.defineProperty(new Error('Failed to parse src "' + src + '" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)'), "__NEXT_ERROR_CODE", {
|
|
2485
|
+
value: "E63",
|
|
2486
|
+
enumerable: false,
|
|
2487
|
+
configurable: true
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
if (process.env.NODE_ENV !== "test" && // micromatch isn't compatible with edge runtime
|
|
2491
|
+
process.env.NEXT_RUNTIME !== "edge") {
|
|
2492
|
+
const { hasRemoteMatch } = require_match_remote_pattern();
|
|
2493
|
+
if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) {
|
|
2494
|
+
throw Object.defineProperty(new Error("Invalid src prop (" + src + ') on `next/image`, hostname "' + parsedSrc.hostname + '" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host'), "__NEXT_ERROR_CODE", {
|
|
2495
|
+
value: "E231",
|
|
2496
|
+
enumerable: false,
|
|
2497
|
+
configurable: true
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
if (quality && config.qualities && !config.qualities.includes(quality)) {
|
|
2503
|
+
throw Object.defineProperty(new Error("Invalid quality prop (" + quality + ") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities"), "__NEXT_ERROR_CODE", {
|
|
2504
|
+
value: "E623",
|
|
2505
|
+
enumerable: false,
|
|
2506
|
+
configurable: true
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
const q = quality || ((_config_qualities = config.qualities) == null ? void 0 : _config_qualities.reduce((prev, cur) => Math.abs(cur - DEFAULT_Q) < Math.abs(prev - DEFAULT_Q) ? cur : prev)) || DEFAULT_Q;
|
|
2511
|
+
return config.path + "?url=" + encodeURIComponent(src) + "&w=" + width + "&q=" + q + (src.startsWith("/_next/static/media/") && process.env.NEXT_DEPLOYMENT_ID ? "&dpl=" + process.env.NEXT_DEPLOYMENT_ID : "");
|
|
2512
|
+
}
|
|
2513
|
+
defaultLoader.__next_img_default = true;
|
|
2514
|
+
var _default = defaultLoader;
|
|
2515
|
+
}
|
|
2516
|
+
});
|
|
2517
|
+
|
|
2518
|
+
// node_modules/next/dist/client/use-merged-ref.js
|
|
2519
|
+
var require_use_merged_ref = __commonJS({
|
|
2520
|
+
"node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
|
|
2521
|
+
"use strict";
|
|
2522
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2523
|
+
value: true
|
|
2524
|
+
});
|
|
2525
|
+
Object.defineProperty(exports2, "useMergedRef", {
|
|
2526
|
+
enumerable: true,
|
|
2527
|
+
get: function() {
|
|
2528
|
+
return useMergedRef;
|
|
2529
|
+
}
|
|
2530
|
+
});
|
|
2531
|
+
var _react = require("react");
|
|
2532
|
+
function useMergedRef(refA, refB) {
|
|
2533
|
+
const cleanupA = (0, _react.useRef)(null);
|
|
2534
|
+
const cleanupB = (0, _react.useRef)(null);
|
|
2535
|
+
return (0, _react.useCallback)((current) => {
|
|
2536
|
+
if (current === null) {
|
|
2537
|
+
const cleanupFnA = cleanupA.current;
|
|
2538
|
+
if (cleanupFnA) {
|
|
2539
|
+
cleanupA.current = null;
|
|
2540
|
+
cleanupFnA();
|
|
2541
|
+
}
|
|
2542
|
+
const cleanupFnB = cleanupB.current;
|
|
2543
|
+
if (cleanupFnB) {
|
|
2544
|
+
cleanupB.current = null;
|
|
2545
|
+
cleanupFnB();
|
|
2546
|
+
}
|
|
2547
|
+
} else {
|
|
2548
|
+
if (refA) {
|
|
2549
|
+
cleanupA.current = applyRef(refA, current);
|
|
2550
|
+
}
|
|
2551
|
+
if (refB) {
|
|
2552
|
+
cleanupB.current = applyRef(refB, current);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
}, [
|
|
2556
|
+
refA,
|
|
2557
|
+
refB
|
|
2558
|
+
]);
|
|
43
2559
|
}
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
for (var key in obj) {
|
|
52
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
53
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
54
|
-
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
55
|
-
else newObj[key] = obj[key];
|
|
2560
|
+
function applyRef(refA, current) {
|
|
2561
|
+
if (typeof refA === "function") {
|
|
2562
|
+
const cleanup = refA(current);
|
|
2563
|
+
if (typeof cleanup === "function") {
|
|
2564
|
+
return cleanup;
|
|
2565
|
+
} else {
|
|
2566
|
+
return () => refA(null);
|
|
56
2567
|
}
|
|
2568
|
+
} else {
|
|
2569
|
+
refA.current = current;
|
|
2570
|
+
return () => {
|
|
2571
|
+
refA.current = null;
|
|
2572
|
+
};
|
|
57
2573
|
}
|
|
58
|
-
newObj.default = obj;
|
|
59
|
-
if (cache) cache.set(obj, newObj);
|
|
60
|
-
return newObj;
|
|
61
2574
|
}
|
|
62
|
-
exports2.
|
|
2575
|
+
if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
|
|
2576
|
+
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
2577
|
+
Object.assign(exports2.default, exports2);
|
|
2578
|
+
module2.exports = exports2.default;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
});
|
|
2582
|
+
|
|
2583
|
+
// node_modules/next/dist/client/image-component.js
|
|
2584
|
+
var require_image_component = __commonJS({
|
|
2585
|
+
"node_modules/next/dist/client/image-component.js"(exports2, module2) {
|
|
2586
|
+
"use client";
|
|
2587
|
+
"use strict";
|
|
2588
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2589
|
+
value: true
|
|
2590
|
+
});
|
|
2591
|
+
Object.defineProperty(exports2, "Image", {
|
|
2592
|
+
enumerable: true,
|
|
2593
|
+
get: function() {
|
|
2594
|
+
return Image3;
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2597
|
+
var _interop_require_default = require_interop_require_default();
|
|
2598
|
+
var _interop_require_wildcard = require_interop_require_wildcard();
|
|
2599
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
2600
|
+
var _react = /* @__PURE__ */ _interop_require_wildcard._(require("react"));
|
|
2601
|
+
var _reactdom = /* @__PURE__ */ _interop_require_default._(require("react-dom"));
|
|
2602
|
+
var _head = /* @__PURE__ */ _interop_require_default._(require_head());
|
|
2603
|
+
var _getimgprops = require_get_img_props();
|
|
2604
|
+
var _imageconfig = require_image_config();
|
|
2605
|
+
var _imageconfigcontextsharedruntime = require_image_config_context_shared_runtime();
|
|
2606
|
+
var _warnonce = require_warn_once();
|
|
2607
|
+
var _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
2608
|
+
var _imageloader = /* @__PURE__ */ _interop_require_default._(require_image_loader());
|
|
2609
|
+
var _usemergedref = require_use_merged_ref();
|
|
2610
|
+
var configEnv = process.env.__NEXT_IMAGE_OPTS;
|
|
2611
|
+
if (typeof window === "undefined") {
|
|
2612
|
+
;
|
|
2613
|
+
globalThis.__NEXT_IMAGE_IMPORTED = true;
|
|
2614
|
+
}
|
|
2615
|
+
function handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput) {
|
|
2616
|
+
const src = img == null ? void 0 : img.src;
|
|
2617
|
+
if (!img || img["data-loaded-src"] === src) {
|
|
2618
|
+
return;
|
|
2619
|
+
}
|
|
2620
|
+
img["data-loaded-src"] = src;
|
|
2621
|
+
const p = "decode" in img ? img.decode() : Promise.resolve();
|
|
2622
|
+
p.catch(() => {
|
|
2623
|
+
}).then(() => {
|
|
2624
|
+
if (!img.parentElement || !img.isConnected) {
|
|
2625
|
+
return;
|
|
2626
|
+
}
|
|
2627
|
+
if (placeholder !== "empty") {
|
|
2628
|
+
setBlurComplete(true);
|
|
2629
|
+
}
|
|
2630
|
+
if (onLoadRef == null ? void 0 : onLoadRef.current) {
|
|
2631
|
+
const event = new Event("load");
|
|
2632
|
+
Object.defineProperty(event, "target", {
|
|
2633
|
+
writable: false,
|
|
2634
|
+
value: img
|
|
2635
|
+
});
|
|
2636
|
+
let prevented = false;
|
|
2637
|
+
let stopped = false;
|
|
2638
|
+
onLoadRef.current({
|
|
2639
|
+
...event,
|
|
2640
|
+
nativeEvent: event,
|
|
2641
|
+
currentTarget: img,
|
|
2642
|
+
target: img,
|
|
2643
|
+
isDefaultPrevented: () => prevented,
|
|
2644
|
+
isPropagationStopped: () => stopped,
|
|
2645
|
+
persist: () => {
|
|
2646
|
+
},
|
|
2647
|
+
preventDefault: () => {
|
|
2648
|
+
prevented = true;
|
|
2649
|
+
event.preventDefault();
|
|
2650
|
+
},
|
|
2651
|
+
stopPropagation: () => {
|
|
2652
|
+
stopped = true;
|
|
2653
|
+
event.stopPropagation();
|
|
2654
|
+
}
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
if (onLoadingCompleteRef == null ? void 0 : onLoadingCompleteRef.current) {
|
|
2658
|
+
onLoadingCompleteRef.current(img);
|
|
2659
|
+
}
|
|
2660
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2661
|
+
const origSrc = new URL(src, "http://n").searchParams.get("url") || src;
|
|
2662
|
+
if (img.getAttribute("data-nimg") === "fill") {
|
|
2663
|
+
if (!unoptimized && (!sizesInput || sizesInput === "100vw")) {
|
|
2664
|
+
let widthViewportRatio = img.getBoundingClientRect().width / window.innerWidth;
|
|
2665
|
+
if (widthViewportRatio < 0.6) {
|
|
2666
|
+
if (sizesInput === "100vw") {
|
|
2667
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes');
|
|
2668
|
+
} else {
|
|
2669
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes');
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
if (img.parentElement) {
|
|
2674
|
+
const { position } = window.getComputedStyle(img.parentElement);
|
|
2675
|
+
const valid = [
|
|
2676
|
+
"absolute",
|
|
2677
|
+
"fixed",
|
|
2678
|
+
"relative"
|
|
2679
|
+
];
|
|
2680
|
+
if (!valid.includes(position)) {
|
|
2681
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" and parent element with invalid "position". Provided "' + position + '" should be one of ' + valid.map(String).join(",") + ".");
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
if (img.height === 0) {
|
|
2685
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + '" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.');
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
const heightModified = img.height.toString() !== img.getAttribute("height");
|
|
2689
|
+
const widthModified = img.width.toString() !== img.getAttribute("width");
|
|
2690
|
+
if (heightModified && !widthModified || !heightModified && widthModified) {
|
|
2691
|
+
(0, _warnonce.warnOnce)('Image with src "' + origSrc + `" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`);
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
});
|
|
2695
|
+
}
|
|
2696
|
+
function getDynamicProps(fetchPriority) {
|
|
2697
|
+
if (Boolean(_react.use)) {
|
|
2698
|
+
return {
|
|
2699
|
+
fetchPriority
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
return {
|
|
2703
|
+
fetchpriority: fetchPriority
|
|
2704
|
+
};
|
|
2705
|
+
}
|
|
2706
|
+
var ImageElement = /* @__PURE__ */ (0, _react.forwardRef)((param, forwardedRef) => {
|
|
2707
|
+
let { src, srcSet, sizes, height, width, decoding, className, style, fetchPriority, placeholder, loading, unoptimized, fill, onLoadRef, onLoadingCompleteRef, setBlurComplete, setShowAltText, sizesInput, onLoad, onError, ...rest } = param;
|
|
2708
|
+
const ownRef = (0, _react.useCallback)((img) => {
|
|
2709
|
+
if (!img) {
|
|
2710
|
+
return;
|
|
2711
|
+
}
|
|
2712
|
+
if (onError) {
|
|
2713
|
+
img.src = img.src;
|
|
2714
|
+
}
|
|
2715
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2716
|
+
if (!src) {
|
|
2717
|
+
console.error('Image is missing required "src" property:', img);
|
|
2718
|
+
}
|
|
2719
|
+
if (img.getAttribute("alt") === null) {
|
|
2720
|
+
console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.');
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
if (img.complete) {
|
|
2724
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2725
|
+
}
|
|
2726
|
+
}, [
|
|
2727
|
+
src,
|
|
2728
|
+
placeholder,
|
|
2729
|
+
onLoadRef,
|
|
2730
|
+
onLoadingCompleteRef,
|
|
2731
|
+
setBlurComplete,
|
|
2732
|
+
onError,
|
|
2733
|
+
unoptimized,
|
|
2734
|
+
sizesInput
|
|
2735
|
+
]);
|
|
2736
|
+
const ref = (0, _usemergedref.useMergedRef)(forwardedRef, ownRef);
|
|
2737
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("img", {
|
|
2738
|
+
...rest,
|
|
2739
|
+
...getDynamicProps(fetchPriority),
|
|
2740
|
+
// It's intended to keep `loading` before `src` because React updates
|
|
2741
|
+
// props in order which causes Safari/Firefox to not lazy load properly.
|
|
2742
|
+
// See https://github.com/facebook/react/issues/25883
|
|
2743
|
+
loading,
|
|
2744
|
+
width,
|
|
2745
|
+
height,
|
|
2746
|
+
decoding,
|
|
2747
|
+
"data-nimg": fill ? "fill" : "1",
|
|
2748
|
+
className,
|
|
2749
|
+
style,
|
|
2750
|
+
// It's intended to keep `src` the last attribute because React updates
|
|
2751
|
+
// attributes in order. If we keep `src` the first one, Safari will
|
|
2752
|
+
// immediately start to fetch `src`, before `sizes` and `srcSet` are even
|
|
2753
|
+
// updated by React. That causes multiple unnecessary requests if `srcSet`
|
|
2754
|
+
// and `sizes` are defined.
|
|
2755
|
+
// This bug cannot be reproduced in Chrome or Firefox.
|
|
2756
|
+
sizes,
|
|
2757
|
+
srcSet,
|
|
2758
|
+
src,
|
|
2759
|
+
ref,
|
|
2760
|
+
onLoad: (event) => {
|
|
2761
|
+
const img = event.currentTarget;
|
|
2762
|
+
handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput);
|
|
2763
|
+
},
|
|
2764
|
+
onError: (event) => {
|
|
2765
|
+
setShowAltText(true);
|
|
2766
|
+
if (placeholder !== "empty") {
|
|
2767
|
+
setBlurComplete(true);
|
|
2768
|
+
}
|
|
2769
|
+
if (onError) {
|
|
2770
|
+
onError(event);
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2774
|
+
});
|
|
2775
|
+
function ImagePreload(param) {
|
|
2776
|
+
let { isAppRouter, imgAttributes } = param;
|
|
2777
|
+
const opts = {
|
|
2778
|
+
as: "image",
|
|
2779
|
+
imageSrcSet: imgAttributes.srcSet,
|
|
2780
|
+
imageSizes: imgAttributes.sizes,
|
|
2781
|
+
crossOrigin: imgAttributes.crossOrigin,
|
|
2782
|
+
referrerPolicy: imgAttributes.referrerPolicy,
|
|
2783
|
+
...getDynamicProps(imgAttributes.fetchPriority)
|
|
2784
|
+
};
|
|
2785
|
+
if (isAppRouter && _reactdom.default.preload) {
|
|
2786
|
+
_reactdom.default.preload(
|
|
2787
|
+
imgAttributes.src,
|
|
2788
|
+
// @ts-expect-error TODO: upgrade to `@types/react-dom@18.3.x`
|
|
2789
|
+
opts
|
|
2790
|
+
);
|
|
2791
|
+
return null;
|
|
2792
|
+
}
|
|
2793
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_head.default, {
|
|
2794
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("link", {
|
|
2795
|
+
rel: "preload",
|
|
2796
|
+
// Note how we omit the `href` attribute, as it would only be relevant
|
|
2797
|
+
// for browsers that do not support `imagesrcset`, and in those cases
|
|
2798
|
+
// it would cause the incorrect image to be preloaded.
|
|
2799
|
+
//
|
|
2800
|
+
// https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset
|
|
2801
|
+
href: imgAttributes.srcSet ? void 0 : imgAttributes.src,
|
|
2802
|
+
...opts
|
|
2803
|
+
}, "__nimg-" + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes)
|
|
2804
|
+
});
|
|
2805
|
+
}
|
|
2806
|
+
var Image3 = /* @__PURE__ */ (0, _react.forwardRef)((props, forwardedRef) => {
|
|
2807
|
+
const pagesRouter = (0, _react.useContext)(_routercontextsharedruntime.RouterContext);
|
|
2808
|
+
const isAppRouter = !pagesRouter;
|
|
2809
|
+
const configContext = (0, _react.useContext)(_imageconfigcontextsharedruntime.ImageConfigContext);
|
|
2810
|
+
const config = (0, _react.useMemo)(() => {
|
|
2811
|
+
var _c_qualities;
|
|
2812
|
+
const c = configEnv || configContext || _imageconfig.imageConfigDefault;
|
|
2813
|
+
const allSizes = [
|
|
2814
|
+
...c.deviceSizes,
|
|
2815
|
+
...c.imageSizes
|
|
2816
|
+
].sort((a, b) => a - b);
|
|
2817
|
+
const deviceSizes = c.deviceSizes.sort((a, b) => a - b);
|
|
2818
|
+
const qualities = (_c_qualities = c.qualities) == null ? void 0 : _c_qualities.sort((a, b) => a - b);
|
|
2819
|
+
return {
|
|
2820
|
+
...c,
|
|
2821
|
+
allSizes,
|
|
2822
|
+
deviceSizes,
|
|
2823
|
+
qualities
|
|
2824
|
+
};
|
|
2825
|
+
}, [
|
|
2826
|
+
configContext
|
|
2827
|
+
]);
|
|
2828
|
+
const { onLoad, onLoadingComplete } = props;
|
|
2829
|
+
const onLoadRef = (0, _react.useRef)(onLoad);
|
|
2830
|
+
(0, _react.useEffect)(() => {
|
|
2831
|
+
onLoadRef.current = onLoad;
|
|
2832
|
+
}, [
|
|
2833
|
+
onLoad
|
|
2834
|
+
]);
|
|
2835
|
+
const onLoadingCompleteRef = (0, _react.useRef)(onLoadingComplete);
|
|
2836
|
+
(0, _react.useEffect)(() => {
|
|
2837
|
+
onLoadingCompleteRef.current = onLoadingComplete;
|
|
2838
|
+
}, [
|
|
2839
|
+
onLoadingComplete
|
|
2840
|
+
]);
|
|
2841
|
+
const [blurComplete, setBlurComplete] = (0, _react.useState)(false);
|
|
2842
|
+
const [showAltText, setShowAltText] = (0, _react.useState)(false);
|
|
2843
|
+
const { props: imgAttributes, meta: imgMeta } = (0, _getimgprops.getImgProps)(props, {
|
|
2844
|
+
defaultLoader: _imageloader.default,
|
|
2845
|
+
imgConf: config,
|
|
2846
|
+
blurComplete,
|
|
2847
|
+
showAltText
|
|
2848
|
+
});
|
|
2849
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
2850
|
+
children: [
|
|
2851
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(ImageElement, {
|
|
2852
|
+
...imgAttributes,
|
|
2853
|
+
unoptimized: imgMeta.unoptimized,
|
|
2854
|
+
placeholder: imgMeta.placeholder,
|
|
2855
|
+
fill: imgMeta.fill,
|
|
2856
|
+
onLoadRef,
|
|
2857
|
+
onLoadingCompleteRef,
|
|
2858
|
+
setBlurComplete,
|
|
2859
|
+
setShowAltText,
|
|
2860
|
+
sizesInput: props.sizes,
|
|
2861
|
+
ref: forwardedRef
|
|
2862
|
+
}),
|
|
2863
|
+
imgMeta.priority ? /* @__PURE__ */ (0, _jsxruntime.jsx)(ImagePreload, {
|
|
2864
|
+
isAppRouter,
|
|
2865
|
+
imgAttributes
|
|
2866
|
+
}) : null
|
|
2867
|
+
]
|
|
2868
|
+
});
|
|
2869
|
+
});
|
|
2870
|
+
if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
|
|
2871
|
+
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
2872
|
+
Object.assign(exports2.default, exports2);
|
|
2873
|
+
module2.exports = exports2.default;
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
});
|
|
2877
|
+
|
|
2878
|
+
// node_modules/next/dist/shared/lib/image-external.js
|
|
2879
|
+
var require_image_external = __commonJS({
|
|
2880
|
+
"node_modules/next/dist/shared/lib/image-external.js"(exports2) {
|
|
2881
|
+
"use strict";
|
|
2882
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
2883
|
+
value: true
|
|
2884
|
+
});
|
|
2885
|
+
function _export(target, all) {
|
|
2886
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
2887
|
+
enumerable: true,
|
|
2888
|
+
get: all[name]
|
|
2889
|
+
});
|
|
2890
|
+
}
|
|
2891
|
+
_export(exports2, {
|
|
2892
|
+
default: function() {
|
|
2893
|
+
return _default;
|
|
2894
|
+
},
|
|
2895
|
+
getImageProps: function() {
|
|
2896
|
+
return getImageProps;
|
|
2897
|
+
}
|
|
2898
|
+
});
|
|
2899
|
+
var _interop_require_default = require_interop_require_default();
|
|
2900
|
+
var _getimgprops = require_get_img_props();
|
|
2901
|
+
var _imagecomponent = require_image_component();
|
|
2902
|
+
var _imageloader = /* @__PURE__ */ _interop_require_default._(require_image_loader());
|
|
2903
|
+
function getImageProps(imgProps) {
|
|
2904
|
+
const { props } = (0, _getimgprops.getImgProps)(imgProps, {
|
|
2905
|
+
defaultLoader: _imageloader.default,
|
|
2906
|
+
// This is replaced by webpack define plugin
|
|
2907
|
+
imgConf: process.env.__NEXT_IMAGE_OPTS
|
|
2908
|
+
});
|
|
2909
|
+
for (const [key, value] of Object.entries(props)) {
|
|
2910
|
+
if (value === void 0) {
|
|
2911
|
+
delete props[key];
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
return {
|
|
2915
|
+
props
|
|
2916
|
+
};
|
|
2917
|
+
}
|
|
2918
|
+
var _default = _imagecomponent.Image;
|
|
2919
|
+
}
|
|
2920
|
+
});
|
|
2921
|
+
|
|
2922
|
+
// node_modules/next/image.js
|
|
2923
|
+
var require_image = __commonJS({
|
|
2924
|
+
"node_modules/next/image.js"(exports2, module2) {
|
|
2925
|
+
module2.exports = require_image_external();
|
|
63
2926
|
}
|
|
64
2927
|
});
|
|
65
2928
|
|
|
@@ -1943,42 +4806,9 @@ var require_add_locale2 = __commonJS({
|
|
|
1943
4806
|
return path;
|
|
1944
4807
|
};
|
|
1945
4808
|
if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
|
|
1946
|
-
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
1947
|
-
Object.assign(exports2.default, exports2);
|
|
1948
|
-
module2.exports = exports2.default;
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
});
|
|
1952
|
-
|
|
1953
|
-
// node_modules/@swc/helpers/cjs/_interop_require_default.cjs
|
|
1954
|
-
var require_interop_require_default = __commonJS({
|
|
1955
|
-
"node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
|
|
1956
|
-
"use strict";
|
|
1957
|
-
function _interop_require_default(obj) {
|
|
1958
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
1959
|
-
}
|
|
1960
|
-
exports2._ = _interop_require_default;
|
|
1961
|
-
}
|
|
1962
|
-
});
|
|
1963
|
-
|
|
1964
|
-
// node_modules/next/dist/shared/lib/router-context.shared-runtime.js
|
|
1965
|
-
var require_router_context_shared_runtime = __commonJS({
|
|
1966
|
-
"node_modules/next/dist/shared/lib/router-context.shared-runtime.js"(exports2) {
|
|
1967
|
-
"use strict";
|
|
1968
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
1969
|
-
value: true
|
|
1970
|
-
});
|
|
1971
|
-
Object.defineProperty(exports2, "RouterContext", {
|
|
1972
|
-
enumerable: true,
|
|
1973
|
-
get: function() {
|
|
1974
|
-
return RouterContext;
|
|
1975
|
-
}
|
|
1976
|
-
});
|
|
1977
|
-
var _interop_require_default = require_interop_require_default();
|
|
1978
|
-
var _react = /* @__PURE__ */ _interop_require_default._(require("react"));
|
|
1979
|
-
var RouterContext = _react.default.createContext(null);
|
|
1980
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1981
|
-
RouterContext.displayName = "RouterContext";
|
|
4809
|
+
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
4810
|
+
Object.assign(exports2.default, exports2);
|
|
4811
|
+
module2.exports = exports2.default;
|
|
1982
4812
|
}
|
|
1983
4813
|
}
|
|
1984
4814
|
});
|
|
@@ -2339,71 +5169,6 @@ var require_add_base_path = __commonJS({
|
|
|
2339
5169
|
}
|
|
2340
5170
|
});
|
|
2341
5171
|
|
|
2342
|
-
// node_modules/next/dist/client/use-merged-ref.js
|
|
2343
|
-
var require_use_merged_ref = __commonJS({
|
|
2344
|
-
"node_modules/next/dist/client/use-merged-ref.js"(exports2, module2) {
|
|
2345
|
-
"use strict";
|
|
2346
|
-
Object.defineProperty(exports2, "__esModule", {
|
|
2347
|
-
value: true
|
|
2348
|
-
});
|
|
2349
|
-
Object.defineProperty(exports2, "useMergedRef", {
|
|
2350
|
-
enumerable: true,
|
|
2351
|
-
get: function() {
|
|
2352
|
-
return useMergedRef;
|
|
2353
|
-
}
|
|
2354
|
-
});
|
|
2355
|
-
var _react = require("react");
|
|
2356
|
-
function useMergedRef(refA, refB) {
|
|
2357
|
-
const cleanupA = (0, _react.useRef)(null);
|
|
2358
|
-
const cleanupB = (0, _react.useRef)(null);
|
|
2359
|
-
return (0, _react.useCallback)((current) => {
|
|
2360
|
-
if (current === null) {
|
|
2361
|
-
const cleanupFnA = cleanupA.current;
|
|
2362
|
-
if (cleanupFnA) {
|
|
2363
|
-
cleanupA.current = null;
|
|
2364
|
-
cleanupFnA();
|
|
2365
|
-
}
|
|
2366
|
-
const cleanupFnB = cleanupB.current;
|
|
2367
|
-
if (cleanupFnB) {
|
|
2368
|
-
cleanupB.current = null;
|
|
2369
|
-
cleanupFnB();
|
|
2370
|
-
}
|
|
2371
|
-
} else {
|
|
2372
|
-
if (refA) {
|
|
2373
|
-
cleanupA.current = applyRef(refA, current);
|
|
2374
|
-
}
|
|
2375
|
-
if (refB) {
|
|
2376
|
-
cleanupB.current = applyRef(refB, current);
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
}, [
|
|
2380
|
-
refA,
|
|
2381
|
-
refB
|
|
2382
|
-
]);
|
|
2383
|
-
}
|
|
2384
|
-
function applyRef(refA, current) {
|
|
2385
|
-
if (typeof refA === "function") {
|
|
2386
|
-
const cleanup = refA(current);
|
|
2387
|
-
if (typeof cleanup === "function") {
|
|
2388
|
-
return cleanup;
|
|
2389
|
-
} else {
|
|
2390
|
-
return () => refA(null);
|
|
2391
|
-
}
|
|
2392
|
-
} else {
|
|
2393
|
-
refA.current = current;
|
|
2394
|
-
return () => {
|
|
2395
|
-
refA.current = null;
|
|
2396
|
-
};
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
if ((typeof exports2.default === "function" || typeof exports2.default === "object" && exports2.default !== null) && typeof exports2.default.__esModule === "undefined") {
|
|
2400
|
-
Object.defineProperty(exports2.default, "__esModule", { value: true });
|
|
2401
|
-
Object.assign(exports2.default, exports2);
|
|
2402
|
-
module2.exports = exports2.default;
|
|
2403
|
-
}
|
|
2404
|
-
}
|
|
2405
|
-
});
|
|
2406
|
-
|
|
2407
5172
|
// node_modules/next/dist/shared/lib/utils/error-once.js
|
|
2408
5173
|
var require_error_once = __commonJS({
|
|
2409
5174
|
"node_modules/next/dist/shared/lib/utils/error-once.js"(exports2) {
|
|
@@ -2890,6 +5655,7 @@ __export(index_exports, {
|
|
|
2890
5655
|
LanguageModal: () => LanguageModal,
|
|
2891
5656
|
LanguageProvider: () => LanguageProvider,
|
|
2892
5657
|
LanguageUtil: () => LanguageUtil,
|
|
5658
|
+
ListTile: () => ListTile,
|
|
2893
5659
|
LoadingAndErrorComponent: () => LoadingAndErrorComponent,
|
|
2894
5660
|
LoadingAnimation: () => LoadingAnimation,
|
|
2895
5661
|
LoadingButton: () => LoadingButton,
|
|
@@ -2919,7 +5685,6 @@ __export(index_exports, {
|
|
|
2919
5685
|
SearchBar: () => SearchBar,
|
|
2920
5686
|
SearchableList: () => SearchableList,
|
|
2921
5687
|
Select: () => Select,
|
|
2922
|
-
SelectTile: () => SelectTile,
|
|
2923
5688
|
SelectUncontrolled: () => SelectUncontrolled,
|
|
2924
5689
|
SessionStorageService: () => SessionStorageService,
|
|
2925
5690
|
SimpleSearch: () => SimpleSearch,
|
|
@@ -3060,14 +5825,16 @@ var import_lucide_react = require("lucide-react");
|
|
|
3060
5825
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
3061
5826
|
var Tile = ({
|
|
3062
5827
|
title,
|
|
5828
|
+
titleClassName,
|
|
3063
5829
|
description,
|
|
5830
|
+
descriptionClassName,
|
|
3064
5831
|
onClick,
|
|
3065
5832
|
isSelected = false,
|
|
3066
5833
|
disabled = false,
|
|
3067
5834
|
prefix,
|
|
3068
5835
|
suffix,
|
|
3069
5836
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
3070
|
-
selectedClassName = "
|
|
5837
|
+
selectedClassName = "bg-primary/20",
|
|
3071
5838
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
3072
5839
|
className
|
|
3073
5840
|
}) => {
|
|
@@ -3077,7 +5844,7 @@ var Tile = ({
|
|
|
3077
5844
|
className: (0, import_clsx.default)(
|
|
3078
5845
|
"flex-row-2 w-full items-center",
|
|
3079
5846
|
{
|
|
3080
|
-
[normalClassName]:
|
|
5847
|
+
[normalClassName]: onClick && !disabled,
|
|
3081
5848
|
[selectedClassName]: isSelected && !disabled,
|
|
3082
5849
|
[disabledClassName]: disabled
|
|
3083
5850
|
},
|
|
@@ -3087,14 +5854,27 @@ var Tile = ({
|
|
|
3087
5854
|
children: [
|
|
3088
5855
|
prefix,
|
|
3089
5856
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
3090
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
3091
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(
|
|
5857
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
5858
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
3092
5859
|
] }),
|
|
3093
5860
|
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
|
|
3094
5861
|
]
|
|
3095
5862
|
}
|
|
3096
5863
|
);
|
|
3097
5864
|
};
|
|
5865
|
+
var ListTile = ({
|
|
5866
|
+
...props
|
|
5867
|
+
}) => {
|
|
5868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
5869
|
+
Tile,
|
|
5870
|
+
{
|
|
5871
|
+
...props,
|
|
5872
|
+
titleClassName: props.titleClassName ?? "font-semibold",
|
|
5873
|
+
className: (0, import_clsx.default)("px-2 py-1 rounded-md", props.className),
|
|
5874
|
+
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
5875
|
+
}
|
|
5876
|
+
);
|
|
5877
|
+
};
|
|
3098
5878
|
|
|
3099
5879
|
// src/components/icons-and-geometry/Helpwave.tsx
|
|
3100
5880
|
var import_clsx2 = require("clsx");
|
|
@@ -3180,7 +5960,8 @@ var HelpwaveBadge = ({
|
|
|
3180
5960
|
Tile,
|
|
3181
5961
|
{
|
|
3182
5962
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Helpwave, { size: iconSize }),
|
|
3183
|
-
title
|
|
5963
|
+
title,
|
|
5964
|
+
titleClassName: size === "small" ? "textstyle-title-lg text-base" : "textstyle-title-xl",
|
|
3184
5965
|
className: (0, import_clsx3.default)(
|
|
3185
5966
|
{
|
|
3186
5967
|
"px-2 py-1 rounded-md": size === "small",
|
|
@@ -3258,9 +6039,6 @@ var useLocalStorage = (key, initValue) => {
|
|
|
3258
6039
|
storageService.set(key, newValue);
|
|
3259
6040
|
setStoredValue(newValue);
|
|
3260
6041
|
}, [storedValue, setStoredValue, key]);
|
|
3261
|
-
(0, import_react.useEffect)(() => {
|
|
3262
|
-
setStoredValue(get());
|
|
3263
|
-
}, []);
|
|
3264
6042
|
return [storedValue, setValue];
|
|
3265
6043
|
};
|
|
3266
6044
|
|
|
@@ -5035,35 +7813,10 @@ var ConfirmDialog = ({
|
|
|
5035
7813
|
|
|
5036
7814
|
// src/components/icons-and-geometry/Avatar.tsx
|
|
5037
7815
|
var import_clsx13 = __toESM(require("clsx"));
|
|
5038
|
-
|
|
5039
|
-
// src/hooks/useLogOnce.ts
|
|
5040
7816
|
var import_react11 = require("react");
|
|
5041
|
-
var useLogOnce = ({
|
|
5042
|
-
message,
|
|
5043
|
-
condition,
|
|
5044
|
-
type = "warning"
|
|
5045
|
-
}) => {
|
|
5046
|
-
const [hasLogged, setHasLogged] = (0, import_react11.useState)(false);
|
|
5047
|
-
(0, import_react11.useEffect)(() => {
|
|
5048
|
-
if (!hasLogged && condition) {
|
|
5049
|
-
switch (type) {
|
|
5050
|
-
case "info":
|
|
5051
|
-
console.info(message);
|
|
5052
|
-
break;
|
|
5053
|
-
case "error":
|
|
5054
|
-
console.error(message);
|
|
5055
|
-
break;
|
|
5056
|
-
case "warning":
|
|
5057
|
-
console.warn(message);
|
|
5058
|
-
break;
|
|
5059
|
-
}
|
|
5060
|
-
setHasLogged(true);
|
|
5061
|
-
}
|
|
5062
|
-
}, [condition]);
|
|
5063
|
-
};
|
|
5064
|
-
|
|
5065
|
-
// src/components/icons-and-geometry/Avatar.tsx
|
|
5066
7817
|
var import_react12 = require("react");
|
|
7818
|
+
var import_lucide_react5 = require("lucide-react");
|
|
7819
|
+
var import_image = __toESM(require_image());
|
|
5067
7820
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
5068
7821
|
var avtarSizeList = ["sm", "md", "lg", "xl"];
|
|
5069
7822
|
var avatarSizeMapping = {
|
|
@@ -5084,6 +7837,7 @@ var AvatarUtil = {
|
|
|
5084
7837
|
};
|
|
5085
7838
|
var Avatar = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
5086
7839
|
const pixels = avatarSizeMapping[size];
|
|
7840
|
+
const [hasImageError, setHasImageError] = (0, import_react11.useState)(false);
|
|
5087
7841
|
const sizeStyle = {
|
|
5088
7842
|
minWidth: pixels,
|
|
5089
7843
|
maxWidth: pixels,
|
|
@@ -5091,7 +7845,6 @@ var Avatar = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
|
5091
7845
|
maxHeight: pixels
|
|
5092
7846
|
};
|
|
5093
7847
|
const textClassName = textClassNameMapping[size];
|
|
5094
|
-
useLogOnce({ message: "Either set image or name in Avatar", condition: !image && !name, type: "warning" });
|
|
5095
7848
|
const displayName = (0, import_react12.useMemo)(() => {
|
|
5096
7849
|
const maxLetters = size === "sm" ? 1 : 2;
|
|
5097
7850
|
return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
|
|
@@ -5111,17 +7864,21 @@ var Avatar = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
|
5111
7864
|
),
|
|
5112
7865
|
style: sizeStyle,
|
|
5113
7866
|
children: [
|
|
5114
|
-
name && !image && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: (0, import_clsx13.default)(textClassName, "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"), children: displayName }),
|
|
5115
|
-
|
|
5116
|
-
|
|
7867
|
+
name && (!image || hasImageError) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: (0, import_clsx13.default)(textClassName, "absolute z-[1] left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"), children: displayName }),
|
|
7868
|
+
!name && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_clsx13.default)("absolute z-[1] left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react5.UserIcon, { size: Math.round(pixels * 3 / 4) }) }),
|
|
7869
|
+
image && !hasImageError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
7870
|
+
import_image.default,
|
|
5117
7871
|
{
|
|
5118
7872
|
className: (0, import_clsx13.default)(
|
|
5119
|
-
"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
7873
|
+
"absolute z-[2] left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
5120
7874
|
rounding
|
|
5121
7875
|
),
|
|
5122
7876
|
src: image.avatarUrl,
|
|
5123
7877
|
alt: image.alt,
|
|
5124
|
-
style: sizeStyle
|
|
7878
|
+
style: sizeStyle,
|
|
7879
|
+
width: pixels,
|
|
7880
|
+
height: pixels,
|
|
7881
|
+
onError: () => setHasImageError(true)
|
|
5125
7882
|
}
|
|
5126
7883
|
)
|
|
5127
7884
|
]
|
|
@@ -5460,13 +8217,14 @@ var RadialRings = ({
|
|
|
5460
8217
|
};
|
|
5461
8218
|
|
|
5462
8219
|
// src/components/icons-and-geometry/Tag.tsx
|
|
8220
|
+
var import_image2 = __toESM(require_image());
|
|
5463
8221
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
5464
8222
|
var TagIcon = ({
|
|
5465
8223
|
className,
|
|
5466
8224
|
size = 16
|
|
5467
8225
|
}) => {
|
|
5468
8226
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5469
|
-
|
|
8227
|
+
import_image2.default,
|
|
5470
8228
|
{
|
|
5471
8229
|
style: { width: `${size}px`, height: `${size}px`, minWidth: `${size}px`, minHeight: `${size}px` },
|
|
5472
8230
|
width: size,
|
|
@@ -5481,26 +8239,30 @@ var TagIcon = ({
|
|
|
5481
8239
|
// src/components/layout-and-navigation/BreadCrumb.tsx
|
|
5482
8240
|
var import_link = __toESM(require_link2());
|
|
5483
8241
|
var import_clsx16 = __toESM(require("clsx"));
|
|
8242
|
+
var import_react14 = require("react");
|
|
5484
8243
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5485
8244
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
5486
8245
|
const color = "text-description";
|
|
5487
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)("flex-row-0", containerClassName), children: crumbs.map((crumb, index) =>
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
8246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
|
|
8247
|
+
const isLast = index === crumbs.length - 1;
|
|
8248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react14.Fragment, { children: [
|
|
8249
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8250
|
+
import_link.default,
|
|
8251
|
+
{
|
|
8252
|
+
href: crumb.link,
|
|
8253
|
+
className: (0, import_clsx16.default)("btn-sm hover:bg-description/20", linkClassName, { [color]: !isLast }),
|
|
8254
|
+
children: crumb.display
|
|
8255
|
+
}
|
|
8256
|
+
),
|
|
8257
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: (0, import_clsx16.default)(`px-1`, color), children: "/" })
|
|
8258
|
+
] }, index);
|
|
8259
|
+
}) });
|
|
5498
8260
|
};
|
|
5499
8261
|
|
|
5500
8262
|
// src/components/layout-and-navigation/Carousel.tsx
|
|
5501
|
-
var
|
|
8263
|
+
var import_react15 = require("react");
|
|
5502
8264
|
var import_clsx17 = __toESM(require("clsx"));
|
|
5503
|
-
var
|
|
8265
|
+
var import_lucide_react6 = require("lucide-react");
|
|
5504
8266
|
|
|
5505
8267
|
// src/util/math.ts
|
|
5506
8268
|
var clamp = (value, min = 0, max = 1) => {
|
|
@@ -5630,15 +8392,15 @@ var Carousel = ({
|
|
|
5630
8392
|
currentPosition,
|
|
5631
8393
|
dragState,
|
|
5632
8394
|
animationState
|
|
5633
|
-
}, setCarouselInformation] = (0,
|
|
8395
|
+
}, setCarouselInformation] = (0, import_react15.useState)({
|
|
5634
8396
|
currentPosition: 0
|
|
5635
8397
|
});
|
|
5636
|
-
const animationId = (0,
|
|
5637
|
-
const timeOut = (0,
|
|
8398
|
+
const animationId = (0, import_react15.useRef)(void 0);
|
|
8399
|
+
const timeOut = (0, import_react15.useRef)(void 0);
|
|
5638
8400
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
5639
8401
|
const length = children.length;
|
|
5640
8402
|
const paddingItemCount = 3;
|
|
5641
|
-
const util = (0,
|
|
8403
|
+
const util = (0, import_react15.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
|
|
5642
8404
|
const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
|
|
5643
8405
|
animationTime = Math.max(200, animationTime);
|
|
5644
8406
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
@@ -5646,7 +8408,7 @@ var Carousel = ({
|
|
|
5646
8408
|
const baseOffset = -50 + (index - currentPosition) * 100;
|
|
5647
8409
|
return `${baseOffset}%`;
|
|
5648
8410
|
};
|
|
5649
|
-
const animation = (0,
|
|
8411
|
+
const animation = (0, import_react15.useCallback)((time) => {
|
|
5650
8412
|
let keepAnimating = true;
|
|
5651
8413
|
setCarouselInformation((state) => {
|
|
5652
8414
|
const {
|
|
@@ -5691,7 +8453,7 @@ var Carousel = ({
|
|
|
5691
8453
|
animationId.current = requestAnimationFrame((time1) => animation(time1));
|
|
5692
8454
|
}
|
|
5693
8455
|
}, [animationTime, autoLoopAnimationTime, util]);
|
|
5694
|
-
(0,
|
|
8456
|
+
(0, import_react15.useEffect)(() => {
|
|
5695
8457
|
if (animationState) {
|
|
5696
8458
|
animationId.current = requestAnimationFrame(animation);
|
|
5697
8459
|
}
|
|
@@ -5713,7 +8475,7 @@ var Carousel = ({
|
|
|
5713
8475
|
isAutoLooping: true
|
|
5714
8476
|
}
|
|
5715
8477
|
}));
|
|
5716
|
-
(0,
|
|
8478
|
+
(0, import_react15.useEffect)(() => {
|
|
5717
8479
|
if (!animationId.current && !animationState && !dragState && !timeOut.current) {
|
|
5718
8480
|
if (autoLoopingTimeOut > 0) {
|
|
5719
8481
|
timeOut.current = setTimeout(() => {
|
|
@@ -5855,7 +8617,7 @@ var Carousel = ({
|
|
|
5855
8617
|
className: (0, import_clsx17.default)("absolute z-10 left-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
|
|
5856
8618
|
disabled: !canGoLeft(),
|
|
5857
8619
|
onClick: () => left(),
|
|
5858
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
8620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.ChevronLeft, { size: 24 })
|
|
5859
8621
|
}
|
|
5860
8622
|
),
|
|
5861
8623
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -5865,7 +8627,7 @@ var Carousel = ({
|
|
|
5865
8627
|
className: (0, import_clsx17.default)("absolute z-10 right-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
|
|
5866
8628
|
disabled: !canGoRight(),
|
|
5867
8629
|
onClick: () => right(),
|
|
5868
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
8630
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react6.ChevronRight, { size: 24 })
|
|
5869
8631
|
}
|
|
5870
8632
|
)
|
|
5871
8633
|
] }),
|
|
@@ -5956,7 +8718,7 @@ var Chip = ({
|
|
|
5956
8718
|
{
|
|
5957
8719
|
...restProps,
|
|
5958
8720
|
className: (0, import_clsx18.default)(
|
|
5959
|
-
`row w-fit px-2 py-1`,
|
|
8721
|
+
`row w-fit px-2 py-1 font-semibold`,
|
|
5960
8722
|
colorMapping,
|
|
5961
8723
|
{
|
|
5962
8724
|
"rounded-md": variant === "normal",
|
|
@@ -5979,7 +8741,7 @@ var ChipList = ({
|
|
|
5979
8741
|
Chip,
|
|
5980
8742
|
{
|
|
5981
8743
|
...value,
|
|
5982
|
-
color: value.color ?? "
|
|
8744
|
+
color: value.color ?? "default",
|
|
5983
8745
|
variant: value.variant ?? "normal",
|
|
5984
8746
|
children: value.children
|
|
5985
8747
|
},
|
|
@@ -6264,21 +9026,21 @@ var FAQSection = ({
|
|
|
6264
9026
|
};
|
|
6265
9027
|
|
|
6266
9028
|
// src/components/layout-and-navigation/Pagination.tsx
|
|
6267
|
-
var
|
|
9029
|
+
var import_lucide_react7 = require("lucide-react");
|
|
6268
9030
|
var import_clsx23 = __toESM(require("clsx"));
|
|
6269
9031
|
|
|
6270
9032
|
// src/components/user-action/Input.tsx
|
|
6271
|
-
var
|
|
9033
|
+
var import_react19 = require("react");
|
|
6272
9034
|
var import_clsx22 = __toESM(require("clsx"));
|
|
6273
9035
|
|
|
6274
9036
|
// src/hooks/useDelay.ts
|
|
6275
|
-
var
|
|
9037
|
+
var import_react16 = require("react");
|
|
6276
9038
|
var defaultOptions = {
|
|
6277
9039
|
delay: 3e3,
|
|
6278
9040
|
disabled: false
|
|
6279
9041
|
};
|
|
6280
9042
|
function useDelay(options) {
|
|
6281
|
-
const [timer, setTimer] = (0,
|
|
9043
|
+
const [timer, setTimer] = (0, import_react16.useState)(void 0);
|
|
6282
9044
|
const { delay, disabled } = {
|
|
6283
9045
|
...defaultOptions,
|
|
6284
9046
|
...options
|
|
@@ -6297,12 +9059,12 @@ function useDelay(options) {
|
|
|
6297
9059
|
setTimer(void 0);
|
|
6298
9060
|
}, delay));
|
|
6299
9061
|
};
|
|
6300
|
-
(0,
|
|
9062
|
+
(0, import_react16.useEffect)(() => {
|
|
6301
9063
|
return () => {
|
|
6302
9064
|
clearTimeout(timer);
|
|
6303
9065
|
};
|
|
6304
9066
|
}, [timer]);
|
|
6305
|
-
(0,
|
|
9067
|
+
(0, import_react16.useEffect)(() => {
|
|
6306
9068
|
if (disabled) {
|
|
6307
9069
|
clearTimeout(timer);
|
|
6308
9070
|
setTimer(void 0);
|
|
@@ -6330,9 +9092,9 @@ var Label = ({
|
|
|
6330
9092
|
};
|
|
6331
9093
|
|
|
6332
9094
|
// src/hooks/useFocusManagement.ts
|
|
6333
|
-
var
|
|
9095
|
+
var import_react17 = require("react");
|
|
6334
9096
|
function useFocusManagement() {
|
|
6335
|
-
const getFocusableElements = (0,
|
|
9097
|
+
const getFocusableElements = (0, import_react17.useCallback)(() => {
|
|
6336
9098
|
return Array.from(
|
|
6337
9099
|
document.querySelectorAll(
|
|
6338
9100
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -6341,7 +9103,7 @@ function useFocusManagement() {
|
|
|
6341
9103
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
6342
9104
|
);
|
|
6343
9105
|
}, []);
|
|
6344
|
-
const getNextFocusElement = (0,
|
|
9106
|
+
const getNextFocusElement = (0, import_react17.useCallback)(() => {
|
|
6345
9107
|
const elements = getFocusableElements();
|
|
6346
9108
|
if (elements.length === 0) {
|
|
6347
9109
|
return void 0;
|
|
@@ -6353,11 +9115,11 @@ function useFocusManagement() {
|
|
|
6353
9115
|
}
|
|
6354
9116
|
return nextElement;
|
|
6355
9117
|
}, [getFocusableElements]);
|
|
6356
|
-
const focusNext = (0,
|
|
9118
|
+
const focusNext = (0, import_react17.useCallback)(() => {
|
|
6357
9119
|
const nextElement = getNextFocusElement();
|
|
6358
9120
|
nextElement?.focus();
|
|
6359
9121
|
}, [getNextFocusElement]);
|
|
6360
|
-
const getPreviousFocusElement = (0,
|
|
9122
|
+
const getPreviousFocusElement = (0, import_react17.useCallback)(() => {
|
|
6361
9123
|
const elements = getFocusableElements();
|
|
6362
9124
|
if (elements.length === 0) {
|
|
6363
9125
|
return void 0;
|
|
@@ -6373,7 +9135,7 @@ function useFocusManagement() {
|
|
|
6373
9135
|
}
|
|
6374
9136
|
return previousElement;
|
|
6375
9137
|
}, [getFocusableElements]);
|
|
6376
|
-
const focusPrevious = (0,
|
|
9138
|
+
const focusPrevious = (0, import_react17.useCallback)(() => {
|
|
6377
9139
|
const previousElement = getPreviousFocusElement();
|
|
6378
9140
|
if (previousElement) previousElement.focus();
|
|
6379
9141
|
}, [getPreviousFocusElement]);
|
|
@@ -6387,10 +9149,10 @@ function useFocusManagement() {
|
|
|
6387
9149
|
}
|
|
6388
9150
|
|
|
6389
9151
|
// src/hooks/useFocusOnceVisible.ts
|
|
6390
|
-
var
|
|
9152
|
+
var import_react18 = __toESM(require("react"));
|
|
6391
9153
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
6392
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
6393
|
-
(0,
|
|
9154
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react18.default.useState(false);
|
|
9155
|
+
(0, import_react18.useEffect)(() => {
|
|
6394
9156
|
if (disable || hasUsedFocus) {
|
|
6395
9157
|
return;
|
|
6396
9158
|
}
|
|
@@ -6426,7 +9188,7 @@ var defaultEditCompleteOptions = {
|
|
|
6426
9188
|
afterDelay: true,
|
|
6427
9189
|
delay: 2500
|
|
6428
9190
|
};
|
|
6429
|
-
var Input = (0,
|
|
9191
|
+
var Input = (0, import_react19.forwardRef)(function Input2({
|
|
6430
9192
|
id,
|
|
6431
9193
|
type = "text",
|
|
6432
9194
|
value,
|
|
@@ -6449,10 +9211,10 @@ var Input = (0, import_react18.forwardRef)(function Input2({
|
|
|
6449
9211
|
restartTimer,
|
|
6450
9212
|
clearTimer
|
|
6451
9213
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
6452
|
-
const innerRef = (0,
|
|
9214
|
+
const innerRef = (0, import_react19.useRef)(null);
|
|
6453
9215
|
const { focusNext } = useFocusManagement();
|
|
6454
9216
|
useFocusOnceVisible(innerRef, !autoFocus);
|
|
6455
|
-
(0,
|
|
9217
|
+
(0, import_react19.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
6456
9218
|
const handleKeyDown = (e) => {
|
|
6457
9219
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
6458
9220
|
e.preventDefault();
|
|
@@ -6506,8 +9268,8 @@ var InputUncontrolled = ({
|
|
|
6506
9268
|
onChangeText = noop,
|
|
6507
9269
|
...props
|
|
6508
9270
|
}) => {
|
|
6509
|
-
const [usedValue, setUsedValue] = (0,
|
|
6510
|
-
(0,
|
|
9271
|
+
const [usedValue, setUsedValue] = (0, import_react19.useState)(value);
|
|
9272
|
+
(0, import_react19.useEffect)(() => {
|
|
6511
9273
|
setUsedValue(value);
|
|
6512
9274
|
}, [value]);
|
|
6513
9275
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -6522,7 +9284,7 @@ var InputUncontrolled = ({
|
|
|
6522
9284
|
}
|
|
6523
9285
|
);
|
|
6524
9286
|
};
|
|
6525
|
-
var FormInput = (0,
|
|
9287
|
+
var FormInput = (0, import_react19.forwardRef)(function FormInput2({
|
|
6526
9288
|
id,
|
|
6527
9289
|
labelText,
|
|
6528
9290
|
errorText,
|
|
@@ -6558,7 +9320,7 @@ var FormInput = (0, import_react18.forwardRef)(function FormInput2({
|
|
|
6558
9320
|
});
|
|
6559
9321
|
|
|
6560
9322
|
// src/components/layout-and-navigation/Pagination.tsx
|
|
6561
|
-
var
|
|
9323
|
+
var import_react20 = require("react");
|
|
6562
9324
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
6563
9325
|
var Pagination = ({
|
|
6564
9326
|
overwriteTranslation,
|
|
@@ -6569,11 +9331,11 @@ var Pagination = ({
|
|
|
6569
9331
|
style
|
|
6570
9332
|
}) => {
|
|
6571
9333
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6572
|
-
const [value, setValue] = (0,
|
|
9334
|
+
const [value, setValue] = (0, import_react20.useState)((pageIndex + 1).toString());
|
|
6573
9335
|
const noPages = pageCount === 0;
|
|
6574
9336
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
6575
9337
|
const onLastPage = pageIndex === pageCount - 1;
|
|
6576
|
-
(0,
|
|
9338
|
+
(0, import_react20.useEffect)(() => {
|
|
6577
9339
|
if (noPages) {
|
|
6578
9340
|
setValue("0");
|
|
6579
9341
|
} else {
|
|
@@ -6584,8 +9346,8 @@ var Pagination = ({
|
|
|
6584
9346
|
onPageChanged(page);
|
|
6585
9347
|
};
|
|
6586
9348
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)("flex-row-1", className), style, children: [
|
|
6587
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
6588
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
9349
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronFirst, {}) }),
|
|
9350
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLeft, {}) }),
|
|
6589
9351
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
|
|
6590
9352
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
6591
9353
|
Input,
|
|
@@ -6621,17 +9383,17 @@ var Pagination = ({
|
|
|
6621
9383
|
}
|
|
6622
9384
|
)
|
|
6623
9385
|
] }),
|
|
6624
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
6625
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
9386
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronRight, {}) }),
|
|
9387
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLast, {}) })
|
|
6626
9388
|
] });
|
|
6627
9389
|
};
|
|
6628
9390
|
|
|
6629
9391
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
6630
|
-
var
|
|
9392
|
+
var import_lucide_react8 = require("lucide-react");
|
|
6631
9393
|
var import_clsx24 = __toESM(require("clsx"));
|
|
6632
9394
|
|
|
6633
9395
|
// src/hooks/useSearch.ts
|
|
6634
|
-
var
|
|
9396
|
+
var import_react21 = require("react");
|
|
6635
9397
|
|
|
6636
9398
|
// src/util/simpleSearch.ts
|
|
6637
9399
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -6670,34 +9432,34 @@ var useSearch = ({
|
|
|
6670
9432
|
filter,
|
|
6671
9433
|
disabled = false
|
|
6672
9434
|
}) => {
|
|
6673
|
-
const [search, setSearch] = (0,
|
|
6674
|
-
const [result, setResult] = (0,
|
|
6675
|
-
const searchTags = (0,
|
|
6676
|
-
const updateSearch = (0,
|
|
9435
|
+
const [search, setSearch] = (0, import_react21.useState)(initialSearch ?? "");
|
|
9436
|
+
const [result, setResult] = (0, import_react21.useState)(list);
|
|
9437
|
+
const searchTags = (0, import_react21.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
9438
|
+
const updateSearch = (0, import_react21.useCallback)((newSearch) => {
|
|
6677
9439
|
const usedSearch = newSearch ?? search;
|
|
6678
9440
|
if (newSearch) {
|
|
6679
9441
|
setSearch(search);
|
|
6680
9442
|
}
|
|
6681
9443
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
6682
9444
|
}, [searchTags, list, search, searchMapping]);
|
|
6683
|
-
(0,
|
|
9445
|
+
(0, import_react21.useEffect)(() => {
|
|
6684
9446
|
if (isSearchInstant) {
|
|
6685
9447
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
6686
9448
|
}
|
|
6687
9449
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
6688
|
-
const filteredResult = (0,
|
|
9450
|
+
const filteredResult = (0, import_react21.useMemo)(() => {
|
|
6689
9451
|
if (!filter) {
|
|
6690
9452
|
return result;
|
|
6691
9453
|
}
|
|
6692
9454
|
return result.filter(filter);
|
|
6693
9455
|
}, [result, filter]);
|
|
6694
|
-
const sortedAndFilteredResult = (0,
|
|
9456
|
+
const sortedAndFilteredResult = (0, import_react21.useMemo)(() => {
|
|
6695
9457
|
if (!sortingFunction) {
|
|
6696
9458
|
return filteredResult;
|
|
6697
9459
|
}
|
|
6698
9460
|
return filteredResult.sort(sortingFunction);
|
|
6699
9461
|
}, [filteredResult, sortingFunction]);
|
|
6700
|
-
const usedResult = (0,
|
|
9462
|
+
const usedResult = (0, import_react21.useMemo)(() => {
|
|
6701
9463
|
if (!disabled) {
|
|
6702
9464
|
return sortedAndFilteredResult;
|
|
6703
9465
|
}
|
|
@@ -6748,16 +9510,16 @@ var SearchableList = ({
|
|
|
6748
9510
|
className: "w-full"
|
|
6749
9511
|
}
|
|
6750
9512
|
),
|
|
6751
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { color: "neutral", onClick: () => updateSearch(), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
9513
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { color: "neutral", onClick: () => updateSearch(), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react8.Search, { className: "w-full h-full" }) })
|
|
6752
9514
|
] }),
|
|
6753
9515
|
hasResult ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx24.default)("flex-col-1 overflow-y-auto", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-row-2 text-description py-2 px-2", children: translation("nothingFound") })
|
|
6754
9516
|
] });
|
|
6755
9517
|
};
|
|
6756
9518
|
|
|
6757
9519
|
// src/components/layout-and-navigation/StepperBar.tsx
|
|
6758
|
-
var
|
|
9520
|
+
var import_lucide_react9 = require("lucide-react");
|
|
6759
9521
|
var import_clsx25 = __toESM(require("clsx"));
|
|
6760
|
-
var
|
|
9522
|
+
var import_react22 = require("react");
|
|
6761
9523
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
6762
9524
|
var defaultState = {
|
|
6763
9525
|
currentStep: 0,
|
|
@@ -6795,7 +9557,7 @@ var StepperBar = ({
|
|
|
6795
9557
|
},
|
|
6796
9558
|
className: "flex-row-1 items-center justify-center",
|
|
6797
9559
|
children: [
|
|
6798
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.ChevronLeft, { size: 14 }),
|
|
6799
9561
|
translation("back")
|
|
6800
9562
|
]
|
|
6801
9563
|
}
|
|
@@ -6830,7 +9592,7 @@ var StepperBar = ({
|
|
|
6830
9592
|
disabled: disabledSteps.has(currentStep),
|
|
6831
9593
|
children: [
|
|
6832
9594
|
translation("next"),
|
|
6833
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
9595
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.ChevronRight, { size: 14 })
|
|
6834
9596
|
]
|
|
6835
9597
|
}
|
|
6836
9598
|
) }),
|
|
@@ -6841,7 +9603,7 @@ var StepperBar = ({
|
|
|
6841
9603
|
onClick: onFinish,
|
|
6842
9604
|
className: "flex-row-1 items-center justify-center",
|
|
6843
9605
|
children: [
|
|
6844
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
9606
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Check, { size: 14 }),
|
|
6845
9607
|
finishText ?? translation("confirm")
|
|
6846
9608
|
]
|
|
6847
9609
|
}
|
|
@@ -6851,8 +9613,8 @@ var StepperBar = ({
|
|
|
6851
9613
|
);
|
|
6852
9614
|
};
|
|
6853
9615
|
var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
6854
|
-
const [usedState, setUsedState] = (0,
|
|
6855
|
-
(0,
|
|
9616
|
+
const [usedState, setUsedState] = (0, import_react22.useState)(state ?? defaultState);
|
|
9617
|
+
(0, import_react22.useEffect)(() => {
|
|
6856
9618
|
setUsedState(state ?? defaultState);
|
|
6857
9619
|
}, [state]);
|
|
6858
9620
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
@@ -6973,7 +9735,7 @@ var VerticalDivider = ({
|
|
|
6973
9735
|
};
|
|
6974
9736
|
|
|
6975
9737
|
// src/components/loading-states/ErrorComponent.tsx
|
|
6976
|
-
var
|
|
9738
|
+
var import_lucide_react10 = require("lucide-react");
|
|
6977
9739
|
var import_clsx27 = __toESM(require("clsx"));
|
|
6978
9740
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
6979
9741
|
var defaultErrorComponentTranslation = {
|
|
@@ -6991,13 +9753,13 @@ var ErrorComponent = ({
|
|
|
6991
9753
|
}) => {
|
|
6992
9754
|
const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
|
|
6993
9755
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_clsx27.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
|
|
6994
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9756
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react10.AlertOctagon, { size: 64, className: "text-warning" }),
|
|
6995
9757
|
errorText ?? `${translation("errorOccurred")} :(`
|
|
6996
9758
|
] });
|
|
6997
9759
|
};
|
|
6998
9760
|
|
|
6999
9761
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
7000
|
-
var
|
|
9762
|
+
var import_react23 = require("react");
|
|
7001
9763
|
|
|
7002
9764
|
// src/components/loading-states/LoadingContainer.tsx
|
|
7003
9765
|
var import_clsx28 = require("clsx");
|
|
@@ -7015,11 +9777,11 @@ var LoadingAndErrorComponent = ({
|
|
|
7015
9777
|
hasError = false,
|
|
7016
9778
|
loadingComponent,
|
|
7017
9779
|
errorComponent,
|
|
7018
|
-
minimumLoadingDuration,
|
|
9780
|
+
minimumLoadingDuration = 200,
|
|
7019
9781
|
className
|
|
7020
9782
|
}) => {
|
|
7021
|
-
const [isInMinimumLoading, setIsInMinimumLoading] = (0,
|
|
7022
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0,
|
|
9783
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react23.useState)(false);
|
|
9784
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react23.useState)(false);
|
|
7023
9785
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
7024
9786
|
setIsInMinimumLoading(true);
|
|
7025
9787
|
setTimeout(() => {
|
|
@@ -7222,18 +9984,18 @@ var InputModal = ({
|
|
|
7222
9984
|
};
|
|
7223
9985
|
|
|
7224
9986
|
// src/components/user-action/Select.tsx
|
|
7225
|
-
var import_react25 = require("react");
|
|
7226
9987
|
var import_react26 = require("react");
|
|
9988
|
+
var import_react27 = require("react");
|
|
7227
9989
|
var import_clsx35 = __toESM(require("clsx"));
|
|
7228
9990
|
|
|
7229
9991
|
// src/components/user-action/Menu.tsx
|
|
7230
|
-
var
|
|
9992
|
+
var import_react25 = require("react");
|
|
7231
9993
|
var import_clsx33 = __toESM(require("clsx"));
|
|
7232
9994
|
|
|
7233
9995
|
// src/hooks/useOutsideClick.ts
|
|
7234
|
-
var
|
|
9996
|
+
var import_react24 = require("react");
|
|
7235
9997
|
var useOutsideClick = (refs, handler) => {
|
|
7236
|
-
(0,
|
|
9998
|
+
(0, import_react24.useEffect)(() => {
|
|
7237
9999
|
const listener = (event) => {
|
|
7238
10000
|
if (event.target === null) return;
|
|
7239
10001
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -7357,10 +10119,10 @@ var Menu = ({
|
|
|
7357
10119
|
menuClassName = ""
|
|
7358
10120
|
}) => {
|
|
7359
10121
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
7360
|
-
const triggerRef = (0,
|
|
7361
|
-
const menuRef = (0,
|
|
10122
|
+
const triggerRef = (0, import_react25.useRef)(null);
|
|
10123
|
+
const menuRef = (0, import_react25.useRef)(null);
|
|
7362
10124
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
7363
|
-
const [isHidden, setIsHidden] = (0,
|
|
10125
|
+
const [isHidden, setIsHidden] = (0, import_react25.useState)(true);
|
|
7364
10126
|
const bag = {
|
|
7365
10127
|
isOpen,
|
|
7366
10128
|
close: () => setIsOpen(false),
|
|
@@ -7371,7 +10133,7 @@ var Menu = ({
|
|
|
7371
10133
|
triggerRef.current?.getBoundingClientRect(),
|
|
7372
10134
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
7373
10135
|
);
|
|
7374
|
-
(0,
|
|
10136
|
+
(0, import_react25.useEffect)(() => {
|
|
7375
10137
|
if (!isOpen) return;
|
|
7376
10138
|
const triggerEl = triggerRef.current;
|
|
7377
10139
|
if (!triggerEl) return;
|
|
@@ -7388,7 +10150,7 @@ var Menu = ({
|
|
|
7388
10150
|
window.removeEventListener("resize", close);
|
|
7389
10151
|
};
|
|
7390
10152
|
}, [isOpen, setIsOpen]);
|
|
7391
|
-
(0,
|
|
10153
|
+
(0, import_react25.useEffect)(() => {
|
|
7392
10154
|
if (isOpen) {
|
|
7393
10155
|
setIsHidden(false);
|
|
7394
10156
|
}
|
|
@@ -7424,7 +10186,7 @@ var Menu = ({
|
|
|
7424
10186
|
};
|
|
7425
10187
|
|
|
7426
10188
|
// src/components/user-action/SearchBar.tsx
|
|
7427
|
-
var
|
|
10189
|
+
var import_lucide_react11 = require("lucide-react");
|
|
7428
10190
|
var import_clsx34 = require("clsx");
|
|
7429
10191
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7430
10192
|
var SearchBar = ({
|
|
@@ -7443,28 +10205,12 @@ var SearchBar = ({
|
|
|
7443
10205
|
placeholder: placeholder ?? translation("search")
|
|
7444
10206
|
}
|
|
7445
10207
|
),
|
|
7446
|
-
onSearch && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10208
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react11.Search, { className: "w-full h-full" }) })
|
|
7447
10209
|
] });
|
|
7448
10210
|
};
|
|
7449
10211
|
|
|
7450
10212
|
// src/components/user-action/Select.tsx
|
|
7451
10213
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7452
|
-
var SelectTile = ({
|
|
7453
|
-
className,
|
|
7454
|
-
disabledClassName,
|
|
7455
|
-
title,
|
|
7456
|
-
...restProps
|
|
7457
|
-
}) => {
|
|
7458
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7459
|
-
Tile,
|
|
7460
|
-
{
|
|
7461
|
-
...restProps,
|
|
7462
|
-
className: (0, import_clsx35.default)("px-2 py-1 rounded-md", className),
|
|
7463
|
-
disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
|
|
7464
|
-
title: { ...title, className: title.className ?? "font-semibold" }
|
|
7465
|
-
}
|
|
7466
|
-
);
|
|
7467
|
-
};
|
|
7468
10214
|
var Select = ({
|
|
7469
10215
|
value,
|
|
7470
10216
|
label,
|
|
@@ -7486,7 +10232,7 @@ var Select = ({
|
|
|
7486
10232
|
const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
|
|
7487
10233
|
const { result, search, setSearch } = useSearch({
|
|
7488
10234
|
list: options,
|
|
7489
|
-
searchMapping: (0,
|
|
10235
|
+
searchMapping: (0, import_react26.useCallback)((item) => item.searchTags, []),
|
|
7490
10236
|
...searchOptions
|
|
7491
10237
|
});
|
|
7492
10238
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx35.default)(className), children: [
|
|
@@ -7531,10 +10277,10 @@ var Select = ({
|
|
|
7531
10277
|
),
|
|
7532
10278
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
7533
10279
|
result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7534
|
-
|
|
10280
|
+
ListTile,
|
|
7535
10281
|
{
|
|
7536
10282
|
isSelected: option === selectedOption,
|
|
7537
|
-
title:
|
|
10283
|
+
title: option.label,
|
|
7538
10284
|
onClick: () => {
|
|
7539
10285
|
onChange(option.value);
|
|
7540
10286
|
close();
|
|
@@ -7558,8 +10304,8 @@ var SelectUncontrolled = ({
|
|
|
7558
10304
|
hintText,
|
|
7559
10305
|
...props
|
|
7560
10306
|
}) => {
|
|
7561
|
-
const [selected, setSelected] = (0,
|
|
7562
|
-
(0,
|
|
10307
|
+
const [selected, setSelected] = (0, import_react27.useState)(value);
|
|
10308
|
+
(0, import_react27.useEffect)(() => {
|
|
7563
10309
|
if (options.find((options2) => options2.value === value)) {
|
|
7564
10310
|
setSelected(value);
|
|
7565
10311
|
}
|
|
@@ -7631,8 +10377,8 @@ var LanguageModal = ({
|
|
|
7631
10377
|
};
|
|
7632
10378
|
|
|
7633
10379
|
// src/theming/useTheme.tsx
|
|
7634
|
-
var import_react27 = require("react");
|
|
7635
10380
|
var import_react28 = require("react");
|
|
10381
|
+
var import_react29 = require("react");
|
|
7636
10382
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7637
10383
|
var themes = ["light", "dark", "system"];
|
|
7638
10384
|
var defaultThemeTypeTranslation = {
|
|
@@ -7659,30 +10405,30 @@ var ThemeUtil = {
|
|
|
7659
10405
|
themes,
|
|
7660
10406
|
translation: defaultThemeTypeTranslation
|
|
7661
10407
|
};
|
|
7662
|
-
var ThemeContext = (0,
|
|
10408
|
+
var ThemeContext = (0, import_react29.createContext)({
|
|
7663
10409
|
theme: "light",
|
|
7664
10410
|
setTheme: noop
|
|
7665
10411
|
});
|
|
7666
|
-
var ThemeProvider = ({ children, initialTheme
|
|
7667
|
-
const [storedTheme, setStoredTheme] = useLocalStorage("theme", initialTheme);
|
|
7668
|
-
const [userTheme, setUserTheme] = (0,
|
|
7669
|
-
(0,
|
|
7670
|
-
if (storedTheme !== initialTheme) {
|
|
10412
|
+
var ThemeProvider = ({ children, initialTheme }) => {
|
|
10413
|
+
const [storedTheme, setStoredTheme] = useLocalStorage("theme", initialTheme ?? "system");
|
|
10414
|
+
const [userTheme, setUserTheme] = (0, import_react29.useState)();
|
|
10415
|
+
(0, import_react29.useEffect)(() => {
|
|
10416
|
+
if (!!initialTheme && storedTheme !== initialTheme) {
|
|
7671
10417
|
console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
|
|
7672
10418
|
setStoredTheme(initialTheme);
|
|
7673
10419
|
}
|
|
7674
10420
|
}, [initialTheme]);
|
|
7675
|
-
const usedTheme = (0,
|
|
7676
|
-
(0,
|
|
10421
|
+
const usedTheme = (0, import_react28.useMemo)(() => storedTheme !== "system" ? storedTheme : userTheme, [storedTheme, userTheme]);
|
|
10422
|
+
(0, import_react29.useEffect)(() => {
|
|
7677
10423
|
document.documentElement.setAttribute("data-theme", usedTheme);
|
|
7678
10424
|
}, [usedTheme]);
|
|
7679
|
-
(0,
|
|
10425
|
+
(0, import_react29.useEffect)(() => {
|
|
7680
10426
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
7681
10427
|
setUserTheme(prefersDark ? "dark" : "light");
|
|
7682
10428
|
}, []);
|
|
7683
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme:
|
|
10429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme: usedTheme, setTheme: setStoredTheme }, children });
|
|
7684
10430
|
};
|
|
7685
|
-
var useTheme = () => (0,
|
|
10431
|
+
var useTheme = () => (0, import_react29.useContext)(ThemeContext);
|
|
7686
10432
|
|
|
7687
10433
|
// src/components/modals/ThemeModal.tsx
|
|
7688
10434
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
@@ -7730,12 +10476,12 @@ var ThemeModal = ({
|
|
|
7730
10476
|
};
|
|
7731
10477
|
|
|
7732
10478
|
// src/components/properties/CheckboxProperty.tsx
|
|
7733
|
-
var
|
|
10479
|
+
var import_lucide_react14 = require("lucide-react");
|
|
7734
10480
|
|
|
7735
10481
|
// src/components/user-action/Checkbox.tsx
|
|
7736
|
-
var
|
|
10482
|
+
var import_react30 = require("react");
|
|
7737
10483
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
7738
|
-
var
|
|
10484
|
+
var import_lucide_react12 = require("lucide-react");
|
|
7739
10485
|
var import_clsx36 = __toESM(require("clsx"));
|
|
7740
10486
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7741
10487
|
var checkboxSizeMapping = {
|
|
@@ -7788,8 +10534,8 @@ var Checkbox = ({
|
|
|
7788
10534
|
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
7789
10535
|
}, className),
|
|
7790
10536
|
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(CheckboxPrimitive.Indicator, { children: [
|
|
7791
|
-
checked === true && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7792
|
-
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
10537
|
+
checked === true && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.Check, { className: innerIconSize }),
|
|
10538
|
+
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.Minus, { className: innerIconSize })
|
|
7793
10539
|
] })
|
|
7794
10540
|
}
|
|
7795
10541
|
),
|
|
@@ -7802,7 +10548,7 @@ var CheckboxUncontrolled = ({
|
|
|
7802
10548
|
defaultValue = false,
|
|
7803
10549
|
...props
|
|
7804
10550
|
}) => {
|
|
7805
|
-
const [checked, setChecked] = (0,
|
|
10551
|
+
const [checked, setChecked] = (0, import_react30.useState)(defaultValue);
|
|
7806
10552
|
const handleChange = (checked2) => {
|
|
7807
10553
|
if (onChangeTristate) {
|
|
7808
10554
|
onChangeTristate(checked2);
|
|
@@ -7823,7 +10569,7 @@ var CheckboxUncontrolled = ({
|
|
|
7823
10569
|
};
|
|
7824
10570
|
|
|
7825
10571
|
// src/components/properties/PropertyBase.tsx
|
|
7826
|
-
var
|
|
10572
|
+
var import_lucide_react13 = require("lucide-react");
|
|
7827
10573
|
var import_clsx37 = __toESM(require("clsx"));
|
|
7828
10574
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7829
10575
|
var PropertyBase = ({
|
|
@@ -7852,7 +10598,7 @@ var PropertyBase = ({
|
|
|
7852
10598
|
className
|
|
7853
10599
|
),
|
|
7854
10600
|
children: [
|
|
7855
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "max-w-6 min-w-6 text-text-
|
|
10601
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "max-w-6 min-w-6 text-text-primary", children: icon }),
|
|
7856
10602
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-semibold", children: name })
|
|
7857
10603
|
]
|
|
7858
10604
|
}
|
|
@@ -7870,7 +10616,7 @@ var PropertyBase = ({
|
|
|
7870
10616
|
),
|
|
7871
10617
|
children: [
|
|
7872
10618
|
input({ softRequired, hasValue }),
|
|
7873
|
-
requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10619
|
+
requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react13.AlertTriangle, { size: 24 }) }),
|
|
7874
10620
|
onRemove && hasValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7875
10621
|
TextButton,
|
|
7876
10622
|
{
|
|
@@ -7903,7 +10649,7 @@ var CheckboxProperty = ({
|
|
|
7903
10649
|
...baseProps,
|
|
7904
10650
|
hasValue: true,
|
|
7905
10651
|
readOnly,
|
|
7906
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10652
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react14.Check, { size: 24 }),
|
|
7907
10653
|
input: () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7908
10654
|
Checkbox,
|
|
7909
10655
|
{
|
|
@@ -7919,7 +10665,7 @@ var CheckboxProperty = ({
|
|
|
7919
10665
|
};
|
|
7920
10666
|
|
|
7921
10667
|
// src/components/properties/DateProperty.tsx
|
|
7922
|
-
var
|
|
10668
|
+
var import_lucide_react15 = require("lucide-react");
|
|
7923
10669
|
var import_clsx38 = __toESM(require("clsx"));
|
|
7924
10670
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7925
10671
|
var DateProperty = ({
|
|
@@ -7937,7 +10683,7 @@ var DateProperty = ({
|
|
|
7937
10683
|
{
|
|
7938
10684
|
...baseProps,
|
|
7939
10685
|
hasValue,
|
|
7940
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10686
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react15.CalendarDays, { size: 24 }),
|
|
7941
10687
|
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7942
10688
|
Input,
|
|
7943
10689
|
{
|
|
@@ -7962,14 +10708,14 @@ var DateProperty = ({
|
|
|
7962
10708
|
};
|
|
7963
10709
|
|
|
7964
10710
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7965
|
-
var
|
|
10711
|
+
var import_lucide_react17 = require("lucide-react");
|
|
7966
10712
|
var import_clsx40 = __toESM(require("clsx"));
|
|
7967
10713
|
|
|
7968
10714
|
// src/components/user-action/MultiSelect.tsx
|
|
7969
|
-
var import_react30 = require("react");
|
|
7970
10715
|
var import_react31 = require("react");
|
|
10716
|
+
var import_react32 = require("react");
|
|
7971
10717
|
var import_clsx39 = __toESM(require("clsx"));
|
|
7972
|
-
var
|
|
10718
|
+
var import_lucide_react16 = require("lucide-react");
|
|
7973
10719
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7974
10720
|
var defaultMultiSelectTranslation = {
|
|
7975
10721
|
en: {
|
|
@@ -7997,7 +10743,7 @@ var MultiSelect = ({
|
|
|
7997
10743
|
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
7998
10744
|
const { result, search, setSearch } = useSearch({
|
|
7999
10745
|
list: options,
|
|
8000
|
-
searchMapping: (0,
|
|
10746
|
+
searchMapping: (0, import_react31.useCallback)((item) => item.searchTags, []),
|
|
8001
10747
|
...searchOptions
|
|
8002
10748
|
});
|
|
8003
10749
|
const selectedItems = options.filter((value) => value.selected);
|
|
@@ -8031,7 +10777,19 @@ var MultiSelect = ({
|
|
|
8031
10777
|
),
|
|
8032
10778
|
onClick: toggleOpen,
|
|
8033
10779
|
disabled,
|
|
8034
|
-
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10780
|
+
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10781
|
+
"div",
|
|
10782
|
+
{
|
|
10783
|
+
className: (0, import_clsx39.default)(
|
|
10784
|
+
"icon-btn-sm ",
|
|
10785
|
+
{
|
|
10786
|
+
"bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90": !disabled,
|
|
10787
|
+
"bg-disabled-background text-disabled-text": disabled
|
|
10788
|
+
}
|
|
10789
|
+
),
|
|
10790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react16.Plus, {})
|
|
10791
|
+
}
|
|
10792
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
8035
10793
|
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
|
|
8036
10794
|
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx39.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
|
|
8037
10795
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
@@ -8059,7 +10817,7 @@ var MultiSelect = ({
|
|
|
8059
10817
|
} : value));
|
|
8060
10818
|
};
|
|
8061
10819
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8062
|
-
|
|
10820
|
+
ListTile,
|
|
8063
10821
|
{
|
|
8064
10822
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8065
10823
|
Checkbox,
|
|
@@ -8070,7 +10828,7 @@ var MultiSelect = ({
|
|
|
8070
10828
|
disabled: option.disabled
|
|
8071
10829
|
}
|
|
8072
10830
|
),
|
|
8073
|
-
title:
|
|
10831
|
+
title: option.label,
|
|
8074
10832
|
onClick: update,
|
|
8075
10833
|
disabled: option.disabled
|
|
8076
10834
|
},
|
|
@@ -8124,8 +10882,8 @@ var MultiSelectUncontrolled = ({
|
|
|
8124
10882
|
onChange,
|
|
8125
10883
|
...props
|
|
8126
10884
|
}) => {
|
|
8127
|
-
const [usedOptions, setUsedOptions] = (0,
|
|
8128
|
-
(0,
|
|
10885
|
+
const [usedOptions, setUsedOptions] = (0, import_react32.useState)(options);
|
|
10886
|
+
(0, import_react32.useEffect)(() => {
|
|
8129
10887
|
setUsedOptions(options);
|
|
8130
10888
|
}, [options]);
|
|
8131
10889
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
@@ -8163,7 +10921,7 @@ var MultiSelectProperty = ({
|
|
|
8163
10921
|
readOnly,
|
|
8164
10922
|
softRequired,
|
|
8165
10923
|
hasValue,
|
|
8166
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
10924
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react17.List, { size: 24 }),
|
|
8167
10925
|
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8168
10926
|
MultiSelect,
|
|
8169
10927
|
{
|
|
@@ -8182,10 +10940,10 @@ var MultiSelectProperty = ({
|
|
|
8182
10940
|
return void 0;
|
|
8183
10941
|
}
|
|
8184
10942
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8185
|
-
|
|
10943
|
+
ListTile,
|
|
8186
10944
|
{
|
|
8187
|
-
prefix: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
8188
|
-
title:
|
|
10945
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react17.Plus, {}),
|
|
10946
|
+
title: `${translation("add")} ${search.trim()}`,
|
|
8189
10947
|
onClick: () => {
|
|
8190
10948
|
onAddNew(search);
|
|
8191
10949
|
close();
|
|
@@ -8208,7 +10966,7 @@ var MultiSelectProperty = ({
|
|
|
8208
10966
|
};
|
|
8209
10967
|
|
|
8210
10968
|
// src/components/properties/NumberProperty.tsx
|
|
8211
|
-
var
|
|
10969
|
+
var import_lucide_react18 = require("lucide-react");
|
|
8212
10970
|
var import_clsx41 = __toESM(require("clsx"));
|
|
8213
10971
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
8214
10972
|
var defaultNumberPropertyTranslation = {
|
|
@@ -8237,7 +10995,7 @@ var NumberProperty = ({
|
|
|
8237
10995
|
...baseProps,
|
|
8238
10996
|
onRemove,
|
|
8239
10997
|
hasValue,
|
|
8240
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10998
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react18.Binary, { size: 24 }),
|
|
8241
10999
|
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
8242
11000
|
"div",
|
|
8243
11001
|
{
|
|
@@ -8279,7 +11037,7 @@ var NumberProperty = ({
|
|
|
8279
11037
|
};
|
|
8280
11038
|
|
|
8281
11039
|
// src/components/properties/SelectProperty.tsx
|
|
8282
|
-
var
|
|
11040
|
+
var import_lucide_react19 = require("lucide-react");
|
|
8283
11041
|
var import_clsx42 = __toESM(require("clsx"));
|
|
8284
11042
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
8285
11043
|
var SingleSelectProperty = ({
|
|
@@ -8303,7 +11061,7 @@ var SingleSelectProperty = ({
|
|
|
8303
11061
|
readOnly,
|
|
8304
11062
|
softRequired,
|
|
8305
11063
|
hasValue,
|
|
8306
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11064
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react19.List, { size: 24 }),
|
|
8307
11065
|
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8308
11066
|
Select,
|
|
8309
11067
|
{
|
|
@@ -8322,10 +11080,10 @@ var SingleSelectProperty = ({
|
|
|
8322
11080
|
return void 0;
|
|
8323
11081
|
}
|
|
8324
11082
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8325
|
-
|
|
11083
|
+
ListTile,
|
|
8326
11084
|
{
|
|
8327
|
-
prefix: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
8328
|
-
title:
|
|
11085
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react19.Plus, {}),
|
|
11086
|
+
title: `${translation("add")} ${search.trim()}`,
|
|
8329
11087
|
onClick: () => {
|
|
8330
11088
|
onAddNew(search);
|
|
8331
11089
|
close();
|
|
@@ -8349,11 +11107,11 @@ var SingleSelectProperty = ({
|
|
|
8349
11107
|
};
|
|
8350
11108
|
|
|
8351
11109
|
// src/components/properties/TextProperty.tsx
|
|
8352
|
-
var
|
|
11110
|
+
var import_lucide_react20 = require("lucide-react");
|
|
8353
11111
|
var import_clsx44 = __toESM(require("clsx"));
|
|
8354
11112
|
|
|
8355
11113
|
// src/components/user-action/Textarea.tsx
|
|
8356
|
-
var
|
|
11114
|
+
var import_react33 = require("react");
|
|
8357
11115
|
var import_clsx43 = __toESM(require("clsx"));
|
|
8358
11116
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
8359
11117
|
var Textarea = ({
|
|
@@ -8372,7 +11130,7 @@ var Textarea = ({
|
|
|
8372
11130
|
className,
|
|
8373
11131
|
...props
|
|
8374
11132
|
}) => {
|
|
8375
|
-
const [hasFocus, setHasFocus] = (0,
|
|
11133
|
+
const [hasFocus, setHasFocus] = (0, import_react33.useState)(false);
|
|
8376
11134
|
const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
|
|
8377
11135
|
const onEditCompletedWrapper = (text) => {
|
|
8378
11136
|
onEditCompleted(text);
|
|
@@ -8442,8 +11200,8 @@ var TextareaUncontrolled = ({
|
|
|
8442
11200
|
onChangeText = noop,
|
|
8443
11201
|
...props
|
|
8444
11202
|
}) => {
|
|
8445
|
-
const [text, setText] = (0,
|
|
8446
|
-
(0,
|
|
11203
|
+
const [text, setText] = (0, import_react33.useState)(value);
|
|
11204
|
+
(0, import_react33.useEffect)(() => {
|
|
8447
11205
|
setText(value);
|
|
8448
11206
|
}, [value]);
|
|
8449
11207
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
@@ -8486,7 +11244,7 @@ var TextProperty = ({
|
|
|
8486
11244
|
...baseProps,
|
|
8487
11245
|
onRemove,
|
|
8488
11246
|
hasValue,
|
|
8489
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
11247
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react20.Text, { size: 24 }),
|
|
8490
11248
|
input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8491
11249
|
Textarea,
|
|
8492
11250
|
{
|
|
@@ -8540,14 +11298,14 @@ var TableFilters = {
|
|
|
8540
11298
|
};
|
|
8541
11299
|
|
|
8542
11300
|
// src/components/table/Table.tsx
|
|
8543
|
-
var
|
|
11301
|
+
var import_react36 = require("react");
|
|
8544
11302
|
var import_clsx48 = __toESM(require("clsx"));
|
|
8545
11303
|
var import_react_table = require("@tanstack/react-table");
|
|
8546
11304
|
var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
|
|
8547
11305
|
|
|
8548
11306
|
// src/components/table/TableFilterButton.tsx
|
|
8549
|
-
var
|
|
8550
|
-
var
|
|
11307
|
+
var import_lucide_react21 = require("lucide-react");
|
|
11308
|
+
var import_react34 = require("react");
|
|
8551
11309
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
8552
11310
|
var defaultTableFilterTranslation = {
|
|
8553
11311
|
en: {
|
|
@@ -8573,16 +11331,16 @@ var TableFilterButton = ({
|
|
|
8573
11331
|
}) => {
|
|
8574
11332
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
8575
11333
|
const columnFilterValue = column.getFilterValue();
|
|
8576
|
-
const [filterValue, setFilterValue] = (0,
|
|
11334
|
+
const [filterValue, setFilterValue] = (0, import_react34.useState)(columnFilterValue);
|
|
8577
11335
|
const hasFilter = !!filterValue;
|
|
8578
|
-
(0,
|
|
11336
|
+
(0, import_react34.useEffect)(() => {
|
|
8579
11337
|
setFilterValue(columnFilterValue);
|
|
8580
11338
|
}, [columnFilterValue]);
|
|
8581
11339
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8582
11340
|
Menu,
|
|
8583
11341
|
{
|
|
8584
11342
|
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ref, className: "relative", children: [
|
|
8585
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
11343
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react21.FilterIcon, {}) }),
|
|
8586
11344
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8587
11345
|
"div",
|
|
8588
11346
|
{
|
|
@@ -8676,7 +11434,7 @@ var TableFilterButton = ({
|
|
|
8676
11434
|
};
|
|
8677
11435
|
|
|
8678
11436
|
// src/components/table/TableSortButton.tsx
|
|
8679
|
-
var
|
|
11437
|
+
var import_lucide_react22 = require("lucide-react");
|
|
8680
11438
|
var import_clsx46 = __toESM(require("clsx"));
|
|
8681
11439
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
8682
11440
|
var TableSortButton = ({
|
|
@@ -8686,13 +11444,13 @@ var TableSortButton = ({
|
|
|
8686
11444
|
className,
|
|
8687
11445
|
...buttonProps
|
|
8688
11446
|
}) => {
|
|
8689
|
-
let icon = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11447
|
+
let icon = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react22.ChevronsUpDown, { className: "w-full h-full" });
|
|
8690
11448
|
if (sortDirection) {
|
|
8691
11449
|
let usedSortDirection = sortDirection;
|
|
8692
11450
|
if (invert) {
|
|
8693
11451
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
8694
11452
|
}
|
|
8695
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11453
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react22.ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react22.ChevronDown, { className: "w-full h-full" });
|
|
8696
11454
|
}
|
|
8697
11455
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
8698
11456
|
IconButton,
|
|
@@ -8707,9 +11465,9 @@ var TableSortButton = ({
|
|
|
8707
11465
|
};
|
|
8708
11466
|
|
|
8709
11467
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
8710
|
-
var
|
|
11468
|
+
var import_react35 = require("react");
|
|
8711
11469
|
var useResizeCallbackWrapper = (callback) => {
|
|
8712
|
-
(0,
|
|
11470
|
+
(0, import_react35.useEffect)(() => {
|
|
8713
11471
|
window.addEventListener("resize", callback);
|
|
8714
11472
|
return () => {
|
|
8715
11473
|
window.removeEventListener("resize", callback);
|
|
@@ -8741,22 +11499,22 @@ var Table = ({
|
|
|
8741
11499
|
columns,
|
|
8742
11500
|
...tableOptions
|
|
8743
11501
|
}) => {
|
|
8744
|
-
const ref = (0,
|
|
8745
|
-
const tableRef = (0,
|
|
8746
|
-
const [columnSizing, setColumnSizing] = (0,
|
|
11502
|
+
const ref = (0, import_react36.useRef)(null);
|
|
11503
|
+
const tableRef = (0, import_react36.useRef)(null);
|
|
11504
|
+
const [columnSizing, setColumnSizing] = (0, import_react36.useState)(columns.reduce((previousValue, currentValue) => {
|
|
8747
11505
|
return {
|
|
8748
11506
|
...previousValue,
|
|
8749
11507
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
8750
11508
|
};
|
|
8751
11509
|
}, {}));
|
|
8752
|
-
const [columnSizingInfo, setColumnSizingInfo] = (0,
|
|
8753
|
-
const [pagination, setPagination] = (0,
|
|
11510
|
+
const [columnSizingInfo, setColumnSizingInfo] = (0, import_react36.useState)();
|
|
11511
|
+
const [pagination, setPagination] = (0, import_react36.useState)({
|
|
8754
11512
|
pageSize: 10,
|
|
8755
11513
|
pageIndex: 0,
|
|
8756
11514
|
...initialState?.pagination
|
|
8757
11515
|
});
|
|
8758
|
-
const [columnFilters, setColumnFilters] = (0,
|
|
8759
|
-
const computedColumnMinWidths = (0,
|
|
11516
|
+
const [columnFilters, setColumnFilters] = (0, import_react36.useState)(initialState?.columnFilters);
|
|
11517
|
+
const computedColumnMinWidths = (0, import_react36.useMemo)(() => {
|
|
8760
11518
|
return columns.reduce((previousValue, column) => {
|
|
8761
11519
|
return {
|
|
8762
11520
|
...previousValue,
|
|
@@ -8765,7 +11523,7 @@ var Table = ({
|
|
|
8765
11523
|
};
|
|
8766
11524
|
}, {});
|
|
8767
11525
|
}, [columns, defaultColumn]);
|
|
8768
|
-
const computedColumnMaxWidths = (0,
|
|
11526
|
+
const computedColumnMaxWidths = (0, import_react36.useMemo)(() => {
|
|
8769
11527
|
return columns.reduce((previousValue, column) => {
|
|
8770
11528
|
return {
|
|
8771
11529
|
...previousValue,
|
|
@@ -8773,12 +11531,12 @@ var Table = ({
|
|
|
8773
11531
|
};
|
|
8774
11532
|
}, {});
|
|
8775
11533
|
}, [columns, defaultColumn]);
|
|
8776
|
-
const tableMinWidth = (0,
|
|
11534
|
+
const tableMinWidth = (0, import_react36.useMemo)(() => {
|
|
8777
11535
|
return columns.reduce((sum, column) => {
|
|
8778
11536
|
return sum + computedColumnMinWidths[column.id];
|
|
8779
11537
|
}, 0);
|
|
8780
11538
|
}, [columns, computedColumnMinWidths]);
|
|
8781
|
-
const updateColumnSizes = (0,
|
|
11539
|
+
const updateColumnSizes = (0, import_react36.useMemo)(() => {
|
|
8782
11540
|
return (previous) => {
|
|
8783
11541
|
const updateSizing = {
|
|
8784
11542
|
...columnSizing,
|
|
@@ -8895,18 +11653,18 @@ var Table = ({
|
|
|
8895
11653
|
columnResizeMode: "onChange",
|
|
8896
11654
|
...tableOptions
|
|
8897
11655
|
});
|
|
8898
|
-
const [hasInitializedSizing, setHasInitializedSizing] = (0,
|
|
8899
|
-
(0,
|
|
11656
|
+
const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react36.useState)(false);
|
|
11657
|
+
(0, import_react36.useEffect)(() => {
|
|
8900
11658
|
if (!hasInitializedSizing && ref.current) {
|
|
8901
11659
|
setHasInitializedSizing(true);
|
|
8902
11660
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
8903
11661
|
}
|
|
8904
11662
|
}, [columnSizing, hasInitializedSizing]);
|
|
8905
|
-
useResizeCallbackWrapper((0,
|
|
11663
|
+
useResizeCallbackWrapper((0, import_react36.useCallback)(() => {
|
|
8906
11664
|
table.setColumnSizing(updateColumnSizes);
|
|
8907
11665
|
}, [updateColumnSizes]));
|
|
8908
11666
|
const pageCount = table.getPageCount();
|
|
8909
|
-
(0,
|
|
11667
|
+
(0, import_react36.useEffect)(() => {
|
|
8910
11668
|
const totalPages = pageCount;
|
|
8911
11669
|
if (totalPages === 0) {
|
|
8912
11670
|
if (pagination.pageIndex !== 0) {
|
|
@@ -8922,7 +11680,7 @@ var Table = ({
|
|
|
8922
11680
|
}));
|
|
8923
11681
|
}
|
|
8924
11682
|
}, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
|
|
8925
|
-
const columnSizeVars = (0,
|
|
11683
|
+
const columnSizeVars = (0, import_react36.useMemo)(() => {
|
|
8926
11684
|
const headers = table.getFlatHeaders();
|
|
8927
11685
|
const colSizes = {};
|
|
8928
11686
|
for (let i = 0; i < headers.length; i++) {
|
|
@@ -9037,8 +11795,8 @@ var Table = ({
|
|
|
9037
11795
|
] });
|
|
9038
11796
|
};
|
|
9039
11797
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
9040
|
-
const [usedDate, setUsedData] = (0,
|
|
9041
|
-
(0,
|
|
11798
|
+
const [usedDate, setUsedData] = (0, import_react36.useState)(data);
|
|
11799
|
+
(0, import_react36.useEffect)(() => {
|
|
9042
11800
|
setUsedData(data);
|
|
9043
11801
|
}, [data]);
|
|
9044
11802
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -9060,7 +11818,7 @@ var TableWithSelection = ({
|
|
|
9060
11818
|
meta,
|
|
9061
11819
|
...props
|
|
9062
11820
|
}) => {
|
|
9063
|
-
const columnsWithSelection = (0,
|
|
11821
|
+
const columnsWithSelection = (0, import_react36.useMemo)(() => {
|
|
9064
11822
|
return [
|
|
9065
11823
|
{
|
|
9066
11824
|
id: selectionRowId,
|
|
@@ -9130,7 +11888,7 @@ var TableWithSelection = ({
|
|
|
9130
11888
|
};
|
|
9131
11889
|
|
|
9132
11890
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
9133
|
-
var
|
|
11891
|
+
var import_react37 = require("react");
|
|
9134
11892
|
var import_clsx49 = require("clsx");
|
|
9135
11893
|
|
|
9136
11894
|
// src/util/writeToClipboard.ts
|
|
@@ -9139,7 +11897,7 @@ var writeToClipboard = (text) => {
|
|
|
9139
11897
|
};
|
|
9140
11898
|
|
|
9141
11899
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
9142
|
-
var
|
|
11900
|
+
var import_lucide_react23 = require("lucide-react");
|
|
9143
11901
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
9144
11902
|
var CopyToClipboardWrapper = ({
|
|
9145
11903
|
children,
|
|
@@ -9150,8 +11908,8 @@ var CopyToClipboardWrapper = ({
|
|
|
9150
11908
|
zIndex = 10
|
|
9151
11909
|
}) => {
|
|
9152
11910
|
const translation = useTranslation([formTranslation]);
|
|
9153
|
-
const [isShowingIndication, setIsShowingIndication] = (0,
|
|
9154
|
-
const [isShowingConfirmation, setIsShowingConfirmation] = (0,
|
|
11911
|
+
const [isShowingIndication, setIsShowingIndication] = (0, import_react37.useState)(false);
|
|
11912
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react37.useState)(false);
|
|
9155
11913
|
const positionClasses = {
|
|
9156
11914
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
9157
11915
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -9205,11 +11963,11 @@ var CopyToClipboardWrapper = ({
|
|
|
9205
11963
|
},
|
|
9206
11964
|
children: [
|
|
9207
11965
|
isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1", children: [
|
|
9208
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
11966
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react23.CheckIcon, { size: 16, className: "text-positive" }),
|
|
9209
11967
|
translation("copied")
|
|
9210
11968
|
] }),
|
|
9211
11969
|
isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1 text-description", children: [
|
|
9212
|
-
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
11970
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react23.Copy, { size: 16 }),
|
|
9213
11971
|
translation("clickToCopy")
|
|
9214
11972
|
] }),
|
|
9215
11973
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
@@ -9293,7 +12051,7 @@ var DateTimePicker = ({
|
|
|
9293
12051
|
};
|
|
9294
12052
|
|
|
9295
12053
|
// src/components/user-action/ScrollPicker.tsx
|
|
9296
|
-
var
|
|
12054
|
+
var import_react38 = require("react");
|
|
9297
12055
|
var import_clsx51 = __toESM(require("clsx"));
|
|
9298
12056
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
9299
12057
|
var up = 1;
|
|
@@ -9314,7 +12072,7 @@ var ScrollPicker = ({
|
|
|
9314
12072
|
transition,
|
|
9315
12073
|
items,
|
|
9316
12074
|
lastTimeStamp
|
|
9317
|
-
}, setAnimation] = (0,
|
|
12075
|
+
}, setAnimation] = (0, import_react38.useState)({
|
|
9318
12076
|
targetIndex: selectedIndex,
|
|
9319
12077
|
currentIndex: disabled ? selectedIndex : 0,
|
|
9320
12078
|
velocity: 0,
|
|
@@ -9330,7 +12088,7 @@ var ScrollPicker = ({
|
|
|
9330
12088
|
const itemHeight = 40;
|
|
9331
12089
|
const distance = 8;
|
|
9332
12090
|
const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
|
|
9333
|
-
const getDirection = (0,
|
|
12091
|
+
const getDirection = (0, import_react38.useCallback)((targetIndex, currentIndex2, transition2, length) => {
|
|
9334
12092
|
if (targetIndex === currentIndex2) {
|
|
9335
12093
|
return transition2 > 0 ? up : down;
|
|
9336
12094
|
}
|
|
@@ -9340,7 +12098,7 @@ var ScrollPicker = ({
|
|
|
9340
12098
|
}
|
|
9341
12099
|
return distanceForward >= length / 2 ? down : up;
|
|
9342
12100
|
}, []);
|
|
9343
|
-
const animate = (0,
|
|
12101
|
+
const animate = (0, import_react38.useCallback)((timestamp, startTime) => {
|
|
9344
12102
|
setAnimation((prevState) => {
|
|
9345
12103
|
const {
|
|
9346
12104
|
targetIndex,
|
|
@@ -9413,7 +12171,7 @@ var ScrollPicker = ({
|
|
|
9413
12171
|
};
|
|
9414
12172
|
});
|
|
9415
12173
|
}, [disabled, getDirection, onChange]);
|
|
9416
|
-
(0,
|
|
12174
|
+
(0, import_react38.useEffect)(() => {
|
|
9417
12175
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
9418
12176
|
});
|
|
9419
12177
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -9448,7 +12206,7 @@ var ScrollPicker = ({
|
|
|
9448
12206
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
9449
12207
|
"div",
|
|
9450
12208
|
{
|
|
9451
|
-
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/
|
|
12209
|
+
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/50 border-y-2 border-x-0 ",
|
|
9452
12210
|
style: { height: `${itemHeight}px` }
|
|
9453
12211
|
}
|
|
9454
12212
|
),
|
|
@@ -9490,8 +12248,8 @@ var ScrollPicker = ({
|
|
|
9490
12248
|
};
|
|
9491
12249
|
|
|
9492
12250
|
// src/components/user-action/ToggleableInput.tsx
|
|
9493
|
-
var
|
|
9494
|
-
var
|
|
12251
|
+
var import_react39 = require("react");
|
|
12252
|
+
var import_lucide_react24 = require("lucide-react");
|
|
9495
12253
|
var import_clsx52 = __toESM(require("clsx"));
|
|
9496
12254
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
9497
12255
|
var ToggleableInput = ({
|
|
@@ -9508,14 +12266,14 @@ var ToggleableInput = ({
|
|
|
9508
12266
|
saveDelayOptions,
|
|
9509
12267
|
...restProps
|
|
9510
12268
|
}) => {
|
|
9511
|
-
const [isEditing, setIsEditing] = (0,
|
|
12269
|
+
const [isEditing, setIsEditing] = (0, import_react39.useState)(initialState !== "display");
|
|
9512
12270
|
const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
|
|
9513
|
-
const ref = (0,
|
|
12271
|
+
const ref = (0, import_react39.useRef)(null);
|
|
9514
12272
|
const onEditCompletedWrapper = (text) => {
|
|
9515
12273
|
onEditCompleted(text);
|
|
9516
12274
|
clearTimer();
|
|
9517
12275
|
};
|
|
9518
|
-
(0,
|
|
12276
|
+
(0, import_react39.useEffect)(() => {
|
|
9519
12277
|
if (isEditing) {
|
|
9520
12278
|
ref.current?.focus();
|
|
9521
12279
|
}
|
|
@@ -9562,7 +12320,7 @@ var ToggleableInput = ({
|
|
|
9562
12320
|
}
|
|
9563
12321
|
) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx52.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
|
|
9564
12322
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9565
|
-
|
|
12323
|
+
import_lucide_react24.Pencil,
|
|
9566
12324
|
{
|
|
9567
12325
|
className: (0, import_clsx52.default)(`cursor-pointer`, { "text-transparent": isEditing }),
|
|
9568
12326
|
size,
|
|
@@ -9580,8 +12338,8 @@ var ToggleableInputUncontrolled = ({
|
|
|
9580
12338
|
onChangeText = noop,
|
|
9581
12339
|
...restProps
|
|
9582
12340
|
}) => {
|
|
9583
|
-
const [value, setValue] = (0,
|
|
9584
|
-
(0,
|
|
12341
|
+
const [value, setValue] = (0, import_react39.useState)(initialValue);
|
|
12342
|
+
(0, import_react39.useEffect)(() => {
|
|
9585
12343
|
setValue(initialValue);
|
|
9586
12344
|
}, [initialValue]);
|
|
9587
12345
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
@@ -9597,10 +12355,36 @@ var ToggleableInputUncontrolled = ({
|
|
|
9597
12355
|
);
|
|
9598
12356
|
};
|
|
9599
12357
|
|
|
12358
|
+
// src/hooks/useLogOnce.ts
|
|
12359
|
+
var import_react40 = require("react");
|
|
12360
|
+
var useLogOnce = ({
|
|
12361
|
+
message,
|
|
12362
|
+
condition,
|
|
12363
|
+
type = "warning"
|
|
12364
|
+
}) => {
|
|
12365
|
+
const [hasLogged, setHasLogged] = (0, import_react40.useState)(false);
|
|
12366
|
+
(0, import_react40.useEffect)(() => {
|
|
12367
|
+
if (!hasLogged && condition) {
|
|
12368
|
+
switch (type) {
|
|
12369
|
+
case "info":
|
|
12370
|
+
console.info(message);
|
|
12371
|
+
break;
|
|
12372
|
+
case "error":
|
|
12373
|
+
console.error(message);
|
|
12374
|
+
break;
|
|
12375
|
+
case "warning":
|
|
12376
|
+
console.warn(message);
|
|
12377
|
+
break;
|
|
12378
|
+
}
|
|
12379
|
+
setHasLogged(true);
|
|
12380
|
+
}
|
|
12381
|
+
}, [condition]);
|
|
12382
|
+
};
|
|
12383
|
+
|
|
9600
12384
|
// src/hooks/useRerender.ts
|
|
9601
|
-
var
|
|
12385
|
+
var import_react41 = require("react");
|
|
9602
12386
|
var useRerender = () => {
|
|
9603
|
-
return (0,
|
|
12387
|
+
return (0, import_react41.useReducer)(() => ({}), {})[1];
|
|
9604
12388
|
};
|
|
9605
12389
|
|
|
9606
12390
|
// src/util/builder.ts
|
|
@@ -9693,6 +12477,7 @@ var filterNews = (localizedNews, requiredKeys) => {
|
|
|
9693
12477
|
LanguageModal,
|
|
9694
12478
|
LanguageProvider,
|
|
9695
12479
|
LanguageUtil,
|
|
12480
|
+
ListTile,
|
|
9696
12481
|
LoadingAndErrorComponent,
|
|
9697
12482
|
LoadingAnimation,
|
|
9698
12483
|
LoadingButton,
|
|
@@ -9722,7 +12507,6 @@ var filterNews = (localizedNews, requiredKeys) => {
|
|
|
9722
12507
|
SearchBar,
|
|
9723
12508
|
SearchableList,
|
|
9724
12509
|
Select,
|
|
9725
|
-
SelectTile,
|
|
9726
12510
|
SelectUncontrolled,
|
|
9727
12511
|
SessionStorageService,
|
|
9728
12512
|
SimpleSearch,
|