UNPKG

react-be-ui

Version:

React 전용 UI 컴포넌트 라이브러리

1,630 lines 144 kB
import * as _ from "react"; import de, { useState as X, useRef as fe, useEffect as re, useMemo as ee, Children as qn, isValidElement as Un, useCallback as Fe, useLayoutEffect as rn } from "react"; import * as sn from "react-dom"; import _e from "react-dom"; function zn(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Ie = { exports: {} }, Te = {}; /** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var jt; function Hn() { if (jt) return Te; jt = 1; var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment"); function r(n, s, o) { var i = null; if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) { o = {}; for (var a in s) a !== "key" && (o[a] = s[a]); } else o = s; return s = o.ref, { $$typeof: e, type: n, key: i, ref: s !== void 0 ? s : null, props: o }; } return Te.Fragment = t, Te.jsx = r, Te.jsxs = r, Te; } var Ne = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ot; function Gn() { return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && function() { function e(d) { if (d == null) return null; if (typeof d == "function") return d.$$typeof === U ? null : d.displayName || d.name || null; if (typeof d == "string") return d; switch (d) { case x: return "Fragment"; case y: return "Profiler"; case E: return "StrictMode"; case v: return "Suspense"; case M: return "SuspenseList"; case B: return "Activity"; } if (typeof d == "object") switch (typeof d.tag == "number" && console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), d.$$typeof) { case b: return "Portal"; case w: return (d.displayName || "Context") + ".Provider"; case C: return (d._context.displayName || "Context") + ".Consumer"; case T: var g = d.render; return d = d.displayName, d || (d = g.displayName || g.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d; case A: return g = d.displayName || null, g !== null ? g : e(d.type) || "Memo"; case I: g = d._payload, d = d._init; try { return e(d(g)); } catch { } } return null; } function t(d) { return "" + d; } function r(d) { try { t(d); var g = !1; } catch { g = !0; } if (g) { g = console; var j = g.error, P = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object"; return j.call( g, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", P ), t(d); } } function n(d) { if (d === x) return "<>"; if (typeof d == "object" && d !== null && d.$$typeof === I) return "<...>"; try { var g = e(d); return g ? "<" + g + ">" : "<...>"; } catch { return "<...>"; } } function s() { var d = G.A; return d === null ? null : d.getOwner(); } function o() { return Error("react-stack-top-frame"); } function i(d) { if (Y.call(d, "key")) { var g = Object.getOwnPropertyDescriptor(d, "key").get; if (g && g.isReactWarning) return !1; } return d.key !== void 0; } function a(d, g) { function j() { Q || (Q = !0, console.error( "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", g )); } j.isReactWarning = !0, Object.defineProperty(d, "key", { get: j, configurable: !0 }); } function c() { var d = e(this.type); return F[d] || (F[d] = !0, console.error( "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release." )), d = this.props.ref, d !== void 0 ? d : null; } function l(d, g, j, P, R, k, D, S) { return j = k.ref, d = { $$typeof: m, type: d, key: g, props: k, _owner: R }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(d, "ref", { enumerable: !1, get: c }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: 0 }), Object.defineProperty(d, "_debugInfo", { configurable: !1, enumerable: !1, writable: !0, value: null }), Object.defineProperty(d, "_debugStack", { configurable: !1, enumerable: !1, writable: !0, value: D }), Object.defineProperty(d, "_debugTask", { configurable: !1, enumerable: !1, writable: !0, value: S }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d; } function u(d, g, j, P, R, k, D, S) { var O = g.children; if (O !== void 0) if (P) if (Z(O)) { for (P = 0; P < O.length; P++) p(O[P]); Object.freeze && Object.freeze(O); } else console.error( "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead." ); else p(O); if (Y.call(g, "key")) { O = e(d); var W = Object.keys(g).filter(function(ne) { return ne !== "key"; }); P = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", z[O + P] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error( `A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, P, O, W, O ), z[O + P] = !0); } if (O = null, j !== void 0 && (r(j), O = "" + j), i(g) && (r(g.key), O = "" + g.key), "key" in g) { j = {}; for (var q in g) q !== "key" && (j[q] = g[q]); } else j = g; return O && a( j, typeof d == "function" ? d.displayName || d.name || "Unknown" : d ), l( d, O, k, R, s(), j, D, S ); } function p(d) { typeof d == "object" && d !== null && d.$$typeof === m && d._store && (d._store.validated = 1); } var h = de, m = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), w = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), G = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, Z = Array.isArray, H = console.createTask ? console.createTask : function() { return null; }; h = { "react-stack-bottom-frame": function(d) { return d(); } }; var Q, F = {}, V = h["react-stack-bottom-frame"].bind( h, o )(), $ = H(n(o)), z = {}; Ne.Fragment = x, Ne.jsx = function(d, g, j, P, R) { var k = 1e4 > G.recentlyCreatedOwnerStacks++; return u( d, g, j, !1, P, R, k ? Error("react-stack-top-frame") : V, k ? H(n(d)) : $ ); }, Ne.jsxs = function(d, g, j, P, R) { var k = 1e4 > G.recentlyCreatedOwnerStacks++; return u( d, g, j, !0, P, R, k ? Error("react-stack-top-frame") : V, k ? H(n(d)) : $ ); }; }()), Ne; } var $t; function Xn() { return $t || ($t = 1, process.env.NODE_ENV === "production" ? Ie.exports = Hn() : Ie.exports = Gn()), Ie.exports; } var f = Xn(); const Jn = ({ children: e, onClick: t = () => { }, ...r }) => { const { selected: n, contentText: s, brand: o, state: i, color: a, light: c = !1, text: l, border: u, disabled: p, fluid: h, round: m, size: b, compact: x, outline: E, icon: y, withIcon: C, iconPos: w = "left", badge: T, badgeOption: v = "primary", link: M, linkTarget: A = "_self" } = r, I = [ o, i, b, a && (c ? `${a}-light` : a), n && "selected", l && "text", u && "border", p && "disabled", h && "fluid", m && "round", x && "compact", E && "outline", y && "icon", T && "badge", M && "link" ].filter((U) => !!U).join(" "), B = (U) => { p || t(U); }; return /* @__PURE__ */ f.jsxs( "button", { className: `be-button ${I}`, onClick: B, children: [ e || /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ C && (w === "left" || w === "both") && /* @__PURE__ */ f.jsx("i", { className: `icon left ${C}` }), y && !C && /* @__PURE__ */ f.jsx("i", { className: `icon ${y}` }), s && /* @__PURE__ */ f.jsx("span", { className: "button-text", children: s }), C && (w === "right" || w === "both") && /* @__PURE__ */ f.jsx("i", { className: `icon right ${C}` }), T && /* @__PURE__ */ f.jsx("div", { className: `in-badge ${v}`, children: T }) ] }), M && /* @__PURE__ */ f.jsx("a", { href: M, linkTarget: A }) ] } ); }, co = ({ children: e, buttons: t = null, border: r = !1, round: n = !1, selectIndex: s = 0 }) => { const [o, i] = X(s), a = (c) => { const l = t.findIndex((u) => u.contentText === c.target.textContent); i(l); }; return /* @__PURE__ */ f.jsx("div", { className: `be-buttons ${r ? "border" : ""} ${n ? "round" : ""}`, children: e || /* @__PURE__ */ f.jsx(f.Fragment, { children: t.map((c, l) => /* @__PURE__ */ f.jsx( Jn, { props: c, selected: o === l, onClick: a, children: c.contentText }, `btn-${l}` )) }) }); }, uo = ({ children: e, value: t = "", onChange: r = () => { }, onFocus: n = () => { }, onButtonClick: s = () => { }, ...o }) => { const { type: i = "input", inputType: a = "text", align: c = "left", status: l, placeholder: u = "입력하세요", readonly: p = !1, round: h = !1, underline: m = !1, transparent: b = !1, compact: x = !1, fluid: E = !1, iconLeft: y = null, iconRight: C = null, clear: w = !1, badge: T = null, badgeOption: v = {}, disabled: M = !1, unit: A = null, labeled: I = null, button: B = null, short: U = !1 } = o, [G, Y] = X(t), [Z, H] = X(!1), Q = fe(null); re(() => { Y(t); }, [t]); const F = ee(() => y && (C || w) ? "both" : y ? "left" : C || w ? "right" : null, [y, C, w]), V = (P) => { const R = P.target.value; Y(R), r(R); }, $ = () => { Z || (H(!0), n(!0)); }, z = () => { H(!1), n(!1); }, d = (P) => { P.stopPropagation(), Y(""), r(""); }, g = () => { s(G); }, j = [ l, p && "readonly", m && "underline", h && "round", b && "transparent", x && "compact", E && "fluid", (y || C || w) && "icon", F, T && "badge", A && "unit", M && "disabled", I && "labeled", I && (I.pos || "right"), B && "button", B && (B.pos || "right"), i === "textarea" && U ? "short" : "" ].filter((P) => !!P).join(" "); return /* @__PURE__ */ f.jsxs( "div", { className: `be-input ${j}`, "data-unit": A, children: [ y && /* @__PURE__ */ f.jsx("i", { className: `icon ${y}` }), i === "input" ? /* @__PURE__ */ f.jsx( "input", { type: a, value: G, onChange: V, placeholder: u, className: `align-${c}`, ref: Q, onClick: $, onBlur: z, readOnly: p, disabled: M } ) : /* @__PURE__ */ f.jsx( "textarea", { value: G, onChange: V, rows: 3, placeholder: u, onBlur: z, readOnly: p, disabled: M } ), w ? /* @__PURE__ */ f.jsx( "i", { className: `icon clear-btn xi-close ${G === "" ? "disabled" : ""}`, onClick: d } ) : C && !w ? /* @__PURE__ */ f.jsx("i", { className: `icon ${C}` }) : T ? /* @__PURE__ */ f.jsx("span", { className: `be-badge ${v || ""}`, children: T }) : null, I ? e || /* @__PURE__ */ f.jsx("div", { className: `label ${I.option}`, children: e || I.contents }) : B ? e || /* @__PURE__ */ f.jsx("button", { className: `be-button ${B.option}`, onClick: g, children: B.contents }) : null ] } ); }, fo = ({ children: e, value: t = 0, onChange: r = () => { }, onFocus: n = () => { }, ...s }) => { const { status: o = null, placeholder: i = "0", readonly: a = !1, underline: c = !1, round: l = !1, transparent: u = !1, compact: p = !1, fluid: h = !1, iconLeft: m = null, iconRight: b = null, step: x = 1, controller: E = "between", min: y = null, max: C = null, incIcon: w = "xi-plus", decIcon: T = "xi-minus", disabled: v = !1, width: M = null } = s, [A, I] = X(t), [B, U] = X(!1), G = fe(null); re(() => { y && t < y && I(y), C && t > C && I(C); }, [t, y, C]); const Y = ee(() => m && conRight ? "both" : m ? "left" : b ? "right" : "", [m, b]), Z = (d) => { const g = d.target.value; I(parseInt(g)), r(parseInt(g)); }, H = () => { B || (U(!0), n(!0)); }, Q = () => { U(!1), n(!1); }, F = () => { C && A + x > C || (I(A + x), r(A + x)); }, V = () => { y && A - x < y || (I(A - x), r(A - x)); }, $ = (d) => { v || (d.keyCode === 38 && F(), d.keyCode === 40 && V()); }, z = [ o, a && "readonly", c && "underline", l && "round", u && "transparent", p && "compact", h && "fluid", (m || b) && "icon", Y, v && "disabled", E ].filter((d) => !!d).join(" "); return /* @__PURE__ */ f.jsxs( "div", { className: `be-input button number ${z}`, tabIndex: "-1", style: M ? { width: `${M}px` } : {}, onKeyDown: $, children: [ e, m && /* @__PURE__ */ f.jsx("i", { className: `icon ${m}` }), /* @__PURE__ */ f.jsx( "input", { type: "number", value: A, onChange: Z, placeholder: i, ref: G, onClick: H, onBlur: Q, readOnly: a, disabled: v } ), b && /* @__PURE__ */ f.jsx("i", { className: `icon ${b}` }), /* @__PURE__ */ f.jsx("button", { className: `be-button compact icon dec ${v ? "disabled" : ""}`, onClick: V, children: /* @__PURE__ */ f.jsx("i", { className: `icon ${T}` }) }), /* @__PURE__ */ f.jsx("button", { className: `be-button compact icon inc ${v ? "disabled" : ""}`, onClick: F, children: /* @__PURE__ */ f.jsx("i", { className: `icon ${w}` }) }) ] } ); }, po = ({ children: e, ...t }) => { const { divide: r = null, md: n = null, sm: s = null, xs: o = null, justify: i = null, align: a = null, leftSide: c = null, rightSide: l = null } = t, u = [ r && `divide-${r}`, r && n && `divide-md-${n}`, r && s && `divide-sm-${s}`, r && o && `divide-xs-${o}`, i && `justify-${i}`, a && `align-${a}`, c && "left-side", l && "right-side" ].filter((p) => !!p).join(" "); return /* @__PURE__ */ f.jsx("div", { className: `be-grid ${u}`, children: e }); }, mo = ({ children: e }) => /* @__PURE__ */ f.jsx("div", { className: "rows", children: e }), ho = ({ children: e, span: t, spanName: r, offset: n, order: s, md: o, sm: i, xs: a, offset_md: c, offset_sm: l, offset_xs: u }) => { const p = [ t && `span-${t}`, r, n && `offset-${n}`, s && `order-${s}`, o && `span-md-${o}`, i && `span-sm-${i}`, a && `span-xs-${a}`, c && `offset-md-${c}`, l && `offset-sm-${l}`, u && `offset-xs-${u}` ].filter((h) => !!h).join(" "); return /* @__PURE__ */ f.jsx("div", { className: `column ${p}`, children: e }); }, vo = ({ children: e, title: t = null }) => /* @__PURE__ */ f.jsxs("div", { className: "be-form", children: [ t && /* @__PURE__ */ f.jsx("div", { className: "header", children: /* @__PURE__ */ f.jsx("div", { className: "title", children: t }) }), e ] }), go = ({ children: e, ...t }) => { const { divide: r = null, md: n = null, sm: s = null, xs: o = null, justify: i = null, align: a = null, leftSide: c = null, rightSide: l = null } = t, u = [ r && `divide-${r}`, r && n && `divide-md-${n}`, r && s && `divide-sm-${s}`, r && o && `divide-xs-${o}`, i && `justify-${i}`, a && `align-${a}`, c && "left-side", l && "right-side" ].filter((p) => !!p).join(" "); return /* @__PURE__ */ f.jsx("div", { className: `fields ${u}`, children: e }); }, xo = ({ children: e, fieldLabel: t = null, inline: r = !1, short: n = !1, disabled: s = !1 }) => /* @__PURE__ */ f.jsxs( "div", { className: `field ${r ? "inline" : ""} ${s ? "disabled" : ""} ${n ? "short" : ""}`, children: [ t && /* @__PURE__ */ f.jsx("label", { children: t }), e ] } ), bo = ({ children: e, ...t }) => { const { contents: r = "", brand: n = null, state: s = null, color: o = null, mark: i = !1, shadow: a = !0, align: c = "center", icon: l = null } = t, u = [ n, s, o, i && "mark", a && "shadow", c && `align-${c}`, l && "icon" ].filter(Boolean).join(" "); return /* @__PURE__ */ f.jsx("div", { className: `be-badge ${u}`, children: e || /* @__PURE__ */ f.jsx(f.Fragment, { children: l ? /* @__PURE__ */ f.jsx("i", { className: `icon ${l}` }) : r }) }); }, yt = ({ children: e, onChange: t = () => { }, ...r }) => { const { labelText: n = "", type: s = "checkbox", inputType: o = "checkbox", group: i = "", name: a = "", indeter: c = !1, checked: l = !1 } = r, [u, p] = X(l); re(() => { p(l); }, [l]); const h = [ s, c && "indeter" ].filter((b) => !!b).join(" "), m = (b) => { const x = b.target.checked; p(x), t(a, x); }; return /* @__PURE__ */ f.jsxs("div", { className: `be-checkbox ${h} ${u ? "checked" : ""}`, children: [ /* @__PURE__ */ f.jsx("label", { htmlFor: a, children: e || n }), /* @__PURE__ */ f.jsx( "input", { name: s === "radio" ? i : a, id: a, type: o, onChange: m, checked: u } ) ] }); }, yo = ({ children: e, onChange: t = () => { }, // { name, label, state } checkboxList: r = [], checkedList: n = [] }) => { const [s, o] = X(n), i = (a, c) => { const l = new Set(s); c ? l.add(a) : l.delete(a), o([...l]), t([...l]); }; return /* @__PURE__ */ f.jsx("div", { className: "be-checkbox-group", children: e || /* @__PURE__ */ f.jsx(f.Fragment, { children: r.map((a) => /* @__PURE__ */ f.jsx( yt, { name: a.name, onChange: i, checked: s.includes(a.name), children: a.label || a.name }, a.name )) }) }); }, Eo = ({ children: e, onChange: t = () => { }, group: r = "", radioList: n = [], selectedValue: s = "" }) => { const [o, i] = X(s), a = (c, l) => { l && (i(c), t(c)); }; return /* @__PURE__ */ f.jsx("div", { className: "be-radio", children: e || /* @__PURE__ */ f.jsx(f.Fragment, { children: n.map((c) => /* @__PURE__ */ f.jsx( yt, { type: "radio", inputType: "radio", name: c.name, group: r, checked: o === c.name, onChange: a, children: c.label || c.name }, c.name )) }) }); }, Kn = { success: "xi-check-circle", info: "xi-info", error: "xi-emoticon-devil", danger: "xi-emoticon-devil", attention: "xi-warning", importance: "xi-star" }, wo = ({ children: e, onClick: t = () => { }, ...r }) => { const { title: n = "", contents: s = "", icon: o = !1, state: i = null, selected: a = !1, disabled: c = !1 } = r, l = [ o && "icon", i, a && "selected", c && "disabled" ].filter((h) => !!h).join(" "), u = ee(() => i ? Kn[i] : o, [i, o]), p = (h) => { t(h); }; return /* @__PURE__ */ f.jsxs("div", { className: `be-message ${l}`, onClick: p, children: [ o && /* @__PURE__ */ f.jsx("i", { className: `icon ${u}` }), e || /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ /* @__PURE__ */ f.jsx("div", { className: "title", children: n }), s && /* @__PURE__ */ f.jsx("div", { className: "contents", children: s }) ] }) ] }); }, Co = ({ children: e, onClick: t = () => { }, ...r }) => { const { title: n = "", contents: s = "", border: o = !1, toggleIcon: i = "xi-angle-down", iconPos: a = "left", open: c = !1, collapse: l = !1, // maxHeight = 200, maxLine: u = 5 } = r, [p, h] = X(c), m = [ o && "border", l && "collapse", i && "icon", a ].filter((x) => !!x).join(" "), b = () => { const x = !p; h(x), t(x); }; return /* @__PURE__ */ f.jsxs("div", { className: `be-panel ${m} ${p ? "open" : ""}`, children: [ /* @__PURE__ */ f.jsxs("div", { className: "panel-header", onClick: b, children: [ /* @__PURE__ */ f.jsx("div", { className: "title", children: n }), l && i && /* @__PURE__ */ f.jsx("i", { className: `icon ${i}` }) ] }), /* @__PURE__ */ f.jsx("div", { className: "panel-content", style: { "--max-height": `${u * 1.5 + 1}em` }, children: /* @__PURE__ */ f.jsx("div", { className: "content-wrapper", children: e || s }) }) ] }); }, Ro = ({ children: e, onChange: t = () => { }, ...r }) => { const { type: n = "slide", inside: s = !1, round: o = !1, onText: i = "ON", offText: a = "OFF", color: c = null, checked: l = !1, disabled: u = !1 } = r, [p, h] = X(l), m = [ n, s && "inside", o && "round", c, u && "disabled" ].filter((x) => !!x).join(" "), b = () => { const x = !p; h(x), t(x); }; return /* @__PURE__ */ f.jsxs("div", { className: `be-switch ${m}`, onClick: b, children: [ /* @__PURE__ */ f.jsx( "input", { type: "checkbox", onChange: b, checked: p } ), n === "slide" ? /* @__PURE__ */ f.jsx("div", { className: "switch" }) : /* @__PURE__ */ f.jsx(f.Fragment, { children: e || /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ /* @__PURE__ */ f.jsx("span", { className: `on ${p && "active"}`, children: i }), /* @__PURE__ */ f.jsx("span", { className: `off ${!p && "active"}`, children: a }) ] }) }) ] }); }, So = ({ children: e, onSelect: t = () => { }, onSelectColumn: r, ...n }) => { const { columns: s = [], values: o = [], headAlign: i = "center", useFoot: a = !1, border: c = !1, gridType: l = null, divideNum: u = 3, selection: p = !1, striped: h = null } = n, m = ee(() => l === "divide" ? `divide-${u}` : l, [l, u]), b = [ c && "border", p && "selection", h && `striped ${h}`, m ].filter((E) => !!E).join(" "), x = (E) => { p && t(E, o[E]); }; return /* @__PURE__ */ f.jsx("table", { className: `be-table ${b}`, children: e || /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ /* @__PURE__ */ f.jsx("thead", { className: `align-${i}`, children: /* @__PURE__ */ f.jsx("tr", { children: s.map((E) => /* @__PURE__ */ f.jsx("th", { className: `align-${i}`, children: E.name }, E.key)) }) }), /* @__PURE__ */ f.jsx("tbody", { children: o.map((E, y) => /* @__PURE__ */ f.jsx("tr", { className: "", onClick: () => x(y), children: s.map((C) => /* @__PURE__ */ f.jsx("td", { className: `align-${C.align || "center"} col-${C.col}`, children: /* @__PURE__ */ f.jsx("div", { className: "cell", children: E[C.key] }) }, `cell-${y}-${C.key}`)) }, `row-${y}`)) }) ] }) }); }, To = ({ children: e, onClick: t = () => { }, ...r }) => { const { type: n = "label", // line, dot color: s = null, light: o = !1, round: i = !1, icon: a = null, iconPos: c = null, // 'right' pointDirect: l = "up", disabled: u = !1 } = r, p = [ n, s, o && "light", i && "round", a && "icon", n === "pointing" && l, u && "disabled" ].filter(Boolean).join(" "), h = (m) => { u || t(m); }; return /* @__PURE__ */ f.jsxs( "span", { className: `be-tag ${p}`, onClick: h, children: [ a && c !== "right" && /* @__PURE__ */ f.jsx("i", { className: `icon ${c} ${a}` }), (n === "label" || n === "pointing") && e, a && c === "right" && /* @__PURE__ */ f.jsx("i", { className: `icon right ${a}` }) ] } ); }, No = ({ children: e, surf: t, border: r, float: n, align: s = "left", round: o = "l" }) => { const i = [ t && "surface", r && "border", n && "float", s && `align-${s}`, `round-${o}` ].filter((a) => !!a).join(" "); return /* @__PURE__ */ f.jsx("div", { className: `be-segment ${i}`, children: /* @__PURE__ */ f.jsx("div", { className: "contents", children: e }) }); }, Xe = (e, t) => { const r = {}; return qn.forEach(e, (n) => { if (Un(n)) { const s = n.props.name; s && t.includes(s) && (r[s] = n.props.children); } }), r; }, jo = ({ children: e, title: t, surf: r, border: n = !0, float: s, align: o, round: i = "l" }) => { const a = Xe(e, ["image", "header", "contents", "extra", "footer"]), c = [ r && "surface", n && "border", s && "float", o && `align-${o}`, `round-${i}`, a.header || a.footer && "atteched" ].filter((l) => !!l).join(" "); return /* @__PURE__ */ f.jsxs("div", { className: `be-card ${c}`, children: [ a.header && /* @__PURE__ */ f.jsx("div", { className: "header", children: a.header }), a.image && /* @__PURE__ */ f.jsx("div", { className: "image", children: a.image }), a.contents ? /* @__PURE__ */ f.jsxs("div", { className: "contents", children: [ t && /* @__PURE__ */ f.jsx("div", { className: "title", children: t }), a.contents ] }) : e, a.extra && /* @__PURE__ */ f.jsx("div", { className: "extra", children: a.extra }), a.footer && /* @__PURE__ */ f.jsx("div", { className: "footer", children: a.footer }) ] }); }, Oo = ({ children: e, onChange: t = () => { }, options: r = [], selection: n = !1, selectedType: s = "bg", icon: o = !1, image: i = !1, border: a = !1, itemClass: c = "" }) => { const [l, u] = X(null), p = [ n && "selection", a && "border", s ].filter((m) => !!m).join(" "), h = (m) => { u(m), t(m); }; return /* @__PURE__ */ f.jsx("div", { className: `be-list ${p}`, children: e || /* @__PURE__ */ f.jsx(f.Fragment, { children: r.map((m) => /* @__PURE__ */ f.jsxs( "div", { className: `item ${c} ${l && l.option === m.option ? "selected" : ""}`, onClick: () => h(m), children: [ i ? /* @__PURE__ */ f.jsx("div", { className: "item-img", children: m.image && /* @__PURE__ */ f.jsx("img", { src: m.image, alt: m.option }) }) : o ? /* @__PURE__ */ f.jsx("i", { className: `icon list-icon ${m.icon}` }) : null, /* @__PURE__ */ f.jsxs("div", { className: "item-title", children: [ m.option, m.sub && /* @__PURE__ */ f.jsx("div", { className: "sub-title", children: m.sub }) ] }) ] }, m.id || m.option )) }) }); }, $o = ({ onChange: e = () => { }, type: t = "number", ...r }) => { const { round: n = !1, compact: s = !1, border: o = !1, align: i = "left", limits: a = 5, currentPage: c = 1, pageLength: l = 1, itemClass: u = "", ellipsis: p = !1, color: h = null, firstText: m = "F", lastText: b = "L", activeType: x = "button" } = r, E = fe(null), [y, C] = X(c), [w, T] = X(l), v = ee(() => l <= a || !a, [l, a]), M = ee(() => Math.max(y - Math.ceil(a * 0.5) + 1, 1), [y, a]), A = ee(() => y > Math.floor(a / 2) + 2 && a < w, [y, a, w]), I = ee(() => y <= w - a && a < w, [y, a, w]), B = ee(() => y - 1 <= 0, [y]), U = ee(() => y + 1 > w, [y, w]), G = ee(() => { let $, z; if (v) z = new Array(l).fill(1).map((d, g) => d + g); else if (p) { $ = 2; const d = Math.floor(a / 2); A && ($ = y - d), !I && A && ($ = w - a), z = new Array(a).fill($).map((g, j) => g + j); } else $ = Math.min(M, l - a + 1), z = new Array(a).fill($).map((d, g) => d + g); return z; }, [v, l, p, a, w, y, A, I, M]); re(() => { E.current.focus(), T(l); }, [l]); const Y = ($) => { $ > w || $ <= 0 || (C($), e($)); }, Z = () => { B || Y(y - 1); }, H = () => { U || Y(y + 1); }, Q = () => { const $ = y - a <= 0 ? y - 1 : y - a; Y($); }, F = () => { const $ = y + a > w ? y + 1 : y + a; Y($); }, V = [ t, x, o && "border", n && "round", s && "compact", i && `align-${i}`, h ].filter(($) => !!$).join(" "); return /* @__PURE__ */ f.jsxs("div", { className: `be-pagination ${V}`, ref: E, tabIndex: -1, children: [ !p && !v && /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-nav first ${B && "disabled"}`, onClick: () => Y(1), children: m.indexOf("xi") > -1 ? /* @__PURE__ */ f.jsx("i", { className: m }) : m } ), /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-nav prev ${B && "disabled"}`, onClick: Z, children: /* @__PURE__ */ f.jsx("i", { className: "xi-angle-left" }) } ), p && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-num ${y === 1 && "active"}`, onClick: () => Y(1), children: "1" } ), A && /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-num`, onClick: Q, children: /* @__PURE__ */ f.jsx("i", { className: "xi-ellipsis-h" }) } ) ] }), /* @__PURE__ */ f.jsx("div", { className: "pagination-page-wrapper", children: /* @__PURE__ */ f.jsx( Zn, { type: t, itemClass: u, pageList: G, current: y, last: w, onClick: Y } ) }), p && a < l && /* @__PURE__ */ f.jsxs(f.Fragment, { children: [ I && /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-nav`, onClick: F, children: /* @__PURE__ */ f.jsx("i", { className: "xi-ellipsis-h" }) } ), /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-num ${w === y && "active"}`, onClick: () => Y(w), children: w } ) ] }), /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-nav next ${U && "disabled"}`, onClick: H, children: /* @__PURE__ */ f.jsx("i", { className: "xi-angle-right" }) } ), !p && !v && /* @__PURE__ */ f.jsx( "div", { className: `${u} pagination-nav last ${U && "disabled"}`, onClick: () => Y(w), children: b.indexOf("xi") > -1 ? /* @__PURE__ */ f.jsx("i", { className: b }) : b } ) ] }); }; function Zn({ type: e, itemClass: t, pageList: r, current: n, onClick: s, last: o }) { return e === "page" ? /* @__PURE__ */ f.jsxs("div", { className: "pagination-info", children: [ /* @__PURE__ */ f.jsx("div", { className: "pagination-nav current", children: n }), /* @__PURE__ */ f.jsx("span", { className: "slash", children: "/" }), /* @__PURE__ */ f.jsx("div", { className: "pagination-nav last", children: o }) ] }) : r && r.map((i) => /* @__PURE__ */ f.jsx( "div", { className: `${t} pagination-num ${i === n && "active"}`, onClick: () => s(i), children: i }, i )); } const Ao = ({ onChange: e = () => { }, resultValue: t = null, ...r }) => { const { // id = null, trackType: n = "normal", min: s = 0, max: o = 100, unitText: i = null, showStep: a = !1, stepSize: c = 10, showLabel: l = !1, showValue: u = !1, showTooltip: p = !1, // titleText = null, disabled: h = !1, color: m = null } = r, b = fe(null), x = fe(null), [E, y] = X(0), [C, w] = X(!1), [T, v] = X(null), [M, A] = X(null), [I, B] = X(500), U = ee(() => ({ width: `${E}px`, left: "0%" }), [E]), G = ee(() => ({ left: `${E}px` }), [E]), Y = ee(() => Math.ceil((o - s) * (E / I)) + s + i, [o, s, E, I, i]), Z = ee(() => (o - s) / c, [s, o, c]), H = ee(() => 100 / Z, [Z]), Q = Fe((R) => (R - s) / (o - s), [s, o]), F = Fe((R) => I * Q(R), [I, Q]), V = Fe(() => { t > o ? y(F(o)) : t < s ? y(F(s)) : y(F(t)); }, [t, o, s, F]), $ = (R) => { const k = M + R; return k < 0 ? 0 : k > I ? I : k; }, z = ({ target: R, pageX: k }) => { R.classList.contains("control-btn") ? (v(k), A(x.current.offsetWidth), w(!0), window.addEventListener("mousemove", g), window.addEventListener("mouseup", d)) : y($(k - T)); }, d = ({ target: R, pageX: k }) => { R.classList.contains("control-btn") && y($(k - T)), e(Y), w(!1), window.removeEventListener("mousemove", g), window.removeEventListener("mouseup", d); }, g = ({ pageX: R }) => { y($(R - T)); }, j = ({ target: R }) => { console.log(R); }; re(() => { let R; if (b.current) { const k = b.current.getBoundingClientRect(); B(k.width), v(k.left), V(), R = new ResizeObserver((D) => { for (const S of D) { const O = S.contentRect; B(O.width), V(); } }), R.observe(b.current); } return () => { R && b.current && R.disconnect(); }; }, [b, V]), re(() => { V(); }, [V]); const P = [ n, h && "disabled", l && "labeled" ].filter((R) => !!R).join(" "); return /* @__PURE__ */ f.jsxs( "div", { className: `be-slider ${P}`, ref: b, onMouseDown: z, onMouseUp: d, children: [ /* @__PURE__ */ f.jsx( "div", { className: `result-slider primary ${m && `be-${m}`}`, ref: x, style: U } ), a && Array.from({ length: Z }).map((R, k) => /* @__PURE__ */ f.jsx( "div", { className: "break-point", style: { left: `${(k + 1) * H}%` }, onClick: (D) => { D.stopPropagation(), j(); } }, k )), /* @__PURE__ */ f.jsx("div", { className: `control-btn ${C && "catching"}`, style: G, children: p && /* @__PURE__ */ f.jsx("div", { className: "tooltip", children: Y }) }), u && /* @__PURE__ */ f.jsx("div", { className: "label-text", children: /* @__PURE__ */ f.jsxs("div", { className: "current-label", style: { left: `${E}px` }, children: [ Y, i ] }) }), l && /* @__PURE__ */ f.jsxs("div", { className: "label-text", children: [ /* @__PURE__ */ f.jsxs("div", { className: "start-label", children: [ s, i ] }), /* @__PURE__ */ f.jsxs("div", { className: "end-label", children: [ o, i ] }) ] }) ] } ); }; function We() { return We = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]); } return e; }, We.apply(null, arguments); } function on(e, t) { if (e == null) return {}; var r = {}; for (var n in e) if ({}.hasOwnProperty.call(e, n)) { if (t.indexOf(n) !== -1) continue; r[n] = e[n]; } return r; } function dt(e, t) { return dt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) { return r.__proto__ = n, r; }, dt(e, t); } function an(e, t) { e.prototype = Object.create(t.prototype), e.prototype.constructor = e, dt(e, t); } var De = { exports: {} }, Me = { exports: {} }, J = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var At; function Qn() { if (At) return J; At = 1; var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119; function w(v) { if (typeof v == "object" && v !== null) { var M = v.$$typeof; switch (M) { case t: switch (v = v.type, v) { case c: case l: case n: case o: case s: case p: return v; default: switch (v = v && v.$$typeof, v) { case a: case u: case b: case m: case i: return v; default: return M; } } case r: return M; } } } function T(v) { return w(v) === l; } return J.AsyncMode = c, J.ConcurrentMode = l, J.ContextConsumer = a, J.ContextProvider = i, J.Element = t, J.ForwardRef = u, J.Fragment = n, J.Lazy = b, J.Memo = m, J.Portal = r, J.Profiler = o, J.StrictMode = s, J.Suspense = p, J.isAsyncMode = function(v) { return T(v) || w(v) === c; }, J.isConcurrentMode = T, J.isContextConsumer = function(v) { return w(v) === a; }, J.isContextProvider = function(v) { return w(v) === i; }, J.isElement = function(v) { return typeof v == "object" && v !== null && v.$$typeof === t; }, J.isForwardRef = function(v) { return w(v) === u; }, J.isFragment = function(v) { return w(v) === n; }, J.isLazy = function(v) { return w(v) === b; }, J.isMemo = function(v) { return w(v) === m; }, J.isPortal = function(v) { return w(v) === r; }, J.isProfiler = function(v) { return w(v) === o; }, J.isStrictMode = function(v) { return w(v) === s; }, J.isSuspense = function(v) { return w(v) === p; }, J.isValidElementType = function(v) { return typeof v == "string" || typeof v == "function" || v === n || v === l || v === o || v === s || v === p || v === h || typeof v == "object" && v !== null && (v.$$typeof === b || v.$$typeof === m || v.$$typeof === i || v.$$typeof === a || v.$$typeof === u || v.$$typeof === E || v.$$typeof === y || v.$$typeof === C || v.$$typeof === x); }, J.typeOf = w, J; } var K = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Pt; function er() { return Pt || (Pt = 1, process.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119; function w(N) { return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. N === n || N === l || N === o || N === s || N === p || N === h || typeof N == "object" && N !== null && (N.$$typeof === b || N.$$typeof === m || N.$$typeof === i || N.$$typeof === a || N.$$typeof === u || N.$$typeof === E || N.$$typeof === y || N.$$typeof === C || N.$$typeof === x); } function T(N) { if (typeof N == "object" && N !== null) { var ie = N.$$typeof; switch (ie) { case t: var ke = N.type; switch (ke) { case c: case l: case n: case o: case s: case p: return ke; default: var Nt = ke && ke.$$typeof; switch (Nt) { case a: case u: case b: case m: case i: return Nt; default: return ie; } } case r: return ie; } } } var v = c, M = l, A = a, I = i, B = t, U = u, G = n, Y = b, Z = m, H = r, Q = o, F = s, V = p, $ = !1; function z(N) { return $ || ($ = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), d(N) || T(N) === c; } function d(N) { return T(N) === l; } function g(N) { return T(N) === a; } function j(N) { return T(N) === i; } function P(N) { return typeof N == "object" && N !== null && N.$$typeof === t; } function R(N) { return T(N) === u; } function k(N) { return T(N) === n; } function D(N) { return T(N) === b; } function S(N) { return T(N) === m; } function O(N) { return T(N) === r; } function W(N) { return T(N) === o; } function q(N) { return T(N) === s; } function ne(N) { return T(N) === p; } K.AsyncMode = v, K.ConcurrentMode = M, K.ContextConsumer = A, K.ContextProvider = I, K.Element = B, K.ForwardRef = U, K.Fragment = G, K.Lazy = Y, K.Memo = Z, K.Portal = H, K.Profiler = Q, K.StrictMode = F, K.Suspense = V, K.isAsyncMode = z, K.isConcurrentMode = d, K.isContextConsumer = g, K.isContextProvider = j, K.isElement = P, K.isForwardRef = R, K.isFragment = k, K.isLazy = D, K.isMemo = S, K.isPortal = O, K.isProfiler = W, K.isStrictMode = q, K.isSuspense = ne, K.isValidElementType = w, K.typeOf = T; }()), K; } var kt; function ln() { return kt || (kt = 1, process.env.NODE_ENV === "production" ? Me.exports = Qn() : Me.exports = er()), Me.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var nt, _t; function tr() { if (_t) return nt; _t = 1; var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable; function n(o) { if (o == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(o); } function s() { try { if (!Object.assign) return !1; var o = new String("abc"); if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5") return !1; for (var i = {}, a = 0; a < 10; a++) i["_" + String.fromCharCode(a)] = a; var c = Object.getOwnPropertyNames(i).map(function(u) { return i[u]; }); if (c.join("") !== "0123456789") return !1; var l = {}; return "abcdefghijklmnopqrst".split("").forEach(function(u) { l[u] = u; }), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return nt = s() ? Object.assign : function(o, i) { for (var a, c = n(o), l, u = 1; u < arguments.length; u++) { a = Object(arguments[u]); for (var p in a) t.call(a, p) && (c[p] = a[p]); if (e) { l = e(a); for (var h = 0; h < l.length; h++) r.call(a, l[h]) && (c[l[h]] = a[l[h]]); } } return c; }, nt; } var rt, It; function Et() { if (It) return rt; It = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; return rt = e, rt; } var st, Dt; function cn() { return Dt || (Dt = 1, st = Function.call.bind(Object.prototype.hasOwnProperty)), st; } var ot, Mt; function nr() { if (Mt) return ot; Mt = 1; var e = function() { }; if (process.env.NODE_ENV !== "production") { var t = /* @__PURE__ */ Et(), r = {}, n = /* @__PURE__ */ cn(); e = function(o) { var i = "Warning: " + o; typeof console < "u" && console.error(i); try { throw new Error(i); } catch { } }; } function s(o, i, a, c, l) { if (process.env.NODE_ENV !== "production") { for (var u in o) if (n(o, u)) { var p; try { if (typeof o[u] != "function") { var h = Error( (c || "React class") + ": " + a + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw h.name = "Invariant Violation", h; } p = o[u](i, u, c, a, null, t); } catch (b) { p = b; } if (p && !(p instanceof Error) && e( (c || "React class") + ": type specification of " + a + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), p instanceof Error && !(p.message in r)) { r[p.message] = !0; var m = l ? l() : ""; e( "Failed " + a + " type: " + p.message + (m ?? "") ); } } } } return s.resetWarningCache = function() { process.env.NODE_ENV !== "production" && (r = {}); }, ot = s, ot; } var it, Lt; function rr() { if (Lt) return it; Lt = 1; var e = ln(), t = tr(), r = /* @__PURE__ */ Et(), n = /* @__PURE__ */ cn(), s = /* @__PURE__ */ nr(), o = function() { }; process.env.NODE_ENV !== "production" && (o = function(a) { var c = "Warning: " + a; typeof console < "u" && console.error(c); try { throw new Error(c); } catch { } }); function i() { return null; } return it = function(a, c) { var l = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator"; function p(d) { var g = d && (l && d[l] || d[u]); if (typeof g == "function") return g; } var h = "<<anonymous>>", m = { array: y("array"), bigint: y("bigint"), bool: y("boolean"), func: y("function"), number: y("number"), object: y("object"), string: y("string"), symbol: y("symbol"), any: C(), arrayOf: w, element: T(), elementType: v(), instanceOf: M, node: U(), objectOf: I, oneOf: A, oneOfType: B, shape