chop-logic-components 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import Ce from "react";
2
- var Z = { exports: {} }, A = {};
1
+ import Ae, { useState as br } from "react";
2
+ var ie = { exports: {} }, Y = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,25 +9,25 @@ var Z = { exports: {} }, A = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Oe;
13
- function fr() {
14
- if (Oe)
15
- return A;
16
- Oe = 1;
17
- var P = Ce, _ = Symbol.for("react.element"), j = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, W = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function x(E, c, O) {
19
- var p, y = {}, R = null, Y = null;
20
- O !== void 0 && (R = "" + O), c.key !== void 0 && (R = "" + c.key), c.ref !== void 0 && (Y = c.ref);
21
- for (p in c)
22
- h.call(c, p) && !$.hasOwnProperty(p) && (y[p] = c[p]);
23
- if (E && E.defaultProps)
24
- for (p in c = E.defaultProps, c)
25
- y[p] === void 0 && (y[p] = c[p]);
26
- return { $$typeof: _, type: E, key: R, ref: Y, props: y, _owner: W.current };
12
+ var Pe;
13
+ function gr() {
14
+ if (Pe)
15
+ return Y;
16
+ Pe = 1;
17
+ var _ = Ae, g = Symbol.for("react.element"), c = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, h = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function m(T, d, x) {
19
+ var v, C = {}, O = null, P = null;
20
+ x !== void 0 && (O = "" + x), d.key !== void 0 && (O = "" + d.key), d.ref !== void 0 && (P = d.ref);
21
+ for (v in d)
22
+ f.call(d, v) && !R.hasOwnProperty(v) && (C[v] = d[v]);
23
+ if (T && T.defaultProps)
24
+ for (v in d = T.defaultProps, d)
25
+ C[v] === void 0 && (C[v] = d[v]);
26
+ return { $$typeof: g, type: T, key: O, ref: P, props: C, _owner: h.current };
27
27
  }
28
- return A.Fragment = j, A.jsx = x, A.jsxs = x, A;
28
+ return Y.Fragment = c, Y.jsx = m, Y.jsxs = m, Y;
29
29
  }
30
- var I = {};
30
+ var q = {};
31
31
  /**
32
32
  * @license React
33
33
  * react-jsx-runtime.development.js
@@ -37,91 +37,91 @@ var I = {};
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
39
  */
40
- var Se;
41
- function cr() {
42
- return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
43
- var P = Ce, _ = Symbol.for("react.element"), j = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), E = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, we = "@@iterator";
44
- function Pe(e) {
40
+ var ke;
41
+ function yr() {
42
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
43
+ var _ = Ae, g = Symbol.for("react.element"), c = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), T = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), U = Symbol.iterator, G = "@@iterator";
44
+ function z(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
47
- var r = Q && e[Q] || e[we];
47
+ var r = U && e[U] || e[G];
48
48
  return typeof r == "function" ? r : null;
49
49
  }
50
- var S = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
- function f(e) {
50
+ var S = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
+ function p(e) {
52
52
  {
53
53
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
54
54
  t[n - 1] = arguments[n];
55
- je("error", e, t);
55
+ Ie("error", e, t);
56
56
  }
57
57
  }
58
- function je(e, r, t) {
58
+ function Ie(e, r, t) {
59
59
  {
60
- var n = S.ReactDebugCurrentFrame, i = n.getStackAddendum();
61
- i !== "" && (r += "%s", t = t.concat([i]));
62
- var u = t.map(function(o) {
63
- return String(o);
60
+ var n = S.ReactDebugCurrentFrame, o = n.getStackAddendum();
61
+ o !== "" && (r += "%s", t = t.concat([o]));
62
+ var s = t.map(function(i) {
63
+ return String(i);
64
64
  });
65
- u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
65
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
66
66
  }
67
67
  }
68
- var xe = !1, ke = !1, De = !1, Fe = !1, Ae = !1, ee;
69
- ee = Symbol.for("react.module.reference");
70
- function Ie(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === h || e === $ || Ae || e === W || e === O || e === p || Fe || e === Y || xe || ke || De || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === y || e.$$typeof === x || e.$$typeof === E || e.$$typeof === c || // This needs to include all possible module reference object
68
+ var $e = !1, Ne = !1, We = !1, Le = !1, Ye = !1, oe;
69
+ oe = Symbol.for("react.module.reference");
70
+ function qe(e) {
71
+ return !!(typeof e == "string" || typeof e == "function" || e === f || e === R || Ye || e === h || e === x || e === v || Le || e === P || $e || Ne || We || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === C || e.$$typeof === m || e.$$typeof === T || e.$$typeof === d || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
- e.$$typeof === ee || e.getModuleId !== void 0));
75
+ e.$$typeof === oe || e.getModuleId !== void 0));
76
76
  }
77
- function We(e, r, t) {
77
+ function Me(e, r, t) {
78
78
  var n = e.displayName;
79
79
  if (n)
80
80
  return n;
81
- var i = r.displayName || r.name || "";
82
- return i !== "" ? t + "(" + i + ")" : t;
81
+ var o = r.displayName || r.name || "";
82
+ return o !== "" ? t + "(" + o + ")" : t;
83
83
  }
84
- function re(e) {
84
+ function se(e) {
85
85
  return e.displayName || "Context";
86
86
  }
87
- function g(e) {
87
+ function j(e) {
88
88
  if (e == null)
89
89
  return null;
90
- if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
90
+ if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
91
91
  return e.displayName || e.name || null;
92
92
  if (typeof e == "string")
93
93
  return e;
94
94
  switch (e) {
95
- case h:
95
+ case f:
96
96
  return "Fragment";
97
- case j:
97
+ case c:
98
98
  return "Portal";
99
- case $:
99
+ case R:
100
100
  return "Profiler";
101
- case W:
101
+ case h:
102
102
  return "StrictMode";
103
- case O:
103
+ case x:
104
104
  return "Suspense";
105
- case p:
105
+ case v:
106
106
  return "SuspenseList";
107
107
  }
108
108
  if (typeof e == "object")
109
109
  switch (e.$$typeof) {
110
- case E:
110
+ case T:
111
111
  var r = e;
112
- return re(r) + ".Consumer";
113
- case x:
112
+ return se(r) + ".Consumer";
113
+ case m:
114
114
  var t = e;
115
- return re(t._context) + ".Provider";
116
- case c:
117
- return We(e, e.render, "ForwardRef");
118
- case y:
115
+ return se(t._context) + ".Provider";
116
+ case d:
117
+ return Me(e, e.render, "ForwardRef");
118
+ case C:
119
119
  var n = e.displayName || null;
120
- return n !== null ? n : g(e.type) || "Memo";
121
- case R: {
122
- var i = e, u = i._payload, o = i._init;
120
+ return n !== null ? n : j(e.type) || "Memo";
121
+ case O: {
122
+ var o = e, s = o._payload, i = o._init;
123
123
  try {
124
- return g(o(u));
124
+ return j(i(s));
125
125
  } catch {
126
126
  return null;
127
127
  }
@@ -129,18 +129,18 @@ function cr() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var m = Object.assign, k = 0, te, ne, ae, oe, ie, ue, se;
133
- function le() {
132
+ var k = Object.assign, N = 0, ue, le, ce, fe, de, ve, pe;
133
+ function _e() {
134
134
  }
135
- le.__reactDisabledLog = !0;
136
- function $e() {
135
+ _e.__reactDisabledLog = !0;
136
+ function Ue() {
137
137
  {
138
- if (k === 0) {
139
- te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, se = console.groupEnd;
138
+ if (N === 0) {
139
+ ue = console.log, le = console.info, ce = console.warn, fe = console.error, de = console.group, ve = console.groupCollapsed, pe = console.groupEnd;
140
140
  var e = {
141
141
  configurable: !0,
142
142
  enumerable: !0,
143
- value: le,
143
+ value: _e,
144
144
  writable: !0
145
145
  };
146
146
  Object.defineProperties(console, {
@@ -153,254 +153,254 @@ function cr() {
153
153
  groupEnd: e
154
154
  });
155
155
  }
156
- k++;
156
+ N++;
157
157
  }
158
158
  }
159
- function Ye() {
159
+ function Ve() {
160
160
  {
161
- if (k--, k === 0) {
161
+ if (N--, N === 0) {
162
162
  var e = {
163
163
  configurable: !0,
164
164
  enumerable: !0,
165
165
  writable: !0
166
166
  };
167
167
  Object.defineProperties(console, {
168
- log: m({}, e, {
169
- value: te
168
+ log: k({}, e, {
169
+ value: ue
170
170
  }),
171
- info: m({}, e, {
172
- value: ne
171
+ info: k({}, e, {
172
+ value: le
173
173
  }),
174
- warn: m({}, e, {
175
- value: ae
174
+ warn: k({}, e, {
175
+ value: ce
176
176
  }),
177
- error: m({}, e, {
178
- value: oe
177
+ error: k({}, e, {
178
+ value: fe
179
179
  }),
180
- group: m({}, e, {
181
- value: ie
180
+ group: k({}, e, {
181
+ value: de
182
182
  }),
183
- groupCollapsed: m({}, e, {
184
- value: ue
183
+ groupCollapsed: k({}, e, {
184
+ value: ve
185
185
  }),
186
- groupEnd: m({}, e, {
187
- value: se
186
+ groupEnd: k({}, e, {
187
+ value: pe
188
188
  })
189
189
  });
190
190
  }
191
- k < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
+ N < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
192
  }
193
193
  }
194
- var N = S.ReactCurrentDispatcher, B;
195
- function L(e, r, t) {
194
+ var X = S.ReactCurrentDispatcher, H;
195
+ function V(e, r, t) {
196
196
  {
197
- if (B === void 0)
197
+ if (H === void 0)
198
198
  try {
199
199
  throw Error();
200
- } catch (i) {
201
- var n = i.stack.trim().match(/\n( *(at )?)/);
202
- B = n && n[1] || "";
200
+ } catch (o) {
201
+ var n = o.stack.trim().match(/\n( *(at )?)/);
202
+ H = n && n[1] || "";
203
203
  }
204
204
  return `
205
- ` + B + e;
205
+ ` + H + e;
206
206
  }
207
207
  }
208
- var J = !1, V;
208
+ var Q = !1, B;
209
209
  {
210
- var Le = typeof WeakMap == "function" ? WeakMap : Map;
211
- V = new Le();
210
+ var Be = typeof WeakMap == "function" ? WeakMap : Map;
211
+ B = new Be();
212
212
  }
213
- function fe(e, r) {
214
- if (!e || J)
213
+ function be(e, r) {
214
+ if (!e || Q)
215
215
  return "";
216
216
  {
217
- var t = V.get(e);
217
+ var t = B.get(e);
218
218
  if (t !== void 0)
219
219
  return t;
220
220
  }
221
221
  var n;
222
- J = !0;
223
- var i = Error.prepareStackTrace;
222
+ Q = !0;
223
+ var o = Error.prepareStackTrace;
224
224
  Error.prepareStackTrace = void 0;
225
- var u;
226
- u = N.current, N.current = null, $e();
225
+ var s;
226
+ s = X.current, X.current = null, Ue();
227
227
  try {
228
228
  if (r) {
229
- var o = function() {
229
+ var i = function() {
230
230
  throw Error();
231
231
  };
232
- if (Object.defineProperty(o.prototype, "props", {
232
+ if (Object.defineProperty(i.prototype, "props", {
233
233
  set: function() {
234
234
  throw Error();
235
235
  }
236
236
  }), typeof Reflect == "object" && Reflect.construct) {
237
237
  try {
238
- Reflect.construct(o, []);
239
- } catch (d) {
240
- n = d;
238
+ Reflect.construct(i, []);
239
+ } catch (y) {
240
+ n = y;
241
241
  }
242
- Reflect.construct(e, [], o);
242
+ Reflect.construct(e, [], i);
243
243
  } else {
244
244
  try {
245
- o.call();
246
- } catch (d) {
247
- n = d;
245
+ i.call();
246
+ } catch (y) {
247
+ n = y;
248
248
  }
249
- e.call(o.prototype);
249
+ e.call(i.prototype);
250
250
  }
251
251
  } else {
252
252
  try {
253
253
  throw Error();
254
- } catch (d) {
255
- n = d;
254
+ } catch (y) {
255
+ n = y;
256
256
  }
257
257
  e();
258
258
  }
259
- } catch (d) {
260
- if (d && n && typeof d.stack == "string") {
261
- for (var a = d.stack.split(`
262
- `), v = n.stack.split(`
263
- `), s = a.length - 1, l = v.length - 1; s >= 1 && l >= 0 && a[s] !== v[l]; )
259
+ } catch (y) {
260
+ if (y && n && typeof y.stack == "string") {
261
+ for (var a = y.stack.split(`
262
+ `), b = n.stack.split(`
263
+ `), u = a.length - 1, l = b.length - 1; u >= 1 && l >= 0 && a[u] !== b[l]; )
264
264
  l--;
265
- for (; s >= 1 && l >= 0; s--, l--)
266
- if (a[s] !== v[l]) {
267
- if (s !== 1 || l !== 1)
265
+ for (; u >= 1 && l >= 0; u--, l--)
266
+ if (a[u] !== b[l]) {
267
+ if (u !== 1 || l !== 1)
268
268
  do
269
- if (s--, l--, l < 0 || a[s] !== v[l]) {
270
- var b = `
271
- ` + a[s].replace(" at new ", " at ");
272
- return e.displayName && b.includes("<anonymous>") && (b = b.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, b), b;
269
+ if (u--, l--, l < 0 || a[u] !== b[l]) {
270
+ var E = `
271
+ ` + a[u].replace(" at new ", " at ");
272
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, E), E;
273
273
  }
274
- while (s >= 1 && l >= 0);
274
+ while (u >= 1 && l >= 0);
275
275
  break;
276
276
  }
277
277
  }
278
278
  } finally {
279
- J = !1, N.current = u, Ye(), Error.prepareStackTrace = i;
279
+ Q = !1, X.current = s, Ve(), Error.prepareStackTrace = o;
280
280
  }
281
- var w = e ? e.displayName || e.name : "", T = w ? L(w) : "";
282
- return typeof e == "function" && V.set(e, T), T;
281
+ var I = e ? e.displayName || e.name : "", D = I ? V(I) : "";
282
+ return typeof e == "function" && B.set(e, D), D;
283
283
  }
284
- function Ve(e, r, t) {
285
- return fe(e, !1);
284
+ function Je(e, r, t) {
285
+ return be(e, !1);
286
286
  }
287
- function Me(e) {
287
+ function Ke(e) {
288
288
  var r = e.prototype;
289
289
  return !!(r && r.isReactComponent);
290
290
  }
291
- function M(e, r, t) {
291
+ function J(e, r, t) {
292
292
  if (e == null)
293
293
  return "";
294
294
  if (typeof e == "function")
295
- return fe(e, Me(e));
295
+ return be(e, Ke(e));
296
296
  if (typeof e == "string")
297
- return L(e);
297
+ return V(e);
298
298
  switch (e) {
299
- case O:
300
- return L("Suspense");
301
- case p:
302
- return L("SuspenseList");
299
+ case x:
300
+ return V("Suspense");
301
+ case v:
302
+ return V("SuspenseList");
303
303
  }
304
304
  if (typeof e == "object")
305
305
  switch (e.$$typeof) {
306
- case c:
307
- return Ve(e.render);
308
- case y:
309
- return M(e.type, r, t);
310
- case R: {
311
- var n = e, i = n._payload, u = n._init;
306
+ case d:
307
+ return Je(e.render);
308
+ case C:
309
+ return J(e.type, r, t);
310
+ case O: {
311
+ var n = e, o = n._payload, s = n._init;
312
312
  try {
313
- return M(u(i), r, t);
313
+ return J(s(o), r, t);
314
314
  } catch {
315
315
  }
316
316
  }
317
317
  }
318
318
  return "";
319
319
  }
320
- var D = Object.prototype.hasOwnProperty, ce = {}, ve = S.ReactDebugCurrentFrame;
321
- function U(e) {
320
+ var W = Object.prototype.hasOwnProperty, ge = {}, ye = S.ReactDebugCurrentFrame;
321
+ function K(e) {
322
322
  if (e) {
323
- var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
324
- ve.setExtraStackFrame(t);
323
+ var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
324
+ ye.setExtraStackFrame(t);
325
325
  } else
326
- ve.setExtraStackFrame(null);
326
+ ye.setExtraStackFrame(null);
327
327
  }
328
- function Ue(e, r, t, n, i) {
328
+ function Ge(e, r, t, n, o) {
329
329
  {
330
- var u = Function.call.bind(D);
331
- for (var o in e)
332
- if (u(e, o)) {
330
+ var s = Function.call.bind(W);
331
+ for (var i in e)
332
+ if (s(e, i)) {
333
333
  var a = void 0;
334
334
  try {
335
- if (typeof e[o] != "function") {
336
- var v = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
- throw v.name = "Invariant Violation", v;
335
+ if (typeof e[i] != "function") {
336
+ var b = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
+ throw b.name = "Invariant Violation", b;
338
338
  }
339
- a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
- } catch (s) {
341
- a = s;
339
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
+ } catch (u) {
341
+ a = u;
342
342
  }
343
- a && !(a instanceof Error) && (U(i), f("%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).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, U(i), f("Failed %s type: %s", t, a.message), U(null));
343
+ a && !(a instanceof Error) && (K(o), p("%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).", n || "React class", t, i, typeof a), K(null)), a instanceof Error && !(a.message in ge) && (ge[a.message] = !0, K(o), p("Failed %s type: %s", t, a.message), K(null));
344
344
  }
345
345
  }
346
346
  }
347
- var Ne = Array.isArray;
348
- function q(e) {
349
- return Ne(e);
347
+ var ze = Array.isArray;
348
+ function Z(e) {
349
+ return ze(e);
350
350
  }
351
- function Be(e) {
351
+ function Xe(e) {
352
352
  {
353
353
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
354
  return t;
355
355
  }
356
356
  }
357
- function Je(e) {
357
+ function He(e) {
358
358
  try {
359
- return de(e), !1;
359
+ return he(e), !1;
360
360
  } catch {
361
361
  return !0;
362
362
  }
363
363
  }
364
- function de(e) {
364
+ function he(e) {
365
365
  return "" + e;
366
366
  }
367
- function pe(e) {
368
- if (Je(e))
369
- return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), de(e);
367
+ function me(e) {
368
+ if (He(e))
369
+ return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), he(e);
370
370
  }
371
- var F = S.ReactCurrentOwner, qe = {
371
+ var L = S.ReactCurrentOwner, Qe = {
372
372
  key: !0,
373
373
  ref: !0,
374
374
  __self: !0,
375
375
  __source: !0
376
- }, be, ge, K;
377
- K = {};
378
- function Ke(e) {
379
- if (D.call(e, "ref")) {
376
+ }, Ee, Re, ee;
377
+ ee = {};
378
+ function Ze(e) {
379
+ if (W.call(e, "ref")) {
380
380
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
381
381
  if (r && r.isReactWarning)
382
382
  return !1;
383
383
  }
384
384
  return e.ref !== void 0;
385
385
  }
386
- function Ge(e) {
387
- if (D.call(e, "key")) {
386
+ function er(e) {
387
+ if (W.call(e, "key")) {
388
388
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
389
389
  if (r && r.isReactWarning)
390
390
  return !1;
391
391
  }
392
392
  return e.key !== void 0;
393
393
  }
394
- function ze(e, r) {
395
- if (typeof e.ref == "string" && F.current && r && F.current.stateNode !== r) {
396
- var t = g(F.current.type);
397
- K[t] || (f('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', g(F.current.type), e.ref), K[t] = !0);
394
+ function rr(e, r) {
395
+ if (typeof e.ref == "string" && L.current && r && L.current.stateNode !== r) {
396
+ var t = j(L.current.type);
397
+ ee[t] || (p('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', j(L.current.type), e.ref), ee[t] = !0);
398
398
  }
399
399
  }
400
- function Xe(e, r) {
400
+ function tr(e, r) {
401
401
  {
402
402
  var t = function() {
403
- be || (be = !0, f("%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));
403
+ Ee || (Ee = !0, p("%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));
404
404
  };
405
405
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
406
406
  get: t,
@@ -408,10 +408,10 @@ function cr() {
408
408
  });
409
409
  }
410
410
  }
411
- function He(e, r) {
411
+ function nr(e, r) {
412
412
  {
413
413
  var t = function() {
414
- ge || (ge = !0, f("%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));
414
+ Re || (Re = !0, p("%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));
415
415
  };
416
416
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
417
417
  get: t,
@@ -419,17 +419,17 @@ function cr() {
419
419
  });
420
420
  }
421
421
  }
422
- var Ze = function(e, r, t, n, i, u, o) {
422
+ var ar = function(e, r, t, n, o, s, i) {
423
423
  var a = {
424
424
  // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: _,
425
+ $$typeof: g,
426
426
  // Built-in properties that belong on the element
427
427
  type: e,
428
428
  key: r,
429
429
  ref: t,
430
- props: o,
430
+ props: i,
431
431
  // Record the component responsible for creating this element.
432
- _owner: u
432
+ _owner: s
433
433
  };
434
434
  return a._store = {}, Object.defineProperty(a._store, "validated", {
435
435
  configurable: !1,
@@ -445,44 +445,44 @@ function cr() {
445
445
  configurable: !1,
446
446
  enumerable: !1,
447
447
  writable: !1,
448
- value: i
448
+ value: o
449
449
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
450
450
  };
451
- function Qe(e, r, t, n, i) {
451
+ function ir(e, r, t, n, o) {
452
452
  {
453
- var u, o = {}, a = null, v = null;
454
- t !== void 0 && (pe(t), a = "" + t), Ge(r) && (pe(r.key), a = "" + r.key), Ke(r) && (v = r.ref, ze(r, i));
455
- for (u in r)
456
- D.call(r, u) && !qe.hasOwnProperty(u) && (o[u] = r[u]);
453
+ var s, i = {}, a = null, b = null;
454
+ t !== void 0 && (me(t), a = "" + t), er(r) && (me(r.key), a = "" + r.key), Ze(r) && (b = r.ref, rr(r, o));
455
+ for (s in r)
456
+ W.call(r, s) && !Qe.hasOwnProperty(s) && (i[s] = r[s]);
457
457
  if (e && e.defaultProps) {
458
- var s = e.defaultProps;
459
- for (u in s)
460
- o[u] === void 0 && (o[u] = s[u]);
458
+ var u = e.defaultProps;
459
+ for (s in u)
460
+ i[s] === void 0 && (i[s] = u[s]);
461
461
  }
462
- if (a || v) {
462
+ if (a || b) {
463
463
  var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
464
- a && Xe(o, l), v && He(o, l);
464
+ a && tr(i, l), b && nr(i, l);
465
465
  }
466
- return Ze(e, a, v, i, n, F.current, o);
466
+ return ar(e, a, b, o, n, L.current, i);
467
467
  }
468
468
  }
469
- var G = S.ReactCurrentOwner, ye = S.ReactDebugCurrentFrame;
470
- function C(e) {
469
+ var re = S.ReactCurrentOwner, Te = S.ReactDebugCurrentFrame;
470
+ function A(e) {
471
471
  if (e) {
472
- var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
473
- ye.setExtraStackFrame(t);
472
+ var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
473
+ Te.setExtraStackFrame(t);
474
474
  } else
475
- ye.setExtraStackFrame(null);
475
+ Te.setExtraStackFrame(null);
476
476
  }
477
- var z;
478
- z = !1;
479
- function X(e) {
480
- return typeof e == "object" && e !== null && e.$$typeof === _;
477
+ var te;
478
+ te = !1;
479
+ function ne(e) {
480
+ return typeof e == "object" && e !== null && e.$$typeof === g;
481
481
  }
482
- function he() {
482
+ function Ce() {
483
483
  {
484
- if (G.current) {
485
- var e = g(G.current.type);
484
+ if (re.current) {
485
+ var e = j(re.current.type);
486
486
  if (e)
487
487
  return `
488
488
 
@@ -491,13 +491,13 @@ Check the render method of \`` + e + "`.";
491
491
  return "";
492
492
  }
493
493
  }
494
- function er(e) {
494
+ function or(e) {
495
495
  return "";
496
496
  }
497
- var _e = {};
498
- function rr(e) {
497
+ var we = {};
498
+ function sr(e) {
499
499
  {
500
- var r = he();
500
+ var r = Ce();
501
501
  if (!r) {
502
502
  var t = typeof e == "string" ? e : e.displayName || e.name;
503
503
  t && (r = `
@@ -507,39 +507,39 @@ Check the top-level render call using <` + t + ">.");
507
507
  return r;
508
508
  }
509
509
  }
510
- function Ee(e, r) {
510
+ function je(e, r) {
511
511
  {
512
512
  if (!e._store || e._store.validated || e.key != null)
513
513
  return;
514
514
  e._store.validated = !0;
515
- var t = rr(r);
516
- if (_e[t])
515
+ var t = sr(r);
516
+ if (we[t])
517
517
  return;
518
- _e[t] = !0;
518
+ we[t] = !0;
519
519
  var n = "";
520
- e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + g(e._owner.type) + "."), C(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), C(null);
520
+ e && e._owner && e._owner !== re.current && (n = " It was passed a child from " + j(e._owner.type) + "."), A(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
521
521
  }
522
522
  }
523
- function Re(e, r) {
523
+ function xe(e, r) {
524
524
  {
525
525
  if (typeof e != "object")
526
526
  return;
527
- if (q(e))
527
+ if (Z(e))
528
528
  for (var t = 0; t < e.length; t++) {
529
529
  var n = e[t];
530
- X(n) && Ee(n, r);
530
+ ne(n) && je(n, r);
531
531
  }
532
- else if (X(e))
532
+ else if (ne(e))
533
533
  e._store && (e._store.validated = !0);
534
534
  else if (e) {
535
- var i = Pe(e);
536
- if (typeof i == "function" && i !== e.entries)
537
- for (var u = i.call(e), o; !(o = u.next()).done; )
538
- X(o.value) && Ee(o.value, r);
535
+ var o = z(e);
536
+ if (typeof o == "function" && o !== e.entries)
537
+ for (var s = o.call(e), i; !(i = s.next()).done; )
538
+ ne(i.value) && je(i.value, r);
539
539
  }
540
540
  }
541
541
  }
542
- function tr(e) {
542
+ function ur(e) {
543
543
  {
544
544
  var r = e.type;
545
545
  if (r == null || typeof r == "string")
@@ -547,96 +547,214 @@ Check the top-level render call using <` + t + ">.");
547
547
  var t;
548
548
  if (typeof r == "function")
549
549
  t = r.propTypes;
550
- else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
550
+ else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
551
551
  // Inner props are checked in the reconciler.
552
- r.$$typeof === y))
552
+ r.$$typeof === C))
553
553
  t = r.propTypes;
554
554
  else
555
555
  return;
556
556
  if (t) {
557
- var n = g(r);
558
- Ue(t, e.props, "prop", n, e);
559
- } else if (r.PropTypes !== void 0 && !z) {
560
- z = !0;
561
- var i = g(r);
562
- f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
557
+ var n = j(r);
558
+ Ge(t, e.props, "prop", n, e);
559
+ } else if (r.PropTypes !== void 0 && !te) {
560
+ te = !0;
561
+ var o = j(r);
562
+ p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
563
563
  }
564
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
564
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
565
  }
566
566
  }
567
- function nr(e) {
567
+ function lr(e) {
568
568
  {
569
569
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
570
570
  var n = r[t];
571
571
  if (n !== "children" && n !== "key") {
572
- C(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), C(null);
572
+ A(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
573
573
  break;
574
574
  }
575
575
  }
576
- e.ref !== null && (C(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), C(null));
576
+ e.ref !== null && (A(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
577
577
  }
578
578
  }
579
- var me = {};
580
- function Te(e, r, t, n, i, u) {
579
+ var Oe = {};
580
+ function Se(e, r, t, n, o, s) {
581
581
  {
582
- var o = Ie(e);
583
- if (!o) {
582
+ var i = qe(e);
583
+ if (!i) {
584
584
  var a = "";
585
585
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
586
- var v = er();
587
- v ? a += v : a += he();
588
- var s;
589
- e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === _ ? (s = "<" + (g(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
586
+ var b = or();
587
+ b ? a += b : a += Ce();
588
+ var u;
589
+ e === null ? u = "null" : Z(e) ? u = "array" : e !== void 0 && e.$$typeof === g ? (u = "<" + (j(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, a);
590
590
  }
591
- var l = Qe(e, r, t, i, u);
591
+ var l = ir(e, r, t, o, s);
592
592
  if (l == null)
593
593
  return l;
594
- if (o) {
595
- var b = r.children;
596
- if (b !== void 0)
594
+ if (i) {
595
+ var E = r.children;
596
+ if (E !== void 0)
597
597
  if (n)
598
- if (q(b)) {
599
- for (var w = 0; w < b.length; w++)
600
- Re(b[w], e);
601
- Object.freeze && Object.freeze(b);
598
+ if (Z(E)) {
599
+ for (var I = 0; I < E.length; I++)
600
+ xe(E[I], e);
601
+ Object.freeze && Object.freeze(E);
602
602
  } else
603
- f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
603
+ p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
604
604
  else
605
- Re(b, e);
605
+ xe(E, e);
606
606
  }
607
- if (D.call(r, "key")) {
608
- var T = g(e), d = Object.keys(r).filter(function(lr) {
609
- return lr !== "key";
610
- }), H = d.length > 0 ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}";
611
- if (!me[T + H]) {
612
- var sr = d.length > 0 ? "{" + d.join(": ..., ") + ": ...}" : "{}";
613
- f(`A props object containing a "key" prop is being spread into JSX:
607
+ if (W.call(r, "key")) {
608
+ var D = j(e), y = Object.keys(r).filter(function(_r) {
609
+ return _r !== "key";
610
+ }), ae = y.length > 0 ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}";
611
+ if (!Oe[D + ae]) {
612
+ var pr = y.length > 0 ? "{" + y.join(": ..., ") + ": ...}" : "{}";
613
+ p(`A props object containing a "key" prop is being spread into JSX:
614
614
  let props = %s;
615
615
  <%s {...props} />
616
616
  React keys must be passed directly to JSX without using spread:
617
617
  let props = %s;
618
- <%s key={someKey} {...props} />`, H, T, sr, T), me[T + H] = !0;
618
+ <%s key={someKey} {...props} />`, ae, D, pr, D), Oe[D + ae] = !0;
619
619
  }
620
620
  }
621
- return e === h ? nr(l) : tr(l), l;
621
+ return e === f ? lr(l) : ur(l), l;
622
622
  }
623
623
  }
624
- function ar(e, r, t) {
625
- return Te(e, r, t, !0);
624
+ function cr(e, r, t) {
625
+ return Se(e, r, t, !0);
626
626
  }
627
- function or(e, r, t) {
628
- return Te(e, r, t, !1);
627
+ function fr(e, r, t) {
628
+ return Se(e, r, t, !1);
629
629
  }
630
- var ir = or, ur = ar;
631
- I.Fragment = h, I.jsx = ir, I.jsxs = ur;
632
- }()), I;
630
+ var dr = fr, vr = cr;
631
+ q.Fragment = f, q.jsx = dr, q.jsxs = vr;
632
+ }()), q;
633
+ }
634
+ process.env.NODE_ENV === "production" ? ie.exports = gr() : ie.exports = yr();
635
+ var w = ie.exports;
636
+ const hr = "_button_dfbbq_1", mr = "_primary_dfbbq_20", Er = "_danger_dfbbq_21", Rr = "_secondary_dfbbq_44", Tr = "_text_dfbbq_51", Cr = "_disabled_dfbbq_60", $ = {
637
+ button: hr,
638
+ primary: mr,
639
+ danger: Er,
640
+ secondary: Rr,
641
+ text: Tr,
642
+ disabled: Cr
643
+ };
644
+ function M(_) {
645
+ return _.map((c) => {
646
+ if (typeof c == "string")
647
+ return c.trim();
648
+ if (typeof c == "object") {
649
+ const f = [];
650
+ for (const h in c)
651
+ c[h] && f.push(h.trim());
652
+ return f.join(" ");
653
+ }
654
+ }).filter((c) => !!c).join(" ");
633
655
  }
634
- process.env.NODE_ENV === "production" ? Z.exports = fr() : Z.exports = cr();
635
- var vr = Z.exports;
636
- const dr = "_button_2ac9k_1", pr = {
637
- button: dr
638
- }, gr = ({ disabled: P, text: _, onClick: j, ...h }) => /* @__PURE__ */ vr.jsx("button", { type: "button", className: pr.button, onClick: j, disabled: P, ...h, children: _ });
656
+ const wr = {
657
+ CheckMark: "✓",
658
+ Ballot: "",
659
+ ClockwiseTop: "↷",
660
+ ClockwiseOpen: "",
661
+ Pencil: "✎",
662
+ Rightwards: "⇨",
663
+ Leftwards: "⇦",
664
+ Upwards: "⇧",
665
+ Downwards: "⇩",
666
+ Copyright: "©",
667
+ Warning: "⚠",
668
+ Question: "�",
669
+ Envelope: "✉",
670
+ Hart: "♥",
671
+ Scissors: "✂",
672
+ Star: "★"
673
+ }, Lr = ({ disabled: _, onClick: g, text: c = "Ok", type: f = "button", view: h = "primary", icon: R, ...m }) => {
674
+ const T = M([
675
+ $.button,
676
+ m == null ? void 0 : m.className,
677
+ {
678
+ [$.primary]: h === "primary",
679
+ [$.secondary]: h === "secondary",
680
+ [$.danger]: h === "danger",
681
+ [$.disabled]: !!_
682
+ }
683
+ ]);
684
+ return /* @__PURE__ */ w.jsxs("button", { type: f, className: T, onClick: _ ? void 0 : g, disabled: _, ...m, children: [
685
+ R && /* @__PURE__ */ w.jsx("span", { children: `${wr[R]}` }),
686
+ /* @__PURE__ */ w.jsx("span", { className: $.text, children: c })
687
+ ] });
688
+ }, jr = "_container_icou8_1", xr = "_wrapper_icou8_7", Or = "_input_icou8_21", Sr = "_invalid_icou8_28", Pr = "_error_icou8_48", kr = "_disabled_icou8_52", F = {
689
+ container: jr,
690
+ wrapper: xr,
691
+ input: Or,
692
+ invalid: Sr,
693
+ error: Pr,
694
+ disabled: kr
695
+ }, Dr = "_label_1tf8i_1", Fr = "_required_1tf8i_9", De = {
696
+ label: Dr,
697
+ required: Fr
698
+ }, Ar = ({ label: _, required: g, inputId: c, className: f }) => /* @__PURE__ */ w.jsxs("label", { htmlFor: c, className: M([De.label, f]), children: [
699
+ _,
700
+ g && /* @__PURE__ */ w.jsx("abbr", { title: "required", className: De.required, children: "*" })
701
+ ] }), Ir = "_message_1ly5l_1", $r = "_visible_1ly5l_8", Fe = {
702
+ message: Ir,
703
+ visible: $r
704
+ }, Nr = ({
705
+ errorId: _,
706
+ message: g = "Invalid input",
707
+ className: c,
708
+ visible: f = !1
709
+ }) => /* @__PURE__ */ w.jsx("span", { id: _, className: M([Fe.message, c, { [Fe.visible]: f }]), children: g }), Yr = ({
710
+ id: _,
711
+ name: g,
712
+ label: c,
713
+ disabled: f,
714
+ placeholder: h = "Type here...",
715
+ valid: R = !0,
716
+ required: m = !1,
717
+ errorMessage: T,
718
+ defaultValue: d,
719
+ onChange: x,
720
+ ...v
721
+ }) => {
722
+ const [C, O] = br(typeof d == "string" ? d : ""), P = `${_}_error`, U = M([F.container, v == null ? void 0 : v.className]), G = M([
723
+ F.wrapper,
724
+ {
725
+ [F.disabled]: !!f,
726
+ [F.invalid]: !R
727
+ }
728
+ ]), z = (S) => {
729
+ const { value: p = "" } = S.target;
730
+ O(p), x && x(S);
731
+ };
732
+ return /* @__PURE__ */ w.jsxs("div", { className: U, children: [
733
+ /* @__PURE__ */ w.jsxs("div", { className: G, children: [
734
+ /* @__PURE__ */ w.jsx(Ar, { label: c, required: m, inputId: _, className: F.label }),
735
+ /* @__PURE__ */ w.jsx(
736
+ "input",
737
+ {
738
+ id: _,
739
+ name: g,
740
+ type: "text",
741
+ className: F.input,
742
+ disabled: f,
743
+ placeholder: h,
744
+ required: m,
745
+ "aria-invalid": !R,
746
+ "aria-errormessage": P,
747
+ value: C,
748
+ onChange: z,
749
+ ...v
750
+ }
751
+ )
752
+ ] }),
753
+ /* @__PURE__ */ w.jsx(Nr, { errorId: P, message: T, className: F.error, visible: !R })
754
+ ] });
755
+ };
639
756
  export {
640
- gr as ChopLogicButton
757
+ Lr as ChopLogicButton,
758
+ Yr as ChopLogicTextInput
641
759
  };
642
760
  //# sourceMappingURL=index.es.js.map