@marimo-team/islands 0.14.11-dev7 → 0.14.11-dev72

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 (74) hide show
  1. package/dist/{ConnectedDataExplorerComponent-VTfcqOZN.js → ConnectedDataExplorerComponent-CDia3Uq3.js} +4 -4
  2. package/dist/{ImageComparisonComponent-b5udtUaG.js → ImageComparisonComponent-D8GDn93y.js} +1 -1
  3. package/dist/{VegaLite-CZ2MktvJ.js → VegaLite-B0DAcE_0.js} +6799 -7018
  4. package/dist/{_baseUniq-Dxs4JH0Y.js → _baseUniq-C0VlTHW8.js} +48 -48
  5. package/dist/{any-language-editor-CPmAtELv.js → any-language-editor-DPcbYqjc.js} +1 -1
  6. package/dist/{architectureDiagram-IEHRJDOE-CP88TKjC.js → architectureDiagram-NQ2NVSRB-C2Ajtpmz.js} +897 -894
  7. package/dist/assets/{save-worker-BIDtxCd1.js → save-worker-fI5ofStJ.js} +1040 -1405
  8. package/dist/assets/worker-BLUAwPAO.js +3790 -0
  9. package/dist/assets/worker-BldghCZh.js +3752 -0
  10. package/dist/{blockDiagram-JOT3LUYC-C2rusulX.js → blockDiagram-PHRCVELO-xrhIbibO.js} +534 -522
  11. package/dist/{c4Diagram-VJAJSXHY-CE4R-Yj-.js → c4Diagram-6F6E4RAY-B9M8UZ5C.js} +4 -4
  12. package/dist/{channel-BTOPiHD4.js → channel-D3Z57-L0.js} +1 -1
  13. package/dist/{chunk-4BMEZGHF-BGr1mHPI.js → chunk-353BL4L5-B8RJflA2.js} +1 -1
  14. package/dist/{chunk-D6G4REZN-B3t5XG_V.js → chunk-67H74DCK-DjF3P_6n.js} +1 -1
  15. package/dist/chunk-6OLS64BW-DwBPGTBy.js +1383 -0
  16. package/dist/{chunk-XZIHB7SX-Bb6YfyvK.js → chunk-AACKK3MU-BNqFtiBq.js} +1 -1
  17. package/dist/chunk-BFAMUDN2-C7-45IWl.js +8 -0
  18. package/dist/chunk-E2GYISFI-D6ZMZ5f1.js +19 -0
  19. package/dist/{chunk-A2AXSNBT-BNYLnU9D.js → chunk-QEP2MXWD-ThQxWRcu.js} +30 -27
  20. package/dist/chunk-SKB7J2MH-DSRt4RR9.js +20 -0
  21. package/dist/{classDiagram-GIVACNV2-BGu4avYg.js → classDiagram-BGRH5UQR-Dhwtv8yj.js} +2 -2
  22. package/dist/{classDiagram-v2-COTLJTTW-BGu4avYg.js → classDiagram-v2-O24JOBDK-Dhwtv8yj.js} +2 -2
  23. package/dist/{clone-gdQZ-8A5.js → clone-CdbI6pj6.js} +1 -1
  24. package/dist/{dagre-OKDRZEBW-B4FgIhBO.js → dagre-FFZHY6LT-D2JmeFTB.js} +8 -8
  25. package/dist/data-grid-overlay-editor-CKgEMxxc.js +105 -0
  26. package/dist/diagram-3EMPZRKU-JHPbiJCi.js +313 -0
  27. package/dist/diagram-5UYTHUR4-eEJi5-6t.js +137 -0
  28. package/dist/{diagram-SSKATNLV-DYldQ1nJ.js → diagram-ZTM2IBQH-D88l5hnm.js} +3 -3
  29. package/dist/{erDiagram-Q7BY3M3F-Bn1YCXnZ.js → erDiagram-R3QVA2FD-BGlTaWTV.js} +6 -5
  30. package/dist/{flowDiagram-4HSFHLVR-Cv6sE3SQ.js → flowDiagram-PKI6S5ZS-CQVcnZSd.js} +283 -278
  31. package/dist/{ganttDiagram-APWFNJXF-CCEsgCwo.js → ganttDiagram-EK5VF46D-CkFx0RaP.js} +459 -445
  32. package/dist/{gitGraphDiagram-7IBYFJ6S-CXgtNvZc.js → gitGraphDiagram-GW3U2K7C-D-gRVxCj.js} +35 -35
  33. package/dist/glide-data-editor-BLSOKrmw.js +12893 -0
  34. package/dist/{graph-N78OoukA.js → graph-Dz3qJaaG.js} +3 -3
  35. package/dist/{index-DLWDWxiI.js → index-Bxfs9Hk_.js} +6 -3
  36. package/dist/{index-s-KrzpFz.js → index-CDGjWl9n.js} +4 -4
  37. package/dist/{index-B6r1oHeS.js → index-CaY3iMRr.js} +1 -1
  38. package/dist/{index-BTWM953l.js → index-DwK5Y7p2.js} +3 -3
  39. package/dist/index-pBmAzQJl.js +235 -0
  40. package/dist/{infoDiagram-PH2N3AL5-DqyXVVcE.js → infoDiagram-RLU2ROGC-DtDTKm7d.js} +5 -3
  41. package/dist/journeyDiagram-EWQZEKCU-Bf6s-6jc.js +836 -0
  42. package/dist/{kanban-definition-NDS4AKOZ-CwEmTRTQ.js → kanban-definition-ILFWEQ3N-DAtyajgG.js} +41 -39
  43. package/dist/{layout-ClDNXAo5.js → layout-C2EoBYrV.js} +35 -35
  44. package/dist/{linear-lyO559qg.js → linear-D6CkH6Kj.js} +25 -25
  45. package/dist/{main-DGt3HrKs.js → main-ZWGPaFnn.js} +55759 -55421
  46. package/dist/main.js +2 -2
  47. package/dist/{mermaid-q6_P6X8T.js → mermaid-CzkcAUDB.js} +4925 -4853
  48. package/dist/{min-ByCW12IZ.js → min-Bo5Qh008.js} +24 -24
  49. package/dist/{mindmap-definition-ALO5MXBD-ixE8jD_p.js → mindmap-definition-CZNETY7S-CqwLUoQ1.js} +3 -3
  50. package/dist/number-overlay-editor-mhiEvTMk.js +599 -0
  51. package/dist/{pieDiagram-IB7DONF6-CmGcPA5S.js → pieDiagram-NIOCPIFQ-BVoanLni.js} +3 -3
  52. package/dist/{quadrantDiagram-7GDLP6J5-BcuouniC.js → quadrantDiagram-2OG54O6I-C_U4EVXZ.js} +2 -2
  53. package/dist/{react-plotly-CKjey4TC.js → react-plotly-DY4XU5-Q.js} +1 -1
  54. package/dist/{requirementDiagram-KVF5MWMF-CpADntW_.js → requirementDiagram-SO3GGRV7-B_IuYu5S.js} +5 -4
  55. package/dist/{sankeyDiagram-QLVOVGJD-RiHM-gc1.js → sankeyDiagram-4UZDY2LN-DHDmWj2L.js} +11 -11
  56. package/dist/{sequenceDiagram-X6HHIX6F-zjDlErjG.js → sequenceDiagram-ZIKVLSP4-B0FsKMNg.js} +151 -149
  57. package/dist/{slides-component-D-T7V3Um.js → slides-component-CQ1m__jq.js} +969 -962
  58. package/dist/stateDiagram-XX37X6EN-CVOR_WQQ.js +264 -0
  59. package/dist/{stateDiagram-v2-YXO3MK2T-hmq0VkWg.js → stateDiagram-v2-GD6S3NHB-BDaP6oYI.js} +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/{time-CySBB51c.js → time-95e914-x.js} +2 -2
  62. package/dist/{timeline-definition-BDJGKUSR-BFWD7bgu.js → timeline-definition-RI47OAVP-Bc7rrp3P.js} +99 -102
  63. package/dist/{radar-MK3ICKWK-DD-wL37j.js → treemap-FKARHQ26-DFP3Gxy8.js} +2469 -2330
  64. package/dist/{vega-component-D8e5IG1f.js → vega-component-C6HtQfwj.js} +19 -19
  65. package/dist/{xychartDiagram-VJFVF3MP-BO6y-mli.js → xychartDiagram-H2YORKM3-sWRpcEy4.js} +409 -375
  66. package/package.json +45 -44
  67. package/dist/assets/worker-BcyuOSTi.js +0 -4117
  68. package/dist/assets/worker-Dz6PPEGc.js +0 -4115
  69. package/dist/chunk-AEK57VVT-BjKsSzf4.js +0 -1416
  70. package/dist/chunk-RZ5BOZE2-BQRA6_lz.js +0 -24
  71. package/dist/data-editor-LPDyjTPa.js +0 -32933
  72. package/dist/diagram-VNBRO52H-BtnkOAZg.js +0 -126
  73. package/dist/journeyDiagram-U35MCT3I-7reCe8rl.js +0 -809
  74. package/dist/stateDiagram-DGXRK772-DwIrysh_.js +0 -271
@@ -0,0 +1,599 @@
1
+ import { b as X, G as T } from "./main-ZWGPaFnn.js";
2
+ import { s as Te } from "./glide-data-editor-BLSOKrmw.js";
3
+ const Be = /* @__PURE__ */ Te("div")({
4
+ name: "NumberOverlayEditorStyle",
5
+ class: "gdg-n15fjm3e",
6
+ propsAsIs: false
7
+ });
8
+ function Se(e, t) {
9
+ var r = {};
10
+ for (var n in e)
11
+ Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
12
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
13
+ for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
14
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (r[n[a]] = e[n[a]]);
15
+ return r;
16
+ }
17
+ var re;
18
+ (function(e) {
19
+ e.event = "event", e.props = "prop";
20
+ })(re || (re = {}));
21
+ function q() {
22
+ }
23
+ function Fe(e) {
24
+ var t, r = void 0;
25
+ return function() {
26
+ for (var n = [], a = arguments.length; a--; ) n[a] = arguments[a];
27
+ return t && n.length === t.length && n.every(function(i, l) {
28
+ return i === t[l];
29
+ }) || (t = n, r = e.apply(void 0, n)), r;
30
+ };
31
+ }
32
+ function ae(e) {
33
+ return !!(e || "").match(/\d/);
34
+ }
35
+ function Y(e) {
36
+ return e == null;
37
+ }
38
+ function _e(e) {
39
+ return typeof e == "number" && isNaN(e);
40
+ }
41
+ function pe(e) {
42
+ return Y(e) || _e(e) || typeof e == "number" && !isFinite(e);
43
+ }
44
+ function xe(e) {
45
+ return e.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
46
+ }
47
+ function je(e) {
48
+ switch (e) {
49
+ case "lakh":
50
+ return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
51
+ case "wan":
52
+ return /(\d)(?=(\d{4})+(?!\d))/g;
53
+ case "thousand":
54
+ default:
55
+ return /(\d)(?=(\d{3})+(?!\d))/g;
56
+ }
57
+ }
58
+ function Le(e, t, r) {
59
+ var n = je(r), a = e.search(/[1-9]/);
60
+ return a = a === -1 ? e.length : a, e.substring(0, a) + e.substring(a, e.length).replace(n, "$1" + t);
61
+ }
62
+ function Me(e) {
63
+ var t = T.useRef(e);
64
+ t.current = e;
65
+ var r = T.useRef(function() {
66
+ for (var n = [], a = arguments.length; a--; ) n[a] = arguments[a];
67
+ return t.current.apply(t, n);
68
+ });
69
+ return r.current;
70
+ }
71
+ function se(e, t) {
72
+ t === void 0 && (t = true);
73
+ var r = e[0] === "-", n = r && t;
74
+ e = e.replace("-", "");
75
+ var a = e.split("."), i = a[0], l = a[1] || "";
76
+ return {
77
+ beforeDecimal: i,
78
+ afterDecimal: l,
79
+ hasNegation: r,
80
+ addNegation: n
81
+ };
82
+ }
83
+ function ke(e) {
84
+ if (!e)
85
+ return e;
86
+ var t = e[0] === "-";
87
+ t && (e = e.substring(1, e.length));
88
+ var r = e.split("."), n = r[0].replace(/^0+/, "") || "0", a = r[1] || "";
89
+ return (t ? "-" : "") + n + (a ? "." + a : "");
90
+ }
91
+ function ye(e, t, r) {
92
+ for (var n = "", a = r ? "0" : "", i = 0; i <= t - 1; i++)
93
+ n += e[i] || a;
94
+ return n;
95
+ }
96
+ function de(e, t) {
97
+ return Array(t + 1).join(e);
98
+ }
99
+ function be(e) {
100
+ var t = e + "", r = t[0] === "-" ? "-" : "";
101
+ r && (t = t.substring(1));
102
+ var n = t.split(/[eE]/g), a = n[0], i = n[1];
103
+ if (i = Number(i), !i)
104
+ return r + a;
105
+ a = a.replace(".", "");
106
+ var l = 1 + i, m = a.length;
107
+ return l < 0 ? a = "0." + de("0", Math.abs(l)) + a : l >= m ? a = a + de("0", l - m) : a = (a.substring(0, l) || "0") + "." + a.substring(l), r + a;
108
+ }
109
+ function ge(e, t, r) {
110
+ if (["", "-"].indexOf(e) !== -1)
111
+ return e;
112
+ var n = (e.indexOf(".") !== -1 || r) && t, a = se(e), i = a.beforeDecimal, l = a.afterDecimal, m = a.hasNegation, S = parseFloat("0." + (l || "0")), p = l.length <= t ? "0." + l : S.toFixed(t), h = p.split("."), c = i;
113
+ i && Number(h[0]) && (c = i.split("").reverse().reduce(function(I, C, g) {
114
+ return I.length > g ? (Number(I[0]) + Number(C)).toString() + I.substring(1, I.length) : C + I;
115
+ }, h[0]));
116
+ var x = ye(h[1] || "", t, r), y = m ? "-" : "", s = n ? "." : "";
117
+ return "" + y + c + s + x;
118
+ }
119
+ function H(e, t) {
120
+ if (e.value = e.value, e !== null) {
121
+ if (e.createTextRange) {
122
+ var r = e.createTextRange();
123
+ return r.move("character", t), r.select(), true;
124
+ }
125
+ return e.selectionStart || e.selectionStart === 0 ? (e.focus(), e.setSelectionRange(t, t), true) : (e.focus(), false);
126
+ }
127
+ }
128
+ var Ve = Fe(function(e, t) {
129
+ for (var r = 0, n = 0, a = e.length, i = t.length; e[r] === t[r] && r < a; )
130
+ r++;
131
+ for (; e[a - 1 - n] === t[i - 1 - n] && i - n > r && a - n > r; )
132
+ n++;
133
+ return {
134
+ from: { start: r, end: a - n },
135
+ to: { start: r, end: i - n }
136
+ };
137
+ }), Pe = function(e, t) {
138
+ var r = Math.min(e.selectionStart, t);
139
+ return {
140
+ from: { start: r, end: e.selectionEnd },
141
+ to: { start: r, end: t }
142
+ };
143
+ };
144
+ function Ke(e, t, r) {
145
+ return Math.min(Math.max(e, t), r);
146
+ }
147
+ function ce(e) {
148
+ return Math.max(e.selectionStart, e.selectionEnd);
149
+ }
150
+ function We() {
151
+ return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
152
+ }
153
+ function Ue(e) {
154
+ return {
155
+ from: {
156
+ start: 0,
157
+ end: 0
158
+ },
159
+ to: {
160
+ start: 0,
161
+ end: e.length
162
+ },
163
+ lastValue: ""
164
+ };
165
+ }
166
+ function Ge(e) {
167
+ var t = e.currentValue, r = e.formattedValue, n = e.currentValueIndex, a = e.formattedValueIndex;
168
+ return t[n] === r[a];
169
+ }
170
+ function $e(e, t, r, n, a, i, l) {
171
+ l === void 0 && (l = Ge);
172
+ var m = a.findIndex(function(k) {
173
+ return k;
174
+ }), S = e.slice(0, m);
175
+ !t && !r.startsWith(S) && (t = S, r = S + r, n = n + S.length);
176
+ for (var p = r.length, h = e.length, c = {}, x = new Array(p), y = 0; y < p; y++) {
177
+ x[y] = -1;
178
+ for (var s = 0, I = h; s < I; s++) {
179
+ var C = l({
180
+ currentValue: r,
181
+ lastValue: t,
182
+ formattedValue: e,
183
+ currentValueIndex: y,
184
+ formattedValueIndex: s
185
+ });
186
+ if (C && c[s] !== true) {
187
+ x[y] = s, c[s] = true;
188
+ break;
189
+ }
190
+ }
191
+ }
192
+ for (var g = n; g < p && (x[g] === -1 || !i(r[g])); )
193
+ g++;
194
+ var B = g === p || x[g] === -1 ? h : x[g];
195
+ for (g = n - 1; g > 0 && x[g] === -1; )
196
+ g--;
197
+ var F = g === -1 || x[g] === -1 ? 0 : x[g] + 1;
198
+ return F > B ? B : n - F < B - n ? F : B;
199
+ }
200
+ function me(e, t, r, n) {
201
+ var a = e.length;
202
+ if (t = Ke(t, 0, a), n === "left") {
203
+ for (; t >= 0 && !r[t]; )
204
+ t--;
205
+ t === -1 && (t = r.indexOf(true));
206
+ } else {
207
+ for (; t <= a && !r[t]; )
208
+ t++;
209
+ t > a && (t = r.lastIndexOf(true));
210
+ }
211
+ return t === -1 && (t = a), t;
212
+ }
213
+ function Ze(e) {
214
+ for (var t = Array.from({ length: e.length + 1 }).map(function() {
215
+ return true;
216
+ }), r = 0, n = t.length; r < n; r++)
217
+ t[r] = !!(ae(e[r]) || ae(e[r - 1]));
218
+ return t;
219
+ }
220
+ function Ne(e, t, r, n, a, i) {
221
+ i === void 0 && (i = q);
222
+ var l = Me(function(s, I) {
223
+ var C, g;
224
+ return pe(s) ? (g = "", C = "") : typeof s == "number" || I ? (g = typeof s == "number" ? be(s) : s, C = n(g)) : (g = a(s, void 0), C = n(g)), { formattedValue: C, numAsString: g };
225
+ }), m = T.useState(function() {
226
+ return l(Y(e) ? t : e, r);
227
+ }), S = m[0], p = m[1], h = function(s, I) {
228
+ s.formattedValue !== S.formattedValue && p({
229
+ formattedValue: s.formattedValue,
230
+ numAsString: s.value
231
+ }), i(s, I);
232
+ }, c = e, x = r;
233
+ Y(e) && (c = S.numAsString, x = true);
234
+ var y = l(c, x);
235
+ return T.useMemo(function() {
236
+ p(y);
237
+ }, [y.formattedValue]), [S, h];
238
+ }
239
+ function qe(e) {
240
+ return e.replace(/[^0-9]/g, "");
241
+ }
242
+ function ze(e) {
243
+ return e;
244
+ }
245
+ function He(e) {
246
+ var t = e.type;
247
+ t === void 0 && (t = "text");
248
+ var r = e.displayType;
249
+ r === void 0 && (r = "input");
250
+ var n = e.customInput, a = e.renderText, i = e.getInputRef, l = e.format;
251
+ l === void 0 && (l = ze);
252
+ var m = e.removeFormatting;
253
+ m === void 0 && (m = qe);
254
+ var S = e.defaultValue, p = e.valueIsNumericString, h = e.onValueChange, c = e.isAllowed, x = e.onChange;
255
+ x === void 0 && (x = q);
256
+ var y = e.onKeyDown;
257
+ y === void 0 && (y = q);
258
+ var s = e.onMouseUp;
259
+ s === void 0 && (s = q);
260
+ var I = e.onFocus;
261
+ I === void 0 && (I = q);
262
+ var C = e.onBlur;
263
+ C === void 0 && (C = q);
264
+ var g = e.value, B = e.getCaretBoundary;
265
+ B === void 0 && (B = Ze);
266
+ var F = e.isValidInputCharacter;
267
+ F === void 0 && (F = ae);
268
+ var k = e.isCharacterSame, j = Se(e, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), z = Ne(g, S, !!p, l, m, h), P = z[0], V = P.formattedValue, L = P.numAsString, W = z[1], M = T.useRef(), U = T.useRef({ formattedValue: V, numAsString: L }), G = function(o, u) {
269
+ U.current = { formattedValue: o.formattedValue, numAsString: o.value }, W(o, u);
270
+ }, J = T.useState(false), ee = J[0], d = J[1], f = T.useRef(null), N = T.useRef({
271
+ setCaretTimeout: null,
272
+ focusTimeout: null
273
+ });
274
+ T.useEffect(function() {
275
+ return d(true), function() {
276
+ clearTimeout(N.current.setCaretTimeout), clearTimeout(N.current.focusTimeout);
277
+ };
278
+ }, []);
279
+ var R = l, A = function(o, u) {
280
+ var v = parseFloat(u);
281
+ return {
282
+ formattedValue: o,
283
+ value: u,
284
+ floatValue: isNaN(v) ? void 0 : v
285
+ };
286
+ }, E = function(o, u, v) {
287
+ o.selectionStart === 0 && o.selectionEnd === o.value.length || (H(o, u), N.current.setCaretTimeout = setTimeout(function() {
288
+ o.value === v && o.selectionStart !== u && H(o, u);
289
+ }, 0));
290
+ }, O = function(o, u, v) {
291
+ return me(o, u, B(o), v);
292
+ }, Q = function(o, u, v) {
293
+ var w = B(u), _ = $e(u, V, o, v, w, F, k);
294
+ return _ = me(u, _, w), _;
295
+ }, oe = function(o) {
296
+ var u = o.formattedValue;
297
+ u === void 0 && (u = "");
298
+ var v = o.input, w = o.source, _ = o.event, D = o.numAsString, b;
299
+ if (v) {
300
+ var K = o.inputValue || v.value, $ = ce(v);
301
+ v.value = u, b = Q(K, u, $), b !== void 0 && E(v, b, u);
302
+ }
303
+ u !== V && G(A(u, D), { event: _, source: w });
304
+ };
305
+ T.useEffect(function() {
306
+ var o = U.current, u = o.formattedValue, v = o.numAsString;
307
+ (V !== u || L !== v) && G(A(V, L), {
308
+ event: void 0,
309
+ source: re.props
310
+ });
311
+ }, [V, L]);
312
+ var te = f.current ? ce(f.current) : void 0, ne = typeof window < "u" ? T.useLayoutEffect : T.useEffect;
313
+ ne(function() {
314
+ var o = f.current;
315
+ if (V !== U.current.formattedValue && o) {
316
+ var u = Q(U.current.formattedValue, V, te);
317
+ o.value = V, E(o, u, V);
318
+ }
319
+ }, [V]);
320
+ var ue = function(o, u, v) {
321
+ var w = u.target, _ = M.current ? Pe(M.current, w.selectionEnd) : Ve(V, o), D = Object.assign(Object.assign({}, _), { lastValue: V }), b = m(o, D), K = R(b);
322
+ if (b = m(K, void 0), c && !c(A(K, b))) {
323
+ var $ = u.target, Z = ce($), fe = Q(o, V, Z);
324
+ return $.value = V, E($, fe, V), false;
325
+ }
326
+ return oe({
327
+ formattedValue: K,
328
+ numAsString: b,
329
+ inputValue: o,
330
+ event: u,
331
+ source: v,
332
+ input: u.target
333
+ }), true;
334
+ }, le = function(o, u) {
335
+ u === void 0 && (u = 0);
336
+ var v = o.selectionStart, w = o.selectionEnd;
337
+ M.current = { selectionStart: v, selectionEnd: w + u };
338
+ }, De = function(o) {
339
+ var u = o.target, v = u.value, w = ue(v, o, re.event);
340
+ w && x(o), M.current = void 0;
341
+ }, Ie = function(o) {
342
+ var u = o.target, v = o.key, w = u.selectionStart, _ = u.selectionEnd, D = u.value;
343
+ D === void 0 && (D = "");
344
+ var b;
345
+ v === "ArrowLeft" || v === "Backspace" ? b = Math.max(w - 1, 0) : v === "ArrowRight" ? b = Math.min(w + 1, D.length) : v === "Delete" && (b = w);
346
+ var K = 0;
347
+ v === "Delete" && w === _ && (K = 1);
348
+ var $ = v === "ArrowLeft" || v === "ArrowRight";
349
+ if (b === void 0 || w !== _ && !$) {
350
+ y(o), le(u, K);
351
+ return;
352
+ }
353
+ var Z = b;
354
+ if ($) {
355
+ var fe = v === "ArrowLeft" ? "left" : "right";
356
+ Z = O(D, b, fe), Z !== b && o.preventDefault();
357
+ } else v === "Delete" && !F(D[b]) ? Z = O(D, b, "right") : v === "Backspace" && !F(D[b]) && (Z = O(D, b, "left"));
358
+ Z !== b && E(u, Z, D), y(o), le(u, K);
359
+ }, Ce = function(o) {
360
+ var u = o.target, v = function() {
361
+ var w = u.selectionStart, _ = u.selectionEnd, D = u.value;
362
+ if (D === void 0 && (D = ""), w === _) {
363
+ var b = O(D, w);
364
+ b !== w && E(u, b, D);
365
+ }
366
+ };
367
+ v(), requestAnimationFrame(function() {
368
+ v();
369
+ }), s(o), le(u);
370
+ }, Ee = function(o) {
371
+ o.persist && o.persist();
372
+ var u = o.target, v = o.currentTarget;
373
+ f.current = u, N.current.focusTimeout = setTimeout(function() {
374
+ var w = u.selectionStart, _ = u.selectionEnd, D = u.value;
375
+ D === void 0 && (D = "");
376
+ var b = O(D, w);
377
+ b !== w && !(w === 0 && _ === D.length) && E(u, b, D), I(Object.assign(Object.assign({}, o), { currentTarget: v }));
378
+ }, 0);
379
+ }, Re = function(o) {
380
+ f.current = null, clearTimeout(N.current.focusTimeout), clearTimeout(N.current.setCaretTimeout), C(o);
381
+ }, Ae = ee && We() ? "numeric" : void 0, ve = Object.assign({ inputMode: Ae }, j, {
382
+ type: t,
383
+ value: V,
384
+ onChange: De,
385
+ onKeyDown: Ie,
386
+ onMouseUp: Ce,
387
+ onFocus: Ee,
388
+ onBlur: Re
389
+ });
390
+ if (r === "text")
391
+ return a ? X.createElement(X.Fragment, null, a(V, j) || null) : X.createElement("span", Object.assign({}, j, { ref: i }), V);
392
+ if (n) {
393
+ var Oe = n;
394
+ return X.createElement(Oe, Object.assign({}, ve, { ref: i }));
395
+ }
396
+ return X.createElement("input", Object.assign({}, ve, { ref: i }));
397
+ }
398
+ function he(e, t) {
399
+ var r = t.decimalScale, n = t.fixedDecimalScale, a = t.prefix;
400
+ a === void 0 && (a = "");
401
+ var i = t.suffix;
402
+ i === void 0 && (i = "");
403
+ var l = t.allowNegative, m = t.thousandsGroupStyle;
404
+ if (m === void 0 && (m = "thousand"), e === "" || e === "-")
405
+ return e;
406
+ var S = ie(t), p = S.thousandSeparator, h = S.decimalSeparator, c = r !== 0 && e.indexOf(".") !== -1 || r && n, x = se(e, l), y = x.beforeDecimal, s = x.afterDecimal, I = x.addNegation;
407
+ return r !== void 0 && (s = ye(s, r, !!n)), p && (y = Le(y, p, m)), a && (y = a + y), i && (s = s + i), I && (y = "-" + y), e = y + (c && h || "") + s, e;
408
+ }
409
+ function ie(e) {
410
+ var t = e.decimalSeparator;
411
+ t === void 0 && (t = ".");
412
+ var r = e.thousandSeparator, n = e.allowedDecimalSeparators;
413
+ return r === true && (r = ","), n || (n = [t, "."]), {
414
+ decimalSeparator: t,
415
+ thousandSeparator: r,
416
+ allowedDecimalSeparators: n
417
+ };
418
+ }
419
+ function Je(e, t) {
420
+ e === void 0 && (e = "");
421
+ var r = new RegExp("(-)"), n = new RegExp("(-)(.)*(-)"), a = r.test(e), i = n.test(e);
422
+ return e = e.replace(/-/g, ""), a && !i && t && (e = "-" + e), e;
423
+ }
424
+ function Qe(e, t) {
425
+ return new RegExp("(^-)|[0-9]|" + xe(e), "g");
426
+ }
427
+ function Xe(e, t, r) {
428
+ return e === "" ? true : !(t == null ? void 0 : t.match(/\d/)) && !(r == null ? void 0 : r.match(/\d/)) && typeof e == "string" && !isNaN(Number(e));
429
+ }
430
+ function Ye(e, t, r) {
431
+ var n;
432
+ t === void 0 && (t = Ue(e));
433
+ var a = r.allowNegative, i = r.prefix;
434
+ i === void 0 && (i = "");
435
+ var l = r.suffix;
436
+ l === void 0 && (l = "");
437
+ var m = r.decimalScale, S = t.from, p = t.to, h = p.start, c = p.end, x = ie(r), y = x.allowedDecimalSeparators, s = x.decimalSeparator, I = e[c] === s;
438
+ if (ae(e) && (e === i || e === l) && t.lastValue === "")
439
+ return e;
440
+ if (c - h === 1 && y.indexOf(e[h]) !== -1) {
441
+ var C = m === 0 ? "" : s;
442
+ e = e.substring(0, h) + C + e.substring(h + 1, e.length);
443
+ }
444
+ var g = function(f, N, R) {
445
+ var A = false, E = false;
446
+ i.startsWith("-") ? A = false : f.startsWith("--") ? (A = false, E = true) : l.startsWith("-") && f.length === l.length ? A = false : f[0] === "-" && (A = true);
447
+ var O = A ? 1 : 0;
448
+ return E && (O = 2), O && (f = f.substring(O), N -= O, R -= O), { value: f, start: N, end: R, hasNegation: A };
449
+ }, B = g(e, h, c), F = B.hasNegation;
450
+ n = B, e = n.value, h = n.start, c = n.end;
451
+ var k = g(t.lastValue, S.start, S.end), j = k.start, z = k.end, P = k.value, V = e.substring(h, c);
452
+ e.length && P.length && (j > P.length - l.length || z < i.length) && !(V && l.startsWith(V)) && (e = P);
453
+ var L = 0;
454
+ e.startsWith(i) ? L += i.length : h < i.length && (L = h), e = e.substring(L), c -= L;
455
+ var W = e.length, M = e.length - l.length;
456
+ e.endsWith(l) ? W = M : (c > M || c > e.length - l.length) && (W = c), e = e.substring(0, W), e = Je(F ? "-" + e : e, a), e = (e.match(Qe(s)) || []).join("");
457
+ var U = e.indexOf(s);
458
+ e = e.replace(new RegExp(xe(s), "g"), function(f, N) {
459
+ return N === U ? "." : "";
460
+ });
461
+ var G = se(e, a), J = G.beforeDecimal, ee = G.afterDecimal, d = G.addNegation;
462
+ return p.end - p.start < S.end - S.start && J === "" && I && !parseFloat(ee) && (e = d ? "-" : ""), e;
463
+ }
464
+ function et(e, t) {
465
+ var r = t.prefix;
466
+ r === void 0 && (r = "");
467
+ var n = t.suffix;
468
+ n === void 0 && (n = "");
469
+ var a = Array.from({ length: e.length + 1 }).map(function() {
470
+ return true;
471
+ }), i = e[0] === "-";
472
+ a.fill(false, 0, r.length + (i ? 1 : 0));
473
+ var l = e.length;
474
+ return a.fill(false, l - n.length + 1, l + 1), a;
475
+ }
476
+ function tt(e) {
477
+ var t = ie(e), r = t.thousandSeparator, n = t.decimalSeparator, a = e.prefix;
478
+ a === void 0 && (a = "");
479
+ var i = e.allowNegative;
480
+ if (i === void 0 && (i = true), r === n)
481
+ throw new Error(`
482
+ Decimal separator can't be same as thousand separator.
483
+ thousandSeparator: ` + r + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
484
+ decimalSeparator: ` + n + ` (default value for decimalSeparator is .)
485
+ `);
486
+ return a.startsWith("-") && i && (console.error(`
487
+ Prefix can't start with '-' when allowNegative is true.
488
+ prefix: ` + a + `
489
+ allowNegative: ` + i + `
490
+ `), i = false), Object.assign(Object.assign({}, e), { allowNegative: i });
491
+ }
492
+ function rt(e) {
493
+ e = tt(e), e.decimalSeparator, e.allowedDecimalSeparators, e.thousandsGroupStyle;
494
+ var t = e.suffix, r = e.allowNegative, n = e.allowLeadingZeros, a = e.onKeyDown;
495
+ a === void 0 && (a = q);
496
+ var i = e.onBlur;
497
+ i === void 0 && (i = q);
498
+ var l = e.thousandSeparator, m = e.decimalScale, S = e.fixedDecimalScale, p = e.prefix;
499
+ p === void 0 && (p = "");
500
+ var h = e.defaultValue, c = e.value, x = e.valueIsNumericString, y = e.onValueChange, s = Se(e, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), I = ie(e), C = I.decimalSeparator, g = I.allowedDecimalSeparators, B = function(d) {
501
+ return he(d, e);
502
+ }, F = function(d, f) {
503
+ return Ye(d, f, e);
504
+ }, k = Y(c) ? h : c, j = x ?? Xe(k, p, t);
505
+ Y(c) ? Y(h) || (j = j || typeof h == "number") : j = j || typeof c == "number";
506
+ var z = function(d) {
507
+ return pe(d) ? d : (typeof d == "number" && (d = be(d)), j && typeof m == "number" ? ge(d, m, !!S) : d);
508
+ }, P = Ne(z(c), z(h), !!j, B, F, y), V = P[0], L = V.numAsString, W = V.formattedValue, M = P[1], U = function(d) {
509
+ var f = d.target, N = d.key, R = f.selectionStart, A = f.selectionEnd, E = f.value;
510
+ if (E === void 0 && (E = ""), (N === "Backspace" || N === "Delete") && A < p.length) {
511
+ d.preventDefault();
512
+ return;
513
+ }
514
+ if (R !== A) {
515
+ a(d);
516
+ return;
517
+ }
518
+ N === "Backspace" && E[0] === "-" && R === p.length + 1 && r && H(f, 1), m && S && (N === "Backspace" && E[R - 1] === C ? (H(f, R - 1), d.preventDefault()) : N === "Delete" && E[R] === C && d.preventDefault()), (g == null ? void 0 : g.includes(N)) && E[R] === C && H(f, R + 1);
519
+ var O = l === true ? "," : l;
520
+ N === "Backspace" && E[R - 1] === O && H(f, R - 1), N === "Delete" && E[R] === O && H(f, R + 1), a(d);
521
+ }, G = function(d) {
522
+ var f = L;
523
+ if (f.match(/\d/g) || (f = ""), n || (f = ke(f)), S && m && (f = ge(f, m, S)), f !== L) {
524
+ var N = he(f, e);
525
+ M({
526
+ formattedValue: N,
527
+ value: f,
528
+ floatValue: parseFloat(f)
529
+ }, {
530
+ event: d,
531
+ source: re.event
532
+ });
533
+ }
534
+ i(d);
535
+ }, J = function(d) {
536
+ return d === C ? true : ae(d);
537
+ }, ee = function(d) {
538
+ var f = d.currentValue, N = d.lastValue, R = d.formattedValue, A = d.currentValueIndex, E = d.formattedValueIndex, O = f[A], Q = R[E], oe = Ve(N, f), te = oe.to, ne = function(ue) {
539
+ return F(ue).indexOf(".") + p.length;
540
+ };
541
+ return c === 0 && S && m && f[te.start] === C && ne(f) < A && ne(R) > E ? false : A >= te.start && A < te.end && g && g.includes(O) && Q === C ? true : O === Q;
542
+ };
543
+ return Object.assign(Object.assign({}, s), {
544
+ value: W,
545
+ valueIsNumericString: false,
546
+ isValidInputCharacter: J,
547
+ isCharacterSame: ee,
548
+ onValueChange: M,
549
+ format: B,
550
+ removeFormatting: F,
551
+ getCaretBoundary: function(d) {
552
+ return et(d, e);
553
+ },
554
+ onKeyDown: U,
555
+ onBlur: G
556
+ });
557
+ }
558
+ function at(e) {
559
+ var t = rt(e);
560
+ return X.createElement(He, Object.assign({}, t));
561
+ }
562
+ function we() {
563
+ var _a, _b, _c;
564
+ return ((_c = (_b = (_a = Intl.NumberFormat()) == null ? void 0 : _a.formatToParts(1.1)) == null ? void 0 : _b.find((r) => r.type === "decimal")) == null ? void 0 : _c.value) ?? ".";
565
+ }
566
+ function nt() {
567
+ return we() === "." ? "," : ".";
568
+ }
569
+ const ut = (e) => {
570
+ const { value: t, onChange: r, disabled: n, highlight: a, validatedSelection: i, fixedDecimals: l, allowNegative: m, thousandSeparator: S, decimalSeparator: p } = e, h = T.useRef();
571
+ return T.useLayoutEffect(() => {
572
+ var _a;
573
+ if (i !== void 0) {
574
+ const c = typeof i == "number" ? [i, null] : i;
575
+ (_a = h.current) == null ? void 0 : _a.setSelectionRange(c[0], c[1]);
576
+ }
577
+ }, [i]), T.createElement(
578
+ Be,
579
+ null,
580
+ T.createElement(at, {
581
+ autoFocus: true,
582
+ getInputRef: h,
583
+ className: "gdg-input",
584
+ onFocus: (c) => c.target.setSelectionRange(a ? 0 : c.target.value.length, c.target.value.length),
585
+ disabled: n === true,
586
+ decimalScale: l,
587
+ allowNegative: m,
588
+ thousandSeparator: S ?? nt(),
589
+ decimalSeparator: p ?? we(),
590
+ value: Object.is(t, -0) ? "-" : t ?? "",
591
+ // decimalScale={3}
592
+ // prefix={"$"}
593
+ onValueChange: r
594
+ })
595
+ );
596
+ };
597
+ export {
598
+ ut as default
599
+ };
@@ -1,6 +1,6 @@
1
- import { p as V } from "./chunk-4BMEZGHF-BGr1mHPI.js";
2
- import { _ as u, g as U, s as j, a as q, b as H, t as K, q as Z, l as F, c as J, F as Q, K as X, P as Y, e as tt, z as et, H as at } from "./mermaid-q6_P6X8T.js";
3
- import { p as rt } from "./radar-MK3ICKWK-DD-wL37j.js";
1
+ import { p as V } from "./chunk-353BL4L5-B8RJflA2.js";
2
+ import { _ as u, g as U, s as j, a as q, b as H, t as K, q as Z, l as F, c as J, F as Q, K as X, P as Y, e as tt, z as et, H as at } from "./mermaid-CzkcAUDB.js";
3
+ import { p as rt } from "./treemap-FKARHQ26-DFP3Gxy8.js";
4
4
  import { d as O } from "./arc-BXrety1g.js";
5
5
  import { o as nt } from "./ordinal-CYN5qNoq.js";
6
6
  import { a as y, t as z, n as it } from "./timer-BYwnU4DF.js";
@@ -1,6 +1,6 @@
1
1
  var _a, _b;
2
- import { _ as r, s as be, g as Se, t as te, q as _e, a as Ae, b as ke, c as Et, l as qt, d as vt, e as Fe, z as Pe, H as D, M as ve, i as Ce } from "./mermaid-q6_P6X8T.js";
3
- import { l as $t } from "./linear-lyO559qg.js";
2
+ import { _ as r, s as be, g as Se, t as te, q as _e, a as Ae, b as ke, c as Et, l as qt, d as vt, e as Fe, z as Pe, H as D, M as ve, i as Ce } from "./mermaid-CzkcAUDB.js";
3
+ import { l as $t } from "./linear-D6CkH6Kj.js";
4
4
  var Ct = function() {
5
5
  var t = /* @__PURE__ */ r(function(M, s, l, u) {
6
6
  for (l = l || {}, u = M.length; u--; l[M[u]] = s) ;
@@ -1,4 +1,4 @@
1
- import { O as Xg, Q as Yg, S as Kg } from "./main-DGt3HrKs.js";
1
+ import { J as Xg, K as Yg, M as Kg } from "./main-ZWGPaFnn.js";
2
2
  function Jg(Jf, Oh) {
3
3
  for (var Qf = 0; Qf < Oh.length; Qf++) {
4
4
  const bs = Oh[Qf];
@@ -1,6 +1,7 @@
1
1
  var _a;
2
- import { g as je, s as ze } from "./chunk-RZ5BOZE2-BQRA6_lz.js";
3
- import { _ as o, b as Ge, a as Xe, s as Je, g as Ze, q as et, t as tt, c as ke, l as Ne, z as st, D as it, p as rt, r as nt, u as at } from "./mermaid-q6_P6X8T.js";
2
+ import { g as je } from "./chunk-BFAMUDN2-C7-45IWl.js";
3
+ import { s as ze } from "./chunk-SKB7J2MH-DSRt4RR9.js";
4
+ import { _ as o, b as Ge, a as Xe, s as Je, g as Ze, q as et, t as tt, c as ke, l as Ne, z as st, D as it, p as rt, r as nt, u as at } from "./mermaid-CzkcAUDB.js";
4
5
  var qe = function() {
5
6
  var e = /* @__PURE__ */ o(function(P, i, a, c) {
6
7
  for (a = a || {}, c = P.length; c--; a[P[c]] = i) ;
@@ -839,7 +840,7 @@ var ut = /* @__PURE__ */ o(async function(e, u, h, r) {
839
840
  (E == null ? void 0 : E.titleTopMargin) ?? 25,
840
841
  r.db.getDiagramTitle()
841
842
  ), ze(_, b, "requirementDiagram", (E == null ? void 0 : E.useMaxWidth) ?? true);
842
- }, "draw"), Et = {
843
+ }, "draw"), dt = {
843
844
  parser: lt,
844
845
  get db() {
845
846
  return new ct();
@@ -848,5 +849,5 @@ var ut = /* @__PURE__ */ o(async function(e, u, h, r) {
848
849
  styles: ht
849
850
  };
850
851
  export {
851
- Et as diagram
852
+ dt as diagram
852
853
  };