@tempots/beatui 1.7.4 → 1.9.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.
Files changed (161) hide show
  1. package/dist/{ar-Wr6gMs-M.cjs → ar-CEzAem0F.cjs} +1 -1
  2. package/dist/{ar-fdUqbCvM.js → ar-CQieaqsq.js} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/auth-divider-B8yr-E_b.cjs +1 -0
  6. package/dist/{auth-divider-D9KnNeyF.js → auth-divider-Byh5BWLc.js} +91 -88
  7. package/dist/beatui.css +1 -0
  8. package/dist/beatui.tailwind.css +1 -0
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +27 -26
  11. package/dist/card-BkA7Wvbh.cjs +1 -0
  12. package/dist/card-DX1DwGbL.js +62 -0
  13. package/dist/{colors-C2sgnzFH.js → colors-CyMhfbJi.js} +64 -58
  14. package/dist/{colors-DPCHjRMj.cjs → colors-IXZF9U-s.cjs} +1 -1
  15. package/dist/control-hqEuMzyI.js +343 -0
  16. package/dist/control-muup9GF1.cjs +1 -0
  17. package/dist/custom-validation-BA9iJWl_.cjs +1 -0
  18. package/dist/custom-validation-BOBoUwHY.js +181 -0
  19. package/dist/{de-C5-k5Eov.js → de-CBIwvkAH.js} +1 -1
  20. package/dist/{de-DZqdSEta.cjs → de-DdfxrlT3.cjs} +1 -1
  21. package/dist/deep-merge-8fwp1z4X.js +1346 -0
  22. package/dist/deep-merge-VDGE_HQD.cjs +1 -0
  23. package/dist/duration-input-DmsljXl3.cjs +1 -0
  24. package/dist/{duration-input-D4V_PHIg.js → duration-input-ZQlcqdXU.js} +32 -31
  25. package/dist/{editor-toolbar-group-FpOHrmtx.js → editor-toolbar-group-BNTBMJCe.js} +2 -2
  26. package/dist/{editor-toolbar-group-C_ft_T8D.cjs → editor-toolbar-group-DiMzqYgz.cjs} +1 -1
  27. package/dist/{es-h6jmoF4X.js → es--9HaEj2D.js} +1 -1
  28. package/dist/{es-CJgYfRap.cjs → es-DSdljxFJ.cjs} +1 -1
  29. package/dist/{fa-BuxK837l.js → fa-1Z-akcW7.js} +1 -1
  30. package/dist/{fa-BQ5PzwNY.cjs → fa-BolmeWRT.cjs} +1 -1
  31. package/dist/flyout-CuKFh_T7.js +151 -0
  32. package/dist/flyout-DC_tKaTG.cjs +1 -0
  33. package/dist/{fr-Bv3TG44U.cjs → fr-CODgUuoZ.cjs} +1 -1
  34. package/dist/{fr-BwILQ9G2.js → fr-DhHM9rou.js} +1 -1
  35. package/dist/{he-yC9Sc7JD.js → he-CBamXbGJ.js} +1 -1
  36. package/dist/{he-5LbvgMCC.cjs → he-Juw-dr28.cjs} +1 -1
  37. package/dist/{hi-Da7rcCpP.js → hi-DvvcX-Ra.js} +1 -1
  38. package/dist/{hi-YWhWcG_L.cjs → hi-R749jeg-.cjs} +1 -1
  39. package/dist/{index-CvU9E9wd.js → index-BfQaT5Jy.js} +104 -104
  40. package/dist/{index-XogEKwdt.cjs → index-Dv7nPuwA.cjs} +1 -1
  41. package/dist/index.cjs.js +4 -4
  42. package/dist/index.es.js +6713 -9831
  43. package/dist/{input-container-CyOgiiQD.cjs → input-container-BaWQLWB6.cjs} +1 -1
  44. package/dist/{input-container-8JFB11xN.js → input-container-DCS5oJ4S.js} +4 -4
  45. package/dist/{it-BxOIJE45.cjs → it-DT5oRZDH.cjs} +1 -1
  46. package/dist/{it-Yeklau78.js → it-aV6i8Qxz.js} +1 -1
  47. package/dist/{ja-Dxj9Q5Yd.js → ja-CuLhGnJX.js} +1 -1
  48. package/dist/{ja-CNhjK06P.cjs → ja-CwKaCYLB.cjs} +1 -1
  49. package/dist/json-schema/index.cjs.js +1 -1
  50. package/dist/json-schema/index.es.js +83 -79
  51. package/dist/json-schema-display/index.cjs.js +1 -1
  52. package/dist/json-schema-display/index.es.js +2 -2
  53. package/dist/json-structure/index.cjs.js +1 -1
  54. package/dist/json-structure/index.es.js +74 -72
  55. package/dist/{ko-DgkqcXTs.cjs → ko-Bucro9ID.cjs} +1 -1
  56. package/dist/{ko-gn_MsegK.js → ko-D-66BsEX.js} +1 -1
  57. package/dist/lexical/index.cjs.js +1 -1
  58. package/dist/lexical/index.es.js +5 -5
  59. package/dist/menu-BFLFKceF.cjs +1 -0
  60. package/dist/menu-BO6zqyfq.js +220 -0
  61. package/dist/modal-6Mq3vS5r.js +309 -0
  62. package/dist/modal-d77-TMc4.cjs +1 -0
  63. package/dist/{nl-vHNFtXXb.js → nl-CAny6wvm.js} +1 -1
  64. package/dist/{nl-Dy9lmbBO.cjs → nl-D7vHpehb.cjs} +1 -1
  65. package/dist/notice-BNGx86Yg.js +110 -0
  66. package/dist/notice-iF6zBMq9.cjs +1 -0
  67. package/dist/{oneof-branch-detection-Q_jxvJIA.js → oneof-branch-detection-Bm17RhC2.js} +27 -26
  68. package/dist/oneof-branch-detection-DZ4MrfBp.cjs +1 -0
  69. package/dist/openui/index.cjs.js +9 -0
  70. package/dist/openui/index.es.js +2174 -0
  71. package/dist/password-input-Bipt7Wsu.cjs +1 -0
  72. package/dist/password-input-mkRmrEPq.js +105 -0
  73. package/dist/{pl-BtYbtsmG.cjs → pl-CSiXoOKT.cjs} +1 -1
  74. package/dist/{pl-C0UdHla0.js → pl-rmZLgQ_V.js} +1 -1
  75. package/dist/prosemirror/index.cjs.js +1 -1
  76. package/dist/prosemirror/index.es.js +4 -4
  77. package/dist/{pt-CtNmqQ1X.cjs → pt-CJT-iq4y.cjs} +1 -1
  78. package/dist/{pt-DGKtfN0d.js → pt-DHnajqAi.js} +1 -1
  79. package/dist/{ru-CpXYLt-v.js → ru-C_E8OZNE.js} +1 -1
  80. package/dist/{ru-BaL_NPRU.cjs → ru-G3sr_ctV.cjs} +1 -1
  81. package/dist/slider-input-SLguFA0d.cjs +1 -0
  82. package/dist/slider-input-VYAMm7pE.js +285 -0
  83. package/dist/stepper-24p16Zsv.cjs +1 -0
  84. package/dist/stepper-TlzbfYWa.js +3222 -0
  85. package/dist/tailwind/preset.cjs.js +1 -1
  86. package/dist/tailwind/preset.es.js +38 -40
  87. package/dist/tailwind/vite-plugin.cjs.js +14 -12
  88. package/dist/tailwind/vite-plugin.es.js +317 -246
  89. package/dist/text-area-BdemKQ_w.cjs +1 -0
  90. package/dist/text-area-Br83-_PQ.js +431 -0
  91. package/dist/{text-input-NJypZSnE.js → text-input-ByuxdX8w.js} +5 -5
  92. package/dist/{text-input-DS5zlXb2.cjs → text-input-MjlUC_9u.cjs} +1 -1
  93. package/dist/{toolbar-BF2L6WKC.js → toolbar-CEBTTjHh.js} +1 -1
  94. package/dist/{toolbar-BBwfe8U9.cjs → toolbar-DWawYFFX.cjs} +1 -1
  95. package/dist/{tr-DwOd87oB.cjs → tr-DcxLHHTC.cjs} +1 -1
  96. package/dist/{tr-DIFZDFW_.js → tr-bVXwloKC.js} +1 -1
  97. package/dist/{translations-EwEmHe3v.cjs → translations-D3xqZUTA.cjs} +1 -1
  98. package/dist/{translations-BCMP-h52.js → translations-DU9wTV1y.js} +20 -19
  99. package/dist/{translations-5cXBrENb.js → translations-RT_UN8ny.js} +1 -1
  100. package/dist/{translations-BqWc0ZHz.cjs → translations-qljG2Chq.cjs} +1 -1
  101. package/dist/types/components/navigation/stepper.d.ts +4 -4
  102. package/dist/types/openui/index.d.ts +28 -0
  103. package/dist/types/openui/library/define-component.d.ts +15 -0
  104. package/dist/types/openui/library/library.d.ts +7 -0
  105. package/dist/types/openui/library/prompt-generator.d.ts +5 -0
  106. package/dist/types/openui/library/types.d.ts +33 -0
  107. package/dist/types/openui/parser/parser.d.ts +8 -0
  108. package/dist/types/openui/parser/streaming-parser.d.ts +14 -0
  109. package/dist/types/openui/parser/tokenizer.d.ts +9 -0
  110. package/dist/types/openui/parser/types.d.ts +46 -0
  111. package/dist/types/openui/registry/button.d.ts +148 -0
  112. package/dist/types/openui/registry/data.d.ts +177 -0
  113. package/dist/types/openui/registry/form.d.ts +65 -0
  114. package/dist/types/openui/registry/format.d.ts +67 -0
  115. package/dist/types/openui/registry/index.d.ts +9 -0
  116. package/dist/types/openui/registry/layout.d.ts +45 -0
  117. package/dist/types/openui/registry/navigation.d.ts +149 -0
  118. package/dist/types/openui/registry/overlay.d.ts +56 -0
  119. package/dist/types/openui/registry/typography.d.ts +17 -0
  120. package/dist/types/openui/renderer/action-context.d.ts +24 -0
  121. package/dist/types/openui/renderer/node-resolver.d.ts +9 -0
  122. package/dist/types/openui/renderer/openui-renderer.d.ts +32 -0
  123. package/dist/types/openui/renderer/skeleton.d.ts +2 -0
  124. package/dist/types/openui/streaming/from-fetch.d.ts +7 -0
  125. package/dist/types/openui/streaming/from-sse.d.ts +7 -0
  126. package/dist/types/openui/streaming/from-websocket.d.ts +10 -0
  127. package/dist/types/openui/streaming/types.d.ts +5 -0
  128. package/dist/types/tailwind/preset.d.ts +25 -4
  129. package/dist/types/tailwind/vite-plugin.d.ts +17 -5
  130. package/dist/types/tokens/colors.d.ts +87 -9
  131. package/dist/types/tokens/index.d.ts +7 -6
  132. package/dist/{ur-DBst-TXc.js → ur-Dls2qb4V.js} +1 -1
  133. package/dist/{ur-D9nLchps.cjs → ur-IRQoHh1E.cjs} +1 -1
  134. package/dist/use-form-BZ8vDYOv.cjs +2 -0
  135. package/dist/use-form-DsCzINfm.js +750 -0
  136. package/dist/utils-D3-NApSw.cjs +1 -0
  137. package/dist/utils-Nbh7yQ73.js +105 -0
  138. package/dist/{vi-Dg1aiMr5.cjs → vi-Bi9SvVCP.cjs} +1 -1
  139. package/dist/{vi-DQOJp32U.js → vi-C3mTzj50.js} +1 -1
  140. package/dist/widget-customization-BV6XB2v_.cjs +1 -0
  141. package/dist/widget-customization-Bso45ONQ.js +1198 -0
  142. package/dist/{zh-DPK4HXl2.js → zh-B4JRJBt2.js} +1 -1
  143. package/dist/{zh-tbwSTbmn.cjs → zh-BMU5rYu1.cjs} +1 -1
  144. package/package.json +31 -20
  145. package/dist/auth-divider-CjcrgXmq.cjs +0 -1
  146. package/dist/custom-validation-7por5nJN.js +0 -488
  147. package/dist/custom-validation-CLscGHY4.cjs +0 -1
  148. package/dist/deep-merge-D90SW1Ci.cjs +0 -1
  149. package/dist/deep-merge-DT2H9AGq.js +0 -1765
  150. package/dist/duration-input-4AQnQpyo.cjs +0 -1
  151. package/dist/menu-B60Q9j3-.cjs +0 -1
  152. package/dist/menu-BkqFGcXg.js +0 -366
  153. package/dist/notice-CQGJyZ8o.js +0 -211
  154. package/dist/notice-p2IqXS5-.cjs +0 -1
  155. package/dist/oneof-branch-detection-xDDDdYRk.cjs +0 -1
  156. package/dist/use-form-8NnZ-KHk.js +0 -1090
  157. package/dist/use-form-Dcra7GeE.cjs +0 -2
  158. package/dist/utils-DmEuG3Np.cjs +0 -1
  159. package/dist/utils-vUtP6iPG.js +0 -165
  160. package/dist/widget-customization-BIBva3f-.js +0 -1458
  161. package/dist/widget-customization-pqmtsraC.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const u=["description","comment","notes","text"];function m(e){if(typeof e=="boolean")return u;const r=e["x:ui"];return r&&Array.isArray(r.textAreaTriggers)?[...u,...r.textAreaTriggers]:u}function c(e){if(typeof e=="boolean")return;const r=e["x:ui"];if(r!=null&&(typeof r=="string"||typeof r=="object"&&r!==null))return r}function n(e,r){if(typeof e=="boolean")return;const s=c(e);if(typeof s=="object"&&typeof s.widget=="string")return{widget:s.widget,source:"explicit-widget",options:s};const o=typeof s=="string"?s:typeof s=="object"&&typeof s.format=="string"?s.format:void 0;if(o)return{widget:o,source:"explicit-format",options:typeof s=="object"?s:void 0};if(typeof e.format=="string")return{widget:{datetime:"date-time",base64:"binary",bytes:"binary",iri:"uri","iri-reference":"uri-reference","idn-hostname":"hostname"}[e.format]||e.format,source:"schema-format"};if(e.contentMediaType==="text/markdown")return{widget:"markdown",source:"schema-media"};if(e.contentMediaType!=null||e.contentEncoding==="base64")return{widget:"binary",source:"schema-media",options:{mediaType:e.contentMediaType,encoding:e.contentEncoding}};if(e.enum!=null)return{widget:"enum",source:"constraints"};if(e.const!=null)return{widget:"const",source:"constraints"};if((e.type==="number"||e.type==="integer"||Array.isArray(e.type)&&e.type.some(t=>t==="number"||t==="integer"))&&e.minimum!=null&&e.maximum!=null)return e.maximum-e.minimum<=5&&e.minimum>=0&&e.minimum<=1&&(e.multipleOf==null||e.multipleOf>=1)?{widget:"rating",source:"constraints",options:{max:e.maximum}}:{widget:"slider",source:"constraints",options:{min:e.minimum,max:e.maximum,step:e.multipleOf}};if(e.type==="string"){if(e.minLength!=null&&e.minLength>20||e.maxLength!=null&&e.maxLength>100)return{widget:"textarea",source:"heuristics"};if(r){const t=r.toLowerCase();if(t.includes("password")||t.includes("secret"))return{widget:"password",source:"heuristics"};if(t.includes("email"))return{widget:"email",source:"heuristics"};if(t.includes("url")||t.includes("link"))return{widget:"url",source:"heuristics"};if(t.includes("color"))return{widget:"color",source:"heuristics"};if(m(e).some(a=>t.includes(a.toLowerCase())))return{widget:"textarea",source:"heuristics"}}}}exports.getXUIConfig=c;exports.resolveWidget=n;
@@ -0,0 +1,105 @@
1
+ const u = ["description", "comment", "notes", "text"];
2
+ function c(e) {
3
+ if (typeof e == "boolean") return u;
4
+ const r = e["x:ui"];
5
+ return r && Array.isArray(r.textAreaTriggers) ? [...u, ...r.textAreaTriggers] : u;
6
+ }
7
+ function m(e) {
8
+ if (typeof e == "boolean") return;
9
+ const r = e["x:ui"];
10
+ if (r != null && (typeof r == "string" || typeof r == "object" && r !== null))
11
+ return r;
12
+ }
13
+ function g(e, r) {
14
+ if (typeof e == "boolean") return;
15
+ const s = m(e);
16
+ if (typeof s == "object" && typeof s.widget == "string")
17
+ return {
18
+ widget: s.widget,
19
+ source: "explicit-widget",
20
+ options: s
21
+ };
22
+ const o = typeof s == "string" ? s : typeof s == "object" && typeof s.format == "string" ? s.format : void 0;
23
+ if (o)
24
+ return {
25
+ widget: o,
26
+ source: "explicit-format",
27
+ options: typeof s == "object" ? s : void 0
28
+ };
29
+ if (typeof e.format == "string")
30
+ return {
31
+ widget: {
32
+ datetime: "date-time",
33
+ base64: "binary",
34
+ bytes: "binary",
35
+ iri: "uri",
36
+ "iri-reference": "uri-reference",
37
+ "idn-hostname": "hostname"
38
+ }[e.format] || e.format,
39
+ source: "schema-format"
40
+ };
41
+ if (e.contentMediaType === "text/markdown")
42
+ return {
43
+ widget: "markdown",
44
+ source: "schema-media"
45
+ };
46
+ if (e.contentMediaType != null || e.contentEncoding === "base64")
47
+ return {
48
+ widget: "binary",
49
+ source: "schema-media",
50
+ options: {
51
+ mediaType: e.contentMediaType,
52
+ encoding: e.contentEncoding
53
+ }
54
+ };
55
+ if (e.enum != null)
56
+ return {
57
+ widget: "enum",
58
+ source: "constraints"
59
+ };
60
+ if (e.const != null)
61
+ return {
62
+ widget: "const",
63
+ source: "constraints"
64
+ };
65
+ if ((e.type === "number" || e.type === "integer" || Array.isArray(e.type) && e.type.some((t) => t === "number" || t === "integer")) && e.minimum != null && e.maximum != null)
66
+ return e.maximum - e.minimum <= 5 && e.minimum >= 0 && e.minimum <= 1 && (e.multipleOf == null || e.multipleOf >= 1) ? {
67
+ widget: "rating",
68
+ source: "constraints",
69
+ options: { max: e.maximum }
70
+ } : {
71
+ widget: "slider",
72
+ source: "constraints",
73
+ options: {
74
+ min: e.minimum,
75
+ max: e.maximum,
76
+ step: e.multipleOf
77
+ }
78
+ };
79
+ if (e.type === "string") {
80
+ if (e.minLength != null && e.minLength > 20 || e.maxLength != null && e.maxLength > 100)
81
+ return {
82
+ widget: "textarea",
83
+ source: "heuristics"
84
+ };
85
+ if (r) {
86
+ const t = r.toLowerCase();
87
+ if (t.includes("password") || t.includes("secret"))
88
+ return { widget: "password", source: "heuristics" };
89
+ if (t.includes("email"))
90
+ return { widget: "email", source: "heuristics" };
91
+ if (t.includes("url") || t.includes("link"))
92
+ return { widget: "url", source: "heuristics" };
93
+ if (t.includes("color"))
94
+ return { widget: "color", source: "heuristics" };
95
+ if (c(e).some(
96
+ (a) => t.includes(a.toLowerCase())
97
+ ))
98
+ return { widget: "textarea", source: "heuristics" };
99
+ }
100
+ }
101
+ }
102
+ export {
103
+ m as g,
104
+ g as r
105
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-EwEmHe3v.cjs"),h={loadingExtended:"Đang tải, vui lòng đợi",loadingShort:"Đang tải...",locale:"Ngôn ngữ",iconDescription:"Biểu tượng",loadingIcon:"Biểu tượng tải",failedToLoadIcon:"Không thể tải biểu tượng",editLabel:"Chỉnh sửa",selectOne:"Chọn một",selectNone:"Không có",selectMany:"Chọn nhiều",noResults:"Không có kết quả",passwordPlaceholderText:"Mật khẩu bí mật",togglePasswordVisibility:"Chuyển đổi hiển thị mật khẩu",toggleMenu:"Chuyển đổi menu",toggleAside:"Chuyển đổi bảng bên",mainNavigation:"Điều hướng chính",sidebar:"Thanh bên",closeDrawer:"Đóng ngăn kéo",closeModal:"Đóng modal",confirm:"Xác nhận",cancel:"Hủy",addLabel:"Thêm",removeItem:"Xóa mục",currentLocale:"Tiếng Việt",ar:"Tiếng Ả Rập",de:"Tiếng Đức",en:"Tiếng Anh",es:"Tiếng Tây Ban Nha",fr:"Tiếng Pháp",hi:"Tiếng Hindi",it:"Tiếng Ý",ja:"Tiếng Nhật",ko:"Tiếng Hàn",nl:"Tiếng Hà Lan",pl:"Tiếng Ba Lan",pt:"Tiếng Bồ Đào Nha",ru:"Tiếng Nga",tr:"Tiếng Thổ Nhĩ Kỳ",vi:"Tiếng Việt",zh:"Tiếng Trung",he:"Tiếng Do Thái",fa:"Tiếng Ba Tư",ur:"Tiếng Urdu",emailPlaceholderText:"Nhập email của bạn",incrementValue:"Tăng giá trị",decrementValue:"Giảm giá trị",dropZoneInstructions:n=>n?"Nhấp để chọn hoặc kéo tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp":"Kéo tệp vào đây",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Xóa tệp",clearAllFiles:"Xóa tất cả tệp",clearValue:"Xóa giá trị",dateRangeStart:"Start",dateRangeEnd:"End",dateRangeNoLimit:"No limit",dateRangeSelectDate:"Select date",unknownType:"Loại không xác định",filesInputInstructions:(n,e,t)=>{let i=n==null||n>1?"Nhấp để chọn hoặc kéo tệp vào đây":"Nhấp để chọn hoặc kéo một tệp vào đây";if(n||e){const l=[];if(n!=null&&n>1&&l.push(`tối đa ${n} tệp`),e&&t){const o=a.formatFileSize(e,{units:t});l.push(`mỗi tệp tối đa ${o}`)}l.length>0&&(i+=` (${l.join(", ")})`)}return i},paginationLabel:"Phân trang",paginationRange:(n,e,t,i)=>i>t?`Hàng ${n} đến ${e} trong ${t} trên ${i}`:`Hàng ${n} đến ${e} trong ${t}`,firstPage:"Trang đầu",previousPage:"Trang trước",nextPage:"Trang tiếp",lastPage:"Trang cuối",breadcrumbs:"Thanh điều hướng",commandPalette:"Bảng lệnh",typeACommand:"Nhập lệnh...",noResultsFound:"Không tìm thấy kết quả",noMatchingCommands:"Không có lệnh phù hợp",appearanceSystem:"Hệ thống",appearanceLight:"Sáng",appearanceDark:"Tối",ok:"OK",changeTypeConfirmation:"Thay đổi loại sẽ xóa giá trị hiện tại. Tiếp tục?",notifications:"Thông báo",markAllAsRead:"Đánh dấu tất cả đã đọc",noNotifications:"Không có thông báo",schemaConflictsDetected:"Phát hiện xung đột lược đồ",schemaViolationsDetected:"Phát hiện vi phạm lược đồ",properties:"Thuộc tính",uploading:"Đang tải lên...",dropFilesOrBrowse:"Kéo thả tệp vào đây hoặc nhấp để duyệt",acceptedTypes:n=>`Loại tệp được chấp nhận: ${n}`,enterUrlPrompt:"Nhập URL:",exceeded:"(vượt quá)",pdfPreview:"Xem trước PDF",lexical:{fontFamily:"Phông chữ",fontSize:"Cỡ chữ",lineHeight:"Chiều cao dòng",fontColor:"Màu chữ",highlightColor:"Màu đánh dấu",backgroundColor:"Màu nền",bold:"Đậm",italic:"Nghiêng",underline:"Gạch chân",strikethrough:"Gạch ngang",code:"Mã",clearFormatting:"Xóa định dạng",normal:"Bình thường",heading:n=>`Tiêu đề ${n}`,bulletList:"Danh sách dấu đầu dòng",orderedList:"Danh sách đánh số",checkList:"Danh sách kiểm tra",indent:"Thụt lề",outdent:"Giảm thụt lề",blockquote:"Trích dẫn",codeBlock:"Khối mã",horizontalRule:"Đường kẻ ngang",insertTable:"Chèn bảng",link:"Liên kết",undo:"Hoàn tác",redo:"Làm lại",cut:"Cắt",copy:"Sao chép",paste:"Dán",defaultOption:"Mặc định",slashCommands:"Lệnh gạch chéo",noCommandsFound:"Không tìm thấy lệnh",changeBlockType:"Đổi loại khối",blockTypes:"Loại khối",enterUrl:"Nhập URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sắp xếp tăng dần",sortDescending:"Sắp xếp giảm dần",clearSort:"Xóa sắp xếp",filterPlaceholder:"Lọc...",clearFilter:"Xóa bộ lọc",selectAll:"Chọn tất cả",deselectAll:"Bỏ chọn tất cả",selectedCount:n=>`${n} đã chọn`,resetAll:"Đặt lại tất cả",noResults:"Không tìm thấy kết quả",loading:"Đang tải...",filterPanelAddCondition:"Thêm điều kiện",filterPanelApply:"Áp dụng",filterPanelClear:"Xóa bộ lọc",filterPanelAnd:"VÀ",filterPanelOr:"HOẶC",filterPanelContains:"Chứa",filterPanelNotContains:"Không chứa",filterPanelEquals:"Bằng",filterPanelNotEquals:"Không bằng",filterPanelStartsWith:"Bắt đầu với",filterPanelEndsWith:"Kết thúc với",filterPanelIsNull:"Trống",filterPanelIsNotNull:"Không trống",filterPanelGt:"Lớn hơn",filterPanelGte:"Lớn hơn hoặc bằng",filterPanelLt:"Nhỏ hơn",filterPanelLte:"Nhỏ hơn hoặc bằng",filterPanelBetween:"Trong khoảng",filterPanelValuePlaceholder:"Giá trị...",sortMultiHint:"Giữ Shift để sắp xếp nhiều cột",columnVisibility:"Cột",showAllColumns:"Hiển thị tất cả",menuSortAsc:"Sắp xếp tăng dần",menuSortDesc:"Sắp xếp giảm dần",menuClearSort:"Xóa sắp xếp",menuHideColumn:"Ẩn cột",menuChooseColumns:"Chọn cột",menuResetColumns:"Đặt lại cột",menuFilter:"Lọc",rowCount:(n,e)=>`Hàng: ${n} Tổng hàng: ${e}`,filterTagsPlaceholder:"Chọn giá trị...",groupCount:n=>`${n} mục`,collapseGroup:"Thu gọn nhóm",expandGroup:"Mở rộng nhóm",describeFilter:{textContains:(n,e)=>`${n} chứa "${e}"`,textNotContains:(n,e)=>`${n} không chứa "${e}"`,textEquals:(n,e)=>`${n} bằng "${e}"`,textNotEquals:(n,e)=>`${n} không bằng "${e}"`,textStartsWith:(n,e)=>`${n} bắt đầu bằng "${e}"`,textEndsWith:(n,e)=>`${n} kết thúc bằng "${e}"`,compareEq:(n,e)=>`${n} = ${e}`,compareNeq:(n,e)=>`${n} ≠ ${e}`,compareGt:(n,e)=>`${n} > ${e}`,compareGte:(n,e)=>`${n} ≥ ${e}`,compareLt:(n,e)=>`${n} < ${e}`,compareLte:(n,e)=>`${n} ≤ ${e}`,rangeBetween:(n,e,t)=>`${n} giữa ${e} và ${t}`,rangeGte:(n,e)=>`${n} ≥ ${e}`,rangeLte:(n,e)=>`${n} ≤ ${e}`,setIn:(n,e)=>`${n} trong [${e}]`,setNotIn:(n,e)=>`${n} không trong [${e}]`,booleanIs:(n,e)=>`${n} là ${e}`,isNull:n=>`${n} trống`,isNotNull:n=>`${n} không trống`,compositeAnd:n=>n.join(" VÀ "),compositeOr:n=>n.join(" HOẶC ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:n=>`Heading ${n}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},carousel:{label:"Băng chuyền",previousSlide:"Slide trước",nextSlide:"Slide tiếp theo",slideNavigation:"Điều hướng slide",slideOfTotal:(n,e)=>`Slide ${n} trên ${e}`,goToSlide:n=>`Đến slide ${n}`},datePicker:{label:"Chọn ngày",previousYear:"Năm trước",previousMonth:"Tháng trước",selectMonth:"Chọn tháng",selectYear:"Chọn năm",nextMonth:"Tháng sau",nextYear:"Năm sau",previousYears:n=>`${n} năm trước`,nextYears:n=>`${n} năm sau`,dateRangePickerLabel:"Chọn khoảng ngày",monthNames:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],shortMonthNames:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],dayNames:["CN","T2","T3","T4","T5","T6","T7"]},timePicker:{label:"Bộ chọn thời gian",hoursLabel:"HH",minutesLabel:"MM",secondsLabel:"SS",selectHours:"Chọn giờ",selectMinutes:"Chọn phút",selectSeconds:"Chọn giây",selectPeriod:"Chọn SA/CH",nowLabel:"Bây giờ"},timeSelectTime:"Chọn thời gian",dateTimeSelectDateTime:"Chọn ngày và giờ",colorPicker:{hue:"Sắc độ",saturation:"Độ bão hòa",lightness:"Độ sáng",alpha:"Alpha",red:"Đỏ",green:"Xanh lá",blue:"Xanh dương",hex:"Hex",whiteness:"Độ trắng",blackness:"Độ đen",chroma:"Sắc độ(C)"},spotlight:{placeholder:"Tìm kiếm...",noResults:"Không tìm thấy kết quả",recentItems:"Gần đây",close:"Đóng"},virtualList:{listLabel:"Danh sách cuộn được"},stepper:{step:"Bước",stepOfTotal:(n,e)=>`Bước ${n} trên ${e}`,completed:"Hoàn thành",next:"Tiếp theo",previous:"Trước",complete:"Hoàn tất"},sortableList:{dragHandle:"Kéo để sắp xếp lại"},transferList:{available:"Có sẵn",selected:"Đã chọn",moveRight:"Chuyển sang đã chọn",moveLeft:"Chuyển sang có sẵn",moveAllRight:"Chuyển tất cả sang đã chọn",moveAllLeft:"Chuyển tất cả sang có sẵn",searchAvailable:"Tìm mục có sẵn…",searchSelected:"Tìm mục đã chọn…"},copyButton:{copied:"Đã sao chép!",copyToClipboard:"Sao chép vào bộ nhớ tạm"},numberStepper:{increment:"Tăng",decrement:"Giảm",value:"Giá trị"},statCard:{trendUp:"Xu hướng tăng",trendDown:"Xu hướng giảm",trendFlat:"Không thay đổi"},otpInputLabel:"Nhập mật khẩu một lần",otpDigitLabel:(n,e)=>`Chữ số ${n} trên ${e}`,scrollableGridView:"Chế độ xem lưới có thể cuộn",onboardingTour:{label:"Tour hướng dẫn",stepIndicator:(n,e)=>`Bước ${n} trên ${e}`,skip:"Bỏ qua",previous:"Trước",next:"Tiếp",finish:"Hoàn thành"},searchPlaceholder:"Tìm kiếm",pdfPageViewer:{loading:"Đang tải PDF...",loadFailed:"Không thể tải PDF",invalidPdf:"Tệp PDF không hợp lệ",pageOutOfRange:(n,e)=>`Trang ${n} nằm ngoài phạm vi (1-${e})`,renderFailed:"Không thể hiển thị trang PDF"}};exports.default=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./translations-D3xqZUTA.cjs"),h={loadingExtended:"Đang tải, vui lòng đợi",loadingShort:"Đang tải...",locale:"Ngôn ngữ",iconDescription:"Biểu tượng",loadingIcon:"Biểu tượng tải",failedToLoadIcon:"Không thể tải biểu tượng",editLabel:"Chỉnh sửa",selectOne:"Chọn một",selectNone:"Không có",selectMany:"Chọn nhiều",noResults:"Không có kết quả",passwordPlaceholderText:"Mật khẩu bí mật",togglePasswordVisibility:"Chuyển đổi hiển thị mật khẩu",toggleMenu:"Chuyển đổi menu",toggleAside:"Chuyển đổi bảng bên",mainNavigation:"Điều hướng chính",sidebar:"Thanh bên",closeDrawer:"Đóng ngăn kéo",closeModal:"Đóng modal",confirm:"Xác nhận",cancel:"Hủy",addLabel:"Thêm",removeItem:"Xóa mục",currentLocale:"Tiếng Việt",ar:"Tiếng Ả Rập",de:"Tiếng Đức",en:"Tiếng Anh",es:"Tiếng Tây Ban Nha",fr:"Tiếng Pháp",hi:"Tiếng Hindi",it:"Tiếng Ý",ja:"Tiếng Nhật",ko:"Tiếng Hàn",nl:"Tiếng Hà Lan",pl:"Tiếng Ba Lan",pt:"Tiếng Bồ Đào Nha",ru:"Tiếng Nga",tr:"Tiếng Thổ Nhĩ Kỳ",vi:"Tiếng Việt",zh:"Tiếng Trung",he:"Tiếng Do Thái",fa:"Tiếng Ba Tư",ur:"Tiếng Urdu",emailPlaceholderText:"Nhập email của bạn",incrementValue:"Tăng giá trị",decrementValue:"Giảm giá trị",dropZoneInstructions:n=>n?"Nhấp để chọn hoặc kéo tệp vào đây, hoặc nhấn Enter hoặc Space để mở trình chọn tệp":"Kéo tệp vào đây",fileSizeUnits:["Byte","KB","MB","GB","TB"],removeFile:"Xóa tệp",clearAllFiles:"Xóa tất cả tệp",clearValue:"Xóa giá trị",dateRangeStart:"Start",dateRangeEnd:"End",dateRangeNoLimit:"No limit",dateRangeSelectDate:"Select date",unknownType:"Loại không xác định",filesInputInstructions:(n,e,t)=>{let i=n==null||n>1?"Nhấp để chọn hoặc kéo tệp vào đây":"Nhấp để chọn hoặc kéo một tệp vào đây";if(n||e){const l=[];if(n!=null&&n>1&&l.push(`tối đa ${n} tệp`),e&&t){const o=a.formatFileSize(e,{units:t});l.push(`mỗi tệp tối đa ${o}`)}l.length>0&&(i+=` (${l.join(", ")})`)}return i},paginationLabel:"Phân trang",paginationRange:(n,e,t,i)=>i>t?`Hàng ${n} đến ${e} trong ${t} trên ${i}`:`Hàng ${n} đến ${e} trong ${t}`,firstPage:"Trang đầu",previousPage:"Trang trước",nextPage:"Trang tiếp",lastPage:"Trang cuối",breadcrumbs:"Thanh điều hướng",commandPalette:"Bảng lệnh",typeACommand:"Nhập lệnh...",noResultsFound:"Không tìm thấy kết quả",noMatchingCommands:"Không có lệnh phù hợp",appearanceSystem:"Hệ thống",appearanceLight:"Sáng",appearanceDark:"Tối",ok:"OK",changeTypeConfirmation:"Thay đổi loại sẽ xóa giá trị hiện tại. Tiếp tục?",notifications:"Thông báo",markAllAsRead:"Đánh dấu tất cả đã đọc",noNotifications:"Không có thông báo",schemaConflictsDetected:"Phát hiện xung đột lược đồ",schemaViolationsDetected:"Phát hiện vi phạm lược đồ",properties:"Thuộc tính",uploading:"Đang tải lên...",dropFilesOrBrowse:"Kéo thả tệp vào đây hoặc nhấp để duyệt",acceptedTypes:n=>`Loại tệp được chấp nhận: ${n}`,enterUrlPrompt:"Nhập URL:",exceeded:"(vượt quá)",pdfPreview:"Xem trước PDF",lexical:{fontFamily:"Phông chữ",fontSize:"Cỡ chữ",lineHeight:"Chiều cao dòng",fontColor:"Màu chữ",highlightColor:"Màu đánh dấu",backgroundColor:"Màu nền",bold:"Đậm",italic:"Nghiêng",underline:"Gạch chân",strikethrough:"Gạch ngang",code:"Mã",clearFormatting:"Xóa định dạng",normal:"Bình thường",heading:n=>`Tiêu đề ${n}`,bulletList:"Danh sách dấu đầu dòng",orderedList:"Danh sách đánh số",checkList:"Danh sách kiểm tra",indent:"Thụt lề",outdent:"Giảm thụt lề",blockquote:"Trích dẫn",codeBlock:"Khối mã",horizontalRule:"Đường kẻ ngang",insertTable:"Chèn bảng",link:"Liên kết",undo:"Hoàn tác",redo:"Làm lại",cut:"Cắt",copy:"Sao chép",paste:"Dán",defaultOption:"Mặc định",slashCommands:"Lệnh gạch chéo",noCommandsFound:"Không tìm thấy lệnh",changeBlockType:"Đổi loại khối",blockTypes:"Loại khối",enterUrl:"Nhập URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sắp xếp tăng dần",sortDescending:"Sắp xếp giảm dần",clearSort:"Xóa sắp xếp",filterPlaceholder:"Lọc...",clearFilter:"Xóa bộ lọc",selectAll:"Chọn tất cả",deselectAll:"Bỏ chọn tất cả",selectedCount:n=>`${n} đã chọn`,resetAll:"Đặt lại tất cả",noResults:"Không tìm thấy kết quả",loading:"Đang tải...",filterPanelAddCondition:"Thêm điều kiện",filterPanelApply:"Áp dụng",filterPanelClear:"Xóa bộ lọc",filterPanelAnd:"VÀ",filterPanelOr:"HOẶC",filterPanelContains:"Chứa",filterPanelNotContains:"Không chứa",filterPanelEquals:"Bằng",filterPanelNotEquals:"Không bằng",filterPanelStartsWith:"Bắt đầu với",filterPanelEndsWith:"Kết thúc với",filterPanelIsNull:"Trống",filterPanelIsNotNull:"Không trống",filterPanelGt:"Lớn hơn",filterPanelGte:"Lớn hơn hoặc bằng",filterPanelLt:"Nhỏ hơn",filterPanelLte:"Nhỏ hơn hoặc bằng",filterPanelBetween:"Trong khoảng",filterPanelValuePlaceholder:"Giá trị...",sortMultiHint:"Giữ Shift để sắp xếp nhiều cột",columnVisibility:"Cột",showAllColumns:"Hiển thị tất cả",menuSortAsc:"Sắp xếp tăng dần",menuSortDesc:"Sắp xếp giảm dần",menuClearSort:"Xóa sắp xếp",menuHideColumn:"Ẩn cột",menuChooseColumns:"Chọn cột",menuResetColumns:"Đặt lại cột",menuFilter:"Lọc",rowCount:(n,e)=>`Hàng: ${n} Tổng hàng: ${e}`,filterTagsPlaceholder:"Chọn giá trị...",groupCount:n=>`${n} mục`,collapseGroup:"Thu gọn nhóm",expandGroup:"Mở rộng nhóm",describeFilter:{textContains:(n,e)=>`${n} chứa "${e}"`,textNotContains:(n,e)=>`${n} không chứa "${e}"`,textEquals:(n,e)=>`${n} bằng "${e}"`,textNotEquals:(n,e)=>`${n} không bằng "${e}"`,textStartsWith:(n,e)=>`${n} bắt đầu bằng "${e}"`,textEndsWith:(n,e)=>`${n} kết thúc bằng "${e}"`,compareEq:(n,e)=>`${n} = ${e}`,compareNeq:(n,e)=>`${n} ≠ ${e}`,compareGt:(n,e)=>`${n} > ${e}`,compareGte:(n,e)=>`${n} ≥ ${e}`,compareLt:(n,e)=>`${n} < ${e}`,compareLte:(n,e)=>`${n} ≤ ${e}`,rangeBetween:(n,e,t)=>`${n} giữa ${e} và ${t}`,rangeGte:(n,e)=>`${n} ≥ ${e}`,rangeLte:(n,e)=>`${n} ≤ ${e}`,setIn:(n,e)=>`${n} trong [${e}]`,setNotIn:(n,e)=>`${n} không trong [${e}]`,booleanIs:(n,e)=>`${n} là ${e}`,isNull:n=>`${n} trống`,isNotNull:n=>`${n} không trống`,compositeAnd:n=>n.join(" VÀ "),compositeOr:n=>n.join(" HOẶC ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:n=>`Heading ${n}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},carousel:{label:"Băng chuyền",previousSlide:"Slide trước",nextSlide:"Slide tiếp theo",slideNavigation:"Điều hướng slide",slideOfTotal:(n,e)=>`Slide ${n} trên ${e}`,goToSlide:n=>`Đến slide ${n}`},datePicker:{label:"Chọn ngày",previousYear:"Năm trước",previousMonth:"Tháng trước",selectMonth:"Chọn tháng",selectYear:"Chọn năm",nextMonth:"Tháng sau",nextYear:"Năm sau",previousYears:n=>`${n} năm trước`,nextYears:n=>`${n} năm sau`,dateRangePickerLabel:"Chọn khoảng ngày",monthNames:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],shortMonthNames:["Th1","Th2","Th3","Th4","Th5","Th6","Th7","Th8","Th9","Th10","Th11","Th12"],dayNames:["CN","T2","T3","T4","T5","T6","T7"]},timePicker:{label:"Bộ chọn thời gian",hoursLabel:"HH",minutesLabel:"MM",secondsLabel:"SS",selectHours:"Chọn giờ",selectMinutes:"Chọn phút",selectSeconds:"Chọn giây",selectPeriod:"Chọn SA/CH",nowLabel:"Bây giờ"},timeSelectTime:"Chọn thời gian",dateTimeSelectDateTime:"Chọn ngày và giờ",colorPicker:{hue:"Sắc độ",saturation:"Độ bão hòa",lightness:"Độ sáng",alpha:"Alpha",red:"Đỏ",green:"Xanh lá",blue:"Xanh dương",hex:"Hex",whiteness:"Độ trắng",blackness:"Độ đen",chroma:"Sắc độ(C)"},spotlight:{placeholder:"Tìm kiếm...",noResults:"Không tìm thấy kết quả",recentItems:"Gần đây",close:"Đóng"},virtualList:{listLabel:"Danh sách cuộn được"},stepper:{step:"Bước",stepOfTotal:(n,e)=>`Bước ${n} trên ${e}`,completed:"Hoàn thành",next:"Tiếp theo",previous:"Trước",complete:"Hoàn tất"},sortableList:{dragHandle:"Kéo để sắp xếp lại"},transferList:{available:"Có sẵn",selected:"Đã chọn",moveRight:"Chuyển sang đã chọn",moveLeft:"Chuyển sang có sẵn",moveAllRight:"Chuyển tất cả sang đã chọn",moveAllLeft:"Chuyển tất cả sang có sẵn",searchAvailable:"Tìm mục có sẵn…",searchSelected:"Tìm mục đã chọn…"},copyButton:{copied:"Đã sao chép!",copyToClipboard:"Sao chép vào bộ nhớ tạm"},numberStepper:{increment:"Tăng",decrement:"Giảm",value:"Giá trị"},statCard:{trendUp:"Xu hướng tăng",trendDown:"Xu hướng giảm",trendFlat:"Không thay đổi"},otpInputLabel:"Nhập mật khẩu một lần",otpDigitLabel:(n,e)=>`Chữ số ${n} trên ${e}`,scrollableGridView:"Chế độ xem lưới có thể cuộn",onboardingTour:{label:"Tour hướng dẫn",stepIndicator:(n,e)=>`Bước ${n} trên ${e}`,skip:"Bỏ qua",previous:"Trước",next:"Tiếp",finish:"Hoàn thành"},searchPlaceholder:"Tìm kiếm",pdfPageViewer:{loading:"Đang tải PDF...",loadFailed:"Không thể tải PDF",invalidPdf:"Tệp PDF không hợp lệ",pageOutOfRange:(n,e)=>`Trang ${n} nằm ngoài phạm vi (1-${e})`,renderFailed:"Không thể hiển thị trang PDF"}};exports.default=h;
@@ -1,4 +1,4 @@
1
- import { f as h } from "./translations-BCMP-h52.js";
1
+ import { f as h } from "./translations-DU9wTV1y.js";
2
2
  const r = {
3
3
  loadingExtended: "Đang tải, vui lòng đợi",
4
4
  loadingShort: "Đang tải...",
@@ -0,0 +1 @@
1
+ "use strict";const l=require("@tempots/dom"),Q=require("./deep-merge-VDGE_HQD.cjs"),Xt=require("@tempots/std"),Z=require("./input-container-BaWQLWB6.cjs"),S=require("./text-input-MjlUC_9u.cjs"),ot=require("./translations-D3xqZUTA.cjs"),Ht=require("@tempots/ui"),R=require("./text-area-BdemKQ_w.cjs"),ct=require("./password-input-Bipt7Wsu.cjs"),Yt=require("./slider-input-SLguFA0d.cjs"),Gt=require("./utils-D3-NApSw.cjs");async function ht(t){return new Promise((e,r)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>{const n=a.result;e(n.split(",")[1])},a.onerror=n=>r(n)})}function Qt(t){return Promise.all(t.map(ht))}function Zt(t){if(t.length>=4){if(t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71)return"image/png";if(t[0]===255&&t[1]===216)return"image/jpeg";if(t[0]===71&&t[1]===73&&t[2]===70)return"image/gif";if(t[0]===82&&t[1]===73&&t[2]===70&&t[3]===70&&t.length>=12&&t[8]===87&&t[9]===69&&t[10]===66&&t[11]===80)return"image/webp"}try{if(new TextDecoder("utf-8").decode(t.slice(0,256)).includes("<svg"))return"image/svg+xml"}catch{}return"application/octet-stream"}function Jt(t){const e=Xt.decodeBase64(t??""),r=e.length,a=new Uint8Array(r);for(let n=0;n<r;n++)a[n]=e.charCodeAt(n);return a}function pt(t){const{value:e,onChange:r,onInput:a,...n}=t,s=new Map,o=l.Value.toSignal(e).map(y=>y.map((b,$)=>{const d=s.get(b),g=Jt(b??""),k=d?.type||Zt(g),N=d?.name??`file-${$}`,F=g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength),z=new Blob([F],{type:k});return new File([z],N,{type:k})})),i=y=>b=>{y&&Qt(b).then($=>{for(const[d,g]of $.entries())s.set(g,{name:b[d].name,type:b[d].type});y($)})},u=i(r),c=i(a);return Q.FilesInput({...n,value:o,onChange:u,onInput:c})}function Kt(t){const{value:e,onInput:r,onChange:a,...n}=t;return pt({...n,maxFiles:1,value:l.Value.map(e,s=>s==null?[]:[s]),onChange:s=>{a?.(s[0])},onInput:s=>{r?.(s[0])}})}let x=class extends Error{constructor(e){super(e),this.name="ParsingError"}};const p=(t,e,r)=>Math.min(Math.max(t,e),r),_=(t,e,r)=>Math.trunc(p(t,e,r)),I=(t,e)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},A=(t,e)=>(t=t%e,t<0&&(t+=e),t),J={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},dt=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,gt=/^rgba?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\s*(?:,\s*([\d.]+%?)\s*)?\)$/i,bt=/^rgba?\(\s*(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,mt=/^rgba?\(\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*([\d.]+%?)\s*)?\)$/i,ft=/^rgba?\(\s*(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,te=t=>dt.test(t.trim()),ee=t=>{const e=t.trim(),r=dt.exec(e);if(!r)throw new x(`Invalid hex color: '${t}'`);const a=r[1];return a.length===3?w(parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)):a.length===4?w(parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)/255):a.length===6?w(parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)):w(parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16),parseInt(a.slice(6,8),16)/255)},re=t=>{const e=t.trim();return gt.test(e)||bt.test(e)||mt.test(e)||ft.test(e)},ae=t=>{const e=t.trim(),r=gt.exec(e)??bt.exec(e);if(r)return w(_(parseFloat(r[1]),0,255),_(parseFloat(r[2]),0,255),_(parseFloat(r[3]),0,255),T(r[4]));const a=mt.exec(e)??ft.exec(e);if(a)return w(Math.round(parseFloat(a[1])/100*255),Math.round(parseFloat(a[2])/100*255),Math.round(parseFloat(a[3])/100*255),T(a[4]));throw new x(`Invalid rgb color: '${t}'`)},ne=t=>t.trim().toLowerCase()in J,le=t=>{const e=t.trim().toLowerCase(),r=J[e];if(!r)throw new x(`Unknown named color: '${t}'`);return w(r[0],r[1],r[2])},se=t=>t.alpha>=1?`rgb(${t.r} ${t.g} ${t.b})`:`rgb(${t.r} ${t.g} ${t.b} / ${t.alpha})`,oe=t=>{const e=j(t.r*100),r=j(t.g*100),a=j(t.b*100);return t.alpha>=1?`rgb(${e}% ${r}% ${a}%)`:`rgb(${e}% ${r}% ${a}% / ${t.alpha})`},j=t=>Math.round(t*100)/100,wt=/^hsla?\(\s*(-?\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)%\s*,\s*(\d+(?:\.\d+)?)%\s*(?:,\s*([\d.]+%?)\s*)?\)$/i,yt=/^hsla?\(\s*(-?\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,ie=t=>{const e=t.trim();return wt.test(e)||yt.test(e)},ue=t=>{const e=t.trim(),r=wt.exec(e)??yt.exec(e);if(!r)throw new x(`Invalid hsl color: '${t}'`);return D(parseFloat(r[1]),p(parseFloat(r[2])/100,0,1),p(parseFloat(r[3])/100,0,1),T(r[4]))},ce=t=>{const e=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(e,r,a),s=Math.min(e,r,a),o=n-s,i=(n+s)/2;if(o===0)return D(0,0,i,t.alpha);const u=o/(1-Math.abs(2*i-1));let c;return n===e?c=(r-a)/o%6:n===r?c=(a-e)/o+2:c=(e-r)/o+4,c*=60,c<0&&(c+=360),D(c,u,i,t.alpha)},he=t=>{const e=t.s,r=t.l,a=A(t.h,360),n=(1-Math.abs(2*r-1))*e,s=n*(1-Math.abs(a/60%2-1)),o=r-n/2;let i,u,c;return a<60?(i=n,u=s,c=0):a<120?(i=s,u=n,c=0):a<180?(i=0,u=n,c=s):a<240?(i=0,u=s,c=n):a<300?(i=s,u=0,c=n):(i=n,u=0,c=s),w(Math.round((i+o)*255),Math.round((u+o)*255),Math.round((c+o)*255),t.alpha)},pe=t=>{const e=X(t.h),r=X(t.s*100),a=X(t.l*100);return t.alpha>=1?`hsl(${e} ${r}% ${a}%)`:`hsl(${e} ${r}% ${a}% / ${t.alpha})`},X=t=>Math.round(t*100)/100,$t=/^hsva?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+%?)\s*)?\)$/i,Mt=/^hsva?\(\s*([\d.]+)\s+([\d.]+)%\s+([\d.]+)%\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,de=t=>{const e=t.trim();return $t.test(e)||Mt.test(e)},ge=t=>{const e=t.trim(),r=$t.exec(e)??Mt.exec(e);if(!r)throw new x(`Invalid hsv color: '${t}'`);return tt(A(parseFloat(r[1]),360),p(parseFloat(r[2])/100,0,1),p(parseFloat(r[3])/100,0,1),T(r[4]))},be=t=>{const e=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(e,r,a),s=Math.min(e,r,a),o=n-s,i=n,u=n===0?0:o/n;let c=0;return o!==0&&(n===e?c=(r-a)/o%6:n===r?c=(a-e)/o+2:c=(e-r)/o+4,c*=60,c<0&&(c+=360)),tt(c,u,i,t.alpha)},me=t=>{const e=t.s,r=t.v,a=r*e,n=a*(1-Math.abs(t.h/60%2-1)),s=r-a;let o=0,i=0,u=0;const c=t.h;return c<60?(o=a,i=n):c<120?(o=n,i=a):c<180?(i=a,u=n):c<240?(i=n,u=a):c<300?(o=n,u=a):(o=a,u=n),w(Math.round((o+s)*255),Math.round((i+s)*255),Math.round((u+s)*255),t.alpha)},fe=t=>{const e=t.h,r=Math.round(t.s*1e4)/100,a=Math.round(t.v*1e4)/100;return t.alpha>=1?`hsv(${e} ${r}% ${a}%)`:`hsv(${e} ${r}% ${a}% / ${t.alpha})`},It=/^hwb\(\s*(\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,we=t=>It.test(t.trim()),ye=t=>{const e=t.trim(),r=It.exec(e);if(!r)throw new x(`Invalid hwb color: '${t}'`);return et(parseFloat(r[1]),p(parseFloat(r[2])/100,0,1),p(parseFloat(r[3])/100,0,1),T(r[4]))},$e=t=>{const e=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(e,r,a),s=Math.min(e,r,a),o=n-s;let i;o===0?i=0:n===e?i=(r-a)/o*60:n===r?i=((a-e)/o+2)*60:i=((e-r)/o+4)*60,i<0&&(i+=360);const u=s,c=1-n;return et(i,u,c,t.alpha)},Me=t=>{let e=t.w,r=t.b;if(e+r>=1){const d=1/(e+r);e*=d,r*=d}const a=A(t.h,360)/60,n=Math.floor(a)%6,s=a-Math.floor(a);let o,i,u;switch(n){case 0:o=1,i=s,u=0;break;case 1:o=1-s,i=1,u=0;break;case 2:o=0,i=1,u=s;break;case 3:o=0,i=1-s,u=1;break;case 4:o=s,i=0,u=1;break;default:o=1,i=0,u=1-s;break}const c=1-e-r,y=p(Math.round((o*c+e)*255),0,255),b=p(Math.round((i*c+e)*255),0,255),$=p(Math.round((u*c+e)*255),0,255);return w(y,b,$,t.alpha)},Ie=t=>t.alpha>=1?`hwb(${t.h} ${t.w*100}% ${t.b*100}%)`:`hwb(${t.h} ${t.w*100}% ${t.b*100}% / ${t.alpha})`,vt=/^lab\(\s*([\d.]+%?)\s+([-\d.]+)\s+([-\d.]+)\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,xt=/^lch\(\s*([\d.]+%?)\s+([\d.]+)\s+([\d.]+)\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,H=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4),Y=t=>t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055,ve=(t,e,r)=>[.4124564*t+.3575761*e+.1804375*r,.2126729*t+.7151522*e+.072175*r,.0193339*t+.119192*e+.9503041*r],xe=(t,e,r)=>[3.2404542*t-1.5371385*e-.4985314*r,-.969266*t+1.8760108*e+.041556*r,.0556434*t-.2040259*e+1.0572252*r],kt=.95047,Ft=1,Vt=1.08883,K=6/29,ke=K**3,Tt=3*K**2,Fe=(t,e,r)=>{const a=i=>i>ke?Math.cbrt(i):i/Tt+.13793103448275862,n=a(t/kt),s=a(e/Ft),o=a(r/Vt);return[116*s-16,500*(n-s),200*(s-o)]},Ve=(t,e,r)=>{const a=i=>i>K?i**3:Tt*(i-.13793103448275862),n=(t+16)/116,s=e/500+n,o=n-r/200;return[kt*a(s),Ft*a(n),Vt*a(o)]},Te=(t,e,r)=>{const a=Math.sqrt(e*e+r*r);let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,a,n]},Ae=(t,e,r)=>{const a=r*Math.PI/180;return[t,e*Math.cos(a),e*Math.sin(a)]},At=t=>(t.endsWith("%"),p(parseFloat(t),0,100)/100),Ne=t=>vt.test(t.trim()),We=t=>{const e=vt.exec(t.trim());if(!e)throw new x(`Invalid lab color: '${t}'`);return P(At(e[1]),parseFloat(e[2]),parseFloat(e[3]),T(e[4]))},_e=t=>xt.test(t.trim()),Ce=t=>{const e=xt.exec(t.trim());if(!e)throw new x(`Invalid lch color: '${t}'`);return rt(At(e[1]),Math.max(0,parseFloat(e[2])),A(parseFloat(e[3]),360),T(e[4]))},Nt=t=>{const e=H(t.r/255),r=H(t.g/255),a=H(t.b/255),[n,s,o]=ve(e,r,a),[i,u,c]=Fe(n,s,o);return P(i/100,u,c,t.alpha)},Wt=t=>{const[e,r,a]=Ve(t.l*100,t.a,t.b),[n,s,o]=xe(e,r,a);return w(Math.round(p(Y(n),0,1)*255),Math.round(p(Y(s),0,1)*255),Math.round(p(Y(o),0,1)*255),t.alpha)},Se=t=>{const e=Nt(t),[r,a,n]=Te(e.l*100,e.a,e.b);return rt(r/100,a,n,t.alpha)},Ee=t=>{const[e,r,a]=Ae(t.l*100,t.c,t.h);return Wt(P(e/100,r,a,t.alpha))},qe=t=>{const e=I(t.l*100,2),r=I(t.a,4),a=I(t.b,4);return t.alpha>=1?`lab(${e} ${r} ${a})`:`lab(${e} ${r} ${a} / ${t.alpha})`},Be=t=>{const e=I(t.l*100,2),r=I(t.c,4),a=I(t.h,4);return t.alpha>=1?`lch(${e} ${r} ${a})`:`lch(${e} ${r} ${a} / ${t.alpha})`},_t=/^oklab\(\s*([\d.]+%?)\s+([-\d.]+)\s+([-\d.]+)\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,Ct=/^oklch\(\s*([\d.]+%?)\s+([\d.]+)\s+([\d.]+)\s*(?:\/\s*([\d.]+%?)\s*)?\)$/i,C=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4),G=t=>t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055,St=(t,e,r)=>{const a=.4122214708*t+.5363325363*e+.0514459929*r,n=.2119034982*t+.6806995451*e+.1073969566*r,s=.0883024619*t+.2817188376*e+.6299787005*r,o=Math.cbrt(a),i=Math.cbrt(n),u=Math.cbrt(s),c=.2104542553*o+.793617785*i-.0040720468*u,y=1.9779984951*o-2.428592205*i+.4505937099*u,b=.0259040371*o+.7827717662*i-.808675766*u;return[c,y,b]},Re=(t,e,r)=>{const a=t+.3963377774*e+.2158037573*r,n=t-.1055613458*e-.0638541728*r,s=t-.0894841775*e-1.291485548*r,o=a*a*a,i=n*n*n,u=s*s*s,c=4.0767416621*o-3.3077115913*i+.2309699292*u,y=-1.2684380046*o+2.6097574011*i-.3413193965*u,b=-.0041960863*o-.7034186147*i+1.707614701*u;return[c,y,b]},De=(t,e,r)=>{const a=Math.sqrt(e*e+r*r);let n=Math.atan2(r,e)*180/Math.PI;return n<0&&(n+=360),[t,a,n]},Pe=(t,e,r)=>{const a=r*Math.PI/180,n=e*Math.cos(a),s=e*Math.sin(a);return[t,n,s]},Et=t=>t.endsWith("%")?parseFloat(t)/100:parseFloat(t),Oe=t=>_t.test(t.trim()),Ue=t=>{const e=_t.exec(t.trim());if(!e)throw new x(`Invalid oklab color: '${t}'`);return O(Et(e[1]),parseFloat(e[2]),parseFloat(e[3]),T(e[4]))},ze=t=>Ct.test(t.trim()),Le=t=>{const e=Ct.exec(t.trim());if(!e)throw new x(`Invalid oklch color: '${t}'`);return at(Et(e[1]),parseFloat(e[2]),parseFloat(e[3]),T(e[4]))},je=t=>{const e=C(t.r/255),r=C(t.g/255),a=C(t.b/255),[n,s,o]=St(e,r,a);return O(n,s,o,t.alpha)},qt=t=>{const[e,r,a]=Re(t.l,t.a,t.b);return w(Math.round(p(G(e),0,1)*255),Math.round(p(G(r),0,1)*255),Math.round(p(G(a),0,1)*255),t.alpha)},Xe=t=>{const e=C(t.r/255),r=C(t.g/255),a=C(t.b/255),[n,s,o]=St(e,r,a),[i,u,c]=De(n,s,o);return at(i,u,c,t.alpha)},He=t=>{const[e,r,a]=Pe(t.l,t.c,t.h);return qt(O(e,r,a,t.alpha))},Ye=t=>{const e=I(t.l,5),r=I(t.a,5),a=I(t.b,5);return t.alpha>=1?`oklab(${e} ${r} ${a})`:`oklab(${e} ${r} ${a} / ${t.alpha})`},Ge=t=>{const e=I(t.l,5),r=I(t.c,5),a=I(t.h,2);return t.alpha>=1?`oklch(${e} ${r} ${a})`:`oklch(${e} ${r} ${a} / ${t.alpha})`},Bt=(t,e,r,a=1)=>({space:"rgb",r:p(t,0,1),g:p(e,0,1),b:p(r,0,1),alpha:p(a,0,1)}),w=(t,e,r,a=1)=>({space:"rgb8",r:_(t,0,255),g:_(e,0,255),b:_(r,0,255),alpha:p(a,0,1)}),D=(t,e,r,a=1)=>({space:"hsl",h:A(t,360),s:p(e,0,1),l:p(r,0,1),alpha:p(a,0,1)}),tt=(t,e,r,a=1)=>({space:"hsv",h:A(t,360),s:p(e,0,1),v:p(r,0,1),alpha:p(a,0,1)}),et=(t,e,r,a=1)=>({space:"hwb",h:A(t,360),w:p(e,0,1),b:p(r,0,1),alpha:p(a,0,1)}),P=(t,e,r,a=1)=>({space:"lab",l:p(t,0,1),a:e,b:r,alpha:p(a,0,1)}),rt=(t,e,r,a=1)=>({space:"lch",l:p(t,0,1),c:Math.max(0,e),h:A(r,360),alpha:p(a,0,1)}),O=(t,e,r,a=1)=>({space:"oklab",l:p(t,0,1),a:e,b:r,alpha:p(a,0,1)}),at=(t,e,r,a=1)=>({space:"oklch",l:p(t,0,1),c:Math.max(0,e),h:A(r,360),alpha:p(a,0,1)}),T=t=>t==null?1:t.endsWith("%")?p(parseFloat(t)/100,0,1):p(parseFloat(t),0,1),Qe=t=>w(Math.round(t.r*255),Math.round(t.g*255),Math.round(t.b*255),t.alpha),Ze=t=>Bt(t.r/255,t.g/255,t.b/255,t.alpha),nt=t=>{const e=t.trim().toLowerCase();if(e.startsWith("#")||e.startsWith("rgba")||e.startsWith("rgb("))return"rgb8";if(e.startsWith("hsla")||e.startsWith("hsl("))return"hsl";if(e.startsWith("hsva")||e.startsWith("hsv("))return"hsv";if(e.startsWith("hwb("))return"hwb";if(e.startsWith("oklab("))return"oklab";if(e.startsWith("oklch("))return"oklch";if(e.startsWith("lab("))return"lab";if(e.startsWith("lch("))return"lch";if(e in J)return"rgb8"},Je=t=>{const e=nt(t);if(e==null)return!1;switch(e){case"rgb8":return te(t)||re(t)||ne(t);case"hsl":return ie(t);case"hsv":return de(t);case"hwb":return we(t);case"lab":return Ne(t);case"lch":return _e(t);case"oklab":return Oe(t);case"oklch":return ze(t);default:return!1}},lt=t=>{switch(nt(t)){case"rgb8":{const e=t.trim();return e.startsWith("#")?ee(t):/^rgba?\(/i.test(e)?ae(t):le(t)}case"hsl":return ue(t);case"hsv":return ge(t);case"hwb":return ye(t);case"lab":return We(t);case"lch":return Ce(t);case"oklab":return Ue(t);case"oklch":return Le(t);default:throw new x(`Unrecognized color format: '${t}'`)}},Ke=t=>{switch(t.space){case"rgb":return Qe(t);case"rgb8":return t;case"hsl":return he(t);case"hsv":return me(t);case"hwb":return Me(t);case"lab":return Wt(t);case"lch":return Ee(t);case"oklab":return qt(t);case"oklch":return He(t)}},tr=(t,e)=>{switch(e){case"rgb":return Ze(t);case"rgb8":return t;case"hsl":return ce(t);case"hsv":return be(t);case"hwb":return $e(t);case"lab":return Nt(t);case"lch":return Se(t);case"oklab":return je(t);case"oklch":return Xe(t)}},U=(t,e)=>t.space===e?t:tr(Ke(t),e),st=t=>{switch(t.space){case"rgb":return oe(t);case"rgb8":return se(t);case"hsl":return pe(t);case"hsv":return fe(t);case"hwb":return Ie(t);case"lab":return qe(t);case"lch":return Be(t);case"oklab":return Ye(t);case"oklch":return Ge(t)}};function er(t){let e=t+1831565813;return function(){return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function rr(t){try{const e=U(lt(t),"rgb8");return[e.r,e.g,e.b,e.alpha]}catch{return[0,0,0,1]}}function it(t,e,r){return st(w(t,e,r))}function ut(t){try{const e=U(lt(t),"rgb8");return{r:e.r,g:e.g,b:e.b}}catch{return null}}function ar(t,e,r,a){return`rgba(${Math.round(t)}, ${Math.round(e)}, ${Math.round(r)}, ${Math.max(0,Math.min(1,Math.round(a*100)/100))})`}function q(t,e,r,a,n){const s=w(Math.round(t),Math.round(e),Math.round(r),a),i=U(s,n==="hex"?"rgb8":n==="rgba"?"rgb":n==="hsla"?"hsl":n==="rgb"?"rgb":n);return st(i)}function B(t,e){return e?t==="rgb"?"rgba":t==="hsl"?"hsla":t:t==="rgba"?"rgb":t==="hsla"?"hsl":t}function nr(t,e){const[r,a,n]=t,s=r<<16^a<<8^n,o=er(s),i=6+Math.floor(o()*5),u=.18+o()*.06,c=[];for(let d=0;d<i;d++){const g=d/i*Math.PI*2,k=e*(1+(o()*2-1)*u),N=Math.cos(g)*k,F=Math.sin(g)*k;c.push({x:N,y:F})}const y=(c[0].x+c[i-1].x)/2,b=(c[0].y+c[i-1].y)/2;let $=`M ${y.toFixed(3)} ${b.toFixed(3)}`;for(let d=0;d<i;d++){const g=c[d],k=c[(d+1)%i],N=(g.x+k.x)/2,F=(g.y+k.y)/2;$+=` Q ${g.x.toFixed(3)} ${g.y.toFixed(3)} ${N.toFixed(3)} ${F.toFixed(3)}`}return $+=" Z",$}const lr=t=>{const{value:e,onBlur:r,onChange:a,onInput:n,displayValue:s,swatchSize:o,withAlpha:i}=t,u={xs:20,sm:26,md:32,lg:40,xl:52},c=o!=null?l.Value.map(o,h=>Number(h)):l.Value.map(t.size??"md",h=>u[h]??32),y=l.Value.map(e,h=>rr(h??"#000000")),b=l.Value.map(y,([h,m,f])=>[h,m,f]),$=l.Value.map(y,([,,,h])=>h),d=l.prop(l.Value.get($)??1),g=l.Value.map(i??!1,h=>h),k=l.Value.map(t.colorTextFormat??"rgb",h=>h),N=l.computedOf(b,d,k,g)(([h,m,f],M,v,V)=>q(h,m,f,M??1,B(v,V))),F=l.Value.map(t.colorTextFormat??"hex",h=>h),z=l.Value.map(c,h=>`${-h/2} ${-h/2} ${h} ${h}`),Ot=l.computedOf(b,c)((h,m)=>nr(h,m/2)),Ut=l.computedOf(b,d,g)(([h,m,f],M,v)=>v||M<1?ar(h,m,f,M):it(h,m,f)),zt=l.html.div(l.attr.class("bc-color-swatch-input__control"),l.attr.class(l.Value.map(g,h=>h?"bc-color-swatch-input__control--alpha":"")),l.attr.style(l.computedOf(c)(h=>`width:${h+2}px;height:${h+2}px`)),l.svg.svg(l.attr.class("bc-color-swatch-input__svg"),l.svgAttr.viewBox(z),l.svg.path(l.svgAttr.d(Ot),l.svgAttr.fill(Ut))),l.html.input(l.attr.type("color"),S.CommonInputAttributes(t),l.attr.value(l.Value.map(b,([h,m,f])=>it(h,m,f))),l.attr.class("bc-input bc-color-swatch-input bc-color-swatch-input__native"),r!=null?l.on.blur(r):l.Empty,a!=null?l.on.change(h=>{const m=h.target.value;if(!a)return;const{r:f,g:M,b:v}=ut(m)??{r:0,g:0,b:0},V=l.Value.get(d)??1,W=B(l.Value.get(F),l.Value.get(g)),L=q(f,M,v,V,W);a(L)}):l.Empty,n!=null?l.on.input(h=>{const m=h.target.value;if(!n)return;const{r:f,g:M,b:v}=ut(m)??{r:0,g:0,b:0},V=l.Value.get(d)??1,W=B(l.Value.get(F),l.Value.get(g)),L=q(f,M,v,V,W);n(L)}):l.Empty)),Lt=l.When(g,()=>l.html.input(l.attr.type("range"),l.attr.class("bc-color-swatch-input__alpha"),l.attr.min(0),l.attr.max(1),l.attr.step(.01),l.attr.value(l.Value.map(d,h=>String(h??1))),l.attr.disabled(t.disabled),l.on.input(h=>{const m=parseFloat(h.target.value);d.set(m);const[f,M,v]=l.Value.get(b),V=B(l.Value.get(F),l.Value.get(g)),W=q(f,M,v,m,V);n?.(W)}),l.on.change(h=>{const m=parseFloat(h.target.value);d.set(m);const[f,M,v]=l.Value.get(b),V=B(l.Value.get(F),l.Value.get(g)),W=q(f,M,v,m,V);a?.(W)}))),{swatchSize:Ir,displayValue:vr,withAlpha:xr,colorTextFormat:kr,...jt}=t;return Z.InputContainer({baseContainer:!0,...jt,growInput:!1,input:zt,after:l.Fragment(l.When(s??!1,()=>l.html.span(l.attr.class("bc-color-swatch-input__rgb"),N)),Lt,t.after)})},Rt=t=>typeof t=="string"&&t.trim()===""?null:t,Dt=t=>t??"";function E(t){return e=>{const{after:r,disabled:a}=e,n=S.mapInputOptions(e,Dt,Rt),s=R.NullableResetAfter(e.value,a,e.onChange??e.onInput);return t({...n,after:r!=null?l.Fragment(s,r):s})}}const sr=({startEditing:t,value:e,onChange:r,placeholder:a,disabled:n})=>{const s=l.Value.deriveProp(t??!1),o=l.prop(!1),i=l.Value.map(n??!1,u=>u);return l.html.div(l.attr.class("bc-editable-text"),l.attr.class(l.Value.map(i,u=>u?"bc-editable-text--disabled":"")),l.aria.disabled(i),l.When(s,()=>l.html.input(l.attr.placeholder(a),l.attr.value(e),l.attr.class("bc-editable-text__input"),Ht.AutoSelect(),l.on.keydown(u=>{u.key==="Enter"?s.set(!1):u.key==="Escape"&&(o.set(!0),s.set(!1))}),l.on.blur(l.emitValue(u=>{if(s.set(!1),o.value){o.set(!1);return}r(u)}))),()=>l.html.span(l.on.click(()=>{l.Value.get(i)||s.set(!0)}),l.attr.class("bc-editable-text__display"),l.When(l.Value.map(e,u=>u!=null&&u.trim()!==""),()=>l.html.span(l.attr.class("bc-editable-text__text"),e),()=>l.html.span(l.attr.class("bc-editable-text__placeholder"),a)),l.When(l.Value.map(i,u=>!u),()=>l.html.button(l.attr.type("button"),l.attr.class("bc-editable-text__edit-button"),l.Use(ot.BeatUII18n,u=>l.aria.label(u.$.editLabel)),l.on.click(()=>s.set(!0)),ot.Icon({icon:"line-md/pencil",color:"neutral"}))))))},or=t=>{const{value:e,onBlur:r,onChange:a,onInput:n,after:s,disabled:o}=t,i=R.NullableResetAfter(e,o,a??n);return Z.InputContainer({...t,input:l.input.date(S.CommonInputAttributes(t),l.attr.valueAsDate(e),l.attr.class("bc-input"),r!=null?l.on.blur(l.emitValue(r)):l.Empty,a!=null?l.on.change(l.emitValueAsNullableDate(a)):l.Empty,n!=null?l.on.input(l.emitValueAsNullableDate(n)):l.Empty),after:s!=null?l.Fragment(i,s):i})},ir=t=>{const e=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),n=t.getHours(),s=t.getMinutes(),o=t.getSeconds();return`${e}-${r.toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}T${n.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`},ur=t=>{const{value:e,onBlur:r,onChange:a,onInput:n,after:s,disabled:o}=t,i=l.Value.map(e,c=>c!=null?ir(c):null),u=R.NullableResetAfter(e,o,a??n);return Z.InputContainer({...t,input:l.input["datetime-local"](S.CommonInputAttributes(t),l.attr.value(l.Value.map(i,c=>c??null)),l.attr.class("bc-input"),r!=null?l.on.blur(l.emitValue(r)):l.Empty,a!=null?l.on.change(l.emitValueAsNullableDateTime(a)):l.Empty,n!=null?l.on.input(l.emitValueAsNullableDateTime(n)):l.Empty),after:s!=null?l.Fragment(u,s):u})},cr=E(ct.EmailInput),hr=E(S.TextInput),pr=E(ct.PasswordInput),dr=E(R.TextArea),gr=E(Q.UuidInput),br=t=>{const{after:e,disabled:r}=t,a=S.mapInputOptions(t,s=>s??0,s=>s),n=R.NullableResetAfter(t.value,r,t.onChange??t.onInput);return Yt.RatingInput({...a,after:e!=null?l.Fragment(n,e):n})},mr=E(Q.UrlInput);class Pt{widgets=new Map;typeMapping=new Map;register(e,r){if(this.widgets.set(e,r),r.supportedTypes)for(const a of r.supportedTypes)this.typeMapping.has(a)||this.typeMapping.set(a,[]),this.typeMapping.get(a).push(e),this.typeMapping.get(a).sort((n,s)=>{const o=this.widgets.get(n)?.priority||0;return(this.widgets.get(s)?.priority||0)-o})}unregister(e){const r=this.widgets.get(e);if(r&&(this.widgets.delete(e),r.supportedTypes))for(const a of r.supportedTypes){const n=this.typeMapping.get(a);if(n){const s=n.indexOf(e);s>=0&&n.splice(s,1),n.length===0&&this.typeMapping.delete(a)}}}get(e){return this.widgets.get(e)}getAll(){return new Map(this.widgets)}getForType(e){return(this.typeMapping.get(e)||[]).map(a=>this.widgets.get(a)).filter(Boolean)}findBestWidget(e){const r=Gt.resolveWidget(e.definition,e.name);if(r?.widget){const n=this.widgets.get(r.widget);if(n)return{name:r.widget,registration:n,resolved:r}}const a=[];for(const[n,s]of this.widgets.entries())if(s.matcher)try{s.matcher(e)&&a.push({name:n,registration:s,priority:s.priority??0})}catch(o){console.warn(`Error in matcher for widget "${n}":`,o)}if(a.length>0){a.sort((s,o)=>o.priority-s.priority);const n=a[0];return{name:n.name,registration:n.registration,resolved:{widget:n.name,source:"heuristics"}}}if(typeof e.definition=="object"&&e.definition.type){const n=Array.isArray(e.definition.type)?e.definition.type[0]:e.definition.type,s=this.getForType(n);if(s.length>0){const o=this.typeMapping.get(n)[0];return{name:o,registration:s[0],resolved:{widget:o,source:"type-fallback"}}}}return null}}const fr=new Pt;function wr(t,e,r){return{factory:e,matcher:a=>{const s=a.definition["x:ui"];return s===t||typeof s=="object"&&s!==null&&s.widget===t},displayName:r?.displayName??t,priority:r?.priority??100,...r}}function yr(t,e,r){return{factory:e,matcher:a=>a.definition.format===t,displayName:r?.displayName??`${t} widget`,priority:r?.priority??75,...r}}function $r(t,e,r,a){return{factory:r,matcher:n=>{const s=n.definition;return s.type===t&&s.format===e},displayName:a?.displayName??`${t}:${e} widget`,priority:a?.priority??80,...a}}function Mr(t){const e=t?.logPrefix??"WIDGET_DIAG",r=t?.filterFn??(()=>!0);return{factory:()=>null,displayName:"Diagnostic Widget (never matches)",priority:-1e3,matcher:a=>{if(!r(a))return!1;const n=a.definition,s={name:a.name,path:a.path.map(String),type:n?.type,hasRegistry:a.widgetRegistry!==void 0,definition:n};return console.log(`[${e}] name="${s.name??"ROOT"}" path=[${s.path.join(", ")}] type="${s.type??"unknown"}" hasRegistry=${s.hasRegistry}`),t?.onProcess?.(s),!1}}}exports.Base64Input=Kt;exports.Base64sInput=pt;exports.ColorSwatchInput=lr;exports.EditableText=sr;exports.F=tt;exports.H=P;exports.I=O;exports.Lt=st;exports.NullableDateInput=or;exports.NullableDateTimeInput=ur;exports.NullableEmailInput=cr;exports.NullablePasswordInput=pr;exports.NullableRatingInput=br;exports.NullableTextArea=dr;exports.NullableTextInput=hr;exports.NullableUrlInput=mr;exports.NullableUuidInput=gr;exports.WidgetRegistry=Pt;exports._t=lt;exports.b=w;exports.createDiagnosticWidget=Mr;exports.emptyToNull=Rt;exports.es=nt;exports.fileToBase64=ht;exports.forFormat=yr;exports.forTypeAndFormat=$r;exports.forXUI=wr;exports.globalWidgetRegistry=fr;exports.k=D;exports.ns=rt;exports.nt=Bt;exports.nullToEmpty=Dt;exports.os=at;exports.rs=et;exports.vt=Je;exports.xt=U;