@blockbite/ui 2.0.19 → 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 -3358
  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,2889 +1,764 @@
1
- import { Pencil1 as Mt, Plus as vn, Trash as mn, ChevronDown as hn, Cross2 as yn, Tailwind as bn, Percentage as gn, Grid as xn, Desktop as _n, Slider as jn, ColumnSpacing as Cn } from "@blockbite/icons";
2
- import { Button as ye, Dropdown as wn, TextControl as rt, CheckboxControl as En, DropdownMenu as Rn, FocalPointPicker as Sn, PanelRow as kn, Popover as Tn, RangeControl as On, Modal as Pn, Notice as Nn, __experimentalInputControl as An, __experimentalInputControlSuffixWrapper as In, SelectControl as Dn, Spinner as $n, TabPanel as Fn, __experimentalToggleGroupControl as Ln, __experimentalToggleGroupControlOptionIcon as Mn, __experimentalToggleGroupControlOption as Bn, ToggleControl as Wn } from "@wordpress/components";
3
- import { memo as tt, useState as F, useEffect as G, useCallback as Bt, useRef as lr, createPortal as Wt, forwardRef as Un, createContext as Ut, useContext as nt, Children as Rr, isValidElement as Sr, useMemo as Vn } from "@wordpress/element";
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(pn) {
660
- return pn;
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 fn = Zr.call(kt), Tt, dn = 0; !(Tt = fn.next()).done; )
685
- Q = Tt.value, re = ce + $e(Q, dn++), 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 zt(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 Ht() {
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 qt() {
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 Gt = typeof WeakMap == "function" ? WeakMap : Map;
1079
- xr = new Gt();
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, Ht();
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, qt(), 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 Kt(e, r, i) {
1153
- return mt(e, !1);
1154
- }
1155
- function Jt(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, Jt(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 Kt(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 Xt(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 Zt(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 Qt(e) {
1244
- return e != null ? Zt(e.__source) : "";
1245
- }
1246
- var gt = {};
1247
- function en(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 = en(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
- Xt(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 rn(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 = Qt(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 ? rn(S) : jt(S), S;
1339
- }
1340
- var wt = !1;
1341
- function tn(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 nn(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 an(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 on(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), on(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 sn = Ct, ln = nn, un = tn, cn = {
1477
- map: ze,
1478
- forEach: Fr,
1479
- count: hr,
1480
- toArray: yr,
1481
- only: br
1482
- };
1483
- a.Children = cn, 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 = ln, a.createContext = Lr, a.createElement = sn, a.createFactory = un, a.createRef = Or, a.forwardRef = Ur, a.isValidElement = Re, a.lazy = Wr, a.memo = x, a.startTransition = an, 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 = zt, 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 = Bt(() => {
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 = Bt(
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
- wn,
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 !bg-transparent !p-0 !text-[11px] !text-current", children: [
2298
- u && /* @__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
- /* @__PURE__ */ n.jsx(Mt, {})
2308
- ] })
2309
- }
2310
- ) }),
2311
- renderContent: () => /* @__PURE__ */ n.jsx(ne, { important: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "w-52", children: [
2312
- /* @__PURE__ */ n.jsx(
2313
- 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",
2314
214
  {
2315
- __next40pxDefaultSize: !0,
2316
- __nextHasNoMarginBottom: !0,
2317
- label: "Search options",
2318
- value: d,
2319
- onChange: (g) => f(g),
2320
- autoComplete: "off"
215
+ className: f(
216
+ `mr-3 h-3 w-3 rounded-full bg-${i.value}`
217
+ )
2321
218
  }
2322
219
  ),
2323
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-1 !bg-transparent !p-0 !pt-2", children: [
2324
- h.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]", children: "No options found." }),
2325
- h.map((g, p) => /* @__PURE__ */ n.jsxs(
2326
- ta,
2327
- {
2328
- className: W({
2329
- "bg-primary": g.value
2330
- }),
2331
- size: "small",
2332
- value: g.value.toString(),
2333
- defaultPressed: o,
2334
- onPressedChange: (j) => {
2335
- l(j ? g.value : "");
2336
- },
2337
- children: [
2338
- u && /* @__PURE__ */ n.jsx(
2339
- "div",
2340
- {
2341
- className: W(
2342
- `mr-3 h-3 w-3 rounded-full bg-${g.value}`
2343
- )
2344
- }
2345
- ),
2346
- g.label
2347
- ]
2348
- },
2349
- `ButtonToggle__${g.value}___${p}`
2350
- ))
2351
- ] })
2352
- ] }) })
220
+ i.label
221
+ )))))
2353
222
  }
2354
223
  );
2355
224
  }
2356
- 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(
2357
226
  "div",
2358
227
  {
2359
- onClick: l,
2360
- className: W(
2361
- a,
228
+ onClick: a,
229
+ className: f(
230
+ t,
2362
231
  "inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"
2363
- ),
2364
- children: [
2365
- u && /* @__PURE__ */ n.jsx("span", { className: "mr-1 text-xs font-semibold text-gray-700", children: u }),
2366
- o
2367
- ]
2368
- }
2369
- ), ka = ({ htmlContent: o, cssContent: a, frontendAssets: u }) => {
2370
- const l = lr(null), [d, f] = F(null);
2371
- return G(() => {
2372
- const h = l.current;
2373
- return h && (h.onload = () => {
2374
- const v = h.contentDocument || h.contentWindow.document;
2375
- if (v) {
2376
- f(v.body);
2377
- const g = v.createElement("style");
2378
- g.innerHTML = a, v.head.appendChild(g), u.forEach(({ type: p, id: j, url: _ }) => {
2379
- const O = document.getElementById(j);
2380
- if (O) {
2381
- const T = document.adoptNode(
2382
- 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)
2383
250
  );
2384
- v.head.appendChild(T);
251
+ c.head.appendChild(R);
2385
252
  } else {
2386
- const T = v.createElement(
2387
- p === "script" ? "script" : "link"
253
+ const R = c.createElement(
254
+ o === "script" ? "script" : "link"
2388
255
  );
2389
- 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);
2390
257
  }
2391
258
  });
2392
259
  }
2393
260
  }), () => {
2394
- h && (h.onload = null);
261
+ s && (s.onload = null);
2395
262
  };
2396
- }, [o, a, u]), /* @__PURE__ */ n.jsxs(
263
+ }, [e, t, l]), /* @__PURE__ */ React.createElement(
2397
264
  "div",
2398
265
  {
2399
266
  className: "render-preview-container",
2400
- style: { width: "100%", minHeight: "100%" },
2401
- children: [
2402
- /* @__PURE__ */ n.jsx(
2403
- "iframe",
2404
- {
2405
- ref: l,
2406
- title: "Preview",
2407
- className: "editor-styles-wrapper",
2408
- width: "100%",
2409
- height: "100%"
2410
- }
2411
- ),
2412
- d && Wt(
2413
- /* @__PURE__ */ n.jsx("div", { className: "b_", children: /* @__PURE__ */ n.jsx(
2414
- "div",
2415
- {
2416
- className: "b_utils",
2417
- dangerouslySetInnerHTML: { __html: o }
2418
- }
2419
- ) }),
2420
- d
2421
- )
2422
- ]
2423
- }
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
+ )
2424
289
  );
2425
- }, Ta = ({
2426
- children: o,
2427
- size: a = "default",
2428
- label: u,
2429
- className: l,
2430
- onClick: d,
2431
- variant: f = "primary",
2432
- display: h = "auto",
2433
- icon: v,
2434
- 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
2435
300
  }) => {
2436
- const p = h === "icon" || h === "icon-lg";
2437
- return /* @__PURE__ */ n.jsxs(
2438
- ye,
301
+ const o = s === "icon" || s === "icon-lg";
302
+ return /* @__PURE__ */ React.createElement(
303
+ v,
2439
304
  {
2440
- size: a,
2441
- variant: f,
2442
- label: u,
305
+ size: t,
306
+ variant: r,
307
+ label: l,
2443
308
  showTooltip: !0,
2444
- disabled: g,
2445
- className: W(
2446
- l,
309
+ disabled: i,
310
+ className: f(
311
+ a,
2447
312
  "blockbite-ui__button",
2448
313
  "flex items-center justify-center gap-1",
2449
- { "is-primary": f === "primary" },
2450
- { "is-secondary": f === "secondary" },
2451
- { "is-link": f === "link" },
2452
- { "is-tertiary": f === "tertiary" },
2453
- { "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" }
2454
319
  ),
2455
- onClick: d,
2456
- children: [
2457
- v && /* @__PURE__ */ n.jsx(
2458
- Ke,
2459
- {
2460
- icon: v,
2461
- className: W({ "h-4 w-4": h === "icon-lg" })
2462
- }
2463
- ),
2464
- p ? null : o,
2465
- u && !o && !p ? /* @__PURE__ */ n.jsx("span", { children: u }) : null
2466
- ]
2467
- }
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
2468
331
  );
2469
- }, Oa = ({ children: o, title: a }) => /* @__PURE__ */ n.jsxs(
2470
- ne,
332
+ }, it = ({ children: e, title: t }) => /* @__PURE__ */ React.createElement(
333
+ h,
2471
334
  {
2472
- className: W(
335
+ className: f(
2473
336
  "text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
2474
- W
2475
- ),
2476
- children: [
2477
- a && /* @__PURE__ */ n.jsx(ne, { className: "font-medium", children: a }),
2478
- o
2479
- ]
2480
- }
2481
- ), Pa = ({
2482
- title: o,
2483
- className: a,
2484
- help: u,
2485
- badge: l,
2486
- ...d
2487
- }) => /* @__PURE__ */ n.jsxs("div", { className: W("mb-2", a), ...d, children: [
2488
- /* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between", children: [
2489
- /* @__PURE__ */ n.jsx("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug", children: o }),
2490
- !!l && /* @__PURE__ */ n.jsx(aa, { className: "text-[10px] py-px px-1", children: l })
2491
- ] }),
2492
- u && /* @__PURE__ */ n.jsx("small", { className: "w-full shrink-0 text-[11px]", children: u })
2493
- ] }), Na = ({ label: o, help: a, defaultChecked: u }) => {
2494
- const [l, d] = F(u);
2495
- return G(() => {
2496
- d(u);
2497
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2", children: /* @__PURE__ */ n.jsx(
2498
- En,
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,
2499
354
  {
2500
- label: o,
2501
- help: a,
2502
- checked: l,
2503
- onChange: d
2504
- }
2505
- ) });
2506
- }, ot = Un(
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(
2507
408
  ({
2508
- onClick: o,
2509
- onChange: a,
2510
- className: u,
2511
- defaultValue: l,
2512
- children: d,
2513
- inputClassName: f,
2514
- readOnly: h,
2515
- placeholder: v,
2516
- onBlur: g,
2517
- type: p = "text",
2518
- label: j,
2519
- helper: _ = "",
2520
- ...O
2521
- }, T) => {
2522
- const k = `text-control-${Math.random().toString(36).substring(2, 15)}`;
2523
- 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(
2524
425
  "div",
2525
426
  {
2526
- className: W("flex items-center p-0", u),
2527
- ...O,
2528
- children: [
2529
- j ? /* @__PURE__ */ n.jsx("label", { htmlFor: k, className: "text-primary !m-0 !mb-0 !mr-2", children: j }) : null,
2530
- /* @__PURE__ */ n.jsx(
2531
- "input",
2532
- {
2533
- id: k,
2534
- className: W(
2535
- "border-primary !m-0 !mb-0 h-[32px] !rounded-none border border-opacity-70 focus:outline-none focus:ring-0",
2536
- f
2537
- ),
2538
- type: p,
2539
- value: l,
2540
- placeholder: v,
2541
- onFocus: () => o && o(),
2542
- onBlur: (ae) => {
2543
- o && o(), g && g(ae.target.value);
2544
- },
2545
- onChange: (ae) => a && a(ae.target.value),
2546
- readOnly: h,
2547
- ref: T
2548
- }
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
2549
438
  ),
2550
- /* @__PURE__ */ n.jsx("span", { children: d }),
2551
- _ && /* @__PURE__ */ n.jsx("p", { className: "text-primary !m-0 !mb-0 text-xs", children: _ })
2552
- ]
2553
- }
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)
2554
453
  );
2555
454
  }
2556
455
  );
2557
- ot.displayName = "TextControl";
2558
- const Aa = ({
2559
- data: o,
2560
- active: a,
2561
- setActive: u,
2562
- onCreate: l,
2563
- onDelete: d,
2564
- onUpdate: f,
2565
- onSwitch: h,
2566
- renderItemActions: v,
2567
- addons: g,
2568
- className: p = "",
2569
- footerSlot: j,
2570
- 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 = ""
2571
470
  }) => {
2572
- const [O, T] = F({
471
+ const [E, R] = p({
2573
472
  id: "",
2574
473
  name: ""
2575
- }), [k, ae] = F(!1), de = lr(null), A = () => {
2576
- l();
2577
- }, Y = () => {
2578
- if (!a || o.length === 0) return;
2579
- const K = o.filter((pe) => pe.id !== a?.id), X = o.findIndex((pe) => pe.id === a?.id), ie = K[X] || K[0];
2580
- d(a?.id), u(ie);
2581
- }, ge = (K) => {
2582
- ae(!0), O.id && f(O.id, { name: K }), setTimeout(() => {
2583
- 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);
2584
483
  }, 500);
2585
484
  };
2586
- return /* @__PURE__ */ n.jsxs(ne, { important: !0, className: p, children: [
2587
- /* @__PURE__ */ n.jsxs("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto", children: [
2588
- g,
2589
- o.length > 0 && /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("ul", { className: "divide-y border-b", children: o.map((K) => /* @__PURE__ */ n.jsxs(
2590
- "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",
2591
491
  {
2592
- className: W(
2593
- "relative m-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
2594
- {
2595
- "bg-easy": K.id === a?.id
2596
- }
2597
- ),
2598
- children: [
2599
- /* @__PURE__ */ n.jsxs("div", { className: "flex-1 relative", children: [
2600
- /* @__PURE__ */ n.jsx(
2601
- "button",
2602
- {
2603
- className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
2604
- onClick: () => {
2605
- h(a?.id, { ...a }), u(K);
2606
- },
2607
- onDoubleClick: () => {
2608
- T({ id: K.id, name: K.name || "" });
2609
- },
2610
- 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" })
2611
- }
2612
- ),
2613
- O.id === K.id && !k && /* @__PURE__ */ n.jsx(
2614
- ot,
2615
- {
2616
- className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
2617
- inputClassName: "w-full",
2618
- defaultValue: O.name,
2619
- onChange: (X) => T({ ...O, name: X }),
2620
- ref: de,
2621
- onBlur: ge
2622
- }
2623
- )
2624
- ] }),
2625
- v && /* @__PURE__ */ n.jsx("div", { className: "flex gap-1 pr-1", children: v(K) })
2626
- ]
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);
2627
502
  },
2628
- `data__${K.id}`
2629
- )) }) })
2630
- ] }),
2631
- /* @__PURE__ */ n.jsxs(
2632
- "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,
2633
510
  {
2634
- className: W(
2635
- "flex flex-wrap justify-center gap-2 p-2",
2636
- _
2637
- ),
2638
- children: [
2639
- j,
2640
- /* @__PURE__ */ n.jsx(
2641
- ye,
2642
- {
2643
- onClick: A,
2644
- icon: /* @__PURE__ */ n.jsx(vn, { className: "h-4 w-4" }),
2645
- variant: "tertiary",
2646
- size: "compact",
2647
- children: "Add"
2648
- }
2649
- ),
2650
- /* @__PURE__ */ n.jsx(
2651
- ye,
2652
- {
2653
- onClick: Y,
2654
- icon: /* @__PURE__ */ n.jsx(mn, { className: "h-4 w-4" }),
2655
- variant: "tertiary",
2656
- size: "compact",
2657
- disabled: !a || o.length === 0,
2658
- children: "Remove"
2659
- }
2660
- )
2661
- ]
2662
- }
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"
2663
549
  )
2664
- ] });
2665
- }, Ia = ({
2666
- duration: o = 3e3,
2667
- className: a,
2668
- children: u,
2669
- show: l,
2670
- message: d
550
+ ));
551
+ }, pt = ({
552
+ duration: e = 3e3,
553
+ className: t,
554
+ children: l,
555
+ show: a,
556
+ message: n
2671
557
  }) => {
2672
- const [f, h] = F(!1), v = lr(!1), g = lr(null);
2673
- return G(() => {
2674
- v.current = !0;
2675
- }, []), G(() => {
2676
- if (v.current)
2677
- return l && (h(!0), g.current = setTimeout(() => {
2678
- h(!1);
2679
- }, o)), () => {
2680
- 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);
2681
567
  };
2682
- }, [l, o]), f ? /* @__PURE__ */ n.jsx(
2683
- ne,
568
+ }, [a, e]), r ? /* @__PURE__ */ React.createElement(
569
+ h,
2684
570
  {
2685
571
  important: !0,
2686
- className: W("bb-ui__disappearing-message", a),
2687
- children: /* @__PURE__ */ n.jsx("div", { className: "bb-ui__disappearing-message__content", children: d ?? u })
2688
- }
572
+ className: f("bb-ui__disappearing-message", t)
573
+ },
574
+ /* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" }, n ?? l)
2689
575
  ) : null;
2690
- }, oa = ({
2691
- label: o,
2692
- className: a,
2693
- defaultValue: u,
2694
- defaultIcon: l = hn,
2695
- onPressedChange: d,
2696
- options: f
576
+ }, Ve = ({
577
+ label: e,
578
+ className: t,
579
+ defaultValue: l,
580
+ defaultIcon: a = ke,
581
+ onPressedChange: n,
582
+ options: r
2697
583
  }) => {
2698
- const [h, v] = F(null);
2699
- G(() => {
2700
- v(u);
2701
- }, [u]);
2702
- const g = [
2703
- ...f.map((p) => ({
2704
- icon: p.icon,
2705
- label: p.label,
2706
- title: p.label,
2707
- 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,
2708
595
  onClick: () => {
2709
- v(p.value), d(p.value);
596
+ c(m.value), n(m.value);
2710
597
  }
2711
598
  })),
2712
599
  {
2713
- icon: /* @__PURE__ */ n.jsx(Ke, { icon: l }),
600
+ icon: /* @__PURE__ */ React.createElement(N, { icon: a }),
2714
601
  title: "Reset",
2715
602
  value: "reset",
2716
603
  onClick: () => {
2717
- v("reset"), d("reset");
604
+ c("reset"), n("reset");
2718
605
  }
2719
606
  }
2720
607
  ];
2721
- return /* @__PURE__ */ n.jsx(
2722
- Rn,
608
+ return /* @__PURE__ */ React.createElement(
609
+ Q,
2723
610
  {
2724
- controls: g,
2725
- className: W(
611
+ controls: i,
612
+ className: f(
2726
613
  "blockbite-ui__dropdown-picker border-primary border",
2727
- a
614
+ t
2728
615
  ),
2729
- icon: f.find((p) => p.value === h)?.icon || /* @__PURE__ */ n.jsx(Ke, { icon: l }),
2730
- 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"
2731
618
  }
2732
619
  );
2733
620
  };
2734
- function Da({
2735
- icon: o,
2736
- title: a,
2737
- description: u,
2738
- children: l = null,
2739
- ...d
621
+ function ft({
622
+ icon: e,
623
+ title: t,
624
+ description: l,
625
+ children: a = null,
626
+ ...n
2740
627
  }) {
2741
- 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: [
2742
- o && /* @__PURE__ */ n.jsx("div", { className: "mx-auto !text-gray-400", children: o }),
2743
- /* @__PURE__ */ n.jsx("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium", children: a }),
2744
- /* @__PURE__ */ n.jsx("p", { className: "mt-1 !font-sans text-sm !text-gray-500", children: u }),
2745
- l && /* @__PURE__ */ n.jsx("div", { className: "mt-4", children: l })
2746
- ] }) }) });
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))));
2747
629
  }
2748
- function $a({
2749
- children: o
630
+ function gt({
631
+ children: e
2750
632
  }) {
2751
- const a = lr(null), [u, l] = F({ x: 100, y: 100 }), [d, f] = F(!1), [h, v] = F({ x: 0, y: 0 });
2752
- G(() => {
2753
- const p = (_) => {
2754
- d && l({
2755
- x: _.clientX - h.x,
2756
- 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
2757
639
  });
2758
- }, j = () => f(!1);
2759
- return window.addEventListener("mousemove", p), window.addEventListener("mouseup", j), () => {
2760
- 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);
2761
643
  };
2762
- }, [d, h]);
2763
- const g = (p) => {
2764
- const j = a.current.getBoundingClientRect();
2765
- 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);
2766
648
  };
2767
- return /* @__PURE__ */ n.jsx("div", { className: "bb_", children: /* @__PURE__ */ n.jsxs(
649
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
2768
650
  "div",
2769
651
  {
2770
- ref: a,
652
+ ref: t,
2771
653
  className: "fixed bg-white shadow-xl rounded-2xl p-4 w-[400px] h-[550px] z-[9999]",
2772
- style: { left: u.x, top: u.y },
2773
- children: [
2774
- o,
2775
- /* @__PURE__ */ n.jsx(
2776
- "div",
2777
- {
2778
- className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
2779
- onMouseDown: g
2780
- }
2781
- )
2782
- ]
2783
- }
2784
- ) });
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
+ ));
2785
665
  }
2786
- const Fa = ({
2787
- defaultValue: o,
2788
- onValueChange: a,
2789
- url: u
666
+ const Rt = ({
667
+ defaultValue: e,
668
+ onValueChange: t,
669
+ url: l
2790
670
  }) => {
2791
- const [l, d] = F({
671
+ const [a, n] = p({
2792
672
  x: 0.5,
2793
673
  y: 0.5
2794
674
  });
2795
- return G(() => {
2796
- a(
2797
- `[${(l.x * 100).toFixed(2)}%_${(l.y * 100).toFixed(
675
+ return g(() => {
676
+ t(
677
+ `[${(a.x * 100).toFixed(2)}%_${(a.y * 100).toFixed(
2798
678
  2
2799
679
  )}%]`
2800
680
  );
2801
- }, [l]), G(() => {
2802
- if (o.includes("%")) {
2803
- const [f, h] = o.replace("[", "").replace("%]", "").split("_").map((v) => parseFloat(v) / 100);
2804
- d({
2805
- x: f,
2806
- 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
2807
687
  });
2808
688
  }
2809
- }, [o]), /* @__PURE__ */ n.jsx(ne, { className: "relative flex flex-col", children: /* @__PURE__ */ n.jsx(
2810
- Sn,
689
+ }, [e]), /* @__PURE__ */ React.createElement(h, { className: "relative flex flex-col" }, /* @__PURE__ */ React.createElement(
690
+ ee,
2811
691
  {
2812
- url: u,
2813
- value: l,
2814
- onDrag: (f) => d(f),
2815
- onChange: (f) => d(f)
692
+ url: l,
693
+ value: a,
694
+ onDrag: (r) => n(r),
695
+ onChange: (r) => n(r)
2816
696
  }
2817
- ) });
697
+ ));
2818
698
  };
2819
- function La(o) {
2820
- 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({
2821
701
  url: "",
2822
702
  title: ""
2823
703
  });
2824
- return G(() => {
2825
- a !== "" && (d(null), Yn({
2826
- 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}`
2827
707
  }).then(
2828
- (v) => {
2829
- v?.length ? d([...v]) : d([]);
708
+ (c) => {
709
+ c != null && c.length ? n([...c]) : n([]);
2830
710
  }
2831
711
  ));
2832
- }, [a]), G(() => {
2833
- f.url !== "" && o.parentCallback(f);
2834
- }, [f]), /* @__PURE__ */ n.jsxs(ne, { className: "blockbite--editor-linkwrap", children: [
2835
- /* @__PURE__ */ n.jsx(
2836
- rt,
2837
- {
2838
- __next40pxDefaultSize: !0,
2839
- __nextHasNoMarginBottom: !0,
2840
- label: Me("Search link", "blockbitelinks"),
2841
- value: a,
2842
- placeholder: "Example: About",
2843
- onChange: (v) => u(v),
2844
- help: Me("Type a post, page, title", "blockbitelinks")
2845
- }
2846
- ),
2847
- a ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-linklist", children: /* @__PURE__ */ n.jsx(
2848
- sa,
2849
- {
2850
- links: l,
2851
- onActiveLink: (v) => [
2852
- h({ ...v }),
2853
- u("")
2854
- ]
2855
- }
2856
- ) }) : null
2857
- ] });
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);
2858
735
  }
2859
- function sa({ links: o, onActiveLink: a }) {
2860
- if (o === null)
2861
- return /* @__PURE__ */ n.jsx("p", { children: "Loading..." });
2862
- if (o.length === 0)
2863
- return /* @__PURE__ */ n.jsx("p", { children: "No Results" });
2864
- 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(
2865
742
  "span",
2866
743
  {
2867
744
  className: "blockbite--editor-link",
2868
- onClick: () => a(l),
2869
- children: [
2870
- /* @__PURE__ */ n.jsx("span", { children: l.title }),
2871
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.url }),
2872
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.post_type })
2873
- ]
2874
- }
2875
- ) }, l.id));
2876
- 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);
2877
752
  }
2878
- function Ma({ mediaProps: o, mediaCallback: a }) {
2879
- const u = [
753
+ function bt({ mediaProps: e, mediaCallback: t }) {
754
+ const l = [
2880
755
  "image",
2881
756
  "video",
2882
757
  "image/svg+xml",
2883
758
  "svg",
2884
759
  "text/plain",
2885
760
  "application/json"
2886
- ], [l, d] = F({
761
+ ], [a, n] = p({
2887
762
  id: null,
2888
763
  url: "",
2889
764
  sizes: [],
@@ -2892,740 +767,745 @@ function Ma({ mediaProps: o, mediaCallback: a }) {
2892
767
  width: 0,
2893
768
  height: 0
2894
769
  });
2895
- G(() => {
2896
- o && d({ ...o });
2897
- }, [o]);
2898
- const f = () => {
2899
- a({ ...{
770
+ g(() => {
771
+ e && n({ ...e });
772
+ }, [e]);
773
+ const r = () => {
774
+ t({ ...{
2900
775
  mediaId: 0,
2901
776
  mediaUrl: ""
2902
777
  } });
2903
- }, h = (v) => {
2904
- const g = {
778
+ }, s = (c) => {
779
+ const i = {
2905
780
  thumbnail: null,
2906
781
  medium: null,
2907
782
  large: null
2908
783
  };
2909
- v?.sizes && Object.keys(v.sizes).map((j) => {
2910
- const _ = v.sizes[j];
2911
- 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;
2912
- }), v.url.endsWith(".json") && (v.type = "lottie"), v.url.endsWith(".svg") && (v.type = "svg");
2913
- const p = {
2914
- id: v.id,
2915
- url: v.url,
2916
- sizes: g,
2917
- alt: v.alt,
2918
- type: v.type,
2919
- width: v.width,
2920
- 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
2921
796
  };
2922
- a({ ...p });
797
+ t({ ...o });
2923
798
  };
2924
- return /* @__PURE__ */ n.jsxs(kn, { children: [
2925
- l.id !== null && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2926
- Pt,
2927
- {
2928
- onSelect: h,
2929
- value: l.id,
2930
- allowedTypes: u,
2931
- render: ({ open: v }) => /* @__PURE__ */ n.jsxs(
2932
- 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",
2933
814
  {
2934
- className: l.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
2935
- onClick: v,
2936
- children: [
2937
- l.id === 0 && Me("Choose Media", "blockbite"),
2938
- l.id && l.type === "image" ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-visual-image", children: /* @__PURE__ */ n.jsx(
2939
- "img",
2940
- {
2941
- alt: l.alt ? l.alt : Me("Image", "blockbite"),
2942
- src: l.url
2943
- }
2944
- ) }) : "Add media"
2945
- ]
815
+ alt: a.alt ? a.alt : y("Image", "blockbite"),
816
+ src: a.url
2946
817
  }
2947
- )
2948
- }
2949
- ) }),
2950
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2951
- Pt,
2952
- {
2953
- title: Me("Replace media", "blockbite"),
2954
- value: l.id,
2955
- onSelect: h,
2956
- allowedTypes: u,
2957
- render: ({ open: v }) => /* @__PURE__ */ n.jsx(ye, { onClick: v, children: Me("Replace media", "blockbite") })
2958
- }
2959
- ) }),
2960
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(ye, { onClick: () => f(), isDestructive: !0, children: Me("Remove media", "blockbite") }) })
2961
- ] });
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"))));
2962
831
  }
2963
- const ia = ({
2964
- children: o,
2965
- className: a,
2966
- position: u,
2967
- visible: l,
2968
- onClick: d,
2969
- onVisibleChange: f
832
+ const Ze = ({
833
+ children: e,
834
+ className: t,
835
+ position: l,
836
+ visible: a,
837
+ onClick: n,
838
+ onVisibleChange: r
2970
839
  }) => {
2971
- const [h, v] = F(!!l);
2972
- G(() => {
2973
- l !== void 0 && v(l);
2974
- }, [l]);
2975
- const g = () => {
2976
- const p = !h;
2977
- 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);
2978
847
  };
2979
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: h && /* @__PURE__ */ n.jsx(
2980
- Tn,
848
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, s && /* @__PURE__ */ React.createElement(
849
+ ae,
2981
850
  {
2982
- position: u,
2983
- className: "blockbite-ui__popover bb_",
2984
- onClick: d,
851
+ position: l,
852
+ className: "blockbite-ui__popover",
853
+ onClick: n,
2985
854
  onFocusOutside: () => {
2986
- 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"
2987
864
  },
2988
- children: /* @__PURE__ */ n.jsx("div", { className: a, children: /* @__PURE__ */ n.jsxs("div", { className: "relative h-full w-full p-4", children: [
2989
- /* @__PURE__ */ n.jsx(
2990
- ye,
2991
- {
2992
- onClick: g,
2993
- size: "small",
2994
- className: "close-button absolute right-0 top-0",
2995
- children: /* @__PURE__ */ n.jsx(yn, {})
2996
- }
2997
- ),
2998
- o
2999
- ] }) })
3000
- }
3001
- ) });
3002
- }, la = ({
3003
- defaultValue: o,
3004
- label: a,
3005
- min: u = 0,
3006
- max: l = 2e3,
3007
- withInputField: d = !1,
3008
- onValueChange: f,
3009
- gridMode: h = !1,
3010
- showTooltip: v = !1,
3011
- ...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
3012
878
  }) => {
3013
- const [p] = F(0), [j, _] = F(0);
3014
- G(() => {
3015
- _(Math.round(parseInt(o) / (h ? 16 : 1)));
3016
- }, [o]);
3017
- function O(T) {
3018
- const k = T * (h ? 16 : 1);
3019
- 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());
3020
886
  }
3021
- return /* @__PURE__ */ n.jsxs(ne, { className: "flex min-w-[240px] flex-col", children: [
3022
- /* @__PURE__ */ n.jsx(
3023
- On,
3024
- {
3025
- __next40pxDefaultSize: !0,
3026
- __nextHasNoMarginBottom: !0,
3027
- label: a,
3028
- value: j,
3029
- min: u,
3030
- max: l,
3031
- showTooltip: v,
3032
- withInputField: d,
3033
- onChange: (T) => {
3034
- _(T), O(T);
3035
- },
3036
- resetFallbackValue: p,
3037
- ...g
3038
- }
3039
- ),
3040
- /* @__PURE__ */ n.jsxs("span", { children: [
3041
- h ? `${j * 16}px` : null,
3042
- " "
3043
- ] })
3044
- ] });
3045
- }, Ba = ({
3046
- defaultUnit: o,
3047
- defaultValue: a,
3048
- onValueChange: u,
3049
- onUnitChange: l,
3050
- 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]"
3051
911
  }) => {
3052
- const [f, h] = F(!1), [v, g] = F([]), [p, j] = F(o), [_, O] = F(""), [T, k] = F(a);
3053
- G(() => {
3054
- o && j(o), O(a.toString());
3055
- }, [o, a]), G(() => {
3056
- !f && p === "arbitrary" && k(_);
3057
- }, [f]);
3058
- const ae = (A) => {
3059
- if (A !== "arbitrary" && bb?.codex?.units?.spacing?.[A]) {
3060
- const Y = bb.codex.units.spacing[A];
3061
- g(
3062
- 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)
3063
924
  );
3064
925
  } else
3065
- g([]);
3066
- h(!0);
3067
- }, de = [
926
+ i([]);
927
+ s(!0);
928
+ }, T = [
3068
929
  {
3069
- icon: /* @__PURE__ */ n.jsx(bn, {}),
930
+ icon: /* @__PURE__ */ React.createElement(Oe, null),
3070
931
  label: "Tailwind CSS Units",
3071
932
  value: "native"
3072
933
  },
3073
- { icon: /* @__PURE__ */ n.jsx(gn, {}), label: "Percentage Units", value: "percent" },
3074
- { icon: /* @__PURE__ */ n.jsx(xn, {}), label: "Grid Units", value: "grid" },
3075
- { icon: /* @__PURE__ */ n.jsx(_n, {}), label: "Screen Units", value: "screen" },
3076
- { icon: /* @__PURE__ */ n.jsx(jn, {}), label: "Pixel Units", value: "arbitrary" },
3077
- { icon: /* @__PURE__ */ n.jsx(Cn, {}), 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" }
3078
939
  ];
3079
- return /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ n.jsxs(
3080
- ot,
940
+ return /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-col items-baseline" }, /* @__PURE__ */ React.createElement(
941
+ I,
3081
942
  {
3082
- inputClassName: d,
943
+ inputClassName: n,
3083
944
  defaultValue: (
3084
945
  // Remove the "b_" prefix for grid units
3085
- p === "grid" ? _.replace("b_", "") : _
946
+ o === "grid" ? u.replace("b_", "") : u
3086
947
  ),
3087
- onClick: () => p !== "arbitrary" && ae(p),
3088
- onChange: (A) => {
3089
- O(A), u(A);
948
+ onClick: () => o !== "arbitrary" && x(o),
949
+ onChange: (b) => {
950
+ E(b), l(b);
3090
951
  },
3091
- readOnly: p !== "arbitrary",
3092
- children: [
3093
- /* @__PURE__ */ n.jsx(
3094
- ia,
3095
- {
3096
- visible: f,
3097
- position: "bottom left",
3098
- className: "w-[300px] bg-white shadow-sm",
3099
- onVisibleChange: h,
3100
- children: p === "arbitrary" ? /* @__PURE__ */ n.jsx(
3101
- la,
3102
- {
3103
- defaultValue: _,
3104
- label: "Pixel Value",
3105
- min: 0,
3106
- max: 100,
3107
- gridMode: !0,
3108
- showTooltip: !1,
3109
- allowReset: !0,
3110
- resetFallbackValue: isNaN(T.toString()) ? 0 : Number(T) / 16,
3111
- onValueChange: (A) => {
3112
- O(A), u(A);
3113
- }
3114
- }
3115
- ) : /* @__PURE__ */ n.jsx(
3116
- na,
3117
- {
3118
- className: "mt-4",
3119
- options: v.map((A) => ({
3120
- value: A,
3121
- label: p === "grid" ? A.toString().replace("b_", "") : A,
3122
- onClick: () => {
3123
- O(A), u(A);
3124
- }
3125
- })),
3126
- size: "small",
3127
- defaultPressed: _?.toString() || "",
3128
- onPressedChange: (A) => {
3129
- O(A), u(A);
3130
- }
3131
- }
3132
- )
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);
3133
975
  }
3134
- ),
3135
- /* @__PURE__ */ n.jsx(
3136
- oa,
3137
- {
3138
- className: "h-[32px]",
3139
- defaultValue: p,
3140
- options: de,
3141
- onPressedChange: (A) => {
3142
- 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);
3143
986
  }
987
+ })),
988
+ size: "small",
989
+ defaultPressed: (u == null ? void 0 : u.toString()) || "",
990
+ onPressedChange: (b) => {
991
+ E(b), l(b);
3144
992
  }
3145
- )
3146
- ]
3147
- }
3148
- ) });
3149
- }, Vt = Ut(null), Yt = () => {
3150
- const o = nt(Vt);
3151
- if (!o)
3152
- throw new Error("useModalContext must be used within a ModalProvider");
3153
- return o;
3154
- }, Wa = ({
3155
- children: o,
3156
- defaultOpen: a,
3157
- onOpenChange: u,
3158
- title: l,
3159
- className: d
3160
- }) => {
3161
- const [f, h] = F(!1);
3162
- G(() => {
3163
- h(a);
3164
- }, [a]);
3165
- const v = () => h(!0), g = () => h(!1);
3166
- return G(() => {
3167
- u(f);
3168
- }, [f, u]), /* @__PURE__ */ n.jsxs(Vt.Provider, { value: { closeModal: g, openModal: v }, children: [
3169
- Rr.map(o, (p) => Sr(p) && p.type === da ? p : null),
3170
- f && /* @__PURE__ */ n.jsx(
3171
- Pn,
993
+ }
994
+ )
995
+ ),
996
+ /* @__PURE__ */ React.createElement(
997
+ Ve,
3172
998
  {
3173
- className: W("blockbite-ui__modal bb_", d),
3174
- onRequestClose: g,
3175
- title: l,
3176
- children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
3177
- Rr.map(o, (p) => Sr(p) && p.type === ua ? p : null),
3178
- Rr.map(o, (p) => Sr(p) && p.type === fa ? p : null),
3179
- Rr.map(o, (p) => Sr(p) && p.type === ca ? p : null)
3180
- ] })
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
+ }
3181
1005
  }
3182
1006
  )
3183
- ] });
3184
- }, 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(
3185
1037
  "div",
3186
1038
  {
3187
- className: W(
1039
+ className: f(
3188
1040
  "flex flex-col space-y-1.5 text-center sm:text-left",
3189
- a
1041
+ t
3190
1042
  ),
3191
- ...u,
3192
- children: o
3193
- }
3194
- ), ca = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1043
+ ...l
1044
+ },
1045
+ e
1046
+ ), Ae = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3195
1047
  "div",
3196
1048
  {
3197
- className: W(
1049
+ className: f(
3198
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",
3199
- a
1051
+ t
3200
1052
  ),
3201
- ...u,
3202
- children: o
3203
- }
3204
- ), fa = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1053
+ ...l
1054
+ },
1055
+ e
1056
+ ), De = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3205
1057
  "div",
3206
1058
  {
3207
- className: W("text-gray-medium px-4 pb-4 text-sm", a),
3208
- ...u,
3209
- children: o
3210
- }
3211
- ), Ua = ({ children: o }) => {
3212
- const { closeModal: a } = Yt();
3213
- return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
3214
- }, da = ({ children: o }) => {
3215
- const { openModal: a } = Yt();
3216
- 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);
3217
1069
  };
3218
- function pa(o, a) {
3219
- Array.from(o.styleSheets).forEach((u) => {
1070
+ function Ge(e, t) {
1071
+ Array.from(e.styleSheets).forEach((l) => {
3220
1072
  try {
3221
- if (u.cssRules) {
3222
- const l = a.createElement("style");
3223
- Array.from(u.cssRules).forEach((d) => {
3224
- l.appendChild(a.createTextNode(d.cssText));
3225
- }), a.head.appendChild(l);
3226
- } else if (u.href) {
3227
- const l = a.createElement("link");
3228
- l.rel = "stylesheet", l.href = u.href, a.head.appendChild(l);
3229
- }
3230
- } catch (l) {
3231
- if (u.href) {
3232
- const d = a.createElement("link");
3233
- 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);
3234
1086
  } else
3235
- console.warn("Error copying styles:", l);
1087
+ console.warn("Error copying styles:", a);
3236
1088
  }
3237
1089
  });
3238
1090
  }
3239
- const Va = ({
3240
- windowInstance: o,
3241
- onClose: a,
3242
- children: u
1091
+ const vt = ({
1092
+ windowInstance: e,
1093
+ onClose: t,
1094
+ children: l
3243
1095
  }) => {
3244
- const l = Vn(() => document.createElement("div"), []);
3245
- return G(() => {
3246
- const d = o;
3247
- 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";
3248
- const f = () => {
3249
- 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);
3250
1102
  };
3251
- return d.addEventListener("beforeunload", f), () => {
3252
- d.removeEventListener("beforeunload", f);
1103
+ return n.addEventListener("beforeunload", r), () => {
1104
+ n.removeEventListener("beforeunload", r);
3253
1105
  };
3254
- }, [o]), Wt(u, l);
3255
- }, Ya = ({
3256
- children: o,
3257
- status: a = "success",
3258
- className: u
1106
+ }, [e]), D(l, a);
1107
+ }, wt = ({
1108
+ children: e,
1109
+ status: t = "success",
1110
+ className: l
3259
1111
  }) => {
3260
- const [l, d] = F(!0);
3261
- return /* @__PURE__ */ n.jsx(ne, { onClick: () => d(!1), children: l && /* @__PURE__ */ n.jsx(
3262
- Nn,
1112
+ const [a, n] = p(!0);
1113
+ return /* @__PURE__ */ React.createElement(h, { onClick: () => n(!1) }, a && /* @__PURE__ */ React.createElement(
1114
+ re,
3263
1115
  {
3264
- status: a,
3265
- className: W(u),
3266
- onRemove: () => d(!1),
3267
- children: o
3268
- }
3269
- ) });
3270
- }, za = ({
3271
- label: o,
3272
- value: a,
3273
- onChange: u,
3274
- ...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
3275
1169
  }) => {
3276
- const [d, f] = F(!1);
3277
- return /* @__PURE__ */ n.jsx(
3278
- An,
1170
+ const [n, r] = p(!1);
1171
+ return /* @__PURE__ */ React.createElement(
1172
+ ce,
3279
1173
  {
3280
- label: o,
3281
- value: a,
3282
- type: d ? "text" : "password",
3283
- suffix: /* @__PURE__ */ n.jsx(In, { variant: "control", children: /* @__PURE__ */ n.jsx(
3284
- 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,
3285
1179
  {
3286
- icon: /* @__PURE__ */ n.jsx(zn, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n.jsx(
3287
- Hn,
1180
+ icon: /* @__PURE__ */ React.createElement(q, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement(
1181
+ We,
3288
1182
  {
3289
- 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"
3290
1184
  }
3291
- ) }),
1185
+ )),
3292
1186
  label: "Show password",
3293
- onClick: () => f((h) => !h),
1187
+ onClick: () => r((s) => !s),
3294
1188
  size: "small"
3295
1189
  }
3296
- ) }),
3297
- onChange: u,
3298
- ...l
1190
+ )),
1191
+ onChange: l,
1192
+ ...a
3299
1193
  }
3300
1194
  );
3301
- }, Ha = ({
3302
- items: o,
3303
- activeId: a,
3304
- onSelect: u,
3305
- className: l
3306
- }) => /* @__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(
3307
1201
  "div",
3308
1202
  {
3309
- onClick: () => u(d.id),
3310
- className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${a === d.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`,
3311
- children: [
3312
- /* @__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() }),
3313
- /* @__PURE__ */ n.jsx("p", { className: "text-sm text-center mt-1", children: d.name })
3314
- ]
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"}`
3315
1206
  },
3316
- d.id
3317
- )) }) });
3318
- function qa(o) {
3319
- const { media: a, mediaClass: u } = o, { url: l, alt: d, sizes: f } = a;
3320
- if (f === void 0)
3321
- return /* @__PURE__ */ n.jsx("img", { src: l, alt: d, className: `bf_media ${u}` });
3322
- const { thumbnail: h, medium: v, large: g } = f, p = h || l, j = v || l, _ = g || l;
3323
- return /* @__PURE__ */ n.jsxs("picture", { className: "bf_responsive-media", children: [
3324
- p ? /* @__PURE__ */ n.jsx(
3325
- "source",
3326
- {
3327
- media: "(max-width: 768px)",
3328
- srcSet: p,
3329
- className: `bf_media ${u}`
3330
- }
3331
- ) : null,
3332
- j ? /* @__PURE__ */ n.jsx(
3333
- "source",
3334
- {
3335
- media: "(min-width: 1024px)",
3336
- srcSet: j,
3337
- className: `bf_media ${u}`
3338
- }
3339
- ) : null,
3340
- _ ? /* @__PURE__ */ n.jsx(
3341
- "source",
3342
- {
3343
- media: "(min-width: 1536px)",
3344
- srcSet: _,
3345
- className: `bf_media ${u}`
3346
- }
3347
- ) : null,
3348
- j ? /* @__PURE__ */ n.jsx("img", { src: j, alt: d, className: `bf_media ${u}` }) : null
3349
- ] });
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);
3350
1237
  }
3351
- function Ga(o) {
3352
- const { media: a, mediaClass: u } = o, { url: l } = a, d = l;
3353
- 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(
3354
1241
  "video",
3355
1242
  {
3356
- className: `bf_responsive-media ${u}`,
1243
+ className: `responsive-media ${l}`,
3357
1244
  preload: "none",
3358
1245
  playsInline: !0,
3359
1246
  controls: !0,
3360
1247
  autoPlay: !0,
3361
1248
  muted: !0,
3362
- loop: !0,
3363
- children: /* @__PURE__ */ n.jsx("source", { src: d, type: "video/mp4" })
3364
- }
1249
+ loop: !0
1250
+ },
1251
+ /* @__PURE__ */ React.createElement("source", { src: n, type: "video/mp4" })
3365
1252
  );
3366
1253
  }
3367
- const Ka = ({
3368
- children: o,
3369
- className: a = "",
3370
- height: u = "large"
3371
- }) => /* @__PURE__ */ n.jsx(
3372
- ne,
1254
+ const Lt = ({
1255
+ children: e,
1256
+ className: t = "",
1257
+ height: l = "large"
1258
+ }) => /* @__PURE__ */ React.createElement(
1259
+ h,
3373
1260
  {
3374
- className: W("scrollbar relative overflow-y-scroll", a, {
3375
- "h-[400px]": u === "large",
3376
- "h-[300px]": u === "medium",
3377
- "h-[200px]": u === "small"
3378
- }),
3379
- children: o
3380
- }
3381
- ), Ja = ({
3382
- onChange: o,
3383
- className: a,
3384
- defaultValue: u,
3385
- options: l,
3386
- label: d = "",
3387
- 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"
3388
1275
  }) => {
3389
- const [h, v] = F("");
3390
- G(() => {
3391
- v(u);
1276
+ const [s, c] = p("");
1277
+ g(() => {
1278
+ c(l);
3392
1279
  }, []);
3393
- const g = (p) => {
3394
- v(p), o && o(p);
1280
+ const i = (o) => {
1281
+ c(o), e && e(o);
3395
1282
  };
3396
- return /* @__PURE__ */ n.jsxs("div", { className: a, children: [
3397
- l && l.length > 0 && /* @__PURE__ */ n.jsx(
3398
- Dn,
3399
- {
3400
- __next40pxDefaultSize: !0,
3401
- __nextHasNoMarginBottom: !0,
3402
- label: d || "",
3403
- value: h || "",
3404
- onChange: g,
3405
- options: [{ value: "", label: "Select an option" }, ...l]
3406
- }
3407
- ),
3408
- (!l || l?.length === 0) && /* @__PURE__ */ n.jsx("p", { className: "mb-2", children: f })
3409
- ] });
3410
- }, { select: va, dispatch: ma } = wp.data, Xa = ({
3411
- 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"
3412
1296
  }) => {
3413
- const a = () => {
3414
- const u = va("core/block-editor").getSelectedBlock(), { clientId: l, innerBlocks: d } = u, f = d[d.length - 1], h = qn(
3415
- f.name,
3416
- f.attributes,
3417
- 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
3418
1302
  );
3419
- ma("core/block-editor").insertBlocks(h, 0, l);
1303
+ qe("core/block-editor").insertBlocks(s, 0, a);
3420
1304
  };
3421
- return /* @__PURE__ */ n.jsx(ye, { variant: "primary", onClick: () => a(), children: o });
3422
- }, Za = ({ children: o, watch: a, className: u }) => {
3423
- const [l, d] = F(0);
3424
- 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(() => {
3425
1309
  setTimeout(() => {
3426
- d(1);
1310
+ n(1);
3427
1311
  }, 250);
3428
- }, [a]), /* @__PURE__ */ n.jsx(
3429
- ne,
1312
+ }, [t]), /* @__PURE__ */ React.createElement(
1313
+ h,
3430
1314
  {
3431
- className: W(
3432
- u,
1315
+ className: f(
1316
+ l,
3433
1317
  "duration-50 transform transition-all ease-in-out",
3434
1318
  {
3435
- "translate-x-0": l === 1,
3436
- "-translate-x-full": l === 0
1319
+ "translate-x-0": a === 1,
1320
+ "-translate-x-full": a === 0
3437
1321
  }
3438
- ),
3439
- children: o
3440
- }
1322
+ )
1323
+ },
1324
+ e
3441
1325
  );
3442
- }, Qa = ({ className: o, defaultValue: a }) => {
3443
- const [u, l] = F(!1);
3444
- return G(() => {
1326
+ }, Ht = ({ className: e, defaultValue: t }) => {
1327
+ const [l, a] = p(!1);
1328
+ return g(() => {
3445
1329
  setTimeout(() => {
3446
- l(!1);
3447
- }, 500), a && l(!0);
3448
- }, [u, a]), u && /* @__PURE__ */ n.jsx($n, { className: W(o) });
3449
- }, st = Ut(null), ha = ({
3450
- children: o,
3451
- defaultValue: a,
3452
- value: u,
3453
- onValueChange: l,
3454
- ...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
3455
1339
  }) => {
3456
- const f = u !== void 0, [h, v] = F(a || ""), j = {
3457
- activeTab: f ? u : h,
3458
- setActiveTab: (_) => {
3459
- 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);
3460
1344
  }
3461
1345
  };
3462
- return /* @__PURE__ */ n.jsx(st.Provider, { value: j, children: /* @__PURE__ */ n.jsx(ne, { important: !0, className: d.className, children: o }) });
3463
- }, ya = ({
3464
- options: o,
3465
- children: a,
3466
- className: u,
3467
- 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
3468
1352
  }) => {
3469
- const d = nt(st), f = l || d?.setActiveTab;
3470
- return /* @__PURE__ */ n.jsx(
3471
- Fn,
1353
+ const n = V(Z), r = a || (n == null ? void 0 : n.setActiveTab);
1354
+ return /* @__PURE__ */ React.createElement(
1355
+ me,
3472
1356
  {
3473
- className: W("tabs-list", u),
3474
- tabs: o,
3475
- onSelect: (h) => {
3476
- f(h);
3477
- },
3478
- children: () => a
3479
- }
1357
+ className: f("tabs-list", l),
1358
+ tabs: e,
1359
+ onSelect: (s) => {
1360
+ r(s);
1361
+ }
1362
+ },
1363
+ () => t
3480
1364
  );
3481
- }, ba = ({
3482
- value: o,
3483
- children: a,
3484
- className: u
3485
- }) => nt(st)?.activeTab === o ? /* @__PURE__ */ n.jsx(ne, { className: u, children: a }) : null, eo = {
3486
- Wrapper: ha,
3487
- List: ya,
3488
- Content: ba
3489
- }, ro = ({
3490
- children: o,
3491
- onClick: a,
3492
- color: u = "blue",
1365
+ }, Je = ({
1366
+ value: e,
1367
+ children: t,
3493
1368
  className: l
3494
- }) => /* @__PURE__ */ n.jsx("button", { onClick: a, children: /* @__PURE__ */ n.jsx("div", { color: u, className: W(l), children: o }) }), to = ({
3495
- onChange: o,
3496
- defaultValue: a,
3497
- children: u
3498
- }) => /* @__PURE__ */ n.jsxs(ne, { className: "blockbite-ui__text-control-label flex items-center", children: [
3499
- /* @__PURE__ */ n.jsxs("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black", children: [
3500
- /* @__PURE__ */ n.jsx(
3501
- rt,
3502
- {
3503
- __next40pxDefaultSize: !0,
3504
- __nextHasNoMarginBottom: !0,
3505
- type: "text",
3506
- value: a,
3507
- onChange: o
3508
- }
3509
- ),
3510
- /* @__PURE__ */ n.jsx(Mt, { className: "absolute right-1 top-2" })
3511
- ] }),
3512
- " ",
3513
- u
3514
- ] }), 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(
3515
1395
  ({
3516
- className: o,
3517
- options: a,
3518
- defaultPressed: u,
3519
- display: l = "label",
3520
- label: d = !1,
3521
- onPressedChange: f
1396
+ className: e,
1397
+ options: t,
1398
+ defaultPressed: l,
1399
+ display: a = "label",
1400
+ label: n = !1,
1401
+ onPressedChange: r
3522
1402
  }) => {
3523
- const [h, v] = F(""), g = (p) => {
3524
- f(p);
1403
+ const [s, c] = p(""), i = (o) => {
1404
+ r(o);
3525
1405
  };
3526
- return G(() => {
3527
- v(u);
3528
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: W(o), children: /* @__PURE__ */ n.jsx(
3529
- Ln,
1406
+ return g(() => {
1407
+ c(l);
1408
+ }, [l]), /* @__PURE__ */ React.createElement(h, { className: f(e) }, /* @__PURE__ */ React.createElement(
1409
+ ue,
3530
1410
  {
3531
1411
  __next40pxDefaultSize: !0,
3532
1412
  __nextHasNoMarginBottom: !0,
3533
1413
  isBlock: !0,
3534
- value: h,
3535
- label: typeof d == "string" ? d : "",
3536
- children: a.map(
3537
- (p) => l === "icon" ? /* @__PURE__ */ n.jsx(
3538
- Mn,
3539
- {
3540
- icon: p.icon,
3541
- label: p.label,
3542
- value: p.value,
3543
- onClick: () => g(p.value)
3544
- },
3545
- `ToggleGroupControlIcon-${p.value}`
3546
- ) : /* @__PURE__ */ n.jsx(
3547
- Bn,
3548
- {
3549
- value: p.value,
3550
- label: p.label,
3551
- onClick: () => g(p.value)
3552
- },
3553
- `ToggleGroupControlOption-${p.value}`
3554
- )
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
+ }
3555
1435
  )
3556
- }
3557
- ) });
1436
+ )
1437
+ ));
3558
1438
  }
3559
- ), ao = ({
3560
- label: o,
3561
- className: a,
3562
- onChange: u,
3563
- checked: l = !1
1439
+ ), Vt = ({
1440
+ label: e,
1441
+ className: t,
1442
+ onChange: l,
1443
+ checked: a = !1
3564
1444
  // Default to false if undefined, so it's always controlled
3565
1445
  }) => {
3566
- const [d, f] = F(l);
3567
- return G(() => {
3568
- f(l);
3569
- }, [l]), /* @__PURE__ */ n.jsx(ne, { className: W(a, "flex items-center gap-2"), children: /* @__PURE__ */ n.jsx(
3570
- Wn,
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,
3571
1451
  {
3572
- checked: d,
3573
- label: o,
3574
- onChange: (h) => {
3575
- f(h), u && u(h);
1452
+ checked: n,
1453
+ label: e,
1454
+ onChange: (s) => {
1455
+ r(s), l && l(s);
3576
1456
  }
3577
1457
  }
3578
- ) });
1458
+ ));
3579
1459
  };
3580
1460
  export {
3581
- Sa as AutocompleteDropdown,
3582
- aa as Badge,
3583
- ka as BitePreview,
3584
- Ta as Button,
3585
- ta as ButtonToggle,
3586
- na as ButtonToggleGroup,
3587
- Oa as Chapter,
3588
- Pa as ChapterDivider,
3589
- Na as Checkbox,
3590
- Aa as DataItemList,
3591
- Ia as DisappearingMessage,
3592
- oa as DropdownPicker,
3593
- Da as EmptyState,
3594
- $a as FloatingPanel,
3595
- Fa as FocalPointControl,
3596
- Ke as Icon,
3597
- La as LinkPicker,
3598
- Ma as MediaPicker,
3599
- Ba as MetricsControl,
3600
- Wa as Modal,
3601
- Ua as ModalClose,
3602
- fa as ModalContent,
3603
- ca as ModalFooter,
3604
- ua as ModalHeader,
3605
- da as ModalTrigger,
3606
- Va as NewWindowPortal,
3607
- Ya as Notice,
3608
- za as PasswordInput,
3609
- ia as Popover,
3610
- Ha as ProjectsNavigation,
3611
- la as RangeSlider,
3612
- qa as ResponsiveImage,
3613
- Ga as ResponsiveVideo,
3614
- Ka as ScrollList,
3615
- Ja as SelectControlWrapper,
3616
- Xa as SingleBlockTypeAppender,
3617
- Za as SlideIn,
3618
- Qa as Spinner,
3619
- eo as Tabs,
3620
- ba as TabsContent,
3621
- ya as TabsList,
3622
- ha as TabsWrapper,
3623
- ro as Tag,
3624
- ot as TextControl,
3625
- to as TextControlLabel,
3626
- no as ToggleGroup,
3627
- ao as ToggleSwitch,
3628
- ne as Wrap,
3629
- Yt 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
3630
1510
  };
3631
1511
  //# sourceMappingURL=index.js.map