@wirecat/notion-cli 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +5 -0
- package/contracts/wirecat.json +55 -2
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/agent-ILG6AH7S.js +42 -0
- package/dist/bundle/{all-profiles-V37KCXH3.js → all-profiles-AELHUTFU.js} +64 -21
- package/dist/bundle/{anthropic-Q4S3BYXD.js → anthropic-3CCYAGO3.js} +6 -6
- package/dist/bundle/{app-server-43SR3ACI.js → app-server-DJ6P4NY4.js} +86 -65
- package/dist/bundle/{bun-M3J2QTR3.js → bun-2FLR4IV4.js} +2 -2
- package/dist/bundle/{bun-sqlite-EJ3W2PSV.js → bun-sqlite-QB6CU6TH.js} +7 -7
- package/dist/bundle/chunk-2CMLY2X3.js +72 -0
- package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-2XUV7HNE.js} +2 -2
- package/dist/bundle/{chunk-HZRQLAHO.js → chunk-2Z7UOXFC.js} +1 -1
- package/dist/bundle/{chunk-TOSCB4SO.js → chunk-3LMW7U7F.js} +16 -10
- package/dist/bundle/chunk-3MYN2RMG.js +398 -0
- package/dist/bundle/{chunk-E5WLE7BM.js → chunk-3UX4VJWD.js} +1 -1
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/{chunk-KHWOLBHQ.js → chunk-4RFR4J2O.js} +2 -2
- package/dist/bundle/{chunk-G2MJYXZG.js → chunk-4VXXOJ2F.js} +4 -4
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-ECC2UX7X.js → chunk-5OJLUUOJ.js} +6 -6
- package/dist/bundle/{chunk-C32AKHTY.js → chunk-5XPHFV7H.js} +35 -12
- package/dist/bundle/{chunk-O5YB7FQD.js → chunk-6EJCI47L.js} +4 -4
- package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
- package/dist/bundle/{chunk-NA6QLHBZ.js → chunk-6YOMPW7Y.js} +10 -8
- package/dist/bundle/{chunk-P5BHKKBI.js → chunk-7JVKQ6NM.js} +4 -4
- package/dist/bundle/chunk-7L2XOKDZ.js +353 -0
- package/dist/bundle/{chunk-NE43YXKL.js → chunk-A42T4YX7.js} +3 -3
- package/dist/bundle/chunk-AE4VW4NB.js +50 -0
- package/dist/bundle/{chunk-FPUGMDJV.js → chunk-AV2ZJ4WX.js} +1 -1
- package/dist/bundle/{chunk-QWYMXFKM.js → chunk-AZLDR36U.js} +3 -3
- package/dist/bundle/{chunk-N2XADGL4.js → chunk-BAXNAOOL.js} +4 -4
- package/dist/bundle/{chunk-JCKWQGCD.js → chunk-BEV5LO4D.js} +110 -862
- package/dist/bundle/{chunk-UZSBGECU.js → chunk-BQBC2WIG.js} +1 -65
- package/dist/bundle/{chunk-CWXOXIWS.js → chunk-CFQQTDSA.js} +1 -1
- package/dist/bundle/chunk-CHPWBQUK.js +39 -0
- package/dist/bundle/chunk-CL3YNUCC.js +388 -0
- package/dist/bundle/{chunk-ONZVPE24.js → chunk-DGMTSDKB.js} +6 -6
- package/dist/bundle/{chunk-BWLBSQSU.js → chunk-DHVVXQEL.js} +4 -4
- package/dist/bundle/chunk-DIU2QJJF.js +785 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-DBEQI5YM.js → chunk-EHW45LLT.js} +3 -3
- package/dist/bundle/{chunk-WPP76PSX.js → chunk-ERN53B3Z.js} +32 -24
- package/dist/bundle/{chunk-XUPN2EHR.js → chunk-ESZHGC4Q.js} +23 -7
- package/dist/bundle/{chunk-3RL2MIUF.js → chunk-EZMG5QXB.js} +8 -8
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-TP7GDWVF.js → chunk-F5ZAN7OC.js} +1 -1
- package/dist/bundle/{chunk-DFCHHR5M.js → chunk-FMMYBVCH.js} +1 -1
- package/dist/bundle/{chunk-E2AFUJDR.js → chunk-FRB2L7OE.js} +3 -3
- package/dist/bundle/chunk-FV4WTZCU.js +561 -0
- package/dist/bundle/{chunk-TD2JZ25O.js → chunk-G4ZU73SD.js} +98 -80
- package/dist/bundle/{chunk-FKA7DOCK.js → chunk-GCAJW4SR.js} +1 -1
- package/dist/bundle/{chunk-WE4UFASG.js → chunk-GPRJXJC7.js} +15 -1
- package/dist/bundle/chunk-GUIQJUJV.js +340 -0
- package/dist/bundle/{chunk-GTY6N5KZ.js → chunk-HHEWTLAT.js} +2 -2
- package/dist/bundle/{chunk-DB2XKHI4.js → chunk-HM6AMYHR.js} +2 -2
- package/dist/bundle/{chunk-H3E2PZ5Y.js → chunk-HOVHE3A3.js} +7 -7
- package/dist/bundle/{chunk-O3DYRCIT.js → chunk-HVXOA4FO.js} +1 -1
- package/dist/bundle/{chunk-PPHBRESD.js → chunk-IJVTN5L3.js} +2 -2
- package/dist/bundle/{chunk-FBZI4Z3Z.js → chunk-IURYZSG3.js} +13 -26
- package/dist/bundle/chunk-JFSVAOA7.js +108 -0
- package/dist/bundle/{chunk-HHVFIXDO.js → chunk-JVESLS7B.js} +399 -399
- package/dist/bundle/chunk-K5IC4FZN.js +36 -0
- package/dist/bundle/chunk-KB35BVTG.js +30 -0
- package/dist/bundle/chunk-KGAUINBO.js +594 -0
- package/dist/bundle/{chunk-W5JZMXGW.js → chunk-KNCPBX5P.js} +75 -75
- package/dist/bundle/{chunk-ECEZOLOD.js → chunk-KZJQPJK5.js} +4 -4
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-QYXWRKNA.js → chunk-LC6WE6JS.js} +9 -9
- package/dist/bundle/{chunk-X2M6NIQG.js → chunk-LECMHK2F.js} +1 -1
- package/dist/bundle/chunk-LQVDFD65.js +72 -0
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-NTG657MI.js → chunk-NSR43UEW.js} +7 -64
- package/dist/bundle/{chunk-CDK5E45T.js → chunk-OEQNP56V.js} +2 -100
- package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
- package/dist/bundle/{chunk-PWRRDDMZ.js → chunk-P27NDZQR.js} +232 -552
- package/dist/bundle/{chunk-PAW6RRCW.js → chunk-PHKED7AG.js} +8 -210
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-RIGE67FR.js → chunk-Q7EIL6VU.js} +43 -33
- package/dist/bundle/{chunk-AT5I34AN.js → chunk-QEJFBORC.js} +3 -3
- package/dist/bundle/{chunk-RJMQGG3P.js → chunk-QGGRFRMP.js} +65 -49
- package/dist/bundle/{chunk-BNEE35WD.js → chunk-RD7BKTWV.js} +4 -4
- package/dist/bundle/chunk-RXU5T5NM.js +714 -0
- package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
- package/dist/bundle/{chunk-2FJNMADN.js → chunk-SAPP2LEH.js} +10 -10
- package/dist/bundle/{chunk-QIG55MZH.js → chunk-SEAGUFBX.js} +12 -12
- package/dist/bundle/{chunk-GCZ6MAEN.js → chunk-STTO2MSY.js} +43 -64
- package/dist/bundle/{chunk-DSP36YHQ.js → chunk-T37TAXVL.js} +2 -2
- package/dist/bundle/{chunk-KHZ2RGXI.js → chunk-T6XIBULH.js} +139 -572
- package/dist/bundle/chunk-TFT4FVRU.js +67 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
- package/dist/bundle/{chunk-LBYGJKXW.js → chunk-UOC52GCB.js} +4 -4
- package/dist/bundle/chunk-UPL474OW.js +94 -0
- package/dist/bundle/chunk-VH7526NL.js +80 -0
- package/dist/bundle/chunk-VNWF4I7E.js +34 -0
- package/dist/bundle/chunk-W2VQDIU5.js +221 -0
- package/dist/bundle/{chunk-TDNURSU6.js → chunk-WAGADES3.js} +19 -19
- package/dist/bundle/{chunk-J3NKZ6MO.js → chunk-WAU5LSHP.js} +79 -438
- package/dist/bundle/{chunk-B3FSLAIU.js → chunk-WB2KSQIP.js} +4 -4
- package/dist/bundle/{chunk-DO7BLXO3.js → chunk-WGZH2M64.js} +3 -3
- package/dist/bundle/chunk-WVN2KTNS.js +52 -0
- package/dist/bundle/{chunk-W7HM2VGO.js → chunk-XYQVVW4R.js} +1 -1
- package/dist/bundle/{chunk-BBSFQ3PU.js → chunk-YDDI4QIT.js} +1473 -1292
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-W53EJOFQ.js → chunk-YUDVRFXN.js} +1 -1
- package/dist/bundle/{chunk-MNRMKWCN.js → chunk-YXYZAWWW.js} +6 -6
- package/dist/bundle/{chunk-5P5TXU2K.js → chunk-YYQ5GKAI.js} +9509 -10782
- package/dist/bundle/chunk-ZDYEOE7L.js +2366 -0
- package/dist/bundle/command-contract-L2FASWD6.js +41 -0
- package/dist/bundle/{command-server-entry-LJ627ZUA.js → command-server-entry-VUR6WL77.js} +30 -27
- package/dist/bundle/{decode-PX2LZ5Y2.js → decode-I64PF2RM.js} +6 -6
- package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
- package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-JQBAZWCL.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FVTUDXDU.js → echarts-YRRVLEX3.js} +2 -2
- package/dist/bundle/{embed-CCSDK43I.js → embed-BLXLKMK2.js} +7 -7
- package/dist/bundle/{embedder-VHI4DHB7.js → embedder-JYGF6R7I.js} +10 -10
- package/dist/bundle/{failure-FZ6VYKEQ.js → failure-I6AAF5R5.js} +3 -3
- package/dist/bundle/first-run-YLDOZGY6.js +29 -0
- package/dist/bundle/first-screen-GZH3LMLZ.js +41 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
- package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
- package/dist/bundle/{instructions-HET7BCYK.js → instructions-AG7SRWTR.js} +1 -1
- package/dist/bundle/{mcp-RGNRW77S.js → mcp-YGOAUNC3.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
- package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
- package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
- package/dist/bundle/meeting-combined-OFQSGKBG.js +25 -0
- package/dist/bundle/meeting-model-K6NSX3O5.js +27 -0
- package/dist/bundle/{meeting-semantic-UD26T37N.js → meeting-semantic-3DZPHM7L.js} +7 -7
- package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
- package/dist/bundle/{node-CXZIFHZC.js → node-GJQYN4FT.js} +2 -2
- package/dist/bundle/{node-sqlite-ME7KMORI.js → node-sqlite-7VXIRQPH.js} +8 -8
- package/dist/bundle/notes-search-ACDOPTNH.js +64 -0
- package/dist/bundle/notion.js +14 -14
- package/dist/bundle/oauth-N67CH2TK.js +20 -0
- package/dist/bundle/{open-HA6D3SXR.js → open-JGXVHIKO.js} +6 -6
- package/dist/bundle/{openai-H5AJPZBX.js → openai-PFQJTF4H.js} +21 -18
- package/dist/bundle/{process-5RUXWGYS.js → process-MEKCZMX3.js} +1 -1
- package/dist/bundle/{program-F3NBTZ7J.js → program-DUJYLJH5.js} +6373 -6588
- package/dist/bundle/{prompt-6XSUOLHK.js → prompt-FW44QDHD.js} +6 -6
- package/dist/bundle/{recognize-2Y7AUVGG.js → recognize-62TDQ6A7.js} +5 -5
- package/dist/bundle/{remote-KCABPXQ3.js → remote-7ONFD7GG.js} +12 -11
- package/dist/bundle/{rerank-BTN7LUVA.js → rerank-YOHQQJS4.js} +8 -8
- package/dist/bundle/{schemas-VVLTLMXS.js → schemas-IIGJ7DOP.js} +39 -60
- package/dist/bundle/{serve-CYEMVRFC.js → serve-ZCXGT5RB.js} +11 -11
- package/dist/bundle/{server-WFIICGMI.js → server-RQ74M637.js} +78 -56
- package/dist/bundle/server-XMZF57WM.js +90 -0
- package/dist/bundle/{services-L4W6ZWDG.js → services-FWBRZ57M.js} +103 -88
- package/dist/bundle/{sqlite-runtime-IKMYLRQC.js → sqlite-runtime-ZZBNGV5L.js} +7 -7
- package/dist/bundle/{state-LMUP636P.js → state-GDDFO62Y.js} +7 -7
- package/dist/bundle/{store-W2JC2JP4.js → store-D2LRIWEI.js} +24 -20
- package/dist/bundle/{store-A2QZFBOX.js → store-KQCLR57N.js} +30 -18
- package/dist/bundle/store-maintenance-command-CK2MU5M6.js +77 -0
- package/dist/bundle/surface-K4TPIQW7.js +76 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +22 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/api.d.ts +7 -2
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +19 -119
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/library.d.ts.map +1 -1
- package/dist/commands/library.js +8 -2
- package/dist/commands/library.js.map +1 -1
- package/dist/config.d.ts +11 -13
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +63 -54
- package/dist/config.js.map +1 -1
- package/dist/generated/definitions.d.ts.map +1 -1
- package/dist/generated/definitions.js +72 -18
- package/dist/generated/definitions.js.map +1 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +49 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/schemas.d.ts.map +1 -1
- package/dist/generated/schemas.js +32 -32
- package/dist/generated/schemas.js.map +1 -1
- package/dist/generated/types.d.ts +125 -25
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/library.d.ts +8 -0
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +24 -1
- package/dist/library.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -0
- package/dist/program.js.map +1 -1
- package/dist/sync/files.d.ts +12 -0
- package/dist/sync/files.d.ts.map +1 -1
- package/dist/sync/files.js.map +1 -1
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +53 -37
- package/dist/sync/source.js.map +1 -1
- package/dist/sync/users.d.ts +15 -2
- package/dist/sync/users.d.ts.map +1 -1
- package/dist/sync/users.js +36 -1
- package/dist/sync/users.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/chunk-6EOZTUHT.js +0 -726
- package/dist/bundle/command-contract-TVRFW2IX.js +0 -38
- package/dist/bundle/first-run-7JKE5AHN.js +0 -29
- package/dist/bundle/first-screen-ZROHOEYJ.js +0 -38
- package/dist/bundle/meeting-combined-SSTOJUIJ.js +0 -24
- package/dist/bundle/meeting-model-K7TPS4S5.js +0 -26
- package/dist/bundle/oauth-XBTROXHB.js +0 -20
- package/dist/bundle/server-UC2FNNXX.js +0 -72
- package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +0 -63
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
pageSchema,
|
|
12
12
|
reference,
|
|
13
13
|
stepOf
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3LMW7U7F.js";
|
|
15
15
|
import {
|
|
16
16
|
array,
|
|
17
17
|
boolean,
|
|
@@ -34,149 +34,18 @@ import {
|
|
|
34
34
|
string,
|
|
35
35
|
union,
|
|
36
36
|
variant
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-S4UUN6LD.js";
|
|
38
38
|
import {
|
|
39
39
|
CliError,
|
|
40
40
|
isCliError,
|
|
41
41
|
singleLine,
|
|
42
42
|
visibleControls
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-HM6AMYHR.js";
|
|
44
44
|
import {
|
|
45
45
|
__name
|
|
46
46
|
} from "./chunk-ZVVMGPBJ.js";
|
|
47
47
|
|
|
48
|
-
// node_modules/.pnpm/@wirecat+cli-
|
|
49
|
-
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
50
|
-
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
51
|
-
if (!Number.isSafeInteger(value) || value < minimum)
|
|
52
|
-
throw invalid();
|
|
53
|
-
return value;
|
|
54
|
-
}, "integer");
|
|
55
|
-
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
56
|
-
const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
57
|
-
if (reference2.transcriptId !== void 0)
|
|
58
|
-
parts.push(integer2(reference2.transcriptId));
|
|
59
|
-
if (reference2.cuePosition !== void 0) {
|
|
60
|
-
if (reference2.transcriptId === void 0)
|
|
61
|
-
throw invalid();
|
|
62
|
-
parts.push(integer2(reference2.cuePosition, 0));
|
|
63
|
-
}
|
|
64
|
-
return `meeting:${parts.join("/")}`;
|
|
65
|
-
}, "formatMeetingReference");
|
|
66
|
-
var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
67
|
-
const value = text7.trim();
|
|
68
|
-
if (!value.startsWith("meeting:"))
|
|
69
|
-
throw invalid();
|
|
70
|
-
const parts = value.slice(8).split("/");
|
|
71
|
-
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
72
|
-
throw invalid();
|
|
73
|
-
const ids2 = parts.map(Number);
|
|
74
|
-
const reference2 = {
|
|
75
|
-
type: "meeting",
|
|
76
|
-
accountId: integer2(ids2[0]),
|
|
77
|
-
meetingId: integer2(ids2[1]),
|
|
78
|
-
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
79
|
-
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
80
|
-
};
|
|
81
|
-
return reference2;
|
|
82
|
-
}, "parseMeetingReference");
|
|
83
|
-
var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
|
|
84
|
-
|
|
85
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.687.0_@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typ_3e6248e31e5b79d53006284373ddef70/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
86
|
-
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
87
|
-
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
88
|
-
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
89
|
-
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
90
|
-
throw new CliError("validation_error", message);
|
|
91
|
-
}, "invalid");
|
|
92
|
-
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
93
|
-
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
94
|
-
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
95
|
-
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
96
|
-
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
97
|
-
if (!match)
|
|
98
|
-
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
99
|
-
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
100
|
-
if (amount === "0.00")
|
|
101
|
-
return invalid2("a payment's amount is more than 0");
|
|
102
|
-
return amount;
|
|
103
|
-
}, "amountOf");
|
|
104
|
-
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
105
|
-
const date = typeof value === "string" ? value.trim() : "";
|
|
106
|
-
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
107
|
-
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
108
|
-
return date;
|
|
109
|
-
}, "dateOf");
|
|
110
|
-
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
111
|
-
if (value === void 0 || value === null)
|
|
112
|
-
return null;
|
|
113
|
-
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
114
|
-
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
115
|
-
return value.trim();
|
|
116
|
-
}, "optionalText");
|
|
117
|
-
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
118
|
-
if (typeof value !== "string" || !allowed.includes(value))
|
|
119
|
-
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
120
|
-
return value;
|
|
121
|
-
}, "oneOf");
|
|
122
|
-
var FIELDS = [
|
|
123
|
-
"amount",
|
|
124
|
-
"currency",
|
|
125
|
-
"direction",
|
|
126
|
-
"counterparty",
|
|
127
|
-
"counterparty_name",
|
|
128
|
-
"due_at",
|
|
129
|
-
"state",
|
|
130
|
-
"item",
|
|
131
|
-
"paid_at"
|
|
132
|
-
];
|
|
133
|
-
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
134
|
-
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
135
|
-
return invalid2("a payment is an object");
|
|
136
|
-
const raw = input;
|
|
137
|
-
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
138
|
-
if (unknown.length)
|
|
139
|
-
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
140
|
-
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
141
|
-
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
142
|
-
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
143
|
-
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
144
|
-
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
145
|
-
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
146
|
-
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
147
|
-
if (raw.paid_at != null && state !== "paid")
|
|
148
|
-
return invalid2("only a paid payment has paid_at");
|
|
149
|
-
return {
|
|
150
|
-
amount: amountOf(raw.amount),
|
|
151
|
-
currency,
|
|
152
|
-
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
153
|
-
counterparty,
|
|
154
|
-
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
155
|
-
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
156
|
-
state,
|
|
157
|
-
item: optionalText(raw.item, "item", 200),
|
|
158
|
-
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
159
|
-
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
160
|
-
};
|
|
161
|
-
}, "validatePayment");
|
|
162
|
-
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
163
|
-
const [whole = "0", cents = "00"] = amount.split(".");
|
|
164
|
-
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
165
|
-
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
166
|
-
}, "grouped");
|
|
167
|
-
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
168
|
-
const payment = fact.payment;
|
|
169
|
-
if (!payment)
|
|
170
|
-
return "";
|
|
171
|
-
const who = payment.counterparty_name ?? payment.counterparty;
|
|
172
|
-
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
173
|
-
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
174
|
-
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
175
|
-
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
176
|
-
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
177
|
-
}, "paymentTitle");
|
|
178
|
-
|
|
179
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
48
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
180
49
|
var QUERY_LIMITS = {
|
|
181
50
|
bytes: 8192,
|
|
182
51
|
depth: 32,
|
|
@@ -220,7 +89,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
|
|
|
220
89
|
__name(queryError, "queryError");
|
|
221
90
|
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
222
91
|
|
|
223
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
92
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
|
|
224
93
|
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
225
94
|
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
226
95
|
try {
|
|
@@ -370,217 +239,83 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
|
|
|
370
239
|
};
|
|
371
240
|
}, "dateRange");
|
|
372
241
|
|
|
373
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
374
|
-
var
|
|
375
|
-
var
|
|
376
|
-
var
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
242
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
243
|
+
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
244
|
+
var leftOut = /* @__PURE__ */ __name((fields2) => fields2.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
245
|
+
var has = /* @__PURE__ */ __name((fields2, operator) => fields2.some((field) => field.operators.includes(operator)), "has");
|
|
246
|
+
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
247
|
+
"field:value",
|
|
248
|
+
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
249
|
+
...has(shown, "wildcard") ? ["word*"] : [],
|
|
250
|
+
...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
|
|
251
|
+
...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
|
|
252
|
+
].join(" \xB7 "), "syntaxOf");
|
|
253
|
+
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
254
|
+
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
255
|
+
const shown = shownOf(registry);
|
|
256
|
+
const negatable = leftOut(shown);
|
|
257
|
+
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
258
|
+
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
259
|
+
return [
|
|
260
|
+
"Fields:",
|
|
261
|
+
...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
262
|
+
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
263
|
+
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
264
|
+
`Syntax: ${syntaxOf(shown, registry.backend)}`,
|
|
265
|
+
...guide ? [`Guide: ${guide}`] : []
|
|
266
|
+
].join("\n");
|
|
267
|
+
}, "fieldsHelp");
|
|
268
|
+
var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
269
|
+
const shown = shownOf(registry);
|
|
270
|
+
if (shown.length === 0)
|
|
271
|
+
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
272
|
+
const negatable = leftOut(shown);
|
|
273
|
+
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
274
|
+
const fields2 = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
275
|
+
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
276
|
+
return `${terms}; fields: ${fields2.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
277
|
+
}, "queryDescription");
|
|
278
|
+
|
|
279
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
280
|
+
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
281
|
+
var reserved = /* @__PURE__ */ new Set([
|
|
282
|
+
"+",
|
|
283
|
+
"-",
|
|
284
|
+
"!",
|
|
285
|
+
"(",
|
|
286
|
+
")",
|
|
287
|
+
":",
|
|
288
|
+
"=",
|
|
289
|
+
"^",
|
|
290
|
+
"@",
|
|
291
|
+
"<",
|
|
292
|
+
">",
|
|
293
|
+
"[",
|
|
294
|
+
"]",
|
|
295
|
+
'"',
|
|
296
|
+
"{",
|
|
297
|
+
"}",
|
|
298
|
+
"~",
|
|
299
|
+
"\\",
|
|
300
|
+
"/"
|
|
301
|
+
]);
|
|
302
|
+
var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
|
|
303
|
+
let out = "";
|
|
304
|
+
for (let at = 0; at < raw.length; at++) {
|
|
305
|
+
if (raw[at] !== "\\") {
|
|
306
|
+
out += raw[at];
|
|
307
|
+
continue;
|
|
403
308
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
const field = byName.get(node.field);
|
|
416
|
-
if (!field)
|
|
417
|
-
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
418
|
-
if (field.relation !== void 0) {
|
|
419
|
-
if (!options.relation)
|
|
420
|
-
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
421
|
-
return options.relation(node, item);
|
|
422
|
-
}
|
|
423
|
-
const value = item[node.field];
|
|
424
|
-
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
425
|
-
}, "matches");
|
|
426
|
-
var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
|
|
427
|
-
|
|
428
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
429
|
-
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
430
|
-
var OPERATORS_BY_TYPE = {
|
|
431
|
-
kw: ["term", "phrase", "wildcard"],
|
|
432
|
-
txt: ["term", "phrase", "wildcard"],
|
|
433
|
-
enum: ["term"],
|
|
434
|
-
num: ["term", "range"],
|
|
435
|
-
time: ["term", "range"],
|
|
436
|
-
bool: ["term"],
|
|
437
|
-
ref: ["term", "phrase"]
|
|
438
|
-
};
|
|
439
|
-
var QUERY_BACKENDS = ["sql", "native"];
|
|
440
|
-
var unwrap = /* @__PURE__ */ __name((schema) => schema.wrapped ? unwrap(schema.wrapped) : schema, "unwrap");
|
|
441
|
-
var REFERENCE_SOURCE = reference.pipe[1].requirement.source;
|
|
442
|
-
var typeOf = /* @__PURE__ */ __name((schema) => {
|
|
443
|
-
const plain = unwrap(schema);
|
|
444
|
-
const actions = plain.pipe ?? [];
|
|
445
|
-
switch (plain.type) {
|
|
446
|
-
case "picklist":
|
|
447
|
-
return { type: "enum", values: (plain.options ?? []).map(String) };
|
|
448
|
-
case "number":
|
|
449
|
-
return { type: "num" };
|
|
450
|
-
case "boolean":
|
|
451
|
-
return { type: "bool" };
|
|
452
|
-
case "string":
|
|
453
|
-
if (actions.some((action) => action.type === "iso_timestamp"))
|
|
454
|
-
return { type: "time" };
|
|
455
|
-
if (actions.some((action) => action.requirement instanceof RegExp && action.requirement.source === REFERENCE_SOURCE))
|
|
456
|
-
return { type: "ref" };
|
|
457
|
-
return { type: "kw" };
|
|
458
|
-
case "array":
|
|
459
|
-
return plain.item ? typeOf(plain.item) : void 0;
|
|
460
|
-
default:
|
|
461
|
-
return void 0;
|
|
462
|
-
}
|
|
463
|
-
}, "typeOf");
|
|
464
|
-
var exampleOf = /* @__PURE__ */ __name((name, type, values) => ({
|
|
465
|
-
kw: `${name}:abc`,
|
|
466
|
-
txt: `${name}:word*`,
|
|
467
|
-
enum: `${name}:${values?.[0] ?? "x"}`,
|
|
468
|
-
num: `${name}>0`,
|
|
469
|
-
time: `${name}>=7d`,
|
|
470
|
-
bool: `${name}:true`,
|
|
471
|
-
ref: `${name}:"note:42"`
|
|
472
|
-
})[type], "exampleOf");
|
|
473
|
-
var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
474
|
-
const entries = unwrap(schema).entries ?? {};
|
|
475
|
-
const excluded = new Set(annotations.exclude ?? []);
|
|
476
|
-
const words2 = new Set(annotations.text ?? []);
|
|
477
|
-
const native = new Set(annotations.native ?? []);
|
|
478
|
-
const negatable = new Set(annotations.negatable ?? []);
|
|
479
|
-
const finish = /* @__PURE__ */ __name((field) => ({
|
|
480
|
-
...field,
|
|
481
|
-
operators: OPERATORS_BY_TYPE[field.type],
|
|
482
|
-
example: annotations.examples?.[field.name] ?? field.example ?? exampleOf(field.name, field.type, field.values),
|
|
483
|
-
...native.has(field.name) ? { native: true } : {},
|
|
484
|
-
...negatable.has(field.name) ? { negatable: true } : {},
|
|
485
|
-
...annotations.validate?.[field.name] ? { validate: annotations.validate[field.name] } : {}
|
|
486
|
-
}), "finish");
|
|
487
|
-
const own = Object.entries(entries).flatMap(([name, entry]) => {
|
|
488
|
-
if (excluded.has(name))
|
|
489
|
-
return [];
|
|
490
|
-
const found = typeOf(entry);
|
|
491
|
-
if (!found)
|
|
492
|
-
return [];
|
|
493
|
-
return [finish({ name, ...found, ...words2.has(name) && found.type === "kw" ? { type: "txt" } : {} })];
|
|
494
|
-
});
|
|
495
|
-
const relations = Object.entries(annotations.relations ?? {}).map(([name, relation]) => finish({ name, ...relation }));
|
|
496
|
-
const states = annotations.states ? [
|
|
497
|
-
finish({
|
|
498
|
-
name: "is",
|
|
499
|
-
type: "enum",
|
|
500
|
-
values: Object.keys(annotations.states),
|
|
501
|
-
relation: Object.entries(annotations.states).map(([state, meaning]) => `${state}: ${meaning}`).join("; ")
|
|
502
|
-
})
|
|
503
|
-
] : [];
|
|
504
|
-
return [...own, ...relations, ...states];
|
|
505
|
-
}, "queryFieldsOf");
|
|
506
|
-
|
|
507
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
508
|
-
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
509
|
-
var leftOut = /* @__PURE__ */ __name((fields2) => fields2.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
510
|
-
var has = /* @__PURE__ */ __name((fields2, operator) => fields2.some((field) => field.operators.includes(operator)), "has");
|
|
511
|
-
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
512
|
-
"field:value",
|
|
513
|
-
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
514
|
-
...has(shown, "wildcard") ? ["word*"] : [],
|
|
515
|
-
...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
|
|
516
|
-
...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
|
|
517
|
-
].join(" \xB7 "), "syntaxOf");
|
|
518
|
-
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
519
|
-
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
520
|
-
const shown = shownOf(registry);
|
|
521
|
-
const negatable = leftOut(shown);
|
|
522
|
-
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
523
|
-
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
524
|
-
return [
|
|
525
|
-
"Fields:",
|
|
526
|
-
...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
527
|
-
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
528
|
-
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
529
|
-
`Syntax: ${syntaxOf(shown, registry.backend)}`,
|
|
530
|
-
...guide ? [`Guide: ${guide}`] : []
|
|
531
|
-
].join("\n");
|
|
532
|
-
}, "fieldsHelp");
|
|
533
|
-
var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
534
|
-
const shown = shownOf(registry);
|
|
535
|
-
if (shown.length === 0)
|
|
536
|
-
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
537
|
-
const negatable = leftOut(shown);
|
|
538
|
-
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
539
|
-
const fields2 = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
540
|
-
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
541
|
-
return `${terms}; fields: ${fields2.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
542
|
-
}, "queryDescription");
|
|
543
|
-
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.109.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
545
|
-
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
546
|
-
var reserved = /* @__PURE__ */ new Set([
|
|
547
|
-
"+",
|
|
548
|
-
"-",
|
|
549
|
-
"!",
|
|
550
|
-
"(",
|
|
551
|
-
")",
|
|
552
|
-
":",
|
|
553
|
-
"=",
|
|
554
|
-
"^",
|
|
555
|
-
"@",
|
|
556
|
-
"<",
|
|
557
|
-
">",
|
|
558
|
-
"[",
|
|
559
|
-
"]",
|
|
560
|
-
'"',
|
|
561
|
-
"{",
|
|
562
|
-
"}",
|
|
563
|
-
"~",
|
|
564
|
-
"\\",
|
|
565
|
-
"/"
|
|
566
|
-
]);
|
|
567
|
-
var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
|
|
568
|
-
let out = "";
|
|
569
|
-
for (let at = 0; at < raw.length; at++) {
|
|
570
|
-
if (raw[at] !== "\\") {
|
|
571
|
-
out += raw[at];
|
|
572
|
-
continue;
|
|
573
|
-
}
|
|
574
|
-
if (++at >= raw.length)
|
|
575
|
-
fail("query.invalid-escape", span);
|
|
576
|
-
if (raw[at] === "u") {
|
|
577
|
-
const hex = raw.slice(at + 1, at + 5);
|
|
578
|
-
if (!/^[0-9a-fA-F]{4}$/.test(hex))
|
|
579
|
-
fail("query.invalid-escape", span);
|
|
580
|
-
out += String.fromCharCode(Number.parseInt(hex, 16));
|
|
581
|
-
at += 4;
|
|
582
|
-
} else
|
|
583
|
-
out += raw[at];
|
|
309
|
+
if (++at >= raw.length)
|
|
310
|
+
fail("query.invalid-escape", span);
|
|
311
|
+
if (raw[at] === "u") {
|
|
312
|
+
const hex = raw.slice(at + 1, at + 5);
|
|
313
|
+
if (!/^[0-9a-fA-F]{4}$/.test(hex))
|
|
314
|
+
fail("query.invalid-escape", span);
|
|
315
|
+
out += String.fromCharCode(Number.parseInt(hex, 16));
|
|
316
|
+
at += 4;
|
|
317
|
+
} else
|
|
318
|
+
out += raw[at];
|
|
584
319
|
}
|
|
585
320
|
return out;
|
|
586
321
|
}, "decodeEscapes");
|
|
@@ -850,7 +585,141 @@ var implicitTextTerms = /* @__PURE__ */ __name((text7) => {
|
|
|
850
585
|
return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
|
|
851
586
|
}, "implicitTextTerms");
|
|
852
587
|
|
|
853
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
588
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
|
|
589
|
+
var wordsOf = /* @__PURE__ */ __name((text7) => text7.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
590
|
+
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
591
|
+
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
592
|
+
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
593
|
+
if (!present(value))
|
|
594
|
+
return false;
|
|
595
|
+
if (node.operator === "wildcard" && node.value === "*")
|
|
596
|
+
return true;
|
|
597
|
+
const text7 = String(value);
|
|
598
|
+
switch (field.type) {
|
|
599
|
+
case "txt": {
|
|
600
|
+
const words2 = wordsOf(text7);
|
|
601
|
+
if (node.operator === "wildcard")
|
|
602
|
+
return words2.some((word2) => pattern(node.value).test(word2));
|
|
603
|
+
const wanted = wordsOf(node.value);
|
|
604
|
+
return words2.some((_, at) => wanted.every((word2, offset) => words2[at + offset] === word2));
|
|
605
|
+
}
|
|
606
|
+
case "num": {
|
|
607
|
+
const number2 = Number(value);
|
|
608
|
+
if (node.operator !== "range")
|
|
609
|
+
return number2 === Number(node.value);
|
|
610
|
+
const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
|
|
611
|
+
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
612
|
+
}
|
|
613
|
+
case "time": {
|
|
614
|
+
const time = Date.parse(text7);
|
|
615
|
+
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
616
|
+
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
617
|
+
return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
|
|
618
|
+
}
|
|
619
|
+
default:
|
|
620
|
+
return node.operator === "wildcard" ? pattern(node.value).test(text7) : text7.toLowerCase() === node.value.toLowerCase();
|
|
621
|
+
}
|
|
622
|
+
}, "matchOne");
|
|
623
|
+
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
624
|
+
if (node.kind === "boolean") {
|
|
625
|
+
const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
|
|
626
|
+
const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
|
|
627
|
+
const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
|
|
628
|
+
return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
|
|
629
|
+
}
|
|
630
|
+
const field = byName.get(node.field);
|
|
631
|
+
if (!field)
|
|
632
|
+
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
633
|
+
if (field.relation !== void 0) {
|
|
634
|
+
if (!options.relation)
|
|
635
|
+
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
636
|
+
return options.relation(node, item);
|
|
637
|
+
}
|
|
638
|
+
const value = item[node.field];
|
|
639
|
+
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
640
|
+
}, "matches");
|
|
641
|
+
var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
|
|
642
|
+
|
|
643
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
644
|
+
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
645
|
+
var OPERATORS_BY_TYPE = {
|
|
646
|
+
kw: ["term", "phrase", "wildcard"],
|
|
647
|
+
txt: ["term", "phrase", "wildcard"],
|
|
648
|
+
enum: ["term"],
|
|
649
|
+
num: ["term", "range"],
|
|
650
|
+
time: ["term", "range"],
|
|
651
|
+
bool: ["term"],
|
|
652
|
+
ref: ["term", "phrase"]
|
|
653
|
+
};
|
|
654
|
+
var QUERY_BACKENDS = ["sql", "native"];
|
|
655
|
+
var unwrap = /* @__PURE__ */ __name((schema) => schema.wrapped ? unwrap(schema.wrapped) : schema, "unwrap");
|
|
656
|
+
var REFERENCE_SOURCE = reference.pipe[1].requirement.source;
|
|
657
|
+
var typeOf = /* @__PURE__ */ __name((schema) => {
|
|
658
|
+
const plain = unwrap(schema);
|
|
659
|
+
const actions = plain.pipe ?? [];
|
|
660
|
+
switch (plain.type) {
|
|
661
|
+
case "picklist":
|
|
662
|
+
return { type: "enum", values: (plain.options ?? []).map(String) };
|
|
663
|
+
case "number":
|
|
664
|
+
return { type: "num" };
|
|
665
|
+
case "boolean":
|
|
666
|
+
return { type: "bool" };
|
|
667
|
+
case "string":
|
|
668
|
+
if (actions.some((action) => action.type === "iso_timestamp"))
|
|
669
|
+
return { type: "time" };
|
|
670
|
+
if (actions.some((action) => action.requirement instanceof RegExp && action.requirement.source === REFERENCE_SOURCE))
|
|
671
|
+
return { type: "ref" };
|
|
672
|
+
return { type: "kw" };
|
|
673
|
+
case "array":
|
|
674
|
+
return plain.item ? typeOf(plain.item) : void 0;
|
|
675
|
+
default:
|
|
676
|
+
return void 0;
|
|
677
|
+
}
|
|
678
|
+
}, "typeOf");
|
|
679
|
+
var exampleOf = /* @__PURE__ */ __name((name, type, values) => ({
|
|
680
|
+
kw: `${name}:abc`,
|
|
681
|
+
txt: `${name}:word*`,
|
|
682
|
+
enum: `${name}:${values?.[0] ?? "x"}`,
|
|
683
|
+
num: `${name}>0`,
|
|
684
|
+
time: `${name}>=7d`,
|
|
685
|
+
bool: `${name}:true`,
|
|
686
|
+
ref: `${name}:"note:42"`
|
|
687
|
+
})[type], "exampleOf");
|
|
688
|
+
var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
689
|
+
const entries = unwrap(schema).entries ?? {};
|
|
690
|
+
const excluded = new Set(annotations.exclude ?? []);
|
|
691
|
+
const words2 = new Set(annotations.text ?? []);
|
|
692
|
+
const native = new Set(annotations.native ?? []);
|
|
693
|
+
const negatable = new Set(annotations.negatable ?? []);
|
|
694
|
+
const finish = /* @__PURE__ */ __name((field) => ({
|
|
695
|
+
...field,
|
|
696
|
+
operators: OPERATORS_BY_TYPE[field.type],
|
|
697
|
+
example: annotations.examples?.[field.name] ?? field.example ?? exampleOf(field.name, field.type, field.values),
|
|
698
|
+
...native.has(field.name) ? { native: true } : {},
|
|
699
|
+
...negatable.has(field.name) ? { negatable: true } : {},
|
|
700
|
+
...annotations.validate?.[field.name] ? { validate: annotations.validate[field.name] } : {}
|
|
701
|
+
}), "finish");
|
|
702
|
+
const own = Object.entries(entries).flatMap(([name, entry]) => {
|
|
703
|
+
if (excluded.has(name))
|
|
704
|
+
return [];
|
|
705
|
+
const found = typeOf(entry);
|
|
706
|
+
if (!found)
|
|
707
|
+
return [];
|
|
708
|
+
return [finish({ name, ...found, ...words2.has(name) && found.type === "kw" ? { type: "txt" } : {} })];
|
|
709
|
+
});
|
|
710
|
+
const relations = Object.entries(annotations.relations ?? {}).map(([name, relation]) => finish({ name, ...relation }));
|
|
711
|
+
const states = annotations.states ? [
|
|
712
|
+
finish({
|
|
713
|
+
name: "is",
|
|
714
|
+
type: "enum",
|
|
715
|
+
values: Object.keys(annotations.states),
|
|
716
|
+
relation: Object.entries(annotations.states).map(([state, meaning]) => `${state}: ${meaning}`).join("; ")
|
|
717
|
+
})
|
|
718
|
+
] : [];
|
|
719
|
+
return [...own, ...relations, ...states];
|
|
720
|
+
}, "queryFieldsOf");
|
|
721
|
+
|
|
722
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
|
|
854
723
|
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
855
724
|
try {
|
|
856
725
|
run2();
|
|
@@ -925,7 +794,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
|
925
794
|
}, "validateQuery");
|
|
926
795
|
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
927
796
|
|
|
928
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
797
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
|
|
929
798
|
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
930
799
|
entity: registry.entity,
|
|
931
800
|
backend: registry.backend,
|
|
@@ -996,7 +865,138 @@ var QUERY_REASONS = defineReasons([
|
|
|
996
865
|
details: [...SPAN, ...details]
|
|
997
866
|
})));
|
|
998
867
|
|
|
999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
869
|
+
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
870
|
+
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
871
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
872
|
+
throw invalid();
|
|
873
|
+
return value;
|
|
874
|
+
}, "integer");
|
|
875
|
+
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
876
|
+
const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
877
|
+
if (reference2.transcriptId !== void 0)
|
|
878
|
+
parts.push(integer2(reference2.transcriptId));
|
|
879
|
+
if (reference2.cuePosition !== void 0) {
|
|
880
|
+
if (reference2.transcriptId === void 0)
|
|
881
|
+
throw invalid();
|
|
882
|
+
parts.push(integer2(reference2.cuePosition, 0));
|
|
883
|
+
}
|
|
884
|
+
return `meeting:${parts.join("/")}`;
|
|
885
|
+
}, "formatMeetingReference");
|
|
886
|
+
var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
887
|
+
const value = text7.trim();
|
|
888
|
+
if (!value.startsWith("meeting:"))
|
|
889
|
+
throw invalid();
|
|
890
|
+
const parts = value.slice(8).split("/");
|
|
891
|
+
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
892
|
+
throw invalid();
|
|
893
|
+
const ids2 = parts.map(Number);
|
|
894
|
+
const reference2 = {
|
|
895
|
+
type: "meeting",
|
|
896
|
+
accountId: integer2(ids2[0]),
|
|
897
|
+
meetingId: integer2(ids2[1]),
|
|
898
|
+
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
899
|
+
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
900
|
+
};
|
|
901
|
+
return reference2;
|
|
902
|
+
}, "parseMeetingReference");
|
|
903
|
+
var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
|
|
904
|
+
|
|
905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
906
|
+
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
907
|
+
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
908
|
+
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
909
|
+
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
910
|
+
throw new CliError("validation_error", message);
|
|
911
|
+
}, "invalid");
|
|
912
|
+
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
913
|
+
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
914
|
+
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
915
|
+
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
916
|
+
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
917
|
+
if (!match)
|
|
918
|
+
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
919
|
+
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
920
|
+
if (amount === "0.00")
|
|
921
|
+
return invalid2("a payment's amount is more than 0");
|
|
922
|
+
return amount;
|
|
923
|
+
}, "amountOf");
|
|
924
|
+
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
925
|
+
const date = typeof value === "string" ? value.trim() : "";
|
|
926
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
927
|
+
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
928
|
+
return date;
|
|
929
|
+
}, "dateOf");
|
|
930
|
+
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
931
|
+
if (value === void 0 || value === null)
|
|
932
|
+
return null;
|
|
933
|
+
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
934
|
+
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
935
|
+
return value.trim();
|
|
936
|
+
}, "optionalText");
|
|
937
|
+
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
938
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
939
|
+
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
940
|
+
return value;
|
|
941
|
+
}, "oneOf");
|
|
942
|
+
var FIELDS = [
|
|
943
|
+
"amount",
|
|
944
|
+
"currency",
|
|
945
|
+
"direction",
|
|
946
|
+
"counterparty",
|
|
947
|
+
"counterparty_name",
|
|
948
|
+
"due_at",
|
|
949
|
+
"state",
|
|
950
|
+
"item",
|
|
951
|
+
"paid_at"
|
|
952
|
+
];
|
|
953
|
+
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
954
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
955
|
+
return invalid2("a payment is an object");
|
|
956
|
+
const raw = input;
|
|
957
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
958
|
+
if (unknown.length)
|
|
959
|
+
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
960
|
+
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
961
|
+
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
962
|
+
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
963
|
+
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
964
|
+
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
965
|
+
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
966
|
+
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
967
|
+
if (raw.paid_at != null && state !== "paid")
|
|
968
|
+
return invalid2("only a paid payment has paid_at");
|
|
969
|
+
return {
|
|
970
|
+
amount: amountOf(raw.amount),
|
|
971
|
+
currency,
|
|
972
|
+
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
973
|
+
counterparty,
|
|
974
|
+
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
975
|
+
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
976
|
+
state,
|
|
977
|
+
item: optionalText(raw.item, "item", 200),
|
|
978
|
+
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
979
|
+
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
980
|
+
};
|
|
981
|
+
}, "validatePayment");
|
|
982
|
+
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
983
|
+
const [whole = "0", cents = "00"] = amount.split(".");
|
|
984
|
+
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
985
|
+
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
986
|
+
}, "grouped");
|
|
987
|
+
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
988
|
+
const payment = fact.payment;
|
|
989
|
+
if (!payment)
|
|
990
|
+
return "";
|
|
991
|
+
const who = payment.counterparty_name ?? payment.counterparty;
|
|
992
|
+
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
993
|
+
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
994
|
+
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
995
|
+
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
996
|
+
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
997
|
+
}, "paymentTitle");
|
|
998
|
+
|
|
999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
1000
1000
|
var context = {
|
|
1001
1001
|
command: "search meetings",
|
|
1002
1002
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -1118,7 +1118,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
|
|
|
1118
1118
|
return { version: 1, language: "lucene-v1", root };
|
|
1119
1119
|
}, "meetingWordsQuery");
|
|
1120
1120
|
|
|
1121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/search-store.js
|
|
1122
1122
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
1123
1123
|
let before = Number.POSITIVE_INFINITY;
|
|
1124
1124
|
for (; ; ) {
|
|
@@ -1135,7 +1135,7 @@ var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, sig
|
|
|
1135
1135
|
}
|
|
1136
1136
|
}, "refreshMeetingIndex");
|
|
1137
1137
|
|
|
1138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
1139
1139
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
1140
1140
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
1141
1141
|
if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
|
|
@@ -1156,7 +1156,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
1156
1156
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
1157
1157
|
}, "validateMeetingPassage");
|
|
1158
1158
|
|
|
1159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/search/service-query.js
|
|
1160
1160
|
var BACKENDS = ["archive", "server", "both"];
|
|
1161
1161
|
var MAX_BRANCHES = 64;
|
|
1162
1162
|
var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
|
|
@@ -1195,10 +1195,10 @@ var RELATIVE_TIME = /^\d+[mhd]$/i;
|
|
|
1195
1195
|
var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
1196
1196
|
var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
|
|
1197
1197
|
|
|
1198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/model.js
|
|
1199
1199
|
var MEETING_CALL_DIRECTIONS = ["in", "out"];
|
|
1200
1200
|
|
|
1201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
1202
1202
|
var text = string();
|
|
1203
1203
|
var count = pipe(number(), integer(), minValue(0));
|
|
1204
1204
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -1298,7 +1298,7 @@ var MEETING_QUERY = {
|
|
|
1298
1298
|
})
|
|
1299
1299
|
};
|
|
1300
1300
|
|
|
1301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/store.js
|
|
1302
1302
|
var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
|
|
1303
1303
|
var TRANSCRIPT_WORDS = [
|
|
1304
1304
|
"Transcript",
|
|
@@ -1310,7 +1310,7 @@ var TRANSCRIPT_WORDS = [
|
|
|
1310
1310
|
];
|
|
1311
1311
|
var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
|
|
1312
1312
|
|
|
1313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1314
1314
|
var text2 = string();
|
|
1315
1315
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1316
1316
|
var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
|
|
@@ -1594,7 +1594,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1594
1594
|
};
|
|
1595
1595
|
}, "meetingHitsList");
|
|
1596
1596
|
|
|
1597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1598
1598
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1599
1599
|
const parsed = urlOf(url);
|
|
1600
1600
|
if (!parsed)
|
|
@@ -1628,7 +1628,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
1628
1628
|
}
|
|
1629
1629
|
}, "urlOf");
|
|
1630
1630
|
|
|
1631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1632
1632
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1633
1633
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1634
1634
|
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
@@ -1665,7 +1665,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1665
1665
|
return kept;
|
|
1666
1666
|
}, "entryMetadata");
|
|
1667
1667
|
|
|
1668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/calls.js
|
|
1669
1669
|
var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
|
|
1670
1670
|
var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
|
|
1671
1671
|
var MISSED_OUTCOMES = ["voicemail", "busy", "no_answer"];
|
|
@@ -1734,7 +1734,7 @@ var callOf = /* @__PURE__ */ __name((stored) => {
|
|
|
1734
1734
|
};
|
|
1735
1735
|
}, "callOf");
|
|
1736
1736
|
|
|
1737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
|
|
1738
1738
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1739
1739
|
var ms = count3;
|
|
1740
1740
|
var id = pipe(number(), integer(), minValue(1));
|
|
@@ -1817,7 +1817,7 @@ var callStatsSchema = strictObject({
|
|
|
1817
1817
|
});
|
|
1818
1818
|
var callStats = callStatsSchema;
|
|
1819
1819
|
|
|
1820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
1821
1821
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
1822
1822
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
1823
1823
|
const zone = timeZone ?? "UTC";
|
|
@@ -1952,7 +1952,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
1952
1952
|
};
|
|
1953
1953
|
}, "aggregateMeetingStats");
|
|
1954
1954
|
|
|
1955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
|
|
1956
1956
|
var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
|
|
1957
1957
|
var SHORT_CALL_UNDER_MS = 3e4;
|
|
1958
1958
|
var MOST_MISSED = 100;
|
|
@@ -2142,7 +2142,7 @@ var aggregateCallStats = /* @__PURE__ */ __name((calls, options = {}) => {
|
|
|
2142
2142
|
};
|
|
2143
2143
|
}, "aggregateCallStats");
|
|
2144
2144
|
|
|
2145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
2146
2146
|
import { createHash } from "node:crypto";
|
|
2147
2147
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
2148
2148
|
reference: cue2.reference,
|
|
@@ -2156,7 +2156,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
2156
2156
|
text: cue2.text
|
|
2157
2157
|
})).digest("hex"), "meetingCueFingerprint");
|
|
2158
2158
|
|
|
2159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
2160
2160
|
var EVENT_QUERY = defineQuery({
|
|
2161
2161
|
entity: "event",
|
|
2162
2162
|
backend: "sql",
|
|
@@ -2172,7 +2172,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
2172
2172
|
]
|
|
2173
2173
|
});
|
|
2174
2174
|
|
|
2175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
2176
2176
|
var PARTICIPANT_RESPONSES = ["needs-action", "accepted", "tentative", "declined", "delegated"];
|
|
2177
2177
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
2178
2178
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
@@ -2196,7 +2196,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
2196
2196
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
2197
2197
|
}, "entryInWindow");
|
|
2198
2198
|
|
|
2199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
2200
2200
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
|
|
2201
2201
|
const current = await store.meeting(details.meeting.id);
|
|
2202
2202
|
if (!current)
|
|
@@ -2241,7 +2241,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
|
|
|
2241
2241
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
2242
2242
|
}, "linkEvent");
|
|
2243
2243
|
|
|
2244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
2245
2245
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
2246
2246
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
2247
2247
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -2265,7 +2265,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
2265
2265
|
};
|
|
2266
2266
|
}, "validateMeetingParticipantSearch");
|
|
2267
2267
|
|
|
2268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
2269
2269
|
var MeetingError = class extends CliError {
|
|
2270
2270
|
static {
|
|
2271
2271
|
__name(this, "MeetingError");
|
|
@@ -2404,7 +2404,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
|
|
|
2404
2404
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
2405
2405
|
}, "meetingSummaryAnswer");
|
|
2406
2406
|
|
|
2407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
2408
2408
|
var timestamp = /* @__PURE__ */ __name((milliseconds2) => {
|
|
2409
2409
|
if (!Number.isSafeInteger(milliseconds2) || milliseconds2 < 0)
|
|
2410
2410
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -2501,10 +2501,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
|
|
|
2501
2501
|
};
|
|
2502
2502
|
}, "exportMeeting");
|
|
2503
2503
|
|
|
2504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2505
2505
|
import { createHash as createHash2 } from "node:crypto";
|
|
2506
2506
|
|
|
2507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
2508
2508
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
2509
2509
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
2510
2510
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -2515,7 +2515,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
2515
2515
|
return new Date(value).toISOString();
|
|
2516
2516
|
}, "meetingTimestamp");
|
|
2517
2517
|
|
|
2518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2519
2519
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
2520
2520
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
2521
2521
|
throw new CliError("validation_error", message);
|
|
@@ -2690,7 +2690,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
2690
2690
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
2691
2691
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
2692
2692
|
|
|
2693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
2694
2694
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
2695
2695
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
2696
2696
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -2701,7 +2701,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
2701
2701
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
2702
2702
|
var meetingFindingFingerprint = findingFingerprint;
|
|
2703
2703
|
|
|
2704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2705
2705
|
var LATIN_WORDS = {
|
|
2706
2706
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2707
2707
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2750,7 +2750,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2750
2750
|
return null;
|
|
2751
2751
|
}, "transcriptLanguage");
|
|
2752
2752
|
|
|
2753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2754
2754
|
var contentHash = /* @__PURE__ */ __name(async (text7) => {
|
|
2755
2755
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
|
|
2756
2756
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2787,7 +2787,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
2787
2787
|
return time;
|
|
2788
2788
|
}, "timestamp");
|
|
2789
2789
|
|
|
2790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2791
2791
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2792
2792
|
const { identityExternalId, phone, ...fields2 } = p;
|
|
2793
2793
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -3003,7 +3003,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
3003
3003
|
return report;
|
|
3004
3004
|
}, "pull");
|
|
3005
3005
|
|
|
3006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
3007
3007
|
var TranscriptTextError = class extends Error {
|
|
3008
3008
|
static {
|
|
3009
3009
|
__name(this, "TranscriptTextError");
|
|
@@ -3058,7 +3058,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
3058
3058
|
return { header, lines };
|
|
3059
3059
|
}, "parseTranscriptText");
|
|
3060
3060
|
|
|
3061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
3062
3062
|
var VttError = class extends Error {
|
|
3063
3063
|
static {
|
|
3064
3064
|
__name(this, "VttError");
|
|
@@ -3110,7 +3110,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
3110
3110
|
return cues;
|
|
3111
3111
|
}, "parseVtt");
|
|
3112
3112
|
|
|
3113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
3114
3114
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
3115
3115
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
3116
3116
|
for (const file of files) {
|
|
@@ -3144,10 +3144,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
3144
3144
|
return report;
|
|
3145
3145
|
}, "importFiles");
|
|
3146
3146
|
|
|
3147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
3148
3148
|
var CHAT_MESSAGES_READ = 1e5;
|
|
3149
3149
|
|
|
3150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
3151
3151
|
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
3152
3152
|
const provider = scope2?.provider;
|
|
3153
3153
|
const account = scope2?.account;
|
|
@@ -3156,7 +3156,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
|
3156
3156
|
return Object.freeze({ provider, account });
|
|
3157
3157
|
}, "snapshotMeetingScope");
|
|
3158
3158
|
|
|
3159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
3160
3160
|
var MEETING_FIELD_KEYS = Object.freeze({
|
|
3161
3161
|
title: "title",
|
|
3162
3162
|
kind: "kind",
|
|
@@ -3188,7 +3188,7 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
|
|
|
3188
3188
|
return { applied: true, value: await dispatch(signal) };
|
|
3189
3189
|
}, "dispatchMeetingMutation");
|
|
3190
3190
|
|
|
3191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
3192
3192
|
var id2 = /* @__PURE__ */ __name((value) => {
|
|
3193
3193
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
3194
3194
|
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
@@ -3310,7 +3310,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
|
|
|
3310
3310
|
};
|
|
3311
3311
|
}, "createMeetingContext");
|
|
3312
3312
|
|
|
3313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
3314
3314
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
3315
3315
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3316
3316
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -3335,7 +3335,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
3335
3335
|
return { ...input, limit, maxReadBytes };
|
|
3336
3336
|
}, "validateMeetingPreparationContext");
|
|
3337
3337
|
|
|
3338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
3339
3339
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
3340
3340
|
var id3 = pipe(string(), minLength(1));
|
|
3341
3341
|
var meetingProjectEvidence = strictObject({
|
|
@@ -3456,7 +3456,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
3456
3456
|
};
|
|
3457
3457
|
}, "meetingProjectEvidenceAnswer");
|
|
3458
3458
|
|
|
3459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
3460
3460
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
3461
3461
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
3462
3462
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -3476,7 +3476,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
3476
3476
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
3477
3477
|
}, "validateMeetingHitSearch");
|
|
3478
3478
|
|
|
3479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3479
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
3480
3480
|
var ids = {
|
|
3481
3481
|
meeting_id: "meetingId",
|
|
3482
3482
|
identity_id: "participantIdentityId",
|
|
@@ -3567,7 +3567,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
3567
3567
|
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
3568
3568
|
}, "prepareMeetingProjectEvidence");
|
|
3569
3569
|
|
|
3570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
3571
3571
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
3572
3572
|
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
3573
3573
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -3575,7 +3575,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
|
|
|
3575
3575
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
3576
3576
|
}, "readMeetingProjectEvidence");
|
|
3577
3577
|
|
|
3578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
3579
3579
|
var text4 = string();
|
|
3580
3580
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
3581
3581
|
var id4 = pipe(number(), integer(), minValue(1));
|
|
@@ -3773,7 +3773,7 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3773
3773
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3774
3774
|
}), "eventItem");
|
|
3775
3775
|
|
|
3776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
|
|
3777
3777
|
var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
|
|
3778
3778
|
var ISSUES = {
|
|
3779
3779
|
offline: ["permission_error", "meetings.server-offline"],
|
|
@@ -4070,10 +4070,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
|
|
|
4070
4070
|
return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
|
|
4071
4071
|
}, "meetingShowThrough");
|
|
4072
4072
|
|
|
4073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
4074
4074
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
4075
4075
|
|
|
4076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
4077
4077
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
4078
4078
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
4079
4079
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -4103,7 +4103,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
4103
4103
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
4104
4104
|
}, "validateMeetingRelatedHistory");
|
|
4105
4105
|
|
|
4106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
4107
4107
|
var text5 = string();
|
|
4108
4108
|
var identifier = pipe(text5, minLength(1));
|
|
4109
4109
|
var nullableText = nullable(text5);
|
|
@@ -4275,14 +4275,14 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
4275
4275
|
meeting_repair: repair
|
|
4276
4276
|
};
|
|
4277
4277
|
|
|
4278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
4279
4279
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
4280
4280
|
|
|
4281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
4282
4282
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
4283
4283
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
4284
4284
|
|
|
4285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
4286
4286
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
4287
4287
|
input.signal?.throwIfAborted();
|
|
4288
4288
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -4303,10 +4303,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
4303
4303
|
return { ...input, limit, maxReadBytes };
|
|
4304
4304
|
}, "validateMeetingSeriesHistory");
|
|
4305
4305
|
|
|
4306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
4307
4307
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
4308
4308
|
|
|
4309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
4310
4310
|
function invalid4(field, response = false) {
|
|
4311
4311
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
4312
4312
|
}
|
|
@@ -4335,7 +4335,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
4335
4335
|
cursorDetails(value);
|
|
4336
4336
|
}, "validateMeetingSeriesInventoryCursor");
|
|
4337
4337
|
|
|
4338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
|
|
4339
4339
|
var text6 = string();
|
|
4340
4340
|
var storeId = pipe(number(), integer(), minValue(1));
|
|
4341
4341
|
var meetingTagChange = strictObject({
|