@takumi-rs/helpers 0.22.1 → 0.24.0

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/dist/jsx/jsx.d.ts CHANGED
@@ -1,473 +1,6 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
1
  import { ReactNode } from 'react';
2
+ import { N as Node } from '../types-C93nbSJX.js';
4
3
 
5
- /**
6
- * Defines how flex items are aligned along the cross axis.
7
- *
8
- * This enum determines how flex items are aligned within the flex container
9
- * along the cross axis (perpendicular to the main axis).
10
- */
11
- export type AlignItems = "start" | "end" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
12
- /**
13
- * Represents a color in various formats with support for RGB, RGBA, and integer RGB values.
14
- *
15
- * The enum supports three color formats:
16
- * - `Rgb`: RGB color with 8-bit components (r, g, b)
17
- * - `Rgba`: RGBA color with 8-bit RGB components and 32-bit float alpha (r, g, b, a)
18
- * - `RgbInt`: Single 32-bit integer containing RGB values
19
- */
20
- export type Color = [
21
- number,
22
- number,
23
- number
24
- ] | [
25
- number,
26
- number,
27
- number,
28
- number
29
- ] | number;
30
- /**
31
- * Represents a single color stop in a gradient.
32
- */
33
- export type GradientStop = {
34
- /**
35
- * The color of the gradient stop
36
- */
37
- color: Color;
38
- /**
39
- * Position in the range [0.0, 1.0]
40
- */
41
- position: number;
42
- };
43
- /**
44
- * Represents a gradient with color steps and an angle for directional gradients.
45
- */
46
- export type Gradient = {
47
- /**
48
- * The color stops that make up the gradient
49
- */
50
- stops: Array<GradientStop>;
51
- /**
52
- * The angle in degrees for the gradient direction (0-360)
53
- */
54
- angle: number;
55
- };
56
- /**
57
- * Represents a color input that can be either a color or a gradient.
58
- */
59
- export type ColorInput = Color | Gradient;
60
- /**
61
- * Represents a value that can be a specific length, percentage, or automatic.
62
- *
63
- * This corresponds to CSS values that can be specified as pixels, percentages,
64
- * or the 'auto' keyword for automatic sizing.
65
- */
66
- export type LengthUnit = "auto" | "min-content" | "max-content" | {
67
- "percentage": number;
68
- } | {
69
- "rem": number;
70
- } | {
71
- "em": number;
72
- } | {
73
- "vh": number;
74
- } | {
75
- "vw": number;
76
- } | number;
77
- /**
78
- * Defines a box shadow for an element.
79
- *
80
- * This struct contains the properties for a box shadow, including color,
81
- * offset, blur radius, spread radius, and inset flag.
82
- */
83
- export type BoxShadow = {
84
- /**
85
- * Color of the box shadow
86
- */
87
- color: ColorInput;
88
- /**
89
- * Horizontal offset of the box shadow
90
- */
91
- offset_x: LengthUnit;
92
- /**
93
- * Vertical offset of the box shadow
94
- */
95
- offset_y: LengthUnit;
96
- /**
97
- * Blur radius of the box shadow (must be non-negative)
98
- */
99
- blur_radius: LengthUnit;
100
- /**
101
- * Spread radius of the box shadow (can be negative)
102
- */
103
- spread_radius: LengthUnit;
104
- /**
105
- * Whether the shadow is inset (inside the element) or outset (outside the element)
106
- */
107
- inset: boolean;
108
- };
109
- /**
110
- * Defines a box shadow for an element.
111
- *
112
- * This enum allows for flexible specification of box shadows, including
113
- * a single shadow or multiple shadows.
114
- */
115
- export type BoxShadowInput = BoxShadow | Array<BoxShadow>;
116
- /**
117
- * This enum determines the layout algorithm used for the children of a node.
118
- */
119
- export type Display = "flex" | "grid";
120
- /**
121
- * Defines the direction of flex items within a flex container.
122
- *
123
- * This enum determines how flex items are laid out along the main axis.
124
- */
125
- export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
126
- /**
127
- * Defines how flex items should wrap.
128
- *
129
- * This enum determines how flex items should wrap within the flex container.
130
- */
131
- export type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
132
- /**
133
- * Represents a font family for text rendering.
134
- * Use only the family name (no style suffixes like "Bold", "Italic", "Regular").
135
- * Multi-word names are allowed (e.g., "Noto Sans") and should be provided as-is without quotes.
136
- */
137
- export type FontFamily = "sans-serif" | "serif" | "monospace" | "cursive" | "fantasy" | string;
138
- /**
139
- * Represents font weight as a numeric value.
140
- *
141
- * This wraps a u16 value that corresponds to CSS font-weight values.
142
- * Common values include 100 (thin), 200 (extra light), 300 (light),
143
- * 400 (normal), 500 (medium), 600 (semi bold), 700 (bold),
144
- * 800 (extra bold), 900 (black).
145
- */
146
- export type FontWeight = number;
147
- /**
148
- * Represents spacing between flex items.
149
- *
150
- * Can be either a single value applied to both axes, or separate values
151
- * for horizontal and vertical spacing.
152
- */
153
- export type Gap = LengthUnit | [
154
- LengthUnit,
155
- LengthUnit
156
- ];
157
- /**
158
- * Represents the grid auto flow with serde support
159
- */
160
- export type GridAutoFlow = "row" | "column" | "row-dense" | "column-dense";
161
- /**
162
- * Represents a grid placement with serde support
163
- */
164
- export type GridPlacement = "auto" | {
165
- "span": number;
166
- } | number | string;
167
- /**
168
- * Represents a grid line placement with serde support
169
- */
170
- export type GridLine = {
171
- /**
172
- * The start line placement
173
- */
174
- start: GridPlacement | null;
175
- /**
176
- * The end line placement
177
- */
178
- end: GridPlacement | null;
179
- };
180
- /**
181
- * Represents a grid track sizing function with serde support
182
- */
183
- export type GridTrackSize = {
184
- "fr": number;
185
- } | LengthUnit;
186
- /**
187
- * Defines how images should be scaled when rendered.
188
- */
189
- export type ImageScalingAlgorithm = "auto" | "smooth" | "pixelated";
190
- /**
191
- * Defines how flex items are aligned along the main axis.
192
- *
193
- * This enum determines how space is distributed between and around flex items
194
- * along the main axis of the flex container.
195
- */
196
- export type JustifyContent = "start" | "end" | "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-evenly" | "space-around";
197
- /**
198
- * Defines how an image should be resized to fit its container.
199
- *
200
- * Similar to CSS object-fit property.
201
- */
202
- export type ObjectFit = "fill" | "contain" | "cover" | "scale-down" | "none";
203
- type Position$1 = "relative" | "absolute";
204
- /**
205
- * Represents values that can be applied to all sides of an element.
206
- *
207
- * This enum allows for flexible specification of values like padding, margin,
208
- * or border sizes using either a single value for all sides, separate values
209
- * for vertical/horizontal axes, or individual values for each side.
210
- */
211
- export type SidesValue<T> = T | [
212
- T,
213
- T
214
- ] | [
215
- T,
216
- T,
217
- T,
218
- T
219
- ];
220
- /**
221
- * Text alignment options for text rendering.
222
- *
223
- * Corresponds to CSS text-align property values.
224
- */
225
- export type TextAlign = "left" | "right" | "center" | "justify" | "start" | "end";
226
- /**
227
- * Defines how text should be overflowed.
228
- *
229
- * This enum determines how text should be handled when it exceeds the container width.
230
- */
231
- export type TextOverflow = "ellipsis" | "clip";
232
- /**
233
- * Represents a grid track repetition pattern
234
- */
235
- export type GridTrackRepetition = "auto-fill" | "auto-fit" | number;
236
- /**
237
- * Represents a track sizing function
238
- */
239
- export type TrackSizingFunction = {
240
- "single": GridTrackSize;
241
- } | {
242
- "repeat": [
243
- GridTrackRepetition,
244
- Array<GridTrackSize>
245
- ];
246
- };
247
- /**
248
- * Main styling structure that contains all layout and visual properties.
249
- *
250
- * This structure combines both layout properties (like width, height, padding)
251
- * and inheritable properties (like font settings, colors) that can be passed
252
- * down to child elements.
253
- */
254
- export type Style = {
255
- /**
256
- * Display algorithm to use for the element
257
- */
258
- display: Display;
259
- /**
260
- * Width of the element
261
- */
262
- width: LengthUnit;
263
- /**
264
- * Height of the element
265
- */
266
- height: LengthUnit;
267
- /**
268
- * Max width of the element
269
- */
270
- max_width: LengthUnit;
271
- /**
272
- * Max height of the element
273
- */
274
- max_height: LengthUnit;
275
- /**
276
- * Min width of the element
277
- */
278
- min_width: LengthUnit;
279
- /**
280
- * Min height of the element
281
- */
282
- min_height: LengthUnit;
283
- /**
284
- * Aspect ratio of the element (width/height)
285
- */
286
- aspect_ratio?: number;
287
- /**
288
- * Internal spacing around the element's content (top, right, bottom, left)
289
- */
290
- padding: SidesValue<LengthUnit>;
291
- /**
292
- * External spacing around the element (top, right, bottom, left)
293
- */
294
- margin: SidesValue<LengthUnit>;
295
- /**
296
- * Positioning offsets (top, right, bottom, left) from the element's normal position
297
- */
298
- inset: SidesValue<LengthUnit>;
299
- /**
300
- * Direction of flex layout (row or column)
301
- */
302
- flex_direction: FlexDirection;
303
- /**
304
- * How a single grid item is aligned along the inline (row) axis, overriding the container's justify-items value
305
- */
306
- justify_self?: AlignItems;
307
- /**
308
- * How items are aligned along the main axis
309
- */
310
- justify_content?: JustifyContent;
311
- /**
312
- * How lines are aligned within the flex container when there's extra space in the cross axis
313
- */
314
- align_content?: JustifyContent;
315
- /**
316
- * How grid items are aligned along the inline (row) axis within their grid areas
317
- */
318
- justify_items?: AlignItems;
319
- /**
320
- * How items are aligned along the cross axis
321
- */
322
- align_items?: AlignItems;
323
- /**
324
- * How a single item is aligned along the cross axis, overriding the container's align-items value
325
- */
326
- align_self?: AlignItems;
327
- /**
328
- * How flex items should wrap
329
- */
330
- flex_wrap: FlexWrap;
331
- /**
332
- * The initial main size of the flex item before growing or shrinking
333
- */
334
- flex_basis: LengthUnit;
335
- /**
336
- * Positioning method (relative, absolute, etc.)
337
- */
338
- position: Position$1;
339
- /**
340
- * Spacing between rows and columns in flex or grid layouts
341
- */
342
- gap: Gap;
343
- /**
344
- * How much the flex item should grow relative to other flex items when positive free space is distributed
345
- */
346
- flex_grow: number;
347
- /**
348
- * How much the flex item should shrink relative to other flex items when negative free space is distributed
349
- */
350
- flex_shrink: number;
351
- /**
352
- * Width of the element's border on each side (top, right, bottom, left)
353
- */
354
- border_width: SidesValue<LengthUnit>;
355
- /**
356
- * How images should be fitted within their container
357
- */
358
- object_fit: ObjectFit;
359
- /**
360
- * Background gradient(s)
361
- */
362
- background_image?: Gradient;
363
- /**
364
- * Background color for the element
365
- */
366
- background_color?: Color;
367
- /**
368
- * Box shadow effect for the element
369
- */
370
- box_shadow?: BoxShadowInput;
371
- /**
372
- * Controls the size of implicitly-created grid columns
373
- */
374
- grid_auto_columns?: Array<GridTrackSize>;
375
- /**
376
- * Controls the size of implicitly-created grid rows
377
- */
378
- grid_auto_rows?: Array<GridTrackSize>;
379
- /**
380
- * Controls how auto-placed items are inserted in the grid
381
- */
382
- grid_auto_flow?: GridAutoFlow;
383
- /**
384
- * Specifies a grid item's size and location within the grid column
385
- */
386
- grid_column?: GridLine;
387
- /**
388
- * Specifies a grid item's size and location within the grid row
389
- */
390
- grid_row?: GridLine;
391
- /**
392
- * Defines the line names and track sizing functions of the grid columns
393
- */
394
- grid_template_columns?: Array<TrackSizingFunction>;
395
- /**
396
- * Defines the line names and track sizing functions of the grid rows
397
- */
398
- grid_template_rows?: Array<TrackSizingFunction>;
399
- /**
400
- * How text should be overflowed
401
- */
402
- text_overflow?: TextOverflow;
403
- /**
404
- * Color of the element's border
405
- */
406
- border_color?: ColorInput;
407
- /**
408
- * Text color for child text elements
409
- */
410
- color?: ColorInput;
411
- /**
412
- * Font size in pixels for text rendering
413
- */
414
- font_size?: LengthUnit;
415
- /**
416
- * Font family name for text rendering
417
- */
418
- font_family?: FontFamily;
419
- /**
420
- * Line height multiplier for text spacing
421
- */
422
- line_height?: LengthUnit;
423
- /**
424
- * Font weight for text rendering
425
- */
426
- font_weight?: FontWeight;
427
- /**
428
- * Maximum number of lines for text before truncation
429
- */
430
- line_clamp?: number;
431
- /**
432
- * Corner radius for rounded borders
433
- */
434
- border_radius?: SidesValue<LengthUnit>;
435
- /**
436
- * Text alignment within the element
437
- */
438
- text_align?: TextAlign;
439
- /**
440
- * Additional spacing between characters in text
441
- * Positive values increase spacing, negative values decrease spacing
442
- */
443
- letter_spacing?: LengthUnit;
444
- /**
445
- * Controls how images are scaled when rendered
446
- * This property determines the algorithm used for image scaling
447
- */
448
- image_rendering?: ImageScalingAlgorithm;
449
- };
450
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
451
- [key: string]: JsonValue;
452
- };
453
- export type AnyNode = {
454
- type: string;
455
- [key: string]: JsonValue;
456
- };
457
- export type PartialStyle = Partial<Style>;
458
- type Node$1 = ContainerNode | TextNode | ImageNode | AnyNode;
459
- export type ContainerNode = PartialStyle & {
460
- type: "container";
461
- children?: Node$1[];
462
- };
463
- export type TextNode = PartialStyle & {
464
- type: "text";
465
- text: string;
466
- };
467
- export type ImageNode = PartialStyle & {
468
- type: "image";
469
- src: string;
470
- };
471
- export declare function fromJsx(element: ReactNode): Promise<Node$1[]>;
4
+ declare function fromJsx(element: ReactNode): Promise<Node[]>;
472
5
 
473
- export {};
6
+ export { fromJsx };
package/dist/jsx/jsx.js CHANGED
@@ -1,13 +1 @@
1
- var RX=Object.create;var{getPrototypeOf:UX,defineProperty:L$,getOwnPropertyNames:wX}=Object;var xX=Object.prototype.hasOwnProperty;var KX=(X,Z,E)=>{E=X!=null?RX(UX(X)):{};let Y=Z||!X||!X.__esModule?L$(E,"default",{value:X,enumerable:!0}):E;for(let M of wX(X))if(!xX.call(Y,M))L$(Y,M,{get:()=>X[M],enumerable:!0});return Y};var NX=(X,Z)=>()=>(Z||X((Z={exports:{}}).exports,Z),Z.exports);var P$=NX((CX,p)=>{(function(){function X($,H){Object.defineProperty(Y.prototype,$,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",H[0],H[1])}})}function Z($){if($===null||typeof $!=="object")return null;return $=T$&&$[T$]||$["@@iterator"],typeof $==="function"?$:null}function E($,H){$=($=$.constructor)&&($.displayName||$.name)||"ReactClass";var Q=$+"."+H;q$[Q]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",H,$),q$[Q]=!0)}function Y($,H,Q){this.props=$,this.context=H,this.refs=X$,this.updater=Q||I$}function M(){}function W($,H,Q){this.props=$,this.context=H,this.refs=X$,this.updater=Q||I$}function B($){return""+$}function z($){try{B($);var H=!1}catch(J){H=!0}if(H){H=console;var Q=H.error,G=typeof Symbol==="function"&&Symbol.toStringTag&&$[Symbol.toStringTag]||$.constructor.name||"Object";return Q.call(H,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),B($)}}function w($){if($==null)return null;if(typeof $==="function")return $.$$typeof===DX?null:$.displayName||$.name||null;if(typeof $==="string")return $;switch($){case a:return"Fragment";case W$:return"Profiler";case J$:return"StrictMode";case D$:return"Suspense";case OX:return"SuspenseList";case zX:return"Activity"}if(typeof $==="object")switch(typeof $.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),$.$$typeof){case B$:return"Portal";case O$:return($.displayName||"Context")+".Provider";case e:return($._context.displayName||"Context")+".Consumer";case z$:var H=$.render;return $=$.displayName,$||($=H.displayName||H.name||"",$=$!==""?"ForwardRef("+$+")":"ForwardRef"),$;case $$:return H=$.displayName||null,H!==null?H:w($.type)||"Memo";case m:H=$._payload,$=$._init;try{return w($(H))}catch(Q){}}return null}function N($){if($===a)return"<>";if(typeof $==="object"&&$!==null&&$.$$typeof===m)return"<...>";try{var H=w($);return H?"<"+H+">":"<...>"}catch(Q){return"<...>"}}function C(){var $=T.A;return $===null?null:$.getOwner()}function K(){return Error("react-stack-top-frame")}function L($){if(d.call($,"key")){var H=Object.getOwnPropertyDescriptor($,"key").get;if(H&&H.isReactWarning)return!1}return $.key!==void 0}function QX($,H){function Q(){w$||(w$=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",H))}Q.isReactWarning=!0,Object.defineProperty($,"key",{get:Q,configurable:!0})}function YX(){var $=w(this.type);return K$[$]||(K$[$]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),$=this.props.ref,$!==void 0?$:null}function n($,H,Q,G,J,q,O,I){return Q=q.ref,$={$$typeof:r,type:$,key:H,props:q,_owner:J},(Q!==void 0?Q:null)!==null?Object.defineProperty($,"ref",{enumerable:!1,get:YX}):Object.defineProperty($,"ref",{enumerable:!1,value:null}),$._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty($,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty($,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty($,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$}function GX($,H){return H=n($.type,H,void 0,void 0,$._owner,$.props,$._debugStack,$._debugTask),$._store&&(H._store.validated=$._store.validated),H}function P($){return typeof $==="object"&&$!==null&&$.$$typeof===r}function MX($){var H={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(Q){return H[Q]})}function o($,H){return typeof $==="object"&&$!==null&&$.key!=null?(z($.key),MX(""+$.key)):H.toString(36)}function M$(){}function BX($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status==="string"?$.then(M$,M$):($.status="pending",$.then(function(H){$.status==="pending"&&($.status="fulfilled",$.value=H)},function(H){$.status==="pending"&&($.status="rejected",$.reason=H)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function f($,H,Q,G,J){var q=typeof $;if(q==="undefined"||q==="boolean")$=null;var O=!1;if($===null)O=!0;else switch(q){case"bigint":case"string":case"number":O=!0;break;case"object":switch($.$$typeof){case r:case B$:O=!0;break;case m:return O=$._init,f(O($._payload),H,Q,G,J)}}if(O){O=$,J=J(O);var I=G===""?"."+o(O,0):G;return R$(J)?(Q="",I!=null&&(Q=I.replace(C$,"$&/")+"/"),f(J,H,Q,"",function(_){return _})):J!=null&&(P(J)&&(J.key!=null&&(O&&O.key===J.key||z(J.key)),Q=GX(J,Q+(J.key==null||O&&O.key===J.key?"":(""+J.key).replace(C$,"$&/")+"/")+I),G!==""&&O!=null&&P(O)&&O.key==null&&O._store&&!O._store.validated&&(Q._store.validated=2),J=Q),H.push(J)),1}if(O=0,I=G===""?".":G+":",R$($))for(var D=0;D<$.length;D++)G=$[D],q=I+o(G,D),O+=f(G,H,Q,q,J);else if(D=Z($),typeof D==="function")for(D===$.entries&&(N$||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),N$=!0),$=D.call($),D=0;!(G=$.next()).done;)G=G.value,q=I+o(G,D++),O+=f(G,H,Q,q,J);else if(q==="object"){if(typeof $.then==="function")return f(BX($),H,Q,G,J);throw H=String($),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return O}function y($,H,Q){if($==null)return $;var G=[],J=0;return f($,G,"","",function(q){return H.call(Q,q,J++)}),G}function JX($){if($._status===-1){var H=$._result;H=H(),H.then(function(Q){if($._status===0||$._status===-1)$._status=1,$._result=Q},function(Q){if($._status===0||$._status===-1)$._status=2,$._result=Q}),$._status===-1&&($._status=0,$._result=H)}if($._status===1)return H=$._result,H===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
-
3
- Your code should look like:
4
- const MyComponent = lazy(() => import('./MyComponent'))
5
-
6
- Did you accidentally put curly braces around the import?`,H),"default"in H||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
-
8
- Your code should look like:
9
- const MyComponent = lazy(() => import('./MyComponent'))`,H),H.default;throw $._result}function R(){var $=T.H;return $===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
- 2. You might be breaking the Rules of Hooks
12
- 3. You might have more than one copy of React in the same app
13
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),$}function WX(){}function g($){if(u===null)try{var H=("require"+Math.random()).slice(0,7);u=(p&&p[H]).call(p,"timers").setImmediate}catch(Q){u=function(G){A$===!1&&(A$=!0,typeof MessageChannel==="undefined"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var J=new MessageChannel;J.port1.onmessage=G,J.port2.postMessage(void 0)}}return u($)}function S($){return 1<$.length&&typeof AggregateError==="function"?new AggregateError($):$[0]}function b($,H){H!==s-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),s=H}function l($,H,Q){var G=T.actQueue;if(G!==null)if(G.length!==0)try{t(G),g(function(){return l($,H,Q)});return}catch(J){T.thrownErrors.push(J)}else T.actQueue=null;0<T.thrownErrors.length?(G=S(T.thrownErrors),T.thrownErrors.length=0,Q(G)):H($)}function t($){if(!Z$){Z$=!0;var H=0;try{for(;H<$.length;H++){var Q=$[H];do{T.didUsePromise=!1;var G=Q(!1);if(G!==null){if(T.didUsePromise){$[H]=Q,$.splice(0,H);return}Q=G}else break}while(1)}$.length=0}catch(J){$.splice(0,H+1),T.thrownErrors.push(J)}finally{Z$=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=Symbol.for("react.transitional.element"),B$=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),J$=Symbol.for("react.strict_mode"),W$=Symbol.for("react.profiler"),e=Symbol.for("react.consumer"),O$=Symbol.for("react.context"),z$=Symbol.for("react.forward_ref"),D$=Symbol.for("react.suspense"),OX=Symbol.for("react.suspense_list"),$$=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),zX=Symbol.for("react.activity"),T$=Symbol.iterator,q$={},I$={isMounted:function(){return!1},enqueueForceUpdate:function($){E($,"forceUpdate")},enqueueReplaceState:function($){E($,"replaceState")},enqueueSetState:function($){E($,"setState")}},j$=Object.assign,X$={};Object.freeze(X$),Y.prototype.isReactComponent={},Y.prototype.setState=function($,H){if(typeof $!=="object"&&typeof $!=="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,H,"setState")},Y.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};var x={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},h;for(h in x)x.hasOwnProperty(h)&&X(h,x[h]);M.prototype=Y.prototype,x=W.prototype=new M,x.constructor=W,j$(x,Y.prototype),x.isPureReactComponent=!0;var R$=Array.isArray,DX=Symbol.for("react.client.reference"),T={H:null,A:null,T:null,S:null,V:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},d=Object.prototype.hasOwnProperty,U$=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function($){return $()}};var w$,x$,K$={},TX=x.react_stack_bottom_frame.bind(x,K)(),qX=U$(N(K)),N$=!1,C$=/\/+/g,_$=typeof reportError==="function"?reportError:function($){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $==="object"&&$!==null&&typeof $.message==="string"?String($.message):String($),error:$});if(!window.dispatchEvent(H))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",$);return}console.error($)},A$=!1,u=null,s=0,i=!1,Z$=!1,F$=typeof queueMicrotask==="function"?function($){queueMicrotask(function(){return queueMicrotask($)})}:g;x=Object.freeze({__proto__:null,c:function($){return R().useMemoCache($)}}),CX.Children={map:y,forEach:function($,H,Q){y($,function(){H.apply(this,arguments)},Q)},count:function($){var H=0;return y($,function(){H++}),H},toArray:function($){return y($,function(H){return H})||[]},only:function($){if(!P($))throw Error("React.Children.only expected to receive a single React element child.");return $}},CX.Component=Y,CX.Fragment=a,CX.Profiler=W$,CX.PureComponent=W,CX.StrictMode=J$,CX.Suspense=D$,CX.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,CX.__COMPILER_RUNTIME=x,CX.act=function($){var H=T.actQueue,Q=s;s++;var G=T.actQueue=H!==null?H:[],J=!1;try{var q=$()}catch(D){T.thrownErrors.push(D)}if(0<T.thrownErrors.length)throw b(H,Q),$=S(T.thrownErrors),T.thrownErrors.length=0,$;if(q!==null&&typeof q==="object"&&typeof q.then==="function"){var O=q;return F$(function(){J||i||(i=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(D,_){J=!0,O.then(function(k){if(b(H,Q),Q===0){try{t(G),g(function(){return l(k,D,_)})}catch(jX){T.thrownErrors.push(jX)}if(0<T.thrownErrors.length){var IX=S(T.thrownErrors);T.thrownErrors.length=0,_(IX)}}else D(k)},function(k){b(H,Q),0<T.thrownErrors.length?(k=S(T.thrownErrors),T.thrownErrors.length=0,_(k)):_(k)})}}}var I=q;if(b(H,Q),Q===0&&(t(G),G.length!==0&&F$(function(){J||i||(i=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),T.actQueue=null),0<T.thrownErrors.length)throw $=S(T.thrownErrors),T.thrownErrors.length=0,$;return{then:function(D,_){J=!0,Q===0?(T.actQueue=G,g(function(){return l(I,D,_)})):D(I)}}},CX.cache=function($){return function(){return $.apply(null,arguments)}},CX.captureOwnerStack=function(){var $=T.getCurrentStack;return $===null?null:$()},CX.cloneElement=function($,H,Q){if($===null||$===void 0)throw Error("The argument must be a React element, but you passed "+$+".");var G=j$({},$.props),J=$.key,q=$._owner;if(H!=null){var O;$:{if(d.call(H,"ref")&&(O=Object.getOwnPropertyDescriptor(H,"ref").get)&&O.isReactWarning){O=!1;break $}O=H.ref!==void 0}O&&(q=C()),L(H)&&(z(H.key),J=""+H.key);for(I in H)!d.call(H,I)||I==="key"||I==="__self"||I==="__source"||I==="ref"&&H.ref===void 0||(G[I]=H[I])}var I=arguments.length-2;if(I===1)G.children=Q;else if(1<I){O=Array(I);for(var D=0;D<I;D++)O[D]=arguments[D+2];G.children=O}G=n($.type,J,void 0,void 0,q,G,$._debugStack,$._debugTask);for(J=2;J<arguments.length;J++)q=arguments[J],P(q)&&q._store&&(q._store.validated=1);return G},CX.createContext=function($){return $={$$typeof:O$,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:e,_context:$},$._currentRenderer=null,$._currentRenderer2=null,$},CX.createElement=function($,H,Q){for(var G=2;G<arguments.length;G++){var J=arguments[G];P(J)&&J._store&&(J._store.validated=1)}if(G={},J=null,H!=null)for(D in x$||!("__self"in H)||"key"in H||(x$=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),L(H)&&(z(H.key),J=""+H.key),H)d.call(H,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(G[D]=H[D]);var q=arguments.length-2;if(q===1)G.children=Q;else if(1<q){for(var O=Array(q),I=0;I<q;I++)O[I]=arguments[I+2];Object.freeze&&Object.freeze(O),G.children=O}if($&&$.defaultProps)for(D in q=$.defaultProps,q)G[D]===void 0&&(G[D]=q[D]);J&&QX(G,typeof $==="function"?$.displayName||$.name||"Unknown":$);var D=1e4>T.recentlyCreatedOwnerStacks++;return n($,J,void 0,void 0,C(),G,D?Error("react-stack-top-frame"):TX,D?U$(N($)):qX)},CX.createRef=function(){var $={current:null};return Object.seal($),$},CX.forwardRef=function($){$!=null&&$.$$typeof===$$?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof $!=="function"?console.error("forwardRef requires a render function but was given %s.",$===null?"null":typeof $):$.length!==0&&$.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",$.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),$!=null&&$.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var H={$$typeof:z$,render:$},Q;return Object.defineProperty(H,"displayName",{enumerable:!1,configurable:!0,get:function(){return Q},set:function(G){Q=G,$.name||$.displayName||(Object.defineProperty($,"name",{value:G}),$.displayName=G)}}),H},CX.isValidElement=P,CX.lazy=function($){return{$$typeof:m,_payload:{_status:-1,_result:$},_init:JX}},CX.memo=function($,H){$==null&&console.error("memo: The first argument must be a component. Instead received: %s",$===null?"null":typeof $),H={$$typeof:$$,type:$,compare:H===void 0?null:H};var Q;return Object.defineProperty(H,"displayName",{enumerable:!1,configurable:!0,get:function(){return Q},set:function(G){Q=G,$.name||$.displayName||(Object.defineProperty($,"name",{value:G}),$.displayName=G)}}),H},CX.startTransition=function($){var H=T.T,Q={};T.T=Q,Q._updatedFibers=new Set;try{var G=$(),J=T.S;J!==null&&J(Q,G),typeof G==="object"&&G!==null&&typeof G.then==="function"&&G.then(WX,_$)}catch(q){_$(q)}finally{H===null&&Q._updatedFibers&&($=Q._updatedFibers.size,Q._updatedFibers.clear(),10<$&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),T.T=H}},CX.unstable_useCacheRefresh=function(){return R().useCacheRefresh()},CX.use=function($){return R().use($)},CX.useActionState=function($,H,Q){return R().useActionState($,H,Q)},CX.useCallback=function($,H){return R().useCallback($,H)},CX.useContext=function($){var H=R();return $.$$typeof===e&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),H.useContext($)},CX.useDebugValue=function($,H){return R().useDebugValue($,H)},CX.useDeferredValue=function($,H){return R().useDeferredValue($,H)},CX.useEffect=function($,H,Q){$==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");var G=R();if(typeof Q==="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return G.useEffect($,H)},CX.useId=function(){return R().useId()},CX.useImperativeHandle=function($,H,Q){return R().useImperativeHandle($,H,Q)},CX.useInsertionEffect=function($,H){return $==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),R().useInsertionEffect($,H)},CX.useLayoutEffect=function($,H){return $==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),R().useLayoutEffect($,H)},CX.useMemo=function($,H){return R().useMemo($,H)},CX.useOptimistic=function($,H){return R().useOptimistic($,H)},CX.useReducer=function($,H,Q){return R().useReducer($,H,Q)},CX.useRef=function($){return R().useRef($)},CX.useState=function($){return R().useState($)},CX.useSyncExternalStore=function($,H,Q){return R().useSyncExternalStore($,H,Q)},CX.useTransition=function(){return R().useTransition()},CX.version="19.1.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var EX=KX(P$(),1);import{renderToString as eX}from"react-dom/server";function f$(X){return{type:"container",...X}}function k$(X,Z){return{...Z,type:"text",text:X}}function H$(X,Z){return{...Z,type:"image",src:X}}function lZ(X){return X}function S$(X){return{percentage:X}}function V$(X){return{vw:X}}function v$(X){return{vh:X}}function U(X){return{em:X}}function y$(X){return{rem:X}}function g$(X){return{fr:X}}function tZ(X,Z,E=0){return{from:X,to:Z,angle:E}}function b$(X,Z,E,Y=1){return[X,Z,E,Y]}function m$(X){return X.replace(/[A-Z]/g,(Z)=>`_${Z.toLowerCase()}`)}var _X=["-moz-","-webkit-","-o-","-ms-"];function h$(X){if(typeof X!=="string")return X;if(FX(X)||AX(X))return;return X}function AX(X){return _X.some((Z)=>X.startsWith(Z))}function FX(X){return X==="inherit"||X==="initial"||X==="revert"||X==="unset"}function LX(X){let Z=Number.parseInt(X.slice(1),16);if(Number.isNaN(Z))throw new Error(`Invalid hex color: ${X}`);if(X.length===4){let E=Z>>8&15,Y=Z>>4&15,M=Z&15;return E<<20|E<<16|Y<<12|Y<<8|M<<4|M}if(X.length===5){let E=Z>>12&15,Y=Z>>8&15,M=Z>>4&15,W=Z&15;return[E<<4|E,Y<<4|Y,M<<4|M,W/15]}if(X.length===7)return Z;if(X.length===9)return[Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255];throw new Error(`Invalid hex color: ${X}`)}function PX(X){let Z=X.slice(4,-1).split(",").map((E)=>Number.parseInt(E.trim()).toString(16).padStart(2,"0"));if(Z.length!==3)throw new Error(`Invalid rgb color: ${X}`);return Number.parseInt(Z.join(""),16)}function fX(X){let Z=X.slice(5,-1).split(",").map((Y)=>Number.parseFloat(Y.trim()));if(Z.length!==4)throw new Error(`Invalid rgba color: ${X}`);let E=Z;if(E[0]<0||E[0]>255||E[1]<0||E[1]>255||E[2]<0||E[2]>255||E[3]<0||E[3]>1)throw new Error(`Invalid rgba color: ${X}`);return E}function A(X){if(X.startsWith("#"))return LX(X);if(X.startsWith("rgb("))return PX(X);if(X.startsWith("rgba("))return fX(X);if(X.toLowerCase()==="transparent")return[0,0,0,0];throw new Error(`Invalid color: ${X}`)}function d$(X){if(X==="none")return;let Z=X.match(/^linear-gradient\((.*)\)$/i)?.[1];if(!Z)throw new Error(`Invalid linear-gradient syntax: ${X}`);let E=Z.trim(),Y=u$(E,","),M=Y[0]?.trim();if(!M)throw new Error(`linear-gradient requires at least one argument: ${X}`);let W=kX(M),B=W!==void 0?s$(W):180,z=W!==void 0?Y.slice(1):Y;if(z.length<2)throw new Error(`linear-gradient requires at least two color stops: ${X}`);let w=z.map(vX);return{angle:B,stops:gX(w)}}function u$(X,Z){let E=[],Y=0,M=0;for(let B=0;B<X.length;B++){let z=X[B];if(z==="(")Y++;else if(z===")")Y=Math.max(0,Y-1);if(Y===0&&X.startsWith(Z,B)){let w=X.slice(M,B).trim();if(w)E.push(w);M=B+Z.length,B+=Z.length-1}}let W=X.slice(M).trim();if(W)E.push(W);return E}function kX(X){let Z=X.trim();return SX(Z)??VX(Z)}function SX(X){let Z=X.match(/^to\s+(top|bottom|left|right)(?:\s+(top|bottom|left|right))?$/i);if(!Z)return;let E=(Z[1]??"").toLowerCase(),Y=(Z[2]??"").toLowerCase(),M={top:0,right:90,bottom:180,left:270},W=M[E]??180;if(!Y)return W;let B=M[Y]??180,z=new Set([W,B]);if(z.has(0)&&z.has(90))return 45;if(z.has(90)&&z.has(180))return 135;if(z.has(180)&&z.has(270))return 225;if(z.has(270)&&z.has(0))return 315;return s$((W+B)/2)}function VX(X){let Z=X.match(/^(-?\d*\.?\d+)\s*(deg|rad|turn)?$/i);if(!Z)return;let E=Number.parseFloat(Z[1]??"0");switch(Z[2]?Z[2].toLowerCase():"deg"){case"deg":return E;case"rad":return E*180/Math.PI;case"turn":return E*360;default:return E}}function vX(X){let Z=u$(X.trim()," "),E=A(Z[0]??X.trim()),Y=Z[1]?yX(Z[1]):void 0;return{color:E,position:Y}}function yX(X){let Z=X.trim();if(Z.endsWith("%"))return Number.parseFloat(Z.slice(0,-1))/100;return Number.parseFloat(Z)}function gX(X){if(X.every((B)=>B.position===void 0))return bX(X);let Z=[],E=X.length,Y=X[0];if(!Y)throw new Error("First stop must have a position defined");Z.push({color:Y.color,position:0});for(let B=1;B<E-1;B++){let z=X[B];if(typeof z?.position==="number")Z.push({color:z.color,position:mX(z.position)})}let M=X[E-1];if(!M)throw new Error("Last stop must have a position defined");return Z.push({color:M.color,position:1}),Z.reduce((B,z)=>{if(B.length===0||B[B.length-1]?.position!==z.position)B.push(z);return B},[]).sort((B,z)=>B.position-z.position)}function bX(X){let Z=X.length;return X.map((E,Y)=>({color:E.color,position:Z===1?0:Y/(Z-1)}))}function mX(X){return Math.max(0,Math.min(1,X))}function s$(X){let Z=X%360;if(Z<0)Z+=360;return Z}function j(X){if(typeof X==="number")return X;if(X==="auto"||X==="min-content"||X==="max-content")return X;let Z=X.match(/^(-?[\d.]+)(.*)$/);if(!Z)return 0;let[,E,Y]=Z;if(!E)return 0;let M=Number.parseFloat(E);switch(Y){case"%":return S$(M);case"rem":return y$(M);case"em":return U(M);case"vh":return v$(M);case"vw":return V$(M);case"px":case"":return M;default:return M}}function F(X){if(typeof X==="number")return j(X);let E=X.trim().split(/\s+/).map(j);if(E.length===1)return E[0];if(E.length===2||E.length===4)return E;if(E.length===3&&E[0]!==void 0&&E[1]!==void 0&&E[2]!==void 0)return[E[0],E[1],E[2],E[1]];throw new Error(`Invalid sides value: ${X}. Expected 1 to at most 4 values.`)}function i$(X){if(typeof X==="number")return X;if(typeof X==="string"&&X.includes("/")){let[Z,E]=X.split("/").map(Number.parseFloat);if(Z===void 0||E===void 0)throw new Error(`Invalid aspect ratio: ${X}. Expected format 'width/height'.`);if(E===0)throw new Error(`Invalid aspect ratio: ${X}. Denominator cannot be zero.`);return Z/E}if(typeof X==="string")return Number.parseFloat(X);throw new Error(`Invalid aspect ratio: ${X}`)}function p$(X){switch(X){case"block":case"flex":case"grid":case"none":return X;default:return console.warn(`Invalid display value: ${X}, fallback to 'block'.`),"block"}}function c$(X){switch(X){case"relative":case"absolute":return X;case"static":return"relative";default:return console.warn(`Invalid position value: ${X}, fallback to 'relative'.`),"relative"}}function n$(X){let Z=X.trim().split(/\s+/);if(Z.length<2)throw new Error(`Invalid box-shadow: ${X}`);let E=!1,Y="black",M=0;if(Z[0]==="inset")E=!0,M=1;let W=/^(#|rgb|rgba|hsl|hsla|[a-zA-Z]+)/,B=[];for(let K=M;K<Z.length;K++){let L=Z[K]??"";if(K===Z.length-1&&W.test(L))Y=L;else B.push(L)}if(B.length<2||B.length>4)throw new Error(`Invalid box-shadow format: ${X}`);let[z="0px",w="0px",N="0px",C="0px"]=B;try{return{color:A(Y),offset_x:j(z)??0,offset_y:j(w)??0,blur_radius:j(N)??0,spread_radius:j(C)??0,inset:E}}catch{throw new Error(`Invalid box-shadow color: ${Y}`)}}function hX(X){return X.trim().split(/\s+/).map((E)=>{if(E.endsWith("fr")){let Y=Number.parseFloat(E.slice(0,-2));if(Number.isNaN(Y))return{fr:0};return{fr:Y}}return j(E)??0})}function o$(X){switch(X){case"row":case"column":case"row dense":case"column dense":return X.replace(" ","-");default:return console.warn(`Invalid grid-auto-flow value: ${X}, fallback to 'row'.`),"row"}}function dX(X){if(X.startsWith("span ")){let E=Number.parseInt(X.slice(5));if(Number.isNaN(E))throw new Error(`Invalid span value: ${X}`);return{start:E,end:null}}if(X.includes("/")){let E=X.split("/");if(E.length!==2)throw new Error(`Invalid grid line format: ${X}`);let[Y="",M=""]=E.map((z)=>z.trim()),W=Y==="auto"?null:Number.parseInt(Y)||Y,B=M==="auto"?null:Number.parseInt(M)||M;return{start:W,end:B}}if(X==="auto")return{start:null,end:null};let Z=Number.parseInt(X);if(Number.isNaN(Z))return{start:X,end:null};return{start:Z,end:null}}function l$(X){let Z=X.match(/repeat\(([^,]+),\s*(.+)\)/);if(Z){let E=uX(Z);if(!E)throw new Error(`Invalid repeat function: ${X}`);return E}return sX(X)}function uX(X){let[,Z,E]=X;if(!Z||!E)return;let Y;if(Z==="auto-fill")Y="auto-fill";else if(Z==="auto-fit")Y="auto-fit";else{let W=Number.parseInt(Z);if(Number.isNaN(W))return;Y=W}let M=E.trim().split(/\s+/).map((W)=>{if(W.endsWith("fr")){let B=Number.parseFloat(W.slice(0,-2));return Number.isNaN(B)?0:{fr:B}}return j(W)??0});return[{repeat:[Y,M]}]}function sX(X){return X.trim().split(/\s+/).map((E)=>{if(E.endsWith("fr")){let Y=Number.parseFloat(E.slice(0,-2));return{single:Number.isNaN(Y)?0:{fr:Y}}}return{single:j(E)??0}})}function t$(X){if(typeof X==="number")return Math.max(1,Math.min(1000,X));if(typeof X==="string")switch(X){case"normal":return 400;case"bold":return 700;case"lighter":return 300;case"bolder":return 600;default:{let Z=Number.parseInt(X);if(!Number.isNaN(Z))return Math.max(1,Math.min(1000,Z))}}return console.warn(`Invalid font-weight value: ${X}, fallback to 400.`),400}function E$(X){if(typeof X==="string")return hX(X);if(Array.isArray(X))return X;return typeof X==="number"?[X]:[g$(1)]}function Q$(X){if(typeof X==="string")return dX(X);if(typeof X==="number")return{start:X,end:null};return X}function r$(X){if(typeof X==="string")return l$(X);if(Array.isArray(X))return X;return typeof X==="number"?[{single:X}]:[{single:0}]}function a$(X){if(typeof X==="string")return l$(X);if(Array.isArray(X))return X;return typeof X==="number"?[{single:X}]:[{single:0}]}function e$(X){if(X==="none")return 0;return Number(X)}function $X(X){switch(X){case"auto":case"pixelated":return X;case"crisp-edges":return"pixelated";default:return console.warn(`Invalid image-rendering value: ${X}, fallback to 'auto'.`),"auto"}}var V=Symbol("skip-parsing"),iX={display:p$,position:c$,width:j,height:j,maxWidth:j,maxHeight:j,minWidth:j,minHeight:j,aspectRatio:i$,padding:F,margin:F,flexDirection:V,flexWrap:V,justifyContent:(X)=>X,alignContent:(X)=>X,justifySelf:(X)=>X,alignItems:(X)=>X,alignSelf:(X)=>X,justifyItems:(X)=>X,flexBasis:j,gap:j,flexGrow:(X)=>Number(X),flexShrink:(X)=>Number(X),borderWidth:F,backgroundColor:A,backgroundImage:d$,boxShadow:n$,objectFit:V,imageRendering:$X,gridAutoColumns:E$,gridAutoRows:E$,gridAutoFlow:o$,gridColumn:Q$,gridRow:Q$,gridTemplateColumns:r$,gridTemplateRows:a$,textOverflow:(X)=>X,borderColor:A,color:A,fontSize:j,fontFamily:V,lineHeight:j,fontWeight:t$,lineClamp:e$,borderRadius:(X)=>F(X),textAlign(X){if(X==="match-parent")return void console.warn("Unsupported value for text-align found:",X);return X},letterSpacing:j,inset:(X)=>F(X)},pX=new Set(["top","right","bottom","left","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft"]);function cX(X,Z,E){if(pX.has(Z))return;let Y=h$(E);if(Y===void 0||Y===null)return;let M=iX[Z];if(!M){console.warn(`No parser found for CSS property: ${Z}`);return}let W=m$(Z);if(M===V){X[W]=Y;return}try{let B=M(Y);if(B!=null&&B!==void 0)X[W]=B}catch(B){console.warn(`Failed to parse ${Z}:`,B)}}function nX(X){let Z=F(X);if(typeof Z==="number")return{top:Z,right:Z,bottom:Z,left:Z};if(Array.isArray(Z)){if(Z.length===2)return{top:Z[0],right:Z[1],bottom:Z[0],left:Z[1]};if(Z.length===4)return{top:Z[0],right:Z[1],bottom:Z[2],left:Z[3]}}return{top:0,right:0,bottom:0,left:0}}function oX(X,Z,E,Y,M,W){let B=X[E]!==void 0||X[Y]!==void 0||X[M]!==void 0||X[W]!==void 0;return X[Z]!==void 0&&!B}function lX(X,Z){let E=X[Z];if(E!==void 0&&typeof E!=="object")return nX(E);return{top:0,right:0,bottom:0,left:0}}function c(X,Z){let E=X[Z];if(E!==void 0&&typeof E!=="object")return j(E);return 0}function Y$(X,Z,E,Y,M,W){if(X[Z]===void 0&&X[E]===void 0&&X[Y]===void 0&&X[M]===void 0&&X[W]===void 0)return;if(oX(X,Z,E,Y,M,W)){let K=X[Z];if(K!==void 0)return F(K)}let B=lX(X,Z),z=B.top,w=B.right,N=B.bottom,C=B.left;if(X[E]!==void 0)z=c(X,E);if(X[Y]!==void 0)w=c(X,Y);if(X[M]!==void 0)N=c(X,M);if(X[W]!==void 0)C=c(X,W);if(z===w&&w===N&&N===C)return z;return[z,w,N,C]}function tX(X){return Y$(X,"padding","paddingTop","paddingRight","paddingBottom","paddingLeft")}function rX(X){return Y$(X,"margin","marginTop","marginRight","marginBottom","marginLeft")}function aX(X){return Y$(X,"inset","top","right","bottom","left")}function G$(X){if(!X)return;let Z={};for(let[W,B]of Object.entries(X))cX(Z,W,B);let E=aX(X);if(E!==void 0)Z.inset=E;let Y=tX(X);if(Y!==void 0)Z.padding=Y;let M=rX(X);if(M!==void 0)Z.margin=M;return Object.keys(Z).length>0?Z:void 0}var XX={p:{margin:[U(1),0]},blockquote:{margin:[U(1),40]},center:{text_align:"center"},hr:{margin:[U(0.5),"auto"],border_width:1},h1:{font_size:U(2),margin:[U(0.67),0],font_weight:700},h2:{font_size:U(1.5),margin:[U(0.83),0],font_weight:700},h3:{font_size:U(1.17),margin:[U(1),0],font_weight:700},h4:{margin:[U(1.33),0],font_weight:700},h5:{font_size:U(0.83),margin:[U(1.67),0],font_weight:700},h6:{font_size:U(0.67),margin:[U(2.33),0],font_weight:700},strong:{font_weight:700},b:{font_weight:700},code:{font_family:"monospace"},kbd:{font_family:"monospace"},pre:{font_family:"monospace",margin:[U(1),0]},mark:{background_color:b$(255,255,0),color:0},big:{font_size:19.2},small:{font_size:13.333333333333334}};var $Z=Symbol.for("react.transitional.element");function XZ(X){return typeof X==="object"&&X!==null&&"$$typeof"in X&&X.$$typeof===$Z}async function v(X){if(X===void 0||X===null)return[];if(X instanceof Promise)return v(await X);if(typeof X==="object"&&Symbol.iterator in X)return YZ(X);if(XZ(X)){let Z=await ZZ(X);return Array.isArray(Z)?Z:Z?[Z]:[]}return[k$(String(X))]}async function ZZ(X){if(typeof X.type==="function"){let Y=X.type;return v(Y(X.props))}if(typeof X.type==="symbol"&&X.type===Symbol.for("react.fragment"))return await HX(X)||[];if(ZX(X,"img"))return HZ(X);if(ZX(X,"svg"))return[EZ(X)];let Z=await HX(X),E=QZ(X.props);return[f$({children:Z,...XX[X.type],...G$(E)})]}function HZ(X){if(!X.props.src)throw new Error("Image element must have a 'src' prop.");let Z=X.props.style?.width??X.props.width,E=X.props.style?.height??X.props.height;return[H$(X.props.src,{...G$(X.props.style),width:Z?j(Z):void 0,height:E?j(E):void 0})]}function EZ(X){return H$(eX(EX.cloneElement(X,{xmlns:"http://www.w3.org/2000/svg",...X.props},X.props.children)))}function QZ(X){return typeof X==="object"&&X&&"style"in X?X.style:void 0}function ZX(X,Z){return X.type===Z}async function HX(X){if(typeof X.props!=="object"||X.props===null||!("children"in X.props))return[];return await v(X.props.children)}async function YZ(X){return(await Promise.all(Array.from(X).map(v))).flat()}export{v as fromJsx};
1
+ import{cloneElement as y}from"react";import{renderToStaticMarkup as l}from"react-dom/server";function p(t){return{type:"container",...t}}function s(t,r){return{...r,type:"text",text:t}}function a(t,r){return{...r,type:"image",src:t}}function o(t){return{em:t}}function c(t,r,e,n=1){return[t,r,e,n]}var f={p:{margin:[o(1),0]},blockquote:{margin:[o(1),40]},center:{textAlign:"center"},hr:{margin:[o(.5),"auto"],borderWidth:1},h1:{fontSize:o(2),margin:[o(.67),0],fontWeight:700},h2:{fontSize:o(1.5),margin:[o(.83),0],fontWeight:700},h3:{fontSize:o(1.17),margin:[o(1),0],fontWeight:700},h4:{margin:[o(1.33),0],fontWeight:700},h5:{fontSize:o(.83),margin:[o(1.67),0],fontWeight:700},h6:{fontSize:o(.67),margin:[o(2.33),0],fontWeight:700},strong:{fontWeight:700},b:{fontWeight:700},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{fontFamily:"monospace",margin:[o(1),0]},mark:{backgroundColor:c(255,255,0),color:0},big:{fontSize:o(1.2)},small:{fontSize:o(1/1.2)}};var g=Symbol.for("react.transitional.element");function d(t){return typeof t=="object"&&t!==null&&"$$typeof"in t&&t.$$typeof===g}async function i(t){if(t==null)return[];if(t instanceof Promise)return i(await t);if(typeof t=="object"&&Symbol.iterator in t)return x(t);if(d(t)){let r=await h(t);return Array.isArray(r)?r:r?[r]:[]}return[s(String(t))]}async function h(t){if(typeof t.type=="function"){let n=t.type;return i(n(t.props))}if(typeof t.type=="symbol"&&t.type===Symbol.for("react.fragment"))return await m(t)||[];if(u(t,"img"))return S(t);if(u(t,"svg"))return[P(t)];let r=await m(t),e=b(t.props);return[p({children:r,...f[t.type],...e})]}function S(t){if(!t.props.src)throw new Error("Image element must have a 'src' prop.");let r=t.props.style?.width??t.props.width,e=t.props.style?.height??t.props.height;return[a(t.props.src,{...t.props.style,width:r,height:e})]}function P(t){return a(l(y(t,{xmlns:"http://www.w3.org/2000/svg",...t.props},t.props.children)))}function b(t){return typeof t=="object"&&t&&"style"in t?t.style:void 0}function u(t,r){return t.type===r}async function m(t){return typeof t.props!="object"||t.props===null||!("children"in t.props)?[]:await i(t.props.children)}async function x(t){return(await Promise.all(Array.from(t).map(i))).flat()}export{i as fromJsx};