twenty-sdk 0.5.1 → 0.6.0-alpha
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/README.md +2 -0
- package/dist/AllIcons-CGPKtPQS-BLFCKgx3.js +18961 -0
- package/dist/AllIcons-CGPKtPQS-Djzg3SXS.mjs +30732 -0
- package/dist/HtmlTagToRemoteComponent-CSfU1Ai0.js +25 -0
- package/dist/HtmlTagToRemoteComponent-_7-Er-Nj.mjs +10395 -0
- package/dist/cli/commands/app/app-uninstall.d.ts +2 -2
- package/dist/cli/commands/app-command.d.ts +1 -1
- package/dist/cli/commands/logic-function/logic-function-execute.d.ts +1 -1
- package/dist/cli/commands/logic-function/logic-function-logs.d.ts +1 -1
- package/dist/cli/utilities/api/api-service.d.ts +6 -6
- package/dist/cli/utilities/build/common/esbuild-result-processor.d.ts +2 -2
- package/dist/cli/utilities/build/common/esbuild-watcher.d.ts +2 -2
- package/dist/cli/utilities/build/common/file-upload-watcher.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/react-globals-plugin.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/twenty-sdk-globals-plugin.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/twenty-sdk-ui-globals-plugin.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/twenty-shared-globals-plugin.d.ts +1 -1
- package/dist/cli/utilities/build/common/front-component-build/utils/extract-names-from-import-specifier.d.ts +1 -1
- package/dist/cli/utilities/build/common/restartable-watcher-interface.d.ts +2 -2
- package/dist/cli/utilities/build/manifest/manifest-build.d.ts +2 -2
- package/dist/cli/utilities/build/manifest/manifest-extract-config-from-file.d.ts +1 -1
- package/dist/cli/utilities/build/manifest/manifest-update-checksums.d.ts +2 -2
- package/dist/cli/utilities/build/manifest/manifest-validate.d.ts +1 -1
- package/dist/cli/utilities/build/manifest/manifest-writer.d.ts +1 -1
- package/dist/cli/utilities/dev/dev-mode-orchestrator.d.ts +6 -6
- package/dist/cli/utilities/dev/dev-ui-state-manager.d.ts +6 -6
- package/dist/cli/utilities/dev/dev-ui-state.d.ts +1 -1
- package/dist/cli/utilities/dev/dev-ui.d.ts +1 -1
- package/dist/cli/utilities/entity/entity-field-template.d.ts +2 -2
- package/dist/cli/utilities/entity/entity-front-component-template.d.ts +1 -1
- package/dist/cli/utilities/entity/entity-logic-function-template.d.ts +1 -1
- package/dist/cli/utilities/entity/entity-role-template.d.ts +1 -1
- package/dist/cli/utilities/file/file-jsonc.d.ts +1 -1
- package/dist/cli/utilities/file/file-path.d.ts +1 -1
- package/dist/cli/utilities/file/file-uploader.d.ts +3 -3
- package/dist/cli/utilities/typescript/typescript-diagnostics.d.ts +1 -1
- package/dist/cli/utilities/typescript/typescript-program.d.ts +1 -1
- package/dist/cli.cjs +30 -29
- package/dist/cli.mjs +894 -890
- package/dist/front-component-renderer/__stories__/FrontComponentRenderer.stories.d.ts +16 -0
- package/dist/front-component-renderer/__stories__/example-sources/chakra-example.front-component.d.ts +8 -0
- package/dist/front-component-renderer/__stories__/example-sources/emotion-example.front-component.d.ts +7 -0
- package/dist/{front-component/__stories__/mocks → front-component-renderer/__stories__/example-sources}/interactive.front-component.d.ts +1 -1
- package/dist/{front-component/__stories__/mocks → front-component-renderer/__stories__/example-sources}/lifecycle.front-component.d.ts +1 -1
- package/dist/front-component-renderer/__stories__/example-sources/mui-example.front-component.d.ts +7 -0
- package/dist/front-component-renderer/__stories__/example-sources/shadcn-example.front-component.d.ts +7 -0
- package/dist/{front-component/__stories__/mocks → front-component-renderer/__stories__/example-sources}/static.front-component.d.ts +1 -1
- package/dist/front-component-renderer/__stories__/example-sources/styled-components-example.front-component.d.ts +7 -0
- package/dist/front-component-renderer/__stories__/example-sources/tailwind-example.front-component.d.ts +7 -0
- package/dist/front-component-renderer/__stories__/example-sources/twenty-ui-example.front-component.d.ts +7 -0
- package/dist/front-component-renderer/__stories__/utils/getBuiltStoryComponentPathForRender.d.ts +1 -0
- package/dist/front-component-renderer/host/components/FrontComponentRenderer.d.ts +14 -0
- package/dist/front-component-renderer/index.cjs +25 -0
- package/dist/{front-component → front-component-renderer}/index.d.ts +4 -4
- package/dist/front-component-renderer/index.mjs +12026 -0
- package/dist/front-component-renderer/remote/components/FrontComponentHostCommunicationApiEffect.d.ts +8 -0
- package/dist/front-component-renderer/remote/components/FrontComponentUpdateContextEffect.d.ts +10 -0
- package/dist/{front-component → front-component-renderer}/remote/components/FrontComponentWorkerEffect.d.ts +5 -4
- package/dist/front-component-renderer/remote/generated/remote-components.d.ts +43 -0
- package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +187 -0
- package/dist/{front-component → front-component-renderer}/remote/mock/mock-front-component.d.ts +1 -1
- package/dist/front-component-renderer/remote/worker/remote-worker.d.ts +3 -0
- package/dist/front-component-renderer/remote/worker/utils/setWorkerEnv.d.ts +1 -0
- package/dist/{front-component → front-component-renderer}/types/FrontComponentHostCommunicationApi.d.ts +1 -1
- package/dist/{front-component → front-component-renderer}/types/HostToWorkerRenderContext.d.ts +2 -1
- package/dist/front-component-renderer/types/PropertySchema.d.ts +4 -0
- package/dist/{front-component → front-component-renderer}/types/WorkerExports.d.ts +3 -3
- package/dist/index-DX23sVyw.js +2415 -0
- package/dist/index-JB9QoBK0.mjs +33884 -0
- package/dist/index.cjs +5 -1
- package/dist/index.mjs +2497 -102
- package/dist/sdk/application/application-config.d.ts +1 -1
- package/dist/sdk/application/define-application.d.ts +2 -2
- package/dist/sdk/common/types/define-entity.type.d.ts +4 -4
- package/dist/sdk/common/utils/create-validation-result.d.ts +1 -1
- package/dist/sdk/define-front-component.d.ts +2 -2
- package/dist/sdk/fields/define-field.d.ts +2 -2
- package/dist/sdk/fields/validate-fields.d.ts +1 -1
- package/dist/sdk/front-component-api/constants/HtmlCommonProperties.d.ts +2 -0
- package/dist/sdk/front-component-api/context/frontComponentContext.d.ts +1 -1
- package/dist/sdk/front-component-api/functions/navigate.d.ts +1 -1
- package/dist/sdk/front-component-api/hooks/useFrontComponentExecutionContext.d.ts +1 -1
- package/dist/sdk/front-component-api/index.d.ts +7 -0
- package/dist/sdk/front-component-config.d.ts +1 -1
- package/dist/sdk/index.d.ts +6 -6
- package/dist/sdk/logic-functions/define-logic-function.d.ts +2 -2
- package/dist/sdk/logic-functions/logic-function-config.d.ts +1 -1
- package/dist/sdk/objects/define-object.d.ts +2 -2
- package/dist/sdk/roles/define-role.d.ts +2 -2
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.mjs +684 -11
- package/package.json +34 -12
- package/dist/HtmlTagToRemoteComponent-Bd5sgek2.js +0 -1
- package/dist/HtmlTagToRemoteComponent-DlsAI7JU.mjs +0 -146
- package/dist/cli/utilities/build/common/front-component-build/utils/create-front-component-build-options.d.ts +0 -13
- package/dist/front-component/__stories__/FrontComponentRenderer.stories.d.ts +0 -9
- package/dist/front-component/__stories__/utils/buildMockComponents.d.ts +0 -1
- package/dist/front-component/__stories__/utils/loadBuiltComponent.d.ts +0 -1
- package/dist/front-component/host/components/FrontComponentRenderer.d.ts +0 -13
- package/dist/front-component/index.cjs +0 -1
- package/dist/front-component/index.mjs +0 -6399
- package/dist/front-component/remote/components/FrontComponentHostCommunicationApiEffect.d.ts +0 -8
- package/dist/front-component/remote/components/FrontComponentUpdateContextEffect.d.ts +0 -10
- package/dist/front-component/remote/generated/remote-components.d.ts +0 -299
- package/dist/front-component/remote/generated/remote-elements.d.ts +0 -3335
- package/dist/front-component/remote/worker/remote-worker.d.ts +0 -0
- package/dist/front-component/types/PropertySchema.d.ts +0 -4
- package/dist/index.d.ts +0 -1
- package/dist/sdk/front-component-common/HtmlCommonProperties.d.ts +0 -2
- package/dist/sdk/front-component-common/index.d.ts +0 -7
- /package/dist/{front-component → front-component-renderer}/host/generated/host-component-registry.d.ts +0 -0
- /package/dist/{front-component → front-component-renderer}/host/generated/host-index.d.ts +0 -0
- /package/dist/{front-component → front-component-renderer}/remote/components/FrontComponentErrorEffect.d.ts +0 -0
- /package/dist/{front-component → front-component-renderer}/remote/generated/remote-index.d.ts +0 -0
- /package/dist/{front-component → front-component-renderer}/remote/utils/exposeGlobals.d.ts +0 -0
- /package/dist/{front-component/remote/worker → front-component-renderer/remote/worker/utils}/createRemoteWorker.d.ts +0 -0
- /package/dist/{front-component → front-component-renderer}/types/FrontComponentExecutionContext.d.ts +0 -0
- /package/dist/sdk/{front-component-common → front-component-api/constants}/AllowedHtmlElements.d.ts +0 -0
- /package/dist/sdk/{front-component-common → front-component-api/constants}/CommonHtmlEvents.d.ts +0 -0
- /package/dist/sdk/{front-component-common → front-component-api/constants}/EventToReact.d.ts +0 -0
- /package/dist/sdk/{front-component-common → front-component-api/constants}/HtmlTagToRemoteComponent.d.ts +0 -0
- /package/dist/sdk/{front-component-common → front-component-api/constants}/SerializedEventData.d.ts +0 -0
package/dist/cli.mjs
CHANGED
|
@@ -1,102 +1,106 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import * as Et from "path";
|
|
3
|
-
import
|
|
3
|
+
import me, { join as st, relative as ft, extname as am, basename as om, dirname as um, resolve as cm } from "path";
|
|
4
4
|
import E from "chalk";
|
|
5
5
|
import * as Q from "fs-extra";
|
|
6
6
|
import { readFile as lm } from "fs-extra";
|
|
7
7
|
import du from "crypto";
|
|
8
8
|
import * as fm from "node:fs/promises";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { H as gu, T as Pn, N as Gt, l as mu, Z as Es, s as ou } from "./HtmlTagToRemoteComponent-_7-Er-Nj.mjs";
|
|
10
|
+
import { isNonEmptyString as hm } from "@sniptt/guards";
|
|
11
|
+
import pm from "lodash.camelcase";
|
|
12
|
+
import "react";
|
|
11
13
|
import * as Is from "fs/promises";
|
|
12
14
|
import * as vu from "esbuild";
|
|
13
|
-
import { NODE_ESM_CJS_BANNER as dm, OUTPUT_DIR as Kt, ASSETS_DIR as Rs, SyncableEntity as ve, DEFAULT_API_URL_NAME as gm, DEFAULT_API_KEY_NAME as mm } from "twenty-shared/application";
|
|
14
|
-
import { FileFolder as qt, FieldMetadataType as ou } from "twenty-shared/types";
|
|
15
15
|
import _u from "chokidar";
|
|
16
16
|
import * as wu from "os";
|
|
17
|
-
import
|
|
17
|
+
import dm from "os";
|
|
18
18
|
import Jr from "axios";
|
|
19
19
|
import * as uu from "fs";
|
|
20
|
-
import { createClient as
|
|
21
|
-
import { getIntrospectionQuery as
|
|
20
|
+
import { createClient as gm } from "graphql-sse";
|
|
21
|
+
import { getIntrospectionQuery as mm, buildClientSchema as vm, printSchema as _m } from "graphql/index";
|
|
22
22
|
import * as In from "typescript";
|
|
23
|
-
import { createRequire as
|
|
23
|
+
import { createRequire as wm } from "module";
|
|
24
24
|
import { glob as yu } from "fast-glob";
|
|
25
|
-
import { jsx as ie, jsxs as ye, Fragment as
|
|
26
|
-
import { generate as
|
|
25
|
+
import { jsx as ie, jsxs as ye, Fragment as ym } from "react/jsx-runtime";
|
|
26
|
+
import { generate as xm } from "@genql/cli";
|
|
27
27
|
import At from "inquirer";
|
|
28
28
|
import { v4 as Vn } from "uuid";
|
|
29
|
-
import { Command as
|
|
30
|
-
import { inspect as
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
import { Command as Sm, CommanderError as Am } from "commander";
|
|
30
|
+
import { inspect as Em } from "util";
|
|
31
|
+
var Ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
32
|
+
function bm(l) {
|
|
33
|
+
return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
|
|
34
|
+
}
|
|
35
|
+
const Cm = (l) => hm(l) ? l[0].toUpperCase() + l.slice(1) : "", Fm = (l) => Cm(pm(l)), Tm = (l) => typeof l == "object" && l !== null && !Array.isArray(l), bt = process.env.INIT_CWD || process.cwd(), Zn = (l) => l && !l?.startsWith("/") ? st(bt, l) : l, Im = async (l, a, i) => {
|
|
36
|
+
const f = new Set(i), g = a.filter((_) => !f.has(_));
|
|
33
37
|
for (const _ of g) {
|
|
34
|
-
const S = _.replace(/\.tsx?$/, ".mjs"), A =
|
|
38
|
+
const S = _.replace(/\.tsx?$/, ".mjs"), A = me.join(l, S), I = `${A}.map`;
|
|
35
39
|
await Q.remove(A), await Q.remove(I);
|
|
36
40
|
}
|
|
37
|
-
},
|
|
38
|
-
result:
|
|
41
|
+
}, Rm = async ({
|
|
42
|
+
result: l,
|
|
39
43
|
appPath: a,
|
|
40
44
|
fileFolder: i,
|
|
41
|
-
lastChecksums:
|
|
45
|
+
lastChecksums: f,
|
|
42
46
|
onFileBuilt: g
|
|
43
47
|
}) => {
|
|
44
|
-
const _ = Object.keys(
|
|
48
|
+
const _ = Object.keys(l.metafile?.outputs ?? {}).filter(
|
|
45
49
|
(S) => S.endsWith(".mjs")
|
|
46
50
|
);
|
|
47
51
|
for (const S of _) {
|
|
48
|
-
const A =
|
|
49
|
-
|
|
52
|
+
const A = me.resolve(S), I = me.relative(a, A), P = l.metafile?.outputs?.[S]?.entryPoint || "", z = me.relative(a, P), G = await Q.readFile(A), j = du.createHash("md5").update(G).digest("hex");
|
|
53
|
+
f.get(I) !== j && (f.set(I, j), g && await g({
|
|
50
54
|
fileFolder: i,
|
|
51
55
|
builtPath: I,
|
|
52
56
|
sourcePath: z,
|
|
53
|
-
checksum:
|
|
57
|
+
checksum: j
|
|
54
58
|
}));
|
|
55
59
|
}
|
|
56
|
-
},
|
|
57
|
-
const
|
|
60
|
+
}, Pm = ["react-dom"], Om = "RemoteComponents", Lm = () => {
|
|
61
|
+
const l = Object.keys(gu).join(
|
|
58
62
|
"|"
|
|
59
63
|
);
|
|
60
64
|
return new RegExp(
|
|
61
|
-
`(<\\/?)\\b(${
|
|
65
|
+
`(<\\/?)\\b(${l})\\b(?=[\\s>\\/>])`,
|
|
62
66
|
"g"
|
|
63
67
|
);
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
(a, i,
|
|
67
|
-
const g =
|
|
68
|
-
return Pn(g) ? `${i}${
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
let a =
|
|
72
|
-
|
|
68
|
+
}, Mm = Lm(), Um = (l) => l.replace(
|
|
69
|
+
Mm,
|
|
70
|
+
(a, i, f) => {
|
|
71
|
+
const g = gu[f];
|
|
72
|
+
return Pn(g) ? `${i}${Om}.${g}` : a;
|
|
73
|
+
}
|
|
74
|
+
), Nm = /import\s*\{\s*defineFrontComponent\s*\}\s*from\s*['"][^'"]+['"];?\n?/g, cu = /export\s+default\s+defineFrontComponent\s*\(\s*\{[^}]*component\s*:\s*(\w+)[^}]*\}\s*\)\s*;?/s, Wm = (l) => {
|
|
75
|
+
let a = l.replace(
|
|
76
|
+
Nm,
|
|
73
77
|
""
|
|
74
78
|
);
|
|
75
79
|
const i = a.match(
|
|
76
80
|
cu
|
|
77
81
|
);
|
|
78
82
|
if (i) {
|
|
79
|
-
const
|
|
80
|
-
`export\\s+(const|function)\\s+${
|
|
83
|
+
const f = i[1], g = new RegExp(
|
|
84
|
+
`export\\s+(const|function)\\s+${f}\\b`
|
|
81
85
|
);
|
|
82
86
|
a = a.replace(
|
|
83
87
|
g,
|
|
84
|
-
`$1 ${
|
|
88
|
+
`$1 ${f}`
|
|
85
89
|
), a = a.replace(
|
|
86
90
|
cu,
|
|
87
|
-
`export default globalThis.jsx(${
|
|
91
|
+
`export default globalThis.jsx(${f}, {});`
|
|
88
92
|
);
|
|
89
93
|
}
|
|
90
94
|
return a;
|
|
91
|
-
},
|
|
95
|
+
}, Dm = {
|
|
92
96
|
name: "jsx-transform-to-remote-dom-worker-format-plugin",
|
|
93
|
-
setup: (
|
|
94
|
-
|
|
97
|
+
setup: (l) => {
|
|
98
|
+
l.onLoad(
|
|
95
99
|
{ filter: /\.tsx$/ },
|
|
96
100
|
async ({ path: a }) => {
|
|
97
101
|
try {
|
|
98
|
-
const i = await fm.readFile(a, "utf8"),
|
|
99
|
-
|
|
102
|
+
const i = await fm.readFile(a, "utf8"), f = Um(i), g = f !== i, _ = Wm(
|
|
103
|
+
f
|
|
100
104
|
);
|
|
101
105
|
return { contents: g ? `var RemoteComponents = globalThis.RemoteComponents;
|
|
102
106
|
${_}` : _, loader: "tsx" };
|
|
@@ -113,48 +117,48 @@ ${_}` : _, loader: "tsx" };
|
|
|
113
117
|
}
|
|
114
118
|
);
|
|
115
119
|
}
|
|
116
|
-
},
|
|
117
|
-
const a =
|
|
120
|
+
}, $m = /^([\w$]+)\s+as\s+([\w$]+)$/, Bm = (l) => {
|
|
121
|
+
const a = l.trim(), i = a.match($m);
|
|
118
122
|
if (Pn(i)) {
|
|
119
|
-
const [,
|
|
120
|
-
return { originalName:
|
|
123
|
+
const [, f, g] = i;
|
|
124
|
+
return { originalName: f, aliasName: g };
|
|
121
125
|
}
|
|
122
126
|
return { originalName: a, aliasName: a };
|
|
123
|
-
},
|
|
124
|
-
(a) =>
|
|
127
|
+
}, km = (l) => l.split(",").map((a) => a.trim()).filter((a) => a.length > 0).filter((a) => !a.startsWith("type ")).map(
|
|
128
|
+
(a) => Bm(a).originalName
|
|
125
129
|
), Xr = ({
|
|
126
|
-
sourceContent:
|
|
130
|
+
sourceContent: l,
|
|
127
131
|
pattern: a
|
|
128
132
|
}) => {
|
|
129
133
|
const i = /* @__PURE__ */ new Map();
|
|
130
|
-
let
|
|
131
|
-
for (; Pn(
|
|
132
|
-
const g =
|
|
133
|
-
i.has(_) || i.set(_, /* @__PURE__ */ new Set()), g &&
|
|
134
|
+
let f;
|
|
135
|
+
for (; Pn(f = a.exec(l)); ) {
|
|
136
|
+
const g = f.groups?.namedImports, _ = f.groups?.subPath ?? "";
|
|
137
|
+
i.has(_) || i.set(_, /* @__PURE__ */ new Set()), g && km(g).forEach(
|
|
134
138
|
(S) => i.get(_)?.add(S)
|
|
135
139
|
);
|
|
136
140
|
}
|
|
137
141
|
return a.lastIndex = 0, i;
|
|
138
|
-
}, Qr = (
|
|
139
|
-
const a =
|
|
142
|
+
}, Qr = (l) => {
|
|
143
|
+
const a = l.namespace ?? l.pluginName;
|
|
140
144
|
return {
|
|
141
|
-
name:
|
|
145
|
+
name: l.pluginName,
|
|
142
146
|
setup: (i) => {
|
|
143
|
-
const
|
|
147
|
+
const f = /* @__PURE__ */ new Map();
|
|
144
148
|
i.onStart(() => {
|
|
145
|
-
|
|
149
|
+
f.clear();
|
|
146
150
|
}), i.onResolve(
|
|
147
|
-
{ filter:
|
|
151
|
+
{ filter: l.moduleFilter },
|
|
148
152
|
async ({ importer: g, path: _ }) => {
|
|
149
|
-
if (g && !
|
|
153
|
+
if (g && !f.has(g))
|
|
150
154
|
try {
|
|
151
155
|
const S = await Is.readFile(g, "utf-8");
|
|
152
|
-
|
|
156
|
+
f.set(
|
|
153
157
|
g,
|
|
154
|
-
|
|
158
|
+
l.collectImports(S)
|
|
155
159
|
);
|
|
156
160
|
} catch {
|
|
157
|
-
|
|
161
|
+
f.set(g, /* @__PURE__ */ new Map());
|
|
158
162
|
}
|
|
159
163
|
return {
|
|
160
164
|
path: g ? `${_}?importer=${encodeURIComponent(g)}` : _,
|
|
@@ -167,14 +171,14 @@ ${_}` : _, loader: "tsx" };
|
|
|
167
171
|
}
|
|
168
172
|
), i.onLoad({ filter: /.*/, namespace: a }, ({ pluginData: g }) => {
|
|
169
173
|
const { originalPath: _, importerFilePath: S } = g;
|
|
170
|
-
if (
|
|
174
|
+
if (l.staticContents?.[_])
|
|
171
175
|
return {
|
|
172
|
-
contents:
|
|
176
|
+
contents: l.staticContents[_],
|
|
173
177
|
loader: "js"
|
|
174
178
|
};
|
|
175
|
-
const A = _ ===
|
|
179
|
+
const A = _ === l.moduleName ? "" : _.replace(`${l.moduleName}/`, ""), P = f.get(S)?.get(A) ?? /* @__PURE__ */ new Set();
|
|
176
180
|
return {
|
|
177
|
-
contents:
|
|
181
|
+
contents: l.generateExports({
|
|
178
182
|
namedImports: P,
|
|
179
183
|
moduleSubPath: A
|
|
180
184
|
}),
|
|
@@ -183,24 +187,24 @@ ${_}` : _, loader: "tsx" };
|
|
|
183
187
|
});
|
|
184
188
|
}
|
|
185
189
|
};
|
|
186
|
-
}, bs = /import\s+(?:(?<defaultImport>\w+)\s*,?\s*)?(?:\{(?<namedImports>[^}]*)\})?\s*from\s*['"]react['"];?/g,
|
|
190
|
+
}, bs = /import\s+(?:(?<defaultImport>\w+)\s*,?\s*)?(?:\{(?<namedImports>[^}]*)\})?\s*from\s*['"]react['"];?/g, qm = /^react(\/jsx-runtime)?$/, Gm = `
|
|
187
191
|
export var jsx = /* @__PURE__ */ (() => globalThis.jsx)();
|
|
188
192
|
export var jsxs = /* @__PURE__ */ (() => globalThis.jsxs)();
|
|
189
193
|
export var Fragment = /* @__PURE__ */ (() => globalThis.React.Fragment)();
|
|
190
|
-
`.trim(),
|
|
194
|
+
`.trim(), Hm = (l) => {
|
|
191
195
|
const a = Xr({
|
|
192
|
-
sourceContent:
|
|
196
|
+
sourceContent: l,
|
|
193
197
|
pattern: bs
|
|
194
198
|
});
|
|
195
199
|
let i;
|
|
196
|
-
for (; Pn(i = bs.exec(
|
|
200
|
+
for (; Pn(i = bs.exec(l)); )
|
|
197
201
|
i.groups?.defaultImport && (a.has("") || a.set("", /* @__PURE__ */ new Set()), a.get("").add("default"));
|
|
198
202
|
return bs.lastIndex = 0, a;
|
|
199
|
-
},
|
|
200
|
-
namedImports:
|
|
203
|
+
}, jm = ({
|
|
204
|
+
namedImports: l
|
|
201
205
|
}) => {
|
|
202
206
|
const a = [];
|
|
203
|
-
for (const i of
|
|
207
|
+
for (const i of l)
|
|
204
208
|
i === "default" ? a.push(
|
|
205
209
|
"export default /* @__PURE__ */ (() => globalThis.React)();"
|
|
206
210
|
) : a.push(
|
|
@@ -212,77 +216,82 @@ export var Fragment = /* @__PURE__ */ (() => globalThis.React.Fragment)();
|
|
|
212
216
|
pluginName: "react-globals",
|
|
213
217
|
namespace: "react-globals",
|
|
214
218
|
moduleName: "react",
|
|
215
|
-
moduleFilter:
|
|
216
|
-
collectImports:
|
|
217
|
-
generateExports:
|
|
219
|
+
moduleFilter: qm,
|
|
220
|
+
collectImports: Hm,
|
|
221
|
+
generateExports: jm,
|
|
218
222
|
staticContents: {
|
|
219
223
|
"react/jsx-runtime": Gm
|
|
220
224
|
}
|
|
221
|
-
}),
|
|
225
|
+
}), zm = /^\/\/.*$\n/gm, Jm = {
|
|
222
226
|
name: "strip-comments",
|
|
223
|
-
setup: (
|
|
224
|
-
|
|
227
|
+
setup: (l) => {
|
|
228
|
+
l.onEnd(async (a) => {
|
|
225
229
|
if (a.errors.length > 0)
|
|
226
230
|
return;
|
|
227
231
|
const i = Object.keys(a.metafile?.outputs ?? {}).filter(
|
|
228
|
-
(
|
|
232
|
+
(f) => f.endsWith(".mjs")
|
|
229
233
|
);
|
|
230
|
-
for (const
|
|
231
|
-
const g =
|
|
234
|
+
for (const f of i) {
|
|
235
|
+
const g = me.resolve(f), _ = await Is.readFile(g, "utf-8"), S = _.replace(zm, "");
|
|
232
236
|
S !== _ && await Is.writeFile(g, S, "utf-8");
|
|
233
237
|
}
|
|
234
238
|
});
|
|
235
239
|
}
|
|
236
|
-
},
|
|
240
|
+
}, Ym = /import\s+(?:\{(?<namedImports>[^}]*)\})?\s*from\s*['"]twenty-sdk['"];?/g, Zm = /^twenty-sdk$/, Xm = Qr({
|
|
237
241
|
pluginName: "twenty-sdk-globals",
|
|
238
242
|
namespace: "twenty-sdk-globals",
|
|
239
243
|
moduleName: "twenty-sdk",
|
|
240
|
-
moduleFilter:
|
|
241
|
-
collectImports: (
|
|
242
|
-
sourceContent:
|
|
243
|
-
pattern:
|
|
244
|
+
moduleFilter: Zm,
|
|
245
|
+
collectImports: (l) => Xr({
|
|
246
|
+
sourceContent: l,
|
|
247
|
+
pattern: Ym
|
|
244
248
|
}),
|
|
245
|
-
generateExports: ({ namedImports:
|
|
249
|
+
generateExports: ({ namedImports: l }) => [...l].map(
|
|
246
250
|
(a) => `export var ${a} = /* @__PURE__ */ (() => globalThis.TwentySdk.${a})();`
|
|
247
251
|
).join(`
|
|
248
252
|
`)
|
|
249
|
-
}),
|
|
253
|
+
}), Qm = /import\s+\{(?<namedImports>[^}]*)\}\s*from\s*['"]twenty-sdk\/ui['"];?/g, Vm = /^twenty-sdk\/ui$/, e0 = Qr({
|
|
250
254
|
pluginName: "twenty-sdk-ui-globals",
|
|
251
255
|
namespace: "twenty-sdk-ui-globals",
|
|
252
256
|
moduleName: "twenty-sdk/ui",
|
|
253
|
-
moduleFilter:
|
|
254
|
-
collectImports: (
|
|
255
|
-
sourceContent:
|
|
256
|
-
pattern:
|
|
257
|
+
moduleFilter: Vm,
|
|
258
|
+
collectImports: (l) => Xr({
|
|
259
|
+
sourceContent: l,
|
|
260
|
+
pattern: Qm
|
|
257
261
|
}),
|
|
258
|
-
generateExports: ({ namedImports:
|
|
262
|
+
generateExports: ({ namedImports: l }) => [...l].map(
|
|
259
263
|
(a) => `export var ${a} = /* @__PURE__ */ (() => globalThis.RemoteComponents.TwentyUi${a})();`
|
|
260
264
|
).join(`
|
|
261
265
|
`)
|
|
262
|
-
}),
|
|
266
|
+
}), t0 = /import\s+\{(?<namedImports>[^}]*)\}\s*from\s*['"]twenty-shared(?:\/(?<subPath>[^'"]*?))?['"];?/g, n0 = /^twenty-shared(\/.*)?$/, r0 = (l) => l === "" ? "globalThis.TwentyShared" : `globalThis.TwentyShared['${l}']`, i0 = Qr({
|
|
263
267
|
pluginName: "twenty-shared-globals",
|
|
264
268
|
namespace: "twenty-shared-globals",
|
|
265
269
|
moduleName: "twenty-shared",
|
|
266
|
-
moduleFilter:
|
|
267
|
-
collectImports: (
|
|
268
|
-
sourceContent:
|
|
269
|
-
pattern:
|
|
270
|
+
moduleFilter: n0,
|
|
271
|
+
collectImports: (l) => Xr({
|
|
272
|
+
sourceContent: l,
|
|
273
|
+
pattern: t0
|
|
270
274
|
}),
|
|
271
|
-
generateExports: ({ namedImports:
|
|
272
|
-
const i =
|
|
273
|
-
return [...
|
|
274
|
-
(
|
|
275
|
+
generateExports: ({ namedImports: l, moduleSubPath: a }) => {
|
|
276
|
+
const i = r0(a);
|
|
277
|
+
return [...l].map(
|
|
278
|
+
(f) => `export var ${f} = /* @__PURE__ */ (() => ${i}.${f})();`
|
|
275
279
|
).join(`
|
|
276
280
|
`);
|
|
277
281
|
}
|
|
278
|
-
}),
|
|
282
|
+
}), s0 = () => [
|
|
279
283
|
Km,
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
],
|
|
284
|
+
Xm,
|
|
285
|
+
e0,
|
|
286
|
+
i0,
|
|
287
|
+
Dm,
|
|
288
|
+
Jm
|
|
289
|
+
], Rs = "public", a0 = "TWENTY_API_KEY", o0 = "TWENTY_API_URL", u0 = {
|
|
290
|
+
js: `import { createRequire as __createRequire } from 'module';
|
|
291
|
+
const require = __createRequire(import.meta.url);`
|
|
292
|
+
}, jt = ".twenty/output";
|
|
293
|
+
var ge = /* @__PURE__ */ ((l) => (l.Object = "object", l.Field = "field", l.LogicFunction = "logicFunction", l.FrontComponent = "frontComponent", l.Role = "role", l))(ge || {});
|
|
294
|
+
const c0 = [
|
|
286
295
|
"path",
|
|
287
296
|
"fs",
|
|
288
297
|
"crypto",
|
|
@@ -311,8 +320,8 @@ class xu {
|
|
|
311
320
|
this.esBuildContext = null, this.isRestarting = !1, this.lastChecksums = /* @__PURE__ */ new Map(), this.buildCompletePromise = Promise.resolve(), this.resolveBuildComplete = null, this.appPath = a.appPath, this.sourcePaths = a.sourcePaths, this.watchMode = a.watch ?? !0, this.onFileBuilt = a.handleFileBuilt, this.onBuildError = a.handleBuildError, this.config = a.config;
|
|
312
321
|
}
|
|
313
322
|
shouldRestart(a) {
|
|
314
|
-
const i = this.sourcePaths.sort().join(","),
|
|
315
|
-
return i !==
|
|
323
|
+
const i = this.sourcePaths.sort().join(","), f = [...a].sort().join(",");
|
|
324
|
+
return i !== f;
|
|
316
325
|
}
|
|
317
326
|
async start() {
|
|
318
327
|
this.sourcePaths.length > 0 && await this.createContext();
|
|
@@ -325,20 +334,20 @@ class xu {
|
|
|
325
334
|
this.isRestarting = !0;
|
|
326
335
|
try {
|
|
327
336
|
await this.close();
|
|
328
|
-
const i =
|
|
329
|
-
await
|
|
337
|
+
const i = me.join(this.appPath, jt);
|
|
338
|
+
await Im(i, this.sourcePaths, a), this.sourcePaths = a, this.lastChecksums.clear(), this.sourcePaths.length > 0 && await this.createContext();
|
|
330
339
|
} finally {
|
|
331
340
|
this.isRestarting = !1;
|
|
332
341
|
}
|
|
333
342
|
}
|
|
334
343
|
}
|
|
335
344
|
async createContext() {
|
|
336
|
-
const a =
|
|
345
|
+
const a = me.join(this.appPath, jt), i = {};
|
|
337
346
|
for (const _ of this.sourcePaths) {
|
|
338
347
|
const S = _.replace(/\.tsx?$/, "");
|
|
339
|
-
i[S] =
|
|
348
|
+
i[S] = me.join(this.appPath, _);
|
|
340
349
|
}
|
|
341
|
-
const
|
|
350
|
+
const f = this, g = [
|
|
342
351
|
...this.config.extraPlugins ?? [],
|
|
343
352
|
{
|
|
344
353
|
name: "build-notifications",
|
|
@@ -354,15 +363,15 @@ class xu {
|
|
|
354
363
|
);
|
|
355
364
|
return;
|
|
356
365
|
}
|
|
357
|
-
await
|
|
366
|
+
await Rm({
|
|
358
367
|
result: S,
|
|
359
368
|
appPath: this.appPath,
|
|
360
369
|
fileFolder: this.config.fileFolder,
|
|
361
|
-
lastChecksums:
|
|
362
|
-
onFileBuilt:
|
|
370
|
+
lastChecksums: f.lastChecksums,
|
|
371
|
+
onFileBuilt: f.onFileBuilt
|
|
363
372
|
});
|
|
364
373
|
} finally {
|
|
365
|
-
|
|
374
|
+
f.resolveBuildComplete?.();
|
|
366
375
|
}
|
|
367
376
|
});
|
|
368
377
|
}
|
|
@@ -377,7 +386,7 @@ class xu {
|
|
|
377
386
|
outdir: a,
|
|
378
387
|
outExtension: { ".js": ".mjs" },
|
|
379
388
|
external: this.config.externalModules,
|
|
380
|
-
tsconfig:
|
|
389
|
+
tsconfig: me.join(this.appPath, "tsconfig.json"),
|
|
381
390
|
jsx: this.config.jsx,
|
|
382
391
|
sourcemap: !0,
|
|
383
392
|
metafile: !0,
|
|
@@ -390,33 +399,33 @@ class xu {
|
|
|
390
399
|
}), await this.esBuildContext.rebuild(), await this.buildCompletePromise, this.watchMode && await this.esBuildContext.watch();
|
|
391
400
|
}
|
|
392
401
|
}
|
|
393
|
-
const
|
|
402
|
+
const l0 = {
|
|
394
403
|
name: "external-patterns",
|
|
395
|
-
setup: (
|
|
396
|
-
|
|
404
|
+
setup: (l) => {
|
|
405
|
+
l.onResolve({ filter: /(?:^|\/)generated(?:\/|$)/ }, (a) => ({
|
|
397
406
|
path: a.path,
|
|
398
407
|
external: !0
|
|
399
408
|
}));
|
|
400
409
|
}
|
|
401
|
-
},
|
|
402
|
-
...
|
|
410
|
+
}, f0 = (l) => new xu({
|
|
411
|
+
...l,
|
|
403
412
|
config: {
|
|
404
|
-
externalModules:
|
|
405
|
-
fileFolder:
|
|
413
|
+
externalModules: c0,
|
|
414
|
+
fileFolder: Gt.BuiltLogicFunction,
|
|
406
415
|
platform: "node",
|
|
407
|
-
extraPlugins: [
|
|
408
|
-
banner:
|
|
416
|
+
extraPlugins: [l0],
|
|
417
|
+
banner: u0
|
|
409
418
|
}
|
|
410
|
-
}),
|
|
411
|
-
...
|
|
419
|
+
}), h0 = (l) => new xu({
|
|
420
|
+
...l,
|
|
412
421
|
config: {
|
|
413
|
-
externalModules:
|
|
414
|
-
fileFolder:
|
|
422
|
+
externalModules: Pm,
|
|
423
|
+
fileFolder: Gt.BuiltFrontComponent,
|
|
415
424
|
jsx: "automatic",
|
|
416
|
-
extraPlugins:
|
|
425
|
+
extraPlugins: s0()
|
|
417
426
|
}
|
|
418
427
|
});
|
|
419
|
-
class
|
|
428
|
+
class p0 {
|
|
420
429
|
constructor(a) {
|
|
421
430
|
this.watcher = null, this.appPath = a.appPath, this.handleChangeDetected = a.handleChangeDetected;
|
|
422
431
|
}
|
|
@@ -430,27 +439,27 @@ class c0 {
|
|
|
430
439
|
}), this.watcher.on("all", async (a, i) => {
|
|
431
440
|
if (a === "addDir")
|
|
432
441
|
return;
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
), A =
|
|
436
|
-
(g || !A || I) && !_ && !S || this.handleChangeDetected(
|
|
442
|
+
const f = ft(this.appPath, i), g = f.startsWith("node_modules") || f.startsWith("generated") || f.startsWith("dist"), _ = f.startsWith(Rs), S = ["package.json", "yarn.lock"].includes(
|
|
443
|
+
f
|
|
444
|
+
), A = f.endsWith(".ts") || f.endsWith(".tsx"), I = f.startsWith(".");
|
|
445
|
+
(g || !A || I) && !_ && !S || this.handleChangeDetected(f, a);
|
|
437
446
|
});
|
|
438
447
|
}
|
|
439
448
|
async close() {
|
|
440
449
|
await this.watcher?.close();
|
|
441
450
|
}
|
|
442
451
|
}
|
|
443
|
-
const
|
|
444
|
-
manifest:
|
|
452
|
+
const d0 = ({
|
|
453
|
+
manifest: l,
|
|
445
454
|
builtFileInfos: a
|
|
446
455
|
}) => {
|
|
447
|
-
let i = structuredClone(
|
|
456
|
+
let i = structuredClone(l);
|
|
448
457
|
for (const [
|
|
449
|
-
|
|
458
|
+
f,
|
|
450
459
|
{ fileFolder: g, checksum: _ }
|
|
451
460
|
] of a.entries()) {
|
|
452
|
-
const S = ft(
|
|
453
|
-
if (g ===
|
|
461
|
+
const S = ft(jt, f);
|
|
462
|
+
if (g === Gt.BuiltLogicFunction) {
|
|
454
463
|
const A = i.logicFunctions, I = A.findIndex(
|
|
455
464
|
(P) => P.builtHandlerPath === S
|
|
456
465
|
);
|
|
@@ -463,7 +472,7 @@ const l0 = ({
|
|
|
463
472
|
)
|
|
464
473
|
};
|
|
465
474
|
}
|
|
466
|
-
if (g ===
|
|
475
|
+
if (g === Gt.PublicAsset) {
|
|
467
476
|
const A = i.publicAssets, I = A.findIndex((P) => P.filePath === S);
|
|
468
477
|
if (I === -1)
|
|
469
478
|
continue;
|
|
@@ -475,7 +484,7 @@ const l0 = ({
|
|
|
475
484
|
};
|
|
476
485
|
continue;
|
|
477
486
|
}
|
|
478
|
-
if (g ===
|
|
487
|
+
if (g === Gt.BuiltFrontComponent) {
|
|
479
488
|
const A = i.frontComponents, I = A.findIndex(
|
|
480
489
|
(P) => P.builtComponentPath === S
|
|
481
490
|
) ?? -1;
|
|
@@ -488,17 +497,17 @@ const l0 = ({
|
|
|
488
497
|
)
|
|
489
498
|
};
|
|
490
499
|
}
|
|
491
|
-
g ===
|
|
500
|
+
g === Gt.Dependencies && (S === "package.json" && (i.application.packageJsonChecksum = _), S === "yarn.lock" && (i.application.yarnLockChecksum = _));
|
|
492
501
|
}
|
|
493
502
|
return i;
|
|
494
|
-
},
|
|
495
|
-
const i =
|
|
503
|
+
}, g0 = async (l, a) => {
|
|
504
|
+
const i = me.join(l, jt);
|
|
496
505
|
await Q.ensureDir(i);
|
|
497
|
-
const
|
|
498
|
-
return await Q.writeJSON(
|
|
499
|
-
},
|
|
506
|
+
const f = me.join(i, "manifest.json");
|
|
507
|
+
return await Q.writeJSON(f, a, { spaces: 2 }), f;
|
|
508
|
+
}, m0 = Et.join(wu.tmpdir(), ".twenty-sdk-test"), v0 = () => process.env.NODE_ENV === "test" ? Et.join(m0, "config.json") : Et.join(wu.homedir(), ".twenty", "config.json"), St = "default", Zr = class Zr {
|
|
500
509
|
constructor() {
|
|
501
|
-
this.configPath =
|
|
510
|
+
this.configPath = v0();
|
|
502
511
|
}
|
|
503
512
|
static setActiveWorkspace(a) {
|
|
504
513
|
this.activeWorkspace = a ?? St;
|
|
@@ -520,7 +529,7 @@ const l0 = ({
|
|
|
520
529
|
async getConfigForWorkspace(a) {
|
|
521
530
|
const i = this.getDefaultConfig();
|
|
522
531
|
try {
|
|
523
|
-
const
|
|
532
|
+
const f = await this.readRawConfig(), g = a === St && !f.profiles?.[St] ? f : f.profiles?.[a], _ = g?.apiUrl ?? i.apiUrl, S = g?.apiKey;
|
|
524
533
|
return {
|
|
525
534
|
apiUrl: _,
|
|
526
535
|
apiKey: S
|
|
@@ -530,16 +539,16 @@ const l0 = ({
|
|
|
530
539
|
}
|
|
531
540
|
}
|
|
532
541
|
async setConfig(a) {
|
|
533
|
-
const i = await this.readRawConfig(),
|
|
542
|
+
const i = await this.readRawConfig(), f = this.getActiveWorkspaceName();
|
|
534
543
|
i.profiles || (i.profiles = {});
|
|
535
|
-
const g = i.profiles[
|
|
536
|
-
i.profiles[
|
|
544
|
+
const g = i.profiles[f] || { apiUrl: "" };
|
|
545
|
+
i.profiles[f] = { ...g, ...a }, await Q.ensureDir(Et.dirname(this.configPath)), await Q.writeFile(this.configPath, JSON.stringify(i, null, 2));
|
|
537
546
|
}
|
|
538
547
|
async clearConfig() {
|
|
539
548
|
const a = await this.readRawConfig(), i = this.getActiveWorkspaceName();
|
|
540
549
|
if (a.profiles || (a.profiles = {}), a.profiles[i] && delete a.profiles[i], i === St) {
|
|
541
|
-
const
|
|
542
|
-
delete a.apiKey, a.apiUrl =
|
|
550
|
+
const f = this.getDefaultConfig();
|
|
551
|
+
delete a.apiKey, a.apiUrl = f.apiUrl;
|
|
543
552
|
}
|
|
544
553
|
await Q.ensureDir(Et.dirname(this.configPath)), await Q.writeFile(this.configPath, JSON.stringify(a, null, 2));
|
|
545
554
|
}
|
|
@@ -551,7 +560,7 @@ const l0 = ({
|
|
|
551
560
|
async getAvailableWorkspaces() {
|
|
552
561
|
try {
|
|
553
562
|
const a = await this.readRawConfig(), i = /* @__PURE__ */ new Set();
|
|
554
|
-
return i.add(St), a.profiles && Object.keys(a.profiles).forEach((
|
|
563
|
+
return i.add(St), a.profiles && Object.keys(a.profiles).forEach((f) => i.add(f)), Array.from(i).sort();
|
|
555
564
|
} catch {
|
|
556
565
|
return [St];
|
|
557
566
|
}
|
|
@@ -573,23 +582,23 @@ let Ae = Zr;
|
|
|
573
582
|
class Ct {
|
|
574
583
|
constructor(a) {
|
|
575
584
|
const { disableInterceptors: i = !1 } = a || {};
|
|
576
|
-
this.configService = new Ae(), this.client = Jr.create(), this.client.interceptors.request.use(async (
|
|
585
|
+
this.configService = new Ae(), this.client = Jr.create(), this.client.interceptors.request.use(async (f) => {
|
|
577
586
|
const g = await this.configService.getConfig();
|
|
578
|
-
return
|
|
587
|
+
return f.baseURL = g.apiUrl, g.apiKey && (f.headers.Authorization = `Bearer ${g.apiKey}`), f;
|
|
579
588
|
}), !i && this.client.interceptors.response.use(
|
|
580
|
-
(
|
|
581
|
-
(
|
|
582
|
-
throw
|
|
589
|
+
(f) => f,
|
|
590
|
+
(f) => {
|
|
591
|
+
throw f.response?.status === 401 ? console.error(
|
|
583
592
|
E.red(
|
|
584
593
|
"Authentication failed. Please run `twenty auth:login` first."
|
|
585
594
|
)
|
|
586
|
-
) :
|
|
595
|
+
) : f.response?.status === 403 ? console.error(
|
|
587
596
|
E.red(
|
|
588
597
|
"Access denied. Check your API key and workspace permissions."
|
|
589
598
|
)
|
|
590
|
-
) :
|
|
599
|
+
) : f.code === "ECONNREFUSED" && console.error(
|
|
591
600
|
E.red("Cannot connect to Twenty server. Is it running?")
|
|
592
|
-
),
|
|
601
|
+
), f;
|
|
593
602
|
}
|
|
594
603
|
);
|
|
595
604
|
}
|
|
@@ -626,7 +635,7 @@ class Ct {
|
|
|
626
635
|
}
|
|
627
636
|
async checkApplicationExist(a) {
|
|
628
637
|
try {
|
|
629
|
-
const
|
|
638
|
+
const f = await this.client.post(
|
|
630
639
|
"/metadata",
|
|
631
640
|
{
|
|
632
641
|
query: `
|
|
@@ -643,12 +652,12 @@ class Ct {
|
|
|
643
652
|
}
|
|
644
653
|
}
|
|
645
654
|
);
|
|
646
|
-
return
|
|
655
|
+
return f.data.errors ? {
|
|
647
656
|
success: !1,
|
|
648
|
-
error:
|
|
657
|
+
error: f.data.errors[0]
|
|
649
658
|
} : {
|
|
650
659
|
success: !0,
|
|
651
|
-
data:
|
|
660
|
+
data: f.data.data.checkApplicationExist,
|
|
652
661
|
message: "Successfully find application"
|
|
653
662
|
};
|
|
654
663
|
} catch (i) {
|
|
@@ -667,7 +676,7 @@ class Ct {
|
|
|
667
676
|
universalIdentifier
|
|
668
677
|
}
|
|
669
678
|
}
|
|
670
|
-
`,
|
|
679
|
+
`, f = {
|
|
671
680
|
input: {
|
|
672
681
|
universalIdentifier: a.application.universalIdentifier,
|
|
673
682
|
name: a.application.displayName,
|
|
@@ -678,7 +687,7 @@ class Ct {
|
|
|
678
687
|
"/metadata",
|
|
679
688
|
{
|
|
680
689
|
query: i,
|
|
681
|
-
variables:
|
|
690
|
+
variables: f
|
|
682
691
|
},
|
|
683
692
|
{
|
|
684
693
|
headers: {
|
|
@@ -708,11 +717,11 @@ class Ct {
|
|
|
708
717
|
mutation SyncApplication($manifest: JSON!) {
|
|
709
718
|
syncApplication(manifest: $manifest)
|
|
710
719
|
}
|
|
711
|
-
`,
|
|
720
|
+
`, f = { manifest: a }, g = await this.client.post(
|
|
712
721
|
"/metadata",
|
|
713
722
|
{
|
|
714
723
|
query: i,
|
|
715
|
-
variables:
|
|
724
|
+
variables: f
|
|
716
725
|
},
|
|
717
726
|
{
|
|
718
727
|
headers: {
|
|
@@ -742,11 +751,11 @@ class Ct {
|
|
|
742
751
|
mutation UninstallApplication($universalIdentifier: String!) {
|
|
743
752
|
uninstallApplication(universalIdentifier: $universalIdentifier)
|
|
744
753
|
}
|
|
745
|
-
`,
|
|
754
|
+
`, f = { universalIdentifier: a }, g = await this.client.post(
|
|
746
755
|
"/metadata",
|
|
747
756
|
{
|
|
748
757
|
query: i,
|
|
749
|
-
variables:
|
|
758
|
+
variables: f
|
|
750
759
|
},
|
|
751
760
|
{
|
|
752
761
|
headers: {
|
|
@@ -774,7 +783,7 @@ class Ct {
|
|
|
774
783
|
}
|
|
775
784
|
async getSchema() {
|
|
776
785
|
try {
|
|
777
|
-
const a =
|
|
786
|
+
const a = mm(), i = await this.client.post(
|
|
778
787
|
"/graphql",
|
|
779
788
|
{
|
|
780
789
|
query: a
|
|
@@ -791,10 +800,10 @@ class Ct {
|
|
|
791
800
|
success: !1,
|
|
792
801
|
error: `GraphQL introspection errors: ${JSON.stringify(i.data.errors)}`
|
|
793
802
|
};
|
|
794
|
-
const
|
|
803
|
+
const f = vm(i.data.data);
|
|
795
804
|
return {
|
|
796
805
|
success: !0,
|
|
797
|
-
data:
|
|
806
|
+
data: _m(f),
|
|
798
807
|
message: "Successfully load schema"
|
|
799
808
|
};
|
|
800
809
|
} catch (a) {
|
|
@@ -846,7 +855,7 @@ class Ct {
|
|
|
846
855
|
payload: i
|
|
847
856
|
}) {
|
|
848
857
|
try {
|
|
849
|
-
const
|
|
858
|
+
const f = `
|
|
850
859
|
mutation ExecuteOneLogicFunction($input: ExecuteOneLogicFunctionInput!) {
|
|
851
860
|
executeOneLogicFunction(input: $input) {
|
|
852
861
|
data
|
|
@@ -864,7 +873,7 @@ class Ct {
|
|
|
864
873
|
}, _ = await this.client.post(
|
|
865
874
|
"/metadata",
|
|
866
875
|
{
|
|
867
|
-
query:
|
|
876
|
+
query: f,
|
|
868
877
|
variables: g
|
|
869
878
|
},
|
|
870
879
|
{
|
|
@@ -881,19 +890,19 @@ class Ct {
|
|
|
881
890
|
success: !0,
|
|
882
891
|
data: _.data.data.executeOneLogicFunction
|
|
883
892
|
};
|
|
884
|
-
} catch (
|
|
893
|
+
} catch (f) {
|
|
885
894
|
return {
|
|
886
895
|
success: !1,
|
|
887
|
-
error:
|
|
896
|
+
error: f
|
|
888
897
|
};
|
|
889
898
|
}
|
|
890
899
|
}
|
|
891
900
|
async subscribeToLogs({
|
|
892
901
|
applicationUniversalIdentifier: a,
|
|
893
902
|
functionUniversalIdentifier: i,
|
|
894
|
-
functionName:
|
|
903
|
+
functionName: f
|
|
895
904
|
}) {
|
|
896
|
-
const g = await this.configService.getConfig(), _ =
|
|
905
|
+
const g = await this.configService.getConfig(), _ = gm({
|
|
897
906
|
url: g.apiUrl + "/graphql",
|
|
898
907
|
headers: {
|
|
899
908
|
Authorization: `Bearer ${g.apiKey}`,
|
|
@@ -910,7 +919,7 @@ class Ct {
|
|
|
910
919
|
input: {
|
|
911
920
|
applicationUniversalIdentifier: a,
|
|
912
921
|
universalIdentifier: i,
|
|
913
|
-
name:
|
|
922
|
+
name: f
|
|
914
923
|
}
|
|
915
924
|
};
|
|
916
925
|
_.subscribe(
|
|
@@ -928,7 +937,7 @@ class Ct {
|
|
|
928
937
|
async uploadFile({
|
|
929
938
|
filePath: a,
|
|
930
939
|
builtHandlerPath: i,
|
|
931
|
-
fileFolder:
|
|
940
|
+
fileFolder: f,
|
|
932
941
|
applicationUniversalIdentifier: g
|
|
933
942
|
}) {
|
|
934
943
|
try {
|
|
@@ -943,7 +952,7 @@ class Ct {
|
|
|
943
952
|
uploadApplicationFile(file: $file, applicationUniversalIdentifier: $applicationUniversalIdentifier, fileFolder: $fileFolder, filePath: $filePath)
|
|
944
953
|
{ path }
|
|
945
954
|
}
|
|
946
|
-
`, z =
|
|
955
|
+
`, z = Fm(f), G = JSON.stringify({
|
|
947
956
|
query: P,
|
|
948
957
|
variables: {
|
|
949
958
|
file: null,
|
|
@@ -951,10 +960,10 @@ class Ct {
|
|
|
951
960
|
filePath: i,
|
|
952
961
|
fileFolder: z
|
|
953
962
|
}
|
|
954
|
-
}),
|
|
963
|
+
}), j = JSON.stringify({
|
|
955
964
|
0: ["variables.file"]
|
|
956
965
|
}), B = new FormData();
|
|
957
|
-
B.append("operations",
|
|
966
|
+
B.append("operations", G), B.append("map", j), B.append(
|
|
958
967
|
"0",
|
|
959
968
|
new Blob([new Uint8Array(A)], { type: I }),
|
|
960
969
|
S
|
|
@@ -1019,7 +1028,7 @@ class Ct {
|
|
|
1019
1028
|
}[i] || "application/octet-stream";
|
|
1020
1029
|
}
|
|
1021
1030
|
}
|
|
1022
|
-
class
|
|
1031
|
+
class _0 {
|
|
1023
1032
|
constructor(a) {
|
|
1024
1033
|
this.apiService = new Ct(), this.applicationUniversalIdentifier = a.applicationUniversalIdentifier, this.appPath = a.appPath;
|
|
1025
1034
|
}
|
|
@@ -1027,17 +1036,17 @@ class d0 {
|
|
|
1027
1036
|
builtPath: a,
|
|
1028
1037
|
fileFolder: i
|
|
1029
1038
|
}) {
|
|
1030
|
-
const
|
|
1039
|
+
const f = ft(jt, a);
|
|
1031
1040
|
return await this.apiService.uploadFile({
|
|
1032
|
-
filePath:
|
|
1033
|
-
builtHandlerPath:
|
|
1041
|
+
filePath: me.join(this.appPath, a),
|
|
1042
|
+
builtHandlerPath: f,
|
|
1034
1043
|
fileFolder: i,
|
|
1035
1044
|
applicationUniversalIdentifier: this.applicationUniversalIdentifier
|
|
1036
1045
|
});
|
|
1037
1046
|
}
|
|
1038
1047
|
}
|
|
1039
|
-
var Su = /* @__PURE__ */ ((
|
|
1040
|
-
const
|
|
1048
|
+
var Su = /* @__PURE__ */ ((l) => (l.DefineApplication = "defineApplication", l.DefineField = "defineField", l.DefineLogicFunction = "defineLogicFunction", l.DefineObject = "defineObject", l.DefineRole = "defineRole", l.DefineFrontComponent = "defineFrontComponent", l))(Su || {}), qt = /* @__PURE__ */ ((l) => (l.Application = "application", l.Fields = "fields", l.LogicFunctions = "logicFunctions", l.Objects = "objects", l.Roles = "roles", l.FrontComponents = "frontComponents", l.PublicAssets = "publicAssets", l))(qt || {});
|
|
1049
|
+
const w0 = {
|
|
1041
1050
|
defineApplication: "application",
|
|
1042
1051
|
defineField: "fields",
|
|
1043
1052
|
defineLogicFunction: "logicFunctions",
|
|
@@ -1045,191 +1054,190 @@ const g0 = {
|
|
|
1045
1054
|
defineRole: "roles",
|
|
1046
1055
|
defineFrontComponent: "frontComponents"
|
|
1047
1056
|
/* FrontComponents */
|
|
1048
|
-
},
|
|
1049
|
-
if (!In.isCallExpression(
|
|
1057
|
+
}, y0 = (l) => {
|
|
1058
|
+
if (!In.isCallExpression(l))
|
|
1050
1059
|
return;
|
|
1051
|
-
const a =
|
|
1060
|
+
const a = l.expression;
|
|
1052
1061
|
if (In.isIdentifier(a) && Object.values(Su).includes(a.text))
|
|
1053
1062
|
return a.text;
|
|
1054
|
-
},
|
|
1063
|
+
}, x0 = (l) => {
|
|
1055
1064
|
const a = In.createSourceFile(
|
|
1056
1065
|
"temp.ts",
|
|
1057
|
-
|
|
1066
|
+
l,
|
|
1058
1067
|
In.ScriptTarget.Latest,
|
|
1059
1068
|
!0
|
|
1060
1069
|
), i = [];
|
|
1061
|
-
In.forEachChild(a, (
|
|
1062
|
-
i.push(
|
|
1070
|
+
In.forEachChild(a, (f) => {
|
|
1071
|
+
i.push(f);
|
|
1063
1072
|
});
|
|
1064
|
-
for (const
|
|
1065
|
-
if (In.isExportAssignment(
|
|
1066
|
-
if (
|
|
1073
|
+
for (const f of i)
|
|
1074
|
+
if (In.isExportAssignment(f)) {
|
|
1075
|
+
if (f.isExportEquals || !f.expression)
|
|
1067
1076
|
return;
|
|
1068
|
-
const g =
|
|
1077
|
+
const g = y0(f.expression);
|
|
1069
1078
|
if (g)
|
|
1070
1079
|
return g;
|
|
1071
1080
|
}
|
|
1072
|
-
},
|
|
1081
|
+
}, S0 = ["twenty-sdk/ui"], A0 = {
|
|
1073
1082
|
name: "manifest-mock",
|
|
1074
|
-
setup: (
|
|
1083
|
+
setup: (l) => {
|
|
1075
1084
|
const a = new RegExp(
|
|
1076
|
-
`^(${
|
|
1085
|
+
`^(${S0.map((i) => i.replace("/", "\\/")).join("|")})$`
|
|
1077
1086
|
);
|
|
1078
|
-
|
|
1087
|
+
l.onResolve({ filter: a }, ({ path: i }) => ({
|
|
1079
1088
|
path: i,
|
|
1080
1089
|
namespace: "manifest-mock"
|
|
1081
|
-
})),
|
|
1090
|
+
})), l.onLoad({ filter: /.*/, namespace: "manifest-mock" }, () => ({
|
|
1082
1091
|
contents: "module.exports = new Proxy({}, { get: () => () => {} });",
|
|
1083
1092
|
loader: "js"
|
|
1084
1093
|
}));
|
|
1085
1094
|
}
|
|
1086
1095
|
}, Tn = async ({
|
|
1087
|
-
filePath:
|
|
1096
|
+
filePath: l,
|
|
1088
1097
|
appPath: a
|
|
1089
1098
|
}) => {
|
|
1090
|
-
const i = await
|
|
1091
|
-
return
|
|
1092
|
-
},
|
|
1093
|
-
filePath:
|
|
1099
|
+
const i = await E0({ filePath: l, appPath: a });
|
|
1100
|
+
return b0(i, l);
|
|
1101
|
+
}, E0 = async ({
|
|
1102
|
+
filePath: l,
|
|
1094
1103
|
appPath: a
|
|
1095
1104
|
}) => {
|
|
1096
|
-
const i =
|
|
1105
|
+
const i = me.join(a, "tsconfig.json"), f = await Q.pathExists(i), g = wm(me.join(a, "package.json"));
|
|
1097
1106
|
let _, S;
|
|
1098
1107
|
try {
|
|
1099
|
-
_ =
|
|
1108
|
+
_ = me.dirname(g.resolve("react/package.json")), S = me.dirname(g.resolve("react-dom/package.json"));
|
|
1100
1109
|
} catch {
|
|
1101
1110
|
}
|
|
1102
1111
|
const I = (await vu.build({
|
|
1103
|
-
entryPoints: [
|
|
1112
|
+
entryPoints: [l],
|
|
1104
1113
|
bundle: !0,
|
|
1105
1114
|
write: !1,
|
|
1106
1115
|
format: "cjs",
|
|
1107
1116
|
platform: "node",
|
|
1108
1117
|
target: "node18",
|
|
1109
1118
|
jsx: "automatic",
|
|
1110
|
-
tsconfig:
|
|
1119
|
+
tsconfig: f ? i : void 0,
|
|
1111
1120
|
alias: {
|
|
1112
1121
|
..._ && { react: _ },
|
|
1113
1122
|
...S && { "react-dom": S }
|
|
1114
1123
|
},
|
|
1115
|
-
plugins: [
|
|
1124
|
+
plugins: [A0],
|
|
1116
1125
|
logLevel: "silent"
|
|
1117
|
-
})).outputFiles[0].text, P = await Q.mkdtemp(
|
|
1126
|
+
})).outputFiles[0].text, P = await Q.mkdtemp(me.join(dm.tmpdir(), "twenty-manifest-")), z = me.join(P, "module.cjs");
|
|
1118
1127
|
try {
|
|
1119
1128
|
return await Q.writeFile(z, I), require(z);
|
|
1120
1129
|
} finally {
|
|
1121
1130
|
await Q.remove(P);
|
|
1122
1131
|
}
|
|
1123
|
-
},
|
|
1124
|
-
if (Pn(
|
|
1125
|
-
return
|
|
1132
|
+
}, b0 = (l, a) => {
|
|
1133
|
+
if (Pn(l.default) && Tm(l.default))
|
|
1134
|
+
return l.default;
|
|
1126
1135
|
throw new Error(
|
|
1127
1136
|
`Config file ${a} must export a config object default export`
|
|
1128
1137
|
);
|
|
1129
|
-
},
|
|
1130
|
-
cwd:
|
|
1138
|
+
}, C0 = async (l) => await yu(["**/*.ts", "**/*.tsx"], {
|
|
1139
|
+
cwd: l,
|
|
1131
1140
|
absolute: !0,
|
|
1132
1141
|
ignore: ["**/node_modules/**", "**/*.d.ts", "**/dist/**", "**/.twenty/**"],
|
|
1133
1142
|
onlyFiles: !0
|
|
1134
|
-
}),
|
|
1135
|
-
cwd:
|
|
1143
|
+
}), F0 = async (l) => await yu([`${Rs}/**/*`], {
|
|
1144
|
+
cwd: l,
|
|
1136
1145
|
onlyFiles: !0
|
|
1137
|
-
}), Vr = async (
|
|
1138
|
-
const a = await
|
|
1139
|
-
let
|
|
1140
|
-
const g = [], _ = [], S = [], A = [], I = [], P = [], z = [],
|
|
1146
|
+
}), Vr = async (l) => {
|
|
1147
|
+
const a = await C0(l), i = [];
|
|
1148
|
+
let f;
|
|
1149
|
+
const g = [], _ = [], S = [], A = [], I = [], P = [], z = [], G = [], j = [], B = [], ae = [], Oe = [], fe = [];
|
|
1141
1150
|
for (const T of a) {
|
|
1142
|
-
const Y = await lm(T, "utf-8"),
|
|
1151
|
+
const Y = await lm(T, "utf-8"), K = ft(l, T), ne = x0(Y);
|
|
1143
1152
|
if (!ne)
|
|
1144
1153
|
continue;
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
case Gt.Application: {
|
|
1154
|
+
switch (w0[ne]) {
|
|
1155
|
+
case qt.Application: {
|
|
1148
1156
|
const ee = await Tn({
|
|
1149
|
-
appPath:
|
|
1157
|
+
appPath: l,
|
|
1150
1158
|
filePath: T
|
|
1151
1159
|
});
|
|
1152
|
-
|
|
1160
|
+
f = {
|
|
1153
1161
|
...ee.config,
|
|
1154
1162
|
yarnLockChecksum: null,
|
|
1155
1163
|
packageJsonChecksum: null
|
|
1156
|
-
}, i.push(...ee.errors), z.push(
|
|
1164
|
+
}, i.push(...ee.errors), z.push(K);
|
|
1157
1165
|
break;
|
|
1158
1166
|
}
|
|
1159
|
-
case
|
|
1167
|
+
case qt.Objects: {
|
|
1160
1168
|
const ee = await Tn({
|
|
1161
|
-
appPath:
|
|
1169
|
+
appPath: l,
|
|
1162
1170
|
filePath: T
|
|
1163
1171
|
});
|
|
1164
|
-
g.push(ee.config), i.push(...ee.errors),
|
|
1172
|
+
g.push(ee.config), i.push(...ee.errors), G.push(K);
|
|
1165
1173
|
break;
|
|
1166
1174
|
}
|
|
1167
|
-
case
|
|
1175
|
+
case qt.Fields: {
|
|
1168
1176
|
const ee = await Tn({
|
|
1169
|
-
appPath:
|
|
1177
|
+
appPath: l,
|
|
1170
1178
|
filePath: T
|
|
1171
1179
|
});
|
|
1172
|
-
_.push(ee.config), i.push(...ee.errors),
|
|
1180
|
+
_.push(ee.config), i.push(...ee.errors), j.push(K);
|
|
1173
1181
|
break;
|
|
1174
1182
|
}
|
|
1175
|
-
case
|
|
1183
|
+
case qt.Roles: {
|
|
1176
1184
|
const ee = await Tn({
|
|
1177
|
-
appPath:
|
|
1185
|
+
appPath: l,
|
|
1178
1186
|
filePath: T
|
|
1179
1187
|
});
|
|
1180
|
-
S.push(ee.config), i.push(...ee.errors), B.push(
|
|
1188
|
+
S.push(ee.config), i.push(...ee.errors), B.push(K);
|
|
1181
1189
|
break;
|
|
1182
1190
|
}
|
|
1183
|
-
case
|
|
1191
|
+
case qt.LogicFunctions: {
|
|
1184
1192
|
const ee = await Tn({
|
|
1185
|
-
appPath:
|
|
1193
|
+
appPath: l,
|
|
1186
1194
|
filePath: T
|
|
1187
1195
|
});
|
|
1188
1196
|
i.push(...ee.errors);
|
|
1189
|
-
const { handler:
|
|
1190
|
-
...
|
|
1197
|
+
const { handler: Kt, ...Ge } = ee.config, ht = ft(l, T), Tt = {
|
|
1198
|
+
...Ge,
|
|
1191
1199
|
handlerName: "default.config.handler",
|
|
1192
1200
|
sourceHandlerPath: ht,
|
|
1193
1201
|
builtHandlerPath: ht.replace(/\.tsx?$/, ".mjs"),
|
|
1194
1202
|
builtHandlerChecksum: "[default-checksum]"
|
|
1195
1203
|
};
|
|
1196
|
-
A.push(Tt), ae.push(
|
|
1204
|
+
A.push(Tt), ae.push(K);
|
|
1197
1205
|
break;
|
|
1198
1206
|
}
|
|
1199
|
-
case
|
|
1207
|
+
case qt.FrontComponents: {
|
|
1200
1208
|
const ee = await Tn({
|
|
1201
|
-
appPath:
|
|
1209
|
+
appPath: l,
|
|
1202
1210
|
filePath: T
|
|
1203
1211
|
});
|
|
1204
1212
|
i.push(...ee.errors);
|
|
1205
|
-
const { component:
|
|
1206
|
-
...
|
|
1207
|
-
componentName:
|
|
1213
|
+
const { component: Kt, ...Ge } = ee.config, ht = ft(l, T), Tt = {
|
|
1214
|
+
...Ge,
|
|
1215
|
+
componentName: Kt.name,
|
|
1208
1216
|
sourceComponentPath: ht,
|
|
1209
1217
|
builtComponentPath: ht.replace(/\.tsx?$/, ".mjs"),
|
|
1210
1218
|
builtComponentChecksum: ""
|
|
1211
1219
|
};
|
|
1212
|
-
I.push(Tt),
|
|
1220
|
+
I.push(Tt), Oe.push(K);
|
|
1213
1221
|
break;
|
|
1214
1222
|
}
|
|
1215
|
-
case
|
|
1223
|
+
case qt.PublicAssets:
|
|
1216
1224
|
break;
|
|
1217
1225
|
default:
|
|
1218
|
-
|
|
1226
|
+
mu();
|
|
1219
1227
|
}
|
|
1220
1228
|
}
|
|
1221
|
-
const
|
|
1222
|
-
for (const T of
|
|
1229
|
+
const Le = await F0(l);
|
|
1230
|
+
for (const T of Le)
|
|
1223
1231
|
P.push({
|
|
1224
1232
|
filePath: T,
|
|
1225
1233
|
fileName: om(T),
|
|
1226
1234
|
fileType: am(T).replace(/^\./, ""),
|
|
1227
1235
|
checksum: null
|
|
1228
|
-
}), fe.push(ft(
|
|
1229
|
-
return
|
|
1236
|
+
}), fe.push(ft(l, T));
|
|
1237
|
+
return f || i.push(
|
|
1230
1238
|
"Cannot build application, please export default defineApplication() to define an application"
|
|
1231
|
-
), { manifest:
|
|
1232
|
-
application:
|
|
1239
|
+
), { manifest: f ? {
|
|
1240
|
+
application: f,
|
|
1233
1241
|
objects: g,
|
|
1234
1242
|
fields: _,
|
|
1235
1243
|
roles: S,
|
|
@@ -1238,30 +1246,30 @@ const g0 = {
|
|
|
1238
1246
|
publicAssets: P
|
|
1239
1247
|
} : null, filePaths: {
|
|
1240
1248
|
application: z,
|
|
1241
|
-
objects:
|
|
1242
|
-
fields:
|
|
1249
|
+
objects: G,
|
|
1250
|
+
fields: j,
|
|
1243
1251
|
roles: B,
|
|
1244
1252
|
logicFunctions: ae,
|
|
1245
|
-
frontComponents:
|
|
1253
|
+
frontComponents: Oe,
|
|
1246
1254
|
publicAssets: fe
|
|
1247
1255
|
}, errors: i };
|
|
1248
|
-
},
|
|
1256
|
+
}, T0 = (l) => {
|
|
1249
1257
|
const a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
1250
|
-
for (const
|
|
1251
|
-
a.has(
|
|
1258
|
+
for (const f of l)
|
|
1259
|
+
a.has(f) ? i.add(f) : a.add(f);
|
|
1252
1260
|
return Array.from(i);
|
|
1253
|
-
}, Au = (
|
|
1261
|
+
}, Au = (l) => {
|
|
1254
1262
|
const a = [];
|
|
1255
|
-
if (!
|
|
1263
|
+
if (!l)
|
|
1256
1264
|
return [];
|
|
1257
|
-
for (const [i,
|
|
1258
|
-
i === "universalIdentifier" && typeof
|
|
1265
|
+
for (const [i, f] of Object.entries(l))
|
|
1266
|
+
i === "universalIdentifier" && typeof f == "string" && a.push(f), typeof f == "object" && a.push(...Au(f));
|
|
1259
1267
|
return a;
|
|
1260
|
-
},
|
|
1261
|
-
const a = [], i = [],
|
|
1262
|
-
return
|
|
1268
|
+
}, I0 = (l) => {
|
|
1269
|
+
const a = [], i = [], f = T0(Au(l));
|
|
1270
|
+
return f.length > 0 && a.push(`Duplicate universal identifiers: ${f.join(", ")}`), Es(l.objects) || i.push("No object defined"), Es(l.logicFunctions) || i.push("No logic function defined"), Es(l.frontComponents) || i.push("No front component defined"), { errors: a, warnings: i, isValid: a.length === 0 };
|
|
1263
1271
|
};
|
|
1264
|
-
class
|
|
1272
|
+
class R0 {
|
|
1265
1273
|
constructor(a) {
|
|
1266
1274
|
this.builtFileInfos = /* @__PURE__ */ new Map(), this.fileUploader = null, this.apiService = new Ct({ disableInterceptors: !0 }), this.activeUploads = /* @__PURE__ */ new Set(), this.syncTimer = null, this.isSyncing = !1, this.serverReady = !1, this.serverErrorLogged = !1, this.appPath = a.appPath, this.debounceMs = a.debounceMs ?? 200, this.handleManifestBuilt = a.handleManifestBuilt, this.uiStateManager = a.uiStateManager;
|
|
1267
1275
|
}
|
|
@@ -1309,7 +1317,7 @@ class C0 {
|
|
|
1309
1317
|
handleFileBuilt({
|
|
1310
1318
|
fileFolder: a,
|
|
1311
1319
|
builtPath: i,
|
|
1312
|
-
sourcePath:
|
|
1320
|
+
sourcePath: f,
|
|
1313
1321
|
checksum: g
|
|
1314
1322
|
}) {
|
|
1315
1323
|
this.uiStateManager.addEvent({
|
|
@@ -1318,18 +1326,18 @@ class C0 {
|
|
|
1318
1326
|
}), this.builtFileInfos.set(i, {
|
|
1319
1327
|
checksum: g,
|
|
1320
1328
|
builtPath: i,
|
|
1321
|
-
sourcePath:
|
|
1329
|
+
sourcePath: f,
|
|
1322
1330
|
fileFolder: a
|
|
1323
|
-
}), this.fileUploader && this.uploadFile(i,
|
|
1331
|
+
}), this.fileUploader && this.uploadFile(i, f, a), this.scheduleSync();
|
|
1324
1332
|
}
|
|
1325
|
-
uploadFile(a, i,
|
|
1333
|
+
uploadFile(a, i, f) {
|
|
1326
1334
|
this.uiStateManager.addEvent({
|
|
1327
1335
|
message: `Uploading ${a}`,
|
|
1328
1336
|
status: "info"
|
|
1329
1337
|
}), this.uiStateManager.updateFileStatus(i, "uploading");
|
|
1330
1338
|
const g = this.fileUploader.uploadFile({
|
|
1331
1339
|
builtPath: a,
|
|
1332
|
-
fileFolder:
|
|
1340
|
+
fileFolder: f
|
|
1333
1341
|
}).then((_) => {
|
|
1334
1342
|
_.success ? (this.uiStateManager.addEvent({
|
|
1335
1343
|
message: `Successfully uploaded ${a}`,
|
|
@@ -1379,7 +1387,7 @@ class C0 {
|
|
|
1379
1387
|
});
|
|
1380
1388
|
return;
|
|
1381
1389
|
}
|
|
1382
|
-
const i =
|
|
1390
|
+
const i = I0(a.manifest);
|
|
1383
1391
|
if (!i.isValid) {
|
|
1384
1392
|
for (const _ of i.errors)
|
|
1385
1393
|
this.uiStateManager.addEvent({
|
|
@@ -1440,7 +1448,7 @@ class C0 {
|
|
|
1440
1448
|
return;
|
|
1441
1449
|
}
|
|
1442
1450
|
}
|
|
1443
|
-
this.fileUploader = new
|
|
1451
|
+
this.fileUploader = new _0({
|
|
1444
1452
|
appPath: this.appPath,
|
|
1445
1453
|
applicationUniversalIdentifier: a.manifest.application.universalIdentifier
|
|
1446
1454
|
});
|
|
@@ -1452,14 +1460,14 @@ class C0 {
|
|
|
1452
1460
|
}
|
|
1453
1461
|
for (; this.activeUploads.size > 0; )
|
|
1454
1462
|
await Promise.all(this.activeUploads);
|
|
1455
|
-
const
|
|
1463
|
+
const f = d0({
|
|
1456
1464
|
manifest: a.manifest,
|
|
1457
1465
|
builtFileInfos: this.builtFileInfos
|
|
1458
1466
|
});
|
|
1459
1467
|
this.uiStateManager.addEvent({
|
|
1460
1468
|
message: "Manifest checksums set",
|
|
1461
1469
|
status: "info"
|
|
1462
|
-
}), await
|
|
1470
|
+
}), await g0(this.appPath, f), this.uiStateManager.addEvent({
|
|
1463
1471
|
message: "Manifest saved to output directory",
|
|
1464
1472
|
status: "info"
|
|
1465
1473
|
}), this.uiStateManager.addEvent({
|
|
@@ -1468,7 +1476,7 @@ class C0 {
|
|
|
1468
1476
|
}), this.uiStateManager.updateManifestState({
|
|
1469
1477
|
manifestStatus: "syncing"
|
|
1470
1478
|
});
|
|
1471
|
-
const g = await this.apiService.syncApplication(
|
|
1479
|
+
const g = await this.apiService.syncApplication(f);
|
|
1472
1480
|
this.uiStateManager.updateAllFilesStatus("success"), g.success ? (this.uiStateManager.addEvent({
|
|
1473
1481
|
message: "✓ Synced",
|
|
1474
1482
|
status: "success"
|
|
@@ -1493,13 +1501,13 @@ class C0 {
|
|
|
1493
1501
|
}
|
|
1494
1502
|
}
|
|
1495
1503
|
}
|
|
1496
|
-
const
|
|
1504
|
+
const P0 = {
|
|
1497
1505
|
pending: ["building", "uploading", "success"],
|
|
1498
1506
|
building: ["pending", "uploading", "success"],
|
|
1499
1507
|
uploading: ["pending", "success"],
|
|
1500
1508
|
success: ["pending", "building", "uploading"]
|
|
1501
1509
|
};
|
|
1502
|
-
class
|
|
1510
|
+
class O0 {
|
|
1503
1511
|
constructor({
|
|
1504
1512
|
appPath: a,
|
|
1505
1513
|
frontendUrl: i
|
|
@@ -1529,7 +1537,7 @@ class T0 {
|
|
|
1529
1537
|
message: a,
|
|
1530
1538
|
status: i = "info"
|
|
1531
1539
|
}) {
|
|
1532
|
-
const
|
|
1540
|
+
const f = {
|
|
1533
1541
|
id: ++this.eventIdCounter,
|
|
1534
1542
|
timestamp: /* @__PURE__ */ new Date(),
|
|
1535
1543
|
message: a.slice(0, 5e3),
|
|
@@ -1537,33 +1545,33 @@ class T0 {
|
|
|
1537
1545
|
};
|
|
1538
1546
|
this.state = {
|
|
1539
1547
|
...this.state,
|
|
1540
|
-
events: [...this.state.events.slice(-201),
|
|
1548
|
+
events: [...this.state.events.slice(-201), f]
|
|
1541
1549
|
}, this.notify();
|
|
1542
1550
|
}
|
|
1543
1551
|
updateManifestState({
|
|
1544
1552
|
manifestStatus: a,
|
|
1545
1553
|
appName: i,
|
|
1546
|
-
error:
|
|
1554
|
+
error: f
|
|
1547
1555
|
}) {
|
|
1548
1556
|
this.state = {
|
|
1549
1557
|
...this.state,
|
|
1550
1558
|
...a ? { manifestStatus: a } : {},
|
|
1551
1559
|
...i ? { appName: i } : {},
|
|
1552
|
-
...
|
|
1560
|
+
...f ? { error: f.slice(0, 5e3) } : { error: void 0 }
|
|
1553
1561
|
}, this.notify();
|
|
1554
1562
|
}
|
|
1555
1563
|
convertEntityTypeToSyncableEntity(a) {
|
|
1556
1564
|
switch (a) {
|
|
1557
1565
|
case "objects":
|
|
1558
|
-
return
|
|
1566
|
+
return ge.Object;
|
|
1559
1567
|
case "fields":
|
|
1560
|
-
return
|
|
1568
|
+
return ge.Field;
|
|
1561
1569
|
case "logicFunctions":
|
|
1562
|
-
return
|
|
1570
|
+
return ge.LogicFunction;
|
|
1563
1571
|
case "frontComponents":
|
|
1564
|
-
return
|
|
1572
|
+
return ge.FrontComponent;
|
|
1565
1573
|
case "roles":
|
|
1566
|
-
return
|
|
1574
|
+
return ge.Role;
|
|
1567
1575
|
default:
|
|
1568
1576
|
return;
|
|
1569
1577
|
}
|
|
@@ -1580,18 +1588,18 @@ class T0 {
|
|
|
1580
1588
|
});
|
|
1581
1589
|
}
|
|
1582
1590
|
);
|
|
1583
|
-
const
|
|
1584
|
-
for (const [g, _] of
|
|
1585
|
-
|
|
1591
|
+
const f = new Map(this.state.entities);
|
|
1592
|
+
for (const [g, _] of f)
|
|
1593
|
+
f.set(g, {
|
|
1586
1594
|
..._,
|
|
1587
1595
|
type: i.get(g)
|
|
1588
1596
|
});
|
|
1589
|
-
this.state = { ...this.state, entities:
|
|
1597
|
+
this.state = { ...this.state, entities: f }, this.notify();
|
|
1590
1598
|
}
|
|
1591
1599
|
updateAllFilesStatus(a) {
|
|
1592
1600
|
const i = new Map(this.state.entities);
|
|
1593
|
-
for (const [
|
|
1594
|
-
i.set(
|
|
1601
|
+
for (const [f, g] of i)
|
|
1602
|
+
i.set(f, {
|
|
1595
1603
|
...g,
|
|
1596
1604
|
status: a
|
|
1597
1605
|
});
|
|
@@ -1602,17 +1610,17 @@ class T0 {
|
|
|
1602
1610
|
i.delete(a), this.state = { ...this.state, entities: i };
|
|
1603
1611
|
}
|
|
1604
1612
|
updateFileStatus(a, i) {
|
|
1605
|
-
const
|
|
1606
|
-
g?.status && !
|
|
1613
|
+
const f = new Map(this.state.entities), g = f.get(a);
|
|
1614
|
+
g?.status && !P0[g.status].find(
|
|
1607
1615
|
(_) => _ === i
|
|
1608
|
-
) || (
|
|
1616
|
+
) || (f.set(
|
|
1609
1617
|
a,
|
|
1610
1618
|
g ? { ...g, status: i } : {
|
|
1611
1619
|
name: a,
|
|
1612
1620
|
path: a,
|
|
1613
1621
|
status: i
|
|
1614
1622
|
}
|
|
1615
|
-
), this.state = { ...this.state, entities:
|
|
1623
|
+
), this.state = { ...this.state, entities: f }, this.notify());
|
|
1616
1624
|
}
|
|
1617
1625
|
}
|
|
1618
1626
|
const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], lu = ["↑", "⇡", "↟", "⤒"], Yr = {
|
|
@@ -1624,60 +1632,60 @@ const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
1624
1632
|
uploading: "cyan",
|
|
1625
1633
|
success: "green"
|
|
1626
1634
|
}, Eu = {
|
|
1627
|
-
[
|
|
1628
|
-
[
|
|
1629
|
-
[
|
|
1630
|
-
[
|
|
1631
|
-
[
|
|
1632
|
-
}, bu = Object.keys(Eu),
|
|
1635
|
+
[ge.Object]: "Objects",
|
|
1636
|
+
[ge.Field]: "Fields",
|
|
1637
|
+
[ge.LogicFunction]: "Logic functions",
|
|
1638
|
+
[ge.FrontComponent]: "Front components",
|
|
1639
|
+
[ge.Role]: "Roles"
|
|
1640
|
+
}, bu = Object.keys(Eu), L0 = {
|
|
1633
1641
|
info: "gray",
|
|
1634
1642
|
success: "green",
|
|
1635
1643
|
error: "red",
|
|
1636
1644
|
warning: "yellow"
|
|
1637
|
-
},
|
|
1645
|
+
}, M0 = (l) => {
|
|
1638
1646
|
const a = /* @__PURE__ */ new Map();
|
|
1639
1647
|
for (const i of bu)
|
|
1640
1648
|
a.set(i, []);
|
|
1641
|
-
for (const i of
|
|
1649
|
+
for (const i of l.values()) {
|
|
1642
1650
|
if (!i.type)
|
|
1643
1651
|
continue;
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1652
|
+
const f = a.get(i.type) ?? [];
|
|
1653
|
+
f.push(i), a.set(i.type, f);
|
|
1646
1654
|
}
|
|
1647
1655
|
return a;
|
|
1648
|
-
},
|
|
1656
|
+
}, U0 = (l) => l.toLocaleTimeString("en-US", {
|
|
1649
1657
|
hour12: !1,
|
|
1650
1658
|
hour: "2-digit",
|
|
1651
1659
|
minute: "2-digit",
|
|
1652
1660
|
second: "2-digit"
|
|
1653
|
-
}),
|
|
1654
|
-
if (
|
|
1655
|
-
const i =
|
|
1656
|
-
return i.length <= 2 ?
|
|
1657
|
-
},
|
|
1658
|
-
const [a, i] = await Promise.all([import("react"), import("ink")]), { useState:
|
|
1659
|
-
const [
|
|
1661
|
+
}), N0 = (l, a = 40) => {
|
|
1662
|
+
if (l.length <= a) return l;
|
|
1663
|
+
const i = l.split("/");
|
|
1664
|
+
return i.length <= 2 ? l : `.../${i.slice(-2).join("/")}`;
|
|
1665
|
+
}, W0 = (l) => !l.frontendUrl || !l.appUniversalIdentifier ? null : `${l.frontendUrl}/settings/applications`, D0 = async (l) => {
|
|
1666
|
+
const [a, i] = await Promise.all([import("react"), import("ink")]), { useState: f, useEffect: g } = a, { render: _, Box: S, Text: A, Static: I } = i, P = (T, Y = 80) => {
|
|
1667
|
+
const [K, ne] = f(0);
|
|
1660
1668
|
return g(() => {
|
|
1661
|
-
const
|
|
1669
|
+
const qe = setInterval(() => {
|
|
1662
1670
|
ne((ee) => (ee + 1) % T.length);
|
|
1663
1671
|
}, Y);
|
|
1664
|
-
return () => clearInterval(
|
|
1665
|
-
}, [T.length, Y]), T[
|
|
1672
|
+
return () => clearInterval(qe);
|
|
1673
|
+
}, [T.length, Y]), T[K];
|
|
1666
1674
|
}, z = ({ event: T }) => {
|
|
1667
|
-
const Y =
|
|
1675
|
+
const Y = L0[T.status], K = U0(T.timestamp);
|
|
1668
1676
|
return /* @__PURE__ */ ye(S, { children: [
|
|
1669
1677
|
/* @__PURE__ */ ye(A, { dimColor: !0, children: [
|
|
1670
|
-
|
|
1678
|
+
K,
|
|
1671
1679
|
" "
|
|
1672
1680
|
] }),
|
|
1673
1681
|
/* @__PURE__ */ ie(A, { color: Y, children: T.message })
|
|
1674
1682
|
] });
|
|
1675
|
-
},
|
|
1683
|
+
}, G = ({
|
|
1676
1684
|
status: T
|
|
1677
1685
|
}) => {
|
|
1678
|
-
const Y = P(Cs, 200),
|
|
1686
|
+
const Y = P(Cs, 200), K = P(lu, 200), ne = {
|
|
1679
1687
|
building: Y,
|
|
1680
|
-
uploading:
|
|
1688
|
+
uploading: K,
|
|
1681
1689
|
pending: Yr.pending,
|
|
1682
1690
|
success: Yr.success
|
|
1683
1691
|
};
|
|
@@ -1685,14 +1693,14 @@ const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
1685
1693
|
ne[T],
|
|
1686
1694
|
" "
|
|
1687
1695
|
] });
|
|
1688
|
-
},
|
|
1696
|
+
}, j = ({
|
|
1689
1697
|
entity: T
|
|
1690
1698
|
}) => /* @__PURE__ */ ye(S, { children: [
|
|
1691
|
-
/* @__PURE__ */ ie(
|
|
1699
|
+
/* @__PURE__ */ ie(G, { status: T.status }),
|
|
1692
1700
|
/* @__PURE__ */ ie(A, { children: T.name }),
|
|
1693
1701
|
T.path !== T.name && /* @__PURE__ */ ye(A, { dimColor: !0, children: [
|
|
1694
1702
|
" (",
|
|
1695
|
-
|
|
1703
|
+
N0(T.path),
|
|
1696
1704
|
")"
|
|
1697
1705
|
] })
|
|
1698
1706
|
] }), B = ({
|
|
@@ -1700,26 +1708,26 @@ const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
1700
1708
|
entities: Y
|
|
1701
1709
|
}) => Y.length === 0 ? null : /* @__PURE__ */ ye(S, { flexDirection: "column", marginTop: 1, children: [
|
|
1702
1710
|
/* @__PURE__ */ ie(A, { bold: !0, dimColor: !0, children: Eu[T] }),
|
|
1703
|
-
Y.map((
|
|
1711
|
+
Y.map((K) => /* @__PURE__ */ ie(j, { entity: K }, K.path))
|
|
1704
1712
|
] }), ae = {
|
|
1705
1713
|
synced: { color: "green", icon: "✓", text: "Synced" },
|
|
1706
1714
|
building: { color: "yellow", icon: "spinner", text: "Building..." },
|
|
1707
1715
|
syncing: { color: "yellow", icon: "spinner", text: "Syncing..." },
|
|
1708
1716
|
error: { color: "red", icon: null, text: "Error" },
|
|
1709
1717
|
idle: { color: "gray", icon: null, text: "Idle" }
|
|
1710
|
-
},
|
|
1718
|
+
}, Oe = ({
|
|
1711
1719
|
snapshot: T
|
|
1712
1720
|
}) => {
|
|
1713
|
-
const Y = P(Cs, 80),
|
|
1714
|
-
return /* @__PURE__ */ ye(A, { color:
|
|
1721
|
+
const Y = P(Cs, 80), K = ae[T.manifestStatus], ne = K.icon === "spinner" ? Y : K.icon;
|
|
1722
|
+
return /* @__PURE__ */ ye(A, { color: K.color, children: [
|
|
1715
1723
|
ne ? `${ne} ` : "",
|
|
1716
|
-
|
|
1724
|
+
K.text,
|
|
1717
1725
|
T.error && `: ${T.error}`
|
|
1718
1726
|
] });
|
|
1719
1727
|
}, fe = ({
|
|
1720
1728
|
snapshot: T
|
|
1721
1729
|
}) => {
|
|
1722
|
-
const Y =
|
|
1730
|
+
const Y = M0(T.entities), K = W0(T);
|
|
1723
1731
|
return /* @__PURE__ */ ye(
|
|
1724
1732
|
S,
|
|
1725
1733
|
{
|
|
@@ -1740,24 +1748,24 @@ const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
1740
1748
|
] }),
|
|
1741
1749
|
/* @__PURE__ */ ye(S, { children: [
|
|
1742
1750
|
/* @__PURE__ */ ie(A, { dimColor: !0, children: "Status: " }),
|
|
1743
|
-
/* @__PURE__ */ ie(
|
|
1751
|
+
/* @__PURE__ */ ie(Oe, { snapshot: T })
|
|
1744
1752
|
] }),
|
|
1745
|
-
|
|
1753
|
+
K && /* @__PURE__ */ ye(S, { children: [
|
|
1746
1754
|
/* @__PURE__ */ ie(A, { dimColor: !0, children: "Open:" }),
|
|
1747
1755
|
/* @__PURE__ */ ye(A, { bold: !0, color: "cyan", children: [
|
|
1748
1756
|
" ",
|
|
1749
|
-
|
|
1757
|
+
K
|
|
1750
1758
|
] })
|
|
1751
1759
|
] })
|
|
1752
1760
|
] }),
|
|
1753
1761
|
/* @__PURE__ */ ie(S, { marginLeft: 2, flexDirection: "column", children: bu.map((ne) => {
|
|
1754
|
-
const
|
|
1755
|
-
return /* @__PURE__ */ ie(B, { type: ne, entities:
|
|
1762
|
+
const qe = Y.get(ne) ?? [];
|
|
1763
|
+
return /* @__PURE__ */ ie(B, { type: ne, entities: qe }, ne);
|
|
1756
1764
|
}) })
|
|
1757
1765
|
]
|
|
1758
1766
|
}
|
|
1759
1767
|
);
|
|
1760
|
-
},
|
|
1768
|
+
}, Le = () => /* @__PURE__ */ ie(S, { marginTop: 1, children: /* @__PURE__ */ ye(A, { dimColor: !0, children: [
|
|
1761
1769
|
/* @__PURE__ */ ie(A, { color: Xn.pending, children: Yr.pending }),
|
|
1762
1770
|
" ",
|
|
1763
1771
|
"pending ",
|
|
@@ -1772,14 +1780,14 @@ const Cs = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"
|
|
|
1772
1780
|
" ",
|
|
1773
1781
|
"success"
|
|
1774
1782
|
] }) }), Ft = () => {
|
|
1775
|
-
const [T, Y] =
|
|
1776
|
-
|
|
1783
|
+
const [T, Y] = f(
|
|
1784
|
+
l.getSnapshot()
|
|
1777
1785
|
);
|
|
1778
|
-
return g(() =>
|
|
1779
|
-
/* @__PURE__ */ ie(I, { items: T.events, children: (
|
|
1786
|
+
return g(() => l.subscribe(Y), []), /* @__PURE__ */ ye(ym, { children: [
|
|
1787
|
+
/* @__PURE__ */ ie(I, { items: T.events, children: (K) => /* @__PURE__ */ ie(z, { event: K }, K.id) }),
|
|
1780
1788
|
/* @__PURE__ */ ye(S, { marginTop: 1, flexDirection: "column", children: [
|
|
1781
1789
|
/* @__PURE__ */ ie(fe, { snapshot: T }),
|
|
1782
|
-
/* @__PURE__ */ ie(
|
|
1790
|
+
/* @__PURE__ */ ie(Le, {})
|
|
1783
1791
|
] })
|
|
1784
1792
|
] });
|
|
1785
1793
|
}, { unmount: Fe } = _(/* @__PURE__ */ ie(Ft, {}));
|
|
@@ -1802,30 +1810,30 @@ class fu {
|
|
|
1802
1810
|
pollInterval: 50
|
|
1803
1811
|
},
|
|
1804
1812
|
usePolling: !0
|
|
1805
|
-
}), this.watcher.on("all", (i,
|
|
1806
|
-
i !== "addDir" && ((i === "add" || i === "change") && this.copyAndNotify(
|
|
1813
|
+
}), this.watcher.on("all", (i, f) => {
|
|
1814
|
+
i !== "addDir" && ((i === "add" || i === "change") && this.copyAndNotify(f), i === "unlink" && this.handleUnlink(f));
|
|
1807
1815
|
});
|
|
1808
1816
|
}
|
|
1809
1817
|
async close() {
|
|
1810
1818
|
await this.watcher?.close();
|
|
1811
1819
|
}
|
|
1812
1820
|
async copyAndNotify(a) {
|
|
1813
|
-
const i = ft(this.appPath, a),
|
|
1821
|
+
const i = ft(this.appPath, a), f = st(jt, i), g = st(this.appPath, f);
|
|
1814
1822
|
await Q.ensureDir(um(g)), await Q.copy(a, g);
|
|
1815
1823
|
const _ = await Q.readFile(g), S = du.createHash("md5").update(_).digest("hex");
|
|
1816
1824
|
this.handleFileBuilt({
|
|
1817
1825
|
fileFolder: this.fileFolder,
|
|
1818
|
-
builtPath:
|
|
1826
|
+
builtPath: f,
|
|
1819
1827
|
sourcePath: i,
|
|
1820
1828
|
checksum: S
|
|
1821
1829
|
});
|
|
1822
1830
|
}
|
|
1823
1831
|
async handleUnlink(a) {
|
|
1824
|
-
const i = ft(this.appPath, a),
|
|
1832
|
+
const i = ft(this.appPath, a), f = st(jt, i), g = st(this.appPath, f);
|
|
1825
1833
|
await Q.remove(g);
|
|
1826
1834
|
}
|
|
1827
1835
|
}
|
|
1828
|
-
class
|
|
1836
|
+
class $0 {
|
|
1829
1837
|
constructor() {
|
|
1830
1838
|
this.appPath = "", this.orchestrator = null, this.manifestWatcher = null, this.logicFunctionsWatcher = null, this.frontComponentsWatcher = null, this.assetWatcher = null, this.dependencyWatcher = null, this.watchersStarted = !1, this.uiStateManager = null, this.unmountUI = null;
|
|
1831
1839
|
}
|
|
@@ -1839,23 +1847,23 @@ class U0 {
|
|
|
1839
1847
|
]);
|
|
1840
1848
|
}
|
|
1841
1849
|
async execute(a) {
|
|
1842
|
-
this.appPath = a.appPath ?? bt, await this.cleanOutputDir(), this.uiStateManager = new
|
|
1850
|
+
this.appPath = a.appPath ?? bt, await this.cleanOutputDir(), this.uiStateManager = new O0({
|
|
1843
1851
|
appPath: this.appPath,
|
|
1844
1852
|
frontendUrl: process.env.FRONTEND_URL
|
|
1845
1853
|
});
|
|
1846
|
-
const { unmount: i } = await
|
|
1847
|
-
this.unmountUI = i, this.orchestrator = new
|
|
1854
|
+
const { unmount: i } = await D0(this.uiStateManager);
|
|
1855
|
+
this.unmountUI = i, this.orchestrator = new R0({
|
|
1848
1856
|
appPath: this.appPath,
|
|
1849
1857
|
handleManifestBuilt: this.handleWatcherRestarts.bind(this),
|
|
1850
1858
|
uiStateManager: this.uiStateManager
|
|
1851
1859
|
}), await this.startManifestWatcher(), this.setupGracefulShutdown();
|
|
1852
1860
|
}
|
|
1853
1861
|
async cleanOutputDir() {
|
|
1854
|
-
const a =
|
|
1862
|
+
const a = me.join(this.appPath, jt);
|
|
1855
1863
|
await Q.ensureDir(a), await Q.emptyDir(a);
|
|
1856
1864
|
}
|
|
1857
1865
|
async startManifestWatcher() {
|
|
1858
|
-
this.manifestWatcher = new
|
|
1866
|
+
this.manifestWatcher = new p0({
|
|
1859
1867
|
appPath: this.appPath,
|
|
1860
1868
|
handleChangeDetected: this.orchestrator.handleChangeDetected.bind(
|
|
1861
1869
|
this.orchestrator
|
|
@@ -1863,12 +1871,12 @@ class U0 {
|
|
|
1863
1871
|
}), await this.manifestWatcher.start();
|
|
1864
1872
|
}
|
|
1865
1873
|
async handleWatcherRestarts(a) {
|
|
1866
|
-
const { logicFunctions: i, frontComponents:
|
|
1874
|
+
const { logicFunctions: i, frontComponents: f } = a.filePaths;
|
|
1867
1875
|
if (!this.watchersStarted) {
|
|
1868
|
-
this.watchersStarted = !0, await this.startFileWatchers(i,
|
|
1876
|
+
this.watchersStarted = !0, await this.startFileWatchers(i, f);
|
|
1869
1877
|
return;
|
|
1870
1878
|
}
|
|
1871
|
-
this.logicFunctionsWatcher?.shouldRestart(i) && await this.logicFunctionsWatcher.restart(i), this.frontComponentsWatcher?.shouldRestart(
|
|
1879
|
+
this.logicFunctionsWatcher?.shouldRestart(i) && await this.logicFunctionsWatcher.restart(i), this.frontComponentsWatcher?.shouldRestart(f) && await this.frontComponentsWatcher.restart(f);
|
|
1872
1880
|
}
|
|
1873
1881
|
async startFileWatchers(a, i) {
|
|
1874
1882
|
await Promise.all([
|
|
@@ -1879,7 +1887,7 @@ class U0 {
|
|
|
1879
1887
|
]);
|
|
1880
1888
|
}
|
|
1881
1889
|
async startLogicFunctionsWatcher(a) {
|
|
1882
|
-
this.logicFunctionsWatcher =
|
|
1890
|
+
this.logicFunctionsWatcher = f0({
|
|
1883
1891
|
appPath: this.appPath,
|
|
1884
1892
|
sourcePaths: a,
|
|
1885
1893
|
handleBuildError: this.orchestrator.handleFileBuildError.bind(
|
|
@@ -1891,7 +1899,7 @@ class U0 {
|
|
|
1891
1899
|
}), await this.logicFunctionsWatcher.start();
|
|
1892
1900
|
}
|
|
1893
1901
|
async startFrontComponentsWatcher(a) {
|
|
1894
|
-
this.frontComponentsWatcher =
|
|
1902
|
+
this.frontComponentsWatcher = h0({
|
|
1895
1903
|
appPath: this.appPath,
|
|
1896
1904
|
sourcePaths: a,
|
|
1897
1905
|
handleBuildError: this.orchestrator.handleFileBuildError.bind(
|
|
@@ -1905,7 +1913,7 @@ class U0 {
|
|
|
1905
1913
|
async startAssetWatcher() {
|
|
1906
1914
|
this.assetWatcher = new fu({
|
|
1907
1915
|
appPath: this.appPath,
|
|
1908
|
-
fileFolder:
|
|
1916
|
+
fileFolder: Gt.PublicAsset,
|
|
1909
1917
|
watchPaths: [Rs],
|
|
1910
1918
|
handleFileBuilt: this.orchestrator.handleFileBuilt.bind(
|
|
1911
1919
|
this.orchestrator
|
|
@@ -1915,7 +1923,7 @@ class U0 {
|
|
|
1915
1923
|
async startDependencyWatcher() {
|
|
1916
1924
|
this.dependencyWatcher = new fu({
|
|
1917
1925
|
appPath: this.appPath,
|
|
1918
|
-
fileFolder:
|
|
1926
|
+
fileFolder: Gt.Dependencies,
|
|
1919
1927
|
watchPaths: ["package.json", "yarn.lock"],
|
|
1920
1928
|
handleFileBuilt: this.orchestrator.handleFileBuilt.bind(
|
|
1921
1929
|
this.orchestrator
|
|
@@ -1927,15 +1935,15 @@ class U0 {
|
|
|
1927
1935
|
process.on("SIGINT", a), process.on("SIGTERM", a);
|
|
1928
1936
|
}
|
|
1929
1937
|
}
|
|
1930
|
-
const
|
|
1931
|
-
class
|
|
1938
|
+
const B0 = "generated";
|
|
1939
|
+
class k0 {
|
|
1932
1940
|
constructor() {
|
|
1933
1941
|
this.configService = new Ae(), this.apiService = new Ct();
|
|
1934
1942
|
}
|
|
1935
1943
|
async generate(a) {
|
|
1936
|
-
const i = st(a,
|
|
1944
|
+
const i = st(a, B0);
|
|
1937
1945
|
console.log(E.blue("📦 Generating Twenty client...")), console.log(E.gray(`📁 Output Path: ${i}`)), console.log("");
|
|
1938
|
-
const
|
|
1946
|
+
const f = await this.configService.getConfig(), g = f.apiUrl, _ = f.apiKey;
|
|
1939
1947
|
if (!g || !_) {
|
|
1940
1948
|
console.log(
|
|
1941
1949
|
E.yellow(
|
|
@@ -1949,7 +1957,7 @@ class W0 {
|
|
|
1949
1957
|
if (!S.success)
|
|
1950
1958
|
return;
|
|
1951
1959
|
const { data: A } = S, I = cm(i);
|
|
1952
|
-
await
|
|
1960
|
+
await xm({
|
|
1953
1961
|
schema: A,
|
|
1954
1962
|
output: I,
|
|
1955
1963
|
scalarTypes: {
|
|
@@ -1967,10 +1975,10 @@ class W0 {
|
|
|
1967
1975
|
// ----------------------------------------------------
|
|
1968
1976
|
|
|
1969
1977
|
const defaultOptions: ClientOptions = {
|
|
1970
|
-
url: \`\${process.env.${
|
|
1978
|
+
url: \`\${process.env.${o0}}/graphql\`,
|
|
1971
1979
|
headers: {
|
|
1972
1980
|
'Content-Type': 'application/json',
|
|
1973
|
-
Authorization: \`Bearer \${process.env.${
|
|
1981
|
+
Authorization: \`Bearer \${process.env.${a0}}\`,
|
|
1974
1982
|
},
|
|
1975
1983
|
}
|
|
1976
1984
|
|
|
@@ -2042,9 +2050,9 @@ export default class Twenty {
|
|
|
2042
2050
|
await Q.appendFile(st(a, "index.ts"), i);
|
|
2043
2051
|
}
|
|
2044
2052
|
}
|
|
2045
|
-
class
|
|
2053
|
+
class q0 {
|
|
2046
2054
|
constructor() {
|
|
2047
|
-
this.clientService = new
|
|
2055
|
+
this.clientService = new k0();
|
|
2048
2056
|
}
|
|
2049
2057
|
async execute(a = bt) {
|
|
2050
2058
|
try {
|
|
@@ -2057,7 +2065,7 @@ class D0 {
|
|
|
2057
2065
|
}
|
|
2058
2066
|
}
|
|
2059
2067
|
}
|
|
2060
|
-
class
|
|
2068
|
+
class G0 {
|
|
2061
2069
|
constructor() {
|
|
2062
2070
|
this.apiService = new Ct();
|
|
2063
2071
|
}
|
|
@@ -2067,18 +2075,18 @@ class $0 {
|
|
|
2067
2075
|
}) {
|
|
2068
2076
|
try {
|
|
2069
2077
|
console.log(E.blue("🚀 Uninstall Twenty Application")), console.log(E.gray(`📁 App Path: ${a}`)), console.log(""), i && !await this.confirmationPrompt() && (console.error(E.red("⛔️ Aborting uninstall")), process.exit(1));
|
|
2070
|
-
const { manifest:
|
|
2071
|
-
if (!
|
|
2078
|
+
const { manifest: f } = await Vr(a);
|
|
2079
|
+
if (!f)
|
|
2072
2080
|
return { success: !1, error: "Build failed" };
|
|
2073
2081
|
const g = await this.apiService.uninstallApplication(
|
|
2074
|
-
|
|
2082
|
+
f.application.universalIdentifier
|
|
2075
2083
|
);
|
|
2076
2084
|
return g.success === !1 ? console.error(E.red("❌ Uninstall failed:"), g.error) : console.log(E.green("✅ Application uninstalled successfully")), g;
|
|
2077
|
-
} catch (
|
|
2085
|
+
} catch (f) {
|
|
2078
2086
|
throw console.error(
|
|
2079
2087
|
E.red("Uninstall failed:"),
|
|
2080
|
-
|
|
2081
|
-
),
|
|
2088
|
+
f instanceof Error ? f.message : f
|
|
2089
|
+
), f;
|
|
2082
2090
|
}
|
|
2083
2091
|
}
|
|
2084
2092
|
async confirmationPrompt() {
|
|
@@ -2093,7 +2101,7 @@ class $0 {
|
|
|
2093
2101
|
return a;
|
|
2094
2102
|
}
|
|
2095
2103
|
}
|
|
2096
|
-
class
|
|
2104
|
+
class H0 {
|
|
2097
2105
|
constructor() {
|
|
2098
2106
|
this.configService = new Ae();
|
|
2099
2107
|
}
|
|
@@ -2110,9 +2118,9 @@ class B0 {
|
|
|
2110
2118
|
}
|
|
2111
2119
|
console.log(E.blue(`Available workspaces:
|
|
2112
2120
|
`));
|
|
2113
|
-
for (const
|
|
2114
|
-
const g = await this.configService.getConfigForWorkspace(
|
|
2115
|
-
console.log(` ${I} ${
|
|
2121
|
+
for (const f of a) {
|
|
2122
|
+
const g = await this.configService.getConfigForWorkspace(f), _ = !!g.apiKey, A = f === i ? E.green(" (default)") : "", I = _ ? E.green("●") : E.gray("○");
|
|
2123
|
+
console.log(` ${I} ${f}${A}`), console.log(E.gray(` API URL: ${g.apiUrl}`));
|
|
2116
2124
|
}
|
|
2117
2125
|
console.log(""), console.log(E.gray("● = authenticated, ○ = no credentials")), console.log(
|
|
2118
2126
|
E.gray("Use `twenty auth:switch <workspace>` to change default")
|
|
@@ -2125,15 +2133,15 @@ class B0 {
|
|
|
2125
2133
|
}
|
|
2126
2134
|
}
|
|
2127
2135
|
}
|
|
2128
|
-
class
|
|
2136
|
+
class j0 {
|
|
2129
2137
|
constructor() {
|
|
2130
2138
|
this.configService = new Ae(), this.apiService = new Ct();
|
|
2131
2139
|
}
|
|
2132
2140
|
async execute(a) {
|
|
2133
2141
|
try {
|
|
2134
|
-
let { apiKey: i, apiUrl:
|
|
2142
|
+
let { apiKey: i, apiUrl: f } = a;
|
|
2135
2143
|
const g = await this.configService.getConfig();
|
|
2136
|
-
if (
|
|
2144
|
+
if (f || (f = (await At.prompt([
|
|
2137
2145
|
{
|
|
2138
2146
|
type: "input",
|
|
2139
2147
|
name: "apiUrl",
|
|
@@ -2156,7 +2164,7 @@ class k0 {
|
|
|
2156
2164
|
validate: (A) => A.length > 0 || "API key is required"
|
|
2157
2165
|
}
|
|
2158
2166
|
])).apiKey), await this.configService.setConfig({
|
|
2159
|
-
apiUrl:
|
|
2167
|
+
apiUrl: f,
|
|
2160
2168
|
apiKey: i
|
|
2161
2169
|
}), (await this.apiService.validateAuth()).authValid) {
|
|
2162
2170
|
const S = Ae.getActiveWorkspace();
|
|
@@ -2177,7 +2185,7 @@ class k0 {
|
|
|
2177
2185
|
}
|
|
2178
2186
|
}
|
|
2179
2187
|
}
|
|
2180
|
-
class
|
|
2188
|
+
class K0 {
|
|
2181
2189
|
constructor() {
|
|
2182
2190
|
this.configService = new Ae();
|
|
2183
2191
|
}
|
|
@@ -2198,7 +2206,7 @@ class G0 {
|
|
|
2198
2206
|
}
|
|
2199
2207
|
}
|
|
2200
2208
|
}
|
|
2201
|
-
class
|
|
2209
|
+
class z0 {
|
|
2202
2210
|
constructor() {
|
|
2203
2211
|
this.configService = new Ae(), this.apiService = new Ct();
|
|
2204
2212
|
}
|
|
@@ -2208,9 +2216,9 @@ class q0 {
|
|
|
2208
2216
|
if (console.log(E.blue("Authentication Status:")), console.log(`Workspace: ${a}`), console.log(`API URL: ${i.apiUrl}`), console.log(
|
|
2209
2217
|
`API Key: ${i.apiKey ? "***" + i.apiKey.slice(-4) : "Not set"}`
|
|
2210
2218
|
), i.apiKey) {
|
|
2211
|
-
const
|
|
2219
|
+
const f = await this.apiService.validateAuth();
|
|
2212
2220
|
console.log(
|
|
2213
|
-
`Status: ${
|
|
2221
|
+
`Status: ${f.authValid ? E.green("✓ Valid") : E.red("✗ Invalid")}`
|
|
2214
2222
|
);
|
|
2215
2223
|
} else
|
|
2216
2224
|
console.log(`Status: ${E.yellow("⚠ Not authenticated")}`);
|
|
@@ -2222,14 +2230,14 @@ class q0 {
|
|
|
2222
2230
|
}
|
|
2223
2231
|
}
|
|
2224
2232
|
}
|
|
2225
|
-
class
|
|
2233
|
+
class J0 {
|
|
2226
2234
|
constructor() {
|
|
2227
2235
|
this.apiService = new Ct();
|
|
2228
2236
|
}
|
|
2229
2237
|
async execute({
|
|
2230
2238
|
appPath: a = bt,
|
|
2231
2239
|
functionUniversalIdentifier: i,
|
|
2232
|
-
functionName:
|
|
2240
|
+
functionName: f,
|
|
2233
2241
|
payload: g = "{}"
|
|
2234
2242
|
}) {
|
|
2235
2243
|
try {
|
|
@@ -2250,9 +2258,9 @@ class H0 {
|
|
|
2250
2258
|
), process.exit(1));
|
|
2251
2259
|
const I = A.data.filter(
|
|
2252
2260
|
(B) => B.universalIdentifier && this.belongsToApplication(B, S)
|
|
2253
|
-
), P = I.find((B) => i ? B.universalIdentifier === i :
|
|
2261
|
+
), P = I.find((B) => i ? B.universalIdentifier === i : f ? B.name === f : !1);
|
|
2254
2262
|
if (!P) {
|
|
2255
|
-
const B = i ||
|
|
2263
|
+
const B = i || f;
|
|
2256
2264
|
console.error(
|
|
2257
2265
|
E.red(`Function "${B}" not found in application.`)
|
|
2258
2266
|
), console.log(""), I.length > 0 ? (console.log(E.cyan("Available functions:")), I.forEach((ae) => {
|
|
@@ -2276,14 +2284,14 @@ class H0 {
|
|
|
2276
2284
|
E.red("Execution failed:"),
|
|
2277
2285
|
z.error instanceof Error ? z.error.message : z.error
|
|
2278
2286
|
), process.exit(1));
|
|
2279
|
-
const
|
|
2287
|
+
const G = z.data;
|
|
2280
2288
|
console.log(E.cyan("─".repeat(60))), console.log(E.cyan("Execution Result")), console.log(E.cyan("─".repeat(60)));
|
|
2281
|
-
const
|
|
2289
|
+
const j = G.status === "SUCCESS" ? E.green : E.red;
|
|
2282
2290
|
console.log(
|
|
2283
|
-
`${E.bold("Status:")} ${
|
|
2284
|
-
), console.log(`${E.bold("Duration:")} ${
|
|
2285
|
-
E.red(` Message: ${
|
|
2286
|
-
),
|
|
2291
|
+
`${E.bold("Status:")} ${j(G.status)}`
|
|
2292
|
+
), console.log(`${E.bold("Duration:")} ${G.duration}ms`), Pn(G.data) && (console.log(""), console.log(E.bold("Data:")), console.log(E.white(JSON.stringify(G.data, null, 2)))), G.error && (console.log(""), console.log(E.bold.red("Error:")), console.log(E.red(` Type: ${G.error.errorType}`)), console.log(
|
|
2293
|
+
E.red(` Message: ${G.error.errorMessage}`)
|
|
2294
|
+
), G.error.stackTrace && (console.log(""), console.log(E.gray("Stack trace:")), console.log(E.gray(G.error.stackTrace)))), G.logs && (console.log(""), console.log(E.bold("Logs:")), console.log(E.gray(G.logs))), console.log(E.cyan("─".repeat(60))), G.status !== "SUCCESS" && process.exit(1);
|
|
2287
2295
|
} catch (_) {
|
|
2288
2296
|
console.error(
|
|
2289
2297
|
E.red("Execution failed:"),
|
|
@@ -2293,29 +2301,29 @@ class H0 {
|
|
|
2293
2301
|
}
|
|
2294
2302
|
belongsToApplication(a, i) {
|
|
2295
2303
|
return i.logicFunctions.some(
|
|
2296
|
-
(
|
|
2304
|
+
(f) => f.universalIdentifier === a.universalIdentifier
|
|
2297
2305
|
);
|
|
2298
2306
|
}
|
|
2299
2307
|
}
|
|
2300
|
-
class
|
|
2308
|
+
class Y0 {
|
|
2301
2309
|
constructor() {
|
|
2302
2310
|
this.apiService = new Ct();
|
|
2303
2311
|
}
|
|
2304
2312
|
async execute({
|
|
2305
2313
|
appPath: a = bt,
|
|
2306
2314
|
functionUniversalIdentifier: i,
|
|
2307
|
-
functionName:
|
|
2315
|
+
functionName: f
|
|
2308
2316
|
}) {
|
|
2309
2317
|
try {
|
|
2310
2318
|
const { manifest: g } = await Vr(a);
|
|
2311
2319
|
g || process.exit(1), this.logWatchInfo({
|
|
2312
2320
|
appName: g.application.displayName,
|
|
2313
2321
|
functionUniversalIdentifier: i,
|
|
2314
|
-
functionName:
|
|
2322
|
+
functionName: f
|
|
2315
2323
|
}), await this.apiService.subscribeToLogs({
|
|
2316
2324
|
applicationUniversalIdentifier: g.application.universalIdentifier,
|
|
2317
2325
|
functionUniversalIdentifier: i,
|
|
2318
|
-
functionName:
|
|
2326
|
+
functionName: f
|
|
2319
2327
|
});
|
|
2320
2328
|
} catch (g) {
|
|
2321
2329
|
console.error(
|
|
@@ -2327,23 +2335,23 @@ class K0 {
|
|
|
2327
2335
|
logWatchInfo({
|
|
2328
2336
|
appName: a,
|
|
2329
2337
|
functionUniversalIdentifier: i,
|
|
2330
|
-
functionName:
|
|
2338
|
+
functionName: f
|
|
2331
2339
|
}) {
|
|
2332
|
-
const g = a ?? "Twenty Application", _ = i ||
|
|
2340
|
+
const g = a ?? "Twenty Application", _ = i || f ? `function "${i || f}"` : "functions";
|
|
2333
2341
|
console.log(
|
|
2334
2342
|
E.blue(`🚀 Watching ${g} ${_} logs:`)
|
|
2335
2343
|
), console.log("");
|
|
2336
2344
|
}
|
|
2337
2345
|
}
|
|
2338
|
-
class
|
|
2346
|
+
class Z0 {
|
|
2339
2347
|
constructor() {
|
|
2340
2348
|
this.configService = new Ae(), this.apiService = new Ct();
|
|
2341
2349
|
}
|
|
2342
2350
|
async execute(a) {
|
|
2343
2351
|
try {
|
|
2344
2352
|
let { workspace: i } = a;
|
|
2345
|
-
const
|
|
2346
|
-
if (
|
|
2353
|
+
const f = await this.configService.getAvailableWorkspaces(), g = await this.configService.getDefaultWorkspace();
|
|
2354
|
+
if (f.length === 0) {
|
|
2347
2355
|
console.log(
|
|
2348
2356
|
E.yellow(
|
|
2349
2357
|
"⚠ No workspaces configured. Use `twenty auth:login` to create one."
|
|
@@ -2352,7 +2360,7 @@ class j0 {
|
|
|
2352
2360
|
return;
|
|
2353
2361
|
}
|
|
2354
2362
|
if (!i) {
|
|
2355
|
-
const A =
|
|
2363
|
+
const A = f.map((P) => ({
|
|
2356
2364
|
name: P === g ? `${P} (current default)` : P,
|
|
2357
2365
|
value: P
|
|
2358
2366
|
}));
|
|
@@ -2366,9 +2374,9 @@ class j0 {
|
|
|
2366
2374
|
}
|
|
2367
2375
|
])).workspace;
|
|
2368
2376
|
}
|
|
2369
|
-
if (
|
|
2377
|
+
if (f.includes(i) || (console.log(
|
|
2370
2378
|
E.red(
|
|
2371
|
-
`✗ Workspace "${i}" not found. Available workspaces: ${
|
|
2379
|
+
`✗ Workspace "${i}" not found. Available workspaces: ${f.join(", ")}`
|
|
2372
2380
|
)
|
|
2373
2381
|
), process.exit(1)), i === g) {
|
|
2374
2382
|
console.log(
|
|
@@ -2397,19 +2405,15 @@ class j0 {
|
|
|
2397
2405
|
}
|
|
2398
2406
|
}
|
|
2399
2407
|
}
|
|
2400
|
-
var Ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2401
|
-
function z0(f) {
|
|
2402
|
-
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
2403
|
-
}
|
|
2404
2408
|
var Fs, hu;
|
|
2405
|
-
function
|
|
2409
|
+
function X0() {
|
|
2406
2410
|
if (hu) return Fs;
|
|
2407
2411
|
hu = 1;
|
|
2408
|
-
var
|
|
2409
|
-
|
|
2410
|
-
er + "+" + nr + "(?=" + [fe,
|
|
2411
|
-
|
|
2412
|
-
|
|
2412
|
+
var l = "[object Symbol]", a = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, f = "\\ud800-\\udfff", g = "\\u0300-\\u036f\\ufe20-\\ufe23", _ = "\\u20d0-\\u20f0", S = "\\u2700-\\u27bf", A = "a-z\\xdf-\\xf6\\xf8-\\xff", I = "\\xac\\xb1\\xd7\\xf7", P = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", z = "\\u2000-\\u206f", G = " \\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", j = "A-Z\\xc0-\\xd6\\xd8-\\xde", B = "\\ufe0e\\ufe0f", ae = I + P + z + G, Oe = "['’]", fe = "[" + ae + "]", Le = "[" + g + _ + "]", Ft = "\\d+", Fe = "[" + S + "]", T = "[" + A + "]", Y = "[^" + f + ae + Ft + S + A + j + "]", K = "\\ud83c[\\udffb-\\udfff]", ne = "(?:" + Le + "|" + K + ")", qe = "[^" + f + "]", ee = "(?:\\ud83c[\\udde6-\\uddff]){2}", Kt = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ge = "[" + j + "]", ht = "\\u200d", Tt = "(?:" + T + "|" + Y + ")", er = "(?:" + Ge + "|" + Y + ")", tr = "(?:" + Oe + "(?:d|ll|m|re|s|t|ve))?", nr = "(?:" + Oe + "(?:D|LL|M|RE|S|T|VE))?", at = ne + "?", Ve = "[" + B + "]?", ei = "(?:" + ht + "(?:" + [qe, ee, Kt].join("|") + ")" + Ve + at + ")*", cn = Ve + at + ei, He = "(?:" + [Fe, ee, Kt].join("|") + ")" + cn, ti = RegExp(Oe, "g"), ni = RegExp(Le, "g"), ri = RegExp([
|
|
2413
|
+
Ge + "?" + T + "+" + tr + "(?=" + [fe, Ge, "$"].join("|") + ")",
|
|
2414
|
+
er + "+" + nr + "(?=" + [fe, Ge + Tt, "$"].join("|") + ")",
|
|
2415
|
+
Ge + "?" + Tt + "+" + tr,
|
|
2416
|
+
Ge + "+" + nr,
|
|
2413
2417
|
Ft,
|
|
2414
2418
|
He
|
|
2415
2419
|
].join("|"), "g"), It = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, ln = {
|
|
@@ -2620,14 +2624,14 @@ function J0() {
|
|
|
2620
2624
|
};
|
|
2621
2625
|
}
|
|
2622
2626
|
var rr = hn(ln);
|
|
2623
|
-
function
|
|
2627
|
+
function Me(O) {
|
|
2624
2628
|
return It.test(O);
|
|
2625
2629
|
}
|
|
2626
2630
|
function Yt(O) {
|
|
2627
2631
|
return O.match(ri) || [];
|
|
2628
2632
|
}
|
|
2629
2633
|
var ai = Object.prototype, et = ai.toString, Ln = Jt.Symbol, ir = Ln ? Ln.prototype : void 0, Rt = ir ? ir.toString : void 0;
|
|
2630
|
-
function
|
|
2634
|
+
function Ue(O) {
|
|
2631
2635
|
if (typeof O == "string")
|
|
2632
2636
|
return O;
|
|
2633
2637
|
if (oi(O))
|
|
@@ -2644,10 +2648,10 @@ function J0() {
|
|
|
2644
2648
|
return !!O && typeof O == "object";
|
|
2645
2649
|
}
|
|
2646
2650
|
function oi(O) {
|
|
2647
|
-
return typeof O == "symbol" || pn(O) && et.call(O) ==
|
|
2651
|
+
return typeof O == "symbol" || pn(O) && et.call(O) == l;
|
|
2648
2652
|
}
|
|
2649
2653
|
function Pt(O) {
|
|
2650
|
-
return O == null ? "" :
|
|
2654
|
+
return O == null ? "" : Ue(O);
|
|
2651
2655
|
}
|
|
2652
2656
|
function ui(O) {
|
|
2653
2657
|
return O = Pt(O), O && O.replace(i, rr).replace(ni, "");
|
|
@@ -2656,16 +2660,16 @@ function J0() {
|
|
|
2656
2660
|
return O + (ot ? "-" : "") + he.toLowerCase();
|
|
2657
2661
|
});
|
|
2658
2662
|
function Ot(O, he, ot) {
|
|
2659
|
-
return O = Pt(O), he = he, he === void 0 ?
|
|
2663
|
+
return O = Pt(O), he = he, he === void 0 ? Me(O) ? Yt(O) : fn(O) : O.match(he) || [];
|
|
2660
2664
|
}
|
|
2661
2665
|
return Fs = Xt, Fs;
|
|
2662
2666
|
}
|
|
2663
|
-
var
|
|
2664
|
-
const Rn = /* @__PURE__ */
|
|
2665
|
-
name:
|
|
2667
|
+
var Q0 = X0();
|
|
2668
|
+
const Rn = /* @__PURE__ */ bm(Q0), V0 = ({
|
|
2669
|
+
name: l,
|
|
2666
2670
|
universalIdentifier: a = Vn()
|
|
2667
2671
|
}) => {
|
|
2668
|
-
const i = Rn(
|
|
2672
|
+
const i = Rn(l);
|
|
2669
2673
|
return `import { defineFrontComponent } from 'twenty-sdk';
|
|
2670
2674
|
|
|
2671
2675
|
// React component - implement your UI here
|
|
@@ -2685,11 +2689,11 @@ export default defineFrontComponent({
|
|
|
2685
2689
|
component: Component,
|
|
2686
2690
|
});
|
|
2687
2691
|
`;
|
|
2688
|
-
},
|
|
2689
|
-
name:
|
|
2692
|
+
}, ev = ({
|
|
2693
|
+
name: l,
|
|
2690
2694
|
universalIdentifier: a = Vn()
|
|
2691
2695
|
}) => {
|
|
2692
|
-
const i = Rn(
|
|
2696
|
+
const i = Rn(l);
|
|
2693
2697
|
return `import { defineLogicFunction } from 'twenty-sdk';
|
|
2694
2698
|
|
|
2695
2699
|
// Logic function handler - rename and implement your logic
|
|
@@ -2739,30 +2743,30 @@ var Qn = { exports: {} };
|
|
|
2739
2743
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2740
2744
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2741
2745
|
*/
|
|
2742
|
-
var
|
|
2743
|
-
function
|
|
2744
|
-
return pu || (pu = 1, function(
|
|
2746
|
+
var tv = Qn.exports, pu;
|
|
2747
|
+
function nv() {
|
|
2748
|
+
return pu || (pu = 1, function(l, a) {
|
|
2745
2749
|
(function() {
|
|
2746
|
-
var i,
|
|
2750
|
+
var i, f = "4.17.21", g = 200, _ = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", S = "Expected a function", A = "Invalid `variable` option passed into `_.template`", I = "__lodash_hash_undefined__", P = 500, z = "__lodash_placeholder__", G = 1, j = 2, B = 4, ae = 1, Oe = 2, fe = 1, Le = 2, Ft = 4, Fe = 8, T = 16, Y = 32, K = 64, ne = 128, qe = 256, ee = 512, Kt = 30, Ge = "...", ht = 800, Tt = 16, er = 1, tr = 2, nr = 3, at = 1 / 0, Ve = 9007199254740991, ei = 17976931348623157e292, cn = NaN, He = 4294967295, ti = He - 1, ni = He >>> 1, ri = [
|
|
2747
2751
|
["ary", ne],
|
|
2748
2752
|
["bind", fe],
|
|
2749
|
-
["bindKey",
|
|
2753
|
+
["bindKey", Le],
|
|
2750
2754
|
["curry", Fe],
|
|
2751
2755
|
["curryRight", T],
|
|
2752
2756
|
["flip", ee],
|
|
2753
2757
|
["partial", Y],
|
|
2754
|
-
["partialRight",
|
|
2755
|
-
["rearg",
|
|
2756
|
-
], It = "[object Arguments]", ln = "[object Array]", ii = "[object AsyncFunction]", zt = "[object Boolean]", Jt = "[object Date]", si = "[object DOMException]", fn = "[object Error]", hn = "[object Function]", rr = "[object GeneratorFunction]",
|
|
2757
|
-
dn + "?" +
|
|
2758
|
+
["partialRight", K],
|
|
2759
|
+
["rearg", qe]
|
|
2760
|
+
], It = "[object Arguments]", ln = "[object Array]", ii = "[object AsyncFunction]", zt = "[object Boolean]", Jt = "[object Date]", si = "[object DOMException]", fn = "[object Error]", hn = "[object Function]", rr = "[object GeneratorFunction]", Me = "[object Map]", Yt = "[object Number]", ai = "[object Null]", et = "[object Object]", Ln = "[object Promise]", ir = "[object Proxy]", Rt = "[object RegExp]", Ue = "[object Set]", Zt = "[object String]", pn = "[object Symbol]", oi = "[object Undefined]", Pt = "[object WeakMap]", ui = "[object WeakSet]", Xt = "[object ArrayBuffer]", Ot = "[object DataView]", O = "[object Float32Array]", he = "[object Float64Array]", ot = "[object Int8Array]", sr = "[object Int16Array]", Qt = "[object Int32Array]", Mn = "[object Uint8Array]", ci = "[object Uint8ClampedArray]", li = "[object Uint16Array]", fi = "[object Uint32Array]", Cu = /\b__p \+= '';/g, Fu = /\b(__p \+=) '' \+/g, Tu = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Ps = /&(?:amp|lt|gt|quot|#39);/g, Os = /[&<>"']/g, Iu = RegExp(Ps.source), Ru = RegExp(Os.source), Pu = /<%-([\s\S]+?)%>/g, Ou = /<%([\s\S]+?)%>/g, Ls = /<%=([\s\S]+?)%>/g, Lu = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mu = /^\w*$/, Uu = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, hi = /[\\^$.*+?()[\]{}|]/g, Nu = RegExp(hi.source), pi = /^\s+/, Wu = /\s/, Du = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, $u = /\{\n\/\* \[wrapped with (.+)\] \*/, Bu = /,? & /, ku = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, qu = /[()=,{}\[\]\/\s]/, Gu = /\\(\\)?/g, Hu = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ms = /\w*$/, ju = /^[-+]0x[0-9a-f]+$/i, Ku = /^0b[01]+$/i, zu = /^\[object .+?Constructor\]$/, Ju = /^0o[0-7]+$/i, Yu = /^(?:0|[1-9]\d*)$/, Zu = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ar = /($^)/, Xu = /['\n\r\u2028\u2029\\]/g, or = "\\ud800-\\udfff", Qu = "\\u0300-\\u036f", Vu = "\\ufe20-\\ufe2f", ec = "\\u20d0-\\u20ff", Us = Qu + Vu + ec, Ns = "\\u2700-\\u27bf", Ws = "a-z\\xdf-\\xf6\\xf8-\\xff", tc = "\\xac\\xb1\\xd7\\xf7", nc = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rc = "\\u2000-\\u206f", ic = " \\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", Ds = "A-Z\\xc0-\\xd6\\xd8-\\xde", $s = "\\ufe0e\\ufe0f", Bs = tc + nc + rc + ic, di = "['’]", sc = "[" + or + "]", ks = "[" + Bs + "]", ur = "[" + Us + "]", qs = "\\d+", ac = "[" + Ns + "]", Gs = "[" + Ws + "]", Hs = "[^" + or + Bs + qs + Ns + Ws + Ds + "]", gi = "\\ud83c[\\udffb-\\udfff]", oc = "(?:" + ur + "|" + gi + ")", js = "[^" + or + "]", mi = "(?:\\ud83c[\\udde6-\\uddff]){2}", vi = "[\\ud800-\\udbff][\\udc00-\\udfff]", dn = "[" + Ds + "]", Ks = "\\u200d", zs = "(?:" + Gs + "|" + Hs + ")", uc = "(?:" + dn + "|" + Hs + ")", Js = "(?:" + di + "(?:d|ll|m|re|s|t|ve))?", Ys = "(?:" + di + "(?:D|LL|M|RE|S|T|VE))?", Zs = oc + "?", Xs = "[" + $s + "]?", cc = "(?:" + Ks + "(?:" + [js, mi, vi].join("|") + ")" + Xs + Zs + ")*", lc = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", fc = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Qs = Xs + Zs + cc, hc = "(?:" + [ac, mi, vi].join("|") + ")" + Qs, pc = "(?:" + [js + ur + "?", ur, mi, vi, sc].join("|") + ")", dc = RegExp(di, "g"), gc = RegExp(ur, "g"), _i = RegExp(gi + "(?=" + gi + ")|" + pc + Qs, "g"), mc = RegExp([
|
|
2761
|
+
dn + "?" + Gs + "+" + Js + "(?=" + [ks, dn, "$"].join("|") + ")",
|
|
2758
2762
|
uc + "+" + Ys + "(?=" + [ks, dn + zs, "$"].join("|") + ")",
|
|
2759
2763
|
dn + "?" + zs + "+" + Js,
|
|
2760
2764
|
dn + "+" + Ys,
|
|
2761
2765
|
fc,
|
|
2762
2766
|
lc,
|
|
2763
|
-
|
|
2767
|
+
qs,
|
|
2764
2768
|
hc
|
|
2765
|
-
].join("|"), "g"), vc = RegExp("[" +
|
|
2769
|
+
].join("|"), "g"), vc = RegExp("[" + Ks + or + Us + $s + "]"), _c = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, wc = [
|
|
2766
2770
|
"Array",
|
|
2767
2771
|
"Buffer",
|
|
2768
2772
|
"DataView",
|
|
@@ -2794,9 +2798,9 @@ function V0() {
|
|
|
2794
2798
|
"parseInt",
|
|
2795
2799
|
"setTimeout"
|
|
2796
2800
|
], yc = -1, re = {};
|
|
2797
|
-
re[O] = re[he] = re[ot] = re[sr] = re[Qt] = re[Mn] = re[ci] = re[li] = re[fi] = !0, re[It] = re[ln] = re[Xt] = re[zt] = re[Ot] = re[Jt] = re[fn] = re[hn] = re[
|
|
2801
|
+
re[O] = re[he] = re[ot] = re[sr] = re[Qt] = re[Mn] = re[ci] = re[li] = re[fi] = !0, re[It] = re[ln] = re[Xt] = re[zt] = re[Ot] = re[Jt] = re[fn] = re[hn] = re[Me] = re[Yt] = re[et] = re[Rt] = re[Ue] = re[Zt] = re[Pt] = !1;
|
|
2798
2802
|
var te = {};
|
|
2799
|
-
te[It] = te[ln] = te[Xt] = te[Ot] = te[zt] = te[Jt] = te[O] = te[he] = te[ot] = te[sr] = te[Qt] = te[
|
|
2803
|
+
te[It] = te[ln] = te[Xt] = te[Ot] = te[zt] = te[Jt] = te[O] = te[he] = te[ot] = te[sr] = te[Qt] = te[Me] = te[Yt] = te[et] = te[Rt] = te[Ue] = te[Zt] = te[pn] = te[Mn] = te[ci] = te[li] = te[fi] = !0, te[fn] = te[hn] = te[Pt] = !1;
|
|
2800
2804
|
var xc = {
|
|
2801
2805
|
// Latin-1 Supplement block.
|
|
2802
2806
|
À: "A",
|
|
@@ -3009,14 +3013,14 @@ function V0() {
|
|
|
3009
3013
|
"\r": "r",
|
|
3010
3014
|
"\u2028": "u2028",
|
|
3011
3015
|
"\u2029": "u2029"
|
|
3012
|
-
}, bc = parseFloat, Cc = parseInt, Vs = typeof Ht == "object" && Ht && Ht.Object === Object && Ht, Fc = typeof self == "object" && self && self.Object === Object && self, _e = Vs || Fc || Function("return this")(), wi = a && !a.nodeType && a, Vt = wi && !0 &&
|
|
3016
|
+
}, bc = parseFloat, Cc = parseInt, Vs = typeof Ht == "object" && Ht && Ht.Object === Object && Ht, Fc = typeof self == "object" && self && self.Object === Object && self, _e = Vs || Fc || Function("return this")(), wi = a && !a.nodeType && a, Vt = wi && !0 && l && !l.nodeType && l, ea = Vt && Vt.exports === wi, yi = ea && Vs.process, je = function() {
|
|
3013
3017
|
try {
|
|
3014
3018
|
var p = Vt && Vt.require && Vt.require("util").types;
|
|
3015
3019
|
return p || yi && yi.binding && yi.binding("util");
|
|
3016
3020
|
} catch {
|
|
3017
3021
|
}
|
|
3018
|
-
}(), ta =
|
|
3019
|
-
function
|
|
3022
|
+
}(), ta = je && je.isArrayBuffer, na = je && je.isDate, ra = je && je.isMap, ia = je && je.isRegExp, sa = je && je.isSet, aa = je && je.isTypedArray;
|
|
3023
|
+
function Ne(p, v, m) {
|
|
3020
3024
|
switch (m.length) {
|
|
3021
3025
|
case 0:
|
|
3022
3026
|
return p.call(v);
|
|
@@ -3036,7 +3040,7 @@ function V0() {
|
|
|
3036
3040
|
}
|
|
3037
3041
|
return C;
|
|
3038
3042
|
}
|
|
3039
|
-
function
|
|
3043
|
+
function Ke(p, v) {
|
|
3040
3044
|
for (var m = -1, C = p == null ? 0 : p.length; ++m < C && v(p[m], m, p) !== !1; )
|
|
3041
3045
|
;
|
|
3042
3046
|
return p;
|
|
@@ -3118,7 +3122,7 @@ function V0() {
|
|
|
3118
3122
|
return -1;
|
|
3119
3123
|
}
|
|
3120
3124
|
function gn(p, v, m) {
|
|
3121
|
-
return v === v ?
|
|
3125
|
+
return v === v ? jc(p, v, m) : lr(p, ca, m);
|
|
3122
3126
|
}
|
|
3123
3127
|
function Mc(p, v, m, C) {
|
|
3124
3128
|
for (var U = m - 1, J = p.length; ++U < J; )
|
|
@@ -3174,7 +3178,7 @@ function V0() {
|
|
|
3174
3178
|
function ha(p) {
|
|
3175
3179
|
return p && p.slice(0, ma(p) + 1).replace(pi, "");
|
|
3176
3180
|
}
|
|
3177
|
-
function
|
|
3181
|
+
function We(p) {
|
|
3178
3182
|
return function(v) {
|
|
3179
3183
|
return p(v);
|
|
3180
3184
|
};
|
|
@@ -3212,10 +3216,10 @@ function V0() {
|
|
|
3212
3216
|
function mn(p) {
|
|
3213
3217
|
return vc.test(p);
|
|
3214
3218
|
}
|
|
3215
|
-
function
|
|
3219
|
+
function qc(p) {
|
|
3216
3220
|
return _c.test(p);
|
|
3217
3221
|
}
|
|
3218
|
-
function
|
|
3222
|
+
function Gc(p) {
|
|
3219
3223
|
for (var v, m = []; !(v = p.next()).done; )
|
|
3220
3224
|
m.push(v.value);
|
|
3221
3225
|
return m;
|
|
@@ -3250,13 +3254,13 @@ function V0() {
|
|
|
3250
3254
|
m[++v] = [C, C];
|
|
3251
3255
|
}), m;
|
|
3252
3256
|
}
|
|
3253
|
-
function
|
|
3257
|
+
function jc(p, v, m) {
|
|
3254
3258
|
for (var C = m - 1, U = p.length; ++C < U; )
|
|
3255
3259
|
if (p[C] === v)
|
|
3256
3260
|
return C;
|
|
3257
3261
|
return -1;
|
|
3258
3262
|
}
|
|
3259
|
-
function
|
|
3263
|
+
function Kc(p, v, m) {
|
|
3260
3264
|
for (var C = m + 1; C--; )
|
|
3261
3265
|
if (p[C] === v)
|
|
3262
3266
|
return C;
|
|
@@ -3300,7 +3304,7 @@ function V0() {
|
|
|
3300
3304
|
}
|
|
3301
3305
|
}(), il = v.clearTimeout !== _e.clearTimeout && v.clearTimeout, sl = C && C.now !== _e.Date.now && C.now, al = v.setTimeout !== _e.setTimeout && v.setTimeout, xr = pe.ceil, Sr = pe.floor, Pi = V.getOwnPropertySymbols, ol = mr ? mr.isBuffer : i, Sa = v.isFinite, ul = hr.join, cl = ga(V.keys, V), de = pe.max, xe = pe.min, ll = C.now, fl = v.parseInt, Aa = pe.random, hl = hr.reverse, Oi = an(v, "DataView"), Wn = an(v, "Map"), Li = an(v, "Promise"), yn = an(v, "Set"), Dn = an(v, "WeakMap"), $n = an(V, "create"), Ar = Dn && new Dn(), xn = {}, pl = on(Oi), dl = on(Wn), gl = on(Li), ml = on(yn), vl = on(Dn), Er = Nt ? Nt.prototype : i, Bn = Er ? Er.valueOf : i, Ea = Er ? Er.toString : i;
|
|
3302
3306
|
function o(e) {
|
|
3303
|
-
if (ue(e) && !N(e) && !(e instanceof
|
|
3307
|
+
if (ue(e) && !N(e) && !(e instanceof q)) {
|
|
3304
3308
|
if (e instanceof Je)
|
|
3305
3309
|
return e;
|
|
3306
3310
|
if (X.call(e, "__wrapped__"))
|
|
@@ -3371,16 +3375,16 @@ function V0() {
|
|
|
3371
3375
|
_: o
|
|
3372
3376
|
}
|
|
3373
3377
|
}, o.prototype = br.prototype, o.prototype.constructor = o, Je.prototype = Sn(br.prototype), Je.prototype.constructor = Je;
|
|
3374
|
-
function
|
|
3378
|
+
function q(e) {
|
|
3375
3379
|
this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = He, this.__views__ = [];
|
|
3376
3380
|
}
|
|
3377
3381
|
function _l() {
|
|
3378
|
-
var e = new
|
|
3379
|
-
return e.__actions__ =
|
|
3382
|
+
var e = new q(this.__wrapped__);
|
|
3383
|
+
return e.__actions__ = Te(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = Te(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = Te(this.__views__), e;
|
|
3380
3384
|
}
|
|
3381
3385
|
function wl() {
|
|
3382
3386
|
if (this.__filtered__) {
|
|
3383
|
-
var e = new
|
|
3387
|
+
var e = new q(this);
|
|
3384
3388
|
e.__dir__ = -1, e.__filtered__ = !0;
|
|
3385
3389
|
} else
|
|
3386
3390
|
e = this.clone(), e.__dir__ *= -1;
|
|
@@ -3395,11 +3399,11 @@ function V0() {
|
|
|
3395
3399
|
for (; d-- && b < F; ) {
|
|
3396
3400
|
w += t;
|
|
3397
3401
|
for (var D = -1, M = e[w]; ++D < x; ) {
|
|
3398
|
-
var k = y[D], H = k.iteratee,
|
|
3399
|
-
if (
|
|
3402
|
+
var k = y[D], H = k.iteratee, Be = k.type, Ce = H(M);
|
|
3403
|
+
if (Be == tr)
|
|
3400
3404
|
M = Ce;
|
|
3401
3405
|
else if (!Ce) {
|
|
3402
|
-
if (
|
|
3406
|
+
if (Be == er)
|
|
3403
3407
|
continue e;
|
|
3404
3408
|
break e;
|
|
3405
3409
|
}
|
|
@@ -3408,7 +3412,7 @@ function V0() {
|
|
|
3408
3412
|
}
|
|
3409
3413
|
return L;
|
|
3410
3414
|
}
|
|
3411
|
-
|
|
3415
|
+
q.prototype = Sn(br.prototype), q.prototype.constructor = q;
|
|
3412
3416
|
function tn(e) {
|
|
3413
3417
|
var t = -1, n = e == null ? 0 : e.length;
|
|
3414
3418
|
for (this.clear(); ++t < n; ) {
|
|
@@ -3527,7 +3531,7 @@ function V0() {
|
|
|
3527
3531
|
function kl(e) {
|
|
3528
3532
|
return this.__data__.has(e);
|
|
3529
3533
|
}
|
|
3530
|
-
function
|
|
3534
|
+
function ql(e, t) {
|
|
3531
3535
|
var n = this.__data__;
|
|
3532
3536
|
if (n instanceof pt) {
|
|
3533
3537
|
var r = n.__data__;
|
|
@@ -3537,7 +3541,7 @@ function V0() {
|
|
|
3537
3541
|
}
|
|
3538
3542
|
return n.set(e, t), this.size = n.size, this;
|
|
3539
3543
|
}
|
|
3540
|
-
nt.prototype.clear = Dl, nt.prototype.delete = $l, nt.prototype.get = Bl, nt.prototype.has = kl, nt.prototype.set =
|
|
3544
|
+
nt.prototype.clear = Dl, nt.prototype.delete = $l, nt.prototype.get = Bl, nt.prototype.has = kl, nt.prototype.set = ql;
|
|
3541
3545
|
function ba(e, t) {
|
|
3542
3546
|
var n = N(e), r = !n && un(e), s = !n && !r && kt(e), u = !n && !r && !s && Cn(e), c = n || r || s || u, h = c ? Fi(e.length, Qc) : [], d = h.length;
|
|
3543
3547
|
for (var w in e)
|
|
@@ -3552,11 +3556,11 @@ function V0() {
|
|
|
3552
3556
|
var t = e.length;
|
|
3553
3557
|
return t ? e[Hi(0, t - 1)] : i;
|
|
3554
3558
|
}
|
|
3555
|
-
function
|
|
3556
|
-
return $r(
|
|
3559
|
+
function Gl(e, t) {
|
|
3560
|
+
return $r(Te(e), rn(t, 0, e.length));
|
|
3557
3561
|
}
|
|
3558
3562
|
function Hl(e) {
|
|
3559
|
-
return $r(
|
|
3563
|
+
return $r(Te(e));
|
|
3560
3564
|
}
|
|
3561
3565
|
function Mi(e, t, n) {
|
|
3562
3566
|
(n !== i && !rt(e[t], n) || n === i && !(t in e)) && gt(e, t, n);
|
|
@@ -3571,16 +3575,16 @@ function V0() {
|
|
|
3571
3575
|
return n;
|
|
3572
3576
|
return -1;
|
|
3573
3577
|
}
|
|
3574
|
-
function
|
|
3578
|
+
function jl(e, t, n, r) {
|
|
3575
3579
|
return Wt(e, function(s, u, c) {
|
|
3576
3580
|
t(r, s, n(s), c);
|
|
3577
3581
|
}), r;
|
|
3578
3582
|
}
|
|
3579
3583
|
function Fa(e, t) {
|
|
3580
|
-
return e && ct(t,
|
|
3584
|
+
return e && ct(t, ve(t), e);
|
|
3581
3585
|
}
|
|
3582
|
-
function
|
|
3583
|
-
return e && ct(t,
|
|
3586
|
+
function Kl(e, t) {
|
|
3587
|
+
return e && ct(t, Re(t), e);
|
|
3584
3588
|
}
|
|
3585
3589
|
function gt(e, t, n) {
|
|
3586
3590
|
t == "__proto__" && yr ? yr(e, t, {
|
|
@@ -3599,7 +3603,7 @@ function V0() {
|
|
|
3599
3603
|
return e === e && (n !== i && (e = e <= n ? e : n), t !== i && (e = e >= t ? e : t)), e;
|
|
3600
3604
|
}
|
|
3601
3605
|
function Ye(e, t, n, r, s, u) {
|
|
3602
|
-
var c, h = t &
|
|
3606
|
+
var c, h = t & G, d = t & j, w = t & B;
|
|
3603
3607
|
if (n && (c = s ? n(e, r, s, u) : n(e)), c !== i)
|
|
3604
3608
|
return c;
|
|
3605
3609
|
if (!oe(e))
|
|
@@ -3607,14 +3611,14 @@ function V0() {
|
|
|
3607
3611
|
var y = N(e);
|
|
3608
3612
|
if (y) {
|
|
3609
3613
|
if (c = Uf(e), !h)
|
|
3610
|
-
return
|
|
3614
|
+
return Te(e, c);
|
|
3611
3615
|
} else {
|
|
3612
3616
|
var x = Se(e), b = x == hn || x == rr;
|
|
3613
3617
|
if (kt(e))
|
|
3614
3618
|
return Xa(e, h);
|
|
3615
3619
|
if (x == et || x == It || b && !s) {
|
|
3616
3620
|
if (c = d || b ? {} : vo(e), !h)
|
|
3617
|
-
return d ? Ef(e,
|
|
3621
|
+
return d ? Ef(e, Kl(c, e)) : Af(e, Fa(c, e));
|
|
3618
3622
|
} else {
|
|
3619
3623
|
if (!te[x])
|
|
3620
3624
|
return s ? e : {};
|
|
@@ -3625,18 +3629,18 @@ function V0() {
|
|
|
3625
3629
|
var F = u.get(e);
|
|
3626
3630
|
if (F)
|
|
3627
3631
|
return F;
|
|
3628
|
-
u.set(e, c),
|
|
3632
|
+
u.set(e, c), Ko(e) ? e.forEach(function(M) {
|
|
3629
3633
|
c.add(Ye(M, t, n, M, e, u));
|
|
3630
3634
|
}) : Ho(e) && e.forEach(function(M, k) {
|
|
3631
3635
|
c.set(k, Ye(M, t, n, k, e, u));
|
|
3632
3636
|
});
|
|
3633
|
-
var L = w ? d ? ts : es : d ?
|
|
3634
|
-
return
|
|
3637
|
+
var L = w ? d ? ts : es : d ? Re : ve, D = y ? i : L(e);
|
|
3638
|
+
return Ke(D || e, function(M, k) {
|
|
3635
3639
|
D && (k = M, M = e[k]), kn(c, k, Ye(M, t, n, k, e, u));
|
|
3636
3640
|
}), c;
|
|
3637
3641
|
}
|
|
3638
3642
|
function zl(e) {
|
|
3639
|
-
var t =
|
|
3643
|
+
var t = ve(e);
|
|
3640
3644
|
return function(n) {
|
|
3641
3645
|
return Ta(n, e, t);
|
|
3642
3646
|
};
|
|
@@ -3659,11 +3663,11 @@ function V0() {
|
|
|
3659
3663
|
e.apply(i, n);
|
|
3660
3664
|
}, t);
|
|
3661
3665
|
}
|
|
3662
|
-
function
|
|
3666
|
+
function qn(e, t, n, r) {
|
|
3663
3667
|
var s = -1, u = cr, c = !0, h = e.length, d = [], w = t.length;
|
|
3664
3668
|
if (!h)
|
|
3665
3669
|
return d;
|
|
3666
|
-
n && (t = se(t,
|
|
3670
|
+
n && (t = se(t, We(n))), r ? (u = xi, c = !1) : t.length >= g && (u = Un, c = !1, t = new nn(t));
|
|
3667
3671
|
e:
|
|
3668
3672
|
for (; ++s < h; ) {
|
|
3669
3673
|
var y = e[s], x = n == null ? y : n(y);
|
|
@@ -3686,7 +3690,7 @@ function V0() {
|
|
|
3686
3690
|
function Fr(e, t, n) {
|
|
3687
3691
|
for (var r = -1, s = e.length; ++r < s; ) {
|
|
3688
3692
|
var u = e[r], c = t(u);
|
|
3689
|
-
if (c != null && (h === i ? c === c &&
|
|
3693
|
+
if (c != null && (h === i ? c === c && !$e(c) : n(c, h)))
|
|
3690
3694
|
var h = c, d = u;
|
|
3691
3695
|
}
|
|
3692
3696
|
return d;
|
|
@@ -3713,10 +3717,10 @@ function V0() {
|
|
|
3713
3717
|
}
|
|
3714
3718
|
var Ni = ro(), Oa = ro(!0);
|
|
3715
3719
|
function ut(e, t) {
|
|
3716
|
-
return e && Ni(e, t,
|
|
3720
|
+
return e && Ni(e, t, ve);
|
|
3717
3721
|
}
|
|
3718
3722
|
function Wi(e, t) {
|
|
3719
|
-
return e && Oa(e, t,
|
|
3723
|
+
return e && Oa(e, t, ve);
|
|
3720
3724
|
}
|
|
3721
3725
|
function Tr(e, t) {
|
|
3722
3726
|
return Lt(t, function(n) {
|
|
@@ -3734,7 +3738,7 @@ function V0() {
|
|
|
3734
3738
|
return N(e) ? r : Mt(r, n(e));
|
|
3735
3739
|
}
|
|
3736
3740
|
function Ee(e) {
|
|
3737
|
-
return e == null ? e === i ? oi : ai : en && en in V(e) ? Of(e) :
|
|
3741
|
+
return e == null ? e === i ? oi : ai : en && en in V(e) ? Of(e) : jf(e);
|
|
3738
3742
|
}
|
|
3739
3743
|
function Di(e, t) {
|
|
3740
3744
|
return e > t;
|
|
@@ -3751,7 +3755,7 @@ function V0() {
|
|
|
3751
3755
|
function $i(e, t, n) {
|
|
3752
3756
|
for (var r = n ? xi : cr, s = e[0].length, u = e.length, c = u, h = m(u), d = 1 / 0, w = []; c--; ) {
|
|
3753
3757
|
var y = e[c];
|
|
3754
|
-
c && t && (y = se(y,
|
|
3758
|
+
c && t && (y = se(y, We(t))), d = xe(y.length, d), h[c] = !n && (t || s >= 120 && y.length >= 120) ? new nn(c && y) : i;
|
|
3755
3759
|
}
|
|
3756
3760
|
y = e[0];
|
|
3757
3761
|
var x = -1, b = h[0];
|
|
@@ -3774,10 +3778,10 @@ function V0() {
|
|
|
3774
3778
|
t(r, n(s), u, c);
|
|
3775
3779
|
}), r;
|
|
3776
3780
|
}
|
|
3777
|
-
function
|
|
3781
|
+
function Gn(e, t, n) {
|
|
3778
3782
|
t = $t(t, e), e = xo(e, t);
|
|
3779
3783
|
var r = e == null ? e : e[lt(Xe(t))];
|
|
3780
|
-
return r == null ? i :
|
|
3784
|
+
return r == null ? i : Ne(r, e, n);
|
|
3781
3785
|
}
|
|
3782
3786
|
function Ma(e) {
|
|
3783
3787
|
return ue(e) && Ee(e) == It;
|
|
@@ -3812,7 +3816,7 @@ function V0() {
|
|
|
3812
3816
|
return b ? (u || (u = new nt()), Pf(e, t, n, r, s, u)) : !1;
|
|
3813
3817
|
}
|
|
3814
3818
|
function rf(e) {
|
|
3815
|
-
return ue(e) && Se(e) ==
|
|
3819
|
+
return ue(e) && Se(e) == Me;
|
|
3816
3820
|
}
|
|
3817
3821
|
function Bi(e, t, n, r) {
|
|
3818
3822
|
var s = n.length, u = s, c = !r;
|
|
@@ -3833,7 +3837,7 @@ function V0() {
|
|
|
3833
3837
|
var x = new nt();
|
|
3834
3838
|
if (r)
|
|
3835
3839
|
var b = r(w, y, d, e, t, x);
|
|
3836
|
-
if (!(b === i ? Hn(y, w, ae |
|
|
3840
|
+
if (!(b === i ? Hn(y, w, ae | Oe, r, x) : b))
|
|
3837
3841
|
return !1;
|
|
3838
3842
|
}
|
|
3839
3843
|
}
|
|
@@ -3849,13 +3853,13 @@ function V0() {
|
|
|
3849
3853
|
return ue(e) && Ee(e) == Rt;
|
|
3850
3854
|
}
|
|
3851
3855
|
function af(e) {
|
|
3852
|
-
return ue(e) && Se(e) ==
|
|
3856
|
+
return ue(e) && Se(e) == Ue;
|
|
3853
3857
|
}
|
|
3854
3858
|
function of(e) {
|
|
3855
|
-
return ue(e) &&
|
|
3859
|
+
return ue(e) && jr(e.length) && !!re[Ee(e)];
|
|
3856
3860
|
}
|
|
3857
3861
|
function Na(e) {
|
|
3858
|
-
return typeof e == "function" ? e : e == null ?
|
|
3862
|
+
return typeof e == "function" ? e : e == null ? Pe : typeof e == "object" ? N(e) ? $a(e[0], e[1]) : Da(e) : su(e);
|
|
3859
3863
|
}
|
|
3860
3864
|
function ki(e) {
|
|
3861
3865
|
if (!zn(e))
|
|
@@ -3873,11 +3877,11 @@ function V0() {
|
|
|
3873
3877
|
r == "constructor" && (t || !X.call(e, r)) || n.push(r);
|
|
3874
3878
|
return n;
|
|
3875
3879
|
}
|
|
3876
|
-
function
|
|
3880
|
+
function qi(e, t) {
|
|
3877
3881
|
return e < t;
|
|
3878
3882
|
}
|
|
3879
3883
|
function Wa(e, t) {
|
|
3880
|
-
var n = -1, r =
|
|
3884
|
+
var n = -1, r = Ie(e) ? m(e.length) : [];
|
|
3881
3885
|
return Wt(e, function(s, u, c) {
|
|
3882
3886
|
r[++n] = t(s, u, c);
|
|
3883
3887
|
}), r;
|
|
@@ -3891,7 +3895,7 @@ function V0() {
|
|
|
3891
3895
|
function $a(e, t) {
|
|
3892
3896
|
return ss(e) && _o(t) ? wo(lt(e), t) : function(n) {
|
|
3893
3897
|
var r = gs(n, e);
|
|
3894
|
-
return r === i && r === t ? ms(n, e) : Hn(t, r, ae |
|
|
3898
|
+
return r === i && r === t ? ms(n, e) : Hn(t, r, ae | Oe);
|
|
3895
3899
|
};
|
|
3896
3900
|
}
|
|
3897
3901
|
function Ir(e, t, n, r, s) {
|
|
@@ -3902,7 +3906,7 @@ function V0() {
|
|
|
3902
3906
|
var h = r ? r(os(e, c), u, c + "", e, t, s) : i;
|
|
3903
3907
|
h === i && (h = u), Mi(e, c, h);
|
|
3904
3908
|
}
|
|
3905
|
-
},
|
|
3909
|
+
}, Re);
|
|
3906
3910
|
}
|
|
3907
3911
|
function cf(e, t, n, r, s, u, c) {
|
|
3908
3912
|
var h = os(e, n), d = os(t, n), w = c.get(d);
|
|
@@ -3913,7 +3917,7 @@ function V0() {
|
|
|
3913
3917
|
var y = u ? u(h, d, n + "", e, t, c) : i, x = y === i;
|
|
3914
3918
|
if (x) {
|
|
3915
3919
|
var b = N(d), F = !b && kt(d), L = !b && !F && Cn(d);
|
|
3916
|
-
y = d, b || F || L ? N(h) ? y = h : ce(h) ? y =
|
|
3920
|
+
y = d, b || F || L ? N(h) ? y = h : ce(h) ? y = Te(h) : F ? (x = !1, y = Xa(d, !0)) : L ? (x = !1, y = Qa(d, !0)) : y = [] : Yn(d) || un(d) ? (y = h, un(h) ? y = Yo(h) : (!oe(h) || wt(h)) && (y = vo(d))) : x = !1;
|
|
3917
3921
|
}
|
|
3918
3922
|
x && (c.set(d, y), s(y, d, r, u, c), c.delete(d)), Mi(e, n, y);
|
|
3919
3923
|
}
|
|
@@ -3927,9 +3931,9 @@ function V0() {
|
|
|
3927
3931
|
return N(u) ? function(c) {
|
|
3928
3932
|
return sn(c, u.length === 1 ? u[0] : u);
|
|
3929
3933
|
} : u;
|
|
3930
|
-
}) : t = [
|
|
3934
|
+
}) : t = [Pe];
|
|
3931
3935
|
var r = -1;
|
|
3932
|
-
t = se(t,
|
|
3936
|
+
t = se(t, We(R()));
|
|
3933
3937
|
var s = Wa(e, function(u, c, h) {
|
|
3934
3938
|
var d = se(t, function(w) {
|
|
3935
3939
|
return w(u);
|
|
@@ -3941,14 +3945,14 @@ function V0() {
|
|
|
3941
3945
|
});
|
|
3942
3946
|
}
|
|
3943
3947
|
function lf(e, t) {
|
|
3944
|
-
return
|
|
3948
|
+
return qa(e, t, function(n, r) {
|
|
3945
3949
|
return ms(e, r);
|
|
3946
3950
|
});
|
|
3947
3951
|
}
|
|
3948
|
-
function
|
|
3952
|
+
function qa(e, t, n) {
|
|
3949
3953
|
for (var r = -1, s = t.length, u = {}; ++r < s; ) {
|
|
3950
3954
|
var c = t[r], h = sn(e, c);
|
|
3951
|
-
n(h, c) &&
|
|
3955
|
+
n(h, c) && jn(u, $t(c, e), h);
|
|
3952
3956
|
}
|
|
3953
3957
|
return u;
|
|
3954
3958
|
}
|
|
@@ -3957,14 +3961,14 @@ function V0() {
|
|
|
3957
3961
|
return sn(t, e);
|
|
3958
3962
|
};
|
|
3959
3963
|
}
|
|
3960
|
-
function
|
|
3964
|
+
function Gi(e, t, n, r) {
|
|
3961
3965
|
var s = r ? Mc : gn, u = -1, c = t.length, h = e;
|
|
3962
|
-
for (e === t && (t =
|
|
3966
|
+
for (e === t && (t = Te(t)), n && (h = se(e, We(n))); ++u < c; )
|
|
3963
3967
|
for (var d = 0, w = t[u], y = n ? n(w) : w; (d = s(h, y, d, r)) > -1; )
|
|
3964
3968
|
h !== e && wr.call(h, d, 1), wr.call(e, d, 1);
|
|
3965
3969
|
return e;
|
|
3966
3970
|
}
|
|
3967
|
-
function
|
|
3971
|
+
function Ga(e, t) {
|
|
3968
3972
|
for (var n = e ? t.length : 0, r = n - 1; n--; ) {
|
|
3969
3973
|
var s = t[n];
|
|
3970
3974
|
if (n == r || s !== u) {
|
|
@@ -3982,7 +3986,7 @@ function V0() {
|
|
|
3982
3986
|
c[r ? u : ++s] = e, e += n;
|
|
3983
3987
|
return c;
|
|
3984
3988
|
}
|
|
3985
|
-
function
|
|
3989
|
+
function ji(e, t) {
|
|
3986
3990
|
var n = "";
|
|
3987
3991
|
if (!e || t < 1 || t > Ve)
|
|
3988
3992
|
return n;
|
|
@@ -3992,7 +3996,7 @@ function V0() {
|
|
|
3992
3996
|
return n;
|
|
3993
3997
|
}
|
|
3994
3998
|
function $(e, t) {
|
|
3995
|
-
return us(yo(e, t,
|
|
3999
|
+
return us(yo(e, t, Pe), e + "");
|
|
3996
4000
|
}
|
|
3997
4001
|
function pf(e) {
|
|
3998
4002
|
return Ca(Fn(e));
|
|
@@ -4001,7 +4005,7 @@ function V0() {
|
|
|
4001
4005
|
var n = Fn(e);
|
|
4002
4006
|
return $r(n, rn(t, 0, n.length));
|
|
4003
4007
|
}
|
|
4004
|
-
function
|
|
4008
|
+
function jn(e, t, n, r) {
|
|
4005
4009
|
if (!oe(e))
|
|
4006
4010
|
return e;
|
|
4007
4011
|
t = $t(t, e);
|
|
@@ -4019,14 +4023,14 @@ function V0() {
|
|
|
4019
4023
|
}
|
|
4020
4024
|
var Ha = Ar ? function(e, t) {
|
|
4021
4025
|
return Ar.set(e, t), e;
|
|
4022
|
-
} :
|
|
4026
|
+
} : Pe, gf = yr ? function(e, t) {
|
|
4023
4027
|
return yr(e, "toString", {
|
|
4024
4028
|
configurable: !0,
|
|
4025
4029
|
enumerable: !1,
|
|
4026
4030
|
value: _s(t),
|
|
4027
4031
|
writable: !0
|
|
4028
4032
|
});
|
|
4029
|
-
} :
|
|
4033
|
+
} : Pe;
|
|
4030
4034
|
function mf(e) {
|
|
4031
4035
|
return $r(Fn(e));
|
|
4032
4036
|
}
|
|
@@ -4048,19 +4052,19 @@ function V0() {
|
|
|
4048
4052
|
if (typeof t == "number" && t === t && s <= ni) {
|
|
4049
4053
|
for (; r < s; ) {
|
|
4050
4054
|
var u = r + s >>> 1, c = e[u];
|
|
4051
|
-
c !== null &&
|
|
4055
|
+
c !== null && !$e(c) && (n ? c <= t : c < t) ? r = u + 1 : s = u;
|
|
4052
4056
|
}
|
|
4053
4057
|
return s;
|
|
4054
4058
|
}
|
|
4055
|
-
return
|
|
4059
|
+
return Ki(e, t, Pe, n);
|
|
4056
4060
|
}
|
|
4057
|
-
function
|
|
4061
|
+
function Ki(e, t, n, r) {
|
|
4058
4062
|
var s = 0, u = e == null ? 0 : e.length;
|
|
4059
4063
|
if (u === 0)
|
|
4060
4064
|
return 0;
|
|
4061
4065
|
t = n(t);
|
|
4062
|
-
for (var c = t !== t, h = t === null, d =
|
|
4063
|
-
var y = Sr((s + u) / 2), x = n(e[y]), b = x !== i, F = x === null, L = x === x, D =
|
|
4066
|
+
for (var c = t !== t, h = t === null, d = $e(t), w = t === i; s < u; ) {
|
|
4067
|
+
var y = Sr((s + u) / 2), x = n(e[y]), b = x !== i, F = x === null, L = x === x, D = $e(x);
|
|
4064
4068
|
if (c)
|
|
4065
4069
|
var M = r || L;
|
|
4066
4070
|
else w ? M = L && (r || b) : h ? M = L && b && (r || !F) : d ? M = L && b && !F && (r || !D) : F || D ? M = !1 : M = r ? x <= t : x < t;
|
|
@@ -4068,7 +4072,7 @@ function V0() {
|
|
|
4068
4072
|
}
|
|
4069
4073
|
return xe(u, ti);
|
|
4070
4074
|
}
|
|
4071
|
-
function
|
|
4075
|
+
function ja(e, t) {
|
|
4072
4076
|
for (var n = -1, r = e.length, s = 0, u = []; ++n < r; ) {
|
|
4073
4077
|
var c = e[n], h = t ? t(c) : c;
|
|
4074
4078
|
if (!n || !rt(h, d)) {
|
|
@@ -4078,15 +4082,15 @@ function V0() {
|
|
|
4078
4082
|
}
|
|
4079
4083
|
return u;
|
|
4080
4084
|
}
|
|
4081
|
-
function
|
|
4082
|
-
return typeof e == "number" ? e :
|
|
4085
|
+
function Ka(e) {
|
|
4086
|
+
return typeof e == "number" ? e : $e(e) ? cn : +e;
|
|
4083
4087
|
}
|
|
4084
|
-
function
|
|
4088
|
+
function De(e) {
|
|
4085
4089
|
if (typeof e == "string")
|
|
4086
4090
|
return e;
|
|
4087
4091
|
if (N(e))
|
|
4088
|
-
return se(e,
|
|
4089
|
-
if (
|
|
4092
|
+
return se(e, De) + "";
|
|
4093
|
+
if ($e(e))
|
|
4090
4094
|
return Ea ? Ea.call(e) : "";
|
|
4091
4095
|
var t = e + "";
|
|
4092
4096
|
return t == "0" && 1 / e == -at ? "-0" : t;
|
|
@@ -4118,7 +4122,7 @@ function V0() {
|
|
|
4118
4122
|
return t = $t(t, e), e = xo(e, t), e == null || delete e[lt(Xe(t))];
|
|
4119
4123
|
}
|
|
4120
4124
|
function za(e, t, n, r) {
|
|
4121
|
-
return
|
|
4125
|
+
return jn(e, t, n(sn(e, t)), r);
|
|
4122
4126
|
}
|
|
4123
4127
|
function Pr(e, t, n, r) {
|
|
4124
4128
|
for (var s = e.length, u = r ? s : -1; (r ? u-- : ++u < s) && t(e[u], u, e); )
|
|
@@ -4127,7 +4131,7 @@ function V0() {
|
|
|
4127
4131
|
}
|
|
4128
4132
|
function Ja(e, t) {
|
|
4129
4133
|
var n = e;
|
|
4130
|
-
return n instanceof
|
|
4134
|
+
return n instanceof q && (n = n.value()), Si(t, function(r, s) {
|
|
4131
4135
|
return s.func.apply(s.thisArg, Mt([r], s.args));
|
|
4132
4136
|
}, n);
|
|
4133
4137
|
}
|
|
@@ -4137,7 +4141,7 @@ function V0() {
|
|
|
4137
4141
|
return r ? Dt(e[0]) : [];
|
|
4138
4142
|
for (var s = -1, u = m(r); ++s < r; )
|
|
4139
4143
|
for (var c = e[s], h = -1; ++h < r; )
|
|
4140
|
-
h != s && (u[s] =
|
|
4144
|
+
h != s && (u[s] = qn(u[s] || c, e[h], t, n));
|
|
4141
4145
|
return Dt(we(u, 1), t, n);
|
|
4142
4146
|
}
|
|
4143
4147
|
function Ya(e, t, n) {
|
|
@@ -4151,7 +4155,7 @@ function V0() {
|
|
|
4151
4155
|
return ce(e) ? e : [];
|
|
4152
4156
|
}
|
|
4153
4157
|
function Zi(e) {
|
|
4154
|
-
return typeof e == "function" ? e :
|
|
4158
|
+
return typeof e == "function" ? e : Pe;
|
|
4155
4159
|
}
|
|
4156
4160
|
function $t(e, t) {
|
|
4157
4161
|
return N(e) ? e : ss(e, t) ? [e] : bo(Z(e));
|
|
@@ -4191,7 +4195,7 @@ function V0() {
|
|
|
4191
4195
|
}
|
|
4192
4196
|
function Va(e, t) {
|
|
4193
4197
|
if (e !== t) {
|
|
4194
|
-
var n = e !== i, r = e === null, s = e === e, u =
|
|
4198
|
+
var n = e !== i, r = e === null, s = e === e, u = $e(e), c = t !== i, h = t === null, d = t === t, w = $e(t);
|
|
4195
4199
|
if (!h && !w && !u && e > t || u && c && d && !h && !w || r && c && d || !n && d || !s)
|
|
4196
4200
|
return 1;
|
|
4197
4201
|
if (!r && !u && !w && e < t || w && n && s && !r && !u || h && n && s || !c && s || !d)
|
|
@@ -4229,7 +4233,7 @@ function V0() {
|
|
|
4229
4233
|
(b || s < u) && (x[F + n[c]] = e[s++]);
|
|
4230
4234
|
return x;
|
|
4231
4235
|
}
|
|
4232
|
-
function
|
|
4236
|
+
function Te(e, t) {
|
|
4233
4237
|
var n = -1, r = e.length;
|
|
4234
4238
|
for (t || (t = m(r)); ++n < r; )
|
|
4235
4239
|
t[n] = e[n];
|
|
@@ -4252,7 +4256,7 @@ function V0() {
|
|
|
4252
4256
|
}
|
|
4253
4257
|
function Or(e, t) {
|
|
4254
4258
|
return function(n, r) {
|
|
4255
|
-
var s = N(n) ? Tc :
|
|
4259
|
+
var s = N(n) ? Tc : jl, u = t ? t() : {};
|
|
4256
4260
|
return s(n, e, R(r, 2), u);
|
|
4257
4261
|
};
|
|
4258
4262
|
}
|
|
@@ -4270,7 +4274,7 @@ function V0() {
|
|
|
4270
4274
|
return function(n, r) {
|
|
4271
4275
|
if (n == null)
|
|
4272
4276
|
return n;
|
|
4273
|
-
if (!
|
|
4277
|
+
if (!Ie(n))
|
|
4274
4278
|
return e(n, r);
|
|
4275
4279
|
for (var s = n.length, u = t ? s : -1, c = V(n); (t ? u-- : ++u < s) && r(c[u], u, c) !== !1; )
|
|
4276
4280
|
;
|
|
@@ -4288,7 +4292,7 @@ function V0() {
|
|
|
4288
4292
|
};
|
|
4289
4293
|
}
|
|
4290
4294
|
function bf(e, t, n) {
|
|
4291
|
-
var r = t & fe, s =
|
|
4295
|
+
var r = t & fe, s = Kn(e);
|
|
4292
4296
|
function u() {
|
|
4293
4297
|
var c = this && this !== _e && this instanceof u ? s : e;
|
|
4294
4298
|
return c.apply(r ? n : this, arguments);
|
|
@@ -4307,7 +4311,7 @@ function V0() {
|
|
|
4307
4311
|
return Si(ru(nu(t).replace(dc, "")), e, "");
|
|
4308
4312
|
};
|
|
4309
4313
|
}
|
|
4310
|
-
function
|
|
4314
|
+
function Kn(e) {
|
|
4311
4315
|
return function() {
|
|
4312
4316
|
var t = arguments;
|
|
4313
4317
|
switch (t.length) {
|
|
@@ -4333,7 +4337,7 @@ function V0() {
|
|
|
4333
4337
|
};
|
|
4334
4338
|
}
|
|
4335
4339
|
function Cf(e, t, n) {
|
|
4336
|
-
var r =
|
|
4340
|
+
var r = Kn(e);
|
|
4337
4341
|
function s() {
|
|
4338
4342
|
for (var u = arguments.length, c = m(u), h = u, d = bn(s); h--; )
|
|
4339
4343
|
c[h] = arguments[h];
|
|
@@ -4352,16 +4356,16 @@ function V0() {
|
|
|
4352
4356
|
n - u
|
|
4353
4357
|
);
|
|
4354
4358
|
var y = this && this !== _e && this instanceof s ? r : e;
|
|
4355
|
-
return
|
|
4359
|
+
return Ne(y, this, c);
|
|
4356
4360
|
}
|
|
4357
4361
|
return s;
|
|
4358
4362
|
}
|
|
4359
4363
|
function so(e) {
|
|
4360
4364
|
return function(t, n, r) {
|
|
4361
4365
|
var s = V(t);
|
|
4362
|
-
if (!
|
|
4366
|
+
if (!Ie(t)) {
|
|
4363
4367
|
var u = R(n, 3);
|
|
4364
|
-
t =
|
|
4368
|
+
t = ve(t), n = function(h) {
|
|
4365
4369
|
return u(s[h], h, s);
|
|
4366
4370
|
};
|
|
4367
4371
|
}
|
|
@@ -4382,7 +4386,7 @@ function V0() {
|
|
|
4382
4386
|
for (r = c ? r : n; ++r < n; ) {
|
|
4383
4387
|
u = t[r];
|
|
4384
4388
|
var h = Wr(u), d = h == "wrapper" ? ns(u) : i;
|
|
4385
|
-
d && as(d[0]) && d[1] == (ne | Fe | Y |
|
|
4389
|
+
d && as(d[0]) && d[1] == (ne | Fe | Y | qe) && !d[4].length && d[9] == 1 ? c = c[Wr(d[0])].apply(c, d[3]) : c = u.length == 1 && as(u) ? c[h]() : c.thru(u);
|
|
4386
4390
|
}
|
|
4387
4391
|
return function() {
|
|
4388
4392
|
var w = arguments, y = w[0];
|
|
@@ -4395,13 +4399,13 @@ function V0() {
|
|
|
4395
4399
|
});
|
|
4396
4400
|
}
|
|
4397
4401
|
function Lr(e, t, n, r, s, u, c, h, d, w) {
|
|
4398
|
-
var y = t & ne, x = t & fe, b = t &
|
|
4402
|
+
var y = t & ne, x = t & fe, b = t & Le, F = t & (Fe | T), L = t & ee, D = b ? i : Kn(e);
|
|
4399
4403
|
function M() {
|
|
4400
|
-
for (var k = arguments.length, H = m(k),
|
|
4401
|
-
H[
|
|
4404
|
+
for (var k = arguments.length, H = m(k), Be = k; Be--; )
|
|
4405
|
+
H[Be] = arguments[Be];
|
|
4402
4406
|
if (F)
|
|
4403
|
-
var Ce = bn(M),
|
|
4404
|
-
if (r && (H = eo(H, r, s, F)), u && (H = to(H, u, c, F)), k -=
|
|
4407
|
+
var Ce = bn(M), ke = Wc(H, Ce);
|
|
4408
|
+
if (r && (H = eo(H, r, s, F)), u && (H = to(H, u, c, F)), k -= ke, F && k < w) {
|
|
4405
4409
|
var le = Ut(H, Ce);
|
|
4406
4410
|
return co(
|
|
4407
4411
|
e,
|
|
@@ -4417,7 +4421,7 @@ function V0() {
|
|
|
4417
4421
|
);
|
|
4418
4422
|
}
|
|
4419
4423
|
var it = x ? n : this, xt = b ? it[e] : e;
|
|
4420
|
-
return k = H.length, h ? H =
|
|
4424
|
+
return k = H.length, h ? H = Kf(H, h) : L && k > 1 && H.reverse(), y && d < k && (H.length = d), this && this !== _e && this instanceof M && (xt = D || Kn(xt)), xt.apply(it, H);
|
|
4421
4425
|
}
|
|
4422
4426
|
return M;
|
|
4423
4427
|
}
|
|
@@ -4434,37 +4438,37 @@ function V0() {
|
|
|
4434
4438
|
if (n !== i && (s = n), r !== i) {
|
|
4435
4439
|
if (s === i)
|
|
4436
4440
|
return r;
|
|
4437
|
-
typeof n == "string" || typeof r == "string" ? (n =
|
|
4441
|
+
typeof n == "string" || typeof r == "string" ? (n = De(n), r = De(r)) : (n = Ka(n), r = Ka(r)), s = e(n, r);
|
|
4438
4442
|
}
|
|
4439
4443
|
return s;
|
|
4440
4444
|
};
|
|
4441
4445
|
}
|
|
4442
4446
|
function Qi(e) {
|
|
4443
4447
|
return vt(function(t) {
|
|
4444
|
-
return t = se(t,
|
|
4448
|
+
return t = se(t, We(R())), $(function(n) {
|
|
4445
4449
|
var r = this;
|
|
4446
4450
|
return e(t, function(s) {
|
|
4447
|
-
return
|
|
4451
|
+
return Ne(s, r, n);
|
|
4448
4452
|
});
|
|
4449
4453
|
});
|
|
4450
4454
|
});
|
|
4451
4455
|
}
|
|
4452
4456
|
function Ur(e, t) {
|
|
4453
|
-
t = t === i ? " " :
|
|
4457
|
+
t = t === i ? " " : De(t);
|
|
4454
4458
|
var n = t.length;
|
|
4455
4459
|
if (n < 2)
|
|
4456
|
-
return n ?
|
|
4457
|
-
var r =
|
|
4460
|
+
return n ? ji(t, e) : t;
|
|
4461
|
+
var r = ji(t, xr(e / vn(t)));
|
|
4458
4462
|
return mn(t) ? Bt(tt(r), 0, e).join("") : r.slice(0, e);
|
|
4459
4463
|
}
|
|
4460
4464
|
function Ff(e, t, n, r) {
|
|
4461
|
-
var s = t & fe, u =
|
|
4465
|
+
var s = t & fe, u = Kn(e);
|
|
4462
4466
|
function c() {
|
|
4463
4467
|
for (var h = -1, d = arguments.length, w = -1, y = r.length, x = m(y + d), b = this && this !== _e && this instanceof c ? u : e; ++w < y; )
|
|
4464
4468
|
x[w] = r[w];
|
|
4465
4469
|
for (; d--; )
|
|
4466
4470
|
x[w++] = arguments[++h];
|
|
4467
|
-
return
|
|
4471
|
+
return Ne(b, s ? n : this, x);
|
|
4468
4472
|
}
|
|
4469
4473
|
return c;
|
|
4470
4474
|
}
|
|
@@ -4480,7 +4484,7 @@ function V0() {
|
|
|
4480
4484
|
}
|
|
4481
4485
|
function co(e, t, n, r, s, u, c, h, d, w) {
|
|
4482
4486
|
var y = t & Fe, x = y ? c : i, b = y ? i : c, F = y ? u : i, L = y ? i : u;
|
|
4483
|
-
t |= y ? Y :
|
|
4487
|
+
t |= y ? Y : K, t &= ~(y ? K : Y), t & Ft || (t &= -4);
|
|
4484
4488
|
var D = [
|
|
4485
4489
|
e,
|
|
4486
4490
|
t,
|
|
@@ -4511,15 +4515,15 @@ function V0() {
|
|
|
4511
4515
|
function lo(e) {
|
|
4512
4516
|
return function(t) {
|
|
4513
4517
|
var n = Se(t);
|
|
4514
|
-
return n ==
|
|
4518
|
+
return n == Me ? Ii(t) : n == Ue ? Hc(t) : Nc(t, e(t));
|
|
4515
4519
|
};
|
|
4516
4520
|
}
|
|
4517
4521
|
function mt(e, t, n, r, s, u, c, h) {
|
|
4518
|
-
var d = t &
|
|
4522
|
+
var d = t & Le;
|
|
4519
4523
|
if (!d && typeof e != "function")
|
|
4520
4524
|
throw new ze(S);
|
|
4521
4525
|
var w = r ? r.length : 0;
|
|
4522
|
-
if (w || (t &= -97, r = s = i), c = c === i ? c : de(W(c), 0), h = h === i ? h : W(h), w -= s ? s.length : 0, t &
|
|
4526
|
+
if (w || (t &= -97, r = s = i), c = c === i ? c : de(W(c), 0), h = h === i ? h : W(h), w -= s ? s.length : 0, t & K) {
|
|
4523
4527
|
var y = r, x = s;
|
|
4524
4528
|
r = s = i;
|
|
4525
4529
|
}
|
|
@@ -4535,7 +4539,7 @@ function V0() {
|
|
|
4535
4539
|
c,
|
|
4536
4540
|
h
|
|
4537
4541
|
];
|
|
4538
|
-
if (b &&
|
|
4542
|
+
if (b && Gf(F, b), e = F[0], t = F[1], n = F[2], r = F[3], s = F[4], h = F[9] = F[9] === i ? d ? 0 : e.length : de(F[9] - w, 0), !h && t & (Fe | T) && (t &= -25), !t || t == fe)
|
|
4539
4543
|
var L = bf(e, t, n);
|
|
4540
4544
|
else t == Fe || t == T ? L = Cf(e, t, h) : (t == Y || t == (fe | Y)) && !s.length ? L = Ff(e, t, n, r) : L = Lr.apply(i, F);
|
|
4541
4545
|
var D = b ? Ha : So;
|
|
@@ -4557,7 +4561,7 @@ function V0() {
|
|
|
4557
4561
|
var w = u.get(e), y = u.get(t);
|
|
4558
4562
|
if (w && y)
|
|
4559
4563
|
return w == t && y == e;
|
|
4560
|
-
var x = -1, b = !0, F = n &
|
|
4564
|
+
var x = -1, b = !0, F = n & Oe ? new nn() : i;
|
|
4561
4565
|
for (u.set(e, t), u.set(t, e); ++x < h; ) {
|
|
4562
4566
|
var L = e[x], D = t[x];
|
|
4563
4567
|
if (r)
|
|
@@ -4600,16 +4604,16 @@ function V0() {
|
|
|
4600
4604
|
case Rt:
|
|
4601
4605
|
case Zt:
|
|
4602
4606
|
return e == t + "";
|
|
4603
|
-
case
|
|
4607
|
+
case Me:
|
|
4604
4608
|
var h = Ii;
|
|
4605
|
-
case
|
|
4609
|
+
case Ue:
|
|
4606
4610
|
var d = r & ae;
|
|
4607
4611
|
if (h || (h = fr), e.size != t.size && !d)
|
|
4608
4612
|
return !1;
|
|
4609
4613
|
var w = c.get(e);
|
|
4610
4614
|
if (w)
|
|
4611
4615
|
return w == t;
|
|
4612
|
-
r |=
|
|
4616
|
+
r |= Oe, c.set(e, t);
|
|
4613
4617
|
var y = po(h(e), h(t), r, s, u, c);
|
|
4614
4618
|
return c.delete(e), y;
|
|
4615
4619
|
case pn:
|
|
@@ -4636,16 +4640,16 @@ function V0() {
|
|
|
4636
4640
|
b = h[x];
|
|
4637
4641
|
var k = e[b], H = t[b];
|
|
4638
4642
|
if (r)
|
|
4639
|
-
var
|
|
4640
|
-
if (!(
|
|
4643
|
+
var Be = c ? r(H, k, b, t, e, u) : r(k, H, b, e, t, u);
|
|
4644
|
+
if (!(Be === i ? k === H || s(k, H, n, r, u) : Be)) {
|
|
4641
4645
|
D = !1;
|
|
4642
4646
|
break;
|
|
4643
4647
|
}
|
|
4644
4648
|
M || (M = b == "constructor");
|
|
4645
4649
|
}
|
|
4646
4650
|
if (D && !M) {
|
|
4647
|
-
var Ce = e.constructor,
|
|
4648
|
-
Ce !=
|
|
4651
|
+
var Ce = e.constructor, ke = t.constructor;
|
|
4652
|
+
Ce != ke && "constructor" in e && "constructor" in t && !(typeof Ce == "function" && Ce instanceof Ce && typeof ke == "function" && ke instanceof ke) && (D = !1);
|
|
4649
4653
|
}
|
|
4650
4654
|
return u.delete(e), u.delete(t), D;
|
|
4651
4655
|
}
|
|
@@ -4653,10 +4657,10 @@ function V0() {
|
|
|
4653
4657
|
return us(yo(e, i, Io), e + "");
|
|
4654
4658
|
}
|
|
4655
4659
|
function es(e) {
|
|
4656
|
-
return La(e,
|
|
4660
|
+
return La(e, ve, is);
|
|
4657
4661
|
}
|
|
4658
4662
|
function ts(e) {
|
|
4659
|
-
return La(e,
|
|
4663
|
+
return La(e, Re, go);
|
|
4660
4664
|
}
|
|
4661
4665
|
var ns = Ar ? function(e) {
|
|
4662
4666
|
return Ar.get(e);
|
|
@@ -4682,7 +4686,7 @@ function V0() {
|
|
|
4682
4686
|
return $f(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
4683
4687
|
}
|
|
4684
4688
|
function rs(e) {
|
|
4685
|
-
for (var t =
|
|
4689
|
+
for (var t = ve(e), n = t.length; n--; ) {
|
|
4686
4690
|
var r = t[n], s = e[r];
|
|
4687
4691
|
t[n] = [r, s, _o(s)];
|
|
4688
4692
|
}
|
|
@@ -4711,18 +4715,18 @@ function V0() {
|
|
|
4711
4715
|
Mt(t, is(e)), e = _r(e);
|
|
4712
4716
|
return t;
|
|
4713
4717
|
} : Ss, Se = Ee;
|
|
4714
|
-
(Oi && Se(new Oi(new ArrayBuffer(1))) != Ot || Wn && Se(new Wn()) !=
|
|
4718
|
+
(Oi && Se(new Oi(new ArrayBuffer(1))) != Ot || Wn && Se(new Wn()) != Me || Li && Se(Li.resolve()) != Ln || yn && Se(new yn()) != Ue || Dn && Se(new Dn()) != Pt) && (Se = function(e) {
|
|
4715
4719
|
var t = Ee(e), n = t == et ? e.constructor : i, r = n ? on(n) : "";
|
|
4716
4720
|
if (r)
|
|
4717
4721
|
switch (r) {
|
|
4718
4722
|
case pl:
|
|
4719
4723
|
return Ot;
|
|
4720
4724
|
case dl:
|
|
4721
|
-
return
|
|
4725
|
+
return Me;
|
|
4722
4726
|
case gl:
|
|
4723
4727
|
return Ln;
|
|
4724
4728
|
case ml:
|
|
4725
|
-
return
|
|
4729
|
+
return Ue;
|
|
4726
4730
|
case vl:
|
|
4727
4731
|
return Pt;
|
|
4728
4732
|
}
|
|
@@ -4760,7 +4764,7 @@ function V0() {
|
|
|
4760
4764
|
break;
|
|
4761
4765
|
e = e[c];
|
|
4762
4766
|
}
|
|
4763
|
-
return u || ++r != s ? u : (s = e == null ? 0 : e.length, !!s &&
|
|
4767
|
+
return u || ++r != s ? u : (s = e == null ? 0 : e.length, !!s && jr(s) && _t(c, s) && (N(e) || un(e)));
|
|
4764
4768
|
}
|
|
4765
4769
|
function Uf(e) {
|
|
4766
4770
|
var t = e.length, n = new e.constructor(t);
|
|
@@ -4789,14 +4793,14 @@ function V0() {
|
|
|
4789
4793
|
case li:
|
|
4790
4794
|
case fi:
|
|
4791
4795
|
return Qa(e, n);
|
|
4792
|
-
case
|
|
4796
|
+
case Me:
|
|
4793
4797
|
return new r();
|
|
4794
4798
|
case Yt:
|
|
4795
4799
|
case Zt:
|
|
4796
4800
|
return new r(e);
|
|
4797
4801
|
case Rt:
|
|
4798
4802
|
return yf(e);
|
|
4799
|
-
case
|
|
4803
|
+
case Ue:
|
|
4800
4804
|
return new r();
|
|
4801
4805
|
case pn:
|
|
4802
4806
|
return xf(e);
|
|
@@ -4822,13 +4826,13 @@ function V0() {
|
|
|
4822
4826
|
if (!oe(n))
|
|
4823
4827
|
return !1;
|
|
4824
4828
|
var r = typeof t;
|
|
4825
|
-
return (r == "number" ?
|
|
4829
|
+
return (r == "number" ? Ie(n) && _t(t, n.length) : r == "string" && t in n) ? rt(n[t], e) : !1;
|
|
4826
4830
|
}
|
|
4827
4831
|
function ss(e, t) {
|
|
4828
4832
|
if (N(e))
|
|
4829
4833
|
return !1;
|
|
4830
4834
|
var n = typeof e;
|
|
4831
|
-
return n == "number" || n == "symbol" || n == "boolean" || e == null ||
|
|
4835
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || $e(e) ? !0 : Mu.test(e) || !Lu.test(e) || t != null && e in V(t);
|
|
4832
4836
|
}
|
|
4833
4837
|
function $f(e) {
|
|
4834
4838
|
var t = typeof e;
|
|
@@ -4836,7 +4840,7 @@ function V0() {
|
|
|
4836
4840
|
}
|
|
4837
4841
|
function as(e) {
|
|
4838
4842
|
var t = Wr(e), n = o[t];
|
|
4839
|
-
if (typeof n != "function" || !(t in
|
|
4843
|
+
if (typeof n != "function" || !(t in q.prototype))
|
|
4840
4844
|
return !1;
|
|
4841
4845
|
if (e === n)
|
|
4842
4846
|
return !0;
|
|
@@ -4859,14 +4863,14 @@ function V0() {
|
|
|
4859
4863
|
return n == null ? !1 : n[e] === t && (t !== i || e in V(n));
|
|
4860
4864
|
};
|
|
4861
4865
|
}
|
|
4862
|
-
function
|
|
4863
|
-
var t =
|
|
4866
|
+
function qf(e) {
|
|
4867
|
+
var t = Gr(e, function(r) {
|
|
4864
4868
|
return n.size === P && n.clear(), r;
|
|
4865
4869
|
}), n = t.cache;
|
|
4866
4870
|
return t;
|
|
4867
4871
|
}
|
|
4868
|
-
function
|
|
4869
|
-
var n = e[1], r = t[1], s = n | r, u = s < (fe |
|
|
4872
|
+
function Gf(e, t) {
|
|
4873
|
+
var n = e[1], r = t[1], s = n | r, u = s < (fe | Le | ne), c = r == ne && n == Fe || r == ne && n == qe && e[7].length <= t[8] || r == (ne | qe) && t[7].length <= t[8] && n == Fe;
|
|
4870
4874
|
if (!(u || c))
|
|
4871
4875
|
return e;
|
|
4872
4876
|
r & fe && (e[2] = t[2], s |= n & fe ? 0 : Ft);
|
|
@@ -4884,7 +4888,7 @@ function V0() {
|
|
|
4884
4888
|
t.push(n);
|
|
4885
4889
|
return t;
|
|
4886
4890
|
}
|
|
4887
|
-
function
|
|
4891
|
+
function jf(e) {
|
|
4888
4892
|
return gr.call(e);
|
|
4889
4893
|
}
|
|
4890
4894
|
function yo(e, t, n) {
|
|
@@ -4894,14 +4898,14 @@ function V0() {
|
|
|
4894
4898
|
s = -1;
|
|
4895
4899
|
for (var h = m(t + 1); ++s < t; )
|
|
4896
4900
|
h[s] = r[s];
|
|
4897
|
-
return h[t] = n(c),
|
|
4901
|
+
return h[t] = n(c), Ne(e, this, h);
|
|
4898
4902
|
};
|
|
4899
4903
|
}
|
|
4900
4904
|
function xo(e, t) {
|
|
4901
4905
|
return t.length < 2 ? e : sn(e, Ze(t, 0, -1));
|
|
4902
4906
|
}
|
|
4903
|
-
function
|
|
4904
|
-
for (var n = e.length, r = xe(t.length, n), s =
|
|
4907
|
+
function Kf(e, t) {
|
|
4908
|
+
for (var n = e.length, r = xe(t.length, n), s = Te(e); r--; ) {
|
|
4905
4909
|
var u = t[r];
|
|
4906
4910
|
e[r] = _t(u, n) ? s[u] : i;
|
|
4907
4911
|
}
|
|
@@ -4938,14 +4942,14 @@ function V0() {
|
|
|
4938
4942
|
}
|
|
4939
4943
|
return e.length = t, e;
|
|
4940
4944
|
}
|
|
4941
|
-
var bo =
|
|
4945
|
+
var bo = qf(function(e) {
|
|
4942
4946
|
var t = [];
|
|
4943
4947
|
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Uu, function(n, r, s, u) {
|
|
4944
|
-
t.push(s ? u.replace(
|
|
4948
|
+
t.push(s ? u.replace(Gu, "$1") : r || n);
|
|
4945
4949
|
}), t;
|
|
4946
4950
|
});
|
|
4947
4951
|
function lt(e) {
|
|
4948
|
-
if (typeof e == "string" ||
|
|
4952
|
+
if (typeof e == "string" || $e(e))
|
|
4949
4953
|
return e;
|
|
4950
4954
|
var t = e + "";
|
|
4951
4955
|
return t == "0" && 1 / e == -at ? "-0" : t;
|
|
@@ -4964,16 +4968,16 @@ function V0() {
|
|
|
4964
4968
|
return "";
|
|
4965
4969
|
}
|
|
4966
4970
|
function zf(e, t) {
|
|
4967
|
-
return
|
|
4971
|
+
return Ke(ri, function(n) {
|
|
4968
4972
|
var r = "_." + n[0];
|
|
4969
4973
|
t & n[1] && !cr(e, r) && e.push(r);
|
|
4970
4974
|
}), e.sort();
|
|
4971
4975
|
}
|
|
4972
4976
|
function Co(e) {
|
|
4973
|
-
if (e instanceof
|
|
4977
|
+
if (e instanceof q)
|
|
4974
4978
|
return e.clone();
|
|
4975
4979
|
var t = new Je(e.__wrapped__, e.__chain__);
|
|
4976
|
-
return t.__actions__ =
|
|
4980
|
+
return t.__actions__ = Te(e.__actions__), t.__index__ = e.__index__, t.__values__ = e.__values__, t;
|
|
4977
4981
|
}
|
|
4978
4982
|
function Jf(e, t, n) {
|
|
4979
4983
|
(n ? be(e, t, n) : t === i) ? t = 1 : t = de(W(t), 0);
|
|
@@ -4997,16 +5001,16 @@ function V0() {
|
|
|
4997
5001
|
return [];
|
|
4998
5002
|
for (var t = m(e - 1), n = arguments[0], r = e; r--; )
|
|
4999
5003
|
t[r - 1] = arguments[r];
|
|
5000
|
-
return Mt(N(n) ?
|
|
5004
|
+
return Mt(N(n) ? Te(n) : [n], we(t, 1));
|
|
5001
5005
|
}
|
|
5002
5006
|
var Xf = $(function(e, t) {
|
|
5003
|
-
return ce(e) ?
|
|
5007
|
+
return ce(e) ? qn(e, we(t, 1, ce, !0)) : [];
|
|
5004
5008
|
}), Qf = $(function(e, t) {
|
|
5005
5009
|
var n = Xe(t);
|
|
5006
|
-
return ce(n) && (n = i), ce(e) ?
|
|
5010
|
+
return ce(n) && (n = i), ce(e) ? qn(e, we(t, 1, ce, !0), R(n, 2)) : [];
|
|
5007
5011
|
}), Vf = $(function(e, t) {
|
|
5008
5012
|
var n = Xe(t);
|
|
5009
|
-
return ce(n) && (n = i), ce(e) ?
|
|
5013
|
+
return ce(n) && (n = i), ce(e) ? qn(e, we(t, 1, ce, !0), i, n) : [];
|
|
5010
5014
|
});
|
|
5011
5015
|
function eh(e, t, n) {
|
|
5012
5016
|
var r = e == null ? 0 : e.length;
|
|
@@ -5095,24 +5099,24 @@ function V0() {
|
|
|
5095
5099
|
if (!r)
|
|
5096
5100
|
return -1;
|
|
5097
5101
|
var s = r;
|
|
5098
|
-
return n !== i && (s = W(n), s = s < 0 ? de(r + s, 0) : xe(s, r - 1)), t === t ?
|
|
5102
|
+
return n !== i && (s = W(n), s = s < 0 ? de(r + s, 0) : xe(s, r - 1)), t === t ? Kc(e, t, s) : lr(e, ca, s, !0);
|
|
5099
5103
|
}
|
|
5100
5104
|
function gh(e, t) {
|
|
5101
5105
|
return e && e.length ? Ba(e, W(t)) : i;
|
|
5102
5106
|
}
|
|
5103
5107
|
var mh = $(Po);
|
|
5104
5108
|
function Po(e, t) {
|
|
5105
|
-
return e && e.length && t && t.length ?
|
|
5109
|
+
return e && e.length && t && t.length ? Gi(e, t) : e;
|
|
5106
5110
|
}
|
|
5107
5111
|
function vh(e, t, n) {
|
|
5108
|
-
return e && e.length && t && t.length ?
|
|
5112
|
+
return e && e.length && t && t.length ? Gi(e, t, R(n, 2)) : e;
|
|
5109
5113
|
}
|
|
5110
5114
|
function _h(e, t, n) {
|
|
5111
|
-
return e && e.length && t && t.length ?
|
|
5115
|
+
return e && e.length && t && t.length ? Gi(e, t, i, n) : e;
|
|
5112
5116
|
}
|
|
5113
5117
|
var wh = vt(function(e, t) {
|
|
5114
5118
|
var n = e == null ? 0 : e.length, r = Ui(e, t);
|
|
5115
|
-
return
|
|
5119
|
+
return Ga(e, se(t, function(s) {
|
|
5116
5120
|
return _t(s, n) ? +s : s;
|
|
5117
5121
|
}).sort(Va)), r;
|
|
5118
5122
|
});
|
|
@@ -5125,7 +5129,7 @@ function V0() {
|
|
|
5125
5129
|
var c = e[r];
|
|
5126
5130
|
t(c, r, e) && (n.push(c), s.push(r));
|
|
5127
5131
|
}
|
|
5128
|
-
return
|
|
5132
|
+
return Ga(e, s), n;
|
|
5129
5133
|
}
|
|
5130
5134
|
function cs(e) {
|
|
5131
5135
|
return e == null ? e : hl.call(e);
|
|
@@ -5138,7 +5142,7 @@ function V0() {
|
|
|
5138
5142
|
return Rr(e, t);
|
|
5139
5143
|
}
|
|
5140
5144
|
function Ah(e, t, n) {
|
|
5141
|
-
return
|
|
5145
|
+
return Ki(e, t, R(n, 2));
|
|
5142
5146
|
}
|
|
5143
5147
|
function Eh(e, t) {
|
|
5144
5148
|
var n = e == null ? 0 : e.length;
|
|
@@ -5153,7 +5157,7 @@ function V0() {
|
|
|
5153
5157
|
return Rr(e, t, !0);
|
|
5154
5158
|
}
|
|
5155
5159
|
function Ch(e, t, n) {
|
|
5156
|
-
return
|
|
5160
|
+
return Ki(e, t, R(n, 2), !0);
|
|
5157
5161
|
}
|
|
5158
5162
|
function Fh(e, t) {
|
|
5159
5163
|
var n = e == null ? 0 : e.length;
|
|
@@ -5165,10 +5169,10 @@ function V0() {
|
|
|
5165
5169
|
return -1;
|
|
5166
5170
|
}
|
|
5167
5171
|
function Th(e) {
|
|
5168
|
-
return e && e.length ?
|
|
5172
|
+
return e && e.length ? ja(e) : [];
|
|
5169
5173
|
}
|
|
5170
5174
|
function Ih(e, t) {
|
|
5171
|
-
return e && e.length ?
|
|
5175
|
+
return e && e.length ? ja(e, R(t, 2)) : [];
|
|
5172
5176
|
}
|
|
5173
5177
|
function Rh(e) {
|
|
5174
5178
|
var t = e == null ? 0 : e.length;
|
|
@@ -5221,25 +5225,25 @@ function V0() {
|
|
|
5221
5225
|
return [];
|
|
5222
5226
|
var n = ls(e);
|
|
5223
5227
|
return t == null ? n : se(n, function(r) {
|
|
5224
|
-
return
|
|
5228
|
+
return Ne(t, i, r);
|
|
5225
5229
|
});
|
|
5226
5230
|
}
|
|
5227
5231
|
var kh = $(function(e, t) {
|
|
5228
|
-
return ce(e) ?
|
|
5229
|
-
}), Gh = $(function(e) {
|
|
5230
|
-
return Ji(Lt(e, ce));
|
|
5232
|
+
return ce(e) ? qn(e, t) : [];
|
|
5231
5233
|
}), qh = $(function(e) {
|
|
5234
|
+
return Ji(Lt(e, ce));
|
|
5235
|
+
}), Gh = $(function(e) {
|
|
5232
5236
|
var t = Xe(e);
|
|
5233
5237
|
return ce(t) && (t = i), Ji(Lt(e, ce), R(t, 2));
|
|
5234
5238
|
}), Hh = $(function(e) {
|
|
5235
5239
|
var t = Xe(e);
|
|
5236
5240
|
return t = typeof t == "function" ? t : i, Ji(Lt(e, ce), i, t);
|
|
5237
|
-
}),
|
|
5238
|
-
function
|
|
5241
|
+
}), jh = $(ls);
|
|
5242
|
+
function Kh(e, t) {
|
|
5239
5243
|
return Ya(e || [], t || [], kn);
|
|
5240
5244
|
}
|
|
5241
5245
|
function zh(e, t) {
|
|
5242
|
-
return Ya(e || [], t || [],
|
|
5246
|
+
return Ya(e || [], t || [], jn);
|
|
5243
5247
|
}
|
|
5244
5248
|
var Jh = $(function(e) {
|
|
5245
5249
|
var t = e.length, n = t > 1 ? e[t - 1] : i;
|
|
@@ -5259,7 +5263,7 @@ function V0() {
|
|
|
5259
5263
|
var t = e.length, n = t ? e[0] : 0, r = this.__wrapped__, s = function(u) {
|
|
5260
5264
|
return Ui(u, e);
|
|
5261
5265
|
};
|
|
5262
|
-
return t > 1 || this.__actions__.length || !(r instanceof
|
|
5266
|
+
return t > 1 || this.__actions__.length || !(r instanceof q) || !_t(n) ? this.thru(s) : (r = r.slice(n, +n + (t ? 1 : 0)), r.__actions__.push({
|
|
5263
5267
|
func: Br,
|
|
5264
5268
|
args: [s],
|
|
5265
5269
|
thisArg: i
|
|
@@ -5292,9 +5296,9 @@ function V0() {
|
|
|
5292
5296
|
}
|
|
5293
5297
|
function np() {
|
|
5294
5298
|
var e = this.__wrapped__;
|
|
5295
|
-
if (e instanceof
|
|
5299
|
+
if (e instanceof q) {
|
|
5296
5300
|
var t = e;
|
|
5297
|
-
return this.__actions__.length && (t = new
|
|
5301
|
+
return this.__actions__.length && (t = new q(this)), t = t.reverse(), t.__actions__.push({
|
|
5298
5302
|
func: Br,
|
|
5299
5303
|
args: [cs],
|
|
5300
5304
|
thisArg: i
|
|
@@ -5327,7 +5331,7 @@ function V0() {
|
|
|
5327
5331
|
return n = n === i ? 1 : W(n), we(kr(e, t), n);
|
|
5328
5332
|
}
|
|
5329
5333
|
function Mo(e, t) {
|
|
5330
|
-
var n = N(e) ?
|
|
5334
|
+
var n = N(e) ? Ke : Wt;
|
|
5331
5335
|
return n(e, R(t, 3));
|
|
5332
5336
|
}
|
|
5333
5337
|
function Uo(e, t) {
|
|
@@ -5338,14 +5342,14 @@ function V0() {
|
|
|
5338
5342
|
X.call(e, n) ? e[n].push(t) : gt(e, n, [t]);
|
|
5339
5343
|
});
|
|
5340
5344
|
function pp(e, t, n, r) {
|
|
5341
|
-
e =
|
|
5345
|
+
e = Ie(e) ? e : Fn(e), n = n && !r ? W(n) : 0;
|
|
5342
5346
|
var s = e.length;
|
|
5343
|
-
return n < 0 && (n = de(s + n, 0)),
|
|
5347
|
+
return n < 0 && (n = de(s + n, 0)), Kr(e) ? n <= s && e.indexOf(t, n) > -1 : !!s && gn(e, t, n) > -1;
|
|
5344
5348
|
}
|
|
5345
5349
|
var dp = $(function(e, t, n) {
|
|
5346
|
-
var r = -1, s = typeof t == "function", u =
|
|
5350
|
+
var r = -1, s = typeof t == "function", u = Ie(e) ? m(e.length) : [];
|
|
5347
5351
|
return Wt(e, function(c) {
|
|
5348
|
-
u[++r] = s ?
|
|
5352
|
+
u[++r] = s ? Ne(t, c, n) : Gn(c, t, n);
|
|
5349
5353
|
}), u;
|
|
5350
5354
|
}), gp = Or(function(e, t, n) {
|
|
5351
5355
|
gt(e, n, t);
|
|
@@ -5380,7 +5384,7 @@ function V0() {
|
|
|
5380
5384
|
}
|
|
5381
5385
|
function Sp(e, t, n) {
|
|
5382
5386
|
(n ? be(e, t, n) : t === i) ? t = 1 : t = W(t);
|
|
5383
|
-
var r = N(e) ?
|
|
5387
|
+
var r = N(e) ? Gl : df;
|
|
5384
5388
|
return r(e, t);
|
|
5385
5389
|
}
|
|
5386
5390
|
function Ap(e) {
|
|
@@ -5390,10 +5394,10 @@ function V0() {
|
|
|
5390
5394
|
function Ep(e) {
|
|
5391
5395
|
if (e == null)
|
|
5392
5396
|
return 0;
|
|
5393
|
-
if (
|
|
5394
|
-
return
|
|
5397
|
+
if (Ie(e))
|
|
5398
|
+
return Kr(e) ? vn(e) : e.length;
|
|
5395
5399
|
var t = Se(e);
|
|
5396
|
-
return t ==
|
|
5400
|
+
return t == Me || t == Ue ? e.size : ki(e).length;
|
|
5397
5401
|
}
|
|
5398
5402
|
function bp(e, t, n) {
|
|
5399
5403
|
var r = N(e) ? Ai : vf;
|
|
@@ -5404,7 +5408,7 @@ function V0() {
|
|
|
5404
5408
|
return [];
|
|
5405
5409
|
var n = t.length;
|
|
5406
5410
|
return n > 1 && be(e, t[0], t[1]) ? t = [] : n > 2 && be(t[0], t[1], t[2]) && (t = [t[0]]), ka(e, we(t, 1), []);
|
|
5407
|
-
}),
|
|
5411
|
+
}), qr = sl || function() {
|
|
5408
5412
|
return _e.Date.now();
|
|
5409
5413
|
};
|
|
5410
5414
|
function Fp(e, t) {
|
|
@@ -5434,7 +5438,7 @@ function V0() {
|
|
|
5434
5438
|
}
|
|
5435
5439
|
return mt(e, r, t, n, s);
|
|
5436
5440
|
}), Do = $(function(e, t, n) {
|
|
5437
|
-
var r = fe |
|
|
5441
|
+
var r = fe | Le;
|
|
5438
5442
|
if (n.length) {
|
|
5439
5443
|
var s = Ut(n, bn(Do));
|
|
5440
5444
|
r |= Y;
|
|
@@ -5472,7 +5476,7 @@ function V0() {
|
|
|
5472
5476
|
return d === i || it >= t || it < 0 || x && xt >= u;
|
|
5473
5477
|
}
|
|
5474
5478
|
function k() {
|
|
5475
|
-
var le =
|
|
5479
|
+
var le = qr();
|
|
5476
5480
|
if (M(le))
|
|
5477
5481
|
return H(le);
|
|
5478
5482
|
h = Jn(k, D(le));
|
|
@@ -5480,14 +5484,14 @@ function V0() {
|
|
|
5480
5484
|
function H(le) {
|
|
5481
5485
|
return h = i, b && r ? F(le) : (r = s = i, c);
|
|
5482
5486
|
}
|
|
5483
|
-
function
|
|
5487
|
+
function Be() {
|
|
5484
5488
|
h !== i && Za(h), w = 0, r = d = s = h = i;
|
|
5485
5489
|
}
|
|
5486
5490
|
function Ce() {
|
|
5487
|
-
return h === i ? c : H(
|
|
5491
|
+
return h === i ? c : H(qr());
|
|
5488
5492
|
}
|
|
5489
|
-
function
|
|
5490
|
-
var le =
|
|
5493
|
+
function ke() {
|
|
5494
|
+
var le = qr(), it = M(le);
|
|
5491
5495
|
if (r = arguments, s = this, d = le, it) {
|
|
5492
5496
|
if (h === i)
|
|
5493
5497
|
return L(d);
|
|
@@ -5496,7 +5500,7 @@ function V0() {
|
|
|
5496
5500
|
}
|
|
5497
5501
|
return h === i && (h = Jn(k, t)), c;
|
|
5498
5502
|
}
|
|
5499
|
-
return
|
|
5503
|
+
return ke.cancel = Be, ke.flush = Ce, ke;
|
|
5500
5504
|
}
|
|
5501
5505
|
var Tp = $(function(e, t) {
|
|
5502
5506
|
return Ia(e, 1, t);
|
|
@@ -5506,7 +5510,7 @@ function V0() {
|
|
|
5506
5510
|
function Rp(e) {
|
|
5507
5511
|
return mt(e, ee);
|
|
5508
5512
|
}
|
|
5509
|
-
function
|
|
5513
|
+
function Gr(e, t) {
|
|
5510
5514
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
5511
5515
|
throw new ze(S);
|
|
5512
5516
|
var n = function() {
|
|
@@ -5516,9 +5520,9 @@ function V0() {
|
|
|
5516
5520
|
var c = e.apply(this, r);
|
|
5517
5521
|
return n.cache = u.set(s, c) || u, c;
|
|
5518
5522
|
};
|
|
5519
|
-
return n.cache = new (
|
|
5523
|
+
return n.cache = new (Gr.Cache || dt)(), n;
|
|
5520
5524
|
}
|
|
5521
|
-
|
|
5525
|
+
Gr.Cache = dt;
|
|
5522
5526
|
function Hr(e) {
|
|
5523
5527
|
if (typeof e != "function")
|
|
5524
5528
|
throw new ze(S);
|
|
@@ -5541,21 +5545,21 @@ function V0() {
|
|
|
5541
5545
|
return Wo(2, e);
|
|
5542
5546
|
}
|
|
5543
5547
|
var Op = _f(function(e, t) {
|
|
5544
|
-
t = t.length == 1 && N(t[0]) ? se(t[0],
|
|
5548
|
+
t = t.length == 1 && N(t[0]) ? se(t[0], We(R())) : se(we(t, 1), We(R()));
|
|
5545
5549
|
var n = t.length;
|
|
5546
5550
|
return $(function(r) {
|
|
5547
5551
|
for (var s = -1, u = xe(r.length, n); ++s < u; )
|
|
5548
5552
|
r[s] = t[s].call(this, r[s]);
|
|
5549
|
-
return
|
|
5553
|
+
return Ne(e, this, r);
|
|
5550
5554
|
});
|
|
5551
5555
|
}), hs = $(function(e, t) {
|
|
5552
5556
|
var n = Ut(t, bn(hs));
|
|
5553
5557
|
return mt(e, Y, i, t, n);
|
|
5554
|
-
}),
|
|
5555
|
-
var n = Ut(t, bn(
|
|
5556
|
-
return mt(e,
|
|
5558
|
+
}), qo = $(function(e, t) {
|
|
5559
|
+
var n = Ut(t, bn(qo));
|
|
5560
|
+
return mt(e, K, i, t, n);
|
|
5557
5561
|
}), Lp = vt(function(e, t) {
|
|
5558
|
-
return mt(e,
|
|
5562
|
+
return mt(e, qe, i, i, i, t);
|
|
5559
5563
|
});
|
|
5560
5564
|
function Mp(e, t) {
|
|
5561
5565
|
if (typeof e != "function")
|
|
@@ -5567,7 +5571,7 @@ function V0() {
|
|
|
5567
5571
|
throw new ze(S);
|
|
5568
5572
|
return t = t == null ? 0 : de(W(t), 0), $(function(n) {
|
|
5569
5573
|
var r = n[t], s = Bt(n, 0, t);
|
|
5570
|
-
return r && Mt(s, r),
|
|
5574
|
+
return r && Mt(s, r), Ne(e, this, s);
|
|
5571
5575
|
});
|
|
5572
5576
|
}
|
|
5573
5577
|
function Np(e, t, n) {
|
|
@@ -5598,45 +5602,45 @@ function V0() {
|
|
|
5598
5602
|
function kp(e, t) {
|
|
5599
5603
|
return t = typeof t == "function" ? t : i, Ye(e, B, t);
|
|
5600
5604
|
}
|
|
5601
|
-
function
|
|
5602
|
-
return Ye(e,
|
|
5605
|
+
function qp(e) {
|
|
5606
|
+
return Ye(e, G | B);
|
|
5603
5607
|
}
|
|
5604
|
-
function
|
|
5605
|
-
return t = typeof t == "function" ? t : i, Ye(e,
|
|
5608
|
+
function Gp(e, t) {
|
|
5609
|
+
return t = typeof t == "function" ? t : i, Ye(e, G | B, t);
|
|
5606
5610
|
}
|
|
5607
5611
|
function Hp(e, t) {
|
|
5608
|
-
return t == null || Ta(e, t,
|
|
5612
|
+
return t == null || Ta(e, t, ve(t));
|
|
5609
5613
|
}
|
|
5610
5614
|
function rt(e, t) {
|
|
5611
5615
|
return e === t || e !== e && t !== t;
|
|
5612
5616
|
}
|
|
5613
|
-
var
|
|
5617
|
+
var jp = Nr(Di), Kp = Nr(function(e, t) {
|
|
5614
5618
|
return e >= t;
|
|
5615
5619
|
}), un = Ma(/* @__PURE__ */ function() {
|
|
5616
5620
|
return arguments;
|
|
5617
5621
|
}()) ? Ma : function(e) {
|
|
5618
5622
|
return ue(e) && X.call(e, "callee") && !ya.call(e, "callee");
|
|
5619
|
-
}, N = m.isArray, zp = ta ?
|
|
5620
|
-
function
|
|
5621
|
-
return e != null &&
|
|
5623
|
+
}, N = m.isArray, zp = ta ? We(ta) : ef;
|
|
5624
|
+
function Ie(e) {
|
|
5625
|
+
return e != null && jr(e.length) && !wt(e);
|
|
5622
5626
|
}
|
|
5623
5627
|
function ce(e) {
|
|
5624
|
-
return ue(e) &&
|
|
5628
|
+
return ue(e) && Ie(e);
|
|
5625
5629
|
}
|
|
5626
5630
|
function Jp(e) {
|
|
5627
5631
|
return e === !0 || e === !1 || ue(e) && Ee(e) == zt;
|
|
5628
5632
|
}
|
|
5629
|
-
var kt = ol || As, Yp = na ?
|
|
5633
|
+
var kt = ol || As, Yp = na ? We(na) : tf;
|
|
5630
5634
|
function Zp(e) {
|
|
5631
5635
|
return ue(e) && e.nodeType === 1 && !Yn(e);
|
|
5632
5636
|
}
|
|
5633
5637
|
function Xp(e) {
|
|
5634
5638
|
if (e == null)
|
|
5635
5639
|
return !0;
|
|
5636
|
-
if (
|
|
5640
|
+
if (Ie(e) && (N(e) || typeof e == "string" || typeof e.splice == "function" || kt(e) || Cn(e) || un(e)))
|
|
5637
5641
|
return !e.length;
|
|
5638
5642
|
var t = Se(e);
|
|
5639
|
-
if (t ==
|
|
5643
|
+
if (t == Me || t == Ue)
|
|
5640
5644
|
return !e.size;
|
|
5641
5645
|
if (zn(e))
|
|
5642
5646
|
return !ki(e).length;
|
|
@@ -5668,10 +5672,10 @@ function V0() {
|
|
|
5668
5672
|
var t = Ee(e);
|
|
5669
5673
|
return t == hn || t == rr || t == ii || t == ir;
|
|
5670
5674
|
}
|
|
5671
|
-
function
|
|
5675
|
+
function Go(e) {
|
|
5672
5676
|
return typeof e == "number" && e == W(e);
|
|
5673
5677
|
}
|
|
5674
|
-
function
|
|
5678
|
+
function jr(e) {
|
|
5675
5679
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Ve;
|
|
5676
5680
|
}
|
|
5677
5681
|
function oe(e) {
|
|
@@ -5681,7 +5685,7 @@ function V0() {
|
|
|
5681
5685
|
function ue(e) {
|
|
5682
5686
|
return e != null && typeof e == "object";
|
|
5683
5687
|
}
|
|
5684
|
-
var Ho = ra ?
|
|
5688
|
+
var Ho = ra ? We(ra) : rf;
|
|
5685
5689
|
function td(e, t) {
|
|
5686
5690
|
return e === t || Bi(e, t, rs(t));
|
|
5687
5691
|
}
|
|
@@ -5689,7 +5693,7 @@ function V0() {
|
|
|
5689
5693
|
return n = typeof n == "function" ? n : i, Bi(e, t, rs(t), n);
|
|
5690
5694
|
}
|
|
5691
5695
|
function rd(e) {
|
|
5692
|
-
return
|
|
5696
|
+
return jo(e) && e != +e;
|
|
5693
5697
|
}
|
|
5694
5698
|
function id(e) {
|
|
5695
5699
|
if (kf(e))
|
|
@@ -5702,7 +5706,7 @@ function V0() {
|
|
|
5702
5706
|
function ad(e) {
|
|
5703
5707
|
return e == null;
|
|
5704
5708
|
}
|
|
5705
|
-
function
|
|
5709
|
+
function jo(e) {
|
|
5706
5710
|
return typeof e == "number" || ue(e) && Ee(e) == Yt;
|
|
5707
5711
|
}
|
|
5708
5712
|
function Yn(e) {
|
|
@@ -5714,18 +5718,18 @@ function V0() {
|
|
|
5714
5718
|
var n = X.call(t, "constructor") && t.constructor;
|
|
5715
5719
|
return typeof n == "function" && n instanceof n && dr.call(n) == tl;
|
|
5716
5720
|
}
|
|
5717
|
-
var ds = ia ?
|
|
5721
|
+
var ds = ia ? We(ia) : sf;
|
|
5718
5722
|
function od(e) {
|
|
5719
|
-
return
|
|
5723
|
+
return Go(e) && e >= -Ve && e <= Ve;
|
|
5720
5724
|
}
|
|
5721
|
-
var
|
|
5722
|
-
function
|
|
5725
|
+
var Ko = sa ? We(sa) : af;
|
|
5726
|
+
function Kr(e) {
|
|
5723
5727
|
return typeof e == "string" || !N(e) && ue(e) && Ee(e) == Zt;
|
|
5724
5728
|
}
|
|
5725
|
-
function
|
|
5729
|
+
function $e(e) {
|
|
5726
5730
|
return typeof e == "symbol" || ue(e) && Ee(e) == pn;
|
|
5727
5731
|
}
|
|
5728
|
-
var Cn = aa ?
|
|
5732
|
+
var Cn = aa ? We(aa) : of;
|
|
5729
5733
|
function ud(e) {
|
|
5730
5734
|
return e === i;
|
|
5731
5735
|
}
|
|
@@ -5735,17 +5739,17 @@ function V0() {
|
|
|
5735
5739
|
function ld(e) {
|
|
5736
5740
|
return ue(e) && Ee(e) == ui;
|
|
5737
5741
|
}
|
|
5738
|
-
var fd = Nr(
|
|
5742
|
+
var fd = Nr(qi), hd = Nr(function(e, t) {
|
|
5739
5743
|
return e <= t;
|
|
5740
5744
|
});
|
|
5741
5745
|
function zo(e) {
|
|
5742
5746
|
if (!e)
|
|
5743
5747
|
return [];
|
|
5744
|
-
if (
|
|
5745
|
-
return
|
|
5748
|
+
if (Ie(e))
|
|
5749
|
+
return Kr(e) ? tt(e) : Te(e);
|
|
5746
5750
|
if (Nn && e[Nn])
|
|
5747
|
-
return
|
|
5748
|
-
var t = Se(e), n = t ==
|
|
5751
|
+
return Gc(e[Nn]());
|
|
5752
|
+
var t = Se(e), n = t == Me ? Ii : t == Ue ? fr : Fn;
|
|
5749
5753
|
return n(e);
|
|
5750
5754
|
}
|
|
5751
5755
|
function yt(e) {
|
|
@@ -5767,7 +5771,7 @@ function V0() {
|
|
|
5767
5771
|
function Qe(e) {
|
|
5768
5772
|
if (typeof e == "number")
|
|
5769
5773
|
return e;
|
|
5770
|
-
if (
|
|
5774
|
+
if ($e(e))
|
|
5771
5775
|
return cn;
|
|
5772
5776
|
if (oe(e)) {
|
|
5773
5777
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
@@ -5776,31 +5780,31 @@ function V0() {
|
|
|
5776
5780
|
if (typeof e != "string")
|
|
5777
5781
|
return e === 0 ? e : +e;
|
|
5778
5782
|
e = ha(e);
|
|
5779
|
-
var n =
|
|
5780
|
-
return n || Ju.test(e) ? Cc(e.slice(2), n ? 2 : 8) :
|
|
5783
|
+
var n = Ku.test(e);
|
|
5784
|
+
return n || Ju.test(e) ? Cc(e.slice(2), n ? 2 : 8) : ju.test(e) ? cn : +e;
|
|
5781
5785
|
}
|
|
5782
5786
|
function Yo(e) {
|
|
5783
|
-
return ct(e,
|
|
5787
|
+
return ct(e, Re(e));
|
|
5784
5788
|
}
|
|
5785
5789
|
function pd(e) {
|
|
5786
5790
|
return e ? rn(W(e), -Ve, Ve) : e === 0 ? e : 0;
|
|
5787
5791
|
}
|
|
5788
5792
|
function Z(e) {
|
|
5789
|
-
return e == null ? "" :
|
|
5793
|
+
return e == null ? "" : De(e);
|
|
5790
5794
|
}
|
|
5791
5795
|
var dd = An(function(e, t) {
|
|
5792
|
-
if (zn(t) ||
|
|
5793
|
-
ct(t,
|
|
5796
|
+
if (zn(t) || Ie(t)) {
|
|
5797
|
+
ct(t, ve(t), e);
|
|
5794
5798
|
return;
|
|
5795
5799
|
}
|
|
5796
5800
|
for (var n in t)
|
|
5797
5801
|
X.call(t, n) && kn(e, n, t[n]);
|
|
5798
5802
|
}), Zo = An(function(e, t) {
|
|
5799
|
-
ct(t,
|
|
5803
|
+
ct(t, Re(t), e);
|
|
5800
5804
|
}), zr = An(function(e, t, n, r) {
|
|
5801
|
-
ct(t,
|
|
5805
|
+
ct(t, Re(t), e, r);
|
|
5802
5806
|
}), gd = An(function(e, t, n, r) {
|
|
5803
|
-
ct(t,
|
|
5807
|
+
ct(t, ve(t), e, r);
|
|
5804
5808
|
}), md = vt(Ui);
|
|
5805
5809
|
function vd(e, t) {
|
|
5806
5810
|
var n = Sn(e);
|
|
@@ -5810,13 +5814,13 @@ function V0() {
|
|
|
5810
5814
|
e = V(e);
|
|
5811
5815
|
var n = -1, r = t.length, s = r > 2 ? t[2] : i;
|
|
5812
5816
|
for (s && be(t[0], t[1], s) && (r = 1); ++n < r; )
|
|
5813
|
-
for (var u = t[n], c =
|
|
5817
|
+
for (var u = t[n], c = Re(u), h = -1, d = c.length; ++h < d; ) {
|
|
5814
5818
|
var w = c[h], y = e[w];
|
|
5815
5819
|
(y === i || rt(y, wn[w]) && !X.call(e, w)) && (e[w] = u[w]);
|
|
5816
5820
|
}
|
|
5817
5821
|
return e;
|
|
5818
5822
|
}), wd = $(function(e) {
|
|
5819
|
-
return e.push(i, ho),
|
|
5823
|
+
return e.push(i, ho), Ne(Xo, i, e);
|
|
5820
5824
|
});
|
|
5821
5825
|
function yd(e, t) {
|
|
5822
5826
|
return ua(e, R(t, 3), ut);
|
|
@@ -5825,10 +5829,10 @@ function V0() {
|
|
|
5825
5829
|
return ua(e, R(t, 3), Wi);
|
|
5826
5830
|
}
|
|
5827
5831
|
function Sd(e, t) {
|
|
5828
|
-
return e == null ? e : Ni(e, R(t, 3),
|
|
5832
|
+
return e == null ? e : Ni(e, R(t, 3), Re);
|
|
5829
5833
|
}
|
|
5830
5834
|
function Ad(e, t) {
|
|
5831
|
-
return e == null ? e : Oa(e, R(t, 3),
|
|
5835
|
+
return e == null ? e : Oa(e, R(t, 3), Re);
|
|
5832
5836
|
}
|
|
5833
5837
|
function Ed(e, t) {
|
|
5834
5838
|
return e && ut(e, R(t, 3));
|
|
@@ -5837,10 +5841,10 @@ function V0() {
|
|
|
5837
5841
|
return e && Wi(e, R(t, 3));
|
|
5838
5842
|
}
|
|
5839
5843
|
function Cd(e) {
|
|
5840
|
-
return e == null ? [] : Tr(e,
|
|
5844
|
+
return e == null ? [] : Tr(e, ve(e));
|
|
5841
5845
|
}
|
|
5842
5846
|
function Fd(e) {
|
|
5843
|
-
return e == null ? [] : Tr(e,
|
|
5847
|
+
return e == null ? [] : Tr(e, Re(e));
|
|
5844
5848
|
}
|
|
5845
5849
|
function gs(e, t, n) {
|
|
5846
5850
|
var r = e == null ? i : sn(e, t);
|
|
@@ -5854,14 +5858,14 @@ function V0() {
|
|
|
5854
5858
|
}
|
|
5855
5859
|
var Id = oo(function(e, t, n) {
|
|
5856
5860
|
t != null && typeof t.toString != "function" && (t = gr.call(t)), e[t] = n;
|
|
5857
|
-
}, _s(
|
|
5861
|
+
}, _s(Pe)), Rd = oo(function(e, t, n) {
|
|
5858
5862
|
t != null && typeof t.toString != "function" && (t = gr.call(t)), X.call(e, t) ? e[t].push(n) : e[t] = [n];
|
|
5859
|
-
}, R), Pd = $(
|
|
5860
|
-
function
|
|
5861
|
-
return
|
|
5863
|
+
}, R), Pd = $(Gn);
|
|
5864
|
+
function ve(e) {
|
|
5865
|
+
return Ie(e) ? ba(e) : ki(e);
|
|
5862
5866
|
}
|
|
5863
|
-
function
|
|
5864
|
-
return
|
|
5867
|
+
function Re(e) {
|
|
5868
|
+
return Ie(e) ? ba(e, !0) : uf(e);
|
|
5865
5869
|
}
|
|
5866
5870
|
function Od(e, t) {
|
|
5867
5871
|
var n = {};
|
|
@@ -5886,7 +5890,7 @@ function V0() {
|
|
|
5886
5890
|
var r = !1;
|
|
5887
5891
|
t = se(t, function(u) {
|
|
5888
5892
|
return u = $t(u, e), r || (r = u.length > 1), u;
|
|
5889
|
-
}), ct(e, ts(e), n), r && (n = Ye(n,
|
|
5893
|
+
}), ct(e, ts(e), n), r && (n = Ye(n, G | j | B, If));
|
|
5890
5894
|
for (var s = t.length; s--; )
|
|
5891
5895
|
zi(n, t[s]);
|
|
5892
5896
|
return n;
|
|
@@ -5903,7 +5907,7 @@ function V0() {
|
|
|
5903
5907
|
var n = se(ts(e), function(r) {
|
|
5904
5908
|
return [r];
|
|
5905
5909
|
});
|
|
5906
|
-
return t = R(t),
|
|
5910
|
+
return t = R(t), qa(e, n, function(r, s) {
|
|
5907
5911
|
return t(r, s[0]);
|
|
5908
5912
|
});
|
|
5909
5913
|
}
|
|
@@ -5917,38 +5921,38 @@ function V0() {
|
|
|
5917
5921
|
return e;
|
|
5918
5922
|
}
|
|
5919
5923
|
function $d(e, t, n) {
|
|
5920
|
-
return e == null ? e :
|
|
5924
|
+
return e == null ? e : jn(e, t, n);
|
|
5921
5925
|
}
|
|
5922
5926
|
function Bd(e, t, n, r) {
|
|
5923
|
-
return r = typeof r == "function" ? r : i, e == null ? e :
|
|
5927
|
+
return r = typeof r == "function" ? r : i, e == null ? e : jn(e, t, n, r);
|
|
5924
5928
|
}
|
|
5925
|
-
var Vo = lo(
|
|
5929
|
+
var Vo = lo(ve), eu = lo(Re);
|
|
5926
5930
|
function kd(e, t, n) {
|
|
5927
5931
|
var r = N(e), s = r || kt(e) || Cn(e);
|
|
5928
5932
|
if (t = R(t, 4), n == null) {
|
|
5929
5933
|
var u = e && e.constructor;
|
|
5930
5934
|
s ? n = r ? new u() : [] : oe(e) ? n = wt(u) ? Sn(_r(e)) : {} : n = {};
|
|
5931
5935
|
}
|
|
5932
|
-
return (s ?
|
|
5936
|
+
return (s ? Ke : ut)(e, function(c, h, d) {
|
|
5933
5937
|
return t(n, c, h, d);
|
|
5934
5938
|
}), n;
|
|
5935
5939
|
}
|
|
5936
|
-
function
|
|
5940
|
+
function qd(e, t) {
|
|
5937
5941
|
return e == null ? !0 : zi(e, t);
|
|
5938
5942
|
}
|
|
5939
|
-
function
|
|
5943
|
+
function Gd(e, t, n) {
|
|
5940
5944
|
return e == null ? e : za(e, t, Zi(n));
|
|
5941
5945
|
}
|
|
5942
5946
|
function Hd(e, t, n, r) {
|
|
5943
5947
|
return r = typeof r == "function" ? r : i, e == null ? e : za(e, t, Zi(n), r);
|
|
5944
5948
|
}
|
|
5945
5949
|
function Fn(e) {
|
|
5946
|
-
return e == null ? [] : Ti(e,
|
|
5950
|
+
return e == null ? [] : Ti(e, ve(e));
|
|
5947
5951
|
}
|
|
5948
|
-
function
|
|
5949
|
-
return e == null ? [] : Ti(e,
|
|
5952
|
+
function jd(e) {
|
|
5953
|
+
return e == null ? [] : Ti(e, Re(e));
|
|
5950
5954
|
}
|
|
5951
|
-
function
|
|
5955
|
+
function Kd(e, t, n) {
|
|
5952
5956
|
return n === i && (n = t, t = i), n !== i && (n = Qe(n), n = n === n ? n : 0), t !== i && (t = Qe(t), t = t === t ? t : 0), rn(Qe(e), t, n);
|
|
5953
5957
|
}
|
|
5954
5958
|
function zd(e, t, n) {
|
|
@@ -5975,7 +5979,7 @@ function V0() {
|
|
|
5975
5979
|
return e = Z(e), e && e.replace(Zu, Dc).replace(gc, "");
|
|
5976
5980
|
}
|
|
5977
5981
|
function Zd(e, t, n) {
|
|
5978
|
-
e = Z(e), t =
|
|
5982
|
+
e = Z(e), t = De(t);
|
|
5979
5983
|
var r = e.length;
|
|
5980
5984
|
n = n === i ? r : rn(W(n), 0, r);
|
|
5981
5985
|
var s = n;
|
|
@@ -6014,7 +6018,7 @@ function V0() {
|
|
|
6014
6018
|
return n || t == null ? t = 0 : t && (t = +t), fl(Z(e).replace(pi, ""), t || 0);
|
|
6015
6019
|
}
|
|
6016
6020
|
function ag(e, t, n) {
|
|
6017
|
-
return (n ? be(e, t, n) : t === i) ? t = 1 : t = W(t),
|
|
6021
|
+
return (n ? be(e, t, n) : t === i) ? t = 1 : t = W(t), ji(Z(e), t);
|
|
6018
6022
|
}
|
|
6019
6023
|
function og() {
|
|
6020
6024
|
var e = arguments, t = Z(e[0]);
|
|
@@ -6024,30 +6028,30 @@ function V0() {
|
|
|
6024
6028
|
return e + (n ? "_" : "") + t.toLowerCase();
|
|
6025
6029
|
});
|
|
6026
6030
|
function cg(e, t, n) {
|
|
6027
|
-
return n && typeof n != "number" && be(e, t, n) && (t = n = i), n = n === i ? He : n >>> 0, n ? (e = Z(e), e && (typeof t == "string" || t != null && !ds(t)) && (t =
|
|
6031
|
+
return n && typeof n != "number" && be(e, t, n) && (t = n = i), n = n === i ? He : n >>> 0, n ? (e = Z(e), e && (typeof t == "string" || t != null && !ds(t)) && (t = De(t), !t && mn(e)) ? Bt(tt(e), 0, n) : e.split(t, n)) : [];
|
|
6028
6032
|
}
|
|
6029
6033
|
var lg = En(function(e, t, n) {
|
|
6030
6034
|
return e + (n ? " " : "") + vs(t);
|
|
6031
6035
|
});
|
|
6032
6036
|
function fg(e, t, n) {
|
|
6033
|
-
return e = Z(e), n = n == null ? 0 : rn(W(n), 0, e.length), t =
|
|
6037
|
+
return e = Z(e), n = n == null ? 0 : rn(W(n), 0, e.length), t = De(t), e.slice(n, n + t.length) == t;
|
|
6034
6038
|
}
|
|
6035
6039
|
function hg(e, t, n) {
|
|
6036
6040
|
var r = o.templateSettings;
|
|
6037
6041
|
n && be(e, t, n) && (t = i), e = Z(e), t = zr({}, t, r, fo);
|
|
6038
|
-
var s = zr({}, t.imports, r.imports, fo), u =
|
|
6042
|
+
var s = zr({}, t.imports, r.imports, fo), u = ve(s), c = Ti(s, u), h, d, w = 0, y = t.interpolate || ar, x = "__p += '", b = Ri(
|
|
6039
6043
|
(t.escape || ar).source + "|" + y.source + "|" + (y === Ls ? Hu : ar).source + "|" + (t.evaluate || ar).source + "|$",
|
|
6040
6044
|
"g"
|
|
6041
6045
|
), F = "//# sourceURL=" + (X.call(t, "sourceURL") ? (t.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++yc + "]") + `
|
|
6042
6046
|
`;
|
|
6043
|
-
e.replace(b, function(M, k, H,
|
|
6044
|
-
return H || (H =
|
|
6047
|
+
e.replace(b, function(M, k, H, Be, Ce, ke) {
|
|
6048
|
+
return H || (H = Be), x += e.slice(w, ke).replace(Xu, Bc), k && (h = !0, x += `' +
|
|
6045
6049
|
__e(` + k + `) +
|
|
6046
6050
|
'`), Ce && (d = !0, x += `';
|
|
6047
6051
|
` + Ce + `;
|
|
6048
6052
|
__p += '`), H && (x += `' +
|
|
6049
6053
|
((__t = (` + H + `)) == null ? '' : __t) +
|
|
6050
|
-
'`), w =
|
|
6054
|
+
'`), w = ke + M.length, M;
|
|
6051
6055
|
}), x += `';
|
|
6052
6056
|
`;
|
|
6053
6057
|
var L = X.call(t, "variable") && t.variable;
|
|
@@ -6056,7 +6060,7 @@ __p += '`), H && (x += `' +
|
|
|
6056
6060
|
` + x + `
|
|
6057
6061
|
}
|
|
6058
6062
|
`;
|
|
6059
|
-
else if (
|
|
6063
|
+
else if (qu.test(L))
|
|
6060
6064
|
throw new U(A);
|
|
6061
6065
|
x = (d ? x.replace(Cu, "") : x).replace(Fu, "$1").replace(Tu, "$1;"), x = "function(" + (L || "obj") + `) {
|
|
6062
6066
|
` + (L ? "" : `obj || (obj = {});
|
|
@@ -6081,7 +6085,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6081
6085
|
function gg(e, t, n) {
|
|
6082
6086
|
if (e = Z(e), e && (n || t === i))
|
|
6083
6087
|
return ha(e);
|
|
6084
|
-
if (!e || !(t =
|
|
6088
|
+
if (!e || !(t = De(t)))
|
|
6085
6089
|
return e;
|
|
6086
6090
|
var r = tt(e), s = tt(t), u = pa(r, s), c = da(r, s) + 1;
|
|
6087
6091
|
return Bt(r, u, c).join("");
|
|
@@ -6089,7 +6093,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6089
6093
|
function mg(e, t, n) {
|
|
6090
6094
|
if (e = Z(e), e && (n || t === i))
|
|
6091
6095
|
return e.slice(0, ma(e) + 1);
|
|
6092
|
-
if (!e || !(t =
|
|
6096
|
+
if (!e || !(t = De(t)))
|
|
6093
6097
|
return e;
|
|
6094
6098
|
var r = tt(e), s = da(r, tt(t)) + 1;
|
|
6095
6099
|
return Bt(r, 0, s).join("");
|
|
@@ -6097,16 +6101,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6097
6101
|
function vg(e, t, n) {
|
|
6098
6102
|
if (e = Z(e), e && (n || t === i))
|
|
6099
6103
|
return e.replace(pi, "");
|
|
6100
|
-
if (!e || !(t =
|
|
6104
|
+
if (!e || !(t = De(t)))
|
|
6101
6105
|
return e;
|
|
6102
6106
|
var r = tt(e), s = pa(r, tt(t));
|
|
6103
6107
|
return Bt(r, s).join("");
|
|
6104
6108
|
}
|
|
6105
6109
|
function _g(e, t) {
|
|
6106
|
-
var n =
|
|
6110
|
+
var n = Kt, r = Ge;
|
|
6107
6111
|
if (oe(t)) {
|
|
6108
6112
|
var s = "separator" in t ? t.separator : s;
|
|
6109
|
-
n = "length" in t ? W(t.length) : n, r = "omission" in t ?
|
|
6113
|
+
n = "length" in t ? W(t.length) : n, r = "omission" in t ? De(t.omission) : r;
|
|
6110
6114
|
}
|
|
6111
6115
|
e = Z(e);
|
|
6112
6116
|
var u = e.length;
|
|
@@ -6129,7 +6133,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6129
6133
|
var x = w.index;
|
|
6130
6134
|
d = d.slice(0, x === i ? h : x);
|
|
6131
6135
|
}
|
|
6132
|
-
} else if (e.indexOf(
|
|
6136
|
+
} else if (e.indexOf(De(s), h) != h) {
|
|
6133
6137
|
var b = d.lastIndexOf(s);
|
|
6134
6138
|
b > -1 && (d = d.slice(0, b));
|
|
6135
6139
|
}
|
|
@@ -6142,16 +6146,16 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6142
6146
|
return e + (n ? " " : "") + t.toUpperCase();
|
|
6143
6147
|
}), vs = io("toUpperCase");
|
|
6144
6148
|
function ru(e, t, n) {
|
|
6145
|
-
return e = Z(e), t = n ? i : t, t === i ?
|
|
6149
|
+
return e = Z(e), t = n ? i : t, t === i ? qc(e) ? Zc(e) : Lc(e) : e.match(t) || [];
|
|
6146
6150
|
}
|
|
6147
6151
|
var iu = $(function(e, t) {
|
|
6148
6152
|
try {
|
|
6149
|
-
return
|
|
6153
|
+
return Ne(e, i, t);
|
|
6150
6154
|
} catch (n) {
|
|
6151
6155
|
return ps(n) ? n : new U(n);
|
|
6152
6156
|
}
|
|
6153
6157
|
}), xg = vt(function(e, t) {
|
|
6154
|
-
return
|
|
6158
|
+
return Ke(t, function(n) {
|
|
6155
6159
|
n = lt(n), gt(e, n, fs(e[n], e));
|
|
6156
6160
|
}), e;
|
|
6157
6161
|
});
|
|
@@ -6164,13 +6168,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6164
6168
|
}) : [], $(function(r) {
|
|
6165
6169
|
for (var s = -1; ++s < t; ) {
|
|
6166
6170
|
var u = e[s];
|
|
6167
|
-
if (
|
|
6168
|
-
return
|
|
6171
|
+
if (Ne(u[0], this, r))
|
|
6172
|
+
return Ne(u[1], this, r);
|
|
6169
6173
|
}
|
|
6170
6174
|
});
|
|
6171
6175
|
}
|
|
6172
6176
|
function Ag(e) {
|
|
6173
|
-
return zl(Ye(e,
|
|
6177
|
+
return zl(Ye(e, G));
|
|
6174
6178
|
}
|
|
6175
6179
|
function _s(e) {
|
|
6176
6180
|
return function() {
|
|
@@ -6181,37 +6185,37 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6181
6185
|
return e == null || e !== e ? t : e;
|
|
6182
6186
|
}
|
|
6183
6187
|
var bg = ao(), Cg = ao(!0);
|
|
6184
|
-
function
|
|
6188
|
+
function Pe(e) {
|
|
6185
6189
|
return e;
|
|
6186
6190
|
}
|
|
6187
6191
|
function ws(e) {
|
|
6188
|
-
return Na(typeof e == "function" ? e : Ye(e,
|
|
6192
|
+
return Na(typeof e == "function" ? e : Ye(e, G));
|
|
6189
6193
|
}
|
|
6190
6194
|
function Fg(e) {
|
|
6191
|
-
return Da(Ye(e,
|
|
6195
|
+
return Da(Ye(e, G));
|
|
6192
6196
|
}
|
|
6193
6197
|
function Tg(e, t) {
|
|
6194
|
-
return $a(e, Ye(t,
|
|
6198
|
+
return $a(e, Ye(t, G));
|
|
6195
6199
|
}
|
|
6196
6200
|
var Ig = $(function(e, t) {
|
|
6197
6201
|
return function(n) {
|
|
6198
|
-
return
|
|
6202
|
+
return Gn(n, e, t);
|
|
6199
6203
|
};
|
|
6200
6204
|
}), Rg = $(function(e, t) {
|
|
6201
6205
|
return function(n) {
|
|
6202
|
-
return
|
|
6206
|
+
return Gn(e, n, t);
|
|
6203
6207
|
};
|
|
6204
6208
|
});
|
|
6205
6209
|
function ys(e, t, n) {
|
|
6206
|
-
var r =
|
|
6207
|
-
n == null && !(oe(t) && (s.length || !r.length)) && (n = t, t = e, e = this, s = Tr(t,
|
|
6210
|
+
var r = ve(t), s = Tr(t, r);
|
|
6211
|
+
n == null && !(oe(t) && (s.length || !r.length)) && (n = t, t = e, e = this, s = Tr(t, ve(t)));
|
|
6208
6212
|
var u = !(oe(n) && "chain" in n) || !!n.chain, c = wt(e);
|
|
6209
|
-
return
|
|
6213
|
+
return Ke(s, function(h) {
|
|
6210
6214
|
var d = t[h];
|
|
6211
6215
|
e[h] = d, c && (e.prototype[h] = function() {
|
|
6212
6216
|
var w = this.__chain__;
|
|
6213
6217
|
if (u || w) {
|
|
6214
|
-
var y = e(this.__wrapped__), x = y.__actions__ =
|
|
6218
|
+
var y = e(this.__wrapped__), x = y.__actions__ = Te(this.__actions__);
|
|
6215
6219
|
return x.push({ func: d, args: arguments, thisArg: e }), y.__chain__ = w, y;
|
|
6216
6220
|
}
|
|
6217
6221
|
return d.apply(e, Mt([this.value()], arguments));
|
|
@@ -6253,7 +6257,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6253
6257
|
function kg() {
|
|
6254
6258
|
return !0;
|
|
6255
6259
|
}
|
|
6256
|
-
function
|
|
6260
|
+
function qg(e, t) {
|
|
6257
6261
|
if (e = W(e), e < 1 || e > Ve)
|
|
6258
6262
|
return [];
|
|
6259
6263
|
var n = He, r = xe(e, He);
|
|
@@ -6262,35 +6266,35 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6262
6266
|
t(n);
|
|
6263
6267
|
return s;
|
|
6264
6268
|
}
|
|
6265
|
-
function
|
|
6266
|
-
return N(e) ? se(e, lt) :
|
|
6269
|
+
function Gg(e) {
|
|
6270
|
+
return N(e) ? se(e, lt) : $e(e) ? [e] : Te(bo(Z(e)));
|
|
6267
6271
|
}
|
|
6268
6272
|
function Hg(e) {
|
|
6269
6273
|
var t = ++el;
|
|
6270
6274
|
return Z(e) + t;
|
|
6271
6275
|
}
|
|
6272
|
-
var
|
|
6276
|
+
var jg = Mr(function(e, t) {
|
|
6273
6277
|
return e + t;
|
|
6274
|
-
}, 0),
|
|
6278
|
+
}, 0), Kg = Vi("ceil"), zg = Mr(function(e, t) {
|
|
6275
6279
|
return e / t;
|
|
6276
6280
|
}, 1), Jg = Vi("floor");
|
|
6277
6281
|
function Yg(e) {
|
|
6278
|
-
return e && e.length ? Fr(e,
|
|
6282
|
+
return e && e.length ? Fr(e, Pe, Di) : i;
|
|
6279
6283
|
}
|
|
6280
6284
|
function Zg(e, t) {
|
|
6281
6285
|
return e && e.length ? Fr(e, R(t, 2), Di) : i;
|
|
6282
6286
|
}
|
|
6283
6287
|
function Xg(e) {
|
|
6284
|
-
return la(e,
|
|
6288
|
+
return la(e, Pe);
|
|
6285
6289
|
}
|
|
6286
6290
|
function Qg(e, t) {
|
|
6287
6291
|
return la(e, R(t, 2));
|
|
6288
6292
|
}
|
|
6289
6293
|
function Vg(e) {
|
|
6290
|
-
return e && e.length ? Fr(e,
|
|
6294
|
+
return e && e.length ? Fr(e, Pe, qi) : i;
|
|
6291
6295
|
}
|
|
6292
6296
|
function em(e, t) {
|
|
6293
|
-
return e && e.length ? Fr(e, R(t, 2),
|
|
6297
|
+
return e && e.length ? Fr(e, R(t, 2), qi) : i;
|
|
6294
6298
|
}
|
|
6295
6299
|
var tm = Mr(function(e, t) {
|
|
6296
6300
|
return e * t;
|
|
@@ -6298,85 +6302,85 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6298
6302
|
return e - t;
|
|
6299
6303
|
}, 0);
|
|
6300
6304
|
function im(e) {
|
|
6301
|
-
return e && e.length ? Ci(e,
|
|
6305
|
+
return e && e.length ? Ci(e, Pe) : 0;
|
|
6302
6306
|
}
|
|
6303
6307
|
function sm(e, t) {
|
|
6304
6308
|
return e && e.length ? Ci(e, R(t, 2)) : 0;
|
|
6305
6309
|
}
|
|
6306
|
-
return o.after = Fp, o.ary = No, o.assign = dd, o.assignIn = Zo, o.assignInWith = zr, o.assignWith = gd, o.at = md, o.before = Wo, o.bind = fs, o.bindAll = xg, o.bindKey = Do, o.castArray = $p, o.chain = Lo, o.chunk = Jf, o.compact = Yf, o.concat = Zf, o.cond = Sg, o.conforms = Ag, o.constant = _s, o.countBy = ip, o.create = vd, o.curry = $o, o.curryRight = Bo, o.debounce = ko, o.defaults = _d, o.defaultsDeep = wd, o.defer = Tp, o.delay = Ip, o.difference = Xf, o.differenceBy = Qf, o.differenceWith = Vf, o.drop = eh, o.dropRight = th, o.dropRightWhile = nh, o.dropWhile = rh, o.fill = ih, o.filter = ap, o.flatMap = cp, o.flatMapDeep = lp, o.flatMapDepth = fp, o.flatten = Io, o.flattenDeep = sh, o.flattenDepth = ah, o.flip = Rp, o.flow = bg, o.flowRight = Cg, o.fromPairs = oh, o.functions = Cd, o.functionsIn = Fd, o.groupBy = hp, o.initial = ch, o.intersection = lh, o.intersectionBy = fh, o.intersectionWith = hh, o.invert = Id, o.invertBy = Rd, o.invokeMap = dp, o.iteratee = ws, o.keyBy = gp, o.keys =
|
|
6310
|
+
return o.after = Fp, o.ary = No, o.assign = dd, o.assignIn = Zo, o.assignInWith = zr, o.assignWith = gd, o.at = md, o.before = Wo, o.bind = fs, o.bindAll = xg, o.bindKey = Do, o.castArray = $p, o.chain = Lo, o.chunk = Jf, o.compact = Yf, o.concat = Zf, o.cond = Sg, o.conforms = Ag, o.constant = _s, o.countBy = ip, o.create = vd, o.curry = $o, o.curryRight = Bo, o.debounce = ko, o.defaults = _d, o.defaultsDeep = wd, o.defer = Tp, o.delay = Ip, o.difference = Xf, o.differenceBy = Qf, o.differenceWith = Vf, o.drop = eh, o.dropRight = th, o.dropRightWhile = nh, o.dropWhile = rh, o.fill = ih, o.filter = ap, o.flatMap = cp, o.flatMapDeep = lp, o.flatMapDepth = fp, o.flatten = Io, o.flattenDeep = sh, o.flattenDepth = ah, o.flip = Rp, o.flow = bg, o.flowRight = Cg, o.fromPairs = oh, o.functions = Cd, o.functionsIn = Fd, o.groupBy = hp, o.initial = ch, o.intersection = lh, o.intersectionBy = fh, o.intersectionWith = hh, o.invert = Id, o.invertBy = Rd, o.invokeMap = dp, o.iteratee = ws, o.keyBy = gp, o.keys = ve, o.keysIn = Re, o.map = kr, o.mapKeys = Od, o.mapValues = Ld, o.matches = Fg, o.matchesProperty = Tg, o.memoize = Gr, o.merge = Md, o.mergeWith = Xo, o.method = Ig, o.methodOf = Rg, o.mixin = ys, o.negate = Hr, o.nthArg = Og, o.omit = Ud, o.omitBy = Nd, o.once = Pp, o.orderBy = mp, o.over = Lg, o.overArgs = Op, o.overEvery = Mg, o.overSome = Ug, o.partial = hs, o.partialRight = qo, o.partition = vp, o.pick = Wd, o.pickBy = Qo, o.property = su, o.propertyOf = Ng, o.pull = mh, o.pullAll = Po, o.pullAllBy = vh, o.pullAllWith = _h, o.pullAt = wh, o.range = Wg, o.rangeRight = Dg, o.rearg = Lp, o.reject = yp, o.remove = yh, o.rest = Mp, o.reverse = cs, o.sampleSize = Sp, o.set = $d, o.setWith = Bd, o.shuffle = Ap, o.slice = xh, o.sortBy = Cp, o.sortedUniq = Th, o.sortedUniqBy = Ih, o.split = cg, o.spread = Up, o.tail = Rh, o.take = Ph, o.takeRight = Oh, o.takeRightWhile = Lh, o.takeWhile = Mh, o.tap = Yh, o.throttle = Np, o.thru = Br, o.toArray = zo, o.toPairs = Vo, o.toPairsIn = eu, o.toPath = Gg, o.toPlainObject = Yo, o.transform = kd, o.unary = Wp, o.union = Uh, o.unionBy = Nh, o.unionWith = Wh, o.uniq = Dh, o.uniqBy = $h, o.uniqWith = Bh, o.unset = qd, o.unzip = ls, o.unzipWith = Oo, o.update = Gd, o.updateWith = Hd, o.values = Fn, o.valuesIn = jd, o.without = kh, o.words = ru, o.wrap = Dp, o.xor = qh, o.xorBy = Gh, o.xorWith = Hh, o.zip = jh, o.zipObject = Kh, o.zipObjectDeep = zh, o.zipWith = Jh, o.entries = Vo, o.entriesIn = eu, o.extend = Zo, o.extendWith = zr, ys(o, o), o.add = jg, o.attempt = iu, o.camelCase = Yd, o.capitalize = tu, o.ceil = Kg, o.clamp = Kd, o.clone = Bp, o.cloneDeep = qp, o.cloneDeepWith = Gp, o.cloneWith = kp, o.conformsTo = Hp, o.deburr = nu, o.defaultTo = Eg, o.divide = zg, o.endsWith = Zd, o.eq = rt, o.escape = Xd, o.escapeRegExp = Qd, o.every = sp, o.find = op, o.findIndex = Fo, o.findKey = yd, o.findLast = up, o.findLastIndex = To, o.findLastKey = xd, o.floor = Jg, o.forEach = Mo, o.forEachRight = Uo, o.forIn = Sd, o.forInRight = Ad, o.forOwn = Ed, o.forOwnRight = bd, o.get = gs, o.gt = jp, o.gte = Kp, o.has = Td, o.hasIn = ms, o.head = Ro, o.identity = Pe, o.includes = pp, o.indexOf = uh, o.inRange = zd, o.invoke = Pd, o.isArguments = un, o.isArray = N, o.isArrayBuffer = zp, o.isArrayLike = Ie, o.isArrayLikeObject = ce, o.isBoolean = Jp, o.isBuffer = kt, o.isDate = Yp, o.isElement = Zp, o.isEmpty = Xp, o.isEqual = Qp, o.isEqualWith = Vp, o.isError = ps, o.isFinite = ed, o.isFunction = wt, o.isInteger = Go, o.isLength = jr, o.isMap = Ho, o.isMatch = td, o.isMatchWith = nd, o.isNaN = rd, o.isNative = id, o.isNil = ad, o.isNull = sd, o.isNumber = jo, o.isObject = oe, o.isObjectLike = ue, o.isPlainObject = Yn, o.isRegExp = ds, o.isSafeInteger = od, o.isSet = Ko, o.isString = Kr, o.isSymbol = $e, o.isTypedArray = Cn, o.isUndefined = ud, o.isWeakMap = cd, o.isWeakSet = ld, o.join = ph, o.kebabCase = Vd, o.last = Xe, o.lastIndexOf = dh, o.lowerCase = eg, o.lowerFirst = tg, o.lt = fd, o.lte = hd, o.max = Yg, o.maxBy = Zg, o.mean = Xg, o.meanBy = Qg, o.min = Vg, o.minBy = em, o.stubArray = Ss, o.stubFalse = As, o.stubObject = $g, o.stubString = Bg, o.stubTrue = kg, o.multiply = tm, o.nth = gh, o.noConflict = Pg, o.noop = xs, o.now = qr, o.pad = ng, o.padEnd = rg, o.padStart = ig, o.parseInt = sg, o.random = Jd, o.reduce = _p, o.reduceRight = wp, o.repeat = ag, o.replace = og, o.result = Dd, o.round = nm, o.runInContext = p, o.sample = xp, o.size = Ep, o.snakeCase = ug, o.some = bp, o.sortedIndex = Sh, o.sortedIndexBy = Ah, o.sortedIndexOf = Eh, o.sortedLastIndex = bh, o.sortedLastIndexBy = Ch, o.sortedLastIndexOf = Fh, o.startCase = lg, o.startsWith = fg, o.subtract = rm, o.sum = im, o.sumBy = sm, o.template = hg, o.times = qg, o.toFinite = yt, o.toInteger = W, o.toLength = Jo, o.toLower = pg, o.toNumber = Qe, o.toSafeInteger = pd, o.toString = Z, o.toUpper = dg, o.trim = gg, o.trimEnd = mg, o.trimStart = vg, o.truncate = _g, o.unescape = wg, o.uniqueId = Hg, o.upperCase = yg, o.upperFirst = vs, o.each = Mo, o.eachRight = Uo, o.first = Ro, ys(o, function() {
|
|
6307
6311
|
var e = {};
|
|
6308
6312
|
return ut(o, function(t, n) {
|
|
6309
6313
|
X.call(o.prototype, n) || (e[n] = t);
|
|
6310
6314
|
}), e;
|
|
6311
|
-
}(), { chain: !1 }), o.VERSION =
|
|
6315
|
+
}(), { chain: !1 }), o.VERSION = f, Ke(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
|
|
6312
6316
|
o[e].placeholder = o;
|
|
6313
|
-
}),
|
|
6314
|
-
|
|
6317
|
+
}), Ke(["drop", "take"], function(e, t) {
|
|
6318
|
+
q.prototype[e] = function(n) {
|
|
6315
6319
|
n = n === i ? 1 : de(W(n), 0);
|
|
6316
|
-
var r = this.__filtered__ && !t ? new
|
|
6320
|
+
var r = this.__filtered__ && !t ? new q(this) : this.clone();
|
|
6317
6321
|
return r.__filtered__ ? r.__takeCount__ = xe(n, r.__takeCount__) : r.__views__.push({
|
|
6318
6322
|
size: xe(n, He),
|
|
6319
6323
|
type: e + (r.__dir__ < 0 ? "Right" : "")
|
|
6320
6324
|
}), r;
|
|
6321
|
-
},
|
|
6325
|
+
}, q.prototype[e + "Right"] = function(n) {
|
|
6322
6326
|
return this.reverse()[e](n).reverse();
|
|
6323
6327
|
};
|
|
6324
|
-
}),
|
|
6328
|
+
}), Ke(["filter", "map", "takeWhile"], function(e, t) {
|
|
6325
6329
|
var n = t + 1, r = n == er || n == nr;
|
|
6326
|
-
|
|
6330
|
+
q.prototype[e] = function(s) {
|
|
6327
6331
|
var u = this.clone();
|
|
6328
6332
|
return u.__iteratees__.push({
|
|
6329
6333
|
iteratee: R(s, 3),
|
|
6330
6334
|
type: n
|
|
6331
6335
|
}), u.__filtered__ = u.__filtered__ || r, u;
|
|
6332
6336
|
};
|
|
6333
|
-
}),
|
|
6337
|
+
}), Ke(["head", "last"], function(e, t) {
|
|
6334
6338
|
var n = "take" + (t ? "Right" : "");
|
|
6335
|
-
|
|
6339
|
+
q.prototype[e] = function() {
|
|
6336
6340
|
return this[n](1).value()[0];
|
|
6337
6341
|
};
|
|
6338
|
-
}),
|
|
6342
|
+
}), Ke(["initial", "tail"], function(e, t) {
|
|
6339
6343
|
var n = "drop" + (t ? "" : "Right");
|
|
6340
|
-
|
|
6341
|
-
return this.__filtered__ ? new
|
|
6344
|
+
q.prototype[e] = function() {
|
|
6345
|
+
return this.__filtered__ ? new q(this) : this[n](1);
|
|
6342
6346
|
};
|
|
6343
|
-
}),
|
|
6344
|
-
return this.filter(
|
|
6345
|
-
},
|
|
6347
|
+
}), q.prototype.compact = function() {
|
|
6348
|
+
return this.filter(Pe);
|
|
6349
|
+
}, q.prototype.find = function(e) {
|
|
6346
6350
|
return this.filter(e).head();
|
|
6347
|
-
},
|
|
6351
|
+
}, q.prototype.findLast = function(e) {
|
|
6348
6352
|
return this.reverse().find(e);
|
|
6349
|
-
},
|
|
6350
|
-
return typeof e == "function" ? new
|
|
6351
|
-
return
|
|
6353
|
+
}, q.prototype.invokeMap = $(function(e, t) {
|
|
6354
|
+
return typeof e == "function" ? new q(this) : this.map(function(n) {
|
|
6355
|
+
return Gn(n, e, t);
|
|
6352
6356
|
});
|
|
6353
|
-
}),
|
|
6357
|
+
}), q.prototype.reject = function(e) {
|
|
6354
6358
|
return this.filter(Hr(R(e)));
|
|
6355
|
-
},
|
|
6359
|
+
}, q.prototype.slice = function(e, t) {
|
|
6356
6360
|
e = W(e);
|
|
6357
6361
|
var n = this;
|
|
6358
|
-
return n.__filtered__ && (e > 0 || t < 0) ? new
|
|
6359
|
-
},
|
|
6362
|
+
return n.__filtered__ && (e > 0 || t < 0) ? new q(n) : (e < 0 ? n = n.takeRight(-e) : e && (n = n.drop(e)), t !== i && (t = W(t), n = t < 0 ? n.dropRight(-t) : n.take(t - e)), n);
|
|
6363
|
+
}, q.prototype.takeRightWhile = function(e) {
|
|
6360
6364
|
return this.reverse().takeWhile(e).reverse();
|
|
6361
|
-
},
|
|
6365
|
+
}, q.prototype.toArray = function() {
|
|
6362
6366
|
return this.take(He);
|
|
6363
|
-
}, ut(
|
|
6367
|
+
}, ut(q.prototype, function(e, t) {
|
|
6364
6368
|
var n = /^(?:filter|find|map|reject)|While$/.test(t), r = /^(?:head|last)$/.test(t), s = o[r ? "take" + (t == "last" ? "Right" : "") : t], u = r || /^find/.test(t);
|
|
6365
6369
|
s && (o.prototype[t] = function() {
|
|
6366
|
-
var c = this.__wrapped__, h = r ? [1] : arguments, d = c instanceof
|
|
6370
|
+
var c = this.__wrapped__, h = r ? [1] : arguments, d = c instanceof q, w = h[0], y = d || N(c), x = function(k) {
|
|
6367
6371
|
var H = s.apply(o, Mt([k], h));
|
|
6368
6372
|
return r && b ? H[0] : H;
|
|
6369
6373
|
};
|
|
6370
6374
|
y && n && typeof w == "function" && w.length != 1 && (d = y = !1);
|
|
6371
6375
|
var b = this.__chain__, F = !!this.__actions__.length, L = u && !b, D = d && !F;
|
|
6372
6376
|
if (!u && y) {
|
|
6373
|
-
c = D ? c : new
|
|
6377
|
+
c = D ? c : new q(this);
|
|
6374
6378
|
var M = e.apply(c, h);
|
|
6375
6379
|
return M.__actions__.push({ func: Br, args: [x], thisArg: i }), new Je(M, b);
|
|
6376
6380
|
}
|
|
6377
6381
|
return L && D ? e.apply(this, h) : (M = this.thru(x), L ? r ? M.value()[0] : M.value() : M);
|
|
6378
6382
|
});
|
|
6379
|
-
}),
|
|
6383
|
+
}), Ke(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
|
|
6380
6384
|
var t = hr[e], n = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", r = /^(?:pop|shift)$/.test(e);
|
|
6381
6385
|
o.prototype[e] = function() {
|
|
6382
6386
|
var s = arguments;
|
|
@@ -6388,35 +6392,35 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
6388
6392
|
return t.apply(N(c) ? c : [], s);
|
|
6389
6393
|
});
|
|
6390
6394
|
};
|
|
6391
|
-
}), ut(
|
|
6395
|
+
}), ut(q.prototype, function(e, t) {
|
|
6392
6396
|
var n = o[t];
|
|
6393
6397
|
if (n) {
|
|
6394
6398
|
var r = n.name + "";
|
|
6395
6399
|
X.call(xn, r) || (xn[r] = []), xn[r].push({ name: t, func: n });
|
|
6396
6400
|
}
|
|
6397
|
-
}), xn[Lr(i,
|
|
6401
|
+
}), xn[Lr(i, Le).name] = [{
|
|
6398
6402
|
name: "wrapper",
|
|
6399
6403
|
func: i
|
|
6400
|
-
}],
|
|
6404
|
+
}], q.prototype.clone = _l, q.prototype.reverse = wl, q.prototype.value = yl, o.prototype.at = Zh, o.prototype.chain = Xh, o.prototype.commit = Qh, o.prototype.next = Vh, o.prototype.plant = tp, o.prototype.reverse = np, o.prototype.toJSON = o.prototype.valueOf = o.prototype.value = rp, o.prototype.first = o.prototype.head, Nn && (o.prototype[Nn] = ep), o;
|
|
6401
6405
|
}, _n = Xc();
|
|
6402
6406
|
Vt ? ((Vt.exports = _n)._ = _n, wi._ = _n) : _e._ = _n;
|
|
6403
|
-
}).call(
|
|
6407
|
+
}).call(tv);
|
|
6404
6408
|
}(Qn, Qn.exports)), Qn.exports;
|
|
6405
6409
|
}
|
|
6406
|
-
var
|
|
6407
|
-
const Ts = (
|
|
6408
|
-
const a =
|
|
6410
|
+
var rv = nv();
|
|
6411
|
+
const Ts = (l) => {
|
|
6412
|
+
const a = rv.startCase(l).toLowerCase();
|
|
6409
6413
|
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
6410
|
-
},
|
|
6411
|
-
data:
|
|
6414
|
+
}, iv = ({
|
|
6415
|
+
data: l
|
|
6412
6416
|
}) => `import { defineObject } from 'twenty-sdk';
|
|
6413
6417
|
|
|
6414
6418
|
export default defineObject({
|
|
6415
6419
|
universalIdentifier: '${Vn()}',
|
|
6416
|
-
nameSingular: '${
|
|
6417
|
-
namePlural: '${
|
|
6418
|
-
labelSingular: '${
|
|
6419
|
-
labelPlural: '${
|
|
6420
|
+
nameSingular: '${l.nameSingular}',
|
|
6421
|
+
namePlural: '${l.namePlural}',
|
|
6422
|
+
labelSingular: '${l.labelSingular}',
|
|
6423
|
+
labelPlural: '${l.labelPlural}',
|
|
6420
6424
|
icon: 'IconBox',
|
|
6421
6425
|
fields: [
|
|
6422
6426
|
// Add your fields here using defineField helper
|
|
@@ -6429,11 +6433,11 @@ export default defineObject({
|
|
|
6429
6433
|
// },
|
|
6430
6434
|
],
|
|
6431
6435
|
});
|
|
6432
|
-
`,
|
|
6433
|
-
name:
|
|
6436
|
+
`, sv = ({
|
|
6437
|
+
name: l,
|
|
6434
6438
|
universalIdentifier: a = Vn()
|
|
6435
6439
|
}) => {
|
|
6436
|
-
const i = Rn(
|
|
6440
|
+
const i = Rn(l);
|
|
6437
6441
|
return `import { defineRole } from 'twenty-sdk';
|
|
6438
6442
|
|
|
6439
6443
|
export const ${i.toUpperCase().replace(/-/g, "_")}_ROLE_UNIVERSAL_IDENTIFIER =
|
|
@@ -6441,7 +6445,7 @@ export const ${i.toUpperCase().replace(/-/g, "_")}_ROLE_UNIVERSAL_IDENTIFIER =
|
|
|
6441
6445
|
|
|
6442
6446
|
export default defineRole({
|
|
6443
6447
|
universalIdentifier: ${i.toUpperCase().replace(/-/g, "_")}_ROLE_UNIVERSAL_IDENTIFIER,
|
|
6444
|
-
label: '${
|
|
6448
|
+
label: '${l}',
|
|
6445
6449
|
description: 'Add a description for your role',
|
|
6446
6450
|
canReadAllObjectRecords: true,
|
|
6447
6451
|
canUpdateAllObjectRecords: true,
|
|
@@ -6449,28 +6453,28 @@ export default defineRole({
|
|
|
6449
6453
|
canDestroyAllObjectRecords: false,
|
|
6450
6454
|
});
|
|
6451
6455
|
`;
|
|
6452
|
-
},
|
|
6453
|
-
data:
|
|
6456
|
+
}, av = ({
|
|
6457
|
+
data: l
|
|
6454
6458
|
}) => {
|
|
6455
|
-
const a = Vn(), i =
|
|
6456
|
-
description: '${
|
|
6459
|
+
const a = Vn(), i = l.description ? `
|
|
6460
|
+
description: '${l.description}',` : "";
|
|
6457
6461
|
return `import { defineField, FieldType } from 'twenty-sdk';
|
|
6458
6462
|
|
|
6459
6463
|
export default defineField({
|
|
6460
6464
|
universalIdentifier: '${a}',
|
|
6461
|
-
name: '${
|
|
6462
|
-
label: '${
|
|
6463
|
-
type: FieldMetadataType.${
|
|
6464
|
-
objectUniversalIdentifier: '${
|
|
6465
|
+
name: '${l.name}',
|
|
6466
|
+
label: '${l.label}',
|
|
6467
|
+
type: FieldMetadataType.${l.type},
|
|
6468
|
+
objectUniversalIdentifier: '${l.objectUniversalIdentifier}',${i}
|
|
6465
6469
|
});
|
|
6466
6470
|
`;
|
|
6467
|
-
},
|
|
6468
|
-
class
|
|
6471
|
+
}, ov = "src";
|
|
6472
|
+
class uv {
|
|
6469
6473
|
async execute(a, i) {
|
|
6470
6474
|
try {
|
|
6471
|
-
const
|
|
6475
|
+
const f = a ?? await this.getEntity(), g = this.getFolderName(f), _ = i ? st(bt, i) : st(bt, ov, g);
|
|
6472
6476
|
await Q.ensureDir(_);
|
|
6473
|
-
const { name: S, file: A } = await this.getEntityData(
|
|
6477
|
+
const { name: S, file: A } = await this.getEntityData(f), I = st(_, this.getFileName(S, f));
|
|
6474
6478
|
if (await Q.pathExists(I)) {
|
|
6475
6479
|
const { overwrite: P } = await this.handleFileExist();
|
|
6476
6480
|
if (!P)
|
|
@@ -6480,47 +6484,47 @@ class sv {
|
|
|
6480
6484
|
E.green(`✓ Created ${g}:`),
|
|
6481
6485
|
E.cyan(ft(bt, I))
|
|
6482
6486
|
);
|
|
6483
|
-
} catch (
|
|
6487
|
+
} catch (f) {
|
|
6484
6488
|
console.error(
|
|
6485
6489
|
E.red("Add new entity failed:"),
|
|
6486
|
-
|
|
6490
|
+
f instanceof Error ? f.message : f
|
|
6487
6491
|
), process.exit(1);
|
|
6488
6492
|
}
|
|
6489
6493
|
}
|
|
6490
6494
|
async getEntityData(a) {
|
|
6491
6495
|
switch (a) {
|
|
6492
|
-
case
|
|
6493
|
-
const i = await this.getObjectData(),
|
|
6496
|
+
case ge.Object: {
|
|
6497
|
+
const i = await this.getObjectData(), f = i.nameSingular, g = iv({
|
|
6494
6498
|
data: i
|
|
6495
6499
|
});
|
|
6496
|
-
return { name:
|
|
6500
|
+
return { name: f, file: g };
|
|
6497
6501
|
}
|
|
6498
|
-
case
|
|
6499
|
-
const i = await this.getFieldData(),
|
|
6502
|
+
case ge.Field: {
|
|
6503
|
+
const i = await this.getFieldData(), f = i.name, g = av({
|
|
6500
6504
|
data: i
|
|
6501
6505
|
});
|
|
6502
|
-
return { name:
|
|
6506
|
+
return { name: f, file: g };
|
|
6503
6507
|
}
|
|
6504
|
-
case
|
|
6505
|
-
const i = await this.getEntityName(a),
|
|
6508
|
+
case ge.LogicFunction: {
|
|
6509
|
+
const i = await this.getEntityName(a), f = ev({
|
|
6506
6510
|
name: i
|
|
6507
6511
|
});
|
|
6508
|
-
return { name: i, file:
|
|
6512
|
+
return { name: i, file: f };
|
|
6509
6513
|
}
|
|
6510
|
-
case
|
|
6511
|
-
const i = await this.getEntityName(a),
|
|
6514
|
+
case ge.FrontComponent: {
|
|
6515
|
+
const i = await this.getEntityName(a), f = V0({
|
|
6512
6516
|
name: i
|
|
6513
6517
|
});
|
|
6514
|
-
return { name: i, file:
|
|
6518
|
+
return { name: i, file: f };
|
|
6515
6519
|
}
|
|
6516
|
-
case
|
|
6517
|
-
const i = await this.getEntityName(a),
|
|
6520
|
+
case ge.Role: {
|
|
6521
|
+
const i = await this.getEntityName(a), f = sv({
|
|
6518
6522
|
name: i
|
|
6519
6523
|
});
|
|
6520
|
-
return { name: i, file:
|
|
6524
|
+
return { name: i, file: f };
|
|
6521
6525
|
}
|
|
6522
6526
|
default:
|
|
6523
|
-
|
|
6527
|
+
mu();
|
|
6524
6528
|
}
|
|
6525
6529
|
}
|
|
6526
6530
|
async getEntity() {
|
|
@@ -6530,7 +6534,7 @@ class sv {
|
|
|
6530
6534
|
name: "entity",
|
|
6531
6535
|
message: "What entity do you want to create?",
|
|
6532
6536
|
default: "",
|
|
6533
|
-
choices: Object.values(
|
|
6537
|
+
choices: Object.values(ge)
|
|
6534
6538
|
}
|
|
6535
6539
|
]);
|
|
6536
6540
|
return a;
|
|
@@ -6552,7 +6556,7 @@ class sv {
|
|
|
6552
6556
|
name: "name",
|
|
6553
6557
|
message: `Enter a name for your new ${a}:`,
|
|
6554
6558
|
default: "",
|
|
6555
|
-
validate: (
|
|
6559
|
+
validate: (f) => f.length === 0 ? `${a} name is required` : !0
|
|
6556
6560
|
}
|
|
6557
6561
|
]);
|
|
6558
6562
|
return i;
|
|
@@ -6632,61 +6636,61 @@ class sv {
|
|
|
6632
6636
|
}
|
|
6633
6637
|
getFileName(a, i) {
|
|
6634
6638
|
switch (i) {
|
|
6635
|
-
case
|
|
6639
|
+
case ge.FrontComponent:
|
|
6636
6640
|
return `${Rn(a)}.tsx`;
|
|
6637
6641
|
default:
|
|
6638
6642
|
return `${Rn(a)}.ts`;
|
|
6639
6643
|
}
|
|
6640
6644
|
}
|
|
6641
6645
|
}
|
|
6642
|
-
const
|
|
6643
|
-
const a = new
|
|
6644
|
-
|
|
6645
|
-
await i.execute(
|
|
6646
|
-
}),
|
|
6647
|
-
await
|
|
6648
|
-
}),
|
|
6646
|
+
const cv = (l) => {
|
|
6647
|
+
const a = new H0(), i = new j0(), f = new K0(), g = new z0(), _ = new Z0();
|
|
6648
|
+
l.command("auth:login").description("Authenticate with Twenty").option("--api-key <key>", "API key for authentication").option("--api-url <url>", "Twenty API URL").action(async (j) => {
|
|
6649
|
+
await i.execute(j);
|
|
6650
|
+
}), l.command("auth:logout").description("Remove authentication credentials").action(async () => {
|
|
6651
|
+
await f.execute();
|
|
6652
|
+
}), l.command("auth:status").description("Check authentication status").action(async () => {
|
|
6649
6653
|
await g.execute();
|
|
6650
|
-
}),
|
|
6651
|
-
await _.execute({ workspace:
|
|
6652
|
-
}),
|
|
6654
|
+
}), l.command("auth:switch [workspace]").description("Switch the default workspace for authentication").action(async (j) => {
|
|
6655
|
+
await _.execute({ workspace: j });
|
|
6656
|
+
}), l.command("auth:list").description("List all configured workspaces").action(async () => {
|
|
6653
6657
|
await a.execute();
|
|
6654
6658
|
});
|
|
6655
|
-
const S = new
|
|
6656
|
-
|
|
6659
|
+
const S = new $0(), A = new G0(), I = new uv(), P = new q0(), z = new Y0(), G = new J0();
|
|
6660
|
+
l.command("app:dev [appPath]").description("Watch and sync local application changes").action(async (j) => {
|
|
6657
6661
|
await S.execute({
|
|
6658
|
-
appPath: Zn(
|
|
6662
|
+
appPath: Zn(j)
|
|
6659
6663
|
});
|
|
6660
|
-
}),
|
|
6664
|
+
}), l.command("app:uninstall [appPath]").description("Uninstall application from Twenty").option("-y, --yes", "Skip confirmation prompt").action(async (j, B) => {
|
|
6661
6665
|
try {
|
|
6662
6666
|
const ae = await A.execute({
|
|
6663
|
-
appPath: Zn(
|
|
6667
|
+
appPath: Zn(j),
|
|
6664
6668
|
askForConfirmation: !B?.yes
|
|
6665
6669
|
});
|
|
6666
6670
|
process.exit(ae.success ? 0 : 1);
|
|
6667
6671
|
} catch {
|
|
6668
6672
|
process.exit(1);
|
|
6669
6673
|
}
|
|
6670
|
-
}),
|
|
6671
|
-
`Add a new entity to your application (${Object.values(
|
|
6672
|
-
).action(async (
|
|
6673
|
-
await I.execute(
|
|
6674
|
-
}),
|
|
6675
|
-
await P.execute(Zn(
|
|
6676
|
-
}),
|
|
6674
|
+
}), l.command("entity:add [entityType]").option("--path <path>", "Path in which the entity should be created.").description(
|
|
6675
|
+
`Add a new entity to your application (${Object.values(ge).join("|")})`
|
|
6676
|
+
).action(async (j, B) => {
|
|
6677
|
+
await I.execute(j, B?.path);
|
|
6678
|
+
}), l.command("app:generate [appPath]").description("Generate Twenty client").action(async (j) => {
|
|
6679
|
+
await P.execute(Zn(j));
|
|
6680
|
+
}), l.command("function:logs [appPath]").option(
|
|
6677
6681
|
"-u, --functionUniversalIdentifier <functionUniversalIdentifier>",
|
|
6678
6682
|
"Only show logs for the function with this universal ID"
|
|
6679
6683
|
).option(
|
|
6680
6684
|
"-n, --functionName <functionName>",
|
|
6681
6685
|
"Only show logs for the function with this name"
|
|
6682
6686
|
).description("Watch application function logs").action(
|
|
6683
|
-
async (
|
|
6687
|
+
async (j, B) => {
|
|
6684
6688
|
await z.execute({
|
|
6685
6689
|
...B,
|
|
6686
|
-
appPath: Zn(
|
|
6690
|
+
appPath: Zn(j)
|
|
6687
6691
|
});
|
|
6688
6692
|
}
|
|
6689
|
-
),
|
|
6693
|
+
), l.command("function:execute [appPath]").option(
|
|
6690
6694
|
"-p, --payload <payload>",
|
|
6691
6695
|
"JSON payload to send to the function",
|
|
6692
6696
|
"{}"
|
|
@@ -6697,38 +6701,38 @@ const av = (f) => {
|
|
|
6697
6701
|
"-n, --functionName <functionName>",
|
|
6698
6702
|
"Name of the function to execute"
|
|
6699
6703
|
).description("Execute a logic function with a JSON payload").action(
|
|
6700
|
-
async (
|
|
6704
|
+
async (j, B) => {
|
|
6701
6705
|
!B?.functionUniversalIdentifier && !B?.functionName && (console.error(
|
|
6702
6706
|
E.red(
|
|
6703
6707
|
"Error: Either --functionName (-n) or --functionUniversalIdentifier (-u) is required."
|
|
6704
6708
|
)
|
|
6705
|
-
), process.exit(1)), await
|
|
6709
|
+
), process.exit(1)), await G.execute({
|
|
6706
6710
|
...B,
|
|
6707
6711
|
payload: B?.payload ?? "{}",
|
|
6708
|
-
appPath: Zn(
|
|
6712
|
+
appPath: Zn(j)
|
|
6709
6713
|
});
|
|
6710
6714
|
}
|
|
6711
6715
|
);
|
|
6712
|
-
},
|
|
6713
|
-
version:
|
|
6716
|
+
}, lv = "0.6.0-alpha", fv = {
|
|
6717
|
+
version: lv
|
|
6714
6718
|
};
|
|
6715
|
-
|
|
6716
|
-
const On = new
|
|
6717
|
-
On.name("twenty").description("CLI for Twenty application development").version(
|
|
6719
|
+
Em.defaultOptions.depth = 10;
|
|
6720
|
+
const On = new Sm();
|
|
6721
|
+
On.name("twenty").description("CLI for Twenty application development").version(fv.version);
|
|
6718
6722
|
On.option(
|
|
6719
6723
|
"--workspace <name>",
|
|
6720
6724
|
"Use a specific workspace configuration (overrides the default set by auth:switch)"
|
|
6721
6725
|
);
|
|
6722
|
-
On.hook("preAction", async (
|
|
6723
|
-
let i = (
|
|
6726
|
+
On.hook("preAction", async (l) => {
|
|
6727
|
+
let i = (l.optsWithGlobals ? l.optsWithGlobals() : l.opts()).workspace;
|
|
6724
6728
|
i || (i = await new Ae().getDefaultWorkspace()), Ae.setActiveWorkspace(i), console.log(
|
|
6725
6729
|
E.gray(`👩💻 Workspace - ${Ae.getActiveWorkspace()}`)
|
|
6726
6730
|
);
|
|
6727
6731
|
});
|
|
6728
|
-
|
|
6732
|
+
cv(On);
|
|
6729
6733
|
On.exitOverride();
|
|
6730
6734
|
try {
|
|
6731
6735
|
On.parse();
|
|
6732
|
-
} catch (
|
|
6733
|
-
|
|
6736
|
+
} catch (l) {
|
|
6737
|
+
l instanceof Am && process.exit(l.exitCode), l instanceof Error && (console.error(E.red("Error:"), l.message), process.exit(1));
|
|
6734
6738
|
}
|