@blockbite/ui 2.0.20 → 2.0.21

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 (45) hide show
  1. package/dist/AutocompleteDropdown.d.ts +1 -2
  2. package/dist/Badge.d.ts +1 -2
  3. package/dist/BitePreview.d.ts +1 -2
  4. package/dist/Button.d.ts +1 -2
  5. package/dist/ButtonToggle.d.ts +0 -1
  6. package/dist/Chapter.d.ts +1 -2
  7. package/dist/ChapterDivider.d.ts +1 -2
  8. package/dist/Checkbox.d.ts +1 -2
  9. package/dist/DataItemList.d.ts +1 -2
  10. package/dist/DisappearingMessage.d.ts +1 -2
  11. package/dist/DropdownPicker.d.ts +1 -2
  12. package/dist/EmptyState.d.ts +1 -2
  13. package/dist/FloatingPanel.d.ts +1 -2
  14. package/dist/FocalPointControl.d.ts +0 -1
  15. package/dist/Icon.d.ts +1 -2
  16. package/dist/LinkPicker.d.ts +1 -2
  17. package/dist/MediaPicker.d.ts +1 -2
  18. package/dist/MetricsControl.d.ts +0 -1
  19. package/dist/Modal.d.ts +1 -6
  20. package/dist/NewWindowPortal.d.ts +1 -2
  21. package/dist/Notice.d.ts +1 -2
  22. package/dist/PasswordInput.d.ts +1 -2
  23. package/dist/Popover.d.ts +0 -1
  24. package/dist/ProjectsNavigation.d.ts +1 -2
  25. package/dist/RangeSlider.d.ts +0 -1
  26. package/dist/ResponsiveImage.d.ts +1 -2
  27. package/dist/ResponsiveVideo.d.ts +1 -2
  28. package/dist/ScrollList.d.ts +0 -1
  29. package/dist/SelectControlWrapper.d.ts +1 -2
  30. package/dist/SingleBlockTypeAppender.d.ts +1 -2
  31. package/dist/SlideIn.d.ts +1 -2
  32. package/dist/Spinner.d.ts +1 -2
  33. package/dist/Tabs.d.ts +6 -7
  34. package/dist/Tag.d.ts +1 -2
  35. package/dist/TextControl.d.ts +1 -18
  36. package/dist/TextControlLabel.d.ts +1 -2
  37. package/dist/ToggleGroup.d.ts +0 -1
  38. package/dist/ToggleSwitch.d.ts +1 -2
  39. package/dist/Wrap.d.ts +1 -2
  40. package/dist/global.d.ts +0 -0
  41. package/dist/index.js +1238 -3357
  42. package/dist/index.js.map +1 -1
  43. package/dist/react-shim.d.ts +19 -0
  44. package/dist/ui.css +1 -1
  45. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -1,2888 +1,764 @@
1
- import { Button as ye, Dropdown as pn, TextControl as rt, CheckboxControl as vn, DropdownMenu as mn, FocalPointPicker as hn, PanelRow as yn, Popover as bn, RangeControl as gn, Modal as xn, Notice as _n, __experimentalInputControl as jn, __experimentalInputControlSuffixWrapper as Cn, SelectControl as wn, Spinner as En, TabPanel as Rn, __experimentalToggleGroupControl as Sn, __experimentalToggleGroupControlOptionIcon as kn, __experimentalToggleGroupControlOption as Tn, ToggleControl as On } from "@wordpress/components";
2
- import { memo as tt, useState as F, useEffect as G, useCallback as Mt, useRef as lr, createPortal as Bt, forwardRef as Pn, createContext as Wt, useContext as nt, Children as Rr, isValidElement as Sr, useMemo as Nn } from "@wordpress/element";
3
- import { Plus as An, Trash as In, ChevronDown as Dn, Cross2 as $n, Tailwind as Fn, Percentage as Ln, Grid as Mn, Desktop as Bn, Slider as Wn, ColumnSpacing as Un, Pencil1 as Vn } from "@blockbite/icons";
4
- import Yn from "@wordpress/api-fetch";
5
- import { __ as Me } from "@wordpress/i18n";
6
- import { MediaUploadCheck as Qr, MediaUpload as Pt } from "@wordpress/block-editor";
7
- import { SVG as zn, Path as Hn } from "@wordpress/primitives";
8
- import { createBlock as qn } from "@wordpress/blocks";
9
- function Gn(o) {
10
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
1
+ import { Button as v, Dropdown as Y, TextControl as O, CheckboxControl as J, DropdownMenu as Q, FocalPointPicker as ee, PanelRow as te, Popover as ae, RangeControl as le, Modal as ne, Notice as re, __experimentalInputControl as ce, __experimentalInputControlSuffixWrapper as se, SelectControl as oe, Spinner as ie, TabPanel as me, __experimentalToggleGroupControl as ue, __experimentalToggleGroupControlOptionIcon as de, __experimentalToggleGroupControlOption as pe, ToggleControl as fe } from "@wordpress/components";
2
+ import { memo as j, useState as p, useEffect as g, useCallback as A, useRef as k, createPortal as D, forwardRef as F, createContext as G, useContext as V, Children as M, isValidElement as S, useMemo as ge, createElement as Re } from "@wordpress/element";
3
+ import Ee from "@wordpress/api-fetch";
4
+ import { __ as y } from "@wordpress/i18n";
5
+ import { MediaUploadCheck as B, MediaUpload as $ } from "@wordpress/block-editor";
6
+ import { jsx as be } from "react/jsx-runtime";
7
+ import { createBlock as he } from "@wordpress/blocks";
8
+ function Ce(e) {
9
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
10
  }
12
- var kr = { exports: {} }, or = {}, Tr = { exports: {} }, N = {};
13
- /**
14
- * @license React
15
- * react.production.min.js
16
- *
17
- * Copyright (c) Facebook, Inc. and its affiliates.
18
- *
19
- * This source code is licensed under the MIT license found in the
20
- * LICENSE file in the root directory of this source tree.
21
- */
22
- var Nt;
23
- function Kn() {
24
- if (Nt) return N;
25
- Nt = 1;
26
- var o = Symbol.for("react.element"), a = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), h = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), p = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), _ = Symbol.iterator;
27
- function O(s) {
28
- return s === null || typeof s != "object" ? null : (s = _ && s[_] || s["@@iterator"], typeof s == "function" ? s : null);
29
- }
30
- var T = { isMounted: function() {
31
- return !1;
32
- }, enqueueForceUpdate: function() {
33
- }, enqueueReplaceState: function() {
34
- }, enqueueSetState: function() {
35
- } }, k = Object.assign, ae = {};
36
- function de(s, y, I) {
37
- this.props = s, this.context = y, this.refs = ae, this.updater = I || T;
38
- }
39
- de.prototype.isReactComponent = {}, de.prototype.setState = function(s, y) {
40
- if (typeof s != "object" && typeof s != "function" && s != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
41
- this.updater.enqueueSetState(this, s, y, "setState");
42
- }, de.prototype.forceUpdate = function(s) {
43
- this.updater.enqueueForceUpdate(this, s, "forceUpdate");
44
- };
45
- function A() {
46
- }
47
- A.prototype = de.prototype;
48
- function Y(s, y, I) {
49
- this.props = s, this.context = y, this.refs = ae, this.updater = I || T;
50
- }
51
- var ge = Y.prototype = new A();
52
- ge.constructor = Y, k(ge, de.prototype), ge.isPureReactComponent = !0;
53
- var K = Array.isArray, X = Object.prototype.hasOwnProperty, ie = { current: null }, pe = { key: !0, ref: !0, __self: !0, __source: !0 };
54
- function je(s, y, I) {
55
- var $, M = {}, J = null, H = null;
56
- if (y != null) for ($ in y.ref !== void 0 && (H = y.ref), y.key !== void 0 && (J = "" + y.key), y) X.call(y, $) && !pe.hasOwnProperty($) && (M[$] = y[$]);
57
- var z = arguments.length - 2;
58
- if (z === 1) M.children = I;
59
- else if (1 < z) {
60
- for (var U = Array(z), oe = 0; oe < z; oe++) U[oe] = arguments[oe + 2];
61
- M.children = U;
62
- }
63
- if (s && s.defaultProps) for ($ in z = s.defaultProps, z) M[$] === void 0 && (M[$] = z[$]);
64
- return { $$typeof: o, type: s, key: J, ref: H, props: M, _owner: ie.current };
65
- }
66
- function Te(s, y) {
67
- return { $$typeof: o, type: s.type, key: y, ref: s.ref, props: s.props, _owner: s._owner };
68
- }
69
- function Oe(s) {
70
- return typeof s == "object" && s !== null && s.$$typeof === o;
71
- }
72
- function Je(s) {
73
- var y = { "=": "=0", ":": "=2" };
74
- return "$" + s.replace(/[=:]/g, function(I) {
75
- return y[I];
76
- });
77
- }
78
- var Pe = /\/+/g;
79
- function ve(s, y) {
80
- return typeof s == "object" && s !== null && s.key != null ? Je("" + s.key) : y.toString(36);
81
- }
82
- function me(s, y, I, $, M) {
83
- var J = typeof s;
84
- (J === "undefined" || J === "boolean") && (s = null);
85
- var H = !1;
86
- if (s === null) H = !0;
87
- else switch (J) {
88
- case "string":
89
- case "number":
90
- H = !0;
91
- break;
92
- case "object":
93
- switch (s.$$typeof) {
94
- case o:
95
- case a:
96
- H = !0;
97
- }
98
- }
99
- if (H) return H = s, M = M(H), s = $ === "" ? "." + ve(H, 0) : $, K(M) ? (I = "", s != null && (I = s.replace(Pe, "$&/") + "/"), me(M, y, I, "", function(oe) {
100
- return oe;
101
- })) : M != null && (Oe(M) && (M = Te(M, I + (!M.key || H && H.key === M.key ? "" : ("" + M.key).replace(Pe, "$&/") + "/") + s)), y.push(M)), 1;
102
- if (H = 0, $ = $ === "" ? "." : $ + ":", K(s)) for (var z = 0; z < s.length; z++) {
103
- J = s[z];
104
- var U = $ + ve(J, z);
105
- H += me(J, y, I, U, M);
106
- }
107
- else if (U = O(s), typeof U == "function") for (s = U.call(s), z = 0; !(J = s.next()).done; ) J = J.value, U = $ + ve(J, z++), H += me(J, y, I, U, M);
108
- else if (J === "object") throw y = String(s), Error("Objects are not valid as a React child (found: " + (y === "[object Object]" ? "object with keys {" + Object.keys(s).join(", ") + "}" : y) + "). If you meant to render a collection of children, use an array instead.");
109
- return H;
110
- }
111
- function le(s, y, I) {
112
- if (s == null) return s;
113
- var $ = [], M = 0;
114
- return me(s, $, "", "", function(J) {
115
- return y.call(I, J, M++);
116
- }), $;
117
- }
118
- function be(s) {
119
- if (s._status === -1) {
120
- var y = s._result;
121
- y = y(), y.then(function(I) {
122
- (s._status === 0 || s._status === -1) && (s._status = 1, s._result = I);
123
- }, function(I) {
124
- (s._status === 0 || s._status === -1) && (s._status = 2, s._result = I);
125
- }), s._status === -1 && (s._status = 0, s._result = y);
126
- }
127
- if (s._status === 1) return s._result.default;
128
- throw s._result;
129
- }
130
- var E = { current: null }, xe = { transition: null }, Ne = { ReactCurrentDispatcher: E, ReactCurrentBatchConfig: xe, ReactCurrentOwner: ie };
131
- function Ce() {
132
- throw Error("act(...) is not supported in production builds of React.");
133
- }
134
- return N.Children = { map: le, forEach: function(s, y, I) {
135
- le(s, function() {
136
- y.apply(this, arguments);
137
- }, I);
138
- }, count: function(s) {
139
- var y = 0;
140
- return le(s, function() {
141
- y++;
142
- }), y;
143
- }, toArray: function(s) {
144
- return le(s, function(y) {
145
- return y;
146
- }) || [];
147
- }, only: function(s) {
148
- if (!Oe(s)) throw Error("React.Children.only expected to receive a single React element child.");
149
- return s;
150
- } }, N.Component = de, N.Fragment = u, N.Profiler = d, N.PureComponent = Y, N.StrictMode = l, N.Suspense = g, N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ne, N.act = Ce, N.cloneElement = function(s, y, I) {
151
- if (s == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + s + ".");
152
- var $ = k({}, s.props), M = s.key, J = s.ref, H = s._owner;
153
- if (y != null) {
154
- if (y.ref !== void 0 && (J = y.ref, H = ie.current), y.key !== void 0 && (M = "" + y.key), s.type && s.type.defaultProps) var z = s.type.defaultProps;
155
- for (U in y) X.call(y, U) && !pe.hasOwnProperty(U) && ($[U] = y[U] === void 0 && z !== void 0 ? z[U] : y[U]);
156
- }
157
- var U = arguments.length - 2;
158
- if (U === 1) $.children = I;
159
- else if (1 < U) {
160
- z = Array(U);
161
- for (var oe = 0; oe < U; oe++) z[oe] = arguments[oe + 2];
162
- $.children = z;
163
- }
164
- return { $$typeof: o, type: s.type, key: M, ref: J, props: $, _owner: H };
165
- }, N.createContext = function(s) {
166
- return s = { $$typeof: h, _currentValue: s, _currentValue2: s, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, s.Provider = { $$typeof: f, _context: s }, s.Consumer = s;
167
- }, N.createElement = je, N.createFactory = function(s) {
168
- var y = je.bind(null, s);
169
- return y.type = s, y;
170
- }, N.createRef = function() {
171
- return { current: null };
172
- }, N.forwardRef = function(s) {
173
- return { $$typeof: v, render: s };
174
- }, N.isValidElement = Oe, N.lazy = function(s) {
175
- return { $$typeof: j, _payload: { _status: -1, _result: s }, _init: be };
176
- }, N.memo = function(s, y) {
177
- return { $$typeof: p, type: s, compare: y === void 0 ? null : y };
178
- }, N.startTransition = function(s) {
179
- var y = xe.transition;
180
- xe.transition = {};
181
- try {
182
- s();
183
- } finally {
184
- xe.transition = y;
185
- }
186
- }, N.unstable_act = Ce, N.useCallback = function(s, y) {
187
- return E.current.useCallback(s, y);
188
- }, N.useContext = function(s) {
189
- return E.current.useContext(s);
190
- }, N.useDebugValue = function() {
191
- }, N.useDeferredValue = function(s) {
192
- return E.current.useDeferredValue(s);
193
- }, N.useEffect = function(s, y) {
194
- return E.current.useEffect(s, y);
195
- }, N.useId = function() {
196
- return E.current.useId();
197
- }, N.useImperativeHandle = function(s, y, I) {
198
- return E.current.useImperativeHandle(s, y, I);
199
- }, N.useInsertionEffect = function(s, y) {
200
- return E.current.useInsertionEffect(s, y);
201
- }, N.useLayoutEffect = function(s, y) {
202
- return E.current.useLayoutEffect(s, y);
203
- }, N.useMemo = function(s, y) {
204
- return E.current.useMemo(s, y);
205
- }, N.useReducer = function(s, y, I) {
206
- return E.current.useReducer(s, y, I);
207
- }, N.useRef = function(s) {
208
- return E.current.useRef(s);
209
- }, N.useState = function(s) {
210
- return E.current.useState(s);
211
- }, N.useSyncExternalStore = function(s, y, I) {
212
- return E.current.useSyncExternalStore(s, y, I);
213
- }, N.useTransition = function() {
214
- return E.current.useTransition();
215
- }, N.version = "18.3.1", N;
216
- }
217
- var ir = { exports: {} };
218
- /**
219
- * @license React
220
- * react.development.js
221
- *
222
- * Copyright (c) Facebook, Inc. and its affiliates.
223
- *
224
- * This source code is licensed under the MIT license found in the
225
- * LICENSE file in the root directory of this source tree.
226
- */
227
- ir.exports;
228
- var At;
229
- function Jn() {
230
- return At || (At = 1, function(o, a) {
231
- process.env.NODE_ENV !== "production" && function() {
232
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
233
- var u = "18.3.1", l = Symbol.for("react.element"), d = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), p = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), ae = Symbol.for("react.offscreen"), de = Symbol.iterator, A = "@@iterator";
234
- function Y(e) {
235
- if (e === null || typeof e != "object")
236
- return null;
237
- var r = de && e[de] || e[A];
238
- return typeof r == "function" ? r : null;
239
- }
240
- var ge = {
241
- /**
242
- * @internal
243
- * @type {ReactComponent}
244
- */
245
- current: null
246
- }, K = {
247
- transition: null
248
- }, X = {
249
- current: null,
250
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
251
- isBatchingLegacy: !1,
252
- didScheduleLegacyUpdate: !1
253
- }, ie = {
254
- /**
255
- * @internal
256
- * @type {ReactComponent}
257
- */
258
- current: null
259
- }, pe = {}, je = null;
260
- function Te(e) {
261
- je = e;
262
- }
263
- pe.setExtraStackFrame = function(e) {
264
- je = e;
265
- }, pe.getCurrentStack = null, pe.getStackAddendum = function() {
266
- var e = "";
267
- je && (e += je);
268
- var r = pe.getCurrentStack;
269
- return r && (e += r() || ""), e;
270
- };
271
- var Oe = !1, Je = !1, Pe = !1, ve = !1, me = !1, le = {
272
- ReactCurrentDispatcher: ge,
273
- ReactCurrentBatchConfig: K,
274
- ReactCurrentOwner: ie
275
- };
276
- le.ReactDebugCurrentFrame = pe, le.ReactCurrentActQueue = X;
277
- function be(e) {
278
- {
279
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
280
- i[c - 1] = arguments[c];
281
- xe("warn", e, i);
282
- }
283
- }
284
- function E(e) {
285
- {
286
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
287
- i[c - 1] = arguments[c];
288
- xe("error", e, i);
289
- }
290
- }
291
- function xe(e, r, i) {
292
- {
293
- var c = le.ReactDebugCurrentFrame, b = c.getStackAddendum();
294
- b !== "" && (r += "%s", i = i.concat([b]));
295
- var R = i.map(function(w) {
296
- return String(w);
297
- });
298
- R.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, R);
299
- }
300
- }
301
- var Ne = {};
302
- function Ce(e, r) {
303
- {
304
- var i = e.constructor, c = i && (i.displayName || i.name) || "ReactClass", b = c + "." + r;
305
- if (Ne[b])
306
- return;
307
- E("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", r, c), Ne[b] = !0;
308
- }
309
- }
310
- var s = {
311
- /**
312
- * Checks whether or not this composite component is mounted.
313
- * @param {ReactClass} publicInstance The instance we want to test.
314
- * @return {boolean} True if mounted, false otherwise.
315
- * @protected
316
- * @final
317
- */
318
- isMounted: function(e) {
319
- return !1;
320
- },
321
- /**
322
- * Forces an update. This should only be invoked when it is known with
323
- * certainty that we are **not** in a DOM transaction.
324
- *
325
- * You may want to call this when you know that some deeper aspect of the
326
- * component's state has changed but `setState` was not called.
327
- *
328
- * This will not invoke `shouldComponentUpdate`, but it will invoke
329
- * `componentWillUpdate` and `componentDidUpdate`.
330
- *
331
- * @param {ReactClass} publicInstance The instance that should rerender.
332
- * @param {?function} callback Called after component is updated.
333
- * @param {?string} callerName name of the calling function in the public API.
334
- * @internal
335
- */
336
- enqueueForceUpdate: function(e, r, i) {
337
- Ce(e, "forceUpdate");
338
- },
339
- /**
340
- * Replaces all of the state. Always use this or `setState` to mutate state.
341
- * You should treat `this.state` as immutable.
342
- *
343
- * There is no guarantee that `this.state` will be immediately updated, so
344
- * accessing `this.state` after calling this method may return the old value.
345
- *
346
- * @param {ReactClass} publicInstance The instance that should rerender.
347
- * @param {object} completeState Next state.
348
- * @param {?function} callback Called after component is updated.
349
- * @param {?string} callerName name of the calling function in the public API.
350
- * @internal
351
- */
352
- enqueueReplaceState: function(e, r, i, c) {
353
- Ce(e, "replaceState");
354
- },
355
- /**
356
- * Sets a subset of the state. This only exists because _pendingState is
357
- * internal. This provides a merging strategy that is not available to deep
358
- * properties which is confusing. TODO: Expose pendingState or don't use it
359
- * during the merge.
360
- *
361
- * @param {ReactClass} publicInstance The instance that should rerender.
362
- * @param {object} partialState Next partial state to be merged with state.
363
- * @param {?function} callback Called after component is updated.
364
- * @param {?string} Name of the calling function in the public API.
365
- * @internal
366
- */
367
- enqueueSetState: function(e, r, i, c) {
368
- Ce(e, "setState");
369
- }
370
- }, y = Object.assign, I = {};
371
- Object.freeze(I);
372
- function $(e, r, i) {
373
- this.props = e, this.context = r, this.refs = I, this.updater = i || s;
374
- }
375
- $.prototype.isReactComponent = {}, $.prototype.setState = function(e, r) {
376
- if (typeof e != "object" && typeof e != "function" && e != null)
377
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
378
- this.updater.enqueueSetState(this, e, r, "setState");
379
- }, $.prototype.forceUpdate = function(e) {
380
- this.updater.enqueueForceUpdate(this, e, "forceUpdate");
381
- };
382
- {
383
- var M = {
384
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
385
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
386
- }, J = function(e, r) {
387
- Object.defineProperty($.prototype, e, {
388
- get: function() {
389
- be("%s(...) is deprecated in plain JavaScript React classes. %s", r[0], r[1]);
390
- }
391
- });
392
- };
393
- for (var H in M)
394
- M.hasOwnProperty(H) && J(H, M[H]);
395
- }
396
- function z() {
397
- }
398
- z.prototype = $.prototype;
399
- function U(e, r, i) {
400
- this.props = e, this.context = r, this.refs = I, this.updater = i || s;
401
- }
402
- var oe = U.prototype = new z();
403
- oe.constructor = U, y(oe, $.prototype), oe.isPureReactComponent = !0;
404
- function Or() {
405
- var e = {
406
- current: null
407
- };
408
- return Object.seal(e), e;
409
- }
410
- var ur = Array.isArray;
411
- function Be(e) {
412
- return ur(e);
413
- }
414
- function Pr(e) {
415
- {
416
- var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
417
- return i;
418
- }
419
- }
420
- function We(e) {
421
- try {
422
- return Ee(e), !1;
423
- } catch {
424
- return !0;
425
- }
426
- }
427
- function Ee(e) {
428
- return "" + e;
429
- }
430
- function Ae(e) {
431
- if (We(e))
432
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pr(e)), Ee(e);
433
- }
434
- function cr(e, r, i) {
435
- var c = e.displayName;
436
- if (c)
437
- return c;
438
- var b = r.displayName || r.name || "";
439
- return b !== "" ? i + "(" + b + ")" : i;
440
- }
441
- function Ie(e) {
442
- return e.displayName || "Context";
443
- }
444
- function _e(e) {
445
- if (e == null)
446
- return null;
447
- if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
448
- return e.displayName || e.name || null;
449
- if (typeof e == "string")
450
- return e;
451
- switch (e) {
452
- case f:
453
- return "Fragment";
454
- case d:
455
- return "Portal";
456
- case v:
457
- return "Profiler";
458
- case h:
459
- return "StrictMode";
460
- case _:
461
- return "Suspense";
462
- case O:
463
- return "SuspenseList";
464
- }
465
- if (typeof e == "object")
466
- switch (e.$$typeof) {
467
- case p:
468
- var r = e;
469
- return Ie(r) + ".Consumer";
470
- case g:
471
- var i = e;
472
- return Ie(i._context) + ".Provider";
473
- case j:
474
- return cr(e, e.render, "ForwardRef");
475
- case T:
476
- var c = e.displayName || null;
477
- return c !== null ? c : _e(e.type) || "Memo";
478
- case k: {
479
- var b = e, R = b._payload, w = b._init;
480
- try {
481
- return _e(w(R));
482
- } catch {
483
- return null;
484
- }
485
- }
486
- }
487
- return null;
488
- }
489
- var De = Object.prototype.hasOwnProperty, Ue = {
490
- key: !0,
491
- ref: !0,
492
- __self: !0,
493
- __source: !0
494
- }, fr, dr, Ve;
495
- Ve = {};
496
- function Xe(e) {
497
- if (De.call(e, "ref")) {
498
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
499
- if (r && r.isReactWarning)
500
- return !1;
501
- }
502
- return e.ref !== void 0;
503
- }
504
- function Ze(e) {
505
- if (De.call(e, "key")) {
506
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
507
- if (r && r.isReactWarning)
508
- return !1;
509
- }
510
- return e.key !== void 0;
511
- }
512
- function Nr(e, r) {
513
- var i = function() {
514
- fr || (fr = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
515
- };
516
- i.isReactWarning = !0, Object.defineProperty(e, "key", {
517
- get: i,
518
- configurable: !0
519
- });
520
- }
521
- function pr(e, r) {
522
- var i = function() {
523
- dr || (dr = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
524
- };
525
- i.isReactWarning = !0, Object.defineProperty(e, "ref", {
526
- get: i,
527
- configurable: !0
528
- });
529
- }
530
- function vr(e) {
531
- if (typeof e.ref == "string" && ie.current && e.__self && ie.current.stateNode !== e.__self) {
532
- var r = _e(ie.current.type);
533
- Ve[r] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', r, e.ref), Ve[r] = !0);
534
- }
535
- }
536
- var Qe = function(e, r, i, c, b, R, w) {
537
- var S = {
538
- // This tag allows us to uniquely identify this as a React Element
539
- $$typeof: l,
540
- // Built-in properties that belong on the element
541
- type: e,
542
- key: r,
543
- ref: i,
544
- props: w,
545
- // Record the component responsible for creating this element.
546
- _owner: R
547
- };
548
- return S._store = {}, Object.defineProperty(S._store, "validated", {
549
- configurable: !1,
550
- enumerable: !1,
551
- writable: !0,
552
- value: !1
553
- }), Object.defineProperty(S, "_self", {
554
- configurable: !1,
555
- enumerable: !1,
556
- writable: !1,
557
- value: c
558
- }), Object.defineProperty(S, "_source", {
559
- configurable: !1,
560
- enumerable: !1,
561
- writable: !1,
562
- value: b
563
- }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
564
- };
565
- function Ar(e, r, i) {
566
- var c, b = {}, R = null, w = null, S = null, L = null;
567
- if (r != null) {
568
- Xe(r) && (w = r.ref, vr(r)), Ze(r) && (Ae(r.key), R = "" + r.key), S = r.__self === void 0 ? null : r.__self, L = r.__source === void 0 ? null : r.__source;
569
- for (c in r)
570
- De.call(r, c) && !Ue.hasOwnProperty(c) && (b[c] = r[c]);
571
- }
572
- var q = arguments.length - 2;
573
- if (q === 1)
574
- b.children = i;
575
- else if (q > 1) {
576
- for (var Z = Array(q), Q = 0; Q < q; Q++)
577
- Z[Q] = arguments[Q + 2];
578
- Object.freeze && Object.freeze(Z), b.children = Z;
579
- }
580
- if (e && e.defaultProps) {
581
- var re = e.defaultProps;
582
- for (c in re)
583
- b[c] === void 0 && (b[c] = re[c]);
584
- }
585
- if (R || w) {
586
- var se = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
587
- R && Nr(b, se), w && pr(b, se);
588
- }
589
- return Qe(e, R, w, S, L, ie.current, b);
590
- }
591
- function Ir(e, r) {
592
- var i = Qe(e.type, r, e.ref, e._self, e._source, e._owner, e.props);
593
- return i;
594
- }
595
- function Dr(e, r, i) {
596
- if (e == null)
597
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
598
- var c, b = y({}, e.props), R = e.key, w = e.ref, S = e._self, L = e._source, q = e._owner;
599
- if (r != null) {
600
- Xe(r) && (w = r.ref, q = ie.current), Ze(r) && (Ae(r.key), R = "" + r.key);
601
- var Z;
602
- e.type && e.type.defaultProps && (Z = e.type.defaultProps);
603
- for (c in r)
604
- De.call(r, c) && !Ue.hasOwnProperty(c) && (r[c] === void 0 && Z !== void 0 ? b[c] = Z[c] : b[c] = r[c]);
605
- }
606
- var Q = arguments.length - 2;
607
- if (Q === 1)
608
- b.children = i;
609
- else if (Q > 1) {
610
- for (var re = Array(Q), se = 0; se < Q; se++)
611
- re[se] = arguments[se + 2];
612
- b.children = re;
613
- }
614
- return Qe(e.type, R, w, S, L, q, b);
615
- }
616
- function Re(e) {
617
- return typeof e == "object" && e !== null && e.$$typeof === l;
618
- }
619
- var mr = ".", $r = ":";
620
- function er(e) {
621
- var r = /[=:]/g, i = {
622
- "=": "=0",
623
- ":": "=2"
624
- }, c = e.replace(r, function(b) {
625
- return i[b];
626
- });
627
- return "$" + c;
628
- }
629
- var rr = !1, Se = /\/+/g;
630
- function Ye(e) {
631
- return e.replace(Se, "$&/");
632
- }
633
- function $e(e, r) {
634
- return typeof e == "object" && e !== null && e.key != null ? (Ae(e.key), er("" + e.key)) : r.toString(36);
635
- }
636
- function Fe(e, r, i, c, b) {
637
- var R = typeof e;
638
- (R === "undefined" || R === "boolean") && (e = null);
639
- var w = !1;
640
- if (e === null)
641
- w = !0;
642
- else
643
- switch (R) {
644
- case "string":
645
- case "number":
646
- w = !0;
647
- break;
648
- case "object":
649
- switch (e.$$typeof) {
650
- case l:
651
- case d:
652
- w = !0;
653
- }
654
- }
655
- if (w) {
656
- var S = e, L = b(S), q = c === "" ? mr + $e(S, 0) : c;
657
- if (Be(L)) {
658
- var Z = "";
659
- q != null && (Z = Ye(q) + "/"), Fe(L, r, Z, "", function(dn) {
660
- return dn;
661
- });
662
- } else L != null && (Re(L) && (L.key && (!S || S.key !== L.key) && Ae(L.key), L = Ir(
663
- L,
664
- // Keep both the (mapped) and old keys if they differ, just as
665
- // traverseAllChildren used to do for objects as children
666
- i + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
667
- (L.key && (!S || S.key !== L.key) ? (
668
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
669
- // eslint-disable-next-line react-internal/safe-string-coercion
670
- Ye("" + L.key) + "/"
671
- ) : "") + q
672
- )), r.push(L));
673
- return 1;
674
- }
675
- var Q, re, se = 0, ce = c === "" ? mr : c + $r;
676
- if (Be(e))
677
- for (var Er = 0; Er < e.length; Er++)
678
- Q = e[Er], re = ce + $e(Q, Er), se += Fe(Q, r, i, re, b);
679
- else {
680
- var Zr = Y(e);
681
- if (typeof Zr == "function") {
682
- var kt = e;
683
- Zr === kt.entries && (rr || be("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), rr = !0);
684
- for (var cn = Zr.call(kt), Tt, fn = 0; !(Tt = cn.next()).done; )
685
- Q = Tt.value, re = ce + $e(Q, fn++), se += Fe(Q, r, i, re, b);
686
- } else if (R === "object") {
687
- var Ot = String(e);
688
- throw new Error("Objects are not valid as a React child (found: " + (Ot === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Ot) + "). If you meant to render a collection of children, use an array instead.");
689
- }
690
- }
691
- return se;
692
- }
693
- function ze(e, r, i) {
694
- if (e == null)
695
- return e;
696
- var c = [], b = 0;
697
- return Fe(e, c, "", "", function(R) {
698
- return r.call(i, R, b++);
699
- }), c;
700
- }
701
- function hr(e) {
702
- var r = 0;
703
- return ze(e, function() {
704
- r++;
705
- }), r;
706
- }
707
- function Fr(e, r, i) {
708
- ze(e, function() {
709
- r.apply(this, arguments);
710
- }, i);
711
- }
712
- function yr(e) {
713
- return ze(e, function(r) {
714
- return r;
715
- }) || [];
716
- }
717
- function br(e) {
718
- if (!Re(e))
719
- throw new Error("React.Children.only expected to receive a single React element child.");
720
- return e;
721
- }
722
- function Lr(e) {
723
- var r = {
724
- $$typeof: p,
725
- // As a workaround to support multiple concurrent renderers, we categorize
726
- // some renderers as primary and others as secondary. We only expect
727
- // there to be two concurrent renderers at most: React Native (primary) and
728
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
729
- // Secondary renderers store their context values on separate fields.
730
- _currentValue: e,
731
- _currentValue2: e,
732
- // Used to track how many concurrent renderers this context currently
733
- // supports within in a single renderer. Such as parallel server rendering.
734
- _threadCount: 0,
735
- // These are circular
736
- Provider: null,
737
- Consumer: null,
738
- // Add these to use same hidden class in VM as ServerContext
739
- _defaultValue: null,
740
- _globalName: null
741
- };
742
- r.Provider = {
743
- $$typeof: g,
744
- _context: r
745
- };
746
- var i = !1, c = !1, b = !1;
747
- {
748
- var R = {
749
- $$typeof: p,
750
- _context: r
751
- };
752
- Object.defineProperties(R, {
753
- Provider: {
754
- get: function() {
755
- return c || (c = !0, E("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), r.Provider;
756
- },
757
- set: function(w) {
758
- r.Provider = w;
759
- }
760
- },
761
- _currentValue: {
762
- get: function() {
763
- return r._currentValue;
764
- },
765
- set: function(w) {
766
- r._currentValue = w;
767
- }
768
- },
769
- _currentValue2: {
770
- get: function() {
771
- return r._currentValue2;
772
- },
773
- set: function(w) {
774
- r._currentValue2 = w;
775
- }
776
- },
777
- _threadCount: {
778
- get: function() {
779
- return r._threadCount;
780
- },
781
- set: function(w) {
782
- r._threadCount = w;
783
- }
784
- },
785
- Consumer: {
786
- get: function() {
787
- return i || (i = !0, E("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), r.Consumer;
788
- }
789
- },
790
- displayName: {
791
- get: function() {
792
- return r.displayName;
793
- },
794
- set: function(w) {
795
- b || (be("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", w), b = !0);
796
- }
797
- }
798
- }), r.Consumer = R;
799
- }
800
- return r._currentRenderer = null, r._currentRenderer2 = null, r;
801
- }
802
- var Le = -1, He = 0, tr = 1, Mr = 2;
803
- function Br(e) {
804
- if (e._status === Le) {
805
- var r = e._result, i = r();
806
- if (i.then(function(R) {
807
- if (e._status === He || e._status === Le) {
808
- var w = e;
809
- w._status = tr, w._result = R;
810
- }
811
- }, function(R) {
812
- if (e._status === He || e._status === Le) {
813
- var w = e;
814
- w._status = Mr, w._result = R;
815
- }
816
- }), e._status === Le) {
817
- var c = e;
818
- c._status = He, c._result = i;
819
- }
820
- }
821
- if (e._status === tr) {
822
- var b = e._result;
823
- return b === void 0 && E(`lazy: Expected the result of a dynamic import() call. Instead received: %s
824
-
825
- Your code should look like:
826
- const MyComponent = lazy(() => import('./MyComponent'))
827
-
828
- Did you accidentally put curly braces around the import?`, b), "default" in b || E(`lazy: Expected the result of a dynamic import() call. Instead received: %s
829
-
830
- Your code should look like:
831
- const MyComponent = lazy(() => import('./MyComponent'))`, b), b.default;
832
- } else
833
- throw e._result;
834
- }
835
- function Wr(e) {
836
- var r = {
837
- // We use these fields to store the result.
838
- _status: Le,
839
- _result: e
840
- }, i = {
841
- $$typeof: k,
842
- _payload: r,
843
- _init: Br
844
- };
845
- {
846
- var c, b;
847
- Object.defineProperties(i, {
848
- defaultProps: {
849
- configurable: !0,
850
- get: function() {
851
- return c;
852
- },
853
- set: function(R) {
854
- E("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), c = R, Object.defineProperty(i, "defaultProps", {
855
- enumerable: !0
856
- });
857
- }
858
- },
859
- propTypes: {
860
- configurable: !0,
861
- get: function() {
862
- return b;
863
- },
864
- set: function(R) {
865
- E("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), b = R, Object.defineProperty(i, "propTypes", {
866
- enumerable: !0
867
- });
868
- }
869
- }
870
- });
871
- }
872
- return i;
873
- }
874
- function Ur(e) {
875
- e != null && e.$$typeof === T ? E("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? E("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && E("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && E("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
876
- var r = {
877
- $$typeof: j,
878
- render: e
879
- };
880
- {
881
- var i;
882
- Object.defineProperty(r, "displayName", {
883
- enumerable: !1,
884
- configurable: !0,
885
- get: function() {
886
- return i;
887
- },
888
- set: function(c) {
889
- i = c, !e.name && !e.displayName && (e.displayName = c);
890
- }
891
- });
892
- }
893
- return r;
894
- }
895
- var t;
896
- t = Symbol.for("react.module.reference");
897
- function m(e) {
898
- return !!(typeof e == "string" || typeof e == "function" || e === f || e === v || me || e === h || e === _ || e === O || ve || e === ae || Oe || Je || Pe || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === T || e.$$typeof === g || e.$$typeof === p || e.$$typeof === j || // This needs to include all possible module reference object
899
- // types supported by any Flight configuration anywhere since
900
- // we don't know which Flight build this will end up being used
901
- // with.
902
- e.$$typeof === t || e.getModuleId !== void 0));
903
- }
904
- function x(e, r) {
905
- m(e) || E("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
906
- var i = {
907
- $$typeof: T,
908
- type: e,
909
- compare: r === void 0 ? null : r
910
- };
911
- {
912
- var c;
913
- Object.defineProperty(i, "displayName", {
914
- enumerable: !1,
915
- configurable: !0,
916
- get: function() {
917
- return c;
918
- },
919
- set: function(b) {
920
- c = b, !e.name && !e.displayName && (e.displayName = b);
921
- }
922
- });
923
- }
924
- return i;
925
- }
926
- function C() {
927
- var e = ge.current;
928
- return e === null && E(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
929
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
930
- 2. You might be breaking the Rules of Hooks
931
- 3. You might have more than one copy of React in the same app
932
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
933
- }
934
- function B(e) {
935
- var r = C();
936
- if (e._context !== void 0) {
937
- var i = e._context;
938
- i.Consumer === e ? E("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : i.Provider === e && E("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
939
- }
940
- return r.useContext(e);
941
- }
942
- function V(e) {
943
- var r = C();
944
- return r.useState(e);
945
- }
946
- function D(e, r, i) {
947
- var c = C();
948
- return c.useReducer(e, r, i);
949
- }
950
- function P(e) {
951
- var r = C();
952
- return r.useRef(e);
953
- }
954
- function ue(e, r) {
955
- var i = C();
956
- return i.useEffect(e, r);
957
- }
958
- function ee(e, r) {
959
- var i = C();
960
- return i.useInsertionEffect(e, r);
961
- }
962
- function te(e, r) {
963
- var i = C();
964
- return i.useLayoutEffect(e, r);
965
- }
966
- function he(e, r) {
967
- var i = C();
968
- return i.useCallback(e, r);
969
- }
970
- function ke(e, r) {
971
- var i = C();
972
- return i.useMemo(e, r);
973
- }
974
- function we(e, r, i) {
975
- var c = C();
976
- return c.useImperativeHandle(e, r, i);
977
- }
978
- function fe(e, r) {
979
- {
980
- var i = C();
981
- return i.useDebugValue(e, r);
982
- }
983
- }
984
- function nr() {
985
- var e = C();
986
- return e.useTransition();
987
- }
988
- function Vr(e) {
989
- var r = C();
990
- return r.useDeferredValue(e);
991
- }
992
- function Yr() {
993
- var e = C();
994
- return e.useId();
995
- }
996
- function Yt(e, r, i) {
997
- var c = C();
998
- return c.useSyncExternalStore(e, r, i);
999
- }
1000
- var ar = 0, it, lt, ut, ct, ft, dt, pt;
1001
- function vt() {
1002
- }
1003
- vt.__reactDisabledLog = !0;
1004
- function zt() {
1005
- {
1006
- if (ar === 0) {
1007
- it = console.log, lt = console.info, ut = console.warn, ct = console.error, ft = console.group, dt = console.groupCollapsed, pt = console.groupEnd;
1008
- var e = {
1009
- configurable: !0,
1010
- enumerable: !0,
1011
- value: vt,
1012
- writable: !0
1013
- };
1014
- Object.defineProperties(console, {
1015
- info: e,
1016
- log: e,
1017
- warn: e,
1018
- error: e,
1019
- group: e,
1020
- groupCollapsed: e,
1021
- groupEnd: e
1022
- });
1023
- }
1024
- ar++;
1025
- }
1026
- }
1027
- function Ht() {
1028
- {
1029
- if (ar--, ar === 0) {
1030
- var e = {
1031
- configurable: !0,
1032
- enumerable: !0,
1033
- writable: !0
1034
- };
1035
- Object.defineProperties(console, {
1036
- log: y({}, e, {
1037
- value: it
1038
- }),
1039
- info: y({}, e, {
1040
- value: lt
1041
- }),
1042
- warn: y({}, e, {
1043
- value: ut
1044
- }),
1045
- error: y({}, e, {
1046
- value: ct
1047
- }),
1048
- group: y({}, e, {
1049
- value: ft
1050
- }),
1051
- groupCollapsed: y({}, e, {
1052
- value: dt
1053
- }),
1054
- groupEnd: y({}, e, {
1055
- value: pt
1056
- })
1057
- });
1058
- }
1059
- ar < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1060
- }
1061
- }
1062
- var zr = le.ReactCurrentDispatcher, Hr;
1063
- function gr(e, r, i) {
1064
- {
1065
- if (Hr === void 0)
1066
- try {
1067
- throw Error();
1068
- } catch (b) {
1069
- var c = b.stack.trim().match(/\n( *(at )?)/);
1070
- Hr = c && c[1] || "";
1071
- }
1072
- return `
1073
- ` + Hr + e;
1074
- }
1075
- }
1076
- var qr = !1, xr;
1077
- {
1078
- var qt = typeof WeakMap == "function" ? WeakMap : Map;
1079
- xr = new qt();
1080
- }
1081
- function mt(e, r) {
1082
- if (!e || qr)
1083
- return "";
1084
- {
1085
- var i = xr.get(e);
1086
- if (i !== void 0)
1087
- return i;
1088
- }
1089
- var c;
1090
- qr = !0;
1091
- var b = Error.prepareStackTrace;
1092
- Error.prepareStackTrace = void 0;
1093
- var R;
1094
- R = zr.current, zr.current = null, zt();
1095
- try {
1096
- if (r) {
1097
- var w = function() {
1098
- throw Error();
1099
- };
1100
- if (Object.defineProperty(w.prototype, "props", {
1101
- set: function() {
1102
- throw Error();
1103
- }
1104
- }), typeof Reflect == "object" && Reflect.construct) {
1105
- try {
1106
- Reflect.construct(w, []);
1107
- } catch (ce) {
1108
- c = ce;
1109
- }
1110
- Reflect.construct(e, [], w);
1111
- } else {
1112
- try {
1113
- w.call();
1114
- } catch (ce) {
1115
- c = ce;
1116
- }
1117
- e.call(w.prototype);
1118
- }
1119
- } else {
1120
- try {
1121
- throw Error();
1122
- } catch (ce) {
1123
- c = ce;
1124
- }
1125
- e();
1126
- }
1127
- } catch (ce) {
1128
- if (ce && c && typeof ce.stack == "string") {
1129
- for (var S = ce.stack.split(`
1130
- `), L = c.stack.split(`
1131
- `), q = S.length - 1, Z = L.length - 1; q >= 1 && Z >= 0 && S[q] !== L[Z]; )
1132
- Z--;
1133
- for (; q >= 1 && Z >= 0; q--, Z--)
1134
- if (S[q] !== L[Z]) {
1135
- if (q !== 1 || Z !== 1)
1136
- do
1137
- if (q--, Z--, Z < 0 || S[q] !== L[Z]) {
1138
- var Q = `
1139
- ` + S[q].replace(" at new ", " at ");
1140
- return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" && xr.set(e, Q), Q;
1141
- }
1142
- while (q >= 1 && Z >= 0);
1143
- break;
1144
- }
1145
- }
1146
- } finally {
1147
- qr = !1, zr.current = R, Ht(), Error.prepareStackTrace = b;
1148
- }
1149
- var re = e ? e.displayName || e.name : "", se = re ? gr(re) : "";
1150
- return typeof e == "function" && xr.set(e, se), se;
1151
- }
1152
- function Gt(e, r, i) {
1153
- return mt(e, !1);
1154
- }
1155
- function Kt(e) {
1156
- var r = e.prototype;
1157
- return !!(r && r.isReactComponent);
1158
- }
1159
- function _r(e, r, i) {
1160
- if (e == null)
1161
- return "";
1162
- if (typeof e == "function")
1163
- return mt(e, Kt(e));
1164
- if (typeof e == "string")
1165
- return gr(e);
1166
- switch (e) {
1167
- case _:
1168
- return gr("Suspense");
1169
- case O:
1170
- return gr("SuspenseList");
1171
- }
1172
- if (typeof e == "object")
1173
- switch (e.$$typeof) {
1174
- case j:
1175
- return Gt(e.render);
1176
- case T:
1177
- return _r(e.type, r, i);
1178
- case k: {
1179
- var c = e, b = c._payload, R = c._init;
1180
- try {
1181
- return _r(R(b), r, i);
1182
- } catch {
1183
- }
1184
- }
1185
- }
1186
- return "";
1187
- }
1188
- var ht = {}, yt = le.ReactDebugCurrentFrame;
1189
- function jr(e) {
1190
- if (e) {
1191
- var r = e._owner, i = _r(e.type, e._source, r ? r.type : null);
1192
- yt.setExtraStackFrame(i);
1193
- } else
1194
- yt.setExtraStackFrame(null);
1195
- }
1196
- function Jt(e, r, i, c, b) {
1197
- {
1198
- var R = Function.call.bind(De);
1199
- for (var w in e)
1200
- if (R(e, w)) {
1201
- var S = void 0;
1202
- try {
1203
- if (typeof e[w] != "function") {
1204
- var L = Error((c || "React class") + ": " + i + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1205
- throw L.name = "Invariant Violation", L;
1206
- }
1207
- S = e[w](r, w, c, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1208
- } catch (q) {
1209
- S = q;
1210
- }
1211
- S && !(S instanceof Error) && (jr(b), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", i, w, typeof S), jr(null)), S instanceof Error && !(S.message in ht) && (ht[S.message] = !0, jr(b), E("Failed %s type: %s", i, S.message), jr(null));
1212
- }
1213
- }
1214
- }
1215
- function qe(e) {
1216
- if (e) {
1217
- var r = e._owner, i = _r(e.type, e._source, r ? r.type : null);
1218
- Te(i);
1219
- } else
1220
- Te(null);
1221
- }
1222
- var Gr;
1223
- Gr = !1;
1224
- function bt() {
1225
- if (ie.current) {
1226
- var e = _e(ie.current.type);
1227
- if (e)
1228
- return `
1229
-
1230
- Check the render method of \`` + e + "`.";
1231
- }
1232
- return "";
1233
- }
1234
- function Xt(e) {
1235
- if (e !== void 0) {
1236
- var r = e.fileName.replace(/^.*[\\\/]/, ""), i = e.lineNumber;
1237
- return `
1238
-
1239
- Check your code at ` + r + ":" + i + ".";
1240
- }
1241
- return "";
1242
- }
1243
- function Zt(e) {
1244
- return e != null ? Xt(e.__source) : "";
1245
- }
1246
- var gt = {};
1247
- function Qt(e) {
1248
- var r = bt();
1249
- if (!r) {
1250
- var i = typeof e == "string" ? e : e.displayName || e.name;
1251
- i && (r = `
1252
-
1253
- Check the top-level render call using <` + i + ">.");
1254
- }
1255
- return r;
1256
- }
1257
- function xt(e, r) {
1258
- if (!(!e._store || e._store.validated || e.key != null)) {
1259
- e._store.validated = !0;
1260
- var i = Qt(r);
1261
- if (!gt[i]) {
1262
- gt[i] = !0;
1263
- var c = "";
1264
- e && e._owner && e._owner !== ie.current && (c = " It was passed a child from " + _e(e._owner.type) + "."), qe(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, c), qe(null);
1265
- }
1266
- }
1267
- }
1268
- function _t(e, r) {
1269
- if (typeof e == "object") {
1270
- if (Be(e))
1271
- for (var i = 0; i < e.length; i++) {
1272
- var c = e[i];
1273
- Re(c) && xt(c, r);
1274
- }
1275
- else if (Re(e))
1276
- e._store && (e._store.validated = !0);
1277
- else if (e) {
1278
- var b = Y(e);
1279
- if (typeof b == "function" && b !== e.entries)
1280
- for (var R = b.call(e), w; !(w = R.next()).done; )
1281
- Re(w.value) && xt(w.value, r);
1282
- }
1283
- }
1284
- }
1285
- function jt(e) {
1286
- {
1287
- var r = e.type;
1288
- if (r == null || typeof r == "string")
1289
- return;
1290
- var i;
1291
- if (typeof r == "function")
1292
- i = r.propTypes;
1293
- else if (typeof r == "object" && (r.$$typeof === j || // Note: Memo only checks outer props here.
1294
- // Inner props are checked in the reconciler.
1295
- r.$$typeof === T))
1296
- i = r.propTypes;
1297
- else
1298
- return;
1299
- if (i) {
1300
- var c = _e(r);
1301
- Jt(i, e.props, "prop", c, e);
1302
- } else if (r.PropTypes !== void 0 && !Gr) {
1303
- Gr = !0;
1304
- var b = _e(r);
1305
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
1306
- }
1307
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1308
- }
1309
- }
1310
- function en(e) {
1311
- {
1312
- for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
1313
- var c = r[i];
1314
- if (c !== "children" && c !== "key") {
1315
- qe(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), qe(null);
1316
- break;
1317
- }
1318
- }
1319
- e.ref !== null && (qe(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), qe(null));
1320
- }
1321
- }
1322
- function Ct(e, r, i) {
1323
- var c = m(e);
1324
- if (!c) {
1325
- var b = "";
1326
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1327
- var R = Zt(r);
1328
- R ? b += R : b += bt();
1329
- var w;
1330
- e === null ? w = "null" : Be(e) ? w = "array" : e !== void 0 && e.$$typeof === l ? (w = "<" + (_e(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, E("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, b);
1331
- }
1332
- var S = Ar.apply(this, arguments);
1333
- if (S == null)
1334
- return S;
1335
- if (c)
1336
- for (var L = 2; L < arguments.length; L++)
1337
- _t(arguments[L], e);
1338
- return e === f ? en(S) : jt(S), S;
1339
- }
1340
- var wt = !1;
1341
- function rn(e) {
1342
- var r = Ct.bind(null, e);
1343
- return r.type = e, wt || (wt = !0, be("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(r, "type", {
1344
- enumerable: !1,
1345
- get: function() {
1346
- return be("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
1347
- value: e
1348
- }), e;
1349
- }
1350
- }), r;
1351
- }
1352
- function tn(e, r, i) {
1353
- for (var c = Dr.apply(this, arguments), b = 2; b < arguments.length; b++)
1354
- _t(arguments[b], c.type);
1355
- return jt(c), c;
1356
- }
1357
- function nn(e, r) {
1358
- var i = K.transition;
1359
- K.transition = {};
1360
- var c = K.transition;
1361
- K.transition._updatedFibers = /* @__PURE__ */ new Set();
1362
- try {
1363
- e();
1364
- } finally {
1365
- if (K.transition = i, i === null && c._updatedFibers) {
1366
- var b = c._updatedFibers.size;
1367
- b > 10 && be("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), c._updatedFibers.clear();
1368
- }
1369
- }
1370
- }
1371
- var Et = !1, Cr = null;
1372
- function an(e) {
1373
- if (Cr === null)
1374
- try {
1375
- var r = ("require" + Math.random()).slice(0, 7), i = o && o[r];
1376
- Cr = i.call(o, "timers").setImmediate;
1377
- } catch {
1378
- Cr = function(b) {
1379
- Et === !1 && (Et = !0, typeof MessageChannel > "u" && E("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
1380
- var R = new MessageChannel();
1381
- R.port1.onmessage = b, R.port2.postMessage(void 0);
1382
- };
1383
- }
1384
- return Cr(e);
1385
- }
1386
- var Ge = 0, Rt = !1;
1387
- function St(e) {
1388
- {
1389
- var r = Ge;
1390
- Ge++, X.current === null && (X.current = []);
1391
- var i = X.isBatchingLegacy, c;
1392
- try {
1393
- if (X.isBatchingLegacy = !0, c = e(), !i && X.didScheduleLegacyUpdate) {
1394
- var b = X.current;
1395
- b !== null && (X.didScheduleLegacyUpdate = !1, Xr(b));
1396
- }
1397
- } catch (re) {
1398
- throw wr(r), re;
1399
- } finally {
1400
- X.isBatchingLegacy = i;
1401
- }
1402
- if (c !== null && typeof c == "object" && typeof c.then == "function") {
1403
- var R = c, w = !1, S = {
1404
- then: function(re, se) {
1405
- w = !0, R.then(function(ce) {
1406
- wr(r), Ge === 0 ? Kr(ce, re, se) : re(ce);
1407
- }, function(ce) {
1408
- wr(r), se(ce);
1409
- });
1410
- }
1411
- };
1412
- return !Rt && typeof Promise < "u" && Promise.resolve().then(function() {
1413
- }).then(function() {
1414
- w || (Rt = !0, E("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
1415
- }), S;
1416
- } else {
1417
- var L = c;
1418
- if (wr(r), Ge === 0) {
1419
- var q = X.current;
1420
- q !== null && (Xr(q), X.current = null);
1421
- var Z = {
1422
- then: function(re, se) {
1423
- X.current === null ? (X.current = [], Kr(L, re, se)) : re(L);
1424
- }
1425
- };
1426
- return Z;
1427
- } else {
1428
- var Q = {
1429
- then: function(re, se) {
1430
- re(L);
1431
- }
1432
- };
1433
- return Q;
1434
- }
1435
- }
1436
- }
1437
- }
1438
- function wr(e) {
1439
- e !== Ge - 1 && E("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), Ge = e;
1440
- }
1441
- function Kr(e, r, i) {
1442
- {
1443
- var c = X.current;
1444
- if (c !== null)
1445
- try {
1446
- Xr(c), an(function() {
1447
- c.length === 0 ? (X.current = null, r(e)) : Kr(e, r, i);
1448
- });
1449
- } catch (b) {
1450
- i(b);
1451
- }
1452
- else
1453
- r(e);
1454
- }
1455
- }
1456
- var Jr = !1;
1457
- function Xr(e) {
1458
- if (!Jr) {
1459
- Jr = !0;
1460
- var r = 0;
1461
- try {
1462
- for (; r < e.length; r++) {
1463
- var i = e[r];
1464
- do
1465
- i = i(!0);
1466
- while (i !== null);
1467
- }
1468
- e.length = 0;
1469
- } catch (c) {
1470
- throw e = e.slice(r + 1), c;
1471
- } finally {
1472
- Jr = !1;
1473
- }
1474
- }
1475
- }
1476
- var on = Ct, sn = tn, ln = rn, un = {
1477
- map: ze,
1478
- forEach: Fr,
1479
- count: hr,
1480
- toArray: yr,
1481
- only: br
1482
- };
1483
- a.Children = un, a.Component = $, a.Fragment = f, a.Profiler = v, a.PureComponent = U, a.StrictMode = h, a.Suspense = _, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = le, a.act = St, a.cloneElement = sn, a.createContext = Lr, a.createElement = on, a.createFactory = ln, a.createRef = Or, a.forwardRef = Ur, a.isValidElement = Re, a.lazy = Wr, a.memo = x, a.startTransition = nn, a.unstable_act = St, a.useCallback = he, a.useContext = B, a.useDebugValue = fe, a.useDeferredValue = Vr, a.useEffect = ue, a.useId = Yr, a.useImperativeHandle = we, a.useInsertionEffect = ee, a.useLayoutEffect = te, a.useMemo = ke, a.useReducer = D, a.useRef = P, a.useState = V, a.useSyncExternalStore = Yt, a.useTransition = nr, a.version = u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1484
- }();
1485
- }(ir, ir.exports)), ir.exports;
1486
- }
1487
- var It;
1488
- function at() {
1489
- return It || (It = 1, process.env.NODE_ENV === "production" ? Tr.exports = Kn() : Tr.exports = Jn()), Tr.exports;
1490
- }
1491
- /**
1492
- * @license React
1493
- * react-jsx-runtime.production.min.js
1494
- *
1495
- * Copyright (c) Facebook, Inc. and its affiliates.
1496
- *
1497
- * This source code is licensed under the MIT license found in the
1498
- * LICENSE file in the root directory of this source tree.
1499
- */
1500
- var Dt;
1501
- function Xn() {
1502
- if (Dt) return or;
1503
- Dt = 1;
1504
- var o = at(), a = Symbol.for("react.element"), u = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, d = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
1505
- function h(v, g, p) {
1506
- var j, _ = {}, O = null, T = null;
1507
- p !== void 0 && (O = "" + p), g.key !== void 0 && (O = "" + g.key), g.ref !== void 0 && (T = g.ref);
1508
- for (j in g) l.call(g, j) && !f.hasOwnProperty(j) && (_[j] = g[j]);
1509
- if (v && v.defaultProps) for (j in g = v.defaultProps, g) _[j] === void 0 && (_[j] = g[j]);
1510
- return { $$typeof: a, type: v, key: O, ref: T, props: _, _owner: d.current };
1511
- }
1512
- return or.Fragment = u, or.jsx = h, or.jsxs = h, or;
1513
- }
1514
- var sr = {};
1515
- /**
1516
- * @license React
1517
- * react-jsx-runtime.development.js
1518
- *
1519
- * Copyright (c) Facebook, Inc. and its affiliates.
1520
- *
1521
- * This source code is licensed under the MIT license found in the
1522
- * LICENSE file in the root directory of this source tree.
1523
- */
1524
- var $t;
1525
- function Zn() {
1526
- return $t || ($t = 1, process.env.NODE_ENV !== "production" && function() {
1527
- var o = at(), a = Symbol.for("react.element"), u = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), v = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), k = Symbol.iterator, ae = "@@iterator";
1528
- function de(t) {
1529
- if (t === null || typeof t != "object")
1530
- return null;
1531
- var m = k && t[k] || t[ae];
1532
- return typeof m == "function" ? m : null;
1533
- }
1534
- var A = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1535
- function Y(t) {
1536
- {
1537
- for (var m = arguments.length, x = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
1538
- x[C - 1] = arguments[C];
1539
- ge("error", t, x);
1540
- }
1541
- }
1542
- function ge(t, m, x) {
1543
- {
1544
- var C = A.ReactDebugCurrentFrame, B = C.getStackAddendum();
1545
- B !== "" && (m += "%s", x = x.concat([B]));
1546
- var V = x.map(function(D) {
1547
- return String(D);
1548
- });
1549
- V.unshift("Warning: " + m), Function.prototype.apply.call(console[t], console, V);
1550
- }
1551
- }
1552
- var K = !1, X = !1, ie = !1, pe = !1, je = !1, Te;
1553
- Te = Symbol.for("react.module.reference");
1554
- function Oe(t) {
1555
- return !!(typeof t == "string" || typeof t == "function" || t === l || t === f || je || t === d || t === p || t === j || pe || t === T || K || X || ie || typeof t == "object" && t !== null && (t.$$typeof === O || t.$$typeof === _ || t.$$typeof === h || t.$$typeof === v || t.$$typeof === g || // This needs to include all possible module reference object
1556
- // types supported by any Flight configuration anywhere since
1557
- // we don't know which Flight build this will end up being used
1558
- // with.
1559
- t.$$typeof === Te || t.getModuleId !== void 0));
1560
- }
1561
- function Je(t, m, x) {
1562
- var C = t.displayName;
1563
- if (C)
1564
- return C;
1565
- var B = m.displayName || m.name || "";
1566
- return B !== "" ? x + "(" + B + ")" : x;
1567
- }
1568
- function Pe(t) {
1569
- return t.displayName || "Context";
1570
- }
1571
- function ve(t) {
1572
- if (t == null)
1573
- return null;
1574
- if (typeof t.tag == "number" && Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
1575
- return t.displayName || t.name || null;
1576
- if (typeof t == "string")
1577
- return t;
1578
- switch (t) {
1579
- case l:
1580
- return "Fragment";
1581
- case u:
1582
- return "Portal";
1583
- case f:
1584
- return "Profiler";
1585
- case d:
1586
- return "StrictMode";
1587
- case p:
1588
- return "Suspense";
1589
- case j:
1590
- return "SuspenseList";
1591
- }
1592
- if (typeof t == "object")
1593
- switch (t.$$typeof) {
1594
- case v:
1595
- var m = t;
1596
- return Pe(m) + ".Consumer";
1597
- case h:
1598
- var x = t;
1599
- return Pe(x._context) + ".Provider";
1600
- case g:
1601
- return Je(t, t.render, "ForwardRef");
1602
- case _:
1603
- var C = t.displayName || null;
1604
- return C !== null ? C : ve(t.type) || "Memo";
1605
- case O: {
1606
- var B = t, V = B._payload, D = B._init;
1607
- try {
1608
- return ve(D(V));
1609
- } catch {
1610
- return null;
1611
- }
1612
- }
1613
- }
1614
- return null;
1615
- }
1616
- var me = Object.assign, le = 0, be, E, xe, Ne, Ce, s, y;
1617
- function I() {
1618
- }
1619
- I.__reactDisabledLog = !0;
1620
- function $() {
1621
- {
1622
- if (le === 0) {
1623
- be = console.log, E = console.info, xe = console.warn, Ne = console.error, Ce = console.group, s = console.groupCollapsed, y = console.groupEnd;
1624
- var t = {
1625
- configurable: !0,
1626
- enumerable: !0,
1627
- value: I,
1628
- writable: !0
1629
- };
1630
- Object.defineProperties(console, {
1631
- info: t,
1632
- log: t,
1633
- warn: t,
1634
- error: t,
1635
- group: t,
1636
- groupCollapsed: t,
1637
- groupEnd: t
1638
- });
1639
- }
1640
- le++;
1641
- }
1642
- }
1643
- function M() {
1644
- {
1645
- if (le--, le === 0) {
1646
- var t = {
1647
- configurable: !0,
1648
- enumerable: !0,
1649
- writable: !0
1650
- };
1651
- Object.defineProperties(console, {
1652
- log: me({}, t, {
1653
- value: be
1654
- }),
1655
- info: me({}, t, {
1656
- value: E
1657
- }),
1658
- warn: me({}, t, {
1659
- value: xe
1660
- }),
1661
- error: me({}, t, {
1662
- value: Ne
1663
- }),
1664
- group: me({}, t, {
1665
- value: Ce
1666
- }),
1667
- groupCollapsed: me({}, t, {
1668
- value: s
1669
- }),
1670
- groupEnd: me({}, t, {
1671
- value: y
1672
- })
1673
- });
1674
- }
1675
- le < 0 && Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1676
- }
1677
- }
1678
- var J = A.ReactCurrentDispatcher, H;
1679
- function z(t, m, x) {
1680
- {
1681
- if (H === void 0)
1682
- try {
1683
- throw Error();
1684
- } catch (B) {
1685
- var C = B.stack.trim().match(/\n( *(at )?)/);
1686
- H = C && C[1] || "";
1687
- }
1688
- return `
1689
- ` + H + t;
1690
- }
1691
- }
1692
- var U = !1, oe;
1693
- {
1694
- var Or = typeof WeakMap == "function" ? WeakMap : Map;
1695
- oe = new Or();
1696
- }
1697
- function ur(t, m) {
1698
- if (!t || U)
1699
- return "";
1700
- {
1701
- var x = oe.get(t);
1702
- if (x !== void 0)
1703
- return x;
1704
- }
1705
- var C;
1706
- U = !0;
1707
- var B = Error.prepareStackTrace;
1708
- Error.prepareStackTrace = void 0;
1709
- var V;
1710
- V = J.current, J.current = null, $();
1711
- try {
1712
- if (m) {
1713
- var D = function() {
1714
- throw Error();
1715
- };
1716
- if (Object.defineProperty(D.prototype, "props", {
1717
- set: function() {
1718
- throw Error();
1719
- }
1720
- }), typeof Reflect == "object" && Reflect.construct) {
1721
- try {
1722
- Reflect.construct(D, []);
1723
- } catch (fe) {
1724
- C = fe;
1725
- }
1726
- Reflect.construct(t, [], D);
1727
- } else {
1728
- try {
1729
- D.call();
1730
- } catch (fe) {
1731
- C = fe;
1732
- }
1733
- t.call(D.prototype);
1734
- }
1735
- } else {
1736
- try {
1737
- throw Error();
1738
- } catch (fe) {
1739
- C = fe;
1740
- }
1741
- t();
1742
- }
1743
- } catch (fe) {
1744
- if (fe && C && typeof fe.stack == "string") {
1745
- for (var P = fe.stack.split(`
1746
- `), ue = C.stack.split(`
1747
- `), ee = P.length - 1, te = ue.length - 1; ee >= 1 && te >= 0 && P[ee] !== ue[te]; )
1748
- te--;
1749
- for (; ee >= 1 && te >= 0; ee--, te--)
1750
- if (P[ee] !== ue[te]) {
1751
- if (ee !== 1 || te !== 1)
1752
- do
1753
- if (ee--, te--, te < 0 || P[ee] !== ue[te]) {
1754
- var he = `
1755
- ` + P[ee].replace(" at new ", " at ");
1756
- return t.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", t.displayName)), typeof t == "function" && oe.set(t, he), he;
1757
- }
1758
- while (ee >= 1 && te >= 0);
1759
- break;
1760
- }
1761
- }
1762
- } finally {
1763
- U = !1, J.current = V, M(), Error.prepareStackTrace = B;
1764
- }
1765
- var ke = t ? t.displayName || t.name : "", we = ke ? z(ke) : "";
1766
- return typeof t == "function" && oe.set(t, we), we;
1767
- }
1768
- function Be(t, m, x) {
1769
- return ur(t, !1);
1770
- }
1771
- function Pr(t) {
1772
- var m = t.prototype;
1773
- return !!(m && m.isReactComponent);
1774
- }
1775
- function We(t, m, x) {
1776
- if (t == null)
1777
- return "";
1778
- if (typeof t == "function")
1779
- return ur(t, Pr(t));
1780
- if (typeof t == "string")
1781
- return z(t);
1782
- switch (t) {
1783
- case p:
1784
- return z("Suspense");
1785
- case j:
1786
- return z("SuspenseList");
1787
- }
1788
- if (typeof t == "object")
1789
- switch (t.$$typeof) {
1790
- case g:
1791
- return Be(t.render);
1792
- case _:
1793
- return We(t.type, m, x);
1794
- case O: {
1795
- var C = t, B = C._payload, V = C._init;
1796
- try {
1797
- return We(V(B), m, x);
1798
- } catch {
1799
- }
1800
- }
1801
- }
1802
- return "";
1803
- }
1804
- var Ee = Object.prototype.hasOwnProperty, Ae = {}, cr = A.ReactDebugCurrentFrame;
1805
- function Ie(t) {
1806
- if (t) {
1807
- var m = t._owner, x = We(t.type, t._source, m ? m.type : null);
1808
- cr.setExtraStackFrame(x);
1809
- } else
1810
- cr.setExtraStackFrame(null);
1811
- }
1812
- function _e(t, m, x, C, B) {
1813
- {
1814
- var V = Function.call.bind(Ee);
1815
- for (var D in t)
1816
- if (V(t, D)) {
1817
- var P = void 0;
1818
- try {
1819
- if (typeof t[D] != "function") {
1820
- var ue = Error((C || "React class") + ": " + x + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1821
- throw ue.name = "Invariant Violation", ue;
1822
- }
1823
- P = t[D](m, D, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1824
- } catch (ee) {
1825
- P = ee;
1826
- }
1827
- P && !(P instanceof Error) && (Ie(B), Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, D, typeof P), Ie(null)), P instanceof Error && !(P.message in Ae) && (Ae[P.message] = !0, Ie(B), Y("Failed %s type: %s", x, P.message), Ie(null));
1828
- }
1829
- }
1830
- }
1831
- var De = Array.isArray;
1832
- function Ue(t) {
1833
- return De(t);
1834
- }
1835
- function fr(t) {
1836
- {
1837
- var m = typeof Symbol == "function" && Symbol.toStringTag, x = m && t[Symbol.toStringTag] || t.constructor.name || "Object";
1838
- return x;
1839
- }
1840
- }
1841
- function dr(t) {
1842
- try {
1843
- return Ve(t), !1;
1844
- } catch {
1845
- return !0;
1846
- }
1847
- }
1848
- function Ve(t) {
1849
- return "" + t;
1850
- }
1851
- function Xe(t) {
1852
- if (dr(t))
1853
- return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fr(t)), Ve(t);
1854
- }
1855
- var Ze = A.ReactCurrentOwner, Nr = {
1856
- key: !0,
1857
- ref: !0,
1858
- __self: !0,
1859
- __source: !0
1860
- }, pr, vr;
1861
- function Qe(t) {
1862
- if (Ee.call(t, "ref")) {
1863
- var m = Object.getOwnPropertyDescriptor(t, "ref").get;
1864
- if (m && m.isReactWarning)
1865
- return !1;
1866
- }
1867
- return t.ref !== void 0;
1868
- }
1869
- function Ar(t) {
1870
- if (Ee.call(t, "key")) {
1871
- var m = Object.getOwnPropertyDescriptor(t, "key").get;
1872
- if (m && m.isReactWarning)
1873
- return !1;
1874
- }
1875
- return t.key !== void 0;
1876
- }
1877
- function Ir(t, m) {
1878
- typeof t.ref == "string" && Ze.current;
1879
- }
1880
- function Dr(t, m) {
1881
- {
1882
- var x = function() {
1883
- pr || (pr = !0, Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1884
- };
1885
- x.isReactWarning = !0, Object.defineProperty(t, "key", {
1886
- get: x,
1887
- configurable: !0
1888
- });
1889
- }
1890
- }
1891
- function Re(t, m) {
1892
- {
1893
- var x = function() {
1894
- vr || (vr = !0, Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1895
- };
1896
- x.isReactWarning = !0, Object.defineProperty(t, "ref", {
1897
- get: x,
1898
- configurable: !0
1899
- });
1900
- }
1901
- }
1902
- var mr = function(t, m, x, C, B, V, D) {
1903
- var P = {
1904
- // This tag allows us to uniquely identify this as a React Element
1905
- $$typeof: a,
1906
- // Built-in properties that belong on the element
1907
- type: t,
1908
- key: m,
1909
- ref: x,
1910
- props: D,
1911
- // Record the component responsible for creating this element.
1912
- _owner: V
1913
- };
1914
- return P._store = {}, Object.defineProperty(P._store, "validated", {
1915
- configurable: !1,
1916
- enumerable: !1,
1917
- writable: !0,
1918
- value: !1
1919
- }), Object.defineProperty(P, "_self", {
1920
- configurable: !1,
1921
- enumerable: !1,
1922
- writable: !1,
1923
- value: C
1924
- }), Object.defineProperty(P, "_source", {
1925
- configurable: !1,
1926
- enumerable: !1,
1927
- writable: !1,
1928
- value: B
1929
- }), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
1930
- };
1931
- function $r(t, m, x, C, B) {
1932
- {
1933
- var V, D = {}, P = null, ue = null;
1934
- x !== void 0 && (Xe(x), P = "" + x), Ar(m) && (Xe(m.key), P = "" + m.key), Qe(m) && (ue = m.ref, Ir(m, B));
1935
- for (V in m)
1936
- Ee.call(m, V) && !Nr.hasOwnProperty(V) && (D[V] = m[V]);
1937
- if (t && t.defaultProps) {
1938
- var ee = t.defaultProps;
1939
- for (V in ee)
1940
- D[V] === void 0 && (D[V] = ee[V]);
1941
- }
1942
- if (P || ue) {
1943
- var te = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
1944
- P && Dr(D, te), ue && Re(D, te);
1945
- }
1946
- return mr(t, P, ue, B, C, Ze.current, D);
1947
- }
1948
- }
1949
- var er = A.ReactCurrentOwner, rr = A.ReactDebugCurrentFrame;
1950
- function Se(t) {
1951
- if (t) {
1952
- var m = t._owner, x = We(t.type, t._source, m ? m.type : null);
1953
- rr.setExtraStackFrame(x);
1954
- } else
1955
- rr.setExtraStackFrame(null);
1956
- }
1957
- var Ye;
1958
- Ye = !1;
1959
- function $e(t) {
1960
- return typeof t == "object" && t !== null && t.$$typeof === a;
1961
- }
1962
- function Fe() {
1963
- {
1964
- if (er.current) {
1965
- var t = ve(er.current.type);
1966
- if (t)
1967
- return `
1968
-
1969
- Check the render method of \`` + t + "`.";
1970
- }
1971
- return "";
1972
- }
1973
- }
1974
- function ze(t) {
1975
- return "";
1976
- }
1977
- var hr = {};
1978
- function Fr(t) {
1979
- {
1980
- var m = Fe();
1981
- if (!m) {
1982
- var x = typeof t == "string" ? t : t.displayName || t.name;
1983
- x && (m = `
1984
-
1985
- Check the top-level render call using <` + x + ">.");
1986
- }
1987
- return m;
1988
- }
1989
- }
1990
- function yr(t, m) {
1991
- {
1992
- if (!t._store || t._store.validated || t.key != null)
1993
- return;
1994
- t._store.validated = !0;
1995
- var x = Fr(m);
1996
- if (hr[x])
1997
- return;
1998
- hr[x] = !0;
1999
- var C = "";
2000
- t && t._owner && t._owner !== er.current && (C = " It was passed a child from " + ve(t._owner.type) + "."), Se(t), Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Se(null);
2001
- }
2002
- }
2003
- function br(t, m) {
2004
- {
2005
- if (typeof t != "object")
2006
- return;
2007
- if (Ue(t))
2008
- for (var x = 0; x < t.length; x++) {
2009
- var C = t[x];
2010
- $e(C) && yr(C, m);
2011
- }
2012
- else if ($e(t))
2013
- t._store && (t._store.validated = !0);
2014
- else if (t) {
2015
- var B = de(t);
2016
- if (typeof B == "function" && B !== t.entries)
2017
- for (var V = B.call(t), D; !(D = V.next()).done; )
2018
- $e(D.value) && yr(D.value, m);
2019
- }
2020
- }
2021
- }
2022
- function Lr(t) {
2023
- {
2024
- var m = t.type;
2025
- if (m == null || typeof m == "string")
2026
- return;
2027
- var x;
2028
- if (typeof m == "function")
2029
- x = m.propTypes;
2030
- else if (typeof m == "object" && (m.$$typeof === g || // Note: Memo only checks outer props here.
2031
- // Inner props are checked in the reconciler.
2032
- m.$$typeof === _))
2033
- x = m.propTypes;
2034
- else
2035
- return;
2036
- if (x) {
2037
- var C = ve(m);
2038
- _e(x, t.props, "prop", C, t);
2039
- } else if (m.PropTypes !== void 0 && !Ye) {
2040
- Ye = !0;
2041
- var B = ve(m);
2042
- Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
2043
- }
2044
- typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2045
- }
2046
- }
2047
- function Le(t) {
2048
- {
2049
- for (var m = Object.keys(t.props), x = 0; x < m.length; x++) {
2050
- var C = m[x];
2051
- if (C !== "children" && C !== "key") {
2052
- Se(t), Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Se(null);
2053
- break;
2054
- }
2055
- }
2056
- t.ref !== null && (Se(t), Y("Invalid attribute `ref` supplied to `React.Fragment`."), Se(null));
2057
- }
2058
- }
2059
- var He = {};
2060
- function tr(t, m, x, C, B, V) {
2061
- {
2062
- var D = Oe(t);
2063
- if (!D) {
2064
- var P = "";
2065
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2066
- var ue = ze();
2067
- ue ? P += ue : P += Fe();
2068
- var ee;
2069
- t === null ? ee = "null" : Ue(t) ? ee = "array" : t !== void 0 && t.$$typeof === a ? (ee = "<" + (ve(t.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof t, Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, P);
2070
- }
2071
- var te = $r(t, m, x, B, V);
2072
- if (te == null)
2073
- return te;
2074
- if (D) {
2075
- var he = m.children;
2076
- if (he !== void 0)
2077
- if (C)
2078
- if (Ue(he)) {
2079
- for (var ke = 0; ke < he.length; ke++)
2080
- br(he[ke], t);
2081
- Object.freeze && Object.freeze(he);
2082
- } else
2083
- Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2084
- else
2085
- br(he, t);
2086
- }
2087
- if (Ee.call(m, "key")) {
2088
- var we = ve(t), fe = Object.keys(m).filter(function(Yr) {
2089
- return Yr !== "key";
2090
- }), nr = fe.length > 0 ? "{key: someKey, " + fe.join(": ..., ") + ": ...}" : "{key: someKey}";
2091
- if (!He[we + nr]) {
2092
- var Vr = fe.length > 0 ? "{" + fe.join(": ..., ") + ": ...}" : "{}";
2093
- Y(`A props object containing a "key" prop is being spread into JSX:
2094
- let props = %s;
2095
- <%s {...props} />
2096
- React keys must be passed directly to JSX without using spread:
2097
- let props = %s;
2098
- <%s key={someKey} {...props} />`, nr, we, Vr, we), He[we + nr] = !0;
2099
- }
2100
- }
2101
- return t === l ? Le(te) : Lr(te), te;
2102
- }
2103
- }
2104
- function Mr(t, m, x) {
2105
- return tr(t, m, x, !0);
2106
- }
2107
- function Br(t, m, x) {
2108
- return tr(t, m, x, !1);
2109
- }
2110
- var Wr = Br, Ur = Mr;
2111
- sr.Fragment = l, sr.jsx = Wr, sr.jsxs = Ur;
2112
- }()), sr;
2113
- }
2114
- var Ft;
2115
- function Qn() {
2116
- return Ft || (Ft = 1, process.env.NODE_ENV === "production" ? kr.exports = Xn() : kr.exports = Zn()), kr.exports;
2117
- }
2118
- var n = Qn();
2119
- at();
2120
- var et = { exports: {} };
11
+ var P = { exports: {} };
2121
12
  /*!
2122
13
  Copyright (c) 2018 Jed Watson.
2123
14
  Licensed under the MIT License (MIT), see
2124
15
  http://jedwatson.github.io/classnames
2125
16
  */
2126
- var Lt;
2127
- function ea() {
2128
- return Lt || (Lt = 1, function(o) {
17
+ var z;
18
+ function xe() {
19
+ return z || (z = 1, function(e) {
2129
20
  (function() {
2130
- var a = {}.hasOwnProperty;
2131
- function u() {
2132
- for (var f = "", h = 0; h < arguments.length; h++) {
2133
- var v = arguments[h];
2134
- v && (f = d(f, l(v)));
21
+ var t = {}.hasOwnProperty;
22
+ function l() {
23
+ for (var r = "", s = 0; s < arguments.length; s++) {
24
+ var c = arguments[s];
25
+ c && (r = n(r, a(c)));
2135
26
  }
2136
- return f;
27
+ return r;
2137
28
  }
2138
- function l(f) {
2139
- if (typeof f == "string" || typeof f == "number")
2140
- return f;
2141
- if (typeof f != "object")
29
+ function a(r) {
30
+ if (typeof r == "string" || typeof r == "number")
31
+ return r;
32
+ if (typeof r != "object")
2142
33
  return "";
2143
- if (Array.isArray(f))
2144
- return u.apply(null, f);
2145
- if (f.toString !== Object.prototype.toString && !f.toString.toString().includes("[native code]"))
2146
- return f.toString();
2147
- var h = "";
2148
- for (var v in f)
2149
- a.call(f, v) && f[v] && (h = d(h, v));
2150
- return h;
2151
- }
2152
- function d(f, h) {
2153
- return h ? f ? f + " " + h : f + h : f;
2154
- }
2155
- o.exports ? (u.default = u, o.exports = u) : window.classNames = u;
34
+ if (Array.isArray(r))
35
+ return l.apply(null, r);
36
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
37
+ return r.toString();
38
+ var s = "";
39
+ for (var c in r)
40
+ t.call(r, c) && r[c] && (s = n(s, c));
41
+ return s;
42
+ }
43
+ function n(r, s) {
44
+ return s ? r ? r + " " + s : r + s : r;
45
+ }
46
+ e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
2156
47
  })();
2157
- }(et)), et.exports;
48
+ }(P)), P.exports;
2158
49
  }
2159
- var ra = ea();
2160
- const W = /* @__PURE__ */ Gn(ra), ne = ({
2161
- children: o,
2162
- className: a,
2163
- important: u = !1,
2164
- onClick: l
2165
- }) => u ? /* @__PURE__ */ n.jsx("div", { className: "bb_", onClick: l, children: /* @__PURE__ */ n.jsx("div", { className: a, children: o }) }) : /* @__PURE__ */ n.jsx("div", { className: a, children: o }), Ke = ({ icon: o, className: a = "" }) => o ? /* @__PURE__ */ n.jsxs(ne, { className: "blockbite--icon", children: [
2166
- /* @__PURE__ */ n.jsx(o, { className: a }),
2167
- " "
2168
- ] }) : null, ta = tt(
50
+ var ve = xe();
51
+ const f = /* @__PURE__ */ Ce(ve), h = ({
52
+ children: e,
53
+ className: t,
54
+ important: l = !1,
55
+ onClick: a
56
+ }) => l ? /* @__PURE__ */ React.createElement("div", { onClick: a }, /* @__PURE__ */ React.createElement("div", { className: t }, e)) : /* @__PURE__ */ React.createElement("div", { className: t }, e), N = ({ icon: e, className: t = "" }) => e ? /* @__PURE__ */ React.createElement(h, { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { className: t }), " ") : null, we = j(
2169
57
  ({
2170
- children: o,
2171
- className: a,
2172
- value: u,
2173
- variant: l = "secondary",
2174
- defaultPressed: d,
2175
- onPressedChange: f,
2176
- icon: h,
2177
- size: v = "compact",
2178
- display: g = "auto",
2179
- label: p
58
+ children: e,
59
+ className: t,
60
+ value: l,
61
+ variant: a = "secondary",
62
+ defaultPressed: n,
63
+ onPressedChange: r,
64
+ icon: s,
65
+ size: c = "compact",
66
+ display: i = "auto",
67
+ label: o
2180
68
  }) => {
2181
- const [j, _] = F(!1);
2182
- G(() => {
2183
- _(d === u);
2184
- }, [d]);
2185
- const O = Mt(() => {
2186
- _((T) => !T), f(u);
2187
- }, [j, f]);
2188
- return /* @__PURE__ */ n.jsxs(
2189
- ye,
69
+ const [m, u] = p(!1);
70
+ g(() => {
71
+ u(n === l);
72
+ }, [n]);
73
+ const E = A(() => {
74
+ u((R) => !R), r(l);
75
+ }, [m, r]);
76
+ return /* @__PURE__ */ React.createElement(
77
+ v,
2190
78
  {
2191
- "aria-label": p,
2192
- className: W(a, "blockbite-ui__button--default"),
2193
- value: u,
2194
- size: v,
2195
- label: p,
2196
- variant: l,
79
+ "aria-label": o,
80
+ className: f(t, "blockbite-ui__button--default"),
81
+ value: l,
82
+ size: c,
83
+ label: o,
84
+ variant: a,
2197
85
  showTooltip: !0,
2198
- isPressed: j,
2199
- onClick: O,
2200
- children: [
2201
- h && /* @__PURE__ */ n.jsx(Ke, { icon: h }),
2202
- g !== "icon" ? o : null,
2203
- p && !o && g !== "icon" ? /* @__PURE__ */ n.jsx("span", { children: p }) : null
2204
- ]
2205
- }
86
+ isPressed: m,
87
+ onClick: E
88
+ },
89
+ s && /* @__PURE__ */ React.createElement(N, { icon: s }),
90
+ i !== "icon" ? e : null,
91
+ o && !e && i !== "icon" ? /* @__PURE__ */ React.createElement("span", null, o) : null
2206
92
  );
2207
93
  }
2208
- ), na = tt(
94
+ ), ye = j(
2209
95
  ({
2210
- className: o,
2211
- defaultPressed: a = "",
2212
- toggle: u = !0,
2213
- display: l = "auto",
2214
- options: d,
2215
- size: f = "compact",
2216
- tabs: h = !1,
2217
- variant: v = "secondary",
2218
- stretch: g = !1,
2219
- onPressedChange: p
96
+ className: e,
97
+ defaultPressed: t = "",
98
+ toggle: l = !0,
99
+ display: a = "auto",
100
+ options: n,
101
+ size: r = "compact",
102
+ tabs: s = !1,
103
+ variant: c = "secondary",
104
+ stretch: i = !1,
105
+ onPressedChange: o
2220
106
  }) => {
2221
- const [j, _] = F(a);
2222
- G(() => {
2223
- _(a);
2224
- }, [a]);
2225
- const O = Mt(
2226
- (k) => {
2227
- const ae = u && j === k ? "" : k;
2228
- _(ae), p?.(ae);
107
+ const [m, u] = p(t);
108
+ g(() => {
109
+ u(t);
110
+ }, [t]);
111
+ const E = A(
112
+ (d) => {
113
+ const x = l && m === d ? "" : d;
114
+ u(x), o == null || o(x);
2229
115
  },
2230
- [j, p, u]
2231
- ), T = (k) => l === "icon" && k?.icon ? /* @__PURE__ */ n.jsx(Ke, { icon: k.icon }) : l === "label" ? /* @__PURE__ */ n.jsx("span", { children: k.label }) : /* @__PURE__ */ n.jsxs("span", { className: "flex items-center justify-center gap-1", children: [
2232
- k.icon && /* @__PURE__ */ n.jsx(Ke, { icon: k.icon }),
2233
- /* @__PURE__ */ n.jsx("span", { children: k.label })
2234
- ] });
2235
- return /* @__PURE__ */ n.jsx(
2236
- ne,
116
+ [m, o, l]
117
+ ), R = (d) => a === "icon" && (d != null && d.icon) ? /* @__PURE__ */ React.createElement(N, { icon: d.icon }) : a === "label" ? /* @__PURE__ */ React.createElement("span", null, d.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, d.icon && /* @__PURE__ */ React.createElement(N, { icon: d.icon }), /* @__PURE__ */ React.createElement("span", null, d.label));
118
+ return /* @__PURE__ */ React.createElement(
119
+ h,
2237
120
  {
2238
- className: W(
121
+ className: f(
2239
122
  "blockbite-ui__button-group flex flex-wrap gap-1",
2240
- o,
2241
- h ? "blockbite-ui__button-group--tabs" : ""
2242
- ),
2243
- children: d.map((k, ae) => /* @__PURE__ */ n.jsxs(
2244
- ye,
2245
- {
2246
- className: W("blockbite-ui__button--default", {
2247
- grow: g,
2248
- "justify-center": g
2249
- }),
2250
- "aria-label": k.label,
2251
- showTooltip: !0,
2252
- value: k.value,
2253
- size: f,
2254
- label: k?.tooltip || k.label,
2255
- variant: v,
2256
- isPressed: j === k.value,
2257
- onClick: () => O(k.value),
2258
- children: [
2259
- T(k),
2260
- k.children && k.children
2261
- ]
2262
- },
2263
- `ButtonToggleGroup__${k.value}__${k.label}__${ae}`
2264
- ))
2265
- }
123
+ e,
124
+ s ? "blockbite-ui__button-group--tabs" : ""
125
+ )
126
+ },
127
+ n.map((d, x) => /* @__PURE__ */ React.createElement(
128
+ v,
129
+ {
130
+ key: `ButtonToggleGroup__${d.value}__${d.label}__${x}`,
131
+ className: f("blockbite-ui__button--default", {
132
+ grow: i,
133
+ "justify-center": i
134
+ }),
135
+ "aria-label": d.label,
136
+ showTooltip: !0,
137
+ value: d.value,
138
+ size: r,
139
+ label: (d == null ? void 0 : d.tooltip) || d.label,
140
+ variant: c,
141
+ isPressed: m === d.value,
142
+ onClick: () => E(d.value)
143
+ },
144
+ R(d),
145
+ d.children && d.children
146
+ ))
2266
147
  );
2267
148
  }
2268
149
  );
2269
- function Sa({
2270
- defaultValue: o,
2271
- options: a,
2272
- swatch: u,
2273
- onPressedChange: l
150
+ function ct({
151
+ defaultValue: e,
152
+ options: t,
153
+ swatch: l,
154
+ onPressedChange: a
2274
155
  }) {
2275
- const [d, f] = F(""), [h, v] = F([]);
2276
- return G(() => {
2277
- v(
2278
- a.filter(
2279
- (g) => g.label.toLowerCase().includes(d.toLowerCase())
156
+ const [n, r] = p(""), [s, c] = p([]);
157
+ return g(() => {
158
+ c(
159
+ t.filter(
160
+ (i) => i.label.toLowerCase().includes(n.toLowerCase())
2280
161
  )
2281
162
  );
2282
- }, [d, a]), G(() => {
2283
- f(""), v(a);
2284
- }, [o, a]), /* @__PURE__ */ n.jsx(
2285
- pn,
163
+ }, [n, t]), g(() => {
164
+ r(""), c(t);
165
+ }, [e, t]), /* @__PURE__ */ React.createElement(
166
+ Y,
2286
167
  {
2287
168
  className: "option-panel-dropdown",
2288
169
  contentClassName: "option-panel-dropdown-content",
2289
170
  popoverProps: { placement: "bottom-start" },
2290
- renderToggle: ({ isOpen: g, onToggle: p }) => /* @__PURE__ */ n.jsx(ne, { important: !0, children: /* @__PURE__ */ n.jsx(
2291
- ye,
171
+ renderToggle: ({ isOpen: i, onToggle: o }) => /* @__PURE__ */ React.createElement(h, { important: !0 }, /* @__PURE__ */ React.createElement(
172
+ v,
173
+ {
174
+ variant: "secondary",
175
+ size: "small",
176
+ onClick: o,
177
+ "aria-expanded": i
178
+ },
179
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1.5 !bg-transparent !p-0 !text-[11px] !text-current" }, l && !!e && /* @__PURE__ */ React.createElement(
180
+ "div",
181
+ {
182
+ className: f(
183
+ `h-3 w-3 rounded-full bg-${e}`
184
+ )
185
+ }
186
+ ), /* @__PURE__ */ React.createElement("span", null, e || "Select option…"))
187
+ )),
188
+ renderContent: () => /* @__PURE__ */ React.createElement(h, { important: !0 }, /* @__PURE__ */ React.createElement("div", { className: "w-52" }, /* @__PURE__ */ React.createElement(
189
+ O,
2292
190
  {
2293
- variant: "secondary",
191
+ __next40pxDefaultSize: !0,
192
+ __nextHasNoMarginBottom: !0,
193
+ label: "Search options",
194
+ value: n,
195
+ onChange: (i) => r(i),
196
+ autoComplete: "off"
197
+ }
198
+ ), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2" }, s.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]" }, "No options found."), s.map((i, o) => /* @__PURE__ */ React.createElement(
199
+ we,
200
+ {
201
+ key: `ButtonToggle__${i.value}___${o}`,
202
+ className: f({
203
+ "bg-primary": i.value
204
+ }),
2294
205
  size: "small",
2295
- onClick: p,
2296
- "aria-expanded": g,
2297
- children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-1.5 !bg-transparent !p-0 !text-[11px] !text-current", children: [
2298
- u && !!o && /* @__PURE__ */ n.jsx(
2299
- "div",
2300
- {
2301
- className: W(
2302
- `h-3 w-3 rounded-full bg-${o}`
2303
- )
2304
- }
2305
- ),
2306
- /* @__PURE__ */ n.jsx("span", { children: o || "Select option…" })
2307
- ] })
2308
- }
2309
- ) }),
2310
- renderContent: () => /* @__PURE__ */ n.jsx(ne, { important: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "w-52", children: [
2311
- /* @__PURE__ */ n.jsx(
2312
- rt,
206
+ value: i.value.toString(),
207
+ defaultPressed: e,
208
+ onPressedChange: (m) => {
209
+ a(m ? i.value : "");
210
+ }
211
+ },
212
+ l && /* @__PURE__ */ React.createElement(
213
+ "div",
2313
214
  {
2314
- __next40pxDefaultSize: !0,
2315
- __nextHasNoMarginBottom: !0,
2316
- label: "Search options",
2317
- value: d,
2318
- onChange: (g) => f(g),
2319
- autoComplete: "off"
215
+ className: f(
216
+ `mr-3 h-3 w-3 rounded-full bg-${i.value}`
217
+ )
2320
218
  }
2321
219
  ),
2322
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2", children: [
2323
- h.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]", children: "No options found." }),
2324
- h.map((g, p) => /* @__PURE__ */ n.jsxs(
2325
- ta,
2326
- {
2327
- className: W({
2328
- "bg-primary": g.value
2329
- }),
2330
- size: "small",
2331
- value: g.value.toString(),
2332
- defaultPressed: o,
2333
- onPressedChange: (j) => {
2334
- l(j ? g.value : "");
2335
- },
2336
- children: [
2337
- u && /* @__PURE__ */ n.jsx(
2338
- "div",
2339
- {
2340
- className: W(
2341
- `mr-3 h-3 w-3 rounded-full bg-${g.value}`
2342
- )
2343
- }
2344
- ),
2345
- g.label
2346
- ]
2347
- },
2348
- `ButtonToggle__${g.value}___${p}`
2349
- ))
2350
- ] })
2351
- ] }) })
220
+ i.label
221
+ )))))
2352
222
  }
2353
223
  );
2354
224
  }
2355
- const aa = ({ children: o, className: a, label: u, onClick: l }) => /* @__PURE__ */ n.jsxs(
225
+ const Ne = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__ */ React.createElement(
2356
226
  "div",
2357
227
  {
2358
- onClick: l,
2359
- className: W(
2360
- a,
228
+ onClick: a,
229
+ className: f(
230
+ t,
2361
231
  "inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"
2362
- ),
2363
- children: [
2364
- u && /* @__PURE__ */ n.jsx("span", { className: "mr-1 text-xs font-semibold text-gray-700", children: u }),
2365
- o
2366
- ]
2367
- }
2368
- ), ka = ({ htmlContent: o, cssContent: a, frontendAssets: u }) => {
2369
- const l = lr(null), [d, f] = F(null);
2370
- return G(() => {
2371
- const h = l.current;
2372
- return h && (h.onload = () => {
2373
- const v = h.contentDocument || h.contentWindow.document;
2374
- if (v) {
2375
- f(v.body);
2376
- const g = v.createElement("style");
2377
- g.innerHTML = a, v.head.appendChild(g), u.forEach(({ type: p, id: j, url: _ }) => {
2378
- const O = document.getElementById(j);
2379
- if (O) {
2380
- const T = document.adoptNode(
2381
- O.cloneNode(!0)
232
+ )
233
+ },
234
+ l && /* @__PURE__ */ React.createElement("span", { className: "mr-1 text-xs font-semibold text-gray-700" }, l),
235
+ e
236
+ ), st = ({ htmlContent: e, cssContent: t, frontendAssets: l }) => {
237
+ const a = k(null), [n, r] = p(null);
238
+ return g(() => {
239
+ const s = a.current;
240
+ return s && (s.onload = () => {
241
+ const c = s.contentDocument || s.contentWindow.document;
242
+ if (c) {
243
+ r(c.body);
244
+ const i = c.createElement("style");
245
+ i.innerHTML = t, c.head.appendChild(i), l.forEach(({ type: o, id: m, url: u }) => {
246
+ const E = document.getElementById(m);
247
+ if (E) {
248
+ const R = document.adoptNode(
249
+ E.cloneNode(!0)
2382
250
  );
2383
- v.head.appendChild(T);
251
+ c.head.appendChild(R);
2384
252
  } else {
2385
- const T = v.createElement(
2386
- p === "script" ? "script" : "link"
253
+ const R = c.createElement(
254
+ o === "script" ? "script" : "link"
2387
255
  );
2388
- T.id = j, p === "script" ? (T.src = _, T.async = !0) : (T.rel = "stylesheet", T.href = _), v.head.appendChild(T);
256
+ R.id = m, o === "script" ? (R.src = u, R.async = !0) : (R.rel = "stylesheet", R.href = u), c.head.appendChild(R);
2389
257
  }
2390
258
  });
2391
259
  }
2392
260
  }), () => {
2393
- h && (h.onload = null);
261
+ s && (s.onload = null);
2394
262
  };
2395
- }, [o, a, u]), /* @__PURE__ */ n.jsxs(
263
+ }, [e, t, l]), /* @__PURE__ */ React.createElement(
2396
264
  "div",
2397
265
  {
2398
266
  className: "render-preview-container",
2399
- style: { width: "100%", minHeight: "100%" },
2400
- children: [
2401
- /* @__PURE__ */ n.jsx(
2402
- "iframe",
2403
- {
2404
- ref: l,
2405
- title: "Preview",
2406
- className: "editor-styles-wrapper",
2407
- width: "100%",
2408
- height: "100%"
2409
- }
2410
- ),
2411
- d && Bt(
2412
- /* @__PURE__ */ n.jsx("div", { className: "b_", children: /* @__PURE__ */ n.jsx(
2413
- "div",
2414
- {
2415
- className: "b_utils",
2416
- dangerouslySetInnerHTML: { __html: o }
2417
- }
2418
- ) }),
2419
- d
2420
- )
2421
- ]
2422
- }
267
+ style: { width: "100%", minHeight: "100%" }
268
+ },
269
+ /* @__PURE__ */ React.createElement(
270
+ "iframe",
271
+ {
272
+ ref: a,
273
+ title: "Preview",
274
+ className: "editor-styles-wrapper",
275
+ width: "100%",
276
+ height: "100%"
277
+ }
278
+ ),
279
+ n && D(
280
+ /* @__PURE__ */ React.createElement("div", { className: "b_" }, /* @__PURE__ */ React.createElement(
281
+ "div",
282
+ {
283
+ className: "b_utils",
284
+ dangerouslySetInnerHTML: { __html: e }
285
+ }
286
+ )),
287
+ n
288
+ )
2423
289
  );
2424
- }, Ta = ({
2425
- children: o,
2426
- size: a = "default",
2427
- label: u,
2428
- className: l,
2429
- onClick: d,
2430
- variant: f = "primary",
2431
- display: h = "auto",
2432
- icon: v,
2433
- disabled: g = !1
290
+ }, ot = ({
291
+ children: e,
292
+ size: t = "default",
293
+ label: l,
294
+ className: a,
295
+ onClick: n,
296
+ variant: r = "primary",
297
+ display: s = "auto",
298
+ icon: c,
299
+ disabled: i = !1
2434
300
  }) => {
2435
- const p = h === "icon" || h === "icon-lg";
2436
- return /* @__PURE__ */ n.jsxs(
2437
- ye,
301
+ const o = s === "icon" || s === "icon-lg";
302
+ return /* @__PURE__ */ React.createElement(
303
+ v,
2438
304
  {
2439
- size: a,
2440
- variant: f,
2441
- label: u,
305
+ size: t,
306
+ variant: r,
307
+ label: l,
2442
308
  showTooltip: !0,
2443
- disabled: g,
2444
- className: W(
2445
- l,
309
+ disabled: i,
310
+ className: f(
311
+ a,
2446
312
  "blockbite-ui__button",
2447
313
  "flex items-center justify-center gap-1",
2448
- { "is-primary": f === "primary" },
2449
- { "is-secondary": f === "secondary" },
2450
- { "is-link": f === "link" },
2451
- { "is-tertiary": f === "tertiary" },
2452
- { "is-icon": h === "icon" }
314
+ { "is-primary": r === "primary" },
315
+ { "is-secondary": r === "secondary" },
316
+ { "is-link": r === "link" },
317
+ { "is-tertiary": r === "tertiary" },
318
+ { "is-icon": s === "icon" }
2453
319
  ),
2454
- onClick: d,
2455
- children: [
2456
- v && /* @__PURE__ */ n.jsx(
2457
- Ke,
2458
- {
2459
- icon: v,
2460
- className: W({ "h-4 w-4": h === "icon-lg" })
2461
- }
2462
- ),
2463
- p ? null : o,
2464
- u && !o && !p ? /* @__PURE__ */ n.jsx("span", { children: u }) : null
2465
- ]
2466
- }
320
+ onClick: n
321
+ },
322
+ c && /* @__PURE__ */ React.createElement(
323
+ N,
324
+ {
325
+ icon: c,
326
+ className: f({ "h-4 w-4": s === "icon-lg" })
327
+ }
328
+ ),
329
+ o ? null : e,
330
+ l && !e && !o ? /* @__PURE__ */ React.createElement("span", null, l) : null
2467
331
  );
2468
- }, Oa = ({ children: o, title: a }) => /* @__PURE__ */ n.jsxs(
2469
- ne,
332
+ }, it = ({ children: e, title: t }) => /* @__PURE__ */ React.createElement(
333
+ h,
2470
334
  {
2471
- className: W(
335
+ className: f(
2472
336
  "text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
2473
- W
2474
- ),
2475
- children: [
2476
- a && /* @__PURE__ */ n.jsx(ne, { className: "font-medium", children: a }),
2477
- o
2478
- ]
2479
- }
2480
- ), Pa = ({
2481
- title: o,
2482
- className: a,
2483
- help: u,
2484
- badge: l,
2485
- ...d
2486
- }) => /* @__PURE__ */ n.jsxs("div", { className: W("mb-2", a), ...d, children: [
2487
- /* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between", children: [
2488
- /* @__PURE__ */ n.jsx("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug", children: o }),
2489
- !!l && /* @__PURE__ */ n.jsx(aa, { className: "text-[10px] py-px px-1", children: l })
2490
- ] }),
2491
- u && /* @__PURE__ */ n.jsx("small", { className: "w-full shrink-0 text-[11px]", children: u })
2492
- ] }), Na = ({ label: o, help: a, defaultChecked: u }) => {
2493
- const [l, d] = F(u);
2494
- return G(() => {
2495
- d(u);
2496
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2", children: /* @__PURE__ */ n.jsx(
2497
- vn,
337
+ f
338
+ )
339
+ },
340
+ t && /* @__PURE__ */ React.createElement(h, { className: "font-medium" }, t),
341
+ e
342
+ ), mt = ({
343
+ title: e,
344
+ className: t,
345
+ help: l,
346
+ badge: a,
347
+ ...n
348
+ }) => /* @__PURE__ */ React.createElement("div", { className: f("mb-2", t), ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between" }, /* @__PURE__ */ React.createElement("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug" }, e), !!a && /* @__PURE__ */ React.createElement(Ne, { className: "text-[10px] py-px px-1" }, a)), l && /* @__PURE__ */ React.createElement("small", { className: "w-full shrink-0 text-[11px]" }, l)), ut = ({ label: e, help: t, defaultChecked: l }) => {
349
+ const [a, n] = p(l);
350
+ return g(() => {
351
+ n(l);
352
+ }, [l]), /* @__PURE__ */ React.createElement(h, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
353
+ J,
2498
354
  {
2499
- label: o,
2500
- help: a,
2501
- checked: l,
2502
- onChange: d
2503
- }
2504
- ) });
2505
- }, ot = Pn(
355
+ label: e,
356
+ help: t,
357
+ checked: a,
358
+ onChange: n
359
+ }
360
+ ));
361
+ }, ke = (e) => React.createElement(
362
+ "svg",
363
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
364
+ React.createElement("path", { d: "M3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523Z", fill: "currentColor" })
365
+ ), _e = (e) => React.createElement(
366
+ "svg",
367
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
368
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.50012 1C7.22398 1 7.00012 1.22386 7.00012 1.5V13.5C7.00012 13.7761 7.22398 14 7.50012 14C7.77626 14 8.00012 13.7761 8.00012 13.5V1.5C8.00012 1.22386 7.77626 1 7.50012 1ZM3.31812 5.18161C3.14239 5.00587 2.85746 5.00587 2.68173 5.18161L0.681729 7.18161C0.505993 7.35734 0.505993 7.64227 0.681729 7.818L2.68173 9.818C2.85746 9.99374 3.14239 9.99374 3.31812 9.818C3.49386 9.64227 3.49386 9.35734 3.31812 9.18161L2.08632 7.9498H5.50017C5.7487 7.9498 5.95017 7.74833 5.95017 7.4998C5.95017 7.25128 5.7487 7.0498 5.50017 7.0498H2.08632L3.31812 5.818C3.49386 5.64227 3.49386 5.35734 3.31812 5.18161ZM11.6817 5.18161C11.506 5.35734 11.506 5.64227 11.6817 5.818L12.9135 7.0498H9.50017C9.25164 7.0498 9.05017 7.25128 9.05017 7.4998C9.05017 7.74833 9.25164 7.9498 9.50017 7.9498H12.9135L11.6817 9.18161C11.506 9.35734 11.506 9.64227 11.6817 9.818C11.8575 9.99374 12.1424 9.99374 12.3181 9.818L14.3181 7.818C14.4939 7.64227 14.4939 7.35734 14.3181 7.18161L12.3181 5.18161C12.1424 5.00587 11.8575 5.00587 11.6817 5.18161Z", fill: "currentColor" })
369
+ ), Le = (e) => React.createElement(
370
+ "svg",
371
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
372
+ React.createElement("path", { d: "M11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184Z", fill: "currentColor" })
373
+ ), Me = (e) => React.createElement(
374
+ "svg",
375
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
376
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25C0.559643 2 0 2.55964 0 3.25ZM1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25C1 3.11193 1.11193 3 1.25 3ZM5.98909 12L5.79222 13.05H9.20778L9.01091 12H5.98909Z", fill: "currentColor" })
377
+ ), Se = (e) => React.createElement(
378
+ "svg",
379
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
380
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5C1.67157 1 1 1.67157 1 2.5ZM8 2V7H13V2.5C13 2.22386 12.7761 2 12.5 2H8ZM8 8V13H12.5C12.7761 13 13 12.7761 13 12.5V8H8ZM7 2H2.5C2.22386 2 2 2.22386 2 2.5V7H7V2ZM2 12.5C2 12.7761 2.22386 13 2.5 13H7V8H2V12.5Z", fill: "currentColor" })
381
+ ), Te = (e) => React.createElement(
382
+ "svg",
383
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
384
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645ZM11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547L11.5 2.20711Z", fill: "currentColor" })
385
+ ), He = (e) => React.createElement(
386
+ "svg",
387
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
388
+ React.createElement("circle", { cx: 4.85355, cy: 4.5, r: 1.5, fill: "currentColor" }),
389
+ React.createElement("circle", { cx: 9.85355, cy: 10.5, r: 1.5, fill: "currentColor" }),
390
+ React.createElement("path", { d: "M3 11.6464L11 3.64642", stroke: "currentColor", strokeLinecap: "round" })
391
+ ), Be = (e) => React.createElement(
392
+ "svg",
393
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
394
+ React.createElement("path", { d: "M7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75C8 2.47386 7.77614 2.25 7.5 2.25Z", fill: "currentColor" })
395
+ ), Pe = (e) => React.createElement(
396
+ "svg",
397
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
398
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.49988 10.2504C7.1516 10.2504 6.0299 9.28026 5.79473 7.99997H0.5C0.223858 7.99997 0 7.77611 0 7.49997C0 7.22383 0.223858 6.99997 0.5 6.99997H5.7947C6.0298 5.71959 7.15154 4.74939 8.49988 4.74939C9.84822 4.74939 10.97 5.71959 11.2051 6.99997H14.5C14.7761 6.99997 15 7.22383 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H11.205C10.9699 9.28026 9.84816 10.2504 8.49988 10.2504ZM8.49988 9.30038C7.50549 9.30038 6.69938 8.49427 6.69938 7.49988C6.69938 6.5055 7.50549 5.69939 8.49988 5.69939C9.49426 5.69939 10.3004 6.5055 10.3004 7.49988C10.3004 8.49427 9.49426 9.30038 8.49988 9.30038Z", fill: "currentColor" })
399
+ ), Oe = (e) => React.createElement(
400
+ "svg",
401
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
402
+ React.createElement("path", { d: "M4 5.33333C4.4 3.77778 5.4 3 7 3C9.4 3 9.7 4.75 10.9 5.04167C11.7 5.23611 12.4 4.94444 13 4.16667C12.6 5.72222 11.6 6.5 10 6.5C7.6 6.5 7.3 4.75 6.1 4.45833C5.3 4.26389 4.6 4.55556 4 5.33333ZM1 8.83333C1.4 7.27778 2.4 6.5 4 6.5C6.4 6.5 6.7 8.25 7.9 8.54167C8.7 8.73611 9.4 8.44444 10 7.66667C9.6 9.22222 8.6 10 7 10C4.6 10 4.3 8.25 3.1 7.95833C2.3 7.76389 1.6 8.05556 1 8.83333Z", fill: "currentColor" })
403
+ ), je = (e) => React.createElement(
404
+ "svg",
405
+ Object.assign({ width: e.width || "1em", height: e.height || "1em", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img" }, e),
406
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5C5.22386 1 5 1.22386 5 1.5ZM3.5 3H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5C3 3.22386 3.22386 3 3.5 3ZM10 4V12H5V4H10Z", fill: "currentColor" })
407
+ ), I = F(
2506
408
  ({
2507
- onClick: o,
2508
- onChange: a,
2509
- className: u,
2510
- defaultValue: l,
2511
- children: d,
2512
- inputClassName: f,
2513
- readOnly: h,
2514
- placeholder: v,
2515
- onBlur: g,
2516
- type: p = "text",
2517
- label: j,
2518
- helper: _ = "",
2519
- ...O
2520
- }, T) => {
2521
- const k = `text-control-${Math.random().toString(36).substring(2, 15)}`;
2522
- return /* @__PURE__ */ n.jsxs(
409
+ onClick: e,
410
+ onChange: t,
411
+ className: l,
412
+ defaultValue: a,
413
+ children: n,
414
+ inputClassName: r,
415
+ readOnly: s,
416
+ placeholder: c,
417
+ onBlur: i,
418
+ type: o = "text",
419
+ label: m,
420
+ helper: u = "",
421
+ ...E
422
+ }, R) => {
423
+ const d = `text-control-${Math.random().toString(36).substring(2, 15)}`;
424
+ return /* @__PURE__ */ React.createElement(
2523
425
  "div",
2524
426
  {
2525
- className: W("flex items-center p-0", u),
2526
- ...O,
2527
- children: [
2528
- j ? /* @__PURE__ */ n.jsx("label", { htmlFor: k, className: "text-primary !m-0 !mb-0 !mr-2", children: j }) : null,
2529
- /* @__PURE__ */ n.jsx(
2530
- "input",
2531
- {
2532
- id: k,
2533
- className: W(
2534
- "border-primary !m-0 !mb-0 h-[32px] !rounded-none border border-opacity-70 focus:outline-none focus:ring-0",
2535
- f
2536
- ),
2537
- type: p,
2538
- value: l,
2539
- placeholder: v,
2540
- onFocus: () => o && o(),
2541
- onBlur: (ae) => {
2542
- o && o(), g && g(ae.target.value);
2543
- },
2544
- onChange: (ae) => a && a(ae.target.value),
2545
- readOnly: h,
2546
- ref: T
2547
- }
427
+ className: f("flex items-center p-0", l),
428
+ ...E
429
+ },
430
+ m ? /* @__PURE__ */ React.createElement("label", { htmlFor: d, className: "text-primary !m-0 !mb-0 !mr-2" }, m) : null,
431
+ /* @__PURE__ */ React.createElement(
432
+ "input",
433
+ {
434
+ id: d,
435
+ className: f(
436
+ "border-primary !m-0 !mb-0 h-[32px] !rounded-none border border-opacity-70 focus:outline-none focus:ring-0",
437
+ r
2548
438
  ),
2549
- /* @__PURE__ */ n.jsx("span", { children: d }),
2550
- _ && /* @__PURE__ */ n.jsx("p", { className: "text-primary !m-0 !mb-0 text-xs", children: _ })
2551
- ]
2552
- }
439
+ type: o,
440
+ value: a,
441
+ placeholder: c,
442
+ onFocus: () => e && e(),
443
+ onBlur: (x) => {
444
+ e && e(), i && i(x.target.value);
445
+ },
446
+ onChange: (x) => t && t(x.target.value),
447
+ readOnly: s,
448
+ ref: R
449
+ }
450
+ ),
451
+ /* @__PURE__ */ React.createElement("span", null, n),
452
+ u && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, u)
2553
453
  );
2554
454
  }
2555
455
  );
2556
- ot.displayName = "TextControl";
2557
- const Aa = ({
2558
- data: o,
2559
- active: a,
2560
- setActive: u,
2561
- onCreate: l,
2562
- onDelete: d,
2563
- onUpdate: f,
2564
- onSwitch: h,
2565
- renderItemActions: v,
2566
- addons: g,
2567
- className: p = "",
2568
- footerSlot: j,
2569
- footerSlotClassName: _ = ""
456
+ I.displayName = "TextControl";
457
+ const dt = ({
458
+ data: e,
459
+ active: t,
460
+ setActive: l,
461
+ onCreate: a,
462
+ onDelete: n,
463
+ onUpdate: r,
464
+ onSwitch: s,
465
+ renderItemActions: c,
466
+ addons: i,
467
+ className: o = "",
468
+ footerSlot: m,
469
+ footerSlotClassName: u = ""
2570
470
  }) => {
2571
- const [O, T] = F({
471
+ const [E, R] = p({
2572
472
  id: "",
2573
473
  name: ""
2574
- }), [k, ae] = F(!1), de = lr(null), A = () => {
2575
- l();
2576
- }, Y = () => {
2577
- if (!a || o.length === 0) return;
2578
- const K = o.filter((pe) => pe.id !== a?.id), X = o.findIndex((pe) => pe.id === a?.id), ie = K[X] || K[0];
2579
- d(a?.id), u(ie);
2580
- }, ge = (K) => {
2581
- ae(!0), O.id && f(O.id, { name: K }), setTimeout(() => {
2582
- T({ id: "", name: "" }), ae(!1);
474
+ }), [d, x] = p(!1), T = k(null), b = () => {
475
+ a();
476
+ }, _ = () => {
477
+ if (!t || e.length === 0) return;
478
+ const C = e.filter((H) => H.id !== (t == null ? void 0 : t.id)), w = e.findIndex((H) => H.id === (t == null ? void 0 : t.id)), X = C[w] || C[0];
479
+ n(t == null ? void 0 : t.id), l(X);
480
+ }, L = (C) => {
481
+ x(!0), E.id && r(E.id, { name: C }), setTimeout(() => {
482
+ R({ id: "", name: "" }), x(!1);
2583
483
  }, 500);
2584
484
  };
2585
- return /* @__PURE__ */ n.jsxs(ne, { important: !0, className: p, children: [
2586
- /* @__PURE__ */ n.jsxs("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto", children: [
2587
- g,
2588
- o.length > 0 && /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("ul", { className: "divide-y border-b", children: o.map((K) => /* @__PURE__ */ n.jsxs(
2589
- "li",
485
+ return /* @__PURE__ */ React.createElement(h, { important: !0, className: o }, /* @__PURE__ */ React.createElement("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto" }, i, e.length > 0 && /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("ul", { className: "divide-y border-b" }, e.map((C) => /* @__PURE__ */ React.createElement(
486
+ "li",
487
+ {
488
+ key: `data__${C.id}`,
489
+ className: f(
490
+ "relative m-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
2590
491
  {
2591
- className: W(
2592
- "relative m-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
2593
- {
2594
- "bg-easy": K.id === a?.id
2595
- }
2596
- ),
2597
- children: [
2598
- /* @__PURE__ */ n.jsxs("div", { className: "flex-1 relative", children: [
2599
- /* @__PURE__ */ n.jsx(
2600
- "button",
2601
- {
2602
- className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
2603
- onClick: () => {
2604
- h(a?.id, { ...a }), u(K);
2605
- },
2606
- onDoubleClick: () => {
2607
- T({ id: K.id, name: K.name || "" });
2608
- },
2609
- children: k && O.id === K.id ? /* @__PURE__ */ n.jsx("span", { className: "animate-pulse text-gray-medium", children: O.name }) : /* @__PURE__ */ n.jsx("span", { className: "text-gray-medium", children: K.name || "Untitled" })
2610
- }
2611
- ),
2612
- O.id === K.id && !k && /* @__PURE__ */ n.jsx(
2613
- ot,
2614
- {
2615
- className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
2616
- inputClassName: "w-full",
2617
- defaultValue: O.name,
2618
- onChange: (X) => T({ ...O, name: X }),
2619
- ref: de,
2620
- onBlur: ge
2621
- }
2622
- )
2623
- ] }),
2624
- v && /* @__PURE__ */ n.jsx("div", { className: "flex gap-1 pr-1", children: v(K) })
2625
- ]
492
+ "bg-easy": C.id === (t == null ? void 0 : t.id)
493
+ }
494
+ )
495
+ },
496
+ /* @__PURE__ */ React.createElement("div", { className: "flex-1 relative" }, /* @__PURE__ */ React.createElement(
497
+ "button",
498
+ {
499
+ className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
500
+ onClick: () => {
501
+ s(t == null ? void 0 : t.id, { ...t }), l(C);
2626
502
  },
2627
- `data__${K.id}`
2628
- )) }) })
2629
- ] }),
2630
- /* @__PURE__ */ n.jsxs(
2631
- "div",
503
+ onDoubleClick: () => {
504
+ R({ id: C.id, name: C.name || "" });
505
+ }
506
+ },
507
+ d && E.id === C.id ? /* @__PURE__ */ React.createElement("span", { className: "animate-pulse text-gray-medium" }, E.name) : /* @__PURE__ */ React.createElement("span", { className: "text-gray-medium" }, C.name || "Untitled")
508
+ ), E.id === C.id && !d && /* @__PURE__ */ React.createElement(
509
+ I,
2632
510
  {
2633
- className: W(
2634
- "flex flex-wrap justify-center gap-2 p-2",
2635
- _
2636
- ),
2637
- children: [
2638
- j,
2639
- /* @__PURE__ */ n.jsx(
2640
- ye,
2641
- {
2642
- onClick: A,
2643
- icon: /* @__PURE__ */ n.jsx(An, { className: "h-4 w-4" }),
2644
- variant: "tertiary",
2645
- size: "compact",
2646
- children: "Add"
2647
- }
2648
- ),
2649
- /* @__PURE__ */ n.jsx(
2650
- ye,
2651
- {
2652
- onClick: Y,
2653
- icon: /* @__PURE__ */ n.jsx(In, { className: "h-4 w-4" }),
2654
- variant: "tertiary",
2655
- size: "compact",
2656
- disabled: !a || o.length === 0,
2657
- children: "Remove"
2658
- }
2659
- )
2660
- ]
2661
- }
511
+ className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
512
+ inputClassName: "w-full",
513
+ defaultValue: E.name,
514
+ onChange: (w) => R({ ...E, name: w }),
515
+ ref: T,
516
+ onBlur: L
517
+ }
518
+ )),
519
+ c && /* @__PURE__ */ React.createElement("div", { className: "flex gap-1 pr-1" }, c(C))
520
+ ))))), /* @__PURE__ */ React.createElement(
521
+ "div",
522
+ {
523
+ className: f(
524
+ "flex flex-wrap justify-center gap-2 p-2",
525
+ u
526
+ )
527
+ },
528
+ m,
529
+ /* @__PURE__ */ React.createElement(
530
+ v,
531
+ {
532
+ onClick: b,
533
+ icon: /* @__PURE__ */ React.createElement(Be, { className: "h-4 w-4" }),
534
+ variant: "tertiary",
535
+ size: "compact"
536
+ },
537
+ "Add"
538
+ ),
539
+ /* @__PURE__ */ React.createElement(
540
+ v,
541
+ {
542
+ onClick: _,
543
+ icon: /* @__PURE__ */ React.createElement(je, { className: "h-4 w-4" }),
544
+ variant: "tertiary",
545
+ size: "compact",
546
+ disabled: !t || e.length === 0
547
+ },
548
+ "Remove"
2662
549
  )
2663
- ] });
2664
- }, Ia = ({
2665
- duration: o = 3e3,
2666
- className: a,
2667
- children: u,
2668
- show: l,
2669
- message: d
550
+ ));
551
+ }, pt = ({
552
+ duration: e = 3e3,
553
+ className: t,
554
+ children: l,
555
+ show: a,
556
+ message: n
2670
557
  }) => {
2671
- const [f, h] = F(!1), v = lr(!1), g = lr(null);
2672
- return G(() => {
2673
- v.current = !0;
2674
- }, []), G(() => {
2675
- if (v.current)
2676
- return l && (h(!0), g.current = setTimeout(() => {
2677
- h(!1);
2678
- }, o)), () => {
2679
- g.current && clearTimeout(g.current);
558
+ const [r, s] = p(!1), c = k(!1), i = k(null);
559
+ return g(() => {
560
+ c.current = !0;
561
+ }, []), g(() => {
562
+ if (c.current)
563
+ return a && (s(!0), i.current = setTimeout(() => {
564
+ s(!1);
565
+ }, e)), () => {
566
+ i.current && clearTimeout(i.current);
2680
567
  };
2681
- }, [l, o]), f ? /* @__PURE__ */ n.jsx(
2682
- ne,
568
+ }, [a, e]), r ? /* @__PURE__ */ React.createElement(
569
+ h,
2683
570
  {
2684
571
  important: !0,
2685
- className: W("bb-ui__disappearing-message", a),
2686
- children: /* @__PURE__ */ n.jsx("div", { className: "bb-ui__disappearing-message__content", children: d ?? u })
2687
- }
572
+ className: f("bb-ui__disappearing-message", t)
573
+ },
574
+ /* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" }, n ?? l)
2688
575
  ) : null;
2689
- }, oa = ({
2690
- label: o,
2691
- className: a,
2692
- defaultValue: u,
2693
- defaultIcon: l = Dn,
2694
- onPressedChange: d,
2695
- options: f
576
+ }, Ve = ({
577
+ label: e,
578
+ className: t,
579
+ defaultValue: l,
580
+ defaultIcon: a = ke,
581
+ onPressedChange: n,
582
+ options: r
2696
583
  }) => {
2697
- const [h, v] = F(null);
2698
- G(() => {
2699
- v(u);
2700
- }, [u]);
2701
- const g = [
2702
- ...f.map((p) => ({
2703
- icon: p.icon,
2704
- label: p.label,
2705
- title: p.label,
2706
- value: p.value,
584
+ var o;
585
+ const [s, c] = p(null);
586
+ g(() => {
587
+ c(l);
588
+ }, [l]);
589
+ const i = [
590
+ ...r.map((m) => ({
591
+ icon: m.icon,
592
+ label: m.label,
593
+ title: m.label,
594
+ value: m.value,
2707
595
  onClick: () => {
2708
- v(p.value), d(p.value);
596
+ c(m.value), n(m.value);
2709
597
  }
2710
598
  })),
2711
599
  {
2712
- icon: /* @__PURE__ */ n.jsx(Ke, { icon: l }),
600
+ icon: /* @__PURE__ */ React.createElement(N, { icon: a }),
2713
601
  title: "Reset",
2714
602
  value: "reset",
2715
603
  onClick: () => {
2716
- v("reset"), d("reset");
604
+ c("reset"), n("reset");
2717
605
  }
2718
606
  }
2719
607
  ];
2720
- return /* @__PURE__ */ n.jsx(
2721
- mn,
608
+ return /* @__PURE__ */ React.createElement(
609
+ Q,
2722
610
  {
2723
- controls: g,
2724
- className: W(
611
+ controls: i,
612
+ className: f(
2725
613
  "blockbite-ui__dropdown-picker border-primary border",
2726
- a
614
+ t
2727
615
  ),
2728
- icon: f.find((p) => p.value === h)?.icon || /* @__PURE__ */ n.jsx(Ke, { icon: l }),
2729
- label: o || "Select"
616
+ icon: ((o = r.find((m) => m.value === s)) == null ? void 0 : o.icon) || /* @__PURE__ */ React.createElement(N, { icon: a }),
617
+ label: e || "Select"
2730
618
  }
2731
619
  );
2732
620
  };
2733
- function Da({
2734
- icon: o,
2735
- title: a,
2736
- description: u,
2737
- children: l = null,
2738
- ...d
621
+ function ft({
622
+ icon: e,
623
+ title: t,
624
+ description: l,
625
+ children: a = null,
626
+ ...n
2739
627
  }) {
2740
- return /* @__PURE__ */ n.jsx("div", { ...d, children: /* @__PURE__ */ n.jsx("div", { className: "flex h-full w-full flex-col items-center justify-center text-center !font-sans", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-sm", children: [
2741
- o && /* @__PURE__ */ n.jsx("div", { className: "mx-auto !text-gray-400", children: o }),
2742
- /* @__PURE__ */ n.jsx("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium", children: a }),
2743
- /* @__PURE__ */ n.jsx("p", { className: "mt-1 !font-sans text-sm !text-gray-500", children: u }),
2744
- l && /* @__PURE__ */ n.jsx("div", { className: "mt-4", children: l })
2745
- ] }) }) });
628
+ return /* @__PURE__ */ React.createElement("div", { ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center text-center !font-sans" }, /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, e && /* @__PURE__ */ React.createElement("div", { className: "mx-auto !text-gray-400" }, e), /* @__PURE__ */ React.createElement("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium" }, t), /* @__PURE__ */ React.createElement("p", { className: "mt-1 !font-sans text-sm !text-gray-500" }, l), a && /* @__PURE__ */ React.createElement("div", { className: "mt-4" }, a))));
2746
629
  }
2747
- function $a({
2748
- children: o
630
+ function gt({
631
+ children: e
2749
632
  }) {
2750
- const a = lr(null), [u, l] = F({ x: 100, y: 100 }), [d, f] = F(!1), [h, v] = F({ x: 0, y: 0 });
2751
- G(() => {
2752
- const p = (_) => {
2753
- d && l({
2754
- x: _.clientX - h.x,
2755
- y: _.clientY - h.y
633
+ const t = k(null), [l, a] = p({ x: 100, y: 100 }), [n, r] = p(!1), [s, c] = p({ x: 0, y: 0 });
634
+ g(() => {
635
+ const o = (u) => {
636
+ n && a({
637
+ x: u.clientX - s.x,
638
+ y: u.clientY - s.y
2756
639
  });
2757
- }, j = () => f(!1);
2758
- return window.addEventListener("mousemove", p), window.addEventListener("mouseup", j), () => {
2759
- window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", j);
640
+ }, m = () => r(!1);
641
+ return window.addEventListener("mousemove", o), window.addEventListener("mouseup", m), () => {
642
+ window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", m);
2760
643
  };
2761
- }, [d, h]);
2762
- const g = (p) => {
2763
- const j = a.current.getBoundingClientRect();
2764
- v({ x: p.clientX - j.left, y: p.clientY - j.top }), f(!0);
644
+ }, [n, s]);
645
+ const i = (o) => {
646
+ const m = t.current.getBoundingClientRect();
647
+ c({ x: o.clientX - m.left, y: o.clientY - m.top }), r(!0);
2765
648
  };
2766
- return /* @__PURE__ */ n.jsx("div", { className: "bb_", children: /* @__PURE__ */ n.jsxs(
649
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
2767
650
  "div",
2768
651
  {
2769
- ref: a,
652
+ ref: t,
2770
653
  className: "fixed bg-white shadow-xl rounded-2xl p-4 w-[400px] h-[550px] z-[9999]",
2771
- style: { left: u.x, top: u.y },
2772
- children: [
2773
- o,
2774
- /* @__PURE__ */ n.jsx(
2775
- "div",
2776
- {
2777
- className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
2778
- onMouseDown: g
2779
- }
2780
- )
2781
- ]
2782
- }
2783
- ) });
654
+ style: { left: l.x, top: l.y }
655
+ },
656
+ e,
657
+ /* @__PURE__ */ React.createElement(
658
+ "div",
659
+ {
660
+ className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
661
+ onMouseDown: i
662
+ }
663
+ )
664
+ ));
2784
665
  }
2785
- const Fa = ({
2786
- defaultValue: o,
2787
- onValueChange: a,
2788
- url: u
666
+ const Rt = ({
667
+ defaultValue: e,
668
+ onValueChange: t,
669
+ url: l
2789
670
  }) => {
2790
- const [l, d] = F({
671
+ const [a, n] = p({
2791
672
  x: 0.5,
2792
673
  y: 0.5
2793
674
  });
2794
- return G(() => {
2795
- a(
2796
- `[${(l.x * 100).toFixed(2)}%_${(l.y * 100).toFixed(
675
+ return g(() => {
676
+ t(
677
+ `[${(a.x * 100).toFixed(2)}%_${(a.y * 100).toFixed(
2797
678
  2
2798
679
  )}%]`
2799
680
  );
2800
- }, [l]), G(() => {
2801
- if (o.includes("%")) {
2802
- const [f, h] = o.replace("[", "").replace("%]", "").split("_").map((v) => parseFloat(v) / 100);
2803
- d({
2804
- x: f,
2805
- y: h
681
+ }, [a]), g(() => {
682
+ if (e.includes("%")) {
683
+ const [r, s] = e.replace("[", "").replace("%]", "").split("_").map((c) => parseFloat(c) / 100);
684
+ n({
685
+ x: r,
686
+ y: s
2806
687
  });
2807
688
  }
2808
- }, [o]), /* @__PURE__ */ n.jsx(ne, { className: "relative flex flex-col", children: /* @__PURE__ */ n.jsx(
2809
- hn,
689
+ }, [e]), /* @__PURE__ */ React.createElement(h, { className: "relative flex flex-col" }, /* @__PURE__ */ React.createElement(
690
+ ee,
2810
691
  {
2811
- url: u,
2812
- value: l,
2813
- onDrag: (f) => d(f),
2814
- onChange: (f) => d(f)
692
+ url: l,
693
+ value: a,
694
+ onDrag: (r) => n(r),
695
+ onChange: (r) => n(r)
2815
696
  }
2816
- ) });
697
+ ));
2817
698
  };
2818
- function La(o) {
2819
- const [a, u] = F(""), [l, d] = F([]), [f, h] = F({
699
+ function Et(e) {
700
+ const [t, l] = p(""), [a, n] = p([]), [r, s] = p({
2820
701
  url: "",
2821
702
  title: ""
2822
703
  });
2823
- return G(() => {
2824
- a !== "" && (d(null), Yn({
2825
- path: `/blockbite/v1/block-helpers/get-links/${a}`
704
+ return g(() => {
705
+ t !== "" && (n(null), Ee({
706
+ path: `/blockbite/v1/block-helpers/get-links/${t}`
2826
707
  }).then(
2827
- (v) => {
2828
- v?.length ? d([...v]) : d([]);
708
+ (c) => {
709
+ c != null && c.length ? n([...c]) : n([]);
2829
710
  }
2830
711
  ));
2831
- }, [a]), G(() => {
2832
- f.url !== "" && o.parentCallback(f);
2833
- }, [f]), /* @__PURE__ */ n.jsxs(ne, { className: "blockbite--editor-linkwrap", children: [
2834
- /* @__PURE__ */ n.jsx(
2835
- rt,
2836
- {
2837
- __next40pxDefaultSize: !0,
2838
- __nextHasNoMarginBottom: !0,
2839
- label: Me("Search link", "blockbitelinks"),
2840
- value: a,
2841
- placeholder: "Example: About",
2842
- onChange: (v) => u(v),
2843
- help: Me("Type a post, page, title", "blockbitelinks")
2844
- }
2845
- ),
2846
- a ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-linklist", children: /* @__PURE__ */ n.jsx(
2847
- sa,
2848
- {
2849
- links: l,
2850
- onActiveLink: (v) => [
2851
- h({ ...v }),
2852
- u("")
2853
- ]
2854
- }
2855
- ) }) : null
2856
- ] });
712
+ }, [t]), g(() => {
713
+ r.url !== "" && e.parentCallback(r);
714
+ }, [r]), /* @__PURE__ */ React.createElement(h, { className: "blockbite--editor-linkwrap" }, /* @__PURE__ */ React.createElement(
715
+ O,
716
+ {
717
+ __next40pxDefaultSize: !0,
718
+ __nextHasNoMarginBottom: !0,
719
+ label: y("Search link", "blockbitelinks"),
720
+ value: t,
721
+ placeholder: "Example: About",
722
+ onChange: (c) => l(c),
723
+ help: y("Type a post, page, title", "blockbitelinks")
724
+ }
725
+ ), t ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-linklist" }, /* @__PURE__ */ React.createElement(
726
+ Ie,
727
+ {
728
+ links: a,
729
+ onActiveLink: (c) => [
730
+ s({ ...c }),
731
+ l("")
732
+ ]
733
+ }
734
+ )) : null);
2857
735
  }
2858
- function sa({ links: o, onActiveLink: a }) {
2859
- if (o === null)
2860
- return /* @__PURE__ */ n.jsx("p", { children: "Loading..." });
2861
- if (o.length === 0)
2862
- return /* @__PURE__ */ n.jsx("p", { children: "No Results" });
2863
- const u = o.map((l) => /* @__PURE__ */ n.jsx(ne, { children: /* @__PURE__ */ n.jsxs(
736
+ function Ie({ links: e, onActiveLink: t }) {
737
+ if (e === null)
738
+ return /* @__PURE__ */ React.createElement("p", null, "Loading...");
739
+ if (e.length === 0)
740
+ return /* @__PURE__ */ React.createElement("p", null, "No Results");
741
+ const l = e.map((a) => /* @__PURE__ */ React.createElement(h, { key: a.id }, /* @__PURE__ */ React.createElement(
2864
742
  "span",
2865
743
  {
2866
744
  className: "blockbite--editor-link",
2867
- onClick: () => a(l),
2868
- children: [
2869
- /* @__PURE__ */ n.jsx("span", { children: l.title }),
2870
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.url }),
2871
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.post_type })
2872
- ]
2873
- }
2874
- ) }, l.id));
2875
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: u });
745
+ onClick: () => t(a)
746
+ },
747
+ /* @__PURE__ */ React.createElement("span", null, a.title),
748
+ /* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, a.url),
749
+ /* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, a.post_type)
750
+ )));
751
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, l);
2876
752
  }
2877
- function Ma({ mediaProps: o, mediaCallback: a }) {
2878
- const u = [
753
+ function bt({ mediaProps: e, mediaCallback: t }) {
754
+ const l = [
2879
755
  "image",
2880
756
  "video",
2881
757
  "image/svg+xml",
2882
758
  "svg",
2883
759
  "text/plain",
2884
760
  "application/json"
2885
- ], [l, d] = F({
761
+ ], [a, n] = p({
2886
762
  id: null,
2887
763
  url: "",
2888
764
  sizes: [],
@@ -2891,740 +767,745 @@ function Ma({ mediaProps: o, mediaCallback: a }) {
2891
767
  width: 0,
2892
768
  height: 0
2893
769
  });
2894
- G(() => {
2895
- o && d({ ...o });
2896
- }, [o]);
2897
- const f = () => {
2898
- a({ ...{
770
+ g(() => {
771
+ e && n({ ...e });
772
+ }, [e]);
773
+ const r = () => {
774
+ t({ ...{
2899
775
  mediaId: 0,
2900
776
  mediaUrl: ""
2901
777
  } });
2902
- }, h = (v) => {
2903
- const g = {
778
+ }, s = (c) => {
779
+ const i = {
2904
780
  thumbnail: null,
2905
781
  medium: null,
2906
782
  large: null
2907
783
  };
2908
- v?.sizes && Object.keys(v.sizes).map((j) => {
2909
- const _ = v.sizes[j];
2910
- return (j === "thumbnail" || _.width < 768 || _.height < 768) && (g.thumbnail = _.url), (j === "medium" || _.width > 1024 && _.width < 1024 || _.height < 1536 && _.height > 1536) && (g.medium = _.url), (j === "large" || _.width > 1536 || _.height > 1536) && (g.large = _.url), null;
2911
- }), v.url.endsWith(".json") && (v.type = "lottie"), v.url.endsWith(".svg") && (v.type = "svg");
2912
- const p = {
2913
- id: v.id,
2914
- url: v.url,
2915
- sizes: g,
2916
- alt: v.alt,
2917
- type: v.type,
2918
- width: v.width,
2919
- height: v.height
784
+ c != null && c.sizes && Object.keys(c.sizes).map((m) => {
785
+ const u = c.sizes[m];
786
+ return (m === "thumbnail" || u.width < 768 || u.height < 768) && (i.thumbnail = u.url), (m === "medium" || u.width > 1024 && u.width < 1024 || u.height < 1536 && u.height > 1536) && (i.medium = u.url), (m === "large" || u.width > 1536 || u.height > 1536) && (i.large = u.url), null;
787
+ }), c.url.endsWith(".json") && (c.type = "lottie"), c.url.endsWith(".svg") && (c.type = "svg");
788
+ const o = {
789
+ id: c.id,
790
+ url: c.url,
791
+ sizes: i,
792
+ alt: c.alt,
793
+ type: c.type,
794
+ width: c.width,
795
+ height: c.height
2920
796
  };
2921
- a({ ...p });
797
+ t({ ...o });
2922
798
  };
2923
- return /* @__PURE__ */ n.jsxs(yn, { children: [
2924
- l.id !== null && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2925
- Pt,
2926
- {
2927
- onSelect: h,
2928
- value: l.id,
2929
- allowedTypes: u,
2930
- render: ({ open: v }) => /* @__PURE__ */ n.jsxs(
2931
- ye,
799
+ return /* @__PURE__ */ React.createElement(te, null, a.id !== null && /* @__PURE__ */ React.createElement(B, null, /* @__PURE__ */ React.createElement(
800
+ $,
801
+ {
802
+ onSelect: s,
803
+ value: a.id,
804
+ allowedTypes: l,
805
+ render: ({ open: c }) => /* @__PURE__ */ React.createElement(
806
+ v,
807
+ {
808
+ className: a.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
809
+ onClick: c
810
+ },
811
+ a.id === 0 && y("Choose Media", "blockbite"),
812
+ a.id && a.type === "image" ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-visual-image" }, /* @__PURE__ */ React.createElement(
813
+ "img",
2932
814
  {
2933
- className: l.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
2934
- onClick: v,
2935
- children: [
2936
- l.id === 0 && Me("Choose Media", "blockbite"),
2937
- l.id && l.type === "image" ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-visual-image", children: /* @__PURE__ */ n.jsx(
2938
- "img",
2939
- {
2940
- alt: l.alt ? l.alt : Me("Image", "blockbite"),
2941
- src: l.url
2942
- }
2943
- ) }) : "Add media"
2944
- ]
815
+ alt: a.alt ? a.alt : y("Image", "blockbite"),
816
+ src: a.url
2945
817
  }
2946
- )
2947
- }
2948
- ) }),
2949
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2950
- Pt,
2951
- {
2952
- title: Me("Replace media", "blockbite"),
2953
- value: l.id,
2954
- onSelect: h,
2955
- allowedTypes: u,
2956
- render: ({ open: v }) => /* @__PURE__ */ n.jsx(ye, { onClick: v, children: Me("Replace media", "blockbite") })
2957
- }
2958
- ) }),
2959
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(ye, { onClick: () => f(), isDestructive: !0, children: Me("Remove media", "blockbite") }) })
2960
- ] });
818
+ )) : "Add media"
819
+ )
820
+ }
821
+ )), a.id !== 0 && /* @__PURE__ */ React.createElement(B, null, /* @__PURE__ */ React.createElement(
822
+ $,
823
+ {
824
+ title: y("Replace media", "blockbite"),
825
+ value: a.id,
826
+ onSelect: s,
827
+ allowedTypes: l,
828
+ render: ({ open: c }) => /* @__PURE__ */ React.createElement(v, { onClick: c }, y("Replace media", "blockbite"))
829
+ }
830
+ )), a.id !== 0 && /* @__PURE__ */ React.createElement(B, null, /* @__PURE__ */ React.createElement(v, { onClick: () => r(), isDestructive: !0 }, y("Remove media", "blockbite"))));
2961
831
  }
2962
- const ia = ({
2963
- children: o,
2964
- className: a,
2965
- position: u,
2966
- visible: l,
2967
- onClick: d,
2968
- onVisibleChange: f
832
+ const Ze = ({
833
+ children: e,
834
+ className: t,
835
+ position: l,
836
+ visible: a,
837
+ onClick: n,
838
+ onVisibleChange: r
2969
839
  }) => {
2970
- const [h, v] = F(!!l);
2971
- G(() => {
2972
- l !== void 0 && v(l);
2973
- }, [l]);
2974
- const g = () => {
2975
- const p = !h;
2976
- v(p), f && f(p);
840
+ const [s, c] = p(!!a);
841
+ g(() => {
842
+ a !== void 0 && c(a);
843
+ }, [a]);
844
+ const i = () => {
845
+ const o = !s;
846
+ c(o), r && r(o);
2977
847
  };
2978
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: h && /* @__PURE__ */ n.jsx(
2979
- bn,
848
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, s && /* @__PURE__ */ React.createElement(
849
+ ae,
2980
850
  {
2981
- position: u,
2982
- className: "blockbite-ui__popover bb_",
2983
- onClick: d,
851
+ position: l,
852
+ className: "blockbite-ui__popover",
853
+ onClick: n,
2984
854
  onFocusOutside: () => {
2985
- v(!1), f && f(!1);
855
+ c(!1), r && r(!1);
856
+ }
857
+ },
858
+ /* @__PURE__ */ React.createElement("div", { className: t }, /* @__PURE__ */ React.createElement("div", { className: "relative h-full w-full p-4" }, /* @__PURE__ */ React.createElement(
859
+ v,
860
+ {
861
+ onClick: i,
862
+ size: "small",
863
+ className: "close-button absolute right-0 top-0"
2986
864
  },
2987
- children: /* @__PURE__ */ n.jsx("div", { className: a, children: /* @__PURE__ */ n.jsxs("div", { className: "relative h-full w-full p-4", children: [
2988
- /* @__PURE__ */ n.jsx(
2989
- ye,
2990
- {
2991
- onClick: g,
2992
- size: "small",
2993
- className: "close-button absolute right-0 top-0",
2994
- children: /* @__PURE__ */ n.jsx($n, {})
2995
- }
2996
- ),
2997
- o
2998
- ] }) })
2999
- }
3000
- ) });
3001
- }, la = ({
3002
- defaultValue: o,
3003
- label: a,
3004
- min: u = 0,
3005
- max: l = 2e3,
3006
- withInputField: d = !1,
3007
- onValueChange: f,
3008
- gridMode: h = !1,
3009
- showTooltip: v = !1,
3010
- ...g
865
+ /* @__PURE__ */ React.createElement(Le, null)
866
+ ), e))
867
+ ));
868
+ }, $e = ({
869
+ defaultValue: e,
870
+ label: t,
871
+ min: l = 0,
872
+ max: a = 2e3,
873
+ withInputField: n = !1,
874
+ onValueChange: r,
875
+ gridMode: s = !1,
876
+ showTooltip: c = !1,
877
+ ...i
3011
878
  }) => {
3012
- const [p] = F(0), [j, _] = F(0);
3013
- G(() => {
3014
- _(Math.round(parseInt(o) / (h ? 16 : 1)));
3015
- }, [o]);
3016
- function O(T) {
3017
- const k = T * (h ? 16 : 1);
3018
- f(k.toString());
879
+ const [o] = p(0), [m, u] = p(0);
880
+ g(() => {
881
+ u(Math.round(parseInt(e) / (s ? 16 : 1)));
882
+ }, [e]);
883
+ function E(R) {
884
+ const d = R * (s ? 16 : 1);
885
+ r(d.toString());
3019
886
  }
3020
- return /* @__PURE__ */ n.jsxs(ne, { className: "flex min-w-[240px] flex-col", children: [
3021
- /* @__PURE__ */ n.jsx(
3022
- gn,
3023
- {
3024
- __next40pxDefaultSize: !0,
3025
- __nextHasNoMarginBottom: !0,
3026
- label: a,
3027
- value: j,
3028
- min: u,
3029
- max: l,
3030
- showTooltip: v,
3031
- withInputField: d,
3032
- onChange: (T) => {
3033
- _(T), O(T);
3034
- },
3035
- resetFallbackValue: p,
3036
- ...g
3037
- }
3038
- ),
3039
- /* @__PURE__ */ n.jsxs("span", { children: [
3040
- h ? `${j * 16}px` : null,
3041
- " "
3042
- ] })
3043
- ] });
3044
- }, Ba = ({
3045
- defaultUnit: o,
3046
- defaultValue: a,
3047
- onValueChange: u,
3048
- onUnitChange: l,
3049
- inputClassName: d = "w-[75px]"
887
+ return /* @__PURE__ */ React.createElement(h, { className: "flex min-w-[240px] flex-col" }, /* @__PURE__ */ React.createElement(
888
+ le,
889
+ {
890
+ __next40pxDefaultSize: !0,
891
+ __nextHasNoMarginBottom: !0,
892
+ label: t,
893
+ value: m,
894
+ min: l,
895
+ max: a,
896
+ showTooltip: c,
897
+ withInputField: n,
898
+ onChange: (R) => {
899
+ u(R), E(R);
900
+ },
901
+ resetFallbackValue: o,
902
+ ...i
903
+ }
904
+ ), /* @__PURE__ */ React.createElement("span", null, s ? `${m * 16}px` : null, " "));
905
+ }, ht = ({
906
+ defaultUnit: e,
907
+ defaultValue: t,
908
+ onValueChange: l,
909
+ onUnitChange: a,
910
+ inputClassName: n = "w-[75px]"
3050
911
  }) => {
3051
- const [f, h] = F(!1), [v, g] = F([]), [p, j] = F(o), [_, O] = F(""), [T, k] = F(a);
3052
- G(() => {
3053
- o && j(o), O(a.toString());
3054
- }, [o, a]), G(() => {
3055
- !f && p === "arbitrary" && k(_);
3056
- }, [f]);
3057
- const ae = (A) => {
3058
- if (A !== "arbitrary" && bb?.codex?.units?.spacing?.[A]) {
3059
- const Y = bb.codex.units.spacing[A];
3060
- g(
3061
- Array.isArray(Y) ? Y : Object.keys(Y)
912
+ const [r, s] = p(!1), [c, i] = p([]), [o, m] = p(e), [u, E] = p(""), [R, d] = p(t);
913
+ g(() => {
914
+ e && m(e), E(t.toString());
915
+ }, [e, t]), g(() => {
916
+ !r && o === "arbitrary" && d(u);
917
+ }, [r]);
918
+ const x = (b) => {
919
+ var _, L, C;
920
+ if (b !== "arbitrary" && ((C = (L = (_ = bb == null ? void 0 : bb.codex) == null ? void 0 : _.units) == null ? void 0 : L.spacing) != null && C[b])) {
921
+ const w = bb.codex.units.spacing[b];
922
+ i(
923
+ Array.isArray(w) ? w : Object.keys(w)
3062
924
  );
3063
925
  } else
3064
- g([]);
3065
- h(!0);
3066
- }, de = [
926
+ i([]);
927
+ s(!0);
928
+ }, T = [
3067
929
  {
3068
- icon: /* @__PURE__ */ n.jsx(Fn, {}),
930
+ icon: /* @__PURE__ */ React.createElement(Oe, null),
3069
931
  label: "Tailwind CSS Units",
3070
932
  value: "native"
3071
933
  },
3072
- { icon: /* @__PURE__ */ n.jsx(Ln, {}), label: "Percentage Units", value: "percent" },
3073
- { icon: /* @__PURE__ */ n.jsx(Mn, {}), label: "Grid Units", value: "grid" },
3074
- { icon: /* @__PURE__ */ n.jsx(Bn, {}), label: "Screen Units", value: "screen" },
3075
- { icon: /* @__PURE__ */ n.jsx(Wn, {}), label: "Pixel Units", value: "arbitrary" },
3076
- { icon: /* @__PURE__ */ n.jsx(Un, {}), label: "Fluid Units", value: "fluid" }
934
+ { icon: /* @__PURE__ */ React.createElement(He, null), label: "Percentage Units", value: "percent" },
935
+ { icon: /* @__PURE__ */ React.createElement(Se, null), label: "Grid Units", value: "grid" },
936
+ { icon: /* @__PURE__ */ React.createElement(Me, null), label: "Screen Units", value: "screen" },
937
+ { icon: /* @__PURE__ */ React.createElement(Pe, null), label: "Pixel Units", value: "arbitrary" },
938
+ { icon: /* @__PURE__ */ React.createElement(_e, null), label: "Fluid Units", value: "fluid" }
3077
939
  ];
3078
- return /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ n.jsxs(
3079
- ot,
940
+ return /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-col items-baseline" }, /* @__PURE__ */ React.createElement(
941
+ I,
3080
942
  {
3081
- inputClassName: d,
943
+ inputClassName: n,
3082
944
  defaultValue: (
3083
945
  // Remove the "b_" prefix for grid units
3084
- p === "grid" ? _.replace("b_", "") : _
946
+ o === "grid" ? u.replace("b_", "") : u
3085
947
  ),
3086
- onClick: () => p !== "arbitrary" && ae(p),
3087
- onChange: (A) => {
3088
- O(A), u(A);
948
+ onClick: () => o !== "arbitrary" && x(o),
949
+ onChange: (b) => {
950
+ E(b), l(b);
3089
951
  },
3090
- readOnly: p !== "arbitrary",
3091
- children: [
3092
- /* @__PURE__ */ n.jsx(
3093
- ia,
3094
- {
3095
- visible: f,
3096
- position: "bottom left",
3097
- className: "w-[300px] bg-white shadow-sm",
3098
- onVisibleChange: h,
3099
- children: p === "arbitrary" ? /* @__PURE__ */ n.jsx(
3100
- la,
3101
- {
3102
- defaultValue: _,
3103
- label: "Pixel Value",
3104
- min: 0,
3105
- max: 100,
3106
- gridMode: !0,
3107
- showTooltip: !1,
3108
- allowReset: !0,
3109
- resetFallbackValue: isNaN(T.toString()) ? 0 : Number(T) / 16,
3110
- onValueChange: (A) => {
3111
- O(A), u(A);
3112
- }
3113
- }
3114
- ) : /* @__PURE__ */ n.jsx(
3115
- na,
3116
- {
3117
- className: "mt-4",
3118
- options: v.map((A) => ({
3119
- value: A,
3120
- label: p === "grid" ? A.toString().replace("b_", "") : A,
3121
- onClick: () => {
3122
- O(A), u(A);
3123
- }
3124
- })),
3125
- size: "small",
3126
- defaultPressed: _?.toString() || "",
3127
- onPressedChange: (A) => {
3128
- O(A), u(A);
3129
- }
3130
- }
3131
- )
952
+ readOnly: o !== "arbitrary"
953
+ },
954
+ /* @__PURE__ */ React.createElement(
955
+ Ze,
956
+ {
957
+ visible: r,
958
+ position: "bottom left",
959
+ className: "w-[300px] bg-white shadow-sm",
960
+ onVisibleChange: s
961
+ },
962
+ o === "arbitrary" ? /* @__PURE__ */ React.createElement(
963
+ $e,
964
+ {
965
+ defaultValue: u,
966
+ label: "Pixel Value",
967
+ min: 0,
968
+ max: 100,
969
+ gridMode: !0,
970
+ showTooltip: !1,
971
+ allowReset: !0,
972
+ resetFallbackValue: isNaN(R.toString()) ? 0 : Number(R) / 16,
973
+ onValueChange: (b) => {
974
+ E(b), l(b);
3132
975
  }
3133
- ),
3134
- /* @__PURE__ */ n.jsx(
3135
- oa,
3136
- {
3137
- className: "h-[32px]",
3138
- defaultValue: p,
3139
- options: de,
3140
- onPressedChange: (A) => {
3141
- A === "reset" ? (O(""), u(""), h(!1)) : (j(A), l(A), ae(A));
976
+ }
977
+ ) : /* @__PURE__ */ React.createElement(
978
+ ye,
979
+ {
980
+ className: "mt-4",
981
+ options: c.map((b) => ({
982
+ value: b,
983
+ label: o === "grid" ? b.toString().replace("b_", "") : b,
984
+ onClick: () => {
985
+ E(b), l(b);
3142
986
  }
987
+ })),
988
+ size: "small",
989
+ defaultPressed: (u == null ? void 0 : u.toString()) || "",
990
+ onPressedChange: (b) => {
991
+ E(b), l(b);
3143
992
  }
3144
- )
3145
- ]
3146
- }
3147
- ) });
3148
- }, Ut = Wt(null), Vt = () => {
3149
- const o = nt(Ut);
3150
- if (!o)
3151
- throw new Error("useModalContext must be used within a ModalProvider");
3152
- return o;
3153
- }, Wa = ({
3154
- children: o,
3155
- defaultOpen: a,
3156
- onOpenChange: u,
3157
- title: l,
3158
- className: d
3159
- }) => {
3160
- const [f, h] = F(!1);
3161
- G(() => {
3162
- h(a);
3163
- }, [a]);
3164
- const v = () => h(!0), g = () => h(!1);
3165
- return G(() => {
3166
- u(f);
3167
- }, [f, u]), /* @__PURE__ */ n.jsxs(Ut.Provider, { value: { closeModal: g, openModal: v }, children: [
3168
- Rr.map(o, (p) => Sr(p) && p.type === da ? p : null),
3169
- f && /* @__PURE__ */ n.jsx(
3170
- xn,
993
+ }
994
+ )
995
+ ),
996
+ /* @__PURE__ */ React.createElement(
997
+ Ve,
3171
998
  {
3172
- className: W("blockbite-ui__modal bb_", d),
3173
- onRequestClose: g,
3174
- title: l,
3175
- children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
3176
- Rr.map(o, (p) => Sr(p) && p.type === ua ? p : null),
3177
- Rr.map(o, (p) => Sr(p) && p.type === fa ? p : null),
3178
- Rr.map(o, (p) => Sr(p) && p.type === ca ? p : null)
3179
- ] })
999
+ className: "h-[32px]",
1000
+ defaultValue: o,
1001
+ options: T,
1002
+ onPressedChange: (b) => {
1003
+ b === "reset" ? (E(""), l(""), s(!1)) : (m(b), a(b), x(b));
1004
+ }
3180
1005
  }
3181
1006
  )
3182
- ] });
3183
- }, ua = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1007
+ ));
1008
+ }, U = G(null), W = () => {
1009
+ const e = V(U);
1010
+ if (!e)
1011
+ throw new Error("useModalContext must be used within a ModalProvider");
1012
+ return e;
1013
+ }, Ct = ({
1014
+ children: e,
1015
+ defaultOpen: t,
1016
+ onOpenChange: l,
1017
+ title: a,
1018
+ className: n
1019
+ }) => {
1020
+ const [r, s] = p(!1);
1021
+ g(() => {
1022
+ s(t);
1023
+ }, [t]);
1024
+ const c = () => s(!0), i = () => s(!1);
1025
+ return g(() => {
1026
+ l(r);
1027
+ }, [r, l]), /* @__PURE__ */ React.createElement(U.Provider, { value: { closeModal: i, openModal: c } }, M.map(e, (o) => S(o) && o.type === Fe ? o : null), r && /* @__PURE__ */ React.createElement(
1028
+ ne,
1029
+ {
1030
+ className: f("blockbite-ui__modal", n),
1031
+ onRequestClose: i,
1032
+ title: a
1033
+ },
1034
+ /* @__PURE__ */ React.createElement("div", { className: "relative" }, M.map(e, (o) => S(o) && o.type === ze ? o : null), M.map(e, (o) => S(o) && o.type === De ? o : null), M.map(e, (o) => S(o) && o.type === Ae ? o : null))
1035
+ ));
1036
+ }, ze = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3184
1037
  "div",
3185
1038
  {
3186
- className: W(
1039
+ className: f(
3187
1040
  "flex flex-col space-y-1.5 text-center sm:text-left",
3188
- a
1041
+ t
3189
1042
  ),
3190
- ...u,
3191
- children: o
3192
- }
3193
- ), ca = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1043
+ ...l
1044
+ },
1045
+ e
1046
+ ), Ae = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3194
1047
  "div",
3195
1048
  {
3196
- className: W(
1049
+ className: f(
3197
1050
  "border-gray-light fixed bottom-0 left-0 right-0 flex h-[4rem] flex-row items-center justify-end space-x-2 border-t bg-white px-4",
3198
- a
1051
+ t
3199
1052
  ),
3200
- ...u,
3201
- children: o
3202
- }
3203
- ), fa = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1053
+ ...l
1054
+ },
1055
+ e
1056
+ ), De = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3204
1057
  "div",
3205
1058
  {
3206
- className: W("text-gray-medium px-4 pb-4 text-sm", a),
3207
- ...u,
3208
- children: o
3209
- }
3210
- ), Ua = ({ children: o }) => {
3211
- const { closeModal: a } = Vt();
3212
- return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
3213
- }, da = ({ children: o }) => {
3214
- const { openModal: a } = Vt();
3215
- return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
1059
+ className: f("text-gray-medium px-4 pb-4 text-sm", t),
1060
+ ...l
1061
+ },
1062
+ e
1063
+ ), xt = ({ children: e }) => {
1064
+ const { closeModal: t } = W();
1065
+ return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
1066
+ }, Fe = ({ children: e }) => {
1067
+ const { openModal: t } = W();
1068
+ return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
3216
1069
  };
3217
- function pa(o, a) {
3218
- Array.from(o.styleSheets).forEach((u) => {
1070
+ function Ge(e, t) {
1071
+ Array.from(e.styleSheets).forEach((l) => {
3219
1072
  try {
3220
- if (u.cssRules) {
3221
- const l = a.createElement("style");
3222
- Array.from(u.cssRules).forEach((d) => {
3223
- l.appendChild(a.createTextNode(d.cssText));
3224
- }), a.head.appendChild(l);
3225
- } else if (u.href) {
3226
- const l = a.createElement("link");
3227
- l.rel = "stylesheet", l.href = u.href, a.head.appendChild(l);
3228
- }
3229
- } catch (l) {
3230
- if (u.href) {
3231
- const d = a.createElement("link");
3232
- d.rel = "stylesheet", d.href = u.href, a.head.appendChild(d);
1073
+ if (l.cssRules) {
1074
+ const a = t.createElement("style");
1075
+ Array.from(l.cssRules).forEach((n) => {
1076
+ a.appendChild(t.createTextNode(n.cssText));
1077
+ }), t.head.appendChild(a);
1078
+ } else if (l.href) {
1079
+ const a = t.createElement("link");
1080
+ a.rel = "stylesheet", a.href = l.href, t.head.appendChild(a);
1081
+ }
1082
+ } catch (a) {
1083
+ if (l.href) {
1084
+ const n = t.createElement("link");
1085
+ n.rel = "stylesheet", n.href = l.href, t.head.appendChild(n);
3233
1086
  } else
3234
- console.warn("Error copying styles:", l);
1087
+ console.warn("Error copying styles:", a);
3235
1088
  }
3236
1089
  });
3237
1090
  }
3238
- const Va = ({
3239
- windowInstance: o,
3240
- onClose: a,
3241
- children: u
1091
+ const vt = ({
1092
+ windowInstance: e,
1093
+ onClose: t,
1094
+ children: l
3242
1095
  }) => {
3243
- const l = Nn(() => document.createElement("div"), []);
3244
- return G(() => {
3245
- const d = o;
3246
- d.document.body.innerHTML = "", d.document.body.appendChild(l), d.document.body.classList.add("bb_"), pa(document, d.document), d.document.title = document.title || "Blockbite Editor";
3247
- const f = () => {
3248
- setTimeout(a, 100);
1096
+ const a = ge(() => document.createElement("div"), []);
1097
+ return g(() => {
1098
+ const n = e;
1099
+ n.document.body.innerHTML = "", n.document.body.appendChild(a), Ge(document, n.document), n.document.title = document.title || "Blockbite Editor";
1100
+ const r = () => {
1101
+ setTimeout(t, 100);
3249
1102
  };
3250
- return d.addEventListener("beforeunload", f), () => {
3251
- d.removeEventListener("beforeunload", f);
1103
+ return n.addEventListener("beforeunload", r), () => {
1104
+ n.removeEventListener("beforeunload", r);
3252
1105
  };
3253
- }, [o]), Bt(u, l);
3254
- }, Ya = ({
3255
- children: o,
3256
- status: a = "success",
3257
- className: u
1106
+ }, [e]), D(l, a);
1107
+ }, wt = ({
1108
+ children: e,
1109
+ status: t = "success",
1110
+ className: l
3258
1111
  }) => {
3259
- const [l, d] = F(!0);
3260
- return /* @__PURE__ */ n.jsx(ne, { onClick: () => d(!1), children: l && /* @__PURE__ */ n.jsx(
3261
- _n,
1112
+ const [a, n] = p(!0);
1113
+ return /* @__PURE__ */ React.createElement(h, { onClick: () => n(!1) }, a && /* @__PURE__ */ React.createElement(
1114
+ re,
3262
1115
  {
3263
- status: a,
3264
- className: W(u),
3265
- onRemove: () => d(!1),
3266
- children: o
3267
- }
3268
- ) });
3269
- }, za = ({
3270
- label: o,
3271
- value: a,
3272
- onChange: u,
3273
- ...l
1116
+ status: t,
1117
+ className: f(l),
1118
+ onRemove: () => n(!1)
1119
+ },
1120
+ e
1121
+ ));
1122
+ };
1123
+ function K(e) {
1124
+ var t, l, a = "";
1125
+ if (typeof e == "string" || typeof e == "number") a += e;
1126
+ else if (typeof e == "object") if (Array.isArray(e)) {
1127
+ var n = e.length;
1128
+ for (t = 0; t < n; t++) e[t] && (l = K(e[t])) && (a && (a += " "), a += l);
1129
+ } else for (l in e) e[l] && (a && (a += " "), a += l);
1130
+ return a;
1131
+ }
1132
+ function Ue() {
1133
+ for (var e, t, l = 0, a = "", n = arguments.length; l < n; l++) (e = arguments[l]) && (t = K(e)) && (a && (a += " "), a += t);
1134
+ return a;
1135
+ }
1136
+ const We = (e) => Re("path", e), q = F(
1137
+ /**
1138
+ * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
1139
+ * Other props will be passed through to svg component.
1140
+ * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.
1141
+ *
1142
+ * @return {JSX.Element} Stop component
1143
+ */
1144
+ ({
1145
+ className: e,
1146
+ isPressed: t,
1147
+ ...l
1148
+ }, a) => {
1149
+ const n = {
1150
+ ...l,
1151
+ className: Ue(e, {
1152
+ "is-pressed": t
1153
+ }) || void 0,
1154
+ "aria-hidden": !0,
1155
+ focusable: !1
1156
+ };
1157
+ return /* @__PURE__ */ be("svg", {
1158
+ ...n,
1159
+ ref: a
1160
+ });
1161
+ }
1162
+ );
1163
+ q.displayName = "SVG";
1164
+ const yt = ({
1165
+ label: e,
1166
+ value: t,
1167
+ onChange: l,
1168
+ ...a
3274
1169
  }) => {
3275
- const [d, f] = F(!1);
3276
- return /* @__PURE__ */ n.jsx(
3277
- jn,
1170
+ const [n, r] = p(!1);
1171
+ return /* @__PURE__ */ React.createElement(
1172
+ ce,
3278
1173
  {
3279
- label: o,
3280
- value: a,
3281
- type: d ? "text" : "password",
3282
- suffix: /* @__PURE__ */ n.jsx(Cn, { variant: "control", children: /* @__PURE__ */ n.jsx(
3283
- ye,
1174
+ label: e,
1175
+ value: t,
1176
+ type: n ? "text" : "password",
1177
+ suffix: /* @__PURE__ */ React.createElement(se, { variant: "control" }, /* @__PURE__ */ React.createElement(
1178
+ v,
3284
1179
  {
3285
- icon: /* @__PURE__ */ n.jsx(zn, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n.jsx(
3286
- Hn,
1180
+ icon: /* @__PURE__ */ React.createElement(q, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement(
1181
+ We,
3287
1182
  {
3288
- d: d ? "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" : "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"
1183
+ d: n ? "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" : "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"
3289
1184
  }
3290
- ) }),
1185
+ )),
3291
1186
  label: "Show password",
3292
- onClick: () => f((h) => !h),
1187
+ onClick: () => r((s) => !s),
3293
1188
  size: "small"
3294
1189
  }
3295
- ) }),
3296
- onChange: u,
3297
- ...l
1190
+ )),
1191
+ onChange: l,
1192
+ ...a
3298
1193
  }
3299
1194
  );
3300
- }, Ha = ({
3301
- items: o,
3302
- activeId: a,
3303
- onSelect: u,
3304
- className: l
3305
- }) => /* @__PURE__ */ n.jsx(ne, { important: !0, className: l, children: /* @__PURE__ */ n.jsx("div", { className: "w-[200px] overflow-y-auto border-r border-gray-200 gap-2", children: o.map((d) => /* @__PURE__ */ n.jsxs(
1195
+ }, Nt = ({
1196
+ items: e,
1197
+ activeId: t,
1198
+ onSelect: l,
1199
+ className: a
1200
+ }) => /* @__PURE__ */ React.createElement(h, { important: !0, className: a }, /* @__PURE__ */ React.createElement("div", { className: "w-[200px] overflow-y-auto border-r border-gray-200 gap-2" }, e.map((n) => /* @__PURE__ */ React.createElement(
3306
1201
  "div",
3307
1202
  {
3308
- onClick: () => u(d.id),
3309
- className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${a === d.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`,
3310
- children: [
3311
- /* @__PURE__ */ n.jsx("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white", children: d.name.charAt(0).toUpperCase() }),
3312
- /* @__PURE__ */ n.jsx("p", { className: "text-sm text-center mt-1", children: d.name })
3313
- ]
1203
+ key: n.id,
1204
+ onClick: () => l(n.id),
1205
+ className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${t === n.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`
3314
1206
  },
3315
- d.id
3316
- )) }) });
3317
- function qa(o) {
3318
- const { media: a, mediaClass: u } = o, { url: l, alt: d, sizes: f } = a;
3319
- if (f === void 0)
3320
- return /* @__PURE__ */ n.jsx("img", { src: l, alt: d, className: `bf_media ${u}` });
3321
- const { thumbnail: h, medium: v, large: g } = f, p = h || l, j = v || l, _ = g || l;
3322
- return /* @__PURE__ */ n.jsxs("picture", { className: "bf_responsive-media", children: [
3323
- p ? /* @__PURE__ */ n.jsx(
3324
- "source",
3325
- {
3326
- media: "(max-width: 768px)",
3327
- srcSet: p,
3328
- className: `bf_media ${u}`
3329
- }
3330
- ) : null,
3331
- j ? /* @__PURE__ */ n.jsx(
3332
- "source",
3333
- {
3334
- media: "(min-width: 1024px)",
3335
- srcSet: j,
3336
- className: `bf_media ${u}`
3337
- }
3338
- ) : null,
3339
- _ ? /* @__PURE__ */ n.jsx(
3340
- "source",
3341
- {
3342
- media: "(min-width: 1536px)",
3343
- srcSet: _,
3344
- className: `bf_media ${u}`
3345
- }
3346
- ) : null,
3347
- j ? /* @__PURE__ */ n.jsx("img", { src: j, alt: d, className: `bf_media ${u}` }) : null
3348
- ] });
1207
+ /* @__PURE__ */ React.createElement("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white" }, n.name.charAt(0).toUpperCase()),
1208
+ /* @__PURE__ */ React.createElement("p", { className: "text-sm text-center mt-1" }, n.name)
1209
+ ))));
1210
+ function kt(e) {
1211
+ const { media: t, mediaClass: l } = e, { url: a, alt: n, sizes: r } = t;
1212
+ if (r === void 0)
1213
+ return /* @__PURE__ */ React.createElement("img", { src: a, alt: n, className: `media ${l}` });
1214
+ const { thumbnail: s, medium: c, large: i } = r, o = s || a, m = c || a, u = i || a;
1215
+ return /* @__PURE__ */ React.createElement("picture", { className: "responsive-media" }, o ? /* @__PURE__ */ React.createElement(
1216
+ "source",
1217
+ {
1218
+ media: "(max-width: 768px)",
1219
+ srcSet: o,
1220
+ className: `media ${l}`
1221
+ }
1222
+ ) : null, m ? /* @__PURE__ */ React.createElement(
1223
+ "source",
1224
+ {
1225
+ media: "(min-width: 1024px)",
1226
+ srcSet: m,
1227
+ className: `media ${l}`
1228
+ }
1229
+ ) : null, u ? /* @__PURE__ */ React.createElement(
1230
+ "source",
1231
+ {
1232
+ media: "(min-width: 1536px)",
1233
+ srcSet: u,
1234
+ className: `media ${l}`
1235
+ }
1236
+ ) : null, m ? /* @__PURE__ */ React.createElement("img", { src: m, alt: n, className: `media ${l}` }) : null);
3349
1237
  }
3350
- function Ga(o) {
3351
- const { media: a, mediaClass: u } = o, { url: l } = a, d = l;
3352
- return /* @__PURE__ */ n.jsx(
1238
+ function _t(e) {
1239
+ const { media: t, mediaClass: l } = e, { url: a } = t, n = a;
1240
+ return /* @__PURE__ */ React.createElement(
3353
1241
  "video",
3354
1242
  {
3355
- className: `bf_responsive-media ${u}`,
1243
+ className: `responsive-media ${l}`,
3356
1244
  preload: "none",
3357
1245
  playsInline: !0,
3358
1246
  controls: !0,
3359
1247
  autoPlay: !0,
3360
1248
  muted: !0,
3361
- loop: !0,
3362
- children: /* @__PURE__ */ n.jsx("source", { src: d, type: "video/mp4" })
3363
- }
1249
+ loop: !0
1250
+ },
1251
+ /* @__PURE__ */ React.createElement("source", { src: n, type: "video/mp4" })
3364
1252
  );
3365
1253
  }
3366
- const Ka = ({
3367
- children: o,
3368
- className: a = "",
3369
- height: u = "large"
3370
- }) => /* @__PURE__ */ n.jsx(
3371
- ne,
1254
+ const Lt = ({
1255
+ children: e,
1256
+ className: t = "",
1257
+ height: l = "large"
1258
+ }) => /* @__PURE__ */ React.createElement(
1259
+ h,
3372
1260
  {
3373
- className: W("scrollbar relative overflow-y-scroll", a, {
3374
- "h-[400px]": u === "large",
3375
- "h-[300px]": u === "medium",
3376
- "h-[200px]": u === "small"
3377
- }),
3378
- children: o
3379
- }
3380
- ), Ja = ({
3381
- onChange: o,
3382
- className: a,
3383
- defaultValue: u,
3384
- options: l,
3385
- label: d = "",
3386
- emptyLabel: f = "No options available"
1261
+ className: f("scrollbar relative overflow-y-scroll", t, {
1262
+ "h-[400px]": l === "large",
1263
+ "h-[300px]": l === "medium",
1264
+ "h-[200px]": l === "small"
1265
+ })
1266
+ },
1267
+ e
1268
+ ), Mt = ({
1269
+ onChange: e,
1270
+ className: t,
1271
+ defaultValue: l,
1272
+ options: a,
1273
+ label: n = "",
1274
+ emptyLabel: r = "No options available"
3387
1275
  }) => {
3388
- const [h, v] = F("");
3389
- G(() => {
3390
- v(u);
1276
+ const [s, c] = p("");
1277
+ g(() => {
1278
+ c(l);
3391
1279
  }, []);
3392
- const g = (p) => {
3393
- v(p), o && o(p);
1280
+ const i = (o) => {
1281
+ c(o), e && e(o);
3394
1282
  };
3395
- return /* @__PURE__ */ n.jsxs("div", { className: a, children: [
3396
- l && l.length > 0 && /* @__PURE__ */ n.jsx(
3397
- wn,
3398
- {
3399
- __next40pxDefaultSize: !0,
3400
- __nextHasNoMarginBottom: !0,
3401
- label: d || "",
3402
- value: h || "",
3403
- onChange: g,
3404
- options: [{ value: "", label: "Select an option" }, ...l]
3405
- }
3406
- ),
3407
- (!l || l?.length === 0) && /* @__PURE__ */ n.jsx("p", { className: "mb-2", children: f })
3408
- ] });
3409
- }, { select: va, dispatch: ma } = wp.data, Xa = ({
3410
- buttonText: o = "Add block"
1283
+ return /* @__PURE__ */ React.createElement("div", { className: t }, a && a.length > 0 && /* @__PURE__ */ React.createElement(
1284
+ oe,
1285
+ {
1286
+ __next40pxDefaultSize: !0,
1287
+ __nextHasNoMarginBottom: !0,
1288
+ label: n || "",
1289
+ value: s || "",
1290
+ onChange: i,
1291
+ options: [{ value: "", label: "Select an option" }, ...a]
1292
+ }
1293
+ ), (!a || (a == null ? void 0 : a.length) === 0) && /* @__PURE__ */ React.createElement("p", { className: "mb-2" }, r));
1294
+ }, { select: Ke, dispatch: qe } = wp.data, St = ({
1295
+ buttonText: e = "Add block"
3411
1296
  }) => {
3412
- const a = () => {
3413
- const u = va("core/block-editor").getSelectedBlock(), { clientId: l, innerBlocks: d } = u, f = d[d.length - 1], h = qn(
3414
- f.name,
3415
- f.attributes,
3416
- f.innerBlocks
1297
+ const t = () => {
1298
+ const l = Ke("core/block-editor").getSelectedBlock(), { clientId: a, innerBlocks: n } = l, r = n[n.length - 1], s = he(
1299
+ r.name,
1300
+ r.attributes,
1301
+ r.innerBlocks
3417
1302
  );
3418
- ma("core/block-editor").insertBlocks(h, 0, l);
1303
+ qe("core/block-editor").insertBlocks(s, 0, a);
3419
1304
  };
3420
- return /* @__PURE__ */ n.jsx(ye, { variant: "primary", onClick: () => a(), children: o });
3421
- }, Za = ({ children: o, watch: a, className: u }) => {
3422
- const [l, d] = F(0);
3423
- return G(() => {
1305
+ return /* @__PURE__ */ React.createElement(v, { variant: "primary", onClick: () => t() }, e);
1306
+ }, Tt = ({ children: e, watch: t, className: l }) => {
1307
+ const [a, n] = p(0);
1308
+ return g(() => {
3424
1309
  setTimeout(() => {
3425
- d(1);
1310
+ n(1);
3426
1311
  }, 250);
3427
- }, [a]), /* @__PURE__ */ n.jsx(
3428
- ne,
1312
+ }, [t]), /* @__PURE__ */ React.createElement(
1313
+ h,
3429
1314
  {
3430
- className: W(
3431
- u,
1315
+ className: f(
1316
+ l,
3432
1317
  "duration-50 transform transition-all ease-in-out",
3433
1318
  {
3434
- "translate-x-0": l === 1,
3435
- "-translate-x-full": l === 0
1319
+ "translate-x-0": a === 1,
1320
+ "-translate-x-full": a === 0
3436
1321
  }
3437
- ),
3438
- children: o
3439
- }
1322
+ )
1323
+ },
1324
+ e
3440
1325
  );
3441
- }, Qa = ({ className: o, defaultValue: a }) => {
3442
- const [u, l] = F(!1);
3443
- return G(() => {
1326
+ }, Ht = ({ className: e, defaultValue: t }) => {
1327
+ const [l, a] = p(!1);
1328
+ return g(() => {
3444
1329
  setTimeout(() => {
3445
- l(!1);
3446
- }, 500), a && l(!0);
3447
- }, [u, a]), u && /* @__PURE__ */ n.jsx(En, { className: W(o) });
3448
- }, st = Wt(null), ha = ({
3449
- children: o,
3450
- defaultValue: a,
3451
- value: u,
3452
- onValueChange: l,
3453
- ...d
1330
+ a(!1);
1331
+ }, 500), t && a(!0);
1332
+ }, [l, t]), l && /* @__PURE__ */ React.createElement(ie, { className: f(e) });
1333
+ }, Z = G(null), Xe = ({
1334
+ children: e,
1335
+ defaultValue: t,
1336
+ value: l,
1337
+ onValueChange: a,
1338
+ ...n
3454
1339
  }) => {
3455
- const f = u !== void 0, [h, v] = F(a || ""), j = {
3456
- activeTab: f ? u : h,
3457
- setActiveTab: (_) => {
3458
- f || v(_), l && l(_);
1340
+ const r = l !== void 0, [s, c] = p(t || ""), m = {
1341
+ activeTab: r ? l : s,
1342
+ setActiveTab: (u) => {
1343
+ r || c(u), a && a(u);
3459
1344
  }
3460
1345
  };
3461
- return /* @__PURE__ */ n.jsx(st.Provider, { value: j, children: /* @__PURE__ */ n.jsx(ne, { important: !0, className: d.className, children: o }) });
3462
- }, ya = ({
3463
- options: o,
3464
- children: a,
3465
- className: u,
3466
- onValueChange: l
1346
+ return /* @__PURE__ */ React.createElement(Z.Provider, { value: m }, /* @__PURE__ */ React.createElement(h, { important: !0, className: n.className }, e));
1347
+ }, Ye = ({
1348
+ options: e,
1349
+ children: t,
1350
+ className: l,
1351
+ onValueChange: a
3467
1352
  }) => {
3468
- const d = nt(st), f = l || d?.setActiveTab;
3469
- return /* @__PURE__ */ n.jsx(
3470
- Rn,
1353
+ const n = V(Z), r = a || (n == null ? void 0 : n.setActiveTab);
1354
+ return /* @__PURE__ */ React.createElement(
1355
+ me,
3471
1356
  {
3472
- className: W("tabs-list", u),
3473
- tabs: o,
3474
- onSelect: (h) => {
3475
- f(h);
3476
- },
3477
- children: () => a
3478
- }
1357
+ className: f("tabs-list", l),
1358
+ tabs: e,
1359
+ onSelect: (s) => {
1360
+ r(s);
1361
+ }
1362
+ },
1363
+ () => t
3479
1364
  );
3480
- }, ba = ({
3481
- value: o,
3482
- children: a,
3483
- className: u
3484
- }) => nt(st)?.activeTab === o ? /* @__PURE__ */ n.jsx(ne, { className: u, children: a }) : null, eo = {
3485
- Wrapper: ha,
3486
- List: ya,
3487
- Content: ba
3488
- }, ro = ({
3489
- children: o,
3490
- onClick: a,
3491
- color: u = "blue",
1365
+ }, Je = ({
1366
+ value: e,
1367
+ children: t,
3492
1368
  className: l
3493
- }) => /* @__PURE__ */ n.jsx("button", { onClick: a, children: /* @__PURE__ */ n.jsx("div", { color: u, className: W(l), children: o }) }), to = ({
3494
- onChange: o,
3495
- defaultValue: a,
3496
- children: u
3497
- }) => /* @__PURE__ */ n.jsxs(ne, { className: "blockbite-ui__text-control-label flex items-center", children: [
3498
- /* @__PURE__ */ n.jsxs("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black", children: [
3499
- /* @__PURE__ */ n.jsx(
3500
- rt,
3501
- {
3502
- __next40pxDefaultSize: !0,
3503
- __nextHasNoMarginBottom: !0,
3504
- type: "text",
3505
- value: a,
3506
- onChange: o
3507
- }
3508
- ),
3509
- /* @__PURE__ */ n.jsx(Vn, { className: "absolute right-1 top-2" })
3510
- ] }),
3511
- " ",
3512
- u
3513
- ] }), no = tt(
1369
+ }) => {
1370
+ const a = V(Z);
1371
+ return (a == null ? void 0 : a.activeTab) === e ? /* @__PURE__ */ React.createElement(h, { className: l }, t) : null;
1372
+ }, Bt = {
1373
+ Wrapper: Xe,
1374
+ List: Ye,
1375
+ Content: Je
1376
+ }, Pt = ({
1377
+ children: e,
1378
+ onClick: t,
1379
+ color: l = "blue",
1380
+ className: a
1381
+ }) => /* @__PURE__ */ React.createElement("button", { onClick: t }, /* @__PURE__ */ React.createElement("div", { color: l, className: f(a) }, e)), Ot = ({
1382
+ onChange: e,
1383
+ defaultValue: t,
1384
+ children: l
1385
+ }) => /* @__PURE__ */ React.createElement(h, { className: "blockbite-ui__text-control-label flex items-center" }, /* @__PURE__ */ React.createElement("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black" }, /* @__PURE__ */ React.createElement(
1386
+ O,
1387
+ {
1388
+ __next40pxDefaultSize: !0,
1389
+ __nextHasNoMarginBottom: !0,
1390
+ type: "text",
1391
+ value: t,
1392
+ onChange: e
1393
+ }
1394
+ ), /* @__PURE__ */ React.createElement(Te, { className: "absolute right-1 top-2" })), " ", l), jt = j(
3514
1395
  ({
3515
- className: o,
3516
- options: a,
3517
- defaultPressed: u,
3518
- display: l = "label",
3519
- label: d = !1,
3520
- onPressedChange: f
1396
+ className: e,
1397
+ options: t,
1398
+ defaultPressed: l,
1399
+ display: a = "label",
1400
+ label: n = !1,
1401
+ onPressedChange: r
3521
1402
  }) => {
3522
- const [h, v] = F(""), g = (p) => {
3523
- f(p);
1403
+ const [s, c] = p(""), i = (o) => {
1404
+ r(o);
3524
1405
  };
3525
- return G(() => {
3526
- v(u);
3527
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: W(o), children: /* @__PURE__ */ n.jsx(
3528
- Sn,
1406
+ return g(() => {
1407
+ c(l);
1408
+ }, [l]), /* @__PURE__ */ React.createElement(h, { className: f(e) }, /* @__PURE__ */ React.createElement(
1409
+ ue,
3529
1410
  {
3530
1411
  __next40pxDefaultSize: !0,
3531
1412
  __nextHasNoMarginBottom: !0,
3532
1413
  isBlock: !0,
3533
- value: h,
3534
- label: typeof d == "string" ? d : "",
3535
- children: a.map(
3536
- (p) => l === "icon" ? /* @__PURE__ */ n.jsx(
3537
- kn,
3538
- {
3539
- icon: p.icon,
3540
- label: p.label,
3541
- value: p.value,
3542
- onClick: () => g(p.value)
3543
- },
3544
- `ToggleGroupControlIcon-${p.value}`
3545
- ) : /* @__PURE__ */ n.jsx(
3546
- Tn,
3547
- {
3548
- value: p.value,
3549
- label: p.label,
3550
- onClick: () => g(p.value)
3551
- },
3552
- `ToggleGroupControlOption-${p.value}`
3553
- )
1414
+ value: s,
1415
+ label: typeof n == "string" ? n : ""
1416
+ },
1417
+ t.map(
1418
+ (o) => a === "icon" ? /* @__PURE__ */ React.createElement(
1419
+ de,
1420
+ {
1421
+ icon: o.icon,
1422
+ label: o.label,
1423
+ key: `ToggleGroupControlIcon-${o.value}`,
1424
+ value: o.value,
1425
+ onClick: () => i(o.value)
1426
+ }
1427
+ ) : /* @__PURE__ */ React.createElement(
1428
+ pe,
1429
+ {
1430
+ key: `ToggleGroupControlOption-${o.value}`,
1431
+ value: o.value,
1432
+ label: o.label,
1433
+ onClick: () => i(o.value)
1434
+ }
3554
1435
  )
3555
- }
3556
- ) });
1436
+ )
1437
+ ));
3557
1438
  }
3558
- ), ao = ({
3559
- label: o,
3560
- className: a,
3561
- onChange: u,
3562
- checked: l = !1
1439
+ ), Vt = ({
1440
+ label: e,
1441
+ className: t,
1442
+ onChange: l,
1443
+ checked: a = !1
3563
1444
  // Default to false if undefined, so it's always controlled
3564
1445
  }) => {
3565
- const [d, f] = F(l);
3566
- return G(() => {
3567
- f(l);
3568
- }, [l]), /* @__PURE__ */ n.jsx(ne, { className: W(a, "flex items-center gap-2"), children: /* @__PURE__ */ n.jsx(
3569
- On,
1446
+ const [n, r] = p(a);
1447
+ return g(() => {
1448
+ r(a);
1449
+ }, [a]), /* @__PURE__ */ React.createElement(h, { className: f(t, "flex items-center gap-2") }, /* @__PURE__ */ React.createElement(
1450
+ fe,
3570
1451
  {
3571
- checked: d,
3572
- label: o,
3573
- onChange: (h) => {
3574
- f(h), u && u(h);
1452
+ checked: n,
1453
+ label: e,
1454
+ onChange: (s) => {
1455
+ r(s), l && l(s);
3575
1456
  }
3576
1457
  }
3577
- ) });
1458
+ ));
3578
1459
  };
3579
1460
  export {
3580
- Sa as AutocompleteDropdown,
3581
- aa as Badge,
3582
- ka as BitePreview,
3583
- Ta as Button,
3584
- ta as ButtonToggle,
3585
- na as ButtonToggleGroup,
3586
- Oa as Chapter,
3587
- Pa as ChapterDivider,
3588
- Na as Checkbox,
3589
- Aa as DataItemList,
3590
- Ia as DisappearingMessage,
3591
- oa as DropdownPicker,
3592
- Da as EmptyState,
3593
- $a as FloatingPanel,
3594
- Fa as FocalPointControl,
3595
- Ke as Icon,
3596
- La as LinkPicker,
3597
- Ma as MediaPicker,
3598
- Ba as MetricsControl,
3599
- Wa as Modal,
3600
- Ua as ModalClose,
3601
- fa as ModalContent,
3602
- ca as ModalFooter,
3603
- ua as ModalHeader,
3604
- da as ModalTrigger,
3605
- Va as NewWindowPortal,
3606
- Ya as Notice,
3607
- za as PasswordInput,
3608
- ia as Popover,
3609
- Ha as ProjectsNavigation,
3610
- la as RangeSlider,
3611
- qa as ResponsiveImage,
3612
- Ga as ResponsiveVideo,
3613
- Ka as ScrollList,
3614
- Ja as SelectControlWrapper,
3615
- Xa as SingleBlockTypeAppender,
3616
- Za as SlideIn,
3617
- Qa as Spinner,
3618
- eo as Tabs,
3619
- ba as TabsContent,
3620
- ya as TabsList,
3621
- ha as TabsWrapper,
3622
- ro as Tag,
3623
- ot as TextControl,
3624
- to as TextControlLabel,
3625
- no as ToggleGroup,
3626
- ao as ToggleSwitch,
3627
- ne as Wrap,
3628
- Vt as useModalContext
1461
+ ct as AutocompleteDropdown,
1462
+ Ne as Badge,
1463
+ st as BitePreview,
1464
+ ot as Button,
1465
+ we as ButtonToggle,
1466
+ ye as ButtonToggleGroup,
1467
+ it as Chapter,
1468
+ mt as ChapterDivider,
1469
+ ut as Checkbox,
1470
+ dt as DataItemList,
1471
+ pt as DisappearingMessage,
1472
+ Ve as DropdownPicker,
1473
+ ft as EmptyState,
1474
+ gt as FloatingPanel,
1475
+ Rt as FocalPointControl,
1476
+ N as Icon,
1477
+ Et as LinkPicker,
1478
+ bt as MediaPicker,
1479
+ ht as MetricsControl,
1480
+ Ct as Modal,
1481
+ xt as ModalClose,
1482
+ De as ModalContent,
1483
+ Ae as ModalFooter,
1484
+ ze as ModalHeader,
1485
+ Fe as ModalTrigger,
1486
+ vt as NewWindowPortal,
1487
+ wt as Notice,
1488
+ yt as PasswordInput,
1489
+ Ze as Popover,
1490
+ Nt as ProjectsNavigation,
1491
+ $e as RangeSlider,
1492
+ kt as ResponsiveImage,
1493
+ _t as ResponsiveVideo,
1494
+ Lt as ScrollList,
1495
+ Mt as SelectControlWrapper,
1496
+ St as SingleBlockTypeAppender,
1497
+ Tt as SlideIn,
1498
+ Ht as Spinner,
1499
+ Bt as Tabs,
1500
+ Je as TabsContent,
1501
+ Ye as TabsList,
1502
+ Xe as TabsWrapper,
1503
+ Pt as Tag,
1504
+ I as TextControl,
1505
+ Ot as TextControlLabel,
1506
+ jt as ToggleGroup,
1507
+ Vt as ToggleSwitch,
1508
+ h as Wrap,
1509
+ W as useModalContext
3629
1510
  };
3630
1511
  //# sourceMappingURL=index.js.map