twenty-sdk 2.1.0 → 2.2.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/cli/operations/index.d.ts +3 -0
- package/dist/cli/operations/server-upgrade.d.ts +12 -0
- package/dist/cli/types.d.ts +1 -0
- package/dist/cli/utilities/server/docker-container.d.ts +4 -0
- package/dist/cli.cjs +68 -68
- package/dist/cli.mjs +827 -808
- package/dist/define/index.cjs +16 -16
- package/dist/define/index.cjs.map +1 -1
- package/dist/define/index.d.ts +2 -16
- package/dist/define/index.mjs +3367 -6628
- package/dist/define/index.mjs.map +1 -1
- package/dist/front-component/index.cjs +15 -15
- package/dist/front-component/index.cjs.map +1 -1
- package/dist/front-component/index.mjs +3282 -6544
- package/dist/front-component/index.mjs.map +1 -1
- package/dist/{get-function-input-schema-BZ7_XyUh-D38OurwZ.js → get-function-input-schema-BZ7_XyUh-DI4AlRRA.js} +1 -1
- package/dist/{get-function-input-schema-BZ7_XyUh-CKgoFzji.mjs → get-function-input-schema-BZ7_XyUh-YHOkHl_i.mjs} +1 -1
- package/dist/logic-function/index.d.ts +1 -14
- package/dist/operations.cjs +1 -1
- package/dist/operations.mjs +24 -18
- package/dist/ui/index.cjs +492 -472
- package/dist/ui/index.mjs +11389 -14607
- package/dist/{uninstall-CYiYoBPe.js → uninstall-D3my_KZK.js} +60 -60
- package/dist/{uninstall-Bw-TK4rL.mjs → uninstall-DXr3k3Da.mjs} +4805 -7964
- package/package.json +6 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import jo, { join as ae, relative as gt, dirname as cm } from "path";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import v from "chalk";
|
|
4
|
+
import { u as Ar, v as tn, w as Tt, x as $, y as fm, T as hm, R as Bo, b as eu, C as _e, z as Fr, c as pm, B as dm, l as tu, D as gm, E as mm, G as rs, H as vm, I as ym, J as _m, _ as nu, K as wm, L as Sm, M as ko, N as Im, O as xm, P as Am, Q as ru, t as iu, U as Em, V as bm, W as Tm, m as Cm, F as Qi, a as Fm, e as Pm, X as Rm, f as Lm, Y as Om, h as su, i as Um, Z as Go, $ as Ho, s as Nm, a0 as Er, a1 as br, k as Tr, a2 as $m, a3 as Dm, a4 as Wm, a5 as Mm, q as Bm, d as km, a6 as Gm, g as Hm } from "./uninstall-DXr3k3Da.mjs";
|
|
5
5
|
import ze from "inquirer";
|
|
6
6
|
import { writeFile as Cn, readFile as au } from "node:fs/promises";
|
|
7
|
-
import { v4 as
|
|
7
|
+
import { v4 as ne } from "uuid";
|
|
8
8
|
import ou from "chokidar";
|
|
9
|
-
import
|
|
10
|
-
import { spawn as
|
|
9
|
+
import zm from "crypto";
|
|
10
|
+
import { spawn as Km, execSync as ji, spawnSync as Vm } from "node:child_process";
|
|
11
11
|
import zo from "node:path";
|
|
12
|
-
import { jsx as Y, jsxs as le, Fragment as
|
|
13
|
-
import uu, { useReducer as
|
|
14
|
-
import { Command as
|
|
15
|
-
import { inspect as
|
|
16
|
-
const
|
|
12
|
+
import { jsx as Y, jsxs as le, Fragment as qm } from "react/jsx-runtime";
|
|
13
|
+
import uu, { useReducer as Ym, useRef as Ko, useCallback as Zm, useEffect as es } from "react";
|
|
14
|
+
import { Command as Jm, CommanderError as Xm } from "commander";
|
|
15
|
+
import { inspect as Qm } from "util";
|
|
16
|
+
const ee = process.env.INIT_CWD || process.cwd(), dt = (h) => h && !h?.startsWith("/") ? ae(ee, h) : h;
|
|
17
17
|
var Fn = { exports: {} };
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
@@ -23,11 +23,11 @@ var Fn = { exports: {} };
|
|
|
23
23
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
24
24
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
25
25
|
*/
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
-
return
|
|
26
|
+
var jm = Fn.exports, Vo;
|
|
27
|
+
function ev() {
|
|
28
|
+
return Vo || (Vo = 1, function(h, a) {
|
|
29
29
|
(function() {
|
|
30
|
-
var i, l = "4.17.21",
|
|
30
|
+
var i, l = "4.17.21", p = 200, I = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", x = "Expected a function", O = "Invalid `variable` option passed into `_.template`", G = "__lodash_hash_undefined__", J = 500, Q = "__lodash_placeholder__", z = 1, Xe = 2, B = 4, D = 1, Oe = 2, Ae = 1, Qe = 2, Pn = 4, Ue = 8, Ct = 16, Ee = 32, be = 64, rt = 128, sn = 256, Pr = 512, du = 30, gu = "...", mu = 800, vu = 16, os = 1, yu = 2, _u = 3, Ft = 1 / 0, vt = 9007199254740991, wu = 17976931348623157e292, Rn = NaN, je = 4294967295, Su = je - 1, Iu = je >>> 1, xu = [
|
|
31
31
|
["ary", rt],
|
|
32
32
|
["bind", Ae],
|
|
33
33
|
["bindKey", Qe],
|
|
@@ -37,7 +37,7 @@ function Qm() {
|
|
|
37
37
|
["partial", Ee],
|
|
38
38
|
["partialRight", be],
|
|
39
39
|
["rearg", sn]
|
|
40
|
-
], Mt = "[object Arguments]", Ln = "[object Array]", Au = "[object AsyncFunction]", an = "[object Boolean]", on = "[object Date]", Eu = "[object DOMException]", On = "[object Error]", Un = "[object Function]", us = "[object GeneratorFunction]", Ke = "[object Map]", un = "[object Number]", bu = "[object Null]", it = "[object Object]", ls = "[object Promise]", Tu = "[object Proxy]", ln = "[object RegExp]",
|
|
40
|
+
], Mt = "[object Arguments]", Ln = "[object Array]", Au = "[object AsyncFunction]", an = "[object Boolean]", on = "[object Date]", Eu = "[object DOMException]", On = "[object Error]", Un = "[object Function]", us = "[object GeneratorFunction]", Ke = "[object Map]", un = "[object Number]", bu = "[object Null]", it = "[object Object]", ls = "[object Promise]", Tu = "[object Proxy]", ln = "[object RegExp]", Ve = "[object Set]", cn = "[object String]", Nn = "[object Symbol]", Cu = "[object Undefined]", fn = "[object WeakMap]", Fu = "[object WeakSet]", hn = "[object ArrayBuffer]", Bt = "[object DataView]", Rr = "[object Float32Array]", Lr = "[object Float64Array]", Or = "[object Int8Array]", Ur = "[object Int16Array]", Nr = "[object Int32Array]", $r = "[object Uint8Array]", Dr = "[object Uint8ClampedArray]", Wr = "[object Uint16Array]", Mr = "[object Uint32Array]", Pu = /\b__p \+= '';/g, Ru = /\b(__p \+=) '' \+/g, Lu = /(__e\(.*?\)|\b__t\)) \+\n'';/g, cs = /&(?:amp|lt|gt|quot|#39);/g, fs = /[&<>"']/g, Ou = RegExp(cs.source), Uu = RegExp(fs.source), Nu = /<%-([\s\S]+?)%>/g, $u = /<%([\s\S]+?)%>/g, hs = /<%=([\s\S]+?)%>/g, Du = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Wu = /^\w*$/, Mu = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Br = /[\\^$.*+?()[\]{}|]/g, Bu = RegExp(Br.source), kr = /^\s+/, ku = /\s/, Gu = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Hu = /\{\n\/\* \[wrapped with (.+)\] \*/, zu = /,? & /, Ku = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Vu = /[()=,{}\[\]\/\s]/, qu = /\\(\\)?/g, Yu = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, ps = /\w*$/, Zu = /^[-+]0x[0-9a-f]+$/i, Ju = /^0b[01]+$/i, Xu = /^\[object .+?Constructor\]$/, Qu = /^0o[0-7]+$/i, ju = /^(?:0|[1-9]\d*)$/, el = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, $n = /($^)/, tl = /['\n\r\u2028\u2029\\]/g, Dn = "\\ud800-\\udfff", nl = "\\u0300-\\u036f", rl = "\\ufe20-\\ufe2f", il = "\\u20d0-\\u20ff", ds = nl + rl + il, gs = "\\u2700-\\u27bf", ms = "a-z\\xdf-\\xf6\\xf8-\\xff", sl = "\\xac\\xb1\\xd7\\xf7", al = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", ol = "\\u2000-\\u206f", ul = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", vs = "A-Z\\xc0-\\xd6\\xd8-\\xde", ys = "\\ufe0e\\ufe0f", _s = sl + al + ol + ul, Gr = "['’]", ll = "[" + Dn + "]", ws = "[" + _s + "]", Wn = "[" + ds + "]", Ss = "\\d+", cl = "[" + gs + "]", Is = "[" + ms + "]", xs = "[^" + Dn + _s + Ss + gs + ms + vs + "]", Hr = "\\ud83c[\\udffb-\\udfff]", fl = "(?:" + Wn + "|" + Hr + ")", As = "[^" + Dn + "]", zr = "(?:\\ud83c[\\udde6-\\uddff]){2}", Kr = "[\\ud800-\\udbff][\\udc00-\\udfff]", kt = "[" + vs + "]", Es = "\\u200d", bs = "(?:" + Is + "|" + xs + ")", hl = "(?:" + kt + "|" + xs + ")", Ts = "(?:" + Gr + "(?:d|ll|m|re|s|t|ve))?", Cs = "(?:" + Gr + "(?:D|LL|M|RE|S|T|VE))?", Fs = fl + "?", Ps = "[" + ys + "]?", pl = "(?:" + Es + "(?:" + [As, zr, Kr].join("|") + ")" + Ps + Fs + ")*", dl = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", gl = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Rs = Ps + Fs + pl, ml = "(?:" + [cl, zr, Kr].join("|") + ")" + Rs, vl = "(?:" + [As + Wn + "?", Wn, zr, Kr, ll].join("|") + ")", yl = RegExp(Gr, "g"), _l = RegExp(Wn, "g"), Vr = RegExp(Hr + "(?=" + Hr + ")|" + vl + Rs, "g"), wl = RegExp([
|
|
41
41
|
kt + "?" + Is + "+" + Ts + "(?=" + [ws, kt, "$"].join("|") + ")",
|
|
42
42
|
hl + "+" + Cs + "(?=" + [ws, kt + bs, "$"].join("|") + ")",
|
|
43
43
|
kt + "?" + bs + "+" + Ts,
|
|
@@ -77,10 +77,10 @@ function Qm() {
|
|
|
77
77
|
"isFinite",
|
|
78
78
|
"parseInt",
|
|
79
79
|
"setTimeout"
|
|
80
|
-
], Al = -1,
|
|
81
|
-
|
|
80
|
+
], Al = -1, X = {};
|
|
81
|
+
X[Rr] = X[Lr] = X[Or] = X[Ur] = X[Nr] = X[$r] = X[Dr] = X[Wr] = X[Mr] = !0, X[Mt] = X[Ln] = X[hn] = X[an] = X[Bt] = X[on] = X[On] = X[Un] = X[Ke] = X[un] = X[it] = X[ln] = X[Ve] = X[cn] = X[fn] = !1;
|
|
82
82
|
var Z = {};
|
|
83
|
-
Z[Mt] = Z[Ln] = Z[hn] = Z[Bt] = Z[an] = Z[on] = Z[Rr] = Z[Lr] = Z[Or] = Z[Ur] = Z[Nr] = Z[Ke] = Z[un] = Z[it] = Z[ln] = Z[
|
|
83
|
+
Z[Mt] = Z[Ln] = Z[hn] = Z[Bt] = Z[an] = Z[on] = Z[Rr] = Z[Lr] = Z[Or] = Z[Ur] = Z[Nr] = Z[Ke] = Z[un] = Z[it] = Z[ln] = Z[Ve] = Z[cn] = Z[Nn] = Z[$r] = Z[Dr] = Z[Wr] = Z[Mr] = !0, Z[On] = Z[Un] = Z[fn] = !1;
|
|
84
84
|
var El = {
|
|
85
85
|
// Latin-1 Supplement block.
|
|
86
86
|
À: "A",
|
|
@@ -293,301 +293,301 @@ function Qm() {
|
|
|
293
293
|
"\r": "r",
|
|
294
294
|
"\u2028": "u2028",
|
|
295
295
|
"\u2029": "u2029"
|
|
296
|
-
}, Fl = parseFloat, Pl = parseInt, Ls = typeof Ar == "object" && Ar && Ar.Object === Object && Ar, Rl = typeof self == "object" && self && self.Object === Object && self, fe = Ls || Rl || Function("return this")(),
|
|
296
|
+
}, Fl = parseFloat, Pl = parseInt, Ls = typeof Ar == "object" && Ar && Ar.Object === Object && Ar, Rl = typeof self == "object" && self && self.Object === Object && self, fe = Ls || Rl || Function("return this")(), qr = a && !a.nodeType && a, Pt = qr && !0 && h && !h.nodeType && h, Os = Pt && Pt.exports === qr, Yr = Os && Ls.process, Ne = function() {
|
|
297
297
|
try {
|
|
298
|
-
var
|
|
299
|
-
return
|
|
298
|
+
var d = Pt && Pt.require && Pt.require("util").types;
|
|
299
|
+
return d || Yr && Yr.binding && Yr.binding("util");
|
|
300
300
|
} catch {
|
|
301
301
|
}
|
|
302
302
|
}(), Us = Ne && Ne.isArrayBuffer, Ns = Ne && Ne.isDate, $s = Ne && Ne.isMap, Ds = Ne && Ne.isRegExp, Ws = Ne && Ne.isSet, Ms = Ne && Ne.isTypedArray;
|
|
303
|
-
function Te(
|
|
303
|
+
function Te(d, y, m) {
|
|
304
304
|
switch (m.length) {
|
|
305
305
|
case 0:
|
|
306
|
-
return
|
|
306
|
+
return d.call(y);
|
|
307
307
|
case 1:
|
|
308
|
-
return
|
|
308
|
+
return d.call(y, m[0]);
|
|
309
309
|
case 2:
|
|
310
|
-
return
|
|
310
|
+
return d.call(y, m[0], m[1]);
|
|
311
311
|
case 3:
|
|
312
|
-
return
|
|
312
|
+
return d.call(y, m[0], m[1], m[2]);
|
|
313
313
|
}
|
|
314
|
-
return
|
|
314
|
+
return d.apply(y, m);
|
|
315
315
|
}
|
|
316
|
-
function Ll(
|
|
317
|
-
for (var P = -1, H =
|
|
318
|
-
var oe =
|
|
319
|
-
|
|
316
|
+
function Ll(d, y, m, E) {
|
|
317
|
+
for (var P = -1, H = d == null ? 0 : d.length; ++P < H; ) {
|
|
318
|
+
var oe = d[P];
|
|
319
|
+
y(E, oe, m(oe), d);
|
|
320
320
|
}
|
|
321
321
|
return E;
|
|
322
322
|
}
|
|
323
|
-
function $e(
|
|
324
|
-
for (var m = -1, E =
|
|
323
|
+
function $e(d, y) {
|
|
324
|
+
for (var m = -1, E = d == null ? 0 : d.length; ++m < E && y(d[m], m, d) !== !1; )
|
|
325
325
|
;
|
|
326
|
-
return
|
|
326
|
+
return d;
|
|
327
327
|
}
|
|
328
|
-
function Ol(
|
|
329
|
-
for (var m =
|
|
328
|
+
function Ol(d, y) {
|
|
329
|
+
for (var m = d == null ? 0 : d.length; m-- && y(d[m], m, d) !== !1; )
|
|
330
330
|
;
|
|
331
|
-
return
|
|
331
|
+
return d;
|
|
332
332
|
}
|
|
333
|
-
function Bs(
|
|
334
|
-
for (var m = -1, E =
|
|
335
|
-
if (!
|
|
333
|
+
function Bs(d, y) {
|
|
334
|
+
for (var m = -1, E = d == null ? 0 : d.length; ++m < E; )
|
|
335
|
+
if (!y(d[m], m, d))
|
|
336
336
|
return !1;
|
|
337
337
|
return !0;
|
|
338
338
|
}
|
|
339
|
-
function yt(
|
|
340
|
-
for (var m = -1, E =
|
|
341
|
-
var oe =
|
|
342
|
-
|
|
339
|
+
function yt(d, y) {
|
|
340
|
+
for (var m = -1, E = d == null ? 0 : d.length, P = 0, H = []; ++m < E; ) {
|
|
341
|
+
var oe = d[m];
|
|
342
|
+
y(oe, m, d) && (H[P++] = oe);
|
|
343
343
|
}
|
|
344
344
|
return H;
|
|
345
345
|
}
|
|
346
|
-
function Mn(
|
|
347
|
-
var m =
|
|
348
|
-
return !!m && Gt(
|
|
346
|
+
function Mn(d, y) {
|
|
347
|
+
var m = d == null ? 0 : d.length;
|
|
348
|
+
return !!m && Gt(d, y, 0) > -1;
|
|
349
349
|
}
|
|
350
|
-
function Zr(
|
|
351
|
-
for (var E = -1, P =
|
|
352
|
-
if (m(
|
|
350
|
+
function Zr(d, y, m) {
|
|
351
|
+
for (var E = -1, P = d == null ? 0 : d.length; ++E < P; )
|
|
352
|
+
if (m(y, d[E]))
|
|
353
353
|
return !0;
|
|
354
354
|
return !1;
|
|
355
355
|
}
|
|
356
|
-
function
|
|
357
|
-
for (var m = -1, E =
|
|
358
|
-
P[m] =
|
|
356
|
+
function j(d, y) {
|
|
357
|
+
for (var m = -1, E = d == null ? 0 : d.length, P = Array(E); ++m < E; )
|
|
358
|
+
P[m] = y(d[m], m, d);
|
|
359
359
|
return P;
|
|
360
360
|
}
|
|
361
|
-
function _t(
|
|
362
|
-
for (var m = -1, E =
|
|
363
|
-
|
|
364
|
-
return
|
|
361
|
+
function _t(d, y) {
|
|
362
|
+
for (var m = -1, E = y.length, P = d.length; ++m < E; )
|
|
363
|
+
d[P + m] = y[m];
|
|
364
|
+
return d;
|
|
365
365
|
}
|
|
366
|
-
function Jr(
|
|
367
|
-
var P = -1, H =
|
|
368
|
-
for (E && H && (m =
|
|
369
|
-
m =
|
|
366
|
+
function Jr(d, y, m, E) {
|
|
367
|
+
var P = -1, H = d == null ? 0 : d.length;
|
|
368
|
+
for (E && H && (m = d[++P]); ++P < H; )
|
|
369
|
+
m = y(m, d[P], P, d);
|
|
370
370
|
return m;
|
|
371
371
|
}
|
|
372
|
-
function Ul(
|
|
373
|
-
var P =
|
|
374
|
-
for (E && P && (m =
|
|
375
|
-
m =
|
|
372
|
+
function Ul(d, y, m, E) {
|
|
373
|
+
var P = d == null ? 0 : d.length;
|
|
374
|
+
for (E && P && (m = d[--P]); P--; )
|
|
375
|
+
m = y(m, d[P], P, d);
|
|
376
376
|
return m;
|
|
377
377
|
}
|
|
378
|
-
function Xr(
|
|
379
|
-
for (var m = -1, E =
|
|
380
|
-
if (
|
|
378
|
+
function Xr(d, y) {
|
|
379
|
+
for (var m = -1, E = d == null ? 0 : d.length; ++m < E; )
|
|
380
|
+
if (y(d[m], m, d))
|
|
381
381
|
return !0;
|
|
382
382
|
return !1;
|
|
383
383
|
}
|
|
384
384
|
var Nl = Qr("length");
|
|
385
|
-
function $l(
|
|
386
|
-
return
|
|
385
|
+
function $l(d) {
|
|
386
|
+
return d.split("");
|
|
387
387
|
}
|
|
388
|
-
function Dl(
|
|
389
|
-
return
|
|
388
|
+
function Dl(d) {
|
|
389
|
+
return d.match(Ku) || [];
|
|
390
390
|
}
|
|
391
|
-
function ks(
|
|
391
|
+
function ks(d, y, m) {
|
|
392
392
|
var E;
|
|
393
|
-
return m(
|
|
394
|
-
if (
|
|
393
|
+
return m(d, function(P, H, oe) {
|
|
394
|
+
if (y(P, H, oe))
|
|
395
395
|
return E = H, !1;
|
|
396
396
|
}), E;
|
|
397
397
|
}
|
|
398
|
-
function Bn(
|
|
399
|
-
for (var P =
|
|
400
|
-
if (
|
|
398
|
+
function Bn(d, y, m, E) {
|
|
399
|
+
for (var P = d.length, H = m + (E ? 1 : -1); E ? H-- : ++H < P; )
|
|
400
|
+
if (y(d[H], H, d))
|
|
401
401
|
return H;
|
|
402
402
|
return -1;
|
|
403
403
|
}
|
|
404
|
-
function Gt(
|
|
405
|
-
return
|
|
404
|
+
function Gt(d, y, m) {
|
|
405
|
+
return y === y ? Zl(d, y, m) : Bn(d, Gs, m);
|
|
406
406
|
}
|
|
407
|
-
function Wl(
|
|
408
|
-
for (var P = m - 1, H =
|
|
409
|
-
if (E(
|
|
407
|
+
function Wl(d, y, m, E) {
|
|
408
|
+
for (var P = m - 1, H = d.length; ++P < H; )
|
|
409
|
+
if (E(d[P], y))
|
|
410
410
|
return P;
|
|
411
411
|
return -1;
|
|
412
412
|
}
|
|
413
|
-
function Gs(
|
|
414
|
-
return
|
|
413
|
+
function Gs(d) {
|
|
414
|
+
return d !== d;
|
|
415
415
|
}
|
|
416
|
-
function Hs(
|
|
417
|
-
var m =
|
|
418
|
-
return m ? ei(
|
|
416
|
+
function Hs(d, y) {
|
|
417
|
+
var m = d == null ? 0 : d.length;
|
|
418
|
+
return m ? ei(d, y) / m : Rn;
|
|
419
419
|
}
|
|
420
|
-
function Qr(
|
|
421
|
-
return function(
|
|
422
|
-
return
|
|
420
|
+
function Qr(d) {
|
|
421
|
+
return function(y) {
|
|
422
|
+
return y == null ? i : y[d];
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
function jr(
|
|
426
|
-
return function(
|
|
427
|
-
return
|
|
425
|
+
function jr(d) {
|
|
426
|
+
return function(y) {
|
|
427
|
+
return d == null ? i : d[y];
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
|
-
function zs(
|
|
431
|
-
return P(
|
|
432
|
-
m = E ? (E = !1, H) :
|
|
430
|
+
function zs(d, y, m, E, P) {
|
|
431
|
+
return P(d, function(H, oe, q) {
|
|
432
|
+
m = E ? (E = !1, H) : y(m, H, oe, q);
|
|
433
433
|
}), m;
|
|
434
434
|
}
|
|
435
|
-
function Ml(
|
|
436
|
-
var m =
|
|
437
|
-
for (
|
|
438
|
-
|
|
439
|
-
return
|
|
435
|
+
function Ml(d, y) {
|
|
436
|
+
var m = d.length;
|
|
437
|
+
for (d.sort(y); m--; )
|
|
438
|
+
d[m] = d[m].value;
|
|
439
|
+
return d;
|
|
440
440
|
}
|
|
441
|
-
function ei(
|
|
442
|
-
for (var m, E = -1, P =
|
|
443
|
-
var H =
|
|
441
|
+
function ei(d, y) {
|
|
442
|
+
for (var m, E = -1, P = d.length; ++E < P; ) {
|
|
443
|
+
var H = y(d[E]);
|
|
444
444
|
H !== i && (m = m === i ? H : m + H);
|
|
445
445
|
}
|
|
446
446
|
return m;
|
|
447
447
|
}
|
|
448
|
-
function ti(
|
|
449
|
-
for (var m = -1, E = Array(
|
|
450
|
-
E[m] =
|
|
448
|
+
function ti(d, y) {
|
|
449
|
+
for (var m = -1, E = Array(d); ++m < d; )
|
|
450
|
+
E[m] = y(m);
|
|
451
451
|
return E;
|
|
452
452
|
}
|
|
453
|
-
function Bl(
|
|
454
|
-
return
|
|
455
|
-
return [m,
|
|
453
|
+
function Bl(d, y) {
|
|
454
|
+
return j(y, function(m) {
|
|
455
|
+
return [m, d[m]];
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
|
-
function Ks(
|
|
459
|
-
return
|
|
458
|
+
function Ks(d) {
|
|
459
|
+
return d && d.slice(0, Zs(d) + 1).replace(kr, "");
|
|
460
460
|
}
|
|
461
|
-
function Ce(
|
|
462
|
-
return function(
|
|
463
|
-
return
|
|
461
|
+
function Ce(d) {
|
|
462
|
+
return function(y) {
|
|
463
|
+
return d(y);
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
|
-
function ni(
|
|
467
|
-
return
|
|
468
|
-
return
|
|
466
|
+
function ni(d, y) {
|
|
467
|
+
return j(y, function(m) {
|
|
468
|
+
return d[m];
|
|
469
469
|
});
|
|
470
470
|
}
|
|
471
|
-
function pn(
|
|
472
|
-
return
|
|
471
|
+
function pn(d, y) {
|
|
472
|
+
return d.has(y);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
for (var m = -1, E =
|
|
474
|
+
function Vs(d, y) {
|
|
475
|
+
for (var m = -1, E = d.length; ++m < E && Gt(y, d[m], 0) > -1; )
|
|
476
476
|
;
|
|
477
477
|
return m;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
for (var m =
|
|
479
|
+
function qs(d, y) {
|
|
480
|
+
for (var m = d.length; m-- && Gt(y, d[m], 0) > -1; )
|
|
481
481
|
;
|
|
482
482
|
return m;
|
|
483
483
|
}
|
|
484
|
-
function kl(
|
|
485
|
-
for (var m =
|
|
486
|
-
|
|
484
|
+
function kl(d, y) {
|
|
485
|
+
for (var m = d.length, E = 0; m--; )
|
|
486
|
+
d[m] === y && ++E;
|
|
487
487
|
return E;
|
|
488
488
|
}
|
|
489
489
|
var Gl = jr(El), Hl = jr(bl);
|
|
490
|
-
function zl(
|
|
491
|
-
return "\\" + Cl[
|
|
490
|
+
function zl(d) {
|
|
491
|
+
return "\\" + Cl[d];
|
|
492
492
|
}
|
|
493
|
-
function Kl(
|
|
494
|
-
return
|
|
493
|
+
function Kl(d, y) {
|
|
494
|
+
return d == null ? i : d[y];
|
|
495
495
|
}
|
|
496
|
-
function Ht(
|
|
497
|
-
return Sl.test(
|
|
496
|
+
function Ht(d) {
|
|
497
|
+
return Sl.test(d);
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return Il.test(
|
|
499
|
+
function Vl(d) {
|
|
500
|
+
return Il.test(d);
|
|
501
501
|
}
|
|
502
|
-
function
|
|
503
|
-
for (var
|
|
504
|
-
m.push(
|
|
502
|
+
function ql(d) {
|
|
503
|
+
for (var y, m = []; !(y = d.next()).done; )
|
|
504
|
+
m.push(y.value);
|
|
505
505
|
return m;
|
|
506
506
|
}
|
|
507
|
-
function ri(
|
|
508
|
-
var
|
|
509
|
-
return
|
|
510
|
-
m[++
|
|
507
|
+
function ri(d) {
|
|
508
|
+
var y = -1, m = Array(d.size);
|
|
509
|
+
return d.forEach(function(E, P) {
|
|
510
|
+
m[++y] = [P, E];
|
|
511
511
|
}), m;
|
|
512
512
|
}
|
|
513
|
-
function Ys(
|
|
513
|
+
function Ys(d, y) {
|
|
514
514
|
return function(m) {
|
|
515
|
-
return
|
|
515
|
+
return d(y(m));
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
|
-
function wt(
|
|
519
|
-
for (var m = -1, E =
|
|
520
|
-
var oe =
|
|
521
|
-
(oe ===
|
|
518
|
+
function wt(d, y) {
|
|
519
|
+
for (var m = -1, E = d.length, P = 0, H = []; ++m < E; ) {
|
|
520
|
+
var oe = d[m];
|
|
521
|
+
(oe === y || oe === Q) && (d[m] = Q, H[P++] = m);
|
|
522
522
|
}
|
|
523
523
|
return H;
|
|
524
524
|
}
|
|
525
|
-
function kn(
|
|
526
|
-
var
|
|
527
|
-
return
|
|
528
|
-
m[++
|
|
525
|
+
function kn(d) {
|
|
526
|
+
var y = -1, m = Array(d.size);
|
|
527
|
+
return d.forEach(function(E) {
|
|
528
|
+
m[++y] = E;
|
|
529
529
|
}), m;
|
|
530
530
|
}
|
|
531
|
-
function Yl(
|
|
532
|
-
var
|
|
533
|
-
return
|
|
534
|
-
m[++
|
|
531
|
+
function Yl(d) {
|
|
532
|
+
var y = -1, m = Array(d.size);
|
|
533
|
+
return d.forEach(function(E) {
|
|
534
|
+
m[++y] = [E, E];
|
|
535
535
|
}), m;
|
|
536
536
|
}
|
|
537
|
-
function Zl(
|
|
538
|
-
for (var E = m - 1, P =
|
|
539
|
-
if (
|
|
537
|
+
function Zl(d, y, m) {
|
|
538
|
+
for (var E = m - 1, P = d.length; ++E < P; )
|
|
539
|
+
if (d[E] === y)
|
|
540
540
|
return E;
|
|
541
541
|
return -1;
|
|
542
542
|
}
|
|
543
|
-
function Jl(
|
|
543
|
+
function Jl(d, y, m) {
|
|
544
544
|
for (var E = m + 1; E--; )
|
|
545
|
-
if (
|
|
545
|
+
if (d[E] === y)
|
|
546
546
|
return E;
|
|
547
547
|
return E;
|
|
548
548
|
}
|
|
549
|
-
function zt(
|
|
550
|
-
return Ht(
|
|
549
|
+
function zt(d) {
|
|
550
|
+
return Ht(d) ? Ql(d) : Nl(d);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
return Ht(
|
|
552
|
+
function qe(d) {
|
|
553
|
+
return Ht(d) ? jl(d) : $l(d);
|
|
554
554
|
}
|
|
555
|
-
function Zs(
|
|
556
|
-
for (var
|
|
555
|
+
function Zs(d) {
|
|
556
|
+
for (var y = d.length; y-- && ku.test(d.charAt(y)); )
|
|
557
557
|
;
|
|
558
|
-
return
|
|
558
|
+
return y;
|
|
559
559
|
}
|
|
560
560
|
var Xl = jr(Tl);
|
|
561
|
-
function Ql(
|
|
562
|
-
for (var
|
|
563
|
-
++
|
|
564
|
-
return
|
|
561
|
+
function Ql(d) {
|
|
562
|
+
for (var y = Vr.lastIndex = 0; Vr.test(d); )
|
|
563
|
+
++y;
|
|
564
|
+
return y;
|
|
565
565
|
}
|
|
566
|
-
function jl(
|
|
567
|
-
return
|
|
566
|
+
function jl(d) {
|
|
567
|
+
return d.match(Vr) || [];
|
|
568
568
|
}
|
|
569
|
-
function ec(
|
|
570
|
-
return
|
|
569
|
+
function ec(d) {
|
|
570
|
+
return d.match(wl) || [];
|
|
571
571
|
}
|
|
572
|
-
var tc = function
|
|
573
|
-
|
|
574
|
-
var m =
|
|
572
|
+
var tc = function d(y) {
|
|
573
|
+
y = y == null ? fe : Kt.defaults(fe.Object(), y, Kt.pick(fe, xl));
|
|
574
|
+
var m = y.Array, E = y.Date, P = y.Error, H = y.Function, oe = y.Math, q = y.Object, ii = y.RegExp, nc = y.String, De = y.TypeError, Gn = m.prototype, rc = H.prototype, Vt = q.prototype, Hn = y["__core-js_shared__"], zn = rc.toString, V = Vt.hasOwnProperty, ic = 0, Js = function() {
|
|
575
575
|
var e = /[^.]+$/.exec(Hn && Hn.keys && Hn.keys.IE_PROTO || "");
|
|
576
576
|
return e ? "Symbol(src)_1." + e : "";
|
|
577
|
-
}(), Kn =
|
|
578
|
-
"^" + zn.call(
|
|
579
|
-
),
|
|
577
|
+
}(), Kn = Vt.toString, sc = zn.call(q), ac = fe._, oc = ii(
|
|
578
|
+
"^" + zn.call(V).replace(Br, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
579
|
+
), Vn = Os ? y.Buffer : i, St = y.Symbol, qn = y.Uint8Array, Xs = Vn ? Vn.allocUnsafe : i, Yn = Ys(q.getPrototypeOf, q), Qs = q.create, js = Vt.propertyIsEnumerable, Zn = Gn.splice, ea = St ? St.isConcatSpreadable : i, dn = St ? St.iterator : i, Rt = St ? St.toStringTag : i, Jn = function() {
|
|
580
580
|
try {
|
|
581
|
-
var e = $t(
|
|
581
|
+
var e = $t(q, "defineProperty");
|
|
582
582
|
return e({}, "", {}), e;
|
|
583
583
|
} catch {
|
|
584
584
|
}
|
|
585
|
-
}(), uc =
|
|
585
|
+
}(), uc = y.clearTimeout !== fe.clearTimeout && y.clearTimeout, lc = E && E.now !== fe.Date.now && E.now, cc = y.setTimeout !== fe.setTimeout && y.setTimeout, Xn = oe.ceil, Qn = oe.floor, si = q.getOwnPropertySymbols, fc = Vn ? Vn.isBuffer : i, ta = y.isFinite, hc = Gn.join, pc = Ys(q.keys, q), ue = oe.max, pe = oe.min, dc = E.now, gc = y.parseInt, na = oe.random, mc = Gn.reverse, ai = $t(y, "DataView"), gn = $t(y, "Map"), oi = $t(y, "Promise"), qt = $t(y, "Set"), mn = $t(y, "WeakMap"), vn = $t(q, "create"), jn = mn && new mn(), Yt = {}, vc = Dt(ai), yc = Dt(gn), _c = Dt(oi), wc = Dt(qt), Sc = Dt(mn), er = St ? St.prototype : i, yn = er ? er.valueOf : i, ra = er ? er.toString : i;
|
|
586
586
|
function o(e) {
|
|
587
587
|
if (re(e) && !R(e) && !(e instanceof M)) {
|
|
588
588
|
if (e instanceof We)
|
|
589
589
|
return e;
|
|
590
|
-
if (
|
|
590
|
+
if (V.call(e, "__wrapped__"))
|
|
591
591
|
return io(e);
|
|
592
592
|
}
|
|
593
593
|
return new We(e);
|
|
@@ -596,7 +596,7 @@ function Qm() {
|
|
|
596
596
|
function e() {
|
|
597
597
|
}
|
|
598
598
|
return function(t) {
|
|
599
|
-
if (!
|
|
599
|
+
if (!te(t))
|
|
600
600
|
return {};
|
|
601
601
|
if (Qs)
|
|
602
602
|
return Qs(t);
|
|
@@ -713,11 +713,11 @@ function Qm() {
|
|
|
713
713
|
var n = t[e];
|
|
714
714
|
return n === G ? i : n;
|
|
715
715
|
}
|
|
716
|
-
return
|
|
716
|
+
return V.call(t, e) ? t[e] : i;
|
|
717
717
|
}
|
|
718
718
|
function Cc(e) {
|
|
719
719
|
var t = this.__data__;
|
|
720
|
-
return vn ? t[e] !== i :
|
|
720
|
+
return vn ? t[e] !== i : V.call(t, e);
|
|
721
721
|
}
|
|
722
722
|
function Fc(e, t) {
|
|
723
723
|
var n = this.__data__;
|
|
@@ -811,21 +811,21 @@ function Qm() {
|
|
|
811
811
|
function Kc(e) {
|
|
812
812
|
return this.__data__.has(e);
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function Vc(e, t) {
|
|
815
815
|
var n = this.__data__;
|
|
816
816
|
if (n instanceof st) {
|
|
817
817
|
var r = n.__data__;
|
|
818
|
-
if (!gn || r.length <
|
|
818
|
+
if (!gn || r.length < p - 1)
|
|
819
819
|
return r.push([e, t]), this.size = ++n.size, this;
|
|
820
820
|
n = this.__data__ = new at(r);
|
|
821
821
|
}
|
|
822
822
|
return n.set(e, t), this.size = n.size, this;
|
|
823
823
|
}
|
|
824
|
-
Ye.prototype.clear = Gc, Ye.prototype.delete = Hc, Ye.prototype.get = zc, Ye.prototype.has = Kc, Ye.prototype.set =
|
|
824
|
+
Ye.prototype.clear = Gc, Ye.prototype.delete = Hc, Ye.prototype.get = zc, Ye.prototype.has = Kc, Ye.prototype.set = Vc;
|
|
825
825
|
function ia(e, t) {
|
|
826
826
|
var n = R(e), r = !n && Wt(e), s = !n && !r && bt(e), u = !n && !r && !s && jt(e), c = n || r || s || u, f = c ? ti(e.length, nc) : [], g = f.length;
|
|
827
827
|
for (var _ in e)
|
|
828
|
-
(t ||
|
|
828
|
+
(t || V.call(e, _)) && !(c && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
829
829
|
(_ == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
830
830
|
s && (_ == "offset" || _ == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
831
831
|
u && (_ == "buffer" || _ == "byteLength" || _ == "byteOffset") || // Skip index properties.
|
|
@@ -836,7 +836,7 @@ function Qm() {
|
|
|
836
836
|
var t = e.length;
|
|
837
837
|
return t ? e[yi(0, t - 1)] : i;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function qc(e, t) {
|
|
840
840
|
return gr(we(e), Ut(t, 0, e.length));
|
|
841
841
|
}
|
|
842
842
|
function Yc(e) {
|
|
@@ -847,7 +847,7 @@ function Qm() {
|
|
|
847
847
|
}
|
|
848
848
|
function _n(e, t, n) {
|
|
849
849
|
var r = e[t];
|
|
850
|
-
(!(
|
|
850
|
+
(!(V.call(e, t) && Ze(r, n)) || n === i && !(t in e)) && ot(e, t, n);
|
|
851
851
|
}
|
|
852
852
|
function nr(e, t) {
|
|
853
853
|
for (var n = e.length; n--; )
|
|
@@ -886,7 +886,7 @@ function Qm() {
|
|
|
886
886
|
var c, f = t & z, g = t & Xe, _ = t & B;
|
|
887
887
|
if (n && (c = s ? n(e, r, s, u) : n(e)), c !== i)
|
|
888
888
|
return c;
|
|
889
|
-
if (!
|
|
889
|
+
if (!te(e))
|
|
890
890
|
return e;
|
|
891
891
|
var w = R(e);
|
|
892
892
|
if (w) {
|
|
@@ -929,7 +929,7 @@ function Qm() {
|
|
|
929
929
|
var r = n.length;
|
|
930
930
|
if (e == null)
|
|
931
931
|
return !r;
|
|
932
|
-
for (e =
|
|
932
|
+
for (e = q(e); r--; ) {
|
|
933
933
|
var s = n[r], u = t[s], c = e[s];
|
|
934
934
|
if (c === i && !(s in e) || !u(c))
|
|
935
935
|
return !1;
|
|
@@ -938,7 +938,7 @@ function Qm() {
|
|
|
938
938
|
}
|
|
939
939
|
function ua(e, t, n) {
|
|
940
940
|
if (typeof e != "function")
|
|
941
|
-
throw new De(
|
|
941
|
+
throw new De(x);
|
|
942
942
|
return bn(function() {
|
|
943
943
|
e.apply(i, n);
|
|
944
944
|
}, t);
|
|
@@ -947,7 +947,7 @@ function Qm() {
|
|
|
947
947
|
var s = -1, u = Mn, c = !0, f = e.length, g = [], _ = t.length;
|
|
948
948
|
if (!f)
|
|
949
949
|
return g;
|
|
950
|
-
n && (t =
|
|
950
|
+
n && (t = j(t, Ce(n))), r ? (u = Zr, c = !1) : t.length >= p && (u = pn, c = !1, t = new Ot(t));
|
|
951
951
|
e:
|
|
952
952
|
for (; ++s < f; ) {
|
|
953
953
|
var w = e[s], S = n == null ? w : n(w);
|
|
@@ -1018,16 +1018,16 @@ function Qm() {
|
|
|
1018
1018
|
return R(e) ? r : _t(r, n(e));
|
|
1019
1019
|
}
|
|
1020
1020
|
function me(e) {
|
|
1021
|
-
return e == null ? e === i ? Cu : bu : Rt && Rt in
|
|
1021
|
+
return e == null ? e === i ? Cu : bu : Rt && Rt in q(e) ? $f(e) : Zf(e);
|
|
1022
1022
|
}
|
|
1023
1023
|
function hi(e, t) {
|
|
1024
1024
|
return e > t;
|
|
1025
1025
|
}
|
|
1026
1026
|
function ef(e, t) {
|
|
1027
|
-
return e != null &&
|
|
1027
|
+
return e != null && V.call(e, t);
|
|
1028
1028
|
}
|
|
1029
1029
|
function tf(e, t) {
|
|
1030
|
-
return e != null && t in
|
|
1030
|
+
return e != null && t in q(e);
|
|
1031
1031
|
}
|
|
1032
1032
|
function nf(e, t, n) {
|
|
1033
1033
|
return e >= pe(t, n) && e < ue(t, n);
|
|
@@ -1035,7 +1035,7 @@ function Qm() {
|
|
|
1035
1035
|
function pi(e, t, n) {
|
|
1036
1036
|
for (var r = n ? Zr : Mn, s = e[0].length, u = e.length, c = u, f = m(u), g = 1 / 0, _ = []; c--; ) {
|
|
1037
1037
|
var w = e[c];
|
|
1038
|
-
c && t && (w =
|
|
1038
|
+
c && t && (w = j(w, Ce(t))), g = pe(w.length, g), f[c] = !n && (t || s >= 120 && w.length >= 120) ? new Ot(c && w) : i;
|
|
1039
1039
|
}
|
|
1040
1040
|
w = e[0];
|
|
1041
1041
|
var S = -1, A = f[0];
|
|
@@ -1085,9 +1085,9 @@ function Qm() {
|
|
|
1085
1085
|
c = !0, w = !1;
|
|
1086
1086
|
}
|
|
1087
1087
|
if (A && !w)
|
|
1088
|
-
return u || (u = new Ye()), c || jt(e) ?
|
|
1088
|
+
return u || (u = new Ye()), c || jt(e) ? Va(e, t, n, r, s, u) : Uf(e, t, g, n, r, s, u);
|
|
1089
1089
|
if (!(n & D)) {
|
|
1090
|
-
var b = w &&
|
|
1090
|
+
var b = w && V.call(e, "__wrapped__"), C = S && V.call(t, "__wrapped__");
|
|
1091
1091
|
if (b || C) {
|
|
1092
1092
|
var U = b ? e.value() : e, F = C ? t.value() : t;
|
|
1093
1093
|
return u || (u = new Ye()), s(U, F, n, r, u);
|
|
@@ -1102,7 +1102,7 @@ function Qm() {
|
|
|
1102
1102
|
var s = n.length, u = s, c = !r;
|
|
1103
1103
|
if (e == null)
|
|
1104
1104
|
return !u;
|
|
1105
|
-
for (e =
|
|
1105
|
+
for (e = q(e); s--; ) {
|
|
1106
1106
|
var f = n[s];
|
|
1107
1107
|
if (c && f[2] ? f[1] !== e[f[0]] : !(f[0] in e))
|
|
1108
1108
|
return !1;
|
|
@@ -1124,7 +1124,7 @@ function Qm() {
|
|
|
1124
1124
|
return !0;
|
|
1125
1125
|
}
|
|
1126
1126
|
function da(e) {
|
|
1127
|
-
if (!
|
|
1127
|
+
if (!te(e) || zf(e))
|
|
1128
1128
|
return !1;
|
|
1129
1129
|
var t = ft(e) ? oc : Xu;
|
|
1130
1130
|
return t.test(Dt(e));
|
|
@@ -1133,10 +1133,10 @@ function Qm() {
|
|
|
1133
1133
|
return re(e) && me(e) == ln;
|
|
1134
1134
|
}
|
|
1135
1135
|
function cf(e) {
|
|
1136
|
-
return re(e) && de(e) ==
|
|
1136
|
+
return re(e) && de(e) == Ve;
|
|
1137
1137
|
}
|
|
1138
1138
|
function ff(e) {
|
|
1139
|
-
return re(e) && Sr(e.length) && !!
|
|
1139
|
+
return re(e) && Sr(e.length) && !!X[me(e)];
|
|
1140
1140
|
}
|
|
1141
1141
|
function ga(e) {
|
|
1142
1142
|
return typeof e == "function" ? e : e == null ? xe : typeof e == "object" ? R(e) ? ya(e[0], e[1]) : va(e) : Wo(e);
|
|
@@ -1145,16 +1145,16 @@ function Qm() {
|
|
|
1145
1145
|
if (!En(e))
|
|
1146
1146
|
return pc(e);
|
|
1147
1147
|
var t = [];
|
|
1148
|
-
for (var n in
|
|
1149
|
-
|
|
1148
|
+
for (var n in q(e))
|
|
1149
|
+
V.call(e, n) && n != "constructor" && t.push(n);
|
|
1150
1150
|
return t;
|
|
1151
1151
|
}
|
|
1152
1152
|
function hf(e) {
|
|
1153
|
-
if (!
|
|
1153
|
+
if (!te(e))
|
|
1154
1154
|
return Yf(e);
|
|
1155
1155
|
var t = En(e), n = [];
|
|
1156
1156
|
for (var r in e)
|
|
1157
|
-
r == "constructor" && (t || !
|
|
1157
|
+
r == "constructor" && (t || !V.call(e, r)) || n.push(r);
|
|
1158
1158
|
return n;
|
|
1159
1159
|
}
|
|
1160
1160
|
function mi(e, t) {
|
|
@@ -1180,7 +1180,7 @@ function Qm() {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
function sr(e, t, n, r, s) {
|
|
1182
1182
|
e !== t && ci(t, function(u, c) {
|
|
1183
|
-
if (s || (s = new Ye()),
|
|
1183
|
+
if (s || (s = new Ye()), te(u))
|
|
1184
1184
|
pf(e, t, c, n, sr, r, s);
|
|
1185
1185
|
else {
|
|
1186
1186
|
var f = r ? r(Ni(e, c), u, c + "", e, t, s) : i;
|
|
@@ -1197,7 +1197,7 @@ function Qm() {
|
|
|
1197
1197
|
var w = u ? u(f, g, n + "", e, t, c) : i, S = w === i;
|
|
1198
1198
|
if (S) {
|
|
1199
1199
|
var A = R(g), b = !A && bt(g), C = !A && !b && jt(g);
|
|
1200
|
-
w = g, A || b || C ? R(f) ? w = f : ie(f) ? w = we(f) : b ? (S = !1, w = Pa(g, !0)) : C ? (S = !1, w = Ra(g, !0)) : w = [] : Tn(g) || Wt(g) ? (w = f, Wt(f) ? w = Co(f) : (!
|
|
1200
|
+
w = g, A || b || C ? R(f) ? w = f : ie(f) ? w = we(f) : b ? (S = !1, w = Pa(g, !0)) : C ? (S = !1, w = Ra(g, !0)) : w = [] : Tn(g) || Wt(g) ? (w = f, Wt(f) ? w = Co(f) : (!te(f) || ft(f)) && (w = Za(g))) : S = !1;
|
|
1201
1201
|
}
|
|
1202
1202
|
S && (c.set(g, w), s(w, g, r, u, c), c.delete(g)), ui(e, n, w);
|
|
1203
1203
|
}
|
|
@@ -1207,15 +1207,15 @@ function Qm() {
|
|
|
1207
1207
|
return t += t < 0 ? n : 0, ct(t, n) ? e[t] : i;
|
|
1208
1208
|
}
|
|
1209
1209
|
function wa(e, t, n) {
|
|
1210
|
-
t.length ? t =
|
|
1210
|
+
t.length ? t = j(t, function(u) {
|
|
1211
1211
|
return R(u) ? function(c) {
|
|
1212
1212
|
return Nt(c, u.length === 1 ? u[0] : u);
|
|
1213
1213
|
} : u;
|
|
1214
1214
|
}) : t = [xe];
|
|
1215
1215
|
var r = -1;
|
|
1216
|
-
t =
|
|
1216
|
+
t = j(t, Ce(T()));
|
|
1217
1217
|
var s = ma(e, function(u, c, f) {
|
|
1218
|
-
var g =
|
|
1218
|
+
var g = j(t, function(_) {
|
|
1219
1219
|
return _(u);
|
|
1220
1220
|
});
|
|
1221
1221
|
return { criteria: g, index: ++r, value: u };
|
|
@@ -1243,7 +1243,7 @@ function Qm() {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
function vi(e, t, n, r) {
|
|
1245
1245
|
var s = r ? Wl : Gt, u = -1, c = t.length, f = e;
|
|
1246
|
-
for (e === t && (t = we(t)), n && (f =
|
|
1246
|
+
for (e === t && (t = we(t)), n && (f = j(e, Ce(n))); ++u < c; )
|
|
1247
1247
|
for (var g = 0, _ = t[u], w = n ? n(_) : _; (g = s(f, w, g, r)) > -1; )
|
|
1248
1248
|
f !== e && Zn.call(f, g, 1), Zn.call(e, g, 1);
|
|
1249
1249
|
return e;
|
|
@@ -1286,7 +1286,7 @@ function Qm() {
|
|
|
1286
1286
|
return gr(n, Ut(t, 0, n.length));
|
|
1287
1287
|
}
|
|
1288
1288
|
function xn(e, t, n, r) {
|
|
1289
|
-
if (!
|
|
1289
|
+
if (!te(e))
|
|
1290
1290
|
return e;
|
|
1291
1291
|
t = At(t, e);
|
|
1292
1292
|
for (var s = -1, u = t.length, c = u - 1, f = e; f != null && ++s < u; ) {
|
|
@@ -1295,7 +1295,7 @@ function Qm() {
|
|
|
1295
1295
|
return e;
|
|
1296
1296
|
if (s != c) {
|
|
1297
1297
|
var w = f[g];
|
|
1298
|
-
_ = r ? r(w, g, f) : i, _ === i && (_ =
|
|
1298
|
+
_ = r ? r(w, g, f) : i, _ === i && (_ = te(w) ? w : ct(t[s + 1]) ? [] : {});
|
|
1299
1299
|
}
|
|
1300
1300
|
_n(f, g, _), f = f[g];
|
|
1301
1301
|
}
|
|
@@ -1307,7 +1307,7 @@ function Qm() {
|
|
|
1307
1307
|
return Jn(e, "toString", {
|
|
1308
1308
|
configurable: !0,
|
|
1309
1309
|
enumerable: !1,
|
|
1310
|
-
value:
|
|
1310
|
+
value: Vi(t),
|
|
1311
1311
|
writable: !0
|
|
1312
1312
|
});
|
|
1313
1313
|
} : xe;
|
|
@@ -1369,7 +1369,7 @@ function Qm() {
|
|
|
1369
1369
|
if (typeof e == "string")
|
|
1370
1370
|
return e;
|
|
1371
1371
|
if (R(e))
|
|
1372
|
-
return
|
|
1372
|
+
return j(e, Fe) + "";
|
|
1373
1373
|
if (Pe(e))
|
|
1374
1374
|
return ra ? ra.call(e) : "";
|
|
1375
1375
|
var t = e + "";
|
|
@@ -1379,7 +1379,7 @@ function Qm() {
|
|
|
1379
1379
|
var r = -1, s = Mn, u = e.length, c = !0, f = [], g = f;
|
|
1380
1380
|
if (n)
|
|
1381
1381
|
c = !1, s = Zr;
|
|
1382
|
-
else if (u >=
|
|
1382
|
+
else if (u >= p) {
|
|
1383
1383
|
var _ = t ? null : Lf(e);
|
|
1384
1384
|
if (_)
|
|
1385
1385
|
return kn(_);
|
|
@@ -1456,7 +1456,7 @@ function Qm() {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
function Ei(e) {
|
|
1458
1458
|
var t = new e.constructor(e.byteLength);
|
|
1459
|
-
return new
|
|
1459
|
+
return new qn(t).set(new qn(e)), t;
|
|
1460
1460
|
}
|
|
1461
1461
|
function xf(e, t) {
|
|
1462
1462
|
var n = t ? Ei(e.buffer) : e.buffer;
|
|
@@ -1467,7 +1467,7 @@ function Qm() {
|
|
|
1467
1467
|
return t.lastIndex = e.lastIndex, t;
|
|
1468
1468
|
}
|
|
1469
1469
|
function Ef(e) {
|
|
1470
|
-
return yn ?
|
|
1470
|
+
return yn ? q(yn.call(e)) : {};
|
|
1471
1471
|
}
|
|
1472
1472
|
function Ra(e, t) {
|
|
1473
1473
|
var n = t ? Ei(e.buffer) : e.buffer;
|
|
@@ -1532,7 +1532,7 @@ function Qm() {
|
|
|
1532
1532
|
return tt(e, Li(e), t);
|
|
1533
1533
|
}
|
|
1534
1534
|
function Cf(e, t) {
|
|
1535
|
-
return tt(e,
|
|
1535
|
+
return tt(e, qa(e), t);
|
|
1536
1536
|
}
|
|
1537
1537
|
function ur(e, t) {
|
|
1538
1538
|
return function(n, r) {
|
|
@@ -1543,7 +1543,7 @@ function Qm() {
|
|
|
1543
1543
|
function Jt(e) {
|
|
1544
1544
|
return N(function(t, n) {
|
|
1545
1545
|
var r = -1, s = n.length, u = s > 1 ? n[s - 1] : i, c = s > 2 ? n[2] : i;
|
|
1546
|
-
for (u = e.length > 3 && typeof u == "function" ? (s--, u) : i, c && ve(n[0], n[1], c) && (u = s < 3 ? i : u, s = 1), t =
|
|
1546
|
+
for (u = e.length > 3 && typeof u == "function" ? (s--, u) : i, c && ve(n[0], n[1], c) && (u = s < 3 ? i : u, s = 1), t = q(t); ++r < s; ) {
|
|
1547
1547
|
var f = n[r];
|
|
1548
1548
|
f && e(t, f, r, u);
|
|
1549
1549
|
}
|
|
@@ -1556,14 +1556,14 @@ function Qm() {
|
|
|
1556
1556
|
return n;
|
|
1557
1557
|
if (!Se(n))
|
|
1558
1558
|
return e(n, r);
|
|
1559
|
-
for (var s = n.length, u = t ? s : -1, c =
|
|
1559
|
+
for (var s = n.length, u = t ? s : -1, c = q(n); (t ? u-- : ++u < s) && r(c[u], u, c) !== !1; )
|
|
1560
1560
|
;
|
|
1561
1561
|
return n;
|
|
1562
1562
|
};
|
|
1563
1563
|
}
|
|
1564
1564
|
function $a(e) {
|
|
1565
1565
|
return function(t, n, r) {
|
|
1566
|
-
for (var s = -1, u =
|
|
1566
|
+
for (var s = -1, u = q(t), c = r(t), f = c.length; f--; ) {
|
|
1567
1567
|
var g = c[e ? f : ++s];
|
|
1568
1568
|
if (n(u[g], g, u) === !1)
|
|
1569
1569
|
break;
|
|
@@ -1582,7 +1582,7 @@ function Qm() {
|
|
|
1582
1582
|
function Da(e) {
|
|
1583
1583
|
return function(t) {
|
|
1584
1584
|
t = K(t);
|
|
1585
|
-
var n = Ht(t) ?
|
|
1585
|
+
var n = Ht(t) ? qe(t) : i, r = n ? n[0] : t.charAt(0), s = n ? Et(n, 1).join("") : t.slice(1);
|
|
1586
1586
|
return r[e]() + s;
|
|
1587
1587
|
};
|
|
1588
1588
|
}
|
|
@@ -1613,7 +1613,7 @@ function Qm() {
|
|
|
1613
1613
|
return new e(t[0], t[1], t[2], t[3], t[4], t[5], t[6]);
|
|
1614
1614
|
}
|
|
1615
1615
|
var n = Zt(e.prototype), r = e.apply(n, t);
|
|
1616
|
-
return
|
|
1616
|
+
return te(r) ? r : n;
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
1619
|
function Pf(e, t, n) {
|
|
@@ -1642,7 +1642,7 @@ function Qm() {
|
|
|
1642
1642
|
}
|
|
1643
1643
|
function Wa(e) {
|
|
1644
1644
|
return function(t, n, r) {
|
|
1645
|
-
var s =
|
|
1645
|
+
var s = q(t);
|
|
1646
1646
|
if (!Se(t)) {
|
|
1647
1647
|
var u = T(n, 3);
|
|
1648
1648
|
t = ce(t), n = function(f) {
|
|
@@ -1659,7 +1659,7 @@ function Qm() {
|
|
|
1659
1659
|
for (e && t.reverse(); r--; ) {
|
|
1660
1660
|
var u = t[r];
|
|
1661
1661
|
if (typeof u != "function")
|
|
1662
|
-
throw new De(
|
|
1662
|
+
throw new De(x);
|
|
1663
1663
|
if (s && !c && pr(u) == "wrapper")
|
|
1664
1664
|
var c = new We([], !0);
|
|
1665
1665
|
}
|
|
@@ -1725,7 +1725,7 @@ function Qm() {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
function bi(e) {
|
|
1727
1727
|
return lt(function(t) {
|
|
1728
|
-
return t =
|
|
1728
|
+
return t = j(t, Ce(T())), N(function(n) {
|
|
1729
1729
|
var r = this;
|
|
1730
1730
|
return e(t, function(s) {
|
|
1731
1731
|
return Te(s, r, n);
|
|
@@ -1739,7 +1739,7 @@ function Qm() {
|
|
|
1739
1739
|
if (n < 2)
|
|
1740
1740
|
return n ? _i(t, e) : t;
|
|
1741
1741
|
var r = _i(t, Xn(e / zt(t)));
|
|
1742
|
-
return Ht(t) ? Et(
|
|
1742
|
+
return Ht(t) ? Et(qe(r), 0, e).join("") : r.slice(0, e);
|
|
1743
1743
|
}
|
|
1744
1744
|
function Rf(e, t, n, r) {
|
|
1745
1745
|
var s = t & Ae, u = An(e);
|
|
@@ -1789,19 +1789,19 @@ function Qm() {
|
|
|
1789
1789
|
return t(n);
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
|
-
var Lf =
|
|
1793
|
-
return new
|
|
1792
|
+
var Lf = qt && 1 / kn(new qt([, -0]))[1] == Ft ? function(e) {
|
|
1793
|
+
return new qt(e);
|
|
1794
1794
|
} : Zi;
|
|
1795
1795
|
function Ha(e) {
|
|
1796
1796
|
return function(t) {
|
|
1797
1797
|
var n = de(t);
|
|
1798
|
-
return n == Ke ? ri(t) : n ==
|
|
1798
|
+
return n == Ke ? ri(t) : n == Ve ? Yl(t) : Bl(t, e(t));
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
1801
|
function ut(e, t, n, r, s, u, c, f) {
|
|
1802
1802
|
var g = t & Qe;
|
|
1803
1803
|
if (!g && typeof e != "function")
|
|
1804
|
-
throw new De(
|
|
1804
|
+
throw new De(x);
|
|
1805
1805
|
var _ = r ? r.length : 0;
|
|
1806
1806
|
if (_ || (t &= -97, r = s = i), c = c === i ? c : ue(L(c), 0), f = f === i ? f : L(f), _ -= s ? s.length : 0, t & be) {
|
|
1807
1807
|
var w = r, S = s;
|
|
@@ -1819,22 +1819,22 @@ function Qm() {
|
|
|
1819
1819
|
c,
|
|
1820
1820
|
f
|
|
1821
1821
|
];
|
|
1822
|
-
if (A &&
|
|
1822
|
+
if (A && qf(b, A), e = b[0], t = b[1], n = b[2], r = b[3], s = b[4], f = b[9] = b[9] === i ? g ? 0 : e.length : ue(b[9] - _, 0), !f && t & (Ue | Ct) && (t &= -25), !t || t == Ae)
|
|
1823
1823
|
var C = Ff(e, t, n);
|
|
1824
1824
|
else t == Ue || t == Ct ? C = Pf(e, t, f) : (t == Ee || t == (Ae | Ee)) && !s.length ? C = Rf(e, t, n, r) : C = lr.apply(i, b);
|
|
1825
1825
|
var U = A ? xa : eo;
|
|
1826
1826
|
return to(U(C, b), e, t);
|
|
1827
1827
|
}
|
|
1828
1828
|
function za(e, t, n, r) {
|
|
1829
|
-
return e === i || Ze(e,
|
|
1829
|
+
return e === i || Ze(e, Vt[n]) && !V.call(r, n) ? t : e;
|
|
1830
1830
|
}
|
|
1831
1831
|
function Ka(e, t, n, r, s, u) {
|
|
1832
|
-
return
|
|
1832
|
+
return te(e) && te(t) && (u.set(t, e), sr(e, t, i, Ka, u), u.delete(t)), e;
|
|
1833
1833
|
}
|
|
1834
1834
|
function Of(e) {
|
|
1835
1835
|
return Tn(e) ? i : e;
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function Va(e, t, n, r, s, u) {
|
|
1838
1838
|
var c = n & D, f = e.length, g = t.length;
|
|
1839
1839
|
if (f != g && !(c && g > f))
|
|
1840
1840
|
return !1;
|
|
@@ -1874,7 +1874,7 @@ function Qm() {
|
|
|
1874
1874
|
return !1;
|
|
1875
1875
|
e = e.buffer, t = t.buffer;
|
|
1876
1876
|
case hn:
|
|
1877
|
-
return !(e.byteLength != t.byteLength || !u(new
|
|
1877
|
+
return !(e.byteLength != t.byteLength || !u(new qn(e), new qn(t)));
|
|
1878
1878
|
case an:
|
|
1879
1879
|
case on:
|
|
1880
1880
|
case un:
|
|
@@ -1886,7 +1886,7 @@ function Qm() {
|
|
|
1886
1886
|
return e == t + "";
|
|
1887
1887
|
case Ke:
|
|
1888
1888
|
var f = ri;
|
|
1889
|
-
case
|
|
1889
|
+
case Ve:
|
|
1890
1890
|
var g = r & D;
|
|
1891
1891
|
if (f || (f = kn), e.size != t.size && !g)
|
|
1892
1892
|
return !1;
|
|
@@ -1894,7 +1894,7 @@ function Qm() {
|
|
|
1894
1894
|
if (_)
|
|
1895
1895
|
return _ == t;
|
|
1896
1896
|
r |= Oe, c.set(e, t);
|
|
1897
|
-
var w =
|
|
1897
|
+
var w = Va(f(e), f(t), r, s, u, c);
|
|
1898
1898
|
return c.delete(e), w;
|
|
1899
1899
|
case Nn:
|
|
1900
1900
|
if (yn)
|
|
@@ -1908,7 +1908,7 @@ function Qm() {
|
|
|
1908
1908
|
return !1;
|
|
1909
1909
|
for (var S = g; S--; ) {
|
|
1910
1910
|
var A = f[S];
|
|
1911
|
-
if (!(c ? A in t :
|
|
1911
|
+
if (!(c ? A in t : V.call(t, A)))
|
|
1912
1912
|
return !1;
|
|
1913
1913
|
}
|
|
1914
1914
|
var b = u.get(e), C = u.get(t);
|
|
@@ -1940,13 +1940,13 @@ function Qm() {
|
|
|
1940
1940
|
return ha(e, ce, Li);
|
|
1941
1941
|
}
|
|
1942
1942
|
function Fi(e) {
|
|
1943
|
-
return ha(e, Ie,
|
|
1943
|
+
return ha(e, Ie, qa);
|
|
1944
1944
|
}
|
|
1945
1945
|
var Pi = jn ? function(e) {
|
|
1946
1946
|
return jn.get(e);
|
|
1947
1947
|
} : Zi;
|
|
1948
1948
|
function pr(e) {
|
|
1949
|
-
for (var t = e.name + "", n = Yt[t], r =
|
|
1949
|
+
for (var t = e.name + "", n = Yt[t], r = V.call(Yt, t) ? n.length : 0; r--; ) {
|
|
1950
1950
|
var s = n[r], u = s.func;
|
|
1951
1951
|
if (u == null || u == e)
|
|
1952
1952
|
return s.name;
|
|
@@ -1954,12 +1954,12 @@ function Qm() {
|
|
|
1954
1954
|
return t;
|
|
1955
1955
|
}
|
|
1956
1956
|
function Qt(e) {
|
|
1957
|
-
var t =
|
|
1957
|
+
var t = V.call(o, "placeholder") ? o : e;
|
|
1958
1958
|
return t.placeholder;
|
|
1959
1959
|
}
|
|
1960
1960
|
function T() {
|
|
1961
|
-
var e = o.iteratee ||
|
|
1962
|
-
return e = e ===
|
|
1961
|
+
var e = o.iteratee || qi;
|
|
1962
|
+
return e = e === qi ? ga : e, arguments.length ? e(arguments[0], arguments[1]) : e;
|
|
1963
1963
|
}
|
|
1964
1964
|
function dr(e, t) {
|
|
1965
1965
|
var n = e.__data__;
|
|
@@ -1977,7 +1977,7 @@ function Qm() {
|
|
|
1977
1977
|
return da(n) ? n : i;
|
|
1978
1978
|
}
|
|
1979
1979
|
function $f(e) {
|
|
1980
|
-
var t =
|
|
1980
|
+
var t = V.call(e, Rt), n = e[Rt];
|
|
1981
1981
|
try {
|
|
1982
1982
|
e[Rt] = i;
|
|
1983
1983
|
var r = !0;
|
|
@@ -1987,15 +1987,15 @@ function Qm() {
|
|
|
1987
1987
|
return r && (t ? e[Rt] = n : delete e[Rt]), s;
|
|
1988
1988
|
}
|
|
1989
1989
|
var Li = si ? function(e) {
|
|
1990
|
-
return e == null ? [] : (e =
|
|
1990
|
+
return e == null ? [] : (e = q(e), yt(si(e), function(t) {
|
|
1991
1991
|
return js.call(e, t);
|
|
1992
1992
|
}));
|
|
1993
|
-
} : Ji,
|
|
1993
|
+
} : Ji, qa = si ? function(e) {
|
|
1994
1994
|
for (var t = []; e; )
|
|
1995
1995
|
_t(t, Li(e)), e = Yn(e);
|
|
1996
1996
|
return t;
|
|
1997
1997
|
} : Ji, de = me;
|
|
1998
|
-
(ai && de(new ai(new ArrayBuffer(1))) != Bt || gn && de(new gn()) != Ke || oi && de(oi.resolve()) != ls ||
|
|
1998
|
+
(ai && de(new ai(new ArrayBuffer(1))) != Bt || gn && de(new gn()) != Ke || oi && de(oi.resolve()) != ls || qt && de(new qt()) != Ve || mn && de(new mn()) != fn) && (de = function(e) {
|
|
1999
1999
|
var t = me(e), n = t == it ? e.constructor : i, r = n ? Dt(n) : "";
|
|
2000
2000
|
if (r)
|
|
2001
2001
|
switch (r) {
|
|
@@ -2006,7 +2006,7 @@ function Qm() {
|
|
|
2006
2006
|
case _c:
|
|
2007
2007
|
return ls;
|
|
2008
2008
|
case wc:
|
|
2009
|
-
return
|
|
2009
|
+
return Ve;
|
|
2010
2010
|
case Sc:
|
|
2011
2011
|
return fn;
|
|
2012
2012
|
}
|
|
@@ -2048,7 +2048,7 @@ function Qm() {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
function Mf(e) {
|
|
2050
2050
|
var t = e.length, n = new e.constructor(t);
|
|
2051
|
-
return t && typeof e[0] == "string" &&
|
|
2051
|
+
return t && typeof e[0] == "string" && V.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
|
2052
2052
|
}
|
|
2053
2053
|
function Za(e) {
|
|
2054
2054
|
return typeof e.constructor == "function" && !En(e) ? Zt(Yn(e)) : {};
|
|
@@ -2080,7 +2080,7 @@ function Qm() {
|
|
|
2080
2080
|
return new r(e);
|
|
2081
2081
|
case ln:
|
|
2082
2082
|
return Af(e);
|
|
2083
|
-
case
|
|
2083
|
+
case Ve:
|
|
2084
2084
|
return new r();
|
|
2085
2085
|
case Nn:
|
|
2086
2086
|
return Ef(e);
|
|
@@ -2103,7 +2103,7 @@ function Qm() {
|
|
|
2103
2103
|
return t = t ?? vt, !!t && (n == "number" || n != "symbol" && ju.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
2104
2104
|
}
|
|
2105
2105
|
function ve(e, t, n) {
|
|
2106
|
-
if (!
|
|
2106
|
+
if (!te(n))
|
|
2107
2107
|
return !1;
|
|
2108
2108
|
var r = typeof t;
|
|
2109
2109
|
return (r == "number" ? Se(n) && ct(t, n.length) : r == "string" && t in n) ? Ze(n[t], e) : !1;
|
|
@@ -2112,7 +2112,7 @@ function Qm() {
|
|
|
2112
2112
|
if (R(e))
|
|
2113
2113
|
return !1;
|
|
2114
2114
|
var n = typeof e;
|
|
2115
|
-
return n == "number" || n == "symbol" || n == "boolean" || e == null || Pe(e) ? !0 : Wu.test(e) || !Du.test(e) || t != null && e in
|
|
2115
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || Pe(e) ? !0 : Wu.test(e) || !Du.test(e) || t != null && e in q(t);
|
|
2116
2116
|
}
|
|
2117
2117
|
function Hf(e) {
|
|
2118
2118
|
var t = typeof e;
|
|
@@ -2132,24 +2132,24 @@ function Qm() {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
var Kf = Hn ? ft : Xi;
|
|
2134
2134
|
function En(e) {
|
|
2135
|
-
var t = e && e.constructor, n = typeof t == "function" && t.prototype ||
|
|
2135
|
+
var t = e && e.constructor, n = typeof t == "function" && t.prototype || Vt;
|
|
2136
2136
|
return e === n;
|
|
2137
2137
|
}
|
|
2138
2138
|
function Ja(e) {
|
|
2139
|
-
return e === e && !
|
|
2139
|
+
return e === e && !te(e);
|
|
2140
2140
|
}
|
|
2141
2141
|
function Xa(e, t) {
|
|
2142
2142
|
return function(n) {
|
|
2143
|
-
return n == null ? !1 : n[e] === t && (t !== i || e in
|
|
2143
|
+
return n == null ? !1 : n[e] === t && (t !== i || e in q(n));
|
|
2144
2144
|
};
|
|
2145
2145
|
}
|
|
2146
|
-
function
|
|
2146
|
+
function Vf(e) {
|
|
2147
2147
|
var t = _r(e, function(r) {
|
|
2148
|
-
return n.size ===
|
|
2148
|
+
return n.size === J && n.clear(), r;
|
|
2149
2149
|
}), n = t.cache;
|
|
2150
2150
|
return t;
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function qf(e, t) {
|
|
2153
2153
|
var n = e[1], r = t[1], s = n | r, u = s < (Ae | Qe | rt), c = r == rt && n == Ue || r == rt && n == sn && e[7].length <= t[8] || r == (rt | sn) && t[7].length <= t[8] && n == Ue;
|
|
2154
2154
|
if (!(u || c))
|
|
2155
2155
|
return e;
|
|
@@ -2157,14 +2157,14 @@ function Qm() {
|
|
|
2157
2157
|
var f = t[3];
|
|
2158
2158
|
if (f) {
|
|
2159
2159
|
var g = e[3];
|
|
2160
|
-
e[3] = g ? Oa(g, f, t[4]) : f, e[4] = g ? wt(e[3],
|
|
2160
|
+
e[3] = g ? Oa(g, f, t[4]) : f, e[4] = g ? wt(e[3], Q) : t[4];
|
|
2161
2161
|
}
|
|
2162
|
-
return f = t[5], f && (g = e[5], e[5] = g ? Ua(g, f, t[6]) : f, e[6] = g ? wt(e[5],
|
|
2162
|
+
return f = t[5], f && (g = e[5], e[5] = g ? Ua(g, f, t[6]) : f, e[6] = g ? wt(e[5], Q) : t[6]), f = t[7], f && (e[7] = f), r & rt && (e[8] = e[8] == null ? t[8] : pe(e[8], t[8])), e[9] == null && (e[9] = t[9]), e[0] = t[0], e[1] = s, e;
|
|
2163
2163
|
}
|
|
2164
2164
|
function Yf(e) {
|
|
2165
2165
|
var t = [];
|
|
2166
2166
|
if (e != null)
|
|
2167
|
-
for (var n in
|
|
2167
|
+
for (var n in q(e))
|
|
2168
2168
|
t.push(n);
|
|
2169
2169
|
return t;
|
|
2170
2170
|
}
|
|
@@ -2222,10 +2222,10 @@ function Qm() {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
return e.length = t, e;
|
|
2224
2224
|
}
|
|
2225
|
-
var ro =
|
|
2225
|
+
var ro = Vf(function(e) {
|
|
2226
2226
|
var t = [];
|
|
2227
2227
|
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Mu, function(n, r, s, u) {
|
|
2228
|
-
t.push(s ? u.replace(
|
|
2228
|
+
t.push(s ? u.replace(qu, "$1") : r || n);
|
|
2229
2229
|
}), t;
|
|
2230
2230
|
});
|
|
2231
2231
|
function nt(e) {
|
|
@@ -2358,13 +2358,13 @@ function Qm() {
|
|
|
2358
2358
|
return t ? Be(e, 0, -1) : [];
|
|
2359
2359
|
}
|
|
2360
2360
|
var dh = N(function(e) {
|
|
2361
|
-
var t =
|
|
2361
|
+
var t = j(e, xi);
|
|
2362
2362
|
return t.length && t[0] === e[0] ? pi(t) : [];
|
|
2363
2363
|
}), gh = N(function(e) {
|
|
2364
|
-
var t = ke(e), n =
|
|
2364
|
+
var t = ke(e), n = j(e, xi);
|
|
2365
2365
|
return t === ke(n) ? t = i : n.pop(), n.length && n[0] === e[0] ? pi(n, T(t, 2)) : [];
|
|
2366
2366
|
}), mh = N(function(e) {
|
|
2367
|
-
var t = ke(e), n =
|
|
2367
|
+
var t = ke(e), n = j(e, xi);
|
|
2368
2368
|
return t = typeof t == "function" ? t : i, t && n.pop(), n.length && n[0] === e[0] ? pi(n, i, t) : [];
|
|
2369
2369
|
});
|
|
2370
2370
|
function vh(e, t) {
|
|
@@ -2396,7 +2396,7 @@ function Qm() {
|
|
|
2396
2396
|
}
|
|
2397
2397
|
var xh = lt(function(e, t) {
|
|
2398
2398
|
var n = e == null ? 0 : e.length, r = li(e, t);
|
|
2399
|
-
return Ia(e,
|
|
2399
|
+
return Ia(e, j(t, function(s) {
|
|
2400
2400
|
return ct(s, n) ? +s : s;
|
|
2401
2401
|
}).sort(La)), r;
|
|
2402
2402
|
});
|
|
@@ -2497,22 +2497,22 @@ function Qm() {
|
|
|
2497
2497
|
if (ie(n))
|
|
2498
2498
|
return t = ue(n.length, t), !0;
|
|
2499
2499
|
}), ti(t, function(n) {
|
|
2500
|
-
return
|
|
2500
|
+
return j(e, Qr(n));
|
|
2501
2501
|
});
|
|
2502
2502
|
}
|
|
2503
2503
|
function co(e, t) {
|
|
2504
2504
|
if (!(e && e.length))
|
|
2505
2505
|
return [];
|
|
2506
2506
|
var n = Wi(e);
|
|
2507
|
-
return t == null ? n :
|
|
2507
|
+
return t == null ? n : j(n, function(r) {
|
|
2508
2508
|
return Te(t, i, r);
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
2511
2511
|
var Kh = N(function(e, t) {
|
|
2512
2512
|
return ie(e) ? wn(e, t) : [];
|
|
2513
|
-
}), qh = N(function(e) {
|
|
2514
|
-
return Ii(yt(e, ie));
|
|
2515
2513
|
}), Vh = N(function(e) {
|
|
2514
|
+
return Ii(yt(e, ie));
|
|
2515
|
+
}), qh = N(function(e) {
|
|
2516
2516
|
var t = ke(e);
|
|
2517
2517
|
return ie(t) && (t = i), Ii(yt(e, ie), T(t, 2));
|
|
2518
2518
|
}), Yh = N(function(e) {
|
|
@@ -2590,7 +2590,7 @@ function Qm() {
|
|
|
2590
2590
|
return Ta(this.__wrapped__, this.__actions__);
|
|
2591
2591
|
}
|
|
2592
2592
|
var up = ur(function(e, t, n) {
|
|
2593
|
-
|
|
2593
|
+
V.call(e, n) ? ++e[n] : ot(e, n, 1);
|
|
2594
2594
|
});
|
|
2595
2595
|
function lp(e, t, n) {
|
|
2596
2596
|
var r = R(e) ? Bs : Qc;
|
|
@@ -2619,7 +2619,7 @@ function Qm() {
|
|
|
2619
2619
|
return n(e, T(t, 3));
|
|
2620
2620
|
}
|
|
2621
2621
|
var mp = ur(function(e, t, n) {
|
|
2622
|
-
|
|
2622
|
+
V.call(e, n) ? e[n].push(t) : ot(e, n, [t]);
|
|
2623
2623
|
});
|
|
2624
2624
|
function vp(e, t, n, r) {
|
|
2625
2625
|
e = Se(e) ? e : en(e), n = n && !r ? L(n) : 0;
|
|
@@ -2635,7 +2635,7 @@ function Qm() {
|
|
|
2635
2635
|
ot(e, n, t);
|
|
2636
2636
|
});
|
|
2637
2637
|
function vr(e, t) {
|
|
2638
|
-
var n = R(e) ?
|
|
2638
|
+
var n = R(e) ? j : ma;
|
|
2639
2639
|
return n(e, T(t, 3));
|
|
2640
2640
|
}
|
|
2641
2641
|
function wp(e, t, n, r) {
|
|
@@ -2664,7 +2664,7 @@ function Qm() {
|
|
|
2664
2664
|
}
|
|
2665
2665
|
function bp(e, t, n) {
|
|
2666
2666
|
(n ? ve(e, t, n) : t === i) ? t = 1 : t = L(t);
|
|
2667
|
-
var r = R(e) ?
|
|
2667
|
+
var r = R(e) ? qc : yf;
|
|
2668
2668
|
return r(e, t);
|
|
2669
2669
|
}
|
|
2670
2670
|
function Tp(e) {
|
|
@@ -2677,7 +2677,7 @@ function Qm() {
|
|
|
2677
2677
|
if (Se(e))
|
|
2678
2678
|
return Ir(e) ? zt(e) : e.length;
|
|
2679
2679
|
var t = de(e);
|
|
2680
|
-
return t == Ke || t ==
|
|
2680
|
+
return t == Ke || t == Ve ? e.size : gi(e).length;
|
|
2681
2681
|
}
|
|
2682
2682
|
function Fp(e, t, n) {
|
|
2683
2683
|
var r = R(e) ? Xr : Sf;
|
|
@@ -2693,7 +2693,7 @@ function Qm() {
|
|
|
2693
2693
|
};
|
|
2694
2694
|
function Rp(e, t) {
|
|
2695
2695
|
if (typeof t != "function")
|
|
2696
|
-
throw new De(
|
|
2696
|
+
throw new De(x);
|
|
2697
2697
|
return e = L(e), function() {
|
|
2698
2698
|
if (--e < 1)
|
|
2699
2699
|
return t.apply(this, arguments);
|
|
@@ -2705,7 +2705,7 @@ function Qm() {
|
|
|
2705
2705
|
function mo(e, t) {
|
|
2706
2706
|
var n;
|
|
2707
2707
|
if (typeof t != "function")
|
|
2708
|
-
throw new De(
|
|
2708
|
+
throw new De(x);
|
|
2709
2709
|
return e = L(e), function() {
|
|
2710
2710
|
return --e > 0 && (n = t.apply(this, arguments)), e <= 1 && (t = i), n;
|
|
2711
2711
|
};
|
|
@@ -2738,8 +2738,8 @@ function Qm() {
|
|
|
2738
2738
|
function wo(e, t, n) {
|
|
2739
2739
|
var r, s, u, c, f, g, _ = 0, w = !1, S = !1, A = !0;
|
|
2740
2740
|
if (typeof e != "function")
|
|
2741
|
-
throw new De(
|
|
2742
|
-
t = Ge(t) || 0,
|
|
2741
|
+
throw new De(x);
|
|
2742
|
+
t = Ge(t) || 0, te(n) && (w = !!n.leading, S = "maxWait" in n, u = S ? ue(Ge(n.maxWait) || 0, t) : u, A = "trailing" in n ? !!n.trailing : A);
|
|
2743
2743
|
function b(se) {
|
|
2744
2744
|
var Je = r, pt = s;
|
|
2745
2745
|
return r = s = i, _ = se, c = e.apply(pt, Je), c;
|
|
@@ -2792,7 +2792,7 @@ function Qm() {
|
|
|
2792
2792
|
}
|
|
2793
2793
|
function _r(e, t) {
|
|
2794
2794
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
2795
|
-
throw new De(
|
|
2795
|
+
throw new De(x);
|
|
2796
2796
|
var n = function() {
|
|
2797
2797
|
var r = arguments, s = t ? t.apply(this, r) : r[0], u = n.cache;
|
|
2798
2798
|
if (u.has(s))
|
|
@@ -2805,7 +2805,7 @@ function Qm() {
|
|
|
2805
2805
|
_r.Cache = at;
|
|
2806
2806
|
function wr(e) {
|
|
2807
2807
|
if (typeof e != "function")
|
|
2808
|
-
throw new De(
|
|
2808
|
+
throw new De(x);
|
|
2809
2809
|
return function() {
|
|
2810
2810
|
var t = arguments;
|
|
2811
2811
|
switch (t.length) {
|
|
@@ -2825,7 +2825,7 @@ function Qm() {
|
|
|
2825
2825
|
return mo(2, e);
|
|
2826
2826
|
}
|
|
2827
2827
|
var $p = If(function(e, t) {
|
|
2828
|
-
t = t.length == 1 && R(t[0]) ?
|
|
2828
|
+
t = t.length == 1 && R(t[0]) ? j(t[0], Ce(T())) : j(he(t, 1), Ce(T()));
|
|
2829
2829
|
var n = t.length;
|
|
2830
2830
|
return N(function(r) {
|
|
2831
2831
|
for (var s = -1, u = pe(r.length, n); ++s < u; )
|
|
@@ -2843,12 +2843,12 @@ function Qm() {
|
|
|
2843
2843
|
});
|
|
2844
2844
|
function Wp(e, t) {
|
|
2845
2845
|
if (typeof e != "function")
|
|
2846
|
-
throw new De(
|
|
2846
|
+
throw new De(x);
|
|
2847
2847
|
return t = t === i ? t : L(t), N(e, t);
|
|
2848
2848
|
}
|
|
2849
2849
|
function Mp(e, t) {
|
|
2850
2850
|
if (typeof e != "function")
|
|
2851
|
-
throw new De(
|
|
2851
|
+
throw new De(x);
|
|
2852
2852
|
return t = t == null ? 0 : ue(L(t), 0), N(function(n) {
|
|
2853
2853
|
var r = n[t], s = Et(n, 0, t);
|
|
2854
2854
|
return r && _t(s, r), Te(e, this, s);
|
|
@@ -2857,8 +2857,8 @@ function Qm() {
|
|
|
2857
2857
|
function Bp(e, t, n) {
|
|
2858
2858
|
var r = !0, s = !0;
|
|
2859
2859
|
if (typeof e != "function")
|
|
2860
|
-
throw new De(
|
|
2861
|
-
return
|
|
2860
|
+
throw new De(x);
|
|
2861
|
+
return te(n) && (r = "leading" in n ? !!n.leading : r, s = "trailing" in n ? !!n.trailing : s), wo(e, t, {
|
|
2862
2862
|
leading: r,
|
|
2863
2863
|
maxWait: t,
|
|
2864
2864
|
trailing: s
|
|
@@ -2882,10 +2882,10 @@ function Qm() {
|
|
|
2882
2882
|
function Kp(e, t) {
|
|
2883
2883
|
return t = typeof t == "function" ? t : i, Me(e, B, t);
|
|
2884
2884
|
}
|
|
2885
|
-
function
|
|
2885
|
+
function Vp(e) {
|
|
2886
2886
|
return Me(e, z | B);
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function qp(e, t) {
|
|
2889
2889
|
return t = typeof t == "function" ? t : i, Me(e, z | B, t);
|
|
2890
2890
|
}
|
|
2891
2891
|
function Yp(e, t) {
|
|
@@ -2899,7 +2899,7 @@ function Qm() {
|
|
|
2899
2899
|
}), Wt = pa(/* @__PURE__ */ function() {
|
|
2900
2900
|
return arguments;
|
|
2901
2901
|
}()) ? pa : function(e) {
|
|
2902
|
-
return re(e) &&
|
|
2902
|
+
return re(e) && V.call(e, "callee") && !js.call(e, "callee");
|
|
2903
2903
|
}, R = m.isArray, Xp = Us ? Ce(Us) : sf;
|
|
2904
2904
|
function Se(e) {
|
|
2905
2905
|
return e != null && Sr(e.length) && !ft(e);
|
|
@@ -2920,12 +2920,12 @@ function Qm() {
|
|
|
2920
2920
|
if (Se(e) && (R(e) || typeof e == "string" || typeof e.splice == "function" || bt(e) || jt(e) || Wt(e)))
|
|
2921
2921
|
return !e.length;
|
|
2922
2922
|
var t = de(e);
|
|
2923
|
-
if (t == Ke || t ==
|
|
2923
|
+
if (t == Ke || t == Ve)
|
|
2924
2924
|
return !e.size;
|
|
2925
2925
|
if (En(e))
|
|
2926
2926
|
return !gi(e).length;
|
|
2927
2927
|
for (var n in e)
|
|
2928
|
-
if (
|
|
2928
|
+
if (V.call(e, n))
|
|
2929
2929
|
return !1;
|
|
2930
2930
|
return !0;
|
|
2931
2931
|
}
|
|
@@ -2947,7 +2947,7 @@ function Qm() {
|
|
|
2947
2947
|
return typeof e == "number" && ta(e);
|
|
2948
2948
|
}
|
|
2949
2949
|
function ft(e) {
|
|
2950
|
-
if (!
|
|
2950
|
+
if (!te(e))
|
|
2951
2951
|
return !1;
|
|
2952
2952
|
var t = me(e);
|
|
2953
2953
|
return t == Un || t == us || t == Au || t == Tu;
|
|
@@ -2958,7 +2958,7 @@ function Qm() {
|
|
|
2958
2958
|
function Sr(e) {
|
|
2959
2959
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= vt;
|
|
2960
2960
|
}
|
|
2961
|
-
function
|
|
2961
|
+
function te(e) {
|
|
2962
2962
|
var t = typeof e;
|
|
2963
2963
|
return e != null && (t == "object" || t == "function");
|
|
2964
2964
|
}
|
|
@@ -2977,7 +2977,7 @@ function Qm() {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
function ud(e) {
|
|
2979
2979
|
if (Kf(e))
|
|
2980
|
-
throw new P(
|
|
2980
|
+
throw new P(I);
|
|
2981
2981
|
return da(e);
|
|
2982
2982
|
}
|
|
2983
2983
|
function ld(e) {
|
|
@@ -2995,7 +2995,7 @@ function Qm() {
|
|
|
2995
2995
|
var t = Yn(e);
|
|
2996
2996
|
if (t === null)
|
|
2997
2997
|
return !0;
|
|
2998
|
-
var n =
|
|
2998
|
+
var n = V.call(t, "constructor") && t.constructor;
|
|
2999
2999
|
return typeof n == "function" && n instanceof n && zn.call(n) == sc;
|
|
3000
3000
|
}
|
|
3001
3001
|
var Gi = Ds ? Ce(Ds) : lf;
|
|
@@ -3026,10 +3026,10 @@ function Qm() {
|
|
|
3026
3026
|
if (!e)
|
|
3027
3027
|
return [];
|
|
3028
3028
|
if (Se(e))
|
|
3029
|
-
return Ir(e) ?
|
|
3029
|
+
return Ir(e) ? qe(e) : we(e);
|
|
3030
3030
|
if (dn && e[dn])
|
|
3031
|
-
return
|
|
3032
|
-
var t = de(e), n = t == Ke ? ri : t ==
|
|
3031
|
+
return ql(e[dn]());
|
|
3032
|
+
var t = de(e), n = t == Ke ? ri : t == Ve ? kn : en;
|
|
3033
3033
|
return n(e);
|
|
3034
3034
|
}
|
|
3035
3035
|
function ht(e) {
|
|
@@ -3053,9 +3053,9 @@ function Qm() {
|
|
|
3053
3053
|
return e;
|
|
3054
3054
|
if (Pe(e))
|
|
3055
3055
|
return Rn;
|
|
3056
|
-
if (
|
|
3056
|
+
if (te(e)) {
|
|
3057
3057
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
3058
|
-
e =
|
|
3058
|
+
e = te(t) ? t + "" : t;
|
|
3059
3059
|
}
|
|
3060
3060
|
if (typeof e != "string")
|
|
3061
3061
|
return e === 0 ? e : +e;
|
|
@@ -3078,7 +3078,7 @@ function Qm() {
|
|
|
3078
3078
|
return;
|
|
3079
3079
|
}
|
|
3080
3080
|
for (var n in t)
|
|
3081
|
-
|
|
3081
|
+
V.call(t, n) && _n(e, n, t[n]);
|
|
3082
3082
|
}), Fo = Jt(function(e, t) {
|
|
3083
3083
|
tt(t, Ie(t), e);
|
|
3084
3084
|
}), xr = Jt(function(e, t, n, r) {
|
|
@@ -3091,12 +3091,12 @@ function Qm() {
|
|
|
3091
3091
|
return t == null ? n : aa(n, t);
|
|
3092
3092
|
}
|
|
3093
3093
|
var Id = N(function(e, t) {
|
|
3094
|
-
e =
|
|
3094
|
+
e = q(e);
|
|
3095
3095
|
var n = -1, r = t.length, s = r > 2 ? t[2] : i;
|
|
3096
3096
|
for (s && ve(t[0], t[1], s) && (r = 1); ++n < r; )
|
|
3097
3097
|
for (var u = t[n], c = Ie(u), f = -1, g = c.length; ++f < g; ) {
|
|
3098
3098
|
var _ = c[f], w = e[_];
|
|
3099
|
-
(w === i || Ze(w,
|
|
3099
|
+
(w === i || Ze(w, Vt[_]) && !V.call(e, _)) && (e[_] = u[_]);
|
|
3100
3100
|
}
|
|
3101
3101
|
return e;
|
|
3102
3102
|
}), xd = N(function(e) {
|
|
@@ -3138,8 +3138,8 @@ function Qm() {
|
|
|
3138
3138
|
}
|
|
3139
3139
|
var Od = Ba(function(e, t, n) {
|
|
3140
3140
|
t != null && typeof t.toString != "function" && (t = Kn.call(t)), e[t] = n;
|
|
3141
|
-
},
|
|
3142
|
-
t != null && typeof t.toString != "function" && (t = Kn.call(t)),
|
|
3141
|
+
}, Vi(xe)), Ud = Ba(function(e, t, n) {
|
|
3142
|
+
t != null && typeof t.toString != "function" && (t = Kn.call(t)), V.call(e, t) ? e[t].push(n) : e[t] = [n];
|
|
3143
3143
|
}, T), Nd = N(Sn);
|
|
3144
3144
|
function ce(e) {
|
|
3145
3145
|
return Se(e) ? ia(e) : gi(e);
|
|
@@ -3168,7 +3168,7 @@ function Qm() {
|
|
|
3168
3168
|
if (e == null)
|
|
3169
3169
|
return n;
|
|
3170
3170
|
var r = !1;
|
|
3171
|
-
t =
|
|
3171
|
+
t = j(t, function(u) {
|
|
3172
3172
|
return u = At(u, e), r || (r = u.length > 1), u;
|
|
3173
3173
|
}), tt(e, Fi(e), n), r && (n = Me(n, z | Xe | B, Of));
|
|
3174
3174
|
for (var s = t.length; s--; )
|
|
@@ -3184,7 +3184,7 @@ function Qm() {
|
|
|
3184
3184
|
function Ro(e, t) {
|
|
3185
3185
|
if (e == null)
|
|
3186
3186
|
return {};
|
|
3187
|
-
var n =
|
|
3187
|
+
var n = j(Fi(e), function(r) {
|
|
3188
3188
|
return [r];
|
|
3189
3189
|
});
|
|
3190
3190
|
return t = T(t), Sa(e, n, function(r, s) {
|
|
@@ -3211,16 +3211,16 @@ function Qm() {
|
|
|
3211
3211
|
var r = R(e), s = r || bt(e) || jt(e);
|
|
3212
3212
|
if (t = T(t, 4), n == null) {
|
|
3213
3213
|
var u = e && e.constructor;
|
|
3214
|
-
s ? n = r ? new u() : [] :
|
|
3214
|
+
s ? n = r ? new u() : [] : te(e) ? n = ft(u) ? Zt(Yn(e)) : {} : n = {};
|
|
3215
3215
|
}
|
|
3216
3216
|
return (s ? $e : et)(e, function(c, f, g) {
|
|
3217
3217
|
return t(n, c, f, g);
|
|
3218
3218
|
}), n;
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3220
|
+
function Vd(e, t) {
|
|
3221
3221
|
return e == null ? !0 : Si(e, t);
|
|
3222
3222
|
}
|
|
3223
|
-
function
|
|
3223
|
+
function qd(e, t, n) {
|
|
3224
3224
|
return e == null ? e : ba(e, t, Ai(n));
|
|
3225
3225
|
}
|
|
3226
3226
|
function Yd(e, t, n, r) {
|
|
@@ -3308,7 +3308,7 @@ function Qm() {
|
|
|
3308
3308
|
return e + (n ? "_" : "") + t.toLowerCase();
|
|
3309
3309
|
});
|
|
3310
3310
|
function pg(e, t, n) {
|
|
3311
|
-
return n && typeof n != "number" && ve(e, t, n) && (t = n = i), n = n === i ? je : n >>> 0, n ? (e = K(e), e && (typeof t == "string" || t != null && !Gi(t)) && (t = Fe(t), !t && Ht(e)) ? Et(
|
|
3311
|
+
return n && typeof n != "number" && ve(e, t, n) && (t = n = i), n = n === i ? je : n >>> 0, n ? (e = K(e), e && (typeof t == "string" || t != null && !Gi(t)) && (t = Fe(t), !t && Ht(e)) ? Et(qe(e), 0, n) : e.split(t, n)) : [];
|
|
3312
3312
|
}
|
|
3313
3313
|
var dg = Xt(function(e, t, n) {
|
|
3314
3314
|
return e + (n ? " " : "") + Ki(t);
|
|
@@ -3322,7 +3322,7 @@ function Qm() {
|
|
|
3322
3322
|
var s = xr({}, t.imports, r.imports, za), u = ce(s), c = ni(s, u), f, g, _ = 0, w = t.interpolate || $n, S = "__p += '", A = ii(
|
|
3323
3323
|
(t.escape || $n).source + "|" + w.source + "|" + (w === hs ? Yu : $n).source + "|" + (t.evaluate || $n).source + "|$",
|
|
3324
3324
|
"g"
|
|
3325
|
-
), b = "//# sourceURL=" + (
|
|
3325
|
+
), b = "//# sourceURL=" + (V.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++Al + "]") + `
|
|
3326
3326
|
`;
|
|
3327
3327
|
e.replace(A, function(F, W, k, Re, ye, Le) {
|
|
3328
3328
|
return k || (k = Re), S += e.slice(_, Le).replace(tl, zl), W && (f = !0, S += `' +
|
|
@@ -3334,13 +3334,13 @@ __p += '`), k && (S += `' +
|
|
|
3334
3334
|
'`), _ = Le + F.length, F;
|
|
3335
3335
|
}), S += `';
|
|
3336
3336
|
`;
|
|
3337
|
-
var C =
|
|
3337
|
+
var C = V.call(t, "variable") && t.variable;
|
|
3338
3338
|
if (!C)
|
|
3339
3339
|
S = `with (obj) {
|
|
3340
3340
|
` + S + `
|
|
3341
3341
|
}
|
|
3342
3342
|
`;
|
|
3343
|
-
else if (
|
|
3343
|
+
else if (Vu.test(C))
|
|
3344
3344
|
throw new P(O);
|
|
3345
3345
|
S = (g ? S.replace(Pu, "") : S).replace(Ru, "$1").replace(Lu, "$1;"), S = "function(" + (C || "obj") + `) {
|
|
3346
3346
|
` + (C ? "" : `obj || (obj = {});
|
|
@@ -3367,7 +3367,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3367
3367
|
return Ks(e);
|
|
3368
3368
|
if (!e || !(t = Fe(t)))
|
|
3369
3369
|
return e;
|
|
3370
|
-
var r =
|
|
3370
|
+
var r = qe(e), s = qe(t), u = Vs(r, s), c = qs(r, s) + 1;
|
|
3371
3371
|
return Et(r, u, c).join("");
|
|
3372
3372
|
}
|
|
3373
3373
|
function wg(e, t, n) {
|
|
@@ -3375,7 +3375,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3375
3375
|
return e.slice(0, Zs(e) + 1);
|
|
3376
3376
|
if (!e || !(t = Fe(t)))
|
|
3377
3377
|
return e;
|
|
3378
|
-
var r =
|
|
3378
|
+
var r = qe(e), s = qs(r, qe(t)) + 1;
|
|
3379
3379
|
return Et(r, 0, s).join("");
|
|
3380
3380
|
}
|
|
3381
3381
|
function Sg(e, t, n) {
|
|
@@ -3383,19 +3383,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3383
3383
|
return e.replace(kr, "");
|
|
3384
3384
|
if (!e || !(t = Fe(t)))
|
|
3385
3385
|
return e;
|
|
3386
|
-
var r =
|
|
3386
|
+
var r = qe(e), s = Vs(r, qe(t));
|
|
3387
3387
|
return Et(r, s).join("");
|
|
3388
3388
|
}
|
|
3389
3389
|
function Ig(e, t) {
|
|
3390
3390
|
var n = du, r = gu;
|
|
3391
|
-
if (
|
|
3391
|
+
if (te(t)) {
|
|
3392
3392
|
var s = "separator" in t ? t.separator : s;
|
|
3393
3393
|
n = "length" in t ? L(t.length) : n, r = "omission" in t ? Fe(t.omission) : r;
|
|
3394
3394
|
}
|
|
3395
3395
|
e = K(e);
|
|
3396
3396
|
var u = e.length;
|
|
3397
3397
|
if (Ht(e)) {
|
|
3398
|
-
var c =
|
|
3398
|
+
var c = qe(e);
|
|
3399
3399
|
u = c.length;
|
|
3400
3400
|
}
|
|
3401
3401
|
if (n >= u)
|
|
@@ -3426,7 +3426,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3426
3426
|
return e + (n ? " " : "") + t.toUpperCase();
|
|
3427
3427
|
}), Ki = Da("toUpperCase");
|
|
3428
3428
|
function $o(e, t, n) {
|
|
3429
|
-
return e = K(e), t = n ? i : t, t === i ?
|
|
3429
|
+
return e = K(e), t = n ? i : t, t === i ? Vl(e) ? ec(e) : Dl(e) : e.match(t) || [];
|
|
3430
3430
|
}
|
|
3431
3431
|
var Do = N(function(e, t) {
|
|
3432
3432
|
try {
|
|
@@ -3441,9 +3441,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3441
3441
|
});
|
|
3442
3442
|
function bg(e) {
|
|
3443
3443
|
var t = e == null ? 0 : e.length, n = T();
|
|
3444
|
-
return e = t ?
|
|
3444
|
+
return e = t ? j(e, function(r) {
|
|
3445
3445
|
if (typeof r[1] != "function")
|
|
3446
|
-
throw new De(
|
|
3446
|
+
throw new De(x);
|
|
3447
3447
|
return [n(r[0]), r[1]];
|
|
3448
3448
|
}) : [], N(function(r) {
|
|
3449
3449
|
for (var s = -1; ++s < t; ) {
|
|
@@ -3456,7 +3456,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3456
3456
|
function Tg(e) {
|
|
3457
3457
|
return Xc(Me(e, z));
|
|
3458
3458
|
}
|
|
3459
|
-
function
|
|
3459
|
+
function Vi(e) {
|
|
3460
3460
|
return function() {
|
|
3461
3461
|
return e;
|
|
3462
3462
|
};
|
|
@@ -3468,7 +3468,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3468
3468
|
function xe(e) {
|
|
3469
3469
|
return e;
|
|
3470
3470
|
}
|
|
3471
|
-
function
|
|
3471
|
+
function qi(e) {
|
|
3472
3472
|
return ga(typeof e == "function" ? e : Me(e, z));
|
|
3473
3473
|
}
|
|
3474
3474
|
function Rg(e) {
|
|
@@ -3488,8 +3488,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3488
3488
|
});
|
|
3489
3489
|
function Yi(e, t, n) {
|
|
3490
3490
|
var r = ce(t), s = ir(t, r);
|
|
3491
|
-
n == null && !(
|
|
3492
|
-
var u = !(
|
|
3491
|
+
n == null && !(te(t) && (s.length || !r.length)) && (n = t, t = e, e = this, s = ir(t, ce(t)));
|
|
3492
|
+
var u = !(te(n) && "chain" in n) || !!n.chain, c = ft(e);
|
|
3493
3493
|
return $e(s, function(f) {
|
|
3494
3494
|
var g = t[f];
|
|
3495
3495
|
e[f] = g, c && (e.prototype[f] = function() {
|
|
@@ -3512,7 +3512,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3512
3512
|
return _a(t, e);
|
|
3513
3513
|
});
|
|
3514
3514
|
}
|
|
3515
|
-
var Dg = bi(
|
|
3515
|
+
var Dg = bi(j), Wg = bi(Bs), Mg = bi(Xr);
|
|
3516
3516
|
function Wo(e) {
|
|
3517
3517
|
return Oi(e) ? Qr(nt(e)) : gf(e);
|
|
3518
3518
|
}
|
|
@@ -3537,7 +3537,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3537
3537
|
function Kg() {
|
|
3538
3538
|
return !0;
|
|
3539
3539
|
}
|
|
3540
|
-
function
|
|
3540
|
+
function Vg(e, t) {
|
|
3541
3541
|
if (e = L(e), e < 1 || e > vt)
|
|
3542
3542
|
return [];
|
|
3543
3543
|
var n = je, r = pe(e, je);
|
|
@@ -3546,8 +3546,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3546
3546
|
t(n);
|
|
3547
3547
|
return s;
|
|
3548
3548
|
}
|
|
3549
|
-
function
|
|
3550
|
-
return R(e) ?
|
|
3549
|
+
function qg(e) {
|
|
3550
|
+
return R(e) ? j(e, nt) : Pe(e) ? [e] : we(ro(K(e)));
|
|
3551
3551
|
}
|
|
3552
3552
|
function Yg(e) {
|
|
3553
3553
|
var t = ++ic;
|
|
@@ -3587,10 +3587,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3587
3587
|
function lm(e, t) {
|
|
3588
3588
|
return e && e.length ? ei(e, T(t, 2)) : 0;
|
|
3589
3589
|
}
|
|
3590
|
-
return o.after = Rp, o.ary = go, o.assign = yd, o.assignIn = Fo, o.assignInWith = xr, o.assignWith = _d, o.at = wd, o.before = mo, o.bind = Mi, o.bindAll = Eg, o.bindKey = vo, o.castArray = Hp, o.chain = fo, o.chunk = Qf, o.compact = jf, o.concat = eh, o.cond = bg, o.conforms = Tg, o.constant =
|
|
3590
|
+
return o.after = Rp, o.ary = go, o.assign = yd, o.assignIn = Fo, o.assignInWith = xr, o.assignWith = _d, o.at = wd, o.before = mo, o.bind = Mi, o.bindAll = Eg, o.bindKey = vo, o.castArray = Hp, o.chain = fo, o.chunk = Qf, o.compact = jf, o.concat = eh, o.cond = bg, o.conforms = Tg, o.constant = Vi, o.countBy = up, o.create = Sd, o.curry = yo, o.curryRight = _o, o.debounce = wo, o.defaults = Id, o.defaultsDeep = xd, o.defer = Lp, o.delay = Op, o.difference = th, o.differenceBy = nh, o.differenceWith = rh, o.drop = ih, o.dropRight = sh, o.dropRightWhile = ah, o.dropWhile = oh, o.fill = uh, o.filter = cp, o.flatMap = pp, o.flatMapDeep = dp, o.flatMapDepth = gp, o.flatten = oo, o.flattenDeep = lh, o.flattenDepth = ch, o.flip = Up, o.flow = Fg, o.flowRight = Pg, o.fromPairs = fh, o.functions = Pd, o.functionsIn = Rd, o.groupBy = mp, o.initial = ph, o.intersection = dh, o.intersectionBy = gh, o.intersectionWith = mh, o.invert = Od, o.invertBy = Ud, o.invokeMap = yp, o.iteratee = qi, o.keyBy = _p, o.keys = ce, o.keysIn = Ie, o.map = vr, o.mapKeys = $d, o.mapValues = Dd, o.matches = Rg, o.matchesProperty = Lg, o.memoize = _r, o.merge = Wd, o.mergeWith = Po, o.method = Og, o.methodOf = Ug, o.mixin = Yi, o.negate = wr, o.nthArg = $g, o.omit = Md, o.omitBy = Bd, o.once = Np, o.orderBy = wp, o.over = Dg, o.overArgs = $p, o.overEvery = Wg, o.overSome = Mg, o.partial = Bi, o.partialRight = So, o.partition = Sp, o.pick = kd, o.pickBy = Ro, o.property = Wo, o.propertyOf = Bg, o.pull = wh, o.pullAll = lo, o.pullAllBy = Sh, o.pullAllWith = Ih, o.pullAt = xh, o.range = kg, o.rangeRight = Gg, o.rearg = Dp, o.reject = Ap, o.remove = Ah, o.rest = Wp, o.reverse = Di, o.sampleSize = bp, o.set = Hd, o.setWith = zd, o.shuffle = Tp, o.slice = Eh, o.sortBy = Pp, o.sortedUniq = Lh, o.sortedUniqBy = Oh, o.split = pg, o.spread = Mp, o.tail = Uh, o.take = Nh, o.takeRight = $h, o.takeRightWhile = Dh, o.takeWhile = Wh, o.tap = jh, o.throttle = Bp, o.thru = mr, o.toArray = bo, o.toPairs = Lo, o.toPairsIn = Oo, o.toPath = qg, o.toPlainObject = Co, o.transform = Kd, o.unary = kp, o.union = Mh, o.unionBy = Bh, o.unionWith = kh, o.uniq = Gh, o.uniqBy = Hh, o.uniqWith = zh, o.unset = Vd, o.unzip = Wi, o.unzipWith = co, o.update = qd, o.updateWith = Yd, o.values = en, o.valuesIn = Zd, o.without = Kh, o.words = $o, o.wrap = Gp, o.xor = Vh, o.xorBy = qh, o.xorWith = Yh, o.zip = Zh, o.zipObject = Jh, o.zipObjectDeep = Xh, o.zipWith = Qh, o.entries = Lo, o.entriesIn = Oo, o.extend = Fo, o.extendWith = xr, Yi(o, o), o.add = Zg, o.attempt = Do, o.camelCase = jd, o.capitalize = Uo, o.ceil = Jg, o.clamp = Jd, o.clone = zp, o.cloneDeep = Vp, o.cloneDeepWith = qp, o.cloneWith = Kp, o.conformsTo = Yp, o.deburr = No, o.defaultTo = Cg, o.divide = Xg, o.endsWith = eg, o.eq = Ze, o.escape = tg, o.escapeRegExp = ng, o.every = lp, o.find = fp, o.findIndex = so, o.findKey = Ad, o.findLast = hp, o.findLastIndex = ao, o.findLastKey = Ed, o.floor = Qg, o.forEach = ho, o.forEachRight = po, o.forIn = bd, o.forInRight = Td, o.forOwn = Cd, o.forOwnRight = Fd, o.get = Hi, o.gt = Zp, o.gte = Jp, o.has = Ld, o.hasIn = zi, o.head = uo, o.identity = xe, o.includes = vp, o.indexOf = hh, o.inRange = Xd, o.invoke = Nd, o.isArguments = Wt, o.isArray = R, o.isArrayBuffer = Xp, o.isArrayLike = Se, o.isArrayLikeObject = ie, o.isBoolean = Qp, o.isBuffer = bt, o.isDate = jp, o.isElement = ed, o.isEmpty = td, o.isEqual = nd, o.isEqualWith = rd, o.isError = ki, o.isFinite = id, o.isFunction = ft, o.isInteger = Io, o.isLength = Sr, o.isMap = xo, o.isMatch = sd, o.isMatchWith = ad, o.isNaN = od, o.isNative = ud, o.isNil = cd, o.isNull = ld, o.isNumber = Ao, o.isObject = te, o.isObjectLike = re, o.isPlainObject = Tn, o.isRegExp = Gi, o.isSafeInteger = fd, o.isSet = Eo, o.isString = Ir, o.isSymbol = Pe, o.isTypedArray = jt, o.isUndefined = hd, o.isWeakMap = pd, o.isWeakSet = dd, o.join = vh, o.kebabCase = rg, o.last = ke, o.lastIndexOf = yh, o.lowerCase = ig, o.lowerFirst = sg, o.lt = gd, o.lte = md, o.max = jg, o.maxBy = em, o.mean = tm, o.meanBy = nm, o.min = rm, o.minBy = im, o.stubArray = Ji, o.stubFalse = Xi, o.stubObject = Hg, o.stubString = zg, o.stubTrue = Kg, o.multiply = sm, o.nth = _h, o.noConflict = Ng, o.noop = Zi, o.now = yr, o.pad = ag, o.padEnd = og, o.padStart = ug, o.parseInt = lg, o.random = Qd, o.reduce = Ip, o.reduceRight = xp, o.repeat = cg, o.replace = fg, o.result = Gd, o.round = am, o.runInContext = d, o.sample = Ep, o.size = Cp, o.snakeCase = hg, o.some = Fp, o.sortedIndex = bh, o.sortedIndexBy = Th, o.sortedIndexOf = Ch, o.sortedLastIndex = Fh, o.sortedLastIndexBy = Ph, o.sortedLastIndexOf = Rh, o.startCase = dg, o.startsWith = gg, o.subtract = om, o.sum = um, o.sumBy = lm, o.template = mg, o.times = Vg, o.toFinite = ht, o.toInteger = L, o.toLength = To, o.toLower = vg, o.toNumber = Ge, o.toSafeInteger = vd, o.toString = K, o.toUpper = yg, o.trim = _g, o.trimEnd = wg, o.trimStart = Sg, o.truncate = Ig, o.unescape = xg, o.uniqueId = Yg, o.upperCase = Ag, o.upperFirst = Ki, o.each = ho, o.eachRight = po, o.first = uo, Yi(o, function() {
|
|
3591
3591
|
var e = {};
|
|
3592
3592
|
return et(o, function(t, n) {
|
|
3593
|
-
|
|
3593
|
+
V.call(o.prototype, n) || (e[n] = t);
|
|
3594
3594
|
}), e;
|
|
3595
3595
|
}(), { chain: !1 }), o.VERSION = l, $e(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
|
|
3596
3596
|
o[e].placeholder = o;
|
|
@@ -3676,25 +3676,25 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3676
3676
|
var n = o[t];
|
|
3677
3677
|
if (n) {
|
|
3678
3678
|
var r = n.name + "";
|
|
3679
|
-
|
|
3679
|
+
V.call(Yt, r) || (Yt[r] = []), Yt[r].push({ name: t, func: n });
|
|
3680
3680
|
}
|
|
3681
3681
|
}), Yt[lr(i, Qe).name] = [{
|
|
3682
3682
|
name: "wrapper",
|
|
3683
3683
|
func: i
|
|
3684
3684
|
}], M.prototype.clone = Ic, M.prototype.reverse = xc, M.prototype.value = Ac, o.prototype.at = ep, o.prototype.chain = tp, o.prototype.commit = np, o.prototype.next = rp, o.prototype.plant = sp, o.prototype.reverse = ap, o.prototype.toJSON = o.prototype.valueOf = o.prototype.value = op, o.prototype.first = o.prototype.head, dn && (o.prototype[dn] = ip), o;
|
|
3685
3685
|
}, Kt = tc();
|
|
3686
|
-
Pt ? ((Pt.exports = Kt)._ = Kt,
|
|
3687
|
-
}).call(
|
|
3686
|
+
Pt ? ((Pt.exports = Kt)._ = Kt, qr._ = Kt) : fe._ = Kt;
|
|
3687
|
+
}).call(jm);
|
|
3688
3688
|
}(Fn, Fn.exports)), Fn.exports;
|
|
3689
3689
|
}
|
|
3690
|
-
var
|
|
3690
|
+
var tv = ev();
|
|
3691
3691
|
const ts = (h) => {
|
|
3692
|
-
const a =
|
|
3692
|
+
const a = tv.startCase(h).toLowerCase();
|
|
3693
3693
|
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
3694
|
-
},
|
|
3694
|
+
}, nv = ({
|
|
3695
3695
|
data: h
|
|
3696
3696
|
}) => {
|
|
3697
|
-
const a =
|
|
3697
|
+
const a = ne(), i = h.description ? `
|
|
3698
3698
|
description: '${h.description}',` : "";
|
|
3699
3699
|
return `import { defineField, FieldType } from 'twenty-sdk/define';
|
|
3700
3700
|
|
|
@@ -3706,9 +3706,9 @@ export default defineField({
|
|
|
3706
3706
|
objectUniversalIdentifier: '${h.objectUniversalIdentifier}',${i}
|
|
3707
3707
|
});
|
|
3708
3708
|
`;
|
|
3709
|
-
}, ge = (h) => h.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/([a-zA-Z])(\d)/g, "$1-$2").replace(/(\d)([a-zA-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").replace(/[^a-zA-Z0-9-]+/g, "-").toLowerCase(),
|
|
3709
|
+
}, ge = (h) => h.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/([a-zA-Z])(\d)/g, "$1-$2").replace(/(\d)([a-zA-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").replace(/[^a-zA-Z0-9-]+/g, "-").toLowerCase(), rv = ({
|
|
3710
3710
|
name: h,
|
|
3711
|
-
universalIdentifier: a =
|
|
3711
|
+
universalIdentifier: a = ne()
|
|
3712
3712
|
}) => {
|
|
3713
3713
|
const i = ge(h);
|
|
3714
3714
|
return `import { defineFrontComponent } from 'twenty-sdk/define';
|
|
@@ -3730,9 +3730,9 @@ export default defineFrontComponent({
|
|
|
3730
3730
|
component: Component,
|
|
3731
3731
|
});
|
|
3732
3732
|
`;
|
|
3733
|
-
},
|
|
3733
|
+
}, iv = ({
|
|
3734
3734
|
name: h,
|
|
3735
|
-
universalIdentifier: a =
|
|
3735
|
+
universalIdentifier: a = ne()
|
|
3736
3736
|
}) => {
|
|
3737
3737
|
const i = ge(h);
|
|
3738
3738
|
return `import { defineLogicFunction } from 'twenty-sdk/define';
|
|
@@ -3773,33 +3773,33 @@ export default defineLogicFunction({
|
|
|
3773
3773
|
// },
|
|
3774
3774
|
});
|
|
3775
3775
|
`;
|
|
3776
|
-
},
|
|
3776
|
+
}, qo = ({
|
|
3777
3777
|
name: h,
|
|
3778
|
-
universalIdentifier: a =
|
|
3778
|
+
universalIdentifier: a = ne(),
|
|
3779
3779
|
type: i,
|
|
3780
3780
|
viewUniversalIdentifier: l,
|
|
3781
|
-
targetObjectUniversalIdentifier:
|
|
3781
|
+
targetObjectUniversalIdentifier: p
|
|
3782
3782
|
}) => {
|
|
3783
|
-
const
|
|
3784
|
-
let
|
|
3785
|
-
return i === "OBJECT" &&
|
|
3786
|
-
targetObjectUniversalIdentifier: '${
|
|
3787
|
-
viewUniversalIdentifier: '${l}',` : i === "LINK" ?
|
|
3788
|
-
link: 'https://example.com',` : i === "FOLDER" ?
|
|
3789
|
-
// viewUniversalIdentifier: '...',`, `import { defineNavigationMenuItem } from 'twenty-sdk/define';
|
|
3783
|
+
const I = ge(h);
|
|
3784
|
+
let x;
|
|
3785
|
+
return i === "OBJECT" && p ? x = ` type: NavigationMenuItemType.OBJECT,
|
|
3786
|
+
targetObjectUniversalIdentifier: '${p}',` : i === "VIEW" && l ? x = ` type: NavigationMenuItemType.VIEW,
|
|
3787
|
+
viewUniversalIdentifier: '${l}',` : i === "LINK" ? x = ` type: NavigationMenuItemType.LINK,
|
|
3788
|
+
link: 'https://example.com',` : i === "FOLDER" ? x = " type: NavigationMenuItemType.FOLDER," : x = ` type: NavigationMenuItemType.VIEW,
|
|
3789
|
+
// viewUniversalIdentifier: '...',`, `import { defineNavigationMenuItem, NavigationMenuItemType } from 'twenty-sdk/define';
|
|
3790
3790
|
|
|
3791
3791
|
export default defineNavigationMenuItem({
|
|
3792
3792
|
universalIdentifier: '${a}',
|
|
3793
|
-
name: '${
|
|
3793
|
+
name: '${I}',
|
|
3794
3794
|
icon: 'IconList',
|
|
3795
3795
|
position: 0,
|
|
3796
|
-
${
|
|
3796
|
+
${x}
|
|
3797
3797
|
});
|
|
3798
3798
|
`;
|
|
3799
|
-
},
|
|
3799
|
+
}, sv = ({
|
|
3800
3800
|
data: h,
|
|
3801
|
-
universalIdentifier: a =
|
|
3802
|
-
nameFieldUniversalIdentifier: i =
|
|
3801
|
+
universalIdentifier: a = ne(),
|
|
3802
|
+
nameFieldUniversalIdentifier: i = ne()
|
|
3803
3803
|
}) => `import { defineObject, FieldType } from 'twenty-sdk/define';
|
|
3804
3804
|
|
|
3805
3805
|
export const NAME_FIELD_UNIVERSAL_IDENTIFIER =
|
|
@@ -3824,23 +3824,23 @@ export default defineObject({
|
|
|
3824
3824
|
},
|
|
3825
3825
|
],
|
|
3826
3826
|
});
|
|
3827
|
-
`,
|
|
3827
|
+
`, av = ({ name: h }) => `import { definePageLayout } from 'twenty-sdk/define';
|
|
3828
3828
|
|
|
3829
3829
|
export default definePageLayout({
|
|
3830
|
-
universalIdentifier: '${
|
|
3830
|
+
universalIdentifier: '${ne()}',
|
|
3831
3831
|
name: '${h}',
|
|
3832
3832
|
tabs: [
|
|
3833
3833
|
{
|
|
3834
|
-
universalIdentifier: '${
|
|
3834
|
+
universalIdentifier: '${ne()}',
|
|
3835
3835
|
title: 'Overview',
|
|
3836
3836
|
widgets: [],
|
|
3837
3837
|
},
|
|
3838
3838
|
],
|
|
3839
3839
|
});
|
|
3840
|
-
`,
|
|
3840
|
+
`, ov = ({ name: h }) => `import { definePageLayoutTab, PageLayoutTabLayoutMode } from 'twenty-sdk/define';
|
|
3841
3841
|
|
|
3842
3842
|
export default definePageLayoutTab({
|
|
3843
|
-
universalIdentifier: '${
|
|
3843
|
+
universalIdentifier: '${ne()}',
|
|
3844
3844
|
pageLayoutUniversalIdentifier: 'replace-with-existing-page-layout-uuid',
|
|
3845
3845
|
title: '${h}',
|
|
3846
3846
|
position: 1000,
|
|
@@ -3848,27 +3848,27 @@ export default definePageLayoutTab({
|
|
|
3848
3848
|
layoutMode: PageLayoutTabLayoutMode.CANVAS,
|
|
3849
3849
|
widgets: [],
|
|
3850
3850
|
});
|
|
3851
|
-
`,
|
|
3851
|
+
`, uv = ({
|
|
3852
3852
|
objectLabelSingular: h,
|
|
3853
3853
|
objectUniversalIdentifier: a,
|
|
3854
3854
|
fieldsWidgetViewUniversalIdentifier: i
|
|
3855
3855
|
}) => `import { definePageLayout, PageLayoutTabLayoutMode } from 'twenty-sdk/define';
|
|
3856
3856
|
|
|
3857
3857
|
export default definePageLayout({
|
|
3858
|
-
universalIdentifier: '${
|
|
3858
|
+
universalIdentifier: '${ne()}',
|
|
3859
3859
|
name: 'Default ${h} Layout',
|
|
3860
3860
|
type: 'RECORD_PAGE',
|
|
3861
3861
|
objectUniversalIdentifier: '${a}',
|
|
3862
3862
|
tabs: [
|
|
3863
3863
|
{
|
|
3864
|
-
universalIdentifier: '${
|
|
3864
|
+
universalIdentifier: '${ne()}',
|
|
3865
3865
|
title: 'Home',
|
|
3866
3866
|
position: 10,
|
|
3867
3867
|
icon: 'IconHome',
|
|
3868
3868
|
layoutMode: PageLayoutTabLayoutMode.VERTICAL_LIST,
|
|
3869
3869
|
widgets: [
|
|
3870
3870
|
{
|
|
3871
|
-
universalIdentifier: '${
|
|
3871
|
+
universalIdentifier: '${ne()}',
|
|
3872
3872
|
title: 'Fields',
|
|
3873
3873
|
type: 'FIELDS',
|
|
3874
3874
|
configuration: {
|
|
@@ -3879,14 +3879,14 @@ export default definePageLayout({
|
|
|
3879
3879
|
],
|
|
3880
3880
|
},
|
|
3881
3881
|
{
|
|
3882
|
-
universalIdentifier: '${
|
|
3882
|
+
universalIdentifier: '${ne()}',
|
|
3883
3883
|
title: 'Timeline',
|
|
3884
3884
|
position: 20,
|
|
3885
3885
|
icon: 'IconTimelineEvent',
|
|
3886
3886
|
layoutMode: PageLayoutTabLayoutMode.CANVAS,
|
|
3887
3887
|
widgets: [
|
|
3888
3888
|
{
|
|
3889
|
-
universalIdentifier: '${
|
|
3889
|
+
universalIdentifier: '${ne()}',
|
|
3890
3890
|
title: 'Timeline',
|
|
3891
3891
|
type: 'TIMELINE',
|
|
3892
3892
|
configuration: {
|
|
@@ -3897,9 +3897,9 @@ export default definePageLayout({
|
|
|
3897
3897
|
},
|
|
3898
3898
|
],
|
|
3899
3899
|
});
|
|
3900
|
-
`,
|
|
3900
|
+
`, lv = ({
|
|
3901
3901
|
name: h,
|
|
3902
|
-
universalIdentifier: a =
|
|
3902
|
+
universalIdentifier: a = ne()
|
|
3903
3903
|
}) => {
|
|
3904
3904
|
const i = ge(h);
|
|
3905
3905
|
return `import { defineRole } from 'twenty-sdk/define';
|
|
@@ -3917,9 +3917,9 @@ export default defineRole({
|
|
|
3917
3917
|
canDestroyAllObjectRecords: false,
|
|
3918
3918
|
});
|
|
3919
3919
|
`;
|
|
3920
|
-
},
|
|
3920
|
+
}, cv = ({
|
|
3921
3921
|
name: h,
|
|
3922
|
-
universalIdentifier: a =
|
|
3922
|
+
universalIdentifier: a = ne()
|
|
3923
3923
|
}) => {
|
|
3924
3924
|
const i = ge(h);
|
|
3925
3925
|
return `import { defineAgent } from 'twenty-sdk/define';
|
|
@@ -3935,9 +3935,9 @@ export default defineAgent({
|
|
|
3935
3935
|
prompt: 'Add the agent system prompt here',
|
|
3936
3936
|
});
|
|
3937
3937
|
`;
|
|
3938
|
-
},
|
|
3938
|
+
}, fv = ({
|
|
3939
3939
|
name: h,
|
|
3940
|
-
universalIdentifier: a =
|
|
3940
|
+
universalIdentifier: a = ne()
|
|
3941
3941
|
}) => {
|
|
3942
3942
|
const i = ge(h);
|
|
3943
3943
|
return `import { defineSkill } from 'twenty-sdk/define';
|
|
@@ -3953,34 +3953,34 @@ export default defineSkill({
|
|
|
3953
3953
|
content: 'Add the skill content here',
|
|
3954
3954
|
});
|
|
3955
3955
|
`;
|
|
3956
|
-
},
|
|
3956
|
+
}, hv = ({
|
|
3957
3957
|
field: h,
|
|
3958
3958
|
index: a,
|
|
3959
3959
|
objectUniversalIdentifier: i
|
|
3960
3960
|
}) => {
|
|
3961
|
-
const l = h.universalIdentifier ??
|
|
3961
|
+
const l = h.universalIdentifier ?? ne(), p = h.position ?? a, I = h.isVisible ?? !0, x = h.size ?? 200, O = "defaultFieldName" in h ? ` fieldMetadataUniversalIdentifier: generateDefaultFieldUniversalIdentifier({
|
|
3962
3962
|
objectUniversalIdentifier: '${i}',
|
|
3963
3963
|
fieldName: '${h.defaultFieldName}',
|
|
3964
3964
|
})` : ` fieldMetadataUniversalIdentifier: '${h.fieldMetadataUniversalIdentifier}'`;
|
|
3965
3965
|
return ` {
|
|
3966
3966
|
universalIdentifier: '${l}',
|
|
3967
3967
|
${O},
|
|
3968
|
-
position: ${
|
|
3969
|
-
isVisible: ${
|
|
3970
|
-
size: ${
|
|
3968
|
+
position: ${p},
|
|
3969
|
+
isVisible: ${I},
|
|
3970
|
+
size: ${x},
|
|
3971
3971
|
}`;
|
|
3972
3972
|
}, ns = ({
|
|
3973
3973
|
name: h,
|
|
3974
|
-
universalIdentifier: a =
|
|
3974
|
+
universalIdentifier: a = ne(),
|
|
3975
3975
|
objectUniversalIdentifier: i = "fill-later",
|
|
3976
3976
|
fields: l = [],
|
|
3977
|
-
type:
|
|
3977
|
+
type: p
|
|
3978
3978
|
}) => {
|
|
3979
|
-
const
|
|
3979
|
+
const I = ge(h), x = l.some(
|
|
3980
3980
|
(z) => "defaultFieldName" in z
|
|
3981
3981
|
), G = l.length > 0 ? ` fields: [
|
|
3982
3982
|
${l.map(
|
|
3983
|
-
(z, Xe) =>
|
|
3983
|
+
(z, Xe) => hv({ field: z, index: Xe, objectUniversalIdentifier: i })
|
|
3984
3984
|
).join(`,
|
|
3985
3985
|
`)},
|
|
3986
3986
|
],` : ` // fields: [
|
|
@@ -3990,18 +3990,18 @@ ${l.map(
|
|
|
3990
3990
|
// position: 0,
|
|
3991
3991
|
// isVisible: true,
|
|
3992
3992
|
// },
|
|
3993
|
-
// ],`,
|
|
3993
|
+
// ],`, J = p !== void 0 ? ` type: '${p}',
|
|
3994
3994
|
` : "";
|
|
3995
|
-
return `${
|
|
3995
|
+
return `${x ? `import {
|
|
3996
3996
|
defineView,
|
|
3997
3997
|
generateDefaultFieldUniversalIdentifier,
|
|
3998
3998
|
} from 'twenty-sdk/define';` : "import { defineView } from 'twenty-sdk/define';"}
|
|
3999
3999
|
|
|
4000
4000
|
export default defineView({
|
|
4001
4001
|
universalIdentifier: '${a}',
|
|
4002
|
-
name: '${
|
|
4002
|
+
name: '${I}',
|
|
4003
4003
|
objectUniversalIdentifier: '${i}',
|
|
4004
|
-
${
|
|
4004
|
+
${J} icon: 'IconList',
|
|
4005
4005
|
position: 0,
|
|
4006
4006
|
${G}
|
|
4007
4007
|
// filters: [
|
|
@@ -4022,24 +4022,24 @@ ${G}
|
|
|
4022
4022
|
});
|
|
4023
4023
|
`;
|
|
4024
4024
|
}, Cr = "src";
|
|
4025
|
-
class
|
|
4025
|
+
class pv {
|
|
4026
4026
|
async execute(a, i) {
|
|
4027
4027
|
try {
|
|
4028
|
-
const l = a ?? await this.getEntity(),
|
|
4029
|
-
await tn(
|
|
4030
|
-
const { name:
|
|
4028
|
+
const l = a ?? await this.getEntity(), p = this.getFolderName(l), I = i ? ae(ee, i) : ae(ee, Cr, p);
|
|
4029
|
+
await tn(I);
|
|
4030
|
+
const { name: x, file: O } = await this.getEntityData(l), G = ae(I, this.getFileName(x, l));
|
|
4031
4031
|
if (await Tt(G)) {
|
|
4032
|
-
const { overwrite:
|
|
4033
|
-
if (!
|
|
4032
|
+
const { overwrite: J } = await this.handleFileExist();
|
|
4033
|
+
if (!J)
|
|
4034
4034
|
return;
|
|
4035
4035
|
}
|
|
4036
4036
|
await Cn(G, O), console.log(
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
), l === $.Object && await this.promptAndCreateObjectCompanions(
|
|
4037
|
+
v.green(`✓ Created ${p}:`),
|
|
4038
|
+
v.cyan(gt(ee, G))
|
|
4039
|
+
), l === $.Object && await this.promptAndCreateObjectCompanions(x, i);
|
|
4040
4040
|
} catch (l) {
|
|
4041
4041
|
console.error(
|
|
4042
|
-
|
|
4042
|
+
v.red("Add new entity failed:"),
|
|
4043
4043
|
l instanceof Error ? l.message : l
|
|
4044
4044
|
), process.exit(1);
|
|
4045
4045
|
}
|
|
@@ -4047,71 +4047,71 @@ class fv {
|
|
|
4047
4047
|
async getEntityData(a) {
|
|
4048
4048
|
switch (a) {
|
|
4049
4049
|
case $.Object: {
|
|
4050
|
-
const i = await this.getObjectData(), l = i.nameSingular,
|
|
4051
|
-
this.lastObjectUniversalIdentifier =
|
|
4052
|
-
const
|
|
4050
|
+
const i = await this.getObjectData(), l = i.nameSingular, p = ne(), I = ne();
|
|
4051
|
+
this.lastObjectUniversalIdentifier = p, this.lastNameFieldUniversalIdentifier = I, this.lastObjectLabelSingular = i.labelSingular;
|
|
4052
|
+
const x = sv({
|
|
4053
4053
|
data: i,
|
|
4054
|
-
universalIdentifier:
|
|
4055
|
-
nameFieldUniversalIdentifier:
|
|
4054
|
+
universalIdentifier: p,
|
|
4055
|
+
nameFieldUniversalIdentifier: I
|
|
4056
4056
|
});
|
|
4057
|
-
return { name: l, file:
|
|
4057
|
+
return { name: l, file: x };
|
|
4058
4058
|
}
|
|
4059
4059
|
case $.Field: {
|
|
4060
|
-
const i = await this.getFieldData(), l = i.name,
|
|
4060
|
+
const i = await this.getFieldData(), l = i.name, p = nv({
|
|
4061
4061
|
data: i
|
|
4062
4062
|
});
|
|
4063
|
-
return { name: l, file:
|
|
4063
|
+
return { name: l, file: p };
|
|
4064
4064
|
}
|
|
4065
4065
|
case $.LogicFunction: {
|
|
4066
|
-
const i = await this.getEntityName(a), l =
|
|
4066
|
+
const i = await this.getEntityName(a), l = iv({
|
|
4067
4067
|
name: i
|
|
4068
4068
|
});
|
|
4069
4069
|
return { name: i, file: l };
|
|
4070
4070
|
}
|
|
4071
4071
|
case $.FrontComponent: {
|
|
4072
|
-
const i = await this.getEntityName(a), l =
|
|
4072
|
+
const i = await this.getEntityName(a), l = rv({
|
|
4073
4073
|
name: i
|
|
4074
4074
|
});
|
|
4075
4075
|
return { name: i, file: l };
|
|
4076
4076
|
}
|
|
4077
4077
|
case $.Role: {
|
|
4078
|
-
const i = await this.getEntityName(a), l =
|
|
4078
|
+
const i = await this.getEntityName(a), l = lv({
|
|
4079
4079
|
name: i
|
|
4080
4080
|
});
|
|
4081
4081
|
return { name: i, file: l };
|
|
4082
4082
|
}
|
|
4083
4083
|
case $.Skill: {
|
|
4084
|
-
const i = await this.getEntityName(a), l =
|
|
4084
|
+
const i = await this.getEntityName(a), l = fv({
|
|
4085
4085
|
name: i
|
|
4086
4086
|
});
|
|
4087
4087
|
return { name: i, file: l };
|
|
4088
4088
|
}
|
|
4089
4089
|
case $.Agent: {
|
|
4090
|
-
const i = await this.getEntityName(a), l =
|
|
4090
|
+
const i = await this.getEntityName(a), l = cv({
|
|
4091
4091
|
name: i
|
|
4092
4092
|
});
|
|
4093
4093
|
return { name: i, file: l };
|
|
4094
4094
|
}
|
|
4095
4095
|
case $.View: {
|
|
4096
|
-
const l = (await this.getViewData()).name,
|
|
4096
|
+
const l = (await this.getViewData()).name, p = ns({
|
|
4097
4097
|
name: l
|
|
4098
4098
|
});
|
|
4099
|
-
return { name: l, file:
|
|
4099
|
+
return { name: l, file: p };
|
|
4100
4100
|
}
|
|
4101
4101
|
case $.NavigationMenuItem: {
|
|
4102
|
-
const i = await this.getEntityName(a), l =
|
|
4102
|
+
const i = await this.getEntityName(a), l = qo({
|
|
4103
4103
|
name: i
|
|
4104
4104
|
});
|
|
4105
4105
|
return { name: i, file: l };
|
|
4106
4106
|
}
|
|
4107
4107
|
case $.PageLayout: {
|
|
4108
|
-
const i = await this.getEntityName(a), l =
|
|
4108
|
+
const i = await this.getEntityName(a), l = av({
|
|
4109
4109
|
name: i
|
|
4110
4110
|
});
|
|
4111
4111
|
return { name: i, file: l };
|
|
4112
4112
|
}
|
|
4113
4113
|
case $.PageLayoutTab: {
|
|
4114
|
-
const i = await this.getEntityName(a), l =
|
|
4114
|
+
const i = await this.getEntityName(a), l = ov({
|
|
4115
4115
|
name: i
|
|
4116
4116
|
});
|
|
4117
4117
|
return { name: i, file: l };
|
|
@@ -4131,9 +4131,9 @@ class fv {
|
|
|
4131
4131
|
]);
|
|
4132
4132
|
if (!l || !this.lastObjectUniversalIdentifier)
|
|
4133
4133
|
return;
|
|
4134
|
-
const
|
|
4134
|
+
const p = ne(), I = ne(), x = ns({
|
|
4135
4135
|
name: `all-${ge(a)}`,
|
|
4136
|
-
universalIdentifier:
|
|
4136
|
+
universalIdentifier: p,
|
|
4137
4137
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4138
4138
|
fields: this.lastNameFieldUniversalIdentifier ? [
|
|
4139
4139
|
{
|
|
@@ -4143,30 +4143,30 @@ class fv {
|
|
|
4143
4143
|
size: 200
|
|
4144
4144
|
}
|
|
4145
4145
|
] : []
|
|
4146
|
-
}), O = i ? ae(
|
|
4147
|
-
|
|
4146
|
+
}), O = i ? ae(ee, i) : ae(
|
|
4147
|
+
ee,
|
|
4148
4148
|
Cr,
|
|
4149
4149
|
this.getFolderName($.View)
|
|
4150
4150
|
);
|
|
4151
4151
|
await tn(O);
|
|
4152
|
-
const G = `all-${ge(a)}.ts`,
|
|
4153
|
-
if (await Tt(
|
|
4152
|
+
const G = `all-${ge(a)}.ts`, J = ae(O, G);
|
|
4153
|
+
if (await Tt(J)) {
|
|
4154
4154
|
const { overwrite: be } = await this.handleFileExist();
|
|
4155
4155
|
if (!be)
|
|
4156
4156
|
return;
|
|
4157
4157
|
}
|
|
4158
|
-
await Cn(
|
|
4159
|
-
|
|
4160
|
-
|
|
4158
|
+
await Cn(J, x), console.log(
|
|
4159
|
+
v.green("✓ Created view:"),
|
|
4160
|
+
v.cyan(gt(ee, J))
|
|
4161
4161
|
);
|
|
4162
|
-
const
|
|
4162
|
+
const Q = this.buildRecordPageFieldsViewFields(
|
|
4163
4163
|
this.lastNameFieldUniversalIdentifier
|
|
4164
4164
|
), z = ns({
|
|
4165
4165
|
name: `${ge(a)}-record-page-fields`,
|
|
4166
|
-
universalIdentifier:
|
|
4166
|
+
universalIdentifier: I,
|
|
4167
4167
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4168
4168
|
type: hm.FIELDS_WIDGET,
|
|
4169
|
-
fields:
|
|
4169
|
+
fields: Q
|
|
4170
4170
|
}), Xe = `${ge(a)}-record-page-fields.ts`, B = ae(
|
|
4171
4171
|
O,
|
|
4172
4172
|
Xe
|
|
@@ -4177,17 +4177,17 @@ class fv {
|
|
|
4177
4177
|
return;
|
|
4178
4178
|
}
|
|
4179
4179
|
await Cn(B, z), console.log(
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
gt(
|
|
4180
|
+
v.green("✓ Created record-page-fields view:"),
|
|
4181
|
+
v.cyan(
|
|
4182
|
+
gt(ee, B)
|
|
4183
4183
|
)
|
|
4184
4184
|
);
|
|
4185
|
-
const D =
|
|
4185
|
+
const D = qo({
|
|
4186
4186
|
name: a,
|
|
4187
4187
|
type: "OBJECT",
|
|
4188
4188
|
targetObjectUniversalIdentifier: this.lastObjectUniversalIdentifier
|
|
4189
|
-
}), Oe = i ? ae(
|
|
4190
|
-
|
|
4189
|
+
}), Oe = i ? ae(ee, i) : ae(
|
|
4190
|
+
ee,
|
|
4191
4191
|
Cr,
|
|
4192
4192
|
this.getFolderName($.NavigationMenuItem)
|
|
4193
4193
|
);
|
|
@@ -4199,15 +4199,15 @@ class fv {
|
|
|
4199
4199
|
return;
|
|
4200
4200
|
}
|
|
4201
4201
|
await Cn(Qe, D), console.log(
|
|
4202
|
-
|
|
4203
|
-
|
|
4202
|
+
v.green("✓ Created navigation menu item:"),
|
|
4203
|
+
v.cyan(gt(ee, Qe))
|
|
4204
4204
|
);
|
|
4205
|
-
const Pn =
|
|
4205
|
+
const Pn = uv({
|
|
4206
4206
|
objectLabelSingular: this.lastObjectLabelSingular ?? a,
|
|
4207
4207
|
objectUniversalIdentifier: this.lastObjectUniversalIdentifier,
|
|
4208
|
-
fieldsWidgetViewUniversalIdentifier:
|
|
4209
|
-
}), Ue = i ? ae(
|
|
4210
|
-
|
|
4208
|
+
fieldsWidgetViewUniversalIdentifier: I
|
|
4209
|
+
}), Ue = i ? ae(ee, i) : ae(
|
|
4210
|
+
ee,
|
|
4211
4211
|
Cr,
|
|
4212
4212
|
this.getFolderName($.PageLayout)
|
|
4213
4213
|
);
|
|
@@ -4222,9 +4222,9 @@ class fv {
|
|
|
4222
4222
|
return;
|
|
4223
4223
|
}
|
|
4224
4224
|
await Cn(Ee, Pn), console.log(
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
gt(
|
|
4225
|
+
v.green("✓ Created record page layout:"),
|
|
4226
|
+
v.cyan(
|
|
4227
|
+
gt(ee, Ee)
|
|
4228
4228
|
)
|
|
4229
4229
|
);
|
|
4230
4230
|
}
|
|
@@ -4234,8 +4234,8 @@ class fv {
|
|
|
4234
4234
|
"updatedAt",
|
|
4235
4235
|
"createdBy",
|
|
4236
4236
|
"updatedBy"
|
|
4237
|
-
].map((
|
|
4238
|
-
defaultFieldName:
|
|
4237
|
+
].map((I) => ({
|
|
4238
|
+
defaultFieldName: I,
|
|
4239
4239
|
isVisible: !0,
|
|
4240
4240
|
size: 200
|
|
4241
4241
|
}));
|
|
@@ -4246,7 +4246,7 @@ class fv {
|
|
|
4246
4246
|
size: 200
|
|
4247
4247
|
},
|
|
4248
4248
|
...l
|
|
4249
|
-
] : l).map((
|
|
4249
|
+
] : l).map((I, x) => ({ ...I, position: x }));
|
|
4250
4250
|
}
|
|
4251
4251
|
async getEntity() {
|
|
4252
4252
|
const { entity: a } = await ze.prompt([
|
|
@@ -4382,9 +4382,9 @@ class fv {
|
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
4384
|
}
|
|
4385
|
-
const
|
|
4386
|
-
version:
|
|
4387
|
-
},
|
|
4385
|
+
const dv = "2.2.0", lu = {
|
|
4386
|
+
version: dv
|
|
4387
|
+
}, gv = async (h) => {
|
|
4388
4388
|
const a = ae(h, "package.json");
|
|
4389
4389
|
if (await Tt(a))
|
|
4390
4390
|
try {
|
|
@@ -4400,65 +4400,65 @@ const hv = "2.1.0", lu = {
|
|
|
4400
4400
|
const i = h.match(/^[~^>=<]*(\d+)$/);
|
|
4401
4401
|
return i ? parseInt(i[1], 10) : null;
|
|
4402
4402
|
}, nn = async (h) => {
|
|
4403
|
-
const a = lu.version, i = await
|
|
4403
|
+
const a = lu.version, i = await gv(h);
|
|
4404
4404
|
if (!i)
|
|
4405
4405
|
return;
|
|
4406
|
-
const l = Yo(a),
|
|
4407
|
-
l === null ||
|
|
4408
|
-
|
|
4409
|
-
`⚠ Version mismatch: your app requires twenty-sdk@${
|
|
4410
|
-
Update with: npm install -g twenty-sdk@${
|
|
4406
|
+
const l = Yo(a), p = Yo(i);
|
|
4407
|
+
l === null || p === null || l !== p && (console.warn(
|
|
4408
|
+
v.yellow(
|
|
4409
|
+
`⚠ Version mismatch: your app requires twenty-sdk@${p}.x but the CLI running is v${a}. Major version mismatches may cause unexpected behavior.
|
|
4410
|
+
Update with: npm install -g twenty-sdk@${p}`
|
|
4411
4411
|
)
|
|
4412
4412
|
), console.warn(""));
|
|
4413
4413
|
};
|
|
4414
|
-
class
|
|
4414
|
+
class mv {
|
|
4415
4415
|
async execute(a) {
|
|
4416
|
-
const i = a.appPath ??
|
|
4417
|
-
await nn(i), console.log(
|
|
4416
|
+
const i = a.appPath ?? ee;
|
|
4417
|
+
await nn(i), console.log(v.blue("Building application...")), console.log(v.gray(`App path: ${i}
|
|
4418
4418
|
`));
|
|
4419
4419
|
const l = await eu({
|
|
4420
4420
|
appPath: i,
|
|
4421
4421
|
tarball: a.tarball,
|
|
4422
|
-
onProgress: (
|
|
4422
|
+
onProgress: (p) => console.log(v.gray(p))
|
|
4423
4423
|
});
|
|
4424
|
-
l.success || (console.error(
|
|
4425
|
-
|
|
4424
|
+
l.success || (console.error(v.red(l.error.message)), process.exit(1)), console.log(
|
|
4425
|
+
v.green(
|
|
4426
4426
|
`✓ Build succeeded (${l.data.fileCount} file${l.data.fileCount === 1 ? "" : "s"})`
|
|
4427
4427
|
)
|
|
4428
|
-
), console.log(
|
|
4428
|
+
), console.log(v.gray(`Output: ${l.data.outputDir}`)), l.data.tarballPath && console.log(v.gray(`Tarball: ${l.data.tarballPath}`));
|
|
4429
4429
|
}
|
|
4430
4430
|
}
|
|
4431
|
-
class
|
|
4431
|
+
class vv {
|
|
4432
4432
|
async execute(a) {
|
|
4433
|
-
a.remote && _e.setActiveRemote(a.remote), console.log(
|
|
4433
|
+
a.remote && _e.setActiveRemote(a.remote), console.log(v.blue("Syncing marketplace catalog..."));
|
|
4434
4434
|
const l = await new Fr().syncMarketplaceCatalog();
|
|
4435
4435
|
l.success || (console.error(
|
|
4436
|
-
|
|
4436
|
+
v.red(
|
|
4437
4437
|
`Catalog sync failed: ${l.error instanceof Error ? l.error.message : String(l.error)}`
|
|
4438
4438
|
)
|
|
4439
|
-
), process.exit(1)), console.log(
|
|
4439
|
+
), process.exit(1)), console.log(v.green("✓ Marketplace catalog synced successfully"));
|
|
4440
4440
|
}
|
|
4441
4441
|
}
|
|
4442
|
-
class
|
|
4442
|
+
class yv {
|
|
4443
4443
|
async execute(a) {
|
|
4444
|
-
const i = a.appPath ??
|
|
4445
|
-
await nn(i), console.log(
|
|
4444
|
+
const i = a.appPath ?? ee;
|
|
4445
|
+
await nn(i), console.log(v.blue("Deploying application...")), console.log(v.gray(`App path: ${i}
|
|
4446
4446
|
`));
|
|
4447
|
-
const l = (
|
|
4447
|
+
const l = (x) => console.log(v.gray(x)), p = await eu({
|
|
4448
4448
|
appPath: i,
|
|
4449
4449
|
tarball: !0,
|
|
4450
4450
|
onProgress: l
|
|
4451
4451
|
});
|
|
4452
|
-
|
|
4453
|
-
const
|
|
4454
|
-
tarballPath:
|
|
4452
|
+
p.success || (console.error(v.red(p.error.message)), process.exit(1));
|
|
4453
|
+
const I = await pm({
|
|
4454
|
+
tarballPath: p.data.tarballPath,
|
|
4455
4455
|
remote: a.remote,
|
|
4456
4456
|
onProgress: l
|
|
4457
4457
|
});
|
|
4458
|
-
|
|
4458
|
+
I.success || (console.error(v.red(I.error.message)), process.exit(1)), console.log(v.green("✓ Deployed successfully"));
|
|
4459
4459
|
}
|
|
4460
4460
|
}
|
|
4461
|
-
class
|
|
4461
|
+
class _v {
|
|
4462
4462
|
constructor({
|
|
4463
4463
|
state: a,
|
|
4464
4464
|
notify: i
|
|
@@ -4470,29 +4470,29 @@ class vv {
|
|
|
4470
4470
|
i.status = "in_progress", this.state.updatePipeline({ status: "building" });
|
|
4471
4471
|
const l = [
|
|
4472
4472
|
{ message: "Building manifest", status: "info" }
|
|
4473
|
-
],
|
|
4474
|
-
if (!
|
|
4475
|
-
for (const
|
|
4476
|
-
l.push({ message:
|
|
4473
|
+
], p = await dm(a.appPath);
|
|
4474
|
+
if (!p.success) {
|
|
4475
|
+
for (const x of p.errors)
|
|
4476
|
+
l.push({ message: x, status: "error" });
|
|
4477
4477
|
return i.output = { result: null }, i.status = "error", this.state.updatePipeline({ status: "error" }), this.state.applyStepEvents(l), null;
|
|
4478
4478
|
}
|
|
4479
|
-
if (
|
|
4480
|
-
for (const
|
|
4481
|
-
l.push({ message: `⚠ ${
|
|
4479
|
+
if (p.warnings.length > 0)
|
|
4480
|
+
for (const x of p.warnings)
|
|
4481
|
+
l.push({ message: `⚠ ${x}`, status: "warning" });
|
|
4482
4482
|
l.push({
|
|
4483
4483
|
message: "Successfully built manifest",
|
|
4484
4484
|
status: "success"
|
|
4485
4485
|
});
|
|
4486
|
-
const
|
|
4487
|
-
manifest:
|
|
4488
|
-
filePaths:
|
|
4486
|
+
const I = {
|
|
4487
|
+
manifest: p.manifest,
|
|
4488
|
+
filePaths: p.filePaths
|
|
4489
4489
|
};
|
|
4490
|
-
return i.output = { result:
|
|
4491
|
-
appName:
|
|
4492
|
-
}), this.state.updateEntitiesFromManifest(
|
|
4490
|
+
return i.output = { result: I }, i.status = "done", this.state.updatePipeline({
|
|
4491
|
+
appName: p.manifest.application.displayName
|
|
4492
|
+
}), this.state.updateEntitiesFromManifest(p.filePaths), this.state.applyStepEvents(l), I;
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
|
-
class
|
|
4495
|
+
class wv {
|
|
4496
4496
|
constructor({
|
|
4497
4497
|
apiService: a,
|
|
4498
4498
|
state: i,
|
|
@@ -4503,8 +4503,8 @@ class yv {
|
|
|
4503
4503
|
async execute() {
|
|
4504
4504
|
const a = this.state.steps.checkServer, i = await this.apiService.validateAuth();
|
|
4505
4505
|
if (!i.serverUp) {
|
|
4506
|
-
const
|
|
4507
|
-
return
|
|
4506
|
+
const p = await tu();
|
|
4507
|
+
return p && !this.hasRetried ? (this.hasRetried = !0, await new _e().setConfig({ apiUrl: p }), this.execute()) : (a.output.errorLogged || (a.output = { isReady: !1, errorLogged: !0 }, a.status = "error", this.state.applyStepEvents([
|
|
4508
4508
|
{
|
|
4509
4509
|
message: `Cannot reach Twenty server.
|
|
4510
4510
|
|
|
@@ -4530,14 +4530,14 @@ class yv {
|
|
|
4530
4530
|
return a.output = { isReady: !0, errorLogged: !1 }, a.status = "done", l || this.notify(), !0;
|
|
4531
4531
|
}
|
|
4532
4532
|
}
|
|
4533
|
-
class
|
|
4533
|
+
class Sv {
|
|
4534
4534
|
constructor({
|
|
4535
4535
|
clientService: a,
|
|
4536
4536
|
configService: i,
|
|
4537
4537
|
state: l,
|
|
4538
|
-
notify:
|
|
4538
|
+
notify: p
|
|
4539
4539
|
}) {
|
|
4540
|
-
this.clientService = a, this.configService = i, this.state = l, this.notify =
|
|
4540
|
+
this.clientService = a, this.configService = i, this.state = l, this.notify = p;
|
|
4541
4541
|
}
|
|
4542
4542
|
async execute(a) {
|
|
4543
4543
|
const i = this.state.steps.generateApiClient;
|
|
@@ -4562,14 +4562,14 @@ class _v {
|
|
|
4562
4562
|
this.notify();
|
|
4563
4563
|
}
|
|
4564
4564
|
}
|
|
4565
|
-
class
|
|
4565
|
+
class Iv {
|
|
4566
4566
|
constructor({
|
|
4567
4567
|
apiService: a,
|
|
4568
4568
|
configService: i,
|
|
4569
4569
|
state: l,
|
|
4570
|
-
notify:
|
|
4570
|
+
notify: p
|
|
4571
4571
|
}) {
|
|
4572
|
-
this.apiService = a, this.configService = i, this.state = l, this.notify =
|
|
4572
|
+
this.apiService = a, this.configService = i, this.state = l, this.notify = p;
|
|
4573
4573
|
}
|
|
4574
4574
|
async execute(a) {
|
|
4575
4575
|
try {
|
|
@@ -4631,22 +4631,22 @@ class Zo {
|
|
|
4631
4631
|
await this.watcher?.close();
|
|
4632
4632
|
}
|
|
4633
4633
|
async copyAndNotify(a) {
|
|
4634
|
-
const i = gt(this.appPath, a), l = ae(rs, i),
|
|
4635
|
-
await tn(cm(
|
|
4636
|
-
const
|
|
4634
|
+
const i = gt(this.appPath, a), l = ae(rs, i), p = ae(this.appPath, l);
|
|
4635
|
+
await tn(cm(p)), await vm(a, p);
|
|
4636
|
+
const I = await au(p), x = zm.createHash("md5").update(I).digest("hex");
|
|
4637
4637
|
this.handleFileBuilt({
|
|
4638
4638
|
fileFolder: this.fileFolder,
|
|
4639
4639
|
builtPath: l,
|
|
4640
4640
|
sourcePath: i,
|
|
4641
|
-
checksum:
|
|
4641
|
+
checksum: x
|
|
4642
4642
|
});
|
|
4643
4643
|
}
|
|
4644
4644
|
async handleUnlink(a) {
|
|
4645
|
-
const i = gt(this.appPath, a), l = ae(rs, i),
|
|
4646
|
-
await ym(
|
|
4645
|
+
const i = gt(this.appPath, a), l = ae(rs, i), p = ae(this.appPath, l);
|
|
4646
|
+
await ym(p);
|
|
4647
4647
|
}
|
|
4648
4648
|
}
|
|
4649
|
-
class
|
|
4649
|
+
class xv {
|
|
4650
4650
|
constructor(a) {
|
|
4651
4651
|
this.process = null, this.pendingErrors = [], this.buffer = "", this.hasErrors = !1, this.appPath = a.appPath, this.onErrors = a.onErrors;
|
|
4652
4652
|
}
|
|
@@ -4655,7 +4655,7 @@ class Sv {
|
|
|
4655
4655
|
if (!await Tt(a))
|
|
4656
4656
|
return;
|
|
4657
4657
|
const i = zo.join(this.appPath, "tsconfig.json");
|
|
4658
|
-
this.process =
|
|
4658
|
+
this.process = Km(
|
|
4659
4659
|
a,
|
|
4660
4660
|
["--watch", "--noEmit", "--pretty", "false", "-p", i],
|
|
4661
4661
|
{ cwd: this.appPath, stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -4692,8 +4692,8 @@ class Sv {
|
|
|
4692
4692
|
i && this.pendingErrors.push(i);
|
|
4693
4693
|
}
|
|
4694
4694
|
}
|
|
4695
|
-
const
|
|
4696
|
-
class
|
|
4695
|
+
const Av = /* @__PURE__ */ new Set(["node_modules", "dist", ".twenty"]);
|
|
4696
|
+
class Ev {
|
|
4697
4697
|
constructor(a) {
|
|
4698
4698
|
this.watcher = null, this.appPath = a.appPath, this.handleChangeDetected = a.handleChangeDetected, this.verbose = a.verbose ?? !1;
|
|
4699
4699
|
}
|
|
@@ -4705,8 +4705,8 @@ class xv {
|
|
|
4705
4705
|
const l = gt(a, i);
|
|
4706
4706
|
if (l === "")
|
|
4707
4707
|
return !1;
|
|
4708
|
-
const
|
|
4709
|
-
return
|
|
4708
|
+
const p = l.split(jo.sep)[0];
|
|
4709
|
+
return Av.has(p) || p.startsWith(".");
|
|
4710
4710
|
},
|
|
4711
4711
|
awaitWriteFinish: {
|
|
4712
4712
|
stabilityThreshold: 100,
|
|
@@ -4715,22 +4715,22 @@ class xv {
|
|
|
4715
4715
|
}), this.watcher.on("all", (i, l) => {
|
|
4716
4716
|
if (i === "addDir" || i === "unlinkDir")
|
|
4717
4717
|
return;
|
|
4718
|
-
const
|
|
4719
|
-
|
|
4718
|
+
const p = gt(this.appPath, l), I = p.startsWith(nu), x = ["package.json", "yarn.lock"].includes(
|
|
4719
|
+
p
|
|
4720
4720
|
);
|
|
4721
|
-
!(
|
|
4721
|
+
!(p.endsWith(".ts") || p.endsWith(".tsx")) && !I && !x || this.handleChangeDetected(p, i);
|
|
4722
4722
|
});
|
|
4723
4723
|
}
|
|
4724
4724
|
async close() {
|
|
4725
4725
|
await this.watcher?.close();
|
|
4726
4726
|
}
|
|
4727
4727
|
}
|
|
4728
|
-
class
|
|
4728
|
+
class bv {
|
|
4729
4729
|
constructor(a) {
|
|
4730
4730
|
this.manifestWatcher = null, this.logicFunctionsWatcher = null, this.frontComponentsWatcher = null, this.assetWatcher = null, this.dependencyWatcher = null, this.tscWatcher = null, this.state = a.state, this.scheduleSync = a.scheduleSync, this.notify = a.notify, this.onFileBuilt = a.onFileBuilt, this.shouldSkipTypecheck = a.shouldSkipTypecheck, this.verbose = a.verbose ?? !1;
|
|
4731
4731
|
}
|
|
4732
4732
|
async start() {
|
|
4733
|
-
this.state.steps.startWatchers.status = "in_progress", this.notify(), this.manifestWatcher = new
|
|
4733
|
+
this.state.steps.startWatchers.status = "in_progress", this.notify(), this.manifestWatcher = new Ev({
|
|
4734
4734
|
appPath: this.state.appPath,
|
|
4735
4735
|
handleChangeDetected: this.handleChangeDetected.bind(this),
|
|
4736
4736
|
verbose: this.verbose
|
|
@@ -4827,7 +4827,7 @@ class Av {
|
|
|
4827
4827
|
}), this.dependencyWatcher.start();
|
|
4828
4828
|
}
|
|
4829
4829
|
async startTscWatcher() {
|
|
4830
|
-
this.tscWatcher = new
|
|
4830
|
+
this.tscWatcher = new xv({
|
|
4831
4831
|
appPath: this.state.appPath,
|
|
4832
4832
|
onErrors: this.handleTypecheckErrors.bind(this)
|
|
4833
4833
|
}), await this.tscWatcher.start();
|
|
@@ -4844,44 +4844,44 @@ class Av {
|
|
|
4844
4844
|
), this.notify();
|
|
4845
4845
|
}
|
|
4846
4846
|
}
|
|
4847
|
-
class
|
|
4847
|
+
class Tv {
|
|
4848
4848
|
constructor({
|
|
4849
4849
|
apiService: a,
|
|
4850
4850
|
state: i,
|
|
4851
4851
|
notify: l,
|
|
4852
|
-
verbose:
|
|
4852
|
+
verbose: p
|
|
4853
4853
|
}) {
|
|
4854
|
-
this.apiService = a, this.state = i, this.notify = l, this.verbose =
|
|
4854
|
+
this.apiService = a, this.state = i, this.notify = l, this.verbose = p ?? !1;
|
|
4855
4855
|
}
|
|
4856
4856
|
async execute(a) {
|
|
4857
4857
|
const i = this.state.steps.syncApplication;
|
|
4858
4858
|
i.status = "in_progress", this.state.updatePipeline({ status: "syncing" });
|
|
4859
|
-
const l = [],
|
|
4859
|
+
const l = [], p = Im({
|
|
4860
4860
|
manifest: a.manifest,
|
|
4861
4861
|
builtFileInfos: a.builtFileInfos
|
|
4862
4862
|
});
|
|
4863
|
-
l.push({ message: "Manifest checksums set", status: "info" }), await xm(a.appPath,
|
|
4863
|
+
l.push({ message: "Manifest checksums set", status: "info" }), await xm(a.appPath, p), l.push({
|
|
4864
4864
|
message: "Manifest saved to output directory",
|
|
4865
4865
|
status: "info"
|
|
4866
4866
|
}), l.push({ message: "Syncing manifest", status: "info" });
|
|
4867
|
-
const
|
|
4868
|
-
if (
|
|
4867
|
+
const I = await this.apiService.syncApplication(p);
|
|
4868
|
+
if (I.success) {
|
|
4869
4869
|
l.push({ message: "✓ Synced", status: "success" }), i.output = { syncStatus: "synced", error: null }, i.status = "done", this.state.updatePipeline({ status: "synced", error: null }), this.state.updateAllEntitiesStatus("success"), this.state.applyStepEvents(l);
|
|
4870
4870
|
return;
|
|
4871
4871
|
}
|
|
4872
|
-
const
|
|
4873
|
-
|
|
4872
|
+
const x = this.verbose ? null : Am(I.error);
|
|
4873
|
+
x ? (l.push(...x), l.push({
|
|
4874
4874
|
message: "Add --verbose to see full error log",
|
|
4875
4875
|
status: "info"
|
|
4876
4876
|
})) : l.push({
|
|
4877
|
-
message: `Sync failed with error: ${ru(
|
|
4877
|
+
message: `Sync failed with error: ${ru(I.error)}`,
|
|
4878
4878
|
status: "error"
|
|
4879
4879
|
});
|
|
4880
|
-
const O =
|
|
4880
|
+
const O = x ? x[0].message : "Sync failed";
|
|
4881
4881
|
i.output = { syncStatus: "error", error: O }, i.status = "error", this.state.updatePipeline({ status: "error", error: O }), this.state.updateAllEntitiesStatus("error"), this.state.applyStepEvents(l);
|
|
4882
4882
|
}
|
|
4883
4883
|
}
|
|
4884
|
-
class
|
|
4884
|
+
class Cv {
|
|
4885
4885
|
constructor({
|
|
4886
4886
|
state: a,
|
|
4887
4887
|
notify: i,
|
|
@@ -4903,30 +4903,30 @@ class bv {
|
|
|
4903
4903
|
}, i.status = "in_progress", this.notify(), this.uploadPendingFiles();
|
|
4904
4904
|
}
|
|
4905
4905
|
uploadFile(a, i, l) {
|
|
4906
|
-
const
|
|
4907
|
-
if (!
|
|
4906
|
+
const p = this.state.steps.uploadFiles;
|
|
4907
|
+
if (!p.output.fileUploader)
|
|
4908
4908
|
return;
|
|
4909
|
-
|
|
4909
|
+
p.status = "in_progress", this.totalQueued++, this.verbose && this.state.addEvent({
|
|
4910
4910
|
message: `Uploading ${a}`,
|
|
4911
4911
|
status: "info"
|
|
4912
4912
|
}), this.state.updateEntityStatus(i, "uploading"), this.notify();
|
|
4913
|
-
const
|
|
4914
|
-
|
|
4913
|
+
const I = p.output.fileUploader.uploadFile({ builtPath: a, fileFolder: l }).then((x) => {
|
|
4914
|
+
x.success ? (this.uploadedCount++, this.verbose && this.state.addEvent({
|
|
4915
4915
|
message: `Successfully uploaded ${a}`,
|
|
4916
4916
|
status: "success"
|
|
4917
4917
|
}), this.state.updateEntityStatus(i, "success")) : (this.failedCount++, this.state.addEvent({
|
|
4918
|
-
message: `Failed to upload ${a}: ${
|
|
4918
|
+
message: `Failed to upload ${a}: ${x.error}`,
|
|
4919
4919
|
status: "error"
|
|
4920
4920
|
}));
|
|
4921
|
-
}).catch((
|
|
4921
|
+
}).catch((x) => {
|
|
4922
4922
|
this.failedCount++, this.state.addEvent({
|
|
4923
|
-
message: `Upload failed for ${a}: ${
|
|
4923
|
+
message: `Upload failed for ${a}: ${x}`,
|
|
4924
4924
|
status: "error"
|
|
4925
4925
|
});
|
|
4926
4926
|
}).finally(() => {
|
|
4927
|
-
|
|
4927
|
+
p.output.activeUploads.delete(I), p.output.activeUploads.size === 0 && (this.logUploadSummary(), p.status = "done", this.notify());
|
|
4928
4928
|
});
|
|
4929
|
-
|
|
4929
|
+
p.output.activeUploads.add(I);
|
|
4930
4930
|
}
|
|
4931
4931
|
async waitForUploads() {
|
|
4932
4932
|
const a = this.state.steps.uploadFiles;
|
|
@@ -4958,32 +4958,32 @@ class bv {
|
|
|
4958
4958
|
this.uploadFile(a, l, i);
|
|
4959
4959
|
}
|
|
4960
4960
|
}
|
|
4961
|
-
class
|
|
4961
|
+
class Fv {
|
|
4962
4962
|
constructor(a) {
|
|
4963
4963
|
this.syncTimer = null, this.serverCheckInterval = null, this.skipTypecheck = !0, this.debounceMs = a.debounceMs ?? 200, this.state = a.state, this.verbose = a.verbose ?? !1, this.apiService = new Fr({ disableInterceptors: !0 });
|
|
4964
4964
|
const i = this.apiService, l = new _e();
|
|
4965
4965
|
this.clientService = new bm();
|
|
4966
|
-
const
|
|
4967
|
-
this.checkServerStep = new
|
|
4968
|
-
...
|
|
4966
|
+
const p = { state: this.state, notify: () => this.state.notify() };
|
|
4967
|
+
this.checkServerStep = new wv({
|
|
4968
|
+
...p,
|
|
4969
4969
|
apiService: i
|
|
4970
|
-
}), this.buildManifestStep = new
|
|
4971
|
-
...
|
|
4970
|
+
}), this.buildManifestStep = new _v(p), this.registerAppStep = new Iv({
|
|
4971
|
+
...p,
|
|
4972
4972
|
apiService: i,
|
|
4973
4973
|
configService: l
|
|
4974
|
-
}), this.uploadFilesStep = new
|
|
4975
|
-
...
|
|
4974
|
+
}), this.uploadFilesStep = new Cv({
|
|
4975
|
+
...p,
|
|
4976
4976
|
verbose: this.verbose
|
|
4977
|
-
}), this.generateApiClientStep = new
|
|
4978
|
-
...
|
|
4977
|
+
}), this.generateApiClientStep = new Sv({
|
|
4978
|
+
...p,
|
|
4979
4979
|
clientService: this.clientService,
|
|
4980
4980
|
configService: l
|
|
4981
|
-
}), this.syncApplicationStep = new
|
|
4982
|
-
...
|
|
4981
|
+
}), this.syncApplicationStep = new Tv({
|
|
4982
|
+
...p,
|
|
4983
4983
|
apiService: i,
|
|
4984
4984
|
verbose: this.verbose
|
|
4985
|
-
}), this.startWatchersStep = new
|
|
4986
|
-
...
|
|
4985
|
+
}), this.startWatchersStep = new bv({
|
|
4986
|
+
...p,
|
|
4987
4987
|
scheduleSync: this.scheduleSync.bind(this),
|
|
4988
4988
|
onFileBuilt: this.handleFileBuilt.bind(this),
|
|
4989
4989
|
shouldSkipTypecheck: () => this.skipTypecheck,
|
|
@@ -5080,7 +5080,7 @@ class Tv {
|
|
|
5080
5080
|
}), !0);
|
|
5081
5081
|
}
|
|
5082
5082
|
}
|
|
5083
|
-
const
|
|
5083
|
+
const Pv = {
|
|
5084
5084
|
objects: $.Object,
|
|
5085
5085
|
fields: $.Field,
|
|
5086
5086
|
logicFunctions: $.LogicFunction,
|
|
@@ -5091,14 +5091,14 @@ const Cv = {
|
|
|
5091
5091
|
navigationMenuItems: $.NavigationMenuItem,
|
|
5092
5092
|
pageLayouts: $.PageLayout,
|
|
5093
5093
|
pageLayoutTabs: $.PageLayoutTab
|
|
5094
|
-
},
|
|
5094
|
+
}, Rv = 200, Lv = {
|
|
5095
5095
|
pending: ["building", "uploading", "success", "error"],
|
|
5096
5096
|
building: ["pending", "uploading", "success", "error"],
|
|
5097
5097
|
uploading: ["pending", "success", "error"],
|
|
5098
5098
|
success: ["pending", "building", "uploading", "error"],
|
|
5099
5099
|
error: ["pending", "building", "uploading", "success"]
|
|
5100
5100
|
};
|
|
5101
|
-
class
|
|
5101
|
+
class Ov {
|
|
5102
5102
|
constructor(a) {
|
|
5103
5103
|
this.eventIdCounter = 0, this.appPath = a.appPath, this.frontendUrl = a.frontendUrl, this.previousObjectsFieldsFingerprint = null, this.steps = {
|
|
5104
5104
|
checkServer: {
|
|
@@ -5160,7 +5160,7 @@ class Rv {
|
|
|
5160
5160
|
})
|
|
5161
5161
|
);
|
|
5162
5162
|
this.events = [
|
|
5163
|
-
...this.events.slice(-(
|
|
5163
|
+
...this.events.slice(-(Rv - i.length)),
|
|
5164
5164
|
...i
|
|
5165
5165
|
];
|
|
5166
5166
|
}
|
|
@@ -5168,10 +5168,10 @@ class Rv {
|
|
|
5168
5168
|
this.applyStepEvents([a]);
|
|
5169
5169
|
}
|
|
5170
5170
|
updateEntityStatus(a, i) {
|
|
5171
|
-
const l = new Map(this.entities),
|
|
5172
|
-
|
|
5171
|
+
const l = new Map(this.entities), p = l.get(a);
|
|
5172
|
+
p?.status && !Lv[p.status].includes(i) || (l.set(
|
|
5173
5173
|
a,
|
|
5174
|
-
|
|
5174
|
+
p ? { ...p, status: i } : { name: a, path: a, status: i }
|
|
5175
5175
|
), this.entities = l);
|
|
5176
5176
|
}
|
|
5177
5177
|
removeEntity(a) {
|
|
@@ -5180,29 +5180,29 @@ class Rv {
|
|
|
5180
5180
|
}
|
|
5181
5181
|
updateAllEntitiesStatus(a) {
|
|
5182
5182
|
const i = new Map(this.entities);
|
|
5183
|
-
for (const [l,
|
|
5184
|
-
i.set(l, { ...
|
|
5183
|
+
for (const [l, p] of i)
|
|
5184
|
+
i.set(l, { ...p, status: a });
|
|
5185
5185
|
this.entities = i;
|
|
5186
5186
|
}
|
|
5187
5187
|
updateEntitiesFromManifest(a) {
|
|
5188
5188
|
const i = /* @__PURE__ */ new Map();
|
|
5189
|
-
for (const [
|
|
5190
|
-
const
|
|
5191
|
-
if (
|
|
5192
|
-
for (const O of
|
|
5193
|
-
i.set(O,
|
|
5189
|
+
for (const [p, I] of Object.entries(a)) {
|
|
5190
|
+
const x = Pv[p];
|
|
5191
|
+
if (x)
|
|
5192
|
+
for (const O of I)
|
|
5193
|
+
i.set(O, x);
|
|
5194
5194
|
}
|
|
5195
5195
|
const l = new Map(this.entities);
|
|
5196
|
-
for (const [
|
|
5197
|
-
l.set(
|
|
5198
|
-
...
|
|
5199
|
-
type: i.get(
|
|
5196
|
+
for (const [p, I] of l)
|
|
5197
|
+
l.set(p, {
|
|
5198
|
+
...I,
|
|
5199
|
+
type: i.get(p)
|
|
5200
5200
|
});
|
|
5201
|
-
for (const [
|
|
5202
|
-
l.has(
|
|
5203
|
-
name:
|
|
5204
|
-
path:
|
|
5205
|
-
type:
|
|
5201
|
+
for (const [p, I] of i)
|
|
5202
|
+
l.has(p) || l.set(p, {
|
|
5203
|
+
name: p,
|
|
5204
|
+
path: p,
|
|
5205
|
+
type: I,
|
|
5206
5206
|
status: "pending"
|
|
5207
5207
|
});
|
|
5208
5208
|
this.entities = l;
|
|
@@ -5221,24 +5221,24 @@ const He = {
|
|
|
5221
5221
|
uploading: { color: "cyan", icon: "upload" },
|
|
5222
5222
|
done: { color: "green", icon: "✓" },
|
|
5223
5223
|
error: { color: "red", icon: "✗" }
|
|
5224
|
-
},
|
|
5224
|
+
}, Uv = (h) => ({
|
|
5225
5225
|
idle: "idle",
|
|
5226
5226
|
in_progress: "in_progress",
|
|
5227
5227
|
done: "done",
|
|
5228
5228
|
error: "error"
|
|
5229
|
-
})[h],
|
|
5229
|
+
})[h], Nv = (h) => ({
|
|
5230
5230
|
pending: "idle",
|
|
5231
5231
|
building: "in_progress",
|
|
5232
5232
|
uploading: "uploading",
|
|
5233
5233
|
success: "done",
|
|
5234
5234
|
error: "error"
|
|
5235
|
-
})[h],
|
|
5235
|
+
})[h], $v = (h) => ({
|
|
5236
5236
|
idle: "idle",
|
|
5237
5237
|
building: "in_progress",
|
|
5238
5238
|
syncing: "in_progress",
|
|
5239
5239
|
synced: "done",
|
|
5240
5240
|
error: "error"
|
|
5241
|
-
})[h],
|
|
5241
|
+
})[h], Dv = {
|
|
5242
5242
|
idle: "Idle",
|
|
5243
5243
|
building: "Building...",
|
|
5244
5244
|
syncing: "Syncing...",
|
|
@@ -5267,21 +5267,21 @@ const He = {
|
|
|
5267
5267
|
[$.PageLayout]: "Page layouts",
|
|
5268
5268
|
[$.PageLayoutTab]: "Page layout tabs",
|
|
5269
5269
|
[$.Agent]: "Agents"
|
|
5270
|
-
}, fu = Object.keys(cu),
|
|
5270
|
+
}, fu = Object.keys(cu), Wv = {
|
|
5271
5271
|
info: "gray",
|
|
5272
5272
|
success: "green",
|
|
5273
5273
|
error: "red",
|
|
5274
5274
|
warning: "yellow"
|
|
5275
|
-
},
|
|
5275
|
+
}, Mv = (h) => h.toLocaleTimeString("en-US", {
|
|
5276
5276
|
hour12: !1,
|
|
5277
5277
|
hour: "2-digit",
|
|
5278
5278
|
minute: "2-digit",
|
|
5279
5279
|
second: "2-digit"
|
|
5280
|
-
}),
|
|
5280
|
+
}), Bv = (h, a = 40) => {
|
|
5281
5281
|
if (h.length <= a) return h;
|
|
5282
5282
|
const i = h.split("/");
|
|
5283
5283
|
return i.length <= 2 ? h : `.../${i.slice(-2).join("/")}`;
|
|
5284
|
-
},
|
|
5284
|
+
}, kv = (h) => {
|
|
5285
5285
|
const a = /* @__PURE__ */ new Map();
|
|
5286
5286
|
for (const i of fu)
|
|
5287
5287
|
a.set(i, []);
|
|
@@ -5292,14 +5292,14 @@ const He = {
|
|
|
5292
5292
|
l.push(i), a.set(i.type, l);
|
|
5293
5293
|
}
|
|
5294
5294
|
return a;
|
|
5295
|
-
},
|
|
5296
|
-
const a = [...h.entities.values()], i = a.some((
|
|
5297
|
-
(
|
|
5298
|
-
),
|
|
5295
|
+
}, Gv = (h) => !h.frontendUrl || !h.steps.resolveApplication.output.universalIdentifier ? null : `${h.frontendUrl}/settings/applications`, Hv = (h) => h.some((a) => a === "error") ? "error" : h.some((a) => a === "in_progress") ? "in_progress" : h.every((a) => a === "done") ? "done" : "idle", zv = (h) => {
|
|
5296
|
+
const a = [...h.entities.values()], i = a.some((x) => x.status === "error"), l = a.some((x) => x.status === "building"), p = a.length > 0 && a.every(
|
|
5297
|
+
(x) => x.status === "uploading" || x.status === "success"
|
|
5298
|
+
), I = i ? "error" : l ? "in_progress" : p ? "done" : "idle";
|
|
5299
5299
|
return [
|
|
5300
5300
|
{
|
|
5301
5301
|
label: "Application Initialization",
|
|
5302
|
-
status:
|
|
5302
|
+
status: Hv([
|
|
5303
5303
|
h.steps.checkServer.status,
|
|
5304
5304
|
h.steps.ensureValidTokens.status,
|
|
5305
5305
|
h.steps.resolveApplication.status
|
|
@@ -5307,7 +5307,7 @@ const He = {
|
|
|
5307
5307
|
},
|
|
5308
5308
|
{
|
|
5309
5309
|
label: "Resources Build",
|
|
5310
|
-
status:
|
|
5310
|
+
status: I
|
|
5311
5311
|
},
|
|
5312
5312
|
{
|
|
5313
5313
|
label: "Resources Upload",
|
|
@@ -5326,21 +5326,21 @@ const He = {
|
|
|
5326
5326
|
status: h.steps.generateApiClient.status
|
|
5327
5327
|
}
|
|
5328
5328
|
];
|
|
5329
|
-
}, hu = 120,
|
|
5329
|
+
}, hu = 120, Kv = Math.round(200 / hu), Jo = () => {
|
|
5330
5330
|
const h = Math.floor(Date.now() / hu);
|
|
5331
5331
|
return {
|
|
5332
5332
|
spinnerFrame: is[h % is.length],
|
|
5333
|
-
uploadFrame: ss[Math.floor(h /
|
|
5333
|
+
uploadFrame: ss[Math.floor(h / Kv) % ss.length]
|
|
5334
5334
|
};
|
|
5335
5335
|
}, as = (h) => {
|
|
5336
5336
|
const a = He[h];
|
|
5337
5337
|
return a.icon === "spinner" ? Jo().spinnerFrame : a.icon === "upload" ? Jo().uploadFrame : a.icon;
|
|
5338
|
-
}, pu = uu.createContext(null),
|
|
5338
|
+
}, pu = uu.createContext(null), Vv = pu.Provider, mt = () => {
|
|
5339
5339
|
const h = uu.useContext(pu);
|
|
5340
5340
|
if (!h)
|
|
5341
5341
|
throw new Error("useInk must be used within InkProvider");
|
|
5342
5342
|
return h;
|
|
5343
|
-
},
|
|
5343
|
+
}, qv = ({
|
|
5344
5344
|
uiStatus: h
|
|
5345
5345
|
}) => {
|
|
5346
5346
|
const { Text: a } = mt(), i = as(h), l = He[h];
|
|
@@ -5348,29 +5348,29 @@ const He = {
|
|
|
5348
5348
|
i,
|
|
5349
5349
|
" "
|
|
5350
5350
|
] });
|
|
5351
|
-
},
|
|
5351
|
+
}, Yv = ({
|
|
5352
5352
|
entity: h
|
|
5353
5353
|
}) => {
|
|
5354
5354
|
const { Box: a, Text: i } = mt();
|
|
5355
5355
|
return /* @__PURE__ */ le(a, { children: [
|
|
5356
|
-
/* @__PURE__ */ Y(
|
|
5356
|
+
/* @__PURE__ */ Y(qv, { uiStatus: Nv(h.status) }),
|
|
5357
5357
|
/* @__PURE__ */ Y(i, { children: h.name }),
|
|
5358
5358
|
h.path !== h.name && /* @__PURE__ */ le(i, { dimColor: !0, children: [
|
|
5359
5359
|
" (",
|
|
5360
|
-
|
|
5360
|
+
Bv(h.path),
|
|
5361
5361
|
")"
|
|
5362
5362
|
] })
|
|
5363
5363
|
] });
|
|
5364
|
-
},
|
|
5364
|
+
}, Zv = ({
|
|
5365
5365
|
type: h,
|
|
5366
5366
|
entities: a
|
|
5367
5367
|
}) => {
|
|
5368
5368
|
const { Box: i, Text: l } = mt();
|
|
5369
5369
|
return a.length === 0 ? null : /* @__PURE__ */ le(i, { flexDirection: "column", marginTop: 1, children: [
|
|
5370
5370
|
/* @__PURE__ */ Y(l, { bold: !0, dimColor: !0, children: cu[h] }),
|
|
5371
|
-
a.map((
|
|
5371
|
+
a.map((p) => /* @__PURE__ */ Y(Yv, { entity: p }, p.path))
|
|
5372
5372
|
] });
|
|
5373
|
-
},
|
|
5373
|
+
}, Jv = () => {
|
|
5374
5374
|
const { Box: h, Text: a } = mt();
|
|
5375
5375
|
return /* @__PURE__ */ Y(h, { marginTop: 1, children: /* @__PURE__ */ le(a, { dimColor: !0, children: [
|
|
5376
5376
|
/* @__PURE__ */ Y(a, { color: He.idle.color, children: He.idle.icon }),
|
|
@@ -5393,35 +5393,35 @@ const He = {
|
|
|
5393
5393
|
" ",
|
|
5394
5394
|
"error"
|
|
5395
5395
|
] }) });
|
|
5396
|
-
},
|
|
5396
|
+
}, Xv = ({
|
|
5397
5397
|
state: h
|
|
5398
5398
|
}) => {
|
|
5399
|
-
const { Text: a } = mt(), i =
|
|
5400
|
-
return /* @__PURE__ */ le(a, { color:
|
|
5399
|
+
const { Text: a } = mt(), i = $v(h.pipeline.status), l = as(i), p = He[i], I = Dv[h.pipeline.status];
|
|
5400
|
+
return /* @__PURE__ */ le(a, { color: p.color, children: [
|
|
5401
5401
|
l,
|
|
5402
5402
|
" ",
|
|
5403
|
-
|
|
5403
|
+
I
|
|
5404
5404
|
] });
|
|
5405
|
-
},
|
|
5405
|
+
}, Qv = ({
|
|
5406
5406
|
label: h,
|
|
5407
5407
|
status: a
|
|
5408
5408
|
}) => {
|
|
5409
|
-
const { Box: i, Text: l } = mt(),
|
|
5409
|
+
const { Box: i, Text: l } = mt(), p = Uv(a), I = as(p), x = He[p];
|
|
5410
5410
|
return /* @__PURE__ */ le(i, { children: [
|
|
5411
5411
|
/* @__PURE__ */ le(l, { dimColor: !0, children: [
|
|
5412
5412
|
h,
|
|
5413
5413
|
": "
|
|
5414
5414
|
] }),
|
|
5415
|
-
/* @__PURE__ */ le(l, { color:
|
|
5416
|
-
|
|
5415
|
+
/* @__PURE__ */ le(l, { color: x.color, children: [
|
|
5416
|
+
I,
|
|
5417
5417
|
" ",
|
|
5418
5418
|
a.replace("_", " ")
|
|
5419
5419
|
] })
|
|
5420
5420
|
] });
|
|
5421
|
-
},
|
|
5421
|
+
}, jv = ({
|
|
5422
5422
|
state: h
|
|
5423
5423
|
}) => {
|
|
5424
|
-
const { Box: a, Text: i } = mt(), l =
|
|
5424
|
+
const { Box: a, Text: i } = mt(), l = kv(h.entities), p = Gv(h);
|
|
5425
5425
|
return /* @__PURE__ */ le(
|
|
5426
5426
|
a,
|
|
5427
5427
|
{
|
|
@@ -5438,80 +5438,80 @@ const He = {
|
|
|
5438
5438
|
] }),
|
|
5439
5439
|
/* @__PURE__ */ le(a, { children: [
|
|
5440
5440
|
/* @__PURE__ */ Y(i, { dimColor: !0, children: "Overall Status: " }),
|
|
5441
|
-
/* @__PURE__ */ Y(
|
|
5441
|
+
/* @__PURE__ */ Y(Xv, { state: h })
|
|
5442
5442
|
] }),
|
|
5443
|
-
|
|
5443
|
+
p && /* @__PURE__ */ le(a, { children: [
|
|
5444
5444
|
/* @__PURE__ */ Y(i, { dimColor: !0, children: "Open:" }),
|
|
5445
5445
|
/* @__PURE__ */ le(i, { bold: !0, color: "cyan", children: [
|
|
5446
5446
|
" ",
|
|
5447
|
-
|
|
5447
|
+
p
|
|
5448
5448
|
] })
|
|
5449
5449
|
] })
|
|
5450
5450
|
] }),
|
|
5451
|
-
/* @__PURE__ */ Y(a, { marginLeft: 2, flexDirection: "column", marginTop: 1, children:
|
|
5452
|
-
|
|
5451
|
+
/* @__PURE__ */ Y(a, { marginLeft: 2, flexDirection: "column", marginTop: 1, children: zv(h).map((I) => /* @__PURE__ */ Y(
|
|
5452
|
+
Qv,
|
|
5453
5453
|
{
|
|
5454
|
-
label:
|
|
5455
|
-
status:
|
|
5454
|
+
label: I.label,
|
|
5455
|
+
status: I.status
|
|
5456
5456
|
},
|
|
5457
|
-
|
|
5457
|
+
I.label
|
|
5458
5458
|
)) }),
|
|
5459
|
-
/* @__PURE__ */ Y(a, { marginLeft: 2, flexDirection: "column", children: fu.map((
|
|
5460
|
-
const
|
|
5461
|
-
return /* @__PURE__ */ Y(
|
|
5459
|
+
/* @__PURE__ */ Y(a, { marginLeft: 2, flexDirection: "column", children: fu.map((I) => {
|
|
5460
|
+
const x = l.get(I) ?? [];
|
|
5461
|
+
return /* @__PURE__ */ Y(Zv, { type: I, entities: x }, I);
|
|
5462
5462
|
}) })
|
|
5463
5463
|
]
|
|
5464
5464
|
}
|
|
5465
5465
|
);
|
|
5466
|
-
},
|
|
5466
|
+
}, ey = ({
|
|
5467
5467
|
event: h
|
|
5468
5468
|
}) => {
|
|
5469
|
-
const { Box: a, Text: i } = mt(), l =
|
|
5469
|
+
const { Box: a, Text: i } = mt(), l = Wv[h.status], p = Mv(h.timestamp);
|
|
5470
5470
|
return /* @__PURE__ */ le(a, { children: [
|
|
5471
5471
|
/* @__PURE__ */ le(i, { dimColor: !0, children: [
|
|
5472
|
-
|
|
5472
|
+
p,
|
|
5473
5473
|
" "
|
|
5474
5474
|
] }),
|
|
5475
5475
|
/* @__PURE__ */ Y(i, { color: l, children: h.message })
|
|
5476
5476
|
] });
|
|
5477
|
-
},
|
|
5477
|
+
}, ty = /* @__PURE__ */ new Set([
|
|
5478
5478
|
"building",
|
|
5479
5479
|
"syncing"
|
|
5480
|
-
]), Xo = 120,
|
|
5480
|
+
]), Xo = 120, ny = 80, ry = ({
|
|
5481
5481
|
uiStateManager: h
|
|
5482
5482
|
}) => {
|
|
5483
|
-
const { Box: a, Static: i } = mt(), [, l] =
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
},
|
|
5483
|
+
const { Box: a, Static: i } = mt(), [, l] = Ym((G) => G + 1, 0), p = Ko(null), I = Ko(0), x = Zm(() => {
|
|
5484
|
+
p.current && clearTimeout(p.current), p.current = setTimeout(() => {
|
|
5485
|
+
p.current = null, I.current = Date.now(), l();
|
|
5486
|
+
}, ny);
|
|
5487
5487
|
}, []);
|
|
5488
5488
|
es(() => h.subscribe(() => {
|
|
5489
|
-
|
|
5490
|
-
}), [h,
|
|
5489
|
+
x();
|
|
5490
|
+
}), [h, x]), es(() => {
|
|
5491
5491
|
const G = setInterval(() => {
|
|
5492
|
-
const
|
|
5493
|
-
|
|
5492
|
+
const J = h.getSnapshot();
|
|
5493
|
+
ty.has(J.pipeline.status) && (Date.now() - I.current < Xo || l());
|
|
5494
5494
|
}, Xo);
|
|
5495
5495
|
return () => clearInterval(G);
|
|
5496
5496
|
}, [h]), es(() => () => {
|
|
5497
|
-
|
|
5497
|
+
p.current && clearTimeout(p.current);
|
|
5498
5498
|
}, []);
|
|
5499
5499
|
const O = h.getSnapshot();
|
|
5500
|
-
return /* @__PURE__ */ le(
|
|
5501
|
-
/* @__PURE__ */ Y(i, { items: O.events, children: (G) => /* @__PURE__ */ Y(
|
|
5500
|
+
return /* @__PURE__ */ le(qm, { children: [
|
|
5501
|
+
/* @__PURE__ */ Y(i, { items: O.events, children: (G) => /* @__PURE__ */ Y(ey, { event: G }, G.id) }),
|
|
5502
5502
|
/* @__PURE__ */ le(a, { marginTop: 1, flexDirection: "column", children: [
|
|
5503
|
-
/* @__PURE__ */ Y(
|
|
5504
|
-
/* @__PURE__ */ Y(
|
|
5503
|
+
/* @__PURE__ */ Y(jv, { state: O }),
|
|
5504
|
+
/* @__PURE__ */ Y(Jv, {})
|
|
5505
5505
|
] })
|
|
5506
5506
|
] });
|
|
5507
|
-
},
|
|
5508
|
-
const a = await import("ink"), { render: i, Box: l, Text:
|
|
5509
|
-
/* @__PURE__ */ Y(
|
|
5507
|
+
}, iy = async (h) => {
|
|
5508
|
+
const a = await import("ink"), { render: i, Box: l, Text: p, Static: I } = a, { unmount: x } = i(
|
|
5509
|
+
/* @__PURE__ */ Y(Vv, { value: { Box: l, Text: p, Static: I }, children: /* @__PURE__ */ Y(ry, { uiStateManager: h }) }),
|
|
5510
5510
|
{ incrementalRendering: !0 }
|
|
5511
5511
|
);
|
|
5512
|
-
return { unmount:
|
|
5512
|
+
return { unmount: x };
|
|
5513
5513
|
};
|
|
5514
|
-
class
|
|
5514
|
+
class sy {
|
|
5515
5515
|
constructor(a) {
|
|
5516
5516
|
this.listeners = /* @__PURE__ */ new Set(), this.pendingNotify = !1, this.orchestratorState = a;
|
|
5517
5517
|
}
|
|
@@ -5529,7 +5529,7 @@ class ry {
|
|
|
5529
5529
|
}));
|
|
5530
5530
|
}
|
|
5531
5531
|
}
|
|
5532
|
-
class
|
|
5532
|
+
class ay {
|
|
5533
5533
|
constructor() {
|
|
5534
5534
|
this.orchestrator = null, this.unmountUI = null;
|
|
5535
5535
|
}
|
|
@@ -5540,20 +5540,20 @@ class iy {
|
|
|
5540
5540
|
return this.orchestrator;
|
|
5541
5541
|
}
|
|
5542
5542
|
async execute(a) {
|
|
5543
|
-
const i = a.appPath ??
|
|
5543
|
+
const i = a.appPath ?? ee;
|
|
5544
5544
|
await nn(i);
|
|
5545
|
-
const l = await new _e().getConfig(),
|
|
5545
|
+
const l = await new _e().getConfig(), p = new Ov({
|
|
5546
5546
|
appPath: i,
|
|
5547
5547
|
frontendUrl: l.apiUrl
|
|
5548
5548
|
});
|
|
5549
5549
|
if (!a.headless) {
|
|
5550
|
-
const
|
|
5551
|
-
|
|
5552
|
-
const { unmount:
|
|
5553
|
-
this.unmountUI =
|
|
5550
|
+
const I = new sy(p);
|
|
5551
|
+
p.onChange = () => I.notify();
|
|
5552
|
+
const { unmount: x } = await iy(I);
|
|
5553
|
+
this.unmountUI = x;
|
|
5554
5554
|
}
|
|
5555
|
-
this.orchestrator = new
|
|
5556
|
-
state:
|
|
5555
|
+
this.orchestrator = new Fv({
|
|
5556
|
+
state: p,
|
|
5557
5557
|
verbose: a.verbose
|
|
5558
5558
|
}), await this.orchestrator.start(), a.headless || this.setupGracefulShutdown();
|
|
5559
5559
|
}
|
|
@@ -5562,112 +5562,112 @@ class iy {
|
|
|
5562
5562
|
process.on("SIGINT", a), process.on("SIGTERM", a);
|
|
5563
5563
|
}
|
|
5564
5564
|
}
|
|
5565
|
-
class
|
|
5565
|
+
class oy {
|
|
5566
5566
|
async execute({
|
|
5567
|
-
appPath: a =
|
|
5567
|
+
appPath: a = ee,
|
|
5568
5568
|
postInstall: i = !1,
|
|
5569
5569
|
preInstall: l = !1,
|
|
5570
|
-
functionUniversalIdentifier:
|
|
5571
|
-
functionName:
|
|
5572
|
-
payload:
|
|
5570
|
+
functionUniversalIdentifier: p,
|
|
5571
|
+
functionName: I,
|
|
5572
|
+
payload: x = "{}"
|
|
5573
5573
|
}) {
|
|
5574
5574
|
let O;
|
|
5575
5575
|
try {
|
|
5576
|
-
O = JSON.parse(
|
|
5576
|
+
O = JSON.parse(x);
|
|
5577
5577
|
} catch {
|
|
5578
5578
|
console.error(
|
|
5579
|
-
|
|
5579
|
+
v.red("Invalid JSON payload. Please provide valid JSON.")
|
|
5580
5580
|
), process.exit(1);
|
|
5581
5581
|
}
|
|
5582
|
-
const G = i ? "post install" : l ? "pre install" :
|
|
5583
|
-
console.log(
|
|
5582
|
+
const G = i ? "post install" : l ? "pre install" : p ?? I;
|
|
5583
|
+
console.log(v.blue(`🚀 Executing function "${G}"...`)), console.log(v.gray(` Payload: ${JSON.stringify(O)}
|
|
5584
5584
|
`));
|
|
5585
|
-
const
|
|
5586
|
-
if (!
|
|
5587
|
-
switch (
|
|
5585
|
+
const Q = await Cm(i ? { appPath: a, postInstall: !0, payload: O } : l ? { appPath: a, preInstall: !0, payload: O } : p ? { appPath: a, functionUniversalIdentifier: p, payload: O } : { appPath: a, functionName: I, payload: O });
|
|
5586
|
+
if (!Q.success) {
|
|
5587
|
+
switch (Q.error.code) {
|
|
5588
5588
|
case Fm.MANIFEST_NOT_FOUND: {
|
|
5589
|
-
console.error(
|
|
5589
|
+
console.error(v.red("Failed to build manifest."));
|
|
5590
5590
|
break;
|
|
5591
5591
|
}
|
|
5592
5592
|
case Qi.FETCH_FUNCTIONS_FAILED: {
|
|
5593
5593
|
console.error(
|
|
5594
|
-
|
|
5595
|
-
|
|
5594
|
+
v.red("Failed to fetch functions:"),
|
|
5595
|
+
Q.error.message
|
|
5596
5596
|
);
|
|
5597
5597
|
break;
|
|
5598
5598
|
}
|
|
5599
5599
|
case Qi.FUNCTION_NOT_FOUND: {
|
|
5600
|
-
console.error(
|
|
5600
|
+
console.error(v.red(Q.error.message), `
|
|
5601
5601
|
`);
|
|
5602
|
-
const B =
|
|
5603
|
-
B.length > 0 ? (console.log(
|
|
5602
|
+
const B = Q.error.details?.availableFunctions ?? [];
|
|
5603
|
+
B.length > 0 ? (console.log(v.cyan("Available functions:")), B.forEach((D) => {
|
|
5604
5604
|
console.log(
|
|
5605
|
-
` - ${
|
|
5605
|
+
` - ${v.white(D.name)} (${D.universalIdentifier})`
|
|
5606
5606
|
);
|
|
5607
5607
|
})) : console.log(
|
|
5608
|
-
|
|
5608
|
+
v.yellow(
|
|
5609
5609
|
"No functions found for this application. Have you synced your app with `twenty dev`?"
|
|
5610
5610
|
)
|
|
5611
5611
|
);
|
|
5612
5612
|
break;
|
|
5613
5613
|
}
|
|
5614
5614
|
case Qi.EXECUTION_FAILED: {
|
|
5615
|
-
console.error(
|
|
5615
|
+
console.error(v.red("Execution failed:"), Q.error.message);
|
|
5616
5616
|
break;
|
|
5617
5617
|
}
|
|
5618
5618
|
default:
|
|
5619
|
-
console.error(
|
|
5619
|
+
console.error(v.red(Q.error.message));
|
|
5620
5620
|
}
|
|
5621
5621
|
process.exit(1);
|
|
5622
5622
|
}
|
|
5623
|
-
const z =
|
|
5624
|
-
console.log(
|
|
5625
|
-
const Xe = z.status === "SUCCESS" ?
|
|
5623
|
+
const z = Q.data;
|
|
5624
|
+
console.log(v.cyan("─".repeat(60))), console.log(v.cyan("Execution Result")), console.log(v.cyan("─".repeat(60)));
|
|
5625
|
+
const Xe = z.status === "SUCCESS" ? v.green : v.red;
|
|
5626
5626
|
console.log(
|
|
5627
|
-
`${
|
|
5628
|
-
), console.log(`${
|
|
5629
|
-
`), iu(z.data) && (console.log(
|
|
5630
|
-
|
|
5627
|
+
`${v.bold("Status:")} ${Xe(z.status)}`
|
|
5628
|
+
), console.log(`${v.bold("Duration:")} ${z.duration}ms
|
|
5629
|
+
`), iu(z.data) && (console.log(v.bold("Data:")), console.log(v.white(JSON.stringify(z.data, null, 2)))), z.error && (console.log(v.bold.red("Error:")), console.log(v.red(` Type: ${z.error.errorType}`)), console.log(
|
|
5630
|
+
v.red(` Message: ${z.error.errorMessage}
|
|
5631
5631
|
`)
|
|
5632
|
-
), z.error.stackTrace && (console.log(
|
|
5632
|
+
), z.error.stackTrace && (console.log(v.gray("Stack trace:")), console.log(v.gray(z.error.stackTrace)))), z.logs && (console.log(v.bold("Logs:")), console.log(v.gray(z.logs))), console.log(v.cyan("─".repeat(60))), z.status !== "SUCCESS" && process.exit(1);
|
|
5633
5633
|
}
|
|
5634
5634
|
}
|
|
5635
|
-
class
|
|
5635
|
+
class uy {
|
|
5636
5636
|
async execute(a) {
|
|
5637
|
-
const i = a.appPath ??
|
|
5638
|
-
await nn(i), console.log(
|
|
5637
|
+
const i = a.appPath ?? ee;
|
|
5638
|
+
await nn(i), console.log(v.blue("Installing application...")), console.log(v.gray(`App path: ${i}
|
|
5639
5639
|
`));
|
|
5640
5640
|
const l = await Pm({
|
|
5641
5641
|
appPath: i,
|
|
5642
5642
|
remote: a.remote
|
|
5643
5643
|
});
|
|
5644
|
-
l.success || (console.error(
|
|
5644
|
+
l.success || (console.error(v.red(l.error.message)), process.exit(1)), console.log(v.green("✓ Application installed"));
|
|
5645
5645
|
}
|
|
5646
5646
|
}
|
|
5647
|
-
class
|
|
5647
|
+
class ly {
|
|
5648
5648
|
constructor() {
|
|
5649
5649
|
this.apiService = new Fr();
|
|
5650
5650
|
}
|
|
5651
5651
|
async execute({
|
|
5652
|
-
appPath: a =
|
|
5652
|
+
appPath: a = ee,
|
|
5653
5653
|
functionUniversalIdentifier: i,
|
|
5654
5654
|
functionName: l
|
|
5655
5655
|
}) {
|
|
5656
5656
|
try {
|
|
5657
|
-
const
|
|
5658
|
-
|
|
5659
|
-
appName:
|
|
5657
|
+
const p = await Rm(a);
|
|
5658
|
+
p || process.exit(1), this.logWatchInfo({
|
|
5659
|
+
appName: p.application.displayName,
|
|
5660
5660
|
functionUniversalIdentifier: i,
|
|
5661
5661
|
functionName: l
|
|
5662
5662
|
}), await this.apiService.subscribeToLogs({
|
|
5663
|
-
applicationUniversalIdentifier:
|
|
5663
|
+
applicationUniversalIdentifier: p.application.universalIdentifier,
|
|
5664
5664
|
functionUniversalIdentifier: i,
|
|
5665
5665
|
functionName: l
|
|
5666
5666
|
});
|
|
5667
|
-
} catch (
|
|
5667
|
+
} catch (p) {
|
|
5668
5668
|
console.error(
|
|
5669
|
-
|
|
5670
|
-
|
|
5669
|
+
v.red("Watch logs failed:"),
|
|
5670
|
+
p instanceof Error ? p.message : p
|
|
5671
5671
|
), process.exit(1);
|
|
5672
5672
|
}
|
|
5673
5673
|
}
|
|
@@ -5676,33 +5676,33 @@ class oy {
|
|
|
5676
5676
|
functionUniversalIdentifier: i,
|
|
5677
5677
|
functionName: l
|
|
5678
5678
|
}) {
|
|
5679
|
-
const
|
|
5679
|
+
const p = a ?? "Twenty Application", I = i || l ? `function "${i || l}"` : "functions";
|
|
5680
5680
|
console.log(
|
|
5681
|
-
|
|
5681
|
+
v.blue(`🚀 Watching ${p} ${I} logs:
|
|
5682
5682
|
`)
|
|
5683
5683
|
);
|
|
5684
5684
|
}
|
|
5685
5685
|
}
|
|
5686
|
-
class
|
|
5686
|
+
class cy {
|
|
5687
5687
|
async execute(a) {
|
|
5688
|
-
const i = a.appPath ??
|
|
5689
|
-
await nn(i), console.log(
|
|
5688
|
+
const i = a.appPath ?? ee;
|
|
5689
|
+
await nn(i), console.log(v.blue("Publishing to npm...")), console.log(v.gray(`App path: ${i}
|
|
5690
5690
|
`));
|
|
5691
5691
|
const l = await Lm({
|
|
5692
5692
|
appPath: i,
|
|
5693
5693
|
npmTag: a.tag,
|
|
5694
|
-
onProgress: (
|
|
5694
|
+
onProgress: (p) => console.log(v.gray(p))
|
|
5695
5695
|
});
|
|
5696
|
-
l.success || (console.error(
|
|
5696
|
+
l.success || (console.error(v.red(l.error.message)), process.exit(1)), console.log(v.green("✓ Published to npm successfully"));
|
|
5697
5697
|
}
|
|
5698
5698
|
}
|
|
5699
|
-
const
|
|
5699
|
+
const fy = (h) => {
|
|
5700
5700
|
try {
|
|
5701
5701
|
return new URL(h).hostname.replace(/\./g, "-");
|
|
5702
5702
|
} catch {
|
|
5703
5703
|
return "remote";
|
|
5704
5704
|
}
|
|
5705
|
-
}, Qo = async (h, a) => a ? ((await su({ apiKey: a, apiUrl: h })).success || (console.error(
|
|
5705
|
+
}, Qo = async (h, a) => a ? ((await su({ apiKey: a, apiUrl: h })).success || (console.error(v.red("✗ Authentication failed.")), process.exit(1)), "API key") : hy(h), hy = async (h) => {
|
|
5706
5706
|
await ze.prompt([
|
|
5707
5707
|
{
|
|
5708
5708
|
type: "input",
|
|
@@ -5713,52 +5713,52 @@ const ly = (h) => {
|
|
|
5713
5713
|
const a = await Um({ apiUrl: h });
|
|
5714
5714
|
if (a.success)
|
|
5715
5715
|
return "OAuth";
|
|
5716
|
-
console.log(
|
|
5716
|
+
console.log(v.yellow(a.error.message));
|
|
5717
5717
|
const i = await ze.prompt([
|
|
5718
5718
|
{
|
|
5719
5719
|
type: "password",
|
|
5720
5720
|
name: "apiKey",
|
|
5721
5721
|
message: "API Key:",
|
|
5722
5722
|
mask: "*",
|
|
5723
|
-
validate: (
|
|
5723
|
+
validate: (p) => p.length > 0 || "API key is required"
|
|
5724
5724
|
}
|
|
5725
5725
|
]);
|
|
5726
5726
|
return (await su({
|
|
5727
5727
|
apiKey: i.apiKey,
|
|
5728
5728
|
apiUrl: h
|
|
5729
|
-
})).success || (console.error(
|
|
5730
|
-
},
|
|
5729
|
+
})).success || (console.error(v.red("✗ Authentication failed.")), process.exit(1)), "API key";
|
|
5730
|
+
}, py = (h) => {
|
|
5731
5731
|
const a = h.command("remote").description("Manage remote Twenty servers");
|
|
5732
5732
|
a.command("add").description("Add a new remote or re-authenticate an existing one").option("--as <name>", "Name for this remote").option("--api-key <apiKey>", "API key for non-interactive auth").option("--api-url <apiUrl>", "Server URL").option("--local", "Connect to a local Twenty server (auto-detect)").option("--test", "Write to config.test.json (for integration tests)").action(
|
|
5733
5733
|
async (i) => {
|
|
5734
|
-
const l = i.test ? Om(!0) : void 0,
|
|
5734
|
+
const l = i.test ? Om(!0) : void 0, p = new _e(
|
|
5735
5735
|
l ? { configPath: l } : void 0
|
|
5736
|
-
),
|
|
5737
|
-
if (i.as !== void 0 &&
|
|
5738
|
-
const
|
|
5736
|
+
), I = await p.getRemotes();
|
|
5737
|
+
if (i.as !== void 0 && I.includes(i.as)) {
|
|
5738
|
+
const J = await p.getConfigForRemote(i.as);
|
|
5739
5739
|
_e.setActiveRemote(i.as);
|
|
5740
|
-
const
|
|
5740
|
+
const Q = await Qo(J.apiUrl, i.apiKey);
|
|
5741
5741
|
console.log(
|
|
5742
|
-
|
|
5743
|
-
), await
|
|
5742
|
+
v.green(`✓ Re-authenticated "${i.as}" via ${Q}.`)
|
|
5743
|
+
), await p.setDefaultRemote(i.as), console.log(v.green(`✓ Default remote set to "${i.as}".`));
|
|
5744
5744
|
return;
|
|
5745
5745
|
}
|
|
5746
|
-
let
|
|
5747
|
-
if (!
|
|
5748
|
-
const
|
|
5749
|
-
i.local ? (
|
|
5750
|
-
|
|
5746
|
+
let x = i.apiUrl;
|
|
5747
|
+
if (!x) {
|
|
5748
|
+
const J = await tu();
|
|
5749
|
+
i.local ? (J || (console.error(
|
|
5750
|
+
v.red(
|
|
5751
5751
|
`No local Twenty server found.
|
|
5752
5752
|
Start one with: yarn twenty server start`
|
|
5753
5753
|
)
|
|
5754
|
-
), process.exit(1)), console.log(
|
|
5754
|
+
), process.exit(1)), console.log(v.gray(`Found local server at ${J}`)), x = J) : x = (await ze.prompt([
|
|
5755
5755
|
{
|
|
5756
5756
|
type: "input",
|
|
5757
5757
|
name: "apiUrl",
|
|
5758
5758
|
message: "Twenty server URL:",
|
|
5759
|
-
validate: (
|
|
5759
|
+
validate: (Q) => {
|
|
5760
5760
|
try {
|
|
5761
|
-
return new URL(
|
|
5761
|
+
return new URL(Q), !0;
|
|
5762
5762
|
} catch {
|
|
5763
5763
|
return "Please enter a valid URL";
|
|
5764
5764
|
}
|
|
@@ -5766,33 +5766,33 @@ Start one with: yarn twenty server start`
|
|
|
5766
5766
|
}
|
|
5767
5767
|
])).apiUrl;
|
|
5768
5768
|
}
|
|
5769
|
-
const O = i.as ??
|
|
5769
|
+
const O = i.as ?? fy(x);
|
|
5770
5770
|
_e.setActiveRemote(O);
|
|
5771
|
-
const G = await Qo(
|
|
5771
|
+
const G = await Qo(x, i.apiKey);
|
|
5772
5772
|
console.log(
|
|
5773
|
-
|
|
5774
|
-
), await
|
|
5773
|
+
v.green(`✓ Remote "${O}" added (${x}) via ${G}.`)
|
|
5774
|
+
), await p.setDefaultRemote(O), console.log(v.green(`✓ Default remote set to "${O}".`));
|
|
5775
5775
|
}
|
|
5776
5776
|
), a.command("list").description("List all configured remotes").action(async () => {
|
|
5777
|
-
const i = new _e(), l = await i.getRemotes(),
|
|
5777
|
+
const i = new _e(), l = await i.getRemotes(), p = await i.getDefaultRemote();
|
|
5778
5778
|
if (l.length === 0) {
|
|
5779
5779
|
console.log("No remotes configured."), console.log("Use 'twenty remote add' to add one.");
|
|
5780
5780
|
return;
|
|
5781
5781
|
}
|
|
5782
5782
|
console.log("");
|
|
5783
|
-
for (const
|
|
5784
|
-
const
|
|
5783
|
+
for (const I of l) {
|
|
5784
|
+
const x = await i.getConfigForRemote(I), O = x.twentyCLIAccessToken ? "oauth" : x.apiKey ? "api-key" : "none", G = I === p, J = G ? "* " : " ", Q = G ? v.bold(I) : I;
|
|
5785
5785
|
console.log(
|
|
5786
|
-
`${
|
|
5786
|
+
`${J}${Q} ${v.gray(x.apiUrl)} [${O}]`
|
|
5787
5787
|
);
|
|
5788
5788
|
}
|
|
5789
5789
|
console.log(
|
|
5790
5790
|
`
|
|
5791
5791
|
`,
|
|
5792
|
-
|
|
5792
|
+
v.gray("Use 'twenty remote switch <name>' to change default")
|
|
5793
5793
|
);
|
|
5794
5794
|
}), a.command("switch [name]").description("Set the default remote").action(async (i) => {
|
|
5795
|
-
const l = new _e(),
|
|
5795
|
+
const l = new _e(), p = i ?? (await ze.prompt([
|
|
5796
5796
|
{
|
|
5797
5797
|
type: "list",
|
|
5798
5798
|
name: "remote",
|
|
@@ -5800,45 +5800,45 @@ Start one with: yarn twenty server start`
|
|
|
5800
5800
|
choices: await l.getRemotes()
|
|
5801
5801
|
}
|
|
5802
5802
|
])).remote;
|
|
5803
|
-
(await l.getRemotes()).includes(
|
|
5803
|
+
(await l.getRemotes()).includes(p) || (console.error(v.red(`Remote "${p}" not found.`)), process.exit(1)), await l.setDefaultRemote(p), console.log(v.green(`✓ Default remote set to "${p}".`));
|
|
5804
5804
|
}), a.command("status").description("Show active remote and authentication status").action(async () => {
|
|
5805
|
-
const i = new _e(), l = new Fr(),
|
|
5806
|
-
if (console.log(` Remote: ${
|
|
5807
|
-
console.log(` Auth: ${
|
|
5805
|
+
const i = new _e(), l = new Fr(), p = _e.getActiveRemote(), I = await i.getConfig(), x = I.twentyCLIAccessToken ? "oauth" : I.apiKey ? "api-key" : "none";
|
|
5806
|
+
if (console.log(` Remote: ${v.bold(p)}`), console.log(` Server: ${I.apiUrl}`), x === "none") {
|
|
5807
|
+
console.log(` Auth: ${v.yellow("not configured")}`);
|
|
5808
5808
|
return;
|
|
5809
5809
|
}
|
|
5810
|
-
const { authValid: O } = await l.validateAuth(), G = O ?
|
|
5810
|
+
const { authValid: O } = await l.validateAuth(), G = O ? v.green(`${x} (valid)`) : v.red(`${x} (invalid)`);
|
|
5811
5811
|
console.log(` Auth: ${G}`);
|
|
5812
5812
|
}), a.command("remove <name>").description("Remove a remote").action(async (i) => {
|
|
5813
5813
|
const l = new _e();
|
|
5814
|
-
(await l.getRemotes()).includes(i) || (console.error(
|
|
5814
|
+
(await l.getRemotes()).includes(i) || (console.error(v.red(`Remote "${i}" not found.`)), process.exit(1)), _e.setActiveRemote(i), await l.clearConfig(), console.log(v.green(`✓ Remote "${i}" removed.`));
|
|
5815
5815
|
});
|
|
5816
|
-
},
|
|
5816
|
+
}, dy = (h) => {
|
|
5817
5817
|
const a = h.command("server").description("Manage a local Twenty server instance");
|
|
5818
5818
|
a.command("start").description("Start a local Twenty server").option("-p, --port <port>", "HTTP port").option("--test", "Start a separate test instance (port 2021)").action(async (i) => {
|
|
5819
|
-
const l = i.test ? Go : Ho,
|
|
5820
|
-
(isNaN(
|
|
5821
|
-
const
|
|
5822
|
-
port:
|
|
5819
|
+
const l = i.test ? Go : Ho, p = i.port ? parseInt(i.port, 10) : l;
|
|
5820
|
+
(isNaN(p) || p < 1 || p > 65535) && (console.error(v.red("Invalid port number.")), process.exit(1));
|
|
5821
|
+
const I = await Nm({
|
|
5822
|
+
port: p,
|
|
5823
5823
|
test: i.test,
|
|
5824
|
-
onProgress: (
|
|
5824
|
+
onProgress: (x) => console.log(v.gray(x))
|
|
5825
5825
|
});
|
|
5826
|
-
|
|
5826
|
+
I.success || (console.error(v.red(I.error.message)), process.exit(1));
|
|
5827
5827
|
}), a.command("stop").description("Stop the local Twenty server").option("--test", "Stop the test instance").action((i) => {
|
|
5828
5828
|
const l = i.test ? Er : br;
|
|
5829
5829
|
if (!Tr(l)) {
|
|
5830
|
-
console.log(
|
|
5830
|
+
console.log(v.yellow("No Twenty server container found."));
|
|
5831
5831
|
return;
|
|
5832
5832
|
}
|
|
5833
|
-
ji(`docker stop ${l}`, { stdio: "ignore" }), console.log(
|
|
5833
|
+
ji(`docker stop ${l}`, { stdio: "ignore" }), console.log(v.green("Twenty server stopped."));
|
|
5834
5834
|
}), a.command("logs").description("Stream Twenty server logs").option("-n, --lines <lines>", "Number of lines to show", "50").option("--test", "Show logs for the test instance").action((i) => {
|
|
5835
5835
|
const l = i.test ? Er : br;
|
|
5836
5836
|
if (!Tr(l)) {
|
|
5837
|
-
console.log(
|
|
5837
|
+
console.log(v.yellow("No Twenty server container found."));
|
|
5838
5838
|
return;
|
|
5839
5839
|
}
|
|
5840
5840
|
try {
|
|
5841
|
-
|
|
5841
|
+
Vm(
|
|
5842
5842
|
"docker",
|
|
5843
5843
|
["logs", "-f", "--tail", i.lines, l],
|
|
5844
5844
|
{ stdio: "inherit" }
|
|
@@ -5846,79 +5846,98 @@ Start one with: yarn twenty server start`
|
|
|
5846
5846
|
} catch {
|
|
5847
5847
|
}
|
|
5848
5848
|
}), a.command("status").description("Show Twenty server status").option("--test", "Show status of the test instance").action(async (i) => {
|
|
5849
|
-
const l = i.test ? Er : br,
|
|
5849
|
+
const l = i.test ? Er : br, p = i.test ? Go : Ho;
|
|
5850
5850
|
if (!Tr(l)) {
|
|
5851
|
-
console.log(` Status: ${
|
|
5852
|
-
|
|
5851
|
+
console.log(` Status: ${v.gray("not created")}`), console.log(
|
|
5852
|
+
v.gray(
|
|
5853
5853
|
` Run 'yarn twenty server start${i.test ? " --test" : ""}' to create one.`
|
|
5854
5854
|
)
|
|
5855
5855
|
);
|
|
5856
5856
|
return;
|
|
5857
5857
|
}
|
|
5858
|
-
const
|
|
5859
|
-
console.log(` Status: ${G}`), console.log(` URL: http://localhost:${
|
|
5858
|
+
const I = $m(l), x = I ? Dm(l) : p, O = I ? await Wm(x) : !1, G = O ? v.green("running (healthy)") : I ? v.yellow("running (starting...)") : v.gray("stopped"), J = Mm("APP_VERSION", l);
|
|
5859
|
+
console.log(` Status: ${G}`), console.log(` URL: http://localhost:${x}`), J && console.log(` Version: ${v.gray(J)}`), O && console.log(v.gray(" Login: tim@apple.dev / tim@apple.dev"));
|
|
5860
5860
|
}), a.command("reset").description("Delete all data and start fresh").option("--test", "Reset the test instance").action((i) => {
|
|
5861
|
-
const l = i.test ? Er : br,
|
|
5861
|
+
const l = i.test ? Er : br, p = i.test ? "twenty-app-dev-test-data" : "twenty-app-dev-data", I = i.test ? "twenty-app-dev-test-storage" : "twenty-app-dev-storage";
|
|
5862
5862
|
Tr(l) && ji(`docker rm -f ${l}`, { stdio: "ignore" });
|
|
5863
5863
|
try {
|
|
5864
|
-
ji(`docker volume rm ${
|
|
5864
|
+
ji(`docker volume rm ${p} ${I}`, {
|
|
5865
5865
|
stdio: "ignore"
|
|
5866
5866
|
});
|
|
5867
5867
|
} catch {
|
|
5868
5868
|
}
|
|
5869
|
-
console.log(
|
|
5870
|
-
|
|
5869
|
+
console.log(v.green("Twenty server data reset.")), console.log(
|
|
5870
|
+
v.gray(
|
|
5871
5871
|
`Run 'yarn twenty server start${i.test ? " --test" : ""}' to start a fresh instance.`
|
|
5872
5872
|
)
|
|
5873
5873
|
);
|
|
5874
|
-
})
|
|
5874
|
+
}), a.command("upgrade [version]").description("Upgrade the twenty-app-dev Docker image").option("--test", "Upgrade the test instance").action(
|
|
5875
|
+
async (i, l) => {
|
|
5876
|
+
const p = await Bm({
|
|
5877
|
+
version: i ?? "latest",
|
|
5878
|
+
test: l.test,
|
|
5879
|
+
onProgress: (x) => console.log(v.gray(x))
|
|
5880
|
+
});
|
|
5881
|
+
p.success || (console.error(v.red(p.error.message)), process.exit(1));
|
|
5882
|
+
const { data: I } = p;
|
|
5883
|
+
if (!I.imageUpdated) {
|
|
5884
|
+
console.log(v.green(` Already up to date (${I.image}).`));
|
|
5885
|
+
return;
|
|
5886
|
+
}
|
|
5887
|
+
console.log(v.green(` Upgraded to: ${I.image}`)), I.containerRecreated && console.log(
|
|
5888
|
+
v.gray(
|
|
5889
|
+
` Run 'yarn twenty server start${l.test ? " --test" : ""}' to wait for the server to be ready.`
|
|
5890
|
+
)
|
|
5891
|
+
);
|
|
5892
|
+
}
|
|
5893
|
+
);
|
|
5875
5894
|
};
|
|
5876
|
-
class
|
|
5895
|
+
class gy {
|
|
5877
5896
|
async execute(a) {
|
|
5878
|
-
const i = a.appPath ??
|
|
5879
|
-
await nn(i), console.log(
|
|
5897
|
+
const i = a.appPath ?? ee;
|
|
5898
|
+
await nn(i), console.log(v.blue("Syncing application...")), console.log(v.gray(`App path: ${i}
|
|
5880
5899
|
`));
|
|
5881
|
-
const l = await
|
|
5900
|
+
const l = await km({
|
|
5882
5901
|
appPath: i,
|
|
5883
5902
|
verbose: a.verbose,
|
|
5884
|
-
onProgress: (
|
|
5903
|
+
onProgress: (p) => console.log(v.gray(p))
|
|
5885
5904
|
});
|
|
5886
|
-
l.success || (console.error(
|
|
5887
|
-
|
|
5905
|
+
l.success || (console.error(v.red(l.error.message)), process.exit(1)), console.log(
|
|
5906
|
+
v.green(
|
|
5888
5907
|
`
|
|
5889
5908
|
✓ Synced ${l.data.applicationDisplayName} (${l.data.fileCount} file${l.data.fileCount === 1 ? "" : "s"})`
|
|
5890
5909
|
)
|
|
5891
|
-
), console.log(
|
|
5910
|
+
), console.log(v.gray(`Output: ${l.data.outputDir}`));
|
|
5892
5911
|
}
|
|
5893
5912
|
}
|
|
5894
|
-
const
|
|
5895
|
-
class
|
|
5913
|
+
const my = (h) => `${v.cyan(h.file)}:${v.yellow(String(h.line))}:${v.yellow(String(h.column + 1))} - ${v.red("error")} ${h.text}`;
|
|
5914
|
+
class vy {
|
|
5896
5915
|
async execute(a) {
|
|
5897
|
-
const i = a.appPath ??
|
|
5898
|
-
console.log(
|
|
5916
|
+
const i = a.appPath ?? ee;
|
|
5917
|
+
console.log(v.blue("Running type check...")), console.log(v.gray(`App path: ${i}
|
|
5899
5918
|
`));
|
|
5900
|
-
const l = await
|
|
5901
|
-
l.length === 0 && (console.log(
|
|
5902
|
-
for (const
|
|
5903
|
-
console.log(
|
|
5919
|
+
const l = await Gm(i);
|
|
5920
|
+
l.length === 0 && (console.log(v.green("✓ No type errors found")), process.exit(0));
|
|
5921
|
+
for (const p of l)
|
|
5922
|
+
console.log(my(p));
|
|
5904
5923
|
console.log(
|
|
5905
5924
|
`
|
|
5906
5925
|
`,
|
|
5907
|
-
|
|
5926
|
+
v.red(
|
|
5908
5927
|
`✗ Found ${l.length} type error${l.length === 1 ? "" : "s"}`
|
|
5909
5928
|
)
|
|
5910
5929
|
), process.exit(1);
|
|
5911
5930
|
}
|
|
5912
5931
|
}
|
|
5913
|
-
class
|
|
5932
|
+
class yy {
|
|
5914
5933
|
async execute({
|
|
5915
|
-
appPath: a =
|
|
5934
|
+
appPath: a = ee,
|
|
5916
5935
|
askForConfirmation: i
|
|
5917
5936
|
}) {
|
|
5918
|
-
console.log(
|
|
5919
|
-
`)), i && !await this.confirmationPrompt() && (console.error(
|
|
5920
|
-
const l = await
|
|
5921
|
-
return l.success ? (console.log(
|
|
5937
|
+
console.log(v.blue("🚀 Uninstall Twenty Application")), console.log(v.gray(`📁 App Path: ${a}
|
|
5938
|
+
`)), i && !await this.confirmationPrompt() && (console.error(v.red("⛔️ Aborting uninstall")), process.exit(1));
|
|
5939
|
+
const l = await Hm({ appPath: a });
|
|
5940
|
+
return l.success ? (console.log(v.green("✅ Application uninstalled successfully")), { success: !0, data: void 0 }) : (console.error(v.red("❌ Uninstall failed:"), l.error.message), { success: !1, error: l.error.message });
|
|
5922
5941
|
}
|
|
5923
5942
|
async confirmationPrompt() {
|
|
5924
5943
|
const { confirmation: a } = await ze.prompt([
|
|
@@ -5932,8 +5951,8 @@ class my {
|
|
|
5932
5951
|
return a;
|
|
5933
5952
|
}
|
|
5934
5953
|
}
|
|
5935
|
-
const
|
|
5936
|
-
const a = new
|
|
5954
|
+
const _y = (h) => {
|
|
5955
|
+
const a = new mv(), i = new ay(), l = new gy(), p = new uy(), I = new cy(), x = new vy(), O = new yy(), G = new vv(), J = new yv(), Q = new pv(), z = new ly(), Xe = new oy();
|
|
5937
5956
|
h.command("dev [appPath]").description(
|
|
5938
5957
|
"Build and sync local application changes (watches by default; use --once for a one-shot sync)"
|
|
5939
5958
|
).option(
|
|
@@ -5944,7 +5963,7 @@ const vy = (h) => {
|
|
|
5944
5963
|
"Build and sync once, then exit (useful for CI, scripts, and pre-commit hooks)"
|
|
5945
5964
|
).option("-v, --verbose", "Show detailed logs").option("-d, --debug", "Show detailed logs (alias for --verbose)").action(async (B, D) => {
|
|
5946
5965
|
D.once && D.watch && (console.error(
|
|
5947
|
-
|
|
5966
|
+
v.red(
|
|
5948
5967
|
"Error: --once and --watch are mutually exclusive. Watch mode is the default."
|
|
5949
5968
|
)
|
|
5950
5969
|
), process.exit(1));
|
|
@@ -5963,17 +5982,17 @@ const vy = (h) => {
|
|
|
5963
5982
|
tarball: D.tarball
|
|
5964
5983
|
});
|
|
5965
5984
|
}), h.command("install [appPath]").description("Install a deployed application on the connected server").option("-r, --remote <name>", "Install on a specific remote").action(async (B, D) => {
|
|
5966
|
-
await
|
|
5985
|
+
await p.execute({
|
|
5967
5986
|
appPath: dt(B),
|
|
5968
5987
|
remote: D.remote
|
|
5969
5988
|
});
|
|
5970
5989
|
}), h.command("deploy [appPath]").description("Build and upload application to a Twenty server").option("-r, --remote <name>", "Deploy to a specific remote").action(async (B, D) => {
|
|
5971
|
-
await
|
|
5990
|
+
await J.execute({
|
|
5972
5991
|
appPath: dt(B),
|
|
5973
5992
|
remote: D.remote
|
|
5974
5993
|
});
|
|
5975
5994
|
}), h.command("publish [appPath]").description("Build and publish to npm").option("--tag <tag>", "npm dist-tag (e.g. beta, next)").action(async (B, D) => {
|
|
5976
|
-
await
|
|
5995
|
+
await I.execute({
|
|
5977
5996
|
appPath: dt(B),
|
|
5978
5997
|
tag: D.tag
|
|
5979
5998
|
});
|
|
@@ -5982,7 +6001,7 @@ const vy = (h) => {
|
|
|
5982
6001
|
remote: B.remote
|
|
5983
6002
|
});
|
|
5984
6003
|
}), h.command("typecheck [appPath]").description("Run TypeScript type checking on the application").action(async (B) => {
|
|
5985
|
-
await
|
|
6004
|
+
await x.execute({
|
|
5986
6005
|
appPath: dt(B)
|
|
5987
6006
|
});
|
|
5988
6007
|
}), h.command("uninstall [appPath]").description("Uninstall application from Twenty").option("-y, --yes", "Skip confirmation prompt").action(async (B, D) => {
|
|
@@ -5995,10 +6014,10 @@ const vy = (h) => {
|
|
|
5995
6014
|
} catch {
|
|
5996
6015
|
process.exit(1);
|
|
5997
6016
|
}
|
|
5998
|
-
}),
|
|
6017
|
+
}), py(h), dy(h), h.command("add [entityType]").option("--path <path>", "Path in which the entity should be created.").description(
|
|
5999
6018
|
`Add a new entity to your application (${Object.values($).join("|")})`
|
|
6000
6019
|
).action(async (B, D) => {
|
|
6001
|
-
await
|
|
6020
|
+
await Q.execute(B, D?.path);
|
|
6002
6021
|
}), h.command("exec [appPath]").option("--postInstall", "Execute post-install logic function if defined").option("--preInstall", "Execute pre-install logic function if defined").option(
|
|
6003
6022
|
"-p, --payload <payload>",
|
|
6004
6023
|
"JSON payload to send to the function",
|
|
@@ -6012,7 +6031,7 @@ const vy = (h) => {
|
|
|
6012
6031
|
).description("Execute a logic function with a JSON payload").action(
|
|
6013
6032
|
async (B, D) => {
|
|
6014
6033
|
!D?.postInstall && !D?.preInstall && !D?.functionUniversalIdentifier && !D?.functionName && (console.error(
|
|
6015
|
-
|
|
6034
|
+
v.red(
|
|
6016
6035
|
"Error: Either --postInstall, --preInstall, --functionName (-n), or --functionUniversalIdentifier (-u) is required."
|
|
6017
6036
|
)
|
|
6018
6037
|
), process.exit(1)), await Xe.execute({
|
|
@@ -6036,8 +6055,8 @@ const vy = (h) => {
|
|
|
6036
6055
|
}
|
|
6037
6056
|
);
|
|
6038
6057
|
};
|
|
6039
|
-
|
|
6040
|
-
const rn = new
|
|
6058
|
+
Qm.defaultOptions.depth = 10;
|
|
6059
|
+
const rn = new Jm();
|
|
6041
6060
|
rn.name("twenty").description("CLI for Twenty application development").version(lu.version);
|
|
6042
6061
|
rn.option(
|
|
6043
6062
|
"-r, --remote <name>",
|
|
@@ -6045,12 +6064,12 @@ rn.option(
|
|
|
6045
6064
|
);
|
|
6046
6065
|
rn.hook("preAction", async (h) => {
|
|
6047
6066
|
let i = (h.optsWithGlobals ? h.optsWithGlobals() : h.opts()).remote;
|
|
6048
|
-
i ? console.log(
|
|
6067
|
+
i ? console.log(v.gray(`Using remote: ${i}`)) : i = await new _e().getDefaultRemote(), _e.setActiveRemote(i);
|
|
6049
6068
|
});
|
|
6050
|
-
|
|
6069
|
+
_y(rn);
|
|
6051
6070
|
rn.exitOverride();
|
|
6052
6071
|
try {
|
|
6053
6072
|
rn.parse();
|
|
6054
6073
|
} catch (h) {
|
|
6055
|
-
h instanceof
|
|
6074
|
+
h instanceof Xm && process.exit(h.exitCode), h instanceof Error && (console.error(v.red("Error:"), h.message), process.exit(1));
|
|
6056
6075
|
}
|