adminizer 4.7.0-build.224 → 5.0.0-build.1

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 (307) hide show
  1. package/Readme.md +2 -1
  2. package/assets/add-De0wyF0A.js +1 -0
  3. package/assets/add-group-CMWybgIR.js +1 -0
  4. package/assets/add-user-BxP23daH.js +1 -0
  5. package/assets/app-CtWuWD5N.css +1 -0
  6. package/assets/app-layout-GYMU2HO1.js +1 -0
  7. package/assets/app.js +45 -50
  8. package/assets/catalog-tImW1BnS.js +6 -0
  9. package/assets/controls/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
  10. package/assets/controls/chunks/index-CjiZ2FIa.js +93 -0
  11. package/assets/controls/chunks/jsx-runtime-jIxVPx5o.js +31 -0
  12. package/assets/controls/chunks/use-appearance-CFLOwiSX.js +38 -0
  13. package/assets/controls/chunks/use-window-size-BXgBKW65.js +19 -0
  14. package/assets/controls/chunks/vanilla-picker-Dg97NL4h.js +529 -0
  15. package/assets/controls/ckeditor.es.js +83683 -0
  16. package/assets/controls/handsontable.css +1 -0
  17. package/assets/controls/handsontable.es.js +70585 -0
  18. package/assets/controls/jsoneditor.css +1 -0
  19. package/assets/controls/jsoneditor.es.js +42082 -0
  20. package/assets/controls/leaflet.css +1 -0
  21. package/assets/controls/leaflet.es.js +10299 -0
  22. package/assets/controls/monaco.es.js +618 -0
  23. package/assets/controls/toast-ui.css +1 -0
  24. package/assets/controls/toast-ui.es.js +41797 -0
  25. package/assets/dashboard-CQ4atH3N.js +3 -0
  26. package/assets/debounce-BMmXVQ06.js +1 -0
  27. package/assets/history-BileQPEi.js +1 -0
  28. package/assets/init-user-8aUohVDq.js +1 -0
  29. package/assets/list-Pz_5mfSq.js +4 -0
  30. package/assets/login-CO4laf6m.js +1 -0
  31. package/assets/manifest.json +66 -602
  32. package/assets/media-manager-BDbpSSjH.js +6 -0
  33. package/assets/media-manager-BZPjl98I.css +1 -0
  34. package/assets/module-CQiOdgZN.js +1 -0
  35. package/assets/notification-BIyv1smE.js +20 -0
  36. package/assets/register-DBYIMXGQ.js +1 -0
  37. package/assets/ru-rYKdQbWF.js +1 -0
  38. package/assets/use-appearance-_EbbjHTh.js +1 -0
  39. package/assets/user-filters-list-Aq8CvCeh.js +1 -0
  40. package/assets/welcome-DxhWYzUL.js +1 -0
  41. package/controllers/add.d.ts +1 -1
  42. package/controllers/addGroup.js +3 -3
  43. package/controllers/addUser.js +3 -3
  44. package/controllers/catalog/Catalog.d.ts +1 -1
  45. package/controllers/catalog/Catalog.js +2 -1
  46. package/controllers/catalog/FrontendCatalogAdapter.d.ts +2 -12
  47. package/controllers/catalog/FrontendCatalogAdapter.js +3 -16
  48. package/controllers/catalog/FrontentCatalogAdapter.d.ts +2 -12
  49. package/controllers/catalog/FrontentCatalogAdapter.js +0 -16
  50. package/controllers/edit.js +6 -11
  51. package/controllers/editGroup.d.ts +1 -1
  52. package/controllers/editGroup.js +3 -3
  53. package/controllers/editUser.d.ts +1 -1
  54. package/controllers/editUser.js +3 -3
  55. package/controllers/feed.js +1 -1
  56. package/controllers/filter-fields/columns.js +1 -1
  57. package/controllers/filter-fields/getAllUserFilters.js +2 -2
  58. package/controllers/filter-fields/groups.js +2 -2
  59. package/controllers/filter-fields/savedFilters.js +1 -1
  60. package/controllers/history-actions/HistoryController.js +1 -1
  61. package/controllers/initUser.js +2 -2
  62. package/controllers/list.d.ts +1 -1
  63. package/controllers/login.d.ts +1 -1
  64. package/controllers/login.js +3 -3
  65. package/controllers/media-manager/ThumbController.js +2 -2
  66. package/controllers/media-manager/mediaManagerApi.js +13 -15
  67. package/controllers/register.d.ts +1 -1
  68. package/controllers/register.js +5 -5
  69. package/controllers/remove.d.ts +1 -1
  70. package/controllers/userApiKey.js +2 -2
  71. package/controllers/view.d.ts +1 -1
  72. package/controllers/view.js +5 -5
  73. package/controllers/widgets/Action.js +5 -2
  74. package/controllers/widgets/filterInfo.js +1 -1
  75. package/files/favicon.png +0 -0
  76. package/helpers/accessRightsHelper.d.ts +6 -4
  77. package/helpers/accessRightsHelper.js +13 -0
  78. package/helpers/diffHelpers.js +1 -1
  79. package/helpers/fieldsHelper.d.ts +1 -1
  80. package/helpers/fieldsHelper.js +8 -4
  81. package/helpers/filterDatetimeHelper.d.ts +1 -1
  82. package/helpers/inertiaAddHelper.d.ts +6 -5
  83. package/helpers/inertiaAddHelper.js +45 -37
  84. package/helpers/inertiaAutHelper.js +5 -5
  85. package/helpers/inertiaGroupHelper.d.ts +4 -4
  86. package/helpers/inertiaMenuHelper.js +1 -1
  87. package/helpers/inertiaUserHelper.d.ts +3 -3
  88. package/helpers/inertiaUserHelper.js +1 -1
  89. package/helpers/menuHelper.d.ts +2 -2
  90. package/index.d.ts +19 -6
  91. package/index.js +19 -6
  92. package/interfaces/adminpanelConfig.d.ts +10 -33
  93. package/interfaces/global.d.ts +10 -15
  94. package/interfaces/listQueryBuilder.d.ts +1 -1
  95. package/lib/Adminizer.d.ts +25 -2
  96. package/lib/Adminizer.js +124 -50
  97. package/lib/DataAccessor.d.ts +9 -5
  98. package/lib/DataAccessor.js +89 -42
  99. package/lib/access-rights/AccessRightsHandler.d.ts +17 -0
  100. package/lib/access-rights/AccessRightsHandler.js +63 -0
  101. package/lib/ai-assistant/AbstractAiModelService.d.ts +5 -8
  102. package/lib/ai-assistant/AbstractAiModelService.js +3 -14
  103. package/lib/ai-assistant/AiAssistantHandler.d.ts +2 -2
  104. package/lib/app-manager/AdminizerApp.d.ts +228 -0
  105. package/lib/app-manager/AdminizerApp.js +17 -0
  106. package/lib/app-manager/AppManager.d.ts +18 -0
  107. package/lib/app-manager/AppManager.js +537 -0
  108. package/lib/app-manager/AssetHandler.d.ts +17 -0
  109. package/lib/app-manager/AssetHandler.js +67 -0
  110. package/lib/app-manager/ConfigLayerHandler.d.ts +18 -0
  111. package/lib/app-manager/ConfigLayerHandler.js +119 -0
  112. package/lib/app-manager/ControllerHandler.d.ts +25 -0
  113. package/lib/app-manager/ControllerHandler.js +140 -0
  114. package/lib/catalog/AbstractCatalog.d.ts +28 -19
  115. package/lib/catalog/AbstractCatalog.js +41 -10
  116. package/lib/catalog/CatalogHandler.d.ts +13 -0
  117. package/lib/catalog/CatalogHandler.js +48 -2
  118. package/lib/catalog/CatalogTemplateComponentHandler.d.ts +23 -0
  119. package/lib/catalog/CatalogTemplateComponentHandler.js +59 -0
  120. package/lib/controls/Control.d.ts +17 -0
  121. package/lib/controls/Control.js +1 -0
  122. package/lib/controls/ControlsHandler.d.ts +5 -6
  123. package/lib/controls/ControlsHandler.js +0 -13
  124. package/lib/controls/codeEditor/MonacoEditor.d.ts +3 -4
  125. package/lib/controls/codeEditor/MonacoEditor.js +13 -8
  126. package/lib/controls/geojsoneditor/GeoEditor.d.ts +3 -4
  127. package/lib/controls/geojsoneditor/GeoEditor.js +14 -9
  128. package/lib/controls/jsoneditor/JsonEditor.d.ts +5 -6
  129. package/lib/controls/jsoneditor/JsonEditor.js +14 -13
  130. package/lib/controls/markdown/ToastUiEditor.d.ts +5 -6
  131. package/lib/controls/markdown/ToastUiEditor.js +14 -13
  132. package/lib/controls/table/Handsontable.d.ts +5 -6
  133. package/lib/controls/table/Handsontable.js +14 -13
  134. package/lib/controls/wysiwyg/CKeditor.d.ts +5 -6
  135. package/lib/controls/wysiwyg/CKeditor.js +14 -13
  136. package/lib/filters/ConditionValidator.d.ts +1 -1
  137. package/lib/filters/FilterService.d.ts +18 -18
  138. package/lib/filters/FilterService.js +11 -11
  139. package/lib/history-actions/AbstractHistoryAdapter.d.ts +14 -14
  140. package/lib/history-actions/AbstractHistoryAdapter.js +5 -6
  141. package/lib/history-actions/DefaultHistoryAdapter.d.ts +7 -7
  142. package/lib/history-actions/DefaultHistoryAdapter.js +2 -2
  143. package/lib/list-query-builder/ListQueryBuilder.d.ts +1 -1
  144. package/lib/media-manager/AbstractMediaManager.d.ts +14 -3
  145. package/lib/media-manager/AbstractMediaManager.js +16 -5
  146. package/lib/media-manager/MediaManagerHandler.d.ts +3 -0
  147. package/lib/media-manager/MediaManagerHandler.js +30 -5
  148. package/lib/media-manager/Thumb.js +7 -13
  149. package/lib/media-manager/helpers/MediaManagerHelper.d.ts +6 -4
  150. package/lib/media-manager/helpers/MediaManagerHelper.js +18 -18
  151. package/lib/model/AbstractModel.d.ts +9 -5
  152. package/lib/model/AbstractModel.js +9 -13
  153. package/lib/model/InternalModelAccessFactory.js +9 -10
  154. package/lib/model/ModelHandler.d.ts +45 -7
  155. package/lib/model/ModelHandler.js +168 -11
  156. package/lib/model/adapter/sequelize.d.ts +2 -4
  157. package/lib/model/adapter/sequelize.js +16 -193
  158. package/lib/model/adapter/typeorm.d.ts +2 -4
  159. package/lib/model/adapter/typeorm.js +2 -35
  160. package/lib/notifications/AbstractNotificationService.d.ts +9 -9
  161. package/lib/notifications/AbstractNotificationService.js +8 -8
  162. package/lib/notifications/GeneralNotificationService.js +1 -1
  163. package/lib/notifications/SystemNotificationService.js +1 -1
  164. package/lib/ui-i18n/uiTranslationKeys.d.ts +1 -1
  165. package/lib/ui-i18n/uiTranslationKeys.js +1 -0
  166. package/lib/widgets/abstractCustom.d.ts +5 -2
  167. package/lib/widgets/abstractCustom.js +4 -0
  168. package/lib/widgets/widgetHandler.d.ts +5 -2
  169. package/lib/widgets/widgetHandler.js +60 -14
  170. package/models/{FilterAP.d.ts → Filter.d.ts} +4 -70
  171. package/models/Filter.js +1 -0
  172. package/models/FilterColumn.d.ts +10 -0
  173. package/models/FilterColumn.js +1 -0
  174. package/models/Group.d.ts +8 -0
  175. package/models/Group.js +1 -0
  176. package/models/HistoryActions.d.ts +14 -0
  177. package/models/HistoryActions.js +1 -0
  178. package/models/MediaManagerAP.d.ts +2 -54
  179. package/models/MediaManagerAP.js +1 -51
  180. package/models/MediaManagerAssociationsAP.d.ts +1 -35
  181. package/models/MediaManagerAssociationsAP.js +1 -33
  182. package/models/MediaManagerMetaAP.d.ts +2 -30
  183. package/models/MediaManagerMetaAP.js +1 -27
  184. package/models/Notification.d.ts +13 -0
  185. package/models/Notification.js +1 -0
  186. package/models/User.d.ts +23 -0
  187. package/models/User.js +1 -0
  188. package/models/UserNotification.d.ts +7 -0
  189. package/models/UserNotification.js +1 -0
  190. package/package.json +25 -30
  191. package/services/FeedService.d.ts +5 -5
  192. package/services/FeedService.js +1 -1
  193. package/system/Router.js +2 -10
  194. package/system/bindAccessRights.js +1 -1
  195. package/system/bindAuthorization.js +2 -2
  196. package/system/bindControls.js +7 -6
  197. package/system/bindDashboardWidgets.js +3 -2
  198. package/system/bindDev.js +1 -1
  199. package/system/bindHistory.d.ts +1 -1
  200. package/system/bindHistory.js +1 -1
  201. package/system/bindInertia.js +0 -6
  202. package/system/bindMediaManager.js +4 -17
  203. package/system/bindNotifications.d.ts +1 -1
  204. package/system/bindNotifications.js +1 -1
  205. package/system/bindReqFunctions.d.ts +1 -0
  206. package/system/bindReqFunctions.js +20 -3
  207. package/system/buildInternalModelAccess.js +2 -15
  208. package/system/defaults.js +5 -10
  209. package/system/systemModelContracts.d.ts +22 -0
  210. package/system/systemModelContracts.js +155 -0
  211. package/system/validateSystemModels.d.ts +2 -0
  212. package/system/validateSystemModels.js +101 -0
  213. package/translations/ar.json +2 -1
  214. package/translations/cn.json +2 -1
  215. package/translations/de.json +2 -1
  216. package/translations/en.json +1 -0
  217. package/translations/es.json +2 -1
  218. package/translations/fr.json +2 -1
  219. package/translations/hi.json +2 -1
  220. package/translations/jp.json +2 -1
  221. package/translations/ko.json +2 -1
  222. package/translations/pt.json +2 -1
  223. package/translations/ru.json +2 -1
  224. package/translations/ua.json +2 -1
  225. package/translations/uz.json +2 -1
  226. package/translations/vi.json +2 -1
  227. package/assets/RelationDialogStack-DhThUMep.js +0 -20
  228. package/assets/add-group-L8lMigab.js +0 -1
  229. package/assets/add-group-form-o7F6t6qW.js +0 -1
  230. package/assets/add-user-BE4-TNJw.js +0 -1
  231. package/assets/add-user-form-BP_8TjxN.js +0 -1
  232. package/assets/add-w398ZkhF.js +0 -1
  233. package/assets/app-C7J5ccrI.css +0 -1
  234. package/assets/app-layout-Bg455MIY.js +0 -1
  235. package/assets/app-shell-BT2kF0We.js +0 -1
  236. package/assets/app-sidebar-CZfPUXck.js +0 -1
  237. package/assets/app-sidebar-header-UVcKhNm6.js +0 -1
  238. package/assets/breadcrumbs-CrqIBT84.js +0 -1
  239. package/assets/catalog-btkCCwiv.js +0 -6
  240. package/assets/dashboard-Bvasc1cr.js +0 -3
  241. package/assets/date-picker-kxQWOxHk.js +0 -1
  242. package/assets/del-modal-C39LR5aQ.js +0 -1
  243. package/assets/dynamic-controls-DyPP5sTC.js +0 -1
  244. package/assets/geo-json-CGNQFl6J.js +0 -1
  245. package/assets/handsontable-Dv59QFH5.js +0 -336
  246. package/assets/history-DwKR8MPu.js +0 -1
  247. package/assets/home-BrtAkCRj.js +0 -2
  248. package/assets/icon-DpUVVHmK.js +0 -1
  249. package/assets/init-user-8PiKR1zX.js +0 -1
  250. package/assets/input-error-Cbt-Y3Fj.js +0 -1
  251. package/assets/jsoneditor-CiPXPMho.js +0 -3869
  252. package/assets/list-DGsL_qii.js +0 -4
  253. package/assets/login-Br_FcBU_.js +0 -1
  254. package/assets/material-icon-DOkM71fv.js +0 -1
  255. package/assets/module-EgfgIEhF.js +0 -1
  256. package/assets/monaco-ompgKQ3_.js +0 -11
  257. package/assets/nav-footer-DzLwfBAE.js +0 -1
  258. package/assets/nav-main-CSEbjYgs.js +0 -1
  259. package/assets/nav-user-DJ0hfhfH.js +0 -1
  260. package/assets/notification-B19ZLro7.js +0 -20
  261. package/assets/pagination-render-8GvJxq55.js +0 -1
  262. package/assets/register-CZzIeT2G.js +0 -1
  263. package/assets/ru-1NdRIQNV.js +0 -1
  264. package/assets/theme-switcher-CBbEj1u-.js +0 -1
  265. package/assets/toast-editor-DwVqd1rz.js +0 -668
  266. package/assets/user-filters-list-7Im79QyS.js +0 -1
  267. package/assets/user-info-YiU17Mmy.js +0 -1
  268. package/assets/user-menu-content-gdpNF5-8.js +0 -1
  269. package/assets/vanilla-picker-B3LgXoKV.js +0 -2
  270. package/assets/vendor-l0sNRNKZ.js +0 -1
  271. package/assets/welcome-nT0eFWHb.js +0 -1
  272. package/controllers/navigation/edit.d.ts +0 -1
  273. package/controllers/navigation/edit.js +0 -8
  274. package/lib/ai-assistant/DummyAiModelService.d.ts +0 -8
  275. package/lib/ai-assistant/DummyAiModelService.js +0 -14
  276. package/lib/ai-assistant/OpenAiModelService.d.ts +0 -24
  277. package/lib/ai-assistant/OpenAiModelService.js +0 -184
  278. package/lib/catalog/Navigation.d.ts +0 -49
  279. package/lib/catalog/Navigation.js +0 -492
  280. package/lib/controls/AbstractControls.d.ts +0 -30
  281. package/lib/controls/AbstractControls.js +0 -14
  282. package/lib/media-manager/DefaultMediaManager.d.ts +0 -20
  283. package/lib/media-manager/DefaultMediaManager.js +0 -127
  284. package/lib/media-manager/Items.d.ts +0 -50
  285. package/lib/media-manager/Items.js +0 -296
  286. package/models/FilterAP.js +0 -68
  287. package/models/FilterColumnAP.d.ts +0 -32
  288. package/models/FilterColumnAP.js +0 -21
  289. package/models/GroupAP.d.ts +0 -31
  290. package/models/GroupAP.js +0 -22
  291. package/models/HistoryActionsAP.d.ts +0 -56
  292. package/models/HistoryActionsAP.js +0 -42
  293. package/models/NavigationAP.d.ts +0 -22
  294. package/models/NavigationAP.js +0 -16
  295. package/models/NotificationAP.d.ts +0 -44
  296. package/models/NotificationAP.js +0 -30
  297. package/models/UserAP.d.ts +0 -81
  298. package/models/UserAP.js +0 -57
  299. package/models/UserNotificationAP.d.ts +0 -26
  300. package/models/UserNotificationAP.js +0 -18
  301. package/system/bindAiAssistant.d.ts +0 -2
  302. package/system/bindAiAssistant.js +0 -30
  303. package/system/bindModels.d.ts +0 -2
  304. package/system/bindModels.js +0 -48
  305. package/system/bindNavigation.d.ts +0 -2
  306. package/system/bindNavigation.js +0 -38
  307. /package/assets/{RelationDialogStack-B00Ot5qS.css → controls/ckeditor.css} +0 -0
@@ -0,0 +1,618 @@
1
+ import { j as re } from "./chunks/jsx-runtime-jIxVPx5o.js";
2
+ import { u as Pe } from "./chunks/use-appearance-CFLOwiSX.js";
3
+ import { u as Te } from "./chunks/use-window-size-BXgBKW65.js";
4
+ function ie(e, t) {
5
+ (t == null || t > e.length) && (t = e.length);
6
+ for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
7
+ return n;
8
+ }
9
+ function Ce(e) {
10
+ if (Array.isArray(e)) return e;
11
+ }
12
+ function Ie(e, t, r) {
13
+ return (t = We(t)) in e ? Object.defineProperty(e, t, {
14
+ value: r,
15
+ enumerable: !0,
16
+ configurable: !0,
17
+ writable: !0
18
+ }) : e[t] = r, e;
19
+ }
20
+ function Le(e, t) {
21
+ var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
22
+ if (r != null) {
23
+ var n, o, i, a, u = [], s = !0, d = !1;
24
+ try {
25
+ if (i = (r = r.call(e)).next, t !== 0) for (; !(s = (n = i.call(r)).done) && (u.push(n.value), u.length !== t); s = !0) ;
26
+ } catch (f) {
27
+ d = !0, o = f;
28
+ } finally {
29
+ try {
30
+ if (!s && r.return != null && (a = r.return(), Object(a) !== a)) return;
31
+ } finally {
32
+ if (d) throw o;
33
+ }
34
+ }
35
+ return u;
36
+ }
37
+ }
38
+ function xe() {
39
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
41
+ }
42
+ function ae(e, t) {
43
+ var r = Object.keys(e);
44
+ if (Object.getOwnPropertySymbols) {
45
+ var n = Object.getOwnPropertySymbols(e);
46
+ t && (n = n.filter(function(o) {
47
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
48
+ })), r.push.apply(r, n);
49
+ }
50
+ return r;
51
+ }
52
+ function ce(e) {
53
+ for (var t = 1; t < arguments.length; t++) {
54
+ var r = arguments[t] != null ? arguments[t] : {};
55
+ t % 2 ? ae(Object(r), !0).forEach(function(n) {
56
+ Ie(e, n, r[n]);
57
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ae(Object(r)).forEach(function(n) {
58
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
59
+ });
60
+ }
61
+ return e;
62
+ }
63
+ function Ae(e, t) {
64
+ if (e == null) return {};
65
+ var r, n, o = $e(e, t);
66
+ if (Object.getOwnPropertySymbols) {
67
+ var i = Object.getOwnPropertySymbols(e);
68
+ for (n = 0; n < i.length; n++) r = i[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
69
+ }
70
+ return o;
71
+ }
72
+ function $e(e, t) {
73
+ if (e == null) return {};
74
+ var r = {};
75
+ for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
76
+ if (t.indexOf(n) !== -1) continue;
77
+ r[n] = e[n];
78
+ }
79
+ return r;
80
+ }
81
+ function De(e, t) {
82
+ return Ce(e) || Le(e, t) || Ne(e, t) || xe();
83
+ }
84
+ function Ve(e, t) {
85
+ if (typeof e != "object" || !e) return e;
86
+ var r = e[Symbol.toPrimitive];
87
+ if (r !== void 0) {
88
+ var n = r.call(e, t);
89
+ if (typeof n != "object") return n;
90
+ throw new TypeError("@@toPrimitive must return a primitive value.");
91
+ }
92
+ return (t === "string" ? String : Number)(e);
93
+ }
94
+ function We(e) {
95
+ var t = Ve(e, "string");
96
+ return typeof t == "symbol" ? t : t + "";
97
+ }
98
+ function Ne(e, t) {
99
+ if (e) {
100
+ if (typeof e == "string") return ie(e, t);
101
+ var r = {}.toString.call(e).slice(8, -1);
102
+ return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ie(e, t) : void 0;
103
+ }
104
+ }
105
+ function ze(e, t, r) {
106
+ return t in e ? Object.defineProperty(e, t, {
107
+ value: r,
108
+ enumerable: !0,
109
+ configurable: !0,
110
+ writable: !0
111
+ }) : e[t] = r, e;
112
+ }
113
+ function ue(e, t) {
114
+ var r = Object.keys(e);
115
+ if (Object.getOwnPropertySymbols) {
116
+ var n = Object.getOwnPropertySymbols(e);
117
+ t && (n = n.filter(function(o) {
118
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
119
+ })), r.push.apply(r, n);
120
+ }
121
+ return r;
122
+ }
123
+ function le(e) {
124
+ for (var t = 1; t < arguments.length; t++) {
125
+ var r = arguments[t] != null ? arguments[t] : {};
126
+ t % 2 ? ue(Object(r), !0).forEach(function(n) {
127
+ ze(e, n, r[n]);
128
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ue(Object(r)).forEach(function(n) {
129
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
130
+ });
131
+ }
132
+ return e;
133
+ }
134
+ function Ue() {
135
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
136
+ t[r] = arguments[r];
137
+ return function(n) {
138
+ return t.reduceRight(function(o, i) {
139
+ return i(o);
140
+ }, n);
141
+ };
142
+ }
143
+ function W(e) {
144
+ return function t() {
145
+ for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
146
+ o[i] = arguments[i];
147
+ return o.length >= e.length ? e.apply(this, o) : function() {
148
+ for (var a = arguments.length, u = new Array(a), s = 0; s < a; s++)
149
+ u[s] = arguments[s];
150
+ return t.apply(r, [].concat(o, u));
151
+ };
152
+ };
153
+ }
154
+ function _(e) {
155
+ return {}.toString.call(e).includes("Object");
156
+ }
157
+ function qe(e) {
158
+ return !Object.keys(e).length;
159
+ }
160
+ function z(e) {
161
+ return typeof e == "function";
162
+ }
163
+ function Fe(e, t) {
164
+ return Object.prototype.hasOwnProperty.call(e, t);
165
+ }
166
+ function He(e, t) {
167
+ return _(t) || S("changeType"), Object.keys(t).some(function(r) {
168
+ return !Fe(e, r);
169
+ }) && S("changeField"), t;
170
+ }
171
+ function Be(e) {
172
+ z(e) || S("selectorType");
173
+ }
174
+ function Ke(e) {
175
+ z(e) || _(e) || S("handlerType"), _(e) && Object.values(e).some(function(t) {
176
+ return !z(t);
177
+ }) && S("handlersType");
178
+ }
179
+ function _e(e) {
180
+ e || S("initialIsRequired"), _(e) || S("initialType"), qe(e) && S("initialContent");
181
+ }
182
+ function ke(e, t) {
183
+ throw new Error(e[t] || e.default);
184
+ }
185
+ var Ge = {
186
+ initialIsRequired: "initial state is required",
187
+ initialType: "initial state should be an object",
188
+ initialContent: "initial state shouldn't be an empty object",
189
+ handlerType: "handler should be an object or a function",
190
+ handlersType: "all handlers should be a functions",
191
+ selectorType: "selector should be a function",
192
+ changeType: "provided value of changes should be an object",
193
+ changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
194
+ default: "an unknown error accured in `state-local` package"
195
+ }, S = W(ke)(Ge), H = {
196
+ changes: He,
197
+ selector: Be,
198
+ handler: Ke,
199
+ initial: _e
200
+ };
201
+ function Ye(e) {
202
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
203
+ H.initial(e), H.handler(t);
204
+ var r = {
205
+ current: e
206
+ }, n = W(Xe)(r, t), o = W(Qe)(r), i = W(H.changes)(e), a = W(Je)(r);
207
+ function u() {
208
+ var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(f) {
209
+ return f;
210
+ };
211
+ return H.selector(d), d(r.current);
212
+ }
213
+ function s(d) {
214
+ Ue(n, o, i, a)(d);
215
+ }
216
+ return [u, s];
217
+ }
218
+ function Je(e, t) {
219
+ return z(t) ? t(e.current) : t;
220
+ }
221
+ function Qe(e, t) {
222
+ return e.current = le(le({}, e.current), t), t;
223
+ }
224
+ function Xe(e, t, r) {
225
+ return z(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
226
+ var o;
227
+ return (o = t[n]) === null || o === void 0 ? void 0 : o.call(t, e.current[n]);
228
+ }), r;
229
+ }
230
+ var Ze = {
231
+ create: Ye
232
+ }, et = {
233
+ paths: {
234
+ vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"
235
+ }
236
+ };
237
+ function tt(e) {
238
+ return function t() {
239
+ for (var r = this, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
240
+ o[i] = arguments[i];
241
+ return o.length >= e.length ? e.apply(this, o) : function() {
242
+ for (var a = arguments.length, u = new Array(a), s = 0; s < a; s++)
243
+ u[s] = arguments[s];
244
+ return t.apply(r, [].concat(o, u));
245
+ };
246
+ };
247
+ }
248
+ function rt(e) {
249
+ return {}.toString.call(e).includes("Object");
250
+ }
251
+ function nt(e) {
252
+ return e || se("configIsRequired"), rt(e) || se("configType"), e.urls ? (ot(), {
253
+ paths: {
254
+ vs: e.urls.monacoBase
255
+ }
256
+ }) : e;
257
+ }
258
+ function ot() {
259
+ console.warn(ve.deprecation);
260
+ }
261
+ function it(e, t) {
262
+ throw new Error(e[t] || e.default);
263
+ }
264
+ var ve = {
265
+ configIsRequired: "the configuration object is required",
266
+ configType: "the configuration object should be an object",
267
+ default: "an unknown error accured in `@monaco-editor/loader` package",
268
+ deprecation: `Deprecation warning!
269
+ You are using deprecated way of configuration.
270
+
271
+ Instead of using
272
+ monaco.config({ urls: { monacoBase: '...' } })
273
+ use
274
+ monaco.config({ paths: { vs: '...' } })
275
+
276
+ For more please check the link https://github.com/suren-atoyan/monaco-loader#config
277
+ `
278
+ }, se = tt(it)(ve), at = {
279
+ config: nt
280
+ }, ct = function() {
281
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
282
+ r[n] = arguments[n];
283
+ return function(o) {
284
+ return r.reduceRight(function(i, a) {
285
+ return a(i);
286
+ }, o);
287
+ };
288
+ };
289
+ function we(e, t) {
290
+ return Object.keys(t).forEach(function(r) {
291
+ t[r] instanceof Object && e[r] && Object.assign(t[r], we(e[r], t[r]));
292
+ }), ce(ce({}, e), t);
293
+ }
294
+ var ut = {
295
+ type: "cancelation",
296
+ msg: "operation is manually canceled"
297
+ };
298
+ function X(e) {
299
+ var t = !1, r = new Promise(function(n, o) {
300
+ e.then(function(i) {
301
+ return t ? o(ut) : n(i);
302
+ }), e.catch(o);
303
+ });
304
+ return r.cancel = function() {
305
+ return t = !0;
306
+ }, r;
307
+ }
308
+ var lt = ["monaco"], st = Ze.create({
309
+ config: et,
310
+ isInitialized: !1,
311
+ resolve: null,
312
+ reject: null,
313
+ monaco: null
314
+ }), be = De(st, 2), U = be[0], k = be[1];
315
+ function dt(e) {
316
+ var t = at.config(e), r = t.monaco, n = Ae(t, lt);
317
+ k(function(o) {
318
+ return {
319
+ config: we(o.config, n),
320
+ monaco: r
321
+ };
322
+ });
323
+ }
324
+ function ft() {
325
+ var e = U(function(t) {
326
+ var r = t.monaco, n = t.isInitialized, o = t.resolve;
327
+ return {
328
+ monaco: r,
329
+ isInitialized: n,
330
+ resolve: o
331
+ };
332
+ });
333
+ if (!e.isInitialized) {
334
+ if (k({
335
+ isInitialized: !0
336
+ }), e.monaco)
337
+ return e.resolve(e.monaco), X(Z);
338
+ if (window.monaco && window.monaco.editor)
339
+ return ye(window.monaco), e.resolve(window.monaco), X(Z);
340
+ ct(pt, ht)(mt);
341
+ }
342
+ return X(Z);
343
+ }
344
+ function pt(e) {
345
+ return document.body.appendChild(e);
346
+ }
347
+ function gt(e) {
348
+ var t = document.createElement("script");
349
+ return e && (t.src = e), t;
350
+ }
351
+ function ht(e) {
352
+ var t = U(function(n) {
353
+ var o = n.config, i = n.reject;
354
+ return {
355
+ config: o,
356
+ reject: i
357
+ };
358
+ }), r = gt("".concat(t.config.paths.vs, "/loader.js"));
359
+ return r.onload = function() {
360
+ return e();
361
+ }, r.onerror = t.reject, r;
362
+ }
363
+ function mt() {
364
+ var e = U(function(r) {
365
+ var n = r.config, o = r.resolve, i = r.reject;
366
+ return {
367
+ config: n,
368
+ resolve: o,
369
+ reject: i
370
+ };
371
+ }), t = window.require;
372
+ t.config(e.config), t(["vs/editor/editor.main"], function(r) {
373
+ var n = r.m || r;
374
+ ye(n), e.resolve(n);
375
+ }, function(r) {
376
+ e.reject(r);
377
+ });
378
+ }
379
+ function ye(e) {
380
+ U().monaco || k({
381
+ monaco: e
382
+ });
383
+ }
384
+ function vt() {
385
+ return U(function(e) {
386
+ var t = e.monaco;
387
+ return t;
388
+ });
389
+ }
390
+ var Z = new Promise(function(e, t) {
391
+ return k({
392
+ resolve: e,
393
+ reject: t
394
+ });
395
+ }), Oe = {
396
+ config: dt,
397
+ init: ft,
398
+ __getMonacoInstance: vt
399
+ };
400
+ const wt = window.React.memo, bt = window.React, de = window.React.useState, T = window.React.useRef, fe = window.React.useCallback, pe = window.React.useEffect, yt = window.React.memo, ee = window.React;
401
+ var Ot = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, te = Ot;
402
+ const jt = window.React;
403
+ var Mt = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Rt = Mt;
404
+ function St({ children: e }) {
405
+ return jt.createElement("div", { style: Rt.container }, e);
406
+ }
407
+ var Et = St, Pt = Et;
408
+ function Tt({ width: e, height: t, isEditorReady: r, loading: n, _ref: o, className: i, wrapperProps: a }) {
409
+ return ee.createElement("section", { style: { ...te.wrapper, width: e, height: t }, ...a }, !r && ee.createElement(Pt, null, n), ee.createElement("div", { ref: o, style: { ...te.fullWidth, ...!r && te.hide }, className: i }));
410
+ }
411
+ var Ct = Tt, je = yt(Ct);
412
+ const It = window.React.useEffect;
413
+ function Lt(e) {
414
+ It(e, []);
415
+ }
416
+ var Me = Lt;
417
+ const xt = window.React.useEffect, At = window.React.useRef;
418
+ function $t(e, t, r = !0) {
419
+ let n = At(!0);
420
+ xt(n.current || !r ? () => {
421
+ n.current = !1;
422
+ } : e, t);
423
+ }
424
+ var O = $t;
425
+ function N() {
426
+ }
427
+ function C(e, t, r, n) {
428
+ return Dt(e, n) || Vt(e, t, r, n);
429
+ }
430
+ function Dt(e, t) {
431
+ return e.editor.getModel(Re(e, t));
432
+ }
433
+ function Vt(e, t, r, n) {
434
+ return e.editor.createModel(t, r, n ? Re(e, n) : void 0);
435
+ }
436
+ function Re(e, t) {
437
+ return e.Uri.parse(t);
438
+ }
439
+ function Wt({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: a, keepCurrentOriginalModel: u = !1, keepCurrentModifiedModel: s = !1, theme: d = "light", loading: f = "Loading...", options: y = {}, height: I = "100%", width: L = "100%", className: E, wrapperProps: x = {}, beforeMount: j = N, onMount: G = N }) {
440
+ let [b, A] = de(!1), [$, g] = de(!0), h = T(null), p = T(null), D = T(null), v = T(G), c = T(j), P = T(!1);
441
+ Me(() => {
442
+ let l = Oe.init();
443
+ return l.then((m) => (p.current = m) && g(!1)).catch((m) => m?.type !== "cancelation" && console.error("Monaco initialization: error:", m)), () => h.current ? V() : l.cancel();
444
+ }), O(() => {
445
+ if (h.current && p.current) {
446
+ let l = h.current.getOriginalEditor(), m = C(p.current, e || "", n || r || "text", i || "");
447
+ m !== l.getModel() && l.setModel(m);
448
+ }
449
+ }, [i], b), O(() => {
450
+ if (h.current && p.current) {
451
+ let l = h.current.getModifiedEditor(), m = C(p.current, t || "", o || r || "text", a || "");
452
+ m !== l.getModel() && l.setModel(m);
453
+ }
454
+ }, [a], b), O(() => {
455
+ let l = h.current.getModifiedEditor();
456
+ l.getOption(p.current.editor.EditorOption.readOnly) ? l.setValue(t || "") : t !== l.getValue() && (l.executeEdits("", [{ range: l.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), l.pushUndoStop());
457
+ }, [t], b), O(() => {
458
+ h.current?.getModel()?.original.setValue(e || "");
459
+ }, [e], b), O(() => {
460
+ let { original: l, modified: m } = h.current.getModel();
461
+ p.current.editor.setModelLanguage(l, n || r || "text"), p.current.editor.setModelLanguage(m, o || r || "text");
462
+ }, [r, n, o], b), O(() => {
463
+ p.current?.editor.setTheme(d);
464
+ }, [d], b), O(() => {
465
+ h.current?.updateOptions(y);
466
+ }, [y], b);
467
+ let q = fe(() => {
468
+ if (!p.current) return;
469
+ c.current(p.current);
470
+ let l = C(p.current, e || "", n || r || "text", i || ""), m = C(p.current, t || "", o || r || "text", a || "");
471
+ h.current?.setModel({ original: l, modified: m });
472
+ }, [r, t, o, e, n, i, a]), F = fe(() => {
473
+ !P.current && D.current && (h.current = p.current.editor.createDiffEditor(D.current, { automaticLayout: !0, ...y }), q(), p.current?.editor.setTheme(d), A(!0), P.current = !0);
474
+ }, [y, d, q]);
475
+ pe(() => {
476
+ b && v.current(h.current, p.current);
477
+ }, [b]), pe(() => {
478
+ !$ && !b && F();
479
+ }, [$, b, F]);
480
+ function V() {
481
+ let l = h.current?.getModel();
482
+ u || l?.original?.dispose(), s || l?.modified?.dispose(), h.current?.dispose();
483
+ }
484
+ return bt.createElement(je, { width: L, height: I, isEditorReady: b, loading: f, _ref: D, className: E, wrapperProps: x });
485
+ }
486
+ var Nt = Wt;
487
+ wt(Nt);
488
+ window.React.useState;
489
+ const zt = window.React.memo, Ut = window.React, ge = window.React.useState, B = window.React.useEffect, M = window.React.useRef, qt = window.React.useCallback, Ft = window.React.useEffect, Ht = window.React.useRef;
490
+ function Bt(e) {
491
+ let t = Ht();
492
+ return Ft(() => {
493
+ t.current = e;
494
+ }, [e]), t.current;
495
+ }
496
+ var Kt = Bt, K = /* @__PURE__ */ new Map();
497
+ function _t({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: o, path: i, theme: a = "light", line: u, loading: s = "Loading...", options: d = {}, overrideServices: f = {}, saveViewState: y = !0, keepCurrentModel: I = !1, width: L = "100%", height: E = "100%", className: x, wrapperProps: j = {}, beforeMount: G = N, onMount: b = N, onChange: A, onValidate: $ = N }) {
498
+ let [g, h] = ge(!1), [p, D] = ge(!0), v = M(null), c = M(null), P = M(null), q = M(b), F = M(G), V = M(), l = M(n), m = Kt(i), ne = M(!1), Y = M(!1);
499
+ Me(() => {
500
+ let w = Oe.init();
501
+ return w.then((R) => (v.current = R) && D(!1)).catch((R) => R?.type !== "cancelation" && console.error("Monaco initialization: error:", R)), () => c.current ? Ee() : w.cancel();
502
+ }), O(() => {
503
+ let w = C(v.current, e || n || "", t || o || "", i || r || "");
504
+ w !== c.current?.getModel() && (y && K.set(m, c.current?.saveViewState()), c.current?.setModel(w), y && c.current?.restoreViewState(K.get(i)));
505
+ }, [i], g), O(() => {
506
+ c.current?.updateOptions(d);
507
+ }, [d], g), O(() => {
508
+ !c.current || n === void 0 || (c.current.getOption(v.current.editor.EditorOption.readOnly) ? c.current.setValue(n) : n !== c.current.getValue() && (Y.current = !0, c.current.executeEdits("", [{ range: c.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), c.current.pushUndoStop(), Y.current = !1));
509
+ }, [n], g), O(() => {
510
+ let w = c.current?.getModel();
511
+ w && o && v.current?.editor.setModelLanguage(w, o);
512
+ }, [o], g), O(() => {
513
+ u !== void 0 && c.current?.revealLine(u);
514
+ }, [u], g), O(() => {
515
+ v.current?.editor.setTheme(a);
516
+ }, [a], g);
517
+ let oe = qt(() => {
518
+ if (!(!P.current || !v.current) && !ne.current) {
519
+ F.current(v.current);
520
+ let w = i || r, R = C(v.current, n || e || "", t || o || "", w || "");
521
+ c.current = v.current?.editor.create(P.current, { model: R, automaticLayout: !0, ...d }, f), y && c.current.restoreViewState(K.get(w)), v.current.editor.setTheme(a), u !== void 0 && c.current.revealLine(u), h(!0), ne.current = !0;
522
+ }
523
+ }, [e, t, r, n, o, i, d, f, y, a, u]);
524
+ B(() => {
525
+ g && q.current(c.current, v.current);
526
+ }, [g]), B(() => {
527
+ !p && !g && oe();
528
+ }, [p, g, oe]), l.current = n, B(() => {
529
+ g && A && (V.current?.dispose(), V.current = c.current?.onDidChangeModelContent((w) => {
530
+ Y.current || A(c.current.getValue(), w);
531
+ }));
532
+ }, [g, A]), B(() => {
533
+ if (g) {
534
+ let w = v.current.editor.onDidChangeMarkers((R) => {
535
+ let J = c.current.getModel()?.uri;
536
+ if (J && R.find((Q) => Q.path === J.path)) {
537
+ let Q = v.current.editor.getModelMarkers({ resource: J });
538
+ $?.(Q);
539
+ }
540
+ });
541
+ return () => {
542
+ w?.dispose();
543
+ };
544
+ }
545
+ return () => {
546
+ };
547
+ }, [g, $]);
548
+ function Ee() {
549
+ V.current?.dispose(), I ? y && K.set(i, c.current.saveViewState()) : c.current.getModel()?.dispose(), c.current.dispose();
550
+ }
551
+ return Ut.createElement(je, { width: L, height: E, isEditorReady: g, loading: s, _ref: P, className: x, wrapperProps: j });
552
+ }
553
+ var kt = _t, Gt = zt(kt), Yt = Gt;
554
+ const he = window.React.useEffect, me = window.React.useRef, Jt = window.React.useState, Se = ({ onChange: e, value: t, options: r, disabled: n }) => {
555
+ const { appearance: o } = Pe(), [i, a] = Jt("light"), u = me(null), s = me(null), { width: d } = Te(), f = d < 768, y = d >= 768 && d < 1024, I = (j) => {
556
+ e(j);
557
+ }, L = (j) => {
558
+ u.current = j, E();
559
+ }, E = () => {
560
+ if (!u.current) return;
561
+ const j = {
562
+ minimap: { enabled: !f },
563
+ fontSize: f ? 12 : y ? 13 : 14,
564
+ lineNumbers: f ? "off" : "on",
565
+ lineDecorationsWidth: f ? 5 : 10,
566
+ scrollBeyondLastLine: !f,
567
+ wordWrap: f ? "on" : "bounded",
568
+ renderWhitespace: f ? "none" : "selection",
569
+ padding: { top: f ? 8 : 16, bottom: f ? 8 : 16 }
570
+ };
571
+ u.current.updateOptions(j), s.current?.classList.add("overflow-hidden"), setTimeout(() => {
572
+ u.current?.layout(), s.current?.classList.remove("overflow-hidden");
573
+ }, 100);
574
+ };
575
+ he(() => {
576
+ a(o === "dark" ? "vs-dark" : "light");
577
+ }, [o]), he(() => {
578
+ E();
579
+ }, [d]);
580
+ const x = f ? "300px" : y ? "400px" : "500px";
581
+ return /* @__PURE__ */ re.jsx("div", { className: `border rounded-lg ${f ? "p-1" : "p-2"}`, ref: s, children: /* @__PURE__ */ re.jsx(
582
+ Yt,
583
+ {
584
+ height: x,
585
+ language: r.language,
586
+ value: t,
587
+ theme: i,
588
+ options: {
589
+ automaticLayout: !0,
590
+ ...f && { wordWrap: "on" },
591
+ minimap: { enabled: !f }
592
+ },
593
+ onChange: I,
594
+ onMount: L,
595
+ className: `transition-all duration-200 ease-in-out ${n ? "pointer-events-none opacity-50 cursor-not-allowed" : ""}`
596
+ }
597
+ ) });
598
+ }, er = Se;
599
+ function tr({
600
+ initialValue: e,
601
+ options: t,
602
+ onChange: r,
603
+ disabled: n
604
+ }) {
605
+ return /* @__PURE__ */ re.jsx(
606
+ Se,
607
+ {
608
+ value: e ?? "",
609
+ options: t,
610
+ onChange: r,
611
+ disabled: n
612
+ }
613
+ );
614
+ }
615
+ export {
616
+ er as Component,
617
+ tr as default
618
+ };