@finsys/core 4.5.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/adapter-categories.json +851 -1
- package/dist/index.cjs +915 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -10
- package/dist/index.d.ts +42 -10
- package/dist/index.js +913 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -61,11 +61,13 @@ __export(index_exports, {
|
|
|
61
61
|
buildDocumentRows: () => buildDocumentRows,
|
|
62
62
|
buildFileFieldTables: () => buildFileFieldTables,
|
|
63
63
|
buildFileFieldTablesFromInstances: () => buildFileFieldTablesFromInstances,
|
|
64
|
+
categoriesAttestingFact: () => categoriesAttestingFact,
|
|
64
65
|
categoryFieldsOf: () => categoryFieldsOf,
|
|
65
66
|
categoryForField: () => categoryForField,
|
|
66
67
|
categorySchemaOf: () => categorySchemaOf,
|
|
67
68
|
evaluateExpression: () => evaluateExpression,
|
|
68
69
|
extractTimePeriods: () => extractTimePeriods,
|
|
70
|
+
factOf: () => factOf,
|
|
69
71
|
formatDocumentSize: () => formatDocumentSize,
|
|
70
72
|
formatDocumentType: () => formatDocumentType,
|
|
71
73
|
formatDocumentUploaded: () => formatDocumentUploaded,
|
|
@@ -10321,7 +10323,7 @@ function applyAggregation(op, instances) {
|
|
|
10321
10323
|
|
|
10322
10324
|
// src/data/adapter-categories.json
|
|
10323
10325
|
var adapter_categories_default = {
|
|
10324
|
-
schemaVersion: "1.
|
|
10326
|
+
schemaVersion: "1.1.0",
|
|
10325
10327
|
categories: [
|
|
10326
10328
|
{
|
|
10327
10329
|
id: "telco-carrier",
|
|
@@ -10960,6 +10962,856 @@ var adapter_categories_default = {
|
|
|
10960
10962
|
description: "Net pay for the period."
|
|
10961
10963
|
}
|
|
10962
10964
|
]
|
|
10965
|
+
},
|
|
10966
|
+
{
|
|
10967
|
+
id: "finxtract-financial-statement",
|
|
10968
|
+
displayName: "Financial Statement (Document Extraction)",
|
|
10969
|
+
description: "Fields extracted from an uploaded audited financial-statement document by the host's extraction pipeline. One document = one audited financial statement carrying TWO declared periods per the period-axis contract: period1 is its current fiscal year, period2 is its prior comparative year. Metric names are bare in the flat vocabulary, like the bank-statement extraction category's.",
|
|
10970
|
+
canonicalTable: "ihsfinancialstatement",
|
|
10971
|
+
fields: [
|
|
10972
|
+
{
|
|
10973
|
+
name: "localNo",
|
|
10974
|
+
type: "string",
|
|
10975
|
+
description: "Company registration (local) number as stated on the document."
|
|
10976
|
+
},
|
|
10977
|
+
{
|
|
10978
|
+
name: "companyName",
|
|
10979
|
+
type: "string",
|
|
10980
|
+
fact: "companyName",
|
|
10981
|
+
description: "Company name as stated on the document. Attestation of the shared companyName fact \u2014 the SSM Form 9 extraction category attests the same fact from its own document."
|
|
10982
|
+
},
|
|
10983
|
+
{
|
|
10984
|
+
name: "financialYearEnd",
|
|
10985
|
+
type: "string",
|
|
10986
|
+
description: "Financial year end stated by the source document, normalized to ISO YYYY-MM-DD. Shared verbatim by every period the document carries \u2014 period identity comes from declared position, never from this date."
|
|
10987
|
+
},
|
|
10988
|
+
{
|
|
10989
|
+
name: "consolidated",
|
|
10990
|
+
type: "boolean",
|
|
10991
|
+
description: "Whether the statement reports consolidated (group-level) accounts."
|
|
10992
|
+
},
|
|
10993
|
+
{
|
|
10994
|
+
name: "currency",
|
|
10995
|
+
type: "string",
|
|
10996
|
+
description: "Reporting currency stated on the document."
|
|
10997
|
+
},
|
|
10998
|
+
{
|
|
10999
|
+
name: "year",
|
|
11000
|
+
type: "number",
|
|
11001
|
+
description: "1-based ordinal of this document within the applicant's uploaded statement sequence; document 1 covers the most recent fiscal years."
|
|
11002
|
+
},
|
|
11003
|
+
{
|
|
11004
|
+
name: "nonCurrentAssetsSubsidiaryCompanies",
|
|
11005
|
+
type: "number",
|
|
11006
|
+
unit: "MYR",
|
|
11007
|
+
description: "Non-current assets: subsidiary companies."
|
|
11008
|
+
},
|
|
11009
|
+
{
|
|
11010
|
+
name: "nonCurrentAssetsAssociatedCompanies",
|
|
11011
|
+
type: "number",
|
|
11012
|
+
unit: "MYR",
|
|
11013
|
+
description: "Non-current assets: associated companies."
|
|
11014
|
+
},
|
|
11015
|
+
{
|
|
11016
|
+
name: "nonCurrentAssetsDevelopmentPropertiesOrExpenditure",
|
|
11017
|
+
type: "number",
|
|
11018
|
+
unit: "MYR",
|
|
11019
|
+
description: "Non-current assets: development properties or expenditure."
|
|
11020
|
+
},
|
|
11021
|
+
{
|
|
11022
|
+
name: "nonCurrentAssetInvestmentProperties",
|
|
11023
|
+
type: "number",
|
|
11024
|
+
unit: "MYR",
|
|
11025
|
+
description: "Non-current assets: investment properties."
|
|
11026
|
+
},
|
|
11027
|
+
{
|
|
11028
|
+
name: "nonCurrentAssetsInvestments",
|
|
11029
|
+
type: "number",
|
|
11030
|
+
unit: "MYR",
|
|
11031
|
+
description: "Non-current assets: investments."
|
|
11032
|
+
},
|
|
11033
|
+
{
|
|
11034
|
+
name: "nonCurrentAssetInvestmentSecurities",
|
|
11035
|
+
type: "number",
|
|
11036
|
+
unit: "MYR",
|
|
11037
|
+
description: "Non-current assets: investment securities."
|
|
11038
|
+
},
|
|
11039
|
+
{
|
|
11040
|
+
name: "nonCurrentAssetDeferredAssets",
|
|
11041
|
+
type: "number",
|
|
11042
|
+
unit: "MYR",
|
|
11043
|
+
description: "Non-current assets: deferred assets."
|
|
11044
|
+
},
|
|
11045
|
+
{
|
|
11046
|
+
name: "nonCurrentAssetDeposits",
|
|
11047
|
+
type: "number",
|
|
11048
|
+
unit: "MYR",
|
|
11049
|
+
description: "Non-current assets: deposits."
|
|
11050
|
+
},
|
|
11051
|
+
{
|
|
11052
|
+
name: "nonCurrentAssetOwnGoodwill",
|
|
11053
|
+
type: "number",
|
|
11054
|
+
unit: "MYR",
|
|
11055
|
+
description: "Non-current assets: own goodwill."
|
|
11056
|
+
},
|
|
11057
|
+
{
|
|
11058
|
+
name: "nonCurrentAssetGoodwillOnConsolidation",
|
|
11059
|
+
type: "number",
|
|
11060
|
+
unit: "MYR",
|
|
11061
|
+
description: "Non-current assets: goodwill on consolidation."
|
|
11062
|
+
},
|
|
11063
|
+
{
|
|
11064
|
+
name: "nonCurrentAssetSinkingFund",
|
|
11065
|
+
type: "number",
|
|
11066
|
+
unit: "MYR",
|
|
11067
|
+
description: "Non-current assets: sinking fund."
|
|
11068
|
+
},
|
|
11069
|
+
{
|
|
11070
|
+
name: "nonCurrentAssetPropertyPlantEquipment",
|
|
11071
|
+
type: "number",
|
|
11072
|
+
unit: "MYR",
|
|
11073
|
+
description: "Non-current assets: property plant equipment."
|
|
11074
|
+
},
|
|
11075
|
+
{
|
|
11076
|
+
name: "nonCurrentAssetInventories",
|
|
11077
|
+
type: "number",
|
|
11078
|
+
unit: "MYR",
|
|
11079
|
+
description: "Non-current assets: inventories."
|
|
11080
|
+
},
|
|
11081
|
+
{
|
|
11082
|
+
name: "nonCurrentAssetRightOfUseAssets",
|
|
11083
|
+
type: "number",
|
|
11084
|
+
unit: "MYR",
|
|
11085
|
+
description: "Non-current assets: right of use assets."
|
|
11086
|
+
},
|
|
11087
|
+
{
|
|
11088
|
+
name: "nonCurrentAssetIntangibleAssets",
|
|
11089
|
+
type: "number",
|
|
11090
|
+
unit: "MYR",
|
|
11091
|
+
description: "Non-current assets: intangible assets."
|
|
11092
|
+
},
|
|
11093
|
+
{
|
|
11094
|
+
name: "nonCurrentAssetPrepaidLeasePayments",
|
|
11095
|
+
type: "number",
|
|
11096
|
+
unit: "MYR",
|
|
11097
|
+
description: "Non-current assets: prepaid lease payments."
|
|
11098
|
+
},
|
|
11099
|
+
{
|
|
11100
|
+
name: "nonCurrentAssetFinancialAssetAtFairValue",
|
|
11101
|
+
type: "number",
|
|
11102
|
+
unit: "MYR",
|
|
11103
|
+
description: "Non-current assets: financial asset at fair value."
|
|
11104
|
+
},
|
|
11105
|
+
{
|
|
11106
|
+
name: "nonCurrentAssetLandUseRight",
|
|
11107
|
+
type: "number",
|
|
11108
|
+
unit: "MYR",
|
|
11109
|
+
description: "Non-current assets: land use right."
|
|
11110
|
+
},
|
|
11111
|
+
{
|
|
11112
|
+
name: "nonCurrentAssetTradeReceivables",
|
|
11113
|
+
type: "number",
|
|
11114
|
+
unit: "MYR",
|
|
11115
|
+
description: "Non-current assets: trade receivables."
|
|
11116
|
+
},
|
|
11117
|
+
{
|
|
11118
|
+
name: "nonCurrentAssetOtherReceivables",
|
|
11119
|
+
type: "number",
|
|
11120
|
+
unit: "MYR",
|
|
11121
|
+
description: "Non-current assets: other receivables."
|
|
11122
|
+
},
|
|
11123
|
+
{
|
|
11124
|
+
name: "nonCurrentAssetTradeAndOtherReceivables",
|
|
11125
|
+
type: "number",
|
|
11126
|
+
unit: "MYR",
|
|
11127
|
+
description: "Non-current assets: trade and other receivables."
|
|
11128
|
+
},
|
|
11129
|
+
{
|
|
11130
|
+
name: "nonCurrentAssetOtherReceivablesDepositsAndPrepayments",
|
|
11131
|
+
type: "number",
|
|
11132
|
+
unit: "MYR",
|
|
11133
|
+
description: "Non-current assets: other receivables deposits and prepayments."
|
|
11134
|
+
},
|
|
11135
|
+
{
|
|
11136
|
+
name: "totalNonCurrentAssets",
|
|
11137
|
+
type: "number",
|
|
11138
|
+
unit: "MYR",
|
|
11139
|
+
description: "Balance-sheet total: non-current assets."
|
|
11140
|
+
},
|
|
11141
|
+
{
|
|
11142
|
+
name: "currentAssetDevelopmentPropertiesOrExpenditure",
|
|
11143
|
+
type: "number",
|
|
11144
|
+
unit: "MYR",
|
|
11145
|
+
description: "Current assets: development properties or expenditure."
|
|
11146
|
+
},
|
|
11147
|
+
{
|
|
11148
|
+
name: "currentAssetShortTermInvestments",
|
|
11149
|
+
type: "number",
|
|
11150
|
+
unit: "MYR",
|
|
11151
|
+
description: "Current assets: short term investments."
|
|
11152
|
+
},
|
|
11153
|
+
{
|
|
11154
|
+
name: "currentAssetTradeDebtors",
|
|
11155
|
+
type: "number",
|
|
11156
|
+
unit: "MYR",
|
|
11157
|
+
description: "Current assets: trade debtors."
|
|
11158
|
+
},
|
|
11159
|
+
{
|
|
11160
|
+
name: "currentAssetShortTermDeposits",
|
|
11161
|
+
type: "number",
|
|
11162
|
+
unit: "MYR",
|
|
11163
|
+
description: "Current assets: short term deposits."
|
|
11164
|
+
},
|
|
11165
|
+
{
|
|
11166
|
+
name: "currentAssetAmountDueFromHoldingCompany",
|
|
11167
|
+
type: "number",
|
|
11168
|
+
unit: "MYR",
|
|
11169
|
+
description: "Current assets: amount due from holding company."
|
|
11170
|
+
},
|
|
11171
|
+
{
|
|
11172
|
+
name: "currentAssetAmountDueFromSubsidiaryCompanies",
|
|
11173
|
+
type: "number",
|
|
11174
|
+
unit: "MYR",
|
|
11175
|
+
description: "Current assets: amount due from subsidiary companies."
|
|
11176
|
+
},
|
|
11177
|
+
{
|
|
11178
|
+
name: "currentAssetAmountDueFromAssociatedCompanies",
|
|
11179
|
+
type: "number",
|
|
11180
|
+
unit: "MYR",
|
|
11181
|
+
description: "Current assets: amount due from associated companies."
|
|
11182
|
+
},
|
|
11183
|
+
{
|
|
11184
|
+
name: "currentAssetAmountDueFromDirector",
|
|
11185
|
+
type: "number",
|
|
11186
|
+
unit: "MYR",
|
|
11187
|
+
description: "Current assets: amount due from director."
|
|
11188
|
+
},
|
|
11189
|
+
{
|
|
11190
|
+
name: "currentAssetAmountDueFromCustomer",
|
|
11191
|
+
type: "number",
|
|
11192
|
+
unit: "MYR",
|
|
11193
|
+
description: "Current assets: amount due from customer."
|
|
11194
|
+
},
|
|
11195
|
+
{
|
|
11196
|
+
name: "currentAssetAmountOwingByShareholders",
|
|
11197
|
+
type: "number",
|
|
11198
|
+
unit: "MYR",
|
|
11199
|
+
description: "Current assets: amount owing by shareholders."
|
|
11200
|
+
},
|
|
11201
|
+
{
|
|
11202
|
+
name: "currentAssetInventories",
|
|
11203
|
+
type: "number",
|
|
11204
|
+
unit: "MYR",
|
|
11205
|
+
description: "Current assets: inventories."
|
|
11206
|
+
},
|
|
11207
|
+
{
|
|
11208
|
+
name: "currentAssetFinancialAssetAtFairValue",
|
|
11209
|
+
type: "number",
|
|
11210
|
+
unit: "MYR",
|
|
11211
|
+
description: "Current assets: financial asset at fair value."
|
|
11212
|
+
},
|
|
11213
|
+
{
|
|
11214
|
+
name: "currentAssetLandUseRight",
|
|
11215
|
+
type: "number",
|
|
11216
|
+
unit: "MYR",
|
|
11217
|
+
description: "Current assets: land use right."
|
|
11218
|
+
},
|
|
11219
|
+
{
|
|
11220
|
+
name: "currentAssetTaxRecoverable",
|
|
11221
|
+
type: "number",
|
|
11222
|
+
unit: "MYR",
|
|
11223
|
+
description: "Current assets: tax recoverable."
|
|
11224
|
+
},
|
|
11225
|
+
{
|
|
11226
|
+
name: "currentAssetContractAssets",
|
|
11227
|
+
type: "number",
|
|
11228
|
+
unit: "MYR",
|
|
11229
|
+
description: "Current assets: contract assets."
|
|
11230
|
+
},
|
|
11231
|
+
{
|
|
11232
|
+
name: "currentAssetCurrentTaxAssets",
|
|
11233
|
+
type: "number",
|
|
11234
|
+
unit: "MYR",
|
|
11235
|
+
description: "Current assets: current tax assets."
|
|
11236
|
+
},
|
|
11237
|
+
{
|
|
11238
|
+
name: "currentAssetPrepayments",
|
|
11239
|
+
type: "number",
|
|
11240
|
+
unit: "MYR",
|
|
11241
|
+
description: "Current assets: prepayments."
|
|
11242
|
+
},
|
|
11243
|
+
{
|
|
11244
|
+
name: "currentAssetDerivative",
|
|
11245
|
+
type: "number",
|
|
11246
|
+
unit: "MYR",
|
|
11247
|
+
description: "Current assets: derivative."
|
|
11248
|
+
},
|
|
11249
|
+
{
|
|
11250
|
+
name: "currentAssetCashAndBankBalances",
|
|
11251
|
+
type: "number",
|
|
11252
|
+
unit: "MYR",
|
|
11253
|
+
description: "Current assets: cash and bank balances."
|
|
11254
|
+
},
|
|
11255
|
+
{
|
|
11256
|
+
name: "currentAssetOtherReceivables",
|
|
11257
|
+
type: "number",
|
|
11258
|
+
unit: "MYR",
|
|
11259
|
+
description: "Current assets: other receivables."
|
|
11260
|
+
},
|
|
11261
|
+
{
|
|
11262
|
+
name: "currentAssetRestrictedCash",
|
|
11263
|
+
type: "number",
|
|
11264
|
+
unit: "MYR",
|
|
11265
|
+
description: "Current assets: restricted cash."
|
|
11266
|
+
},
|
|
11267
|
+
{
|
|
11268
|
+
name: "currentAssetCashAndCashEquivalents",
|
|
11269
|
+
type: "number",
|
|
11270
|
+
unit: "MYR",
|
|
11271
|
+
description: "Current assets: cash and cash equivalents."
|
|
11272
|
+
},
|
|
11273
|
+
{
|
|
11274
|
+
name: "currentAssetDepositsCashAndBankBalances",
|
|
11275
|
+
type: "number",
|
|
11276
|
+
unit: "MYR",
|
|
11277
|
+
description: "Current assets: deposits cash and bank balances."
|
|
11278
|
+
},
|
|
11279
|
+
{
|
|
11280
|
+
name: "currentAssetCashAtBanks",
|
|
11281
|
+
type: "number",
|
|
11282
|
+
unit: "MYR",
|
|
11283
|
+
description: "Current assets: cash at banks."
|
|
11284
|
+
},
|
|
11285
|
+
{
|
|
11286
|
+
name: "currentAssetCashOnHand",
|
|
11287
|
+
type: "number",
|
|
11288
|
+
unit: "MYR",
|
|
11289
|
+
description: "Current assets: cash on hand."
|
|
11290
|
+
},
|
|
11291
|
+
{
|
|
11292
|
+
name: "currentAssetDepositsAndPrepayments",
|
|
11293
|
+
type: "number",
|
|
11294
|
+
unit: "MYR",
|
|
11295
|
+
description: "Current assets: deposits and prepayments."
|
|
11296
|
+
},
|
|
11297
|
+
{
|
|
11298
|
+
name: "currentAssetTradeAndOtherReceivables",
|
|
11299
|
+
type: "number",
|
|
11300
|
+
unit: "MYR",
|
|
11301
|
+
description: "Current assets: trade and other receivables."
|
|
11302
|
+
},
|
|
11303
|
+
{
|
|
11304
|
+
name: "currentAssetOtherReceivablesDepositsAndPrepayments",
|
|
11305
|
+
type: "number",
|
|
11306
|
+
unit: "MYR",
|
|
11307
|
+
description: "Current assets: other receivables deposits and prepayments."
|
|
11308
|
+
},
|
|
11309
|
+
{
|
|
11310
|
+
name: "currentAssetOtherReceivablesAndDeposits",
|
|
11311
|
+
type: "number",
|
|
11312
|
+
unit: "MYR",
|
|
11313
|
+
description: "Current assets: other receivables and deposits."
|
|
11314
|
+
},
|
|
11315
|
+
{
|
|
11316
|
+
name: "currentAssetOtherReceivablesAndPrepayments",
|
|
11317
|
+
type: "number",
|
|
11318
|
+
unit: "MYR",
|
|
11319
|
+
description: "Current assets: other receivables and prepayments."
|
|
11320
|
+
},
|
|
11321
|
+
{
|
|
11322
|
+
name: "totalCurrentAssets",
|
|
11323
|
+
type: "number",
|
|
11324
|
+
unit: "MYR",
|
|
11325
|
+
description: "Balance-sheet total: current assets."
|
|
11326
|
+
},
|
|
11327
|
+
{
|
|
11328
|
+
name: "totalAssets",
|
|
11329
|
+
type: "number",
|
|
11330
|
+
unit: "MYR",
|
|
11331
|
+
description: "Balance-sheet total: assets."
|
|
11332
|
+
},
|
|
11333
|
+
{
|
|
11334
|
+
name: "currentLiabilitiesTradeCreditors",
|
|
11335
|
+
type: "number",
|
|
11336
|
+
unit: "MYR",
|
|
11337
|
+
description: "Current liabilities: trade creditors."
|
|
11338
|
+
},
|
|
11339
|
+
{
|
|
11340
|
+
name: "currentLiabilitiesHirePurchasePayables",
|
|
11341
|
+
type: "number",
|
|
11342
|
+
unit: "MYR",
|
|
11343
|
+
description: "Current liabilities: hire purchase payables."
|
|
11344
|
+
},
|
|
11345
|
+
{
|
|
11346
|
+
name: "currentLiabilitiesBankOverdraft",
|
|
11347
|
+
type: "number",
|
|
11348
|
+
unit: "MYR",
|
|
11349
|
+
description: "Current liabilities: bank overdraft."
|
|
11350
|
+
},
|
|
11351
|
+
{
|
|
11352
|
+
name: "currentLiabilitiesBankAcceptance",
|
|
11353
|
+
type: "number",
|
|
11354
|
+
unit: "MYR",
|
|
11355
|
+
description: "Current liabilities: bank acceptance."
|
|
11356
|
+
},
|
|
11357
|
+
{
|
|
11358
|
+
name: "currentLiabilitiesBorrowingsOrTermLoans",
|
|
11359
|
+
type: "number",
|
|
11360
|
+
unit: "MYR",
|
|
11361
|
+
description: "Current liabilities: borrowings or term loans."
|
|
11362
|
+
},
|
|
11363
|
+
{
|
|
11364
|
+
name: "currentLiabilitiesBankborrowings",
|
|
11365
|
+
type: "number",
|
|
11366
|
+
unit: "MYR",
|
|
11367
|
+
description: "Current liabilities: bank borrowings."
|
|
11368
|
+
},
|
|
11369
|
+
{
|
|
11370
|
+
name: "currentLiabilitiesAmountsOwingToHoldingCompany",
|
|
11371
|
+
type: "number",
|
|
11372
|
+
unit: "MYR",
|
|
11373
|
+
description: "Current liabilities: amounts owing to holding company."
|
|
11374
|
+
},
|
|
11375
|
+
{
|
|
11376
|
+
name: "currentLiabilitiesAmountsOwingToSubsidiaryCompanies",
|
|
11377
|
+
type: "number",
|
|
11378
|
+
unit: "MYR",
|
|
11379
|
+
description: "Current liabilities: amounts owing to subsidiary companies."
|
|
11380
|
+
},
|
|
11381
|
+
{
|
|
11382
|
+
name: "currentLiabilitiesAmountOwingToAssociatedCompanies",
|
|
11383
|
+
type: "number",
|
|
11384
|
+
unit: "MYR",
|
|
11385
|
+
description: "Current liabilities: amount owing to associated companies."
|
|
11386
|
+
},
|
|
11387
|
+
{
|
|
11388
|
+
name: "currentLiabilitiesAmountsOwingToDirector",
|
|
11389
|
+
type: "number",
|
|
11390
|
+
unit: "MYR",
|
|
11391
|
+
description: "Current liabilities: amounts owing to director."
|
|
11392
|
+
},
|
|
11393
|
+
{
|
|
11394
|
+
name: "currentLiabilitiesProvisionForTaxation",
|
|
11395
|
+
type: "number",
|
|
11396
|
+
unit: "MYR",
|
|
11397
|
+
description: "Current liabilities: provision for taxation."
|
|
11398
|
+
},
|
|
11399
|
+
{
|
|
11400
|
+
name: "currentLiabilitiesLeasePayables",
|
|
11401
|
+
type: "number",
|
|
11402
|
+
unit: "MYR",
|
|
11403
|
+
description: "Current liabilities: lease payables."
|
|
11404
|
+
},
|
|
11405
|
+
{
|
|
11406
|
+
name: "currentLiabilitiesFinanceLeasePayables",
|
|
11407
|
+
type: "number",
|
|
11408
|
+
unit: "MYR",
|
|
11409
|
+
description: "Current liabilities: finance lease payables."
|
|
11410
|
+
},
|
|
11411
|
+
{
|
|
11412
|
+
name: "currentLiabilitiesOtherPayables",
|
|
11413
|
+
type: "number",
|
|
11414
|
+
unit: "MYR",
|
|
11415
|
+
description: "Current liabilities: other payables."
|
|
11416
|
+
},
|
|
11417
|
+
{
|
|
11418
|
+
name: "currentLiabilitiesDividendPayables",
|
|
11419
|
+
type: "number",
|
|
11420
|
+
unit: "MYR",
|
|
11421
|
+
description: "Current liabilities: dividend payables."
|
|
11422
|
+
},
|
|
11423
|
+
{
|
|
11424
|
+
name: "currentLiabilitiesTradeAndOtherPayables",
|
|
11425
|
+
type: "number",
|
|
11426
|
+
unit: "MYR",
|
|
11427
|
+
description: "Current liabilities: trade and other payables."
|
|
11428
|
+
},
|
|
11429
|
+
{
|
|
11430
|
+
name: "currentLiabilitiesDepositsFromCustomers",
|
|
11431
|
+
type: "number",
|
|
11432
|
+
unit: "MYR",
|
|
11433
|
+
description: "Current liabilities: deposits from customers."
|
|
11434
|
+
},
|
|
11435
|
+
{
|
|
11436
|
+
name: "currentLiabilitiesOtherPayablesAccrualsAndDeposits",
|
|
11437
|
+
type: "number",
|
|
11438
|
+
unit: "MYR",
|
|
11439
|
+
description: "Current liabilities: other payables accruals and deposits."
|
|
11440
|
+
},
|
|
11441
|
+
{
|
|
11442
|
+
name: "currentLiabilitiesOtherPayablesAndAccruals",
|
|
11443
|
+
type: "number",
|
|
11444
|
+
unit: "MYR",
|
|
11445
|
+
description: "Current liabilities: other payables and accruals."
|
|
11446
|
+
},
|
|
11447
|
+
{
|
|
11448
|
+
name: "currentLiabilitiesContractLiabilities",
|
|
11449
|
+
type: "number",
|
|
11450
|
+
unit: "MYR",
|
|
11451
|
+
description: "Current liabilities: contract liabilities."
|
|
11452
|
+
},
|
|
11453
|
+
{
|
|
11454
|
+
name: "currentLiabilitiesDerivative",
|
|
11455
|
+
type: "number",
|
|
11456
|
+
unit: "MYR",
|
|
11457
|
+
description: "Current liabilities: derivative."
|
|
11458
|
+
},
|
|
11459
|
+
{
|
|
11460
|
+
name: "totalCurrentLiabilities",
|
|
11461
|
+
type: "number",
|
|
11462
|
+
unit: "MYR",
|
|
11463
|
+
description: "Balance-sheet total: current liabilities."
|
|
11464
|
+
},
|
|
11465
|
+
{
|
|
11466
|
+
name: "shortTermLiabilities",
|
|
11467
|
+
type: "number",
|
|
11468
|
+
unit: "MYR",
|
|
11469
|
+
description: "Balance-sheet total: short-term liabilities."
|
|
11470
|
+
},
|
|
11471
|
+
{
|
|
11472
|
+
name: "nonCurrentLiabilitiesBorrowingsOrTermLoans",
|
|
11473
|
+
type: "number",
|
|
11474
|
+
unit: "MYR",
|
|
11475
|
+
description: "Non-current liabilities: borrowings or term loans."
|
|
11476
|
+
},
|
|
11477
|
+
{
|
|
11478
|
+
name: "nonCurrentLiabilitiesBankBorrowings",
|
|
11479
|
+
type: "number",
|
|
11480
|
+
unit: "MYR",
|
|
11481
|
+
description: "Non-current liabilities: bank borrowings."
|
|
11482
|
+
},
|
|
11483
|
+
{
|
|
11484
|
+
name: "nonCurrentLiabilitiesLeaseObligations",
|
|
11485
|
+
type: "number",
|
|
11486
|
+
unit: "MYR",
|
|
11487
|
+
description: "Non-current liabilities: lease obligations."
|
|
11488
|
+
},
|
|
11489
|
+
{
|
|
11490
|
+
name: "nonCurrentLiabilitiesFinanceLeaseObligations",
|
|
11491
|
+
type: "number",
|
|
11492
|
+
unit: "MYR",
|
|
11493
|
+
description: "Non-current liabilities: finance lease obligations."
|
|
11494
|
+
},
|
|
11495
|
+
{
|
|
11496
|
+
name: "nonCurrentLiabilitiesDeferredTaxation",
|
|
11497
|
+
type: "number",
|
|
11498
|
+
unit: "MYR",
|
|
11499
|
+
description: "Non-current liabilities: deferred taxation."
|
|
11500
|
+
},
|
|
11501
|
+
{
|
|
11502
|
+
name: "nonCurrentLiabilitiesRetirementBenefits",
|
|
11503
|
+
type: "number",
|
|
11504
|
+
unit: "MYR",
|
|
11505
|
+
description: "Non-current liabilities: retirement benefits."
|
|
11506
|
+
},
|
|
11507
|
+
{
|
|
11508
|
+
name: "nonCurrentLiabilitiesHirePurchasePayables",
|
|
11509
|
+
type: "number",
|
|
11510
|
+
unit: "MYR",
|
|
11511
|
+
description: "Non-current liabilities: hire purchase payables."
|
|
11512
|
+
},
|
|
11513
|
+
{
|
|
11514
|
+
name: "nonCurrentLiabilitiesDepositsFromCustomers",
|
|
11515
|
+
type: "number",
|
|
11516
|
+
unit: "MYR",
|
|
11517
|
+
description: "Non-current liabilities: deposits from customers."
|
|
11518
|
+
},
|
|
11519
|
+
{
|
|
11520
|
+
name: "nonCurrentLiabilitiesContractLiabilities",
|
|
11521
|
+
type: "number",
|
|
11522
|
+
unit: "MYR",
|
|
11523
|
+
description: "Non-current liabilities: contract liabilities."
|
|
11524
|
+
},
|
|
11525
|
+
{
|
|
11526
|
+
name: "totalNonCurrentLiabilities",
|
|
11527
|
+
type: "number",
|
|
11528
|
+
unit: "MYR",
|
|
11529
|
+
description: "Balance-sheet total: non-current liabilities."
|
|
11530
|
+
},
|
|
11531
|
+
{
|
|
11532
|
+
name: "totalLiabilities",
|
|
11533
|
+
type: "number",
|
|
11534
|
+
unit: "MYR",
|
|
11535
|
+
description: "Balance-sheet total: liabilities."
|
|
11536
|
+
},
|
|
11537
|
+
{
|
|
11538
|
+
name: "shareCapital",
|
|
11539
|
+
type: "number",
|
|
11540
|
+
unit: "MYR",
|
|
11541
|
+
description: "Equity: share capital."
|
|
11542
|
+
},
|
|
11543
|
+
{
|
|
11544
|
+
name: "preferenceShareCapital",
|
|
11545
|
+
type: "number",
|
|
11546
|
+
unit: "MYR",
|
|
11547
|
+
description: "Equity: preference share capital."
|
|
11548
|
+
},
|
|
11549
|
+
{
|
|
11550
|
+
name: "sharePremium",
|
|
11551
|
+
type: "number",
|
|
11552
|
+
unit: "MYR",
|
|
11553
|
+
description: "Equity: share premium."
|
|
11554
|
+
},
|
|
11555
|
+
{
|
|
11556
|
+
name: "reserves",
|
|
11557
|
+
type: "number",
|
|
11558
|
+
unit: "MYR",
|
|
11559
|
+
description: "Equity: reserves."
|
|
11560
|
+
},
|
|
11561
|
+
{
|
|
11562
|
+
name: "capitalReserves",
|
|
11563
|
+
type: "number",
|
|
11564
|
+
unit: "MYR",
|
|
11565
|
+
description: "Equity: capital reserves."
|
|
11566
|
+
},
|
|
11567
|
+
{
|
|
11568
|
+
name: "revaluationReserves",
|
|
11569
|
+
type: "number",
|
|
11570
|
+
unit: "MYR",
|
|
11571
|
+
description: "Equity: revaluation reserves."
|
|
11572
|
+
},
|
|
11573
|
+
{
|
|
11574
|
+
name: "exchangeEqualisationOrFluctuationReserves",
|
|
11575
|
+
type: "number",
|
|
11576
|
+
unit: "MYR",
|
|
11577
|
+
description: "Equity: exchange equalisation or fluctuation reserves."
|
|
11578
|
+
},
|
|
11579
|
+
{
|
|
11580
|
+
name: "retainedEarnings",
|
|
11581
|
+
type: "number",
|
|
11582
|
+
unit: "MYR",
|
|
11583
|
+
description: "Equity: retained earnings."
|
|
11584
|
+
},
|
|
11585
|
+
{
|
|
11586
|
+
name: "totalEquity",
|
|
11587
|
+
type: "number",
|
|
11588
|
+
unit: "MYR",
|
|
11589
|
+
description: "Balance-sheet total: equity."
|
|
11590
|
+
},
|
|
11591
|
+
{
|
|
11592
|
+
name: "revenue",
|
|
11593
|
+
type: "number",
|
|
11594
|
+
unit: "MYR",
|
|
11595
|
+
description: "Income statement: revenue."
|
|
11596
|
+
},
|
|
11597
|
+
{
|
|
11598
|
+
name: "costOfGoodsSold",
|
|
11599
|
+
type: "number",
|
|
11600
|
+
unit: "MYR",
|
|
11601
|
+
description: "Income statement: cost of goods sold."
|
|
11602
|
+
},
|
|
11603
|
+
{
|
|
11604
|
+
name: "grossProfit",
|
|
11605
|
+
type: "number",
|
|
11606
|
+
unit: "MYR",
|
|
11607
|
+
description: "Income statement: gross profit."
|
|
11608
|
+
},
|
|
11609
|
+
{
|
|
11610
|
+
name: "otherIncome",
|
|
11611
|
+
type: "number",
|
|
11612
|
+
unit: "MYR",
|
|
11613
|
+
description: "Income statement: other income."
|
|
11614
|
+
},
|
|
11615
|
+
{
|
|
11616
|
+
name: "profitFromOperations",
|
|
11617
|
+
type: "number",
|
|
11618
|
+
unit: "MYR",
|
|
11619
|
+
description: "Income statement: profit from operations."
|
|
11620
|
+
},
|
|
11621
|
+
{
|
|
11622
|
+
name: "financeCost",
|
|
11623
|
+
type: "number",
|
|
11624
|
+
unit: "MYR",
|
|
11625
|
+
description: "Income statement: finance cost."
|
|
11626
|
+
},
|
|
11627
|
+
{
|
|
11628
|
+
name: "ebitda",
|
|
11629
|
+
type: "number",
|
|
11630
|
+
unit: "MYR",
|
|
11631
|
+
description: "Income statement: profit before tax (extracted from the statement's profit-before-tax line; canonical name kept verbatim from the host vocabulary)."
|
|
11632
|
+
},
|
|
11633
|
+
{
|
|
11634
|
+
name: "taxes",
|
|
11635
|
+
type: "number",
|
|
11636
|
+
unit: "MYR",
|
|
11637
|
+
description: "Income statement: taxes."
|
|
11638
|
+
},
|
|
11639
|
+
{
|
|
11640
|
+
name: "zakat",
|
|
11641
|
+
type: "number",
|
|
11642
|
+
unit: "MYR",
|
|
11643
|
+
description: "Income statement: zakat."
|
|
11644
|
+
},
|
|
11645
|
+
{
|
|
11646
|
+
name: "profitAfterTax",
|
|
11647
|
+
type: "number",
|
|
11648
|
+
unit: "MYR",
|
|
11649
|
+
description: "Income statement: profit after tax."
|
|
11650
|
+
},
|
|
11651
|
+
{
|
|
11652
|
+
name: "netProfit",
|
|
11653
|
+
type: "number",
|
|
11654
|
+
unit: "MYR",
|
|
11655
|
+
description: "Income statement: total comprehensive income for the financial year."
|
|
11656
|
+
},
|
|
11657
|
+
{
|
|
11658
|
+
name: "netOperatingCashFlow",
|
|
11659
|
+
type: "number",
|
|
11660
|
+
unit: "MYR",
|
|
11661
|
+
description: "Cash-flow statement: net cash flow used in / generated from operating activities."
|
|
11662
|
+
},
|
|
11663
|
+
{
|
|
11664
|
+
name: "depreciation",
|
|
11665
|
+
type: "number",
|
|
11666
|
+
unit: "MYR",
|
|
11667
|
+
description: "Cash-flow statement: depreciation."
|
|
11668
|
+
},
|
|
11669
|
+
{
|
|
11670
|
+
name: "depreciationOfPropertyPlantEquipment",
|
|
11671
|
+
type: "number",
|
|
11672
|
+
unit: "MYR",
|
|
11673
|
+
description: "Cash-flow statement: depreciation of property plant equipment."
|
|
11674
|
+
},
|
|
11675
|
+
{
|
|
11676
|
+
name: "depreciationRightOfUseAssets",
|
|
11677
|
+
type: "number",
|
|
11678
|
+
unit: "MYR",
|
|
11679
|
+
description: "Cash-flow statement: depreciation right of use assets."
|
|
11680
|
+
},
|
|
11681
|
+
{
|
|
11682
|
+
name: "depreciationOfInvestmentProperties",
|
|
11683
|
+
type: "number",
|
|
11684
|
+
unit: "MYR",
|
|
11685
|
+
description: "Cash-flow statement: depreciation of investment properties."
|
|
11686
|
+
},
|
|
11687
|
+
{
|
|
11688
|
+
name: "depreciationOfInvestmentSecurities",
|
|
11689
|
+
type: "number",
|
|
11690
|
+
unit: "MYR",
|
|
11691
|
+
description: "Cash-flow statement: depreciation of investment securities."
|
|
11692
|
+
},
|
|
11693
|
+
{
|
|
11694
|
+
name: "endOfYearCash",
|
|
11695
|
+
type: "number",
|
|
11696
|
+
unit: "MYR",
|
|
11697
|
+
description: "Cash-flow statement: cash and cash equivalents at the end of the financial year."
|
|
11698
|
+
}
|
|
11699
|
+
]
|
|
11700
|
+
},
|
|
11701
|
+
{
|
|
11702
|
+
id: "finxtract-form9",
|
|
11703
|
+
displayName: "SSM Form 9 (Document Extraction)",
|
|
11704
|
+
description: "Fields extracted from an uploaded SSM Form 9 (Certificate of Incorporation of Private Company) document by the host's extraction pipeline. One instance per uploaded document. The company name and incorporation date are attestations of shared facts \u2014 the company-profile and financial-statement extraction categories attest the same real-world facts from their own documents.",
|
|
11705
|
+
canonicalTable: "ihs_alt_data_form9",
|
|
11706
|
+
fields: [
|
|
11707
|
+
{
|
|
11708
|
+
name: "companyName",
|
|
11709
|
+
type: "string",
|
|
11710
|
+
fact: "companyName",
|
|
11711
|
+
description: "Company name as printed on the certificate. Attestation of the shared companyName fact."
|
|
11712
|
+
},
|
|
11713
|
+
{
|
|
11714
|
+
name: "companyRegNo",
|
|
11715
|
+
type: "string",
|
|
11716
|
+
description: "Company registration number as printed on the certificate."
|
|
11717
|
+
},
|
|
11718
|
+
{
|
|
11719
|
+
name: "companyIncorporationDate",
|
|
11720
|
+
type: "string",
|
|
11721
|
+
fact: "companyIncorporationDate",
|
|
11722
|
+
description: "Date of incorporation as printed on the certificate, normalized to ISO YYYY-MM-DD. Attestation of the shared companyIncorporationDate fact \u2014 a company has exactly one incorporation date regardless of which document it was extracted from."
|
|
11723
|
+
}
|
|
11724
|
+
]
|
|
11725
|
+
},
|
|
11726
|
+
{
|
|
11727
|
+
id: "finxtract-ssm",
|
|
11728
|
+
displayName: "SSM Company Profile (Document Extraction)",
|
|
11729
|
+
description: "Fields extracted from an uploaded SSM company-profile document (company or business registration extract) by the host's extraction pipeline. One instance per uploaded document. Covers registration identity, status, key dates, registered address, capital, and the officer/shareholder registers. The incorporation date is an attestation of a shared fact \u2014 the Form 9 extraction category attests the same real-world fact from its own document.",
|
|
11730
|
+
canonicalTable: "ihs_alt_data_ssm",
|
|
11731
|
+
fields: [
|
|
11732
|
+
{
|
|
11733
|
+
name: "ssmCompanyEntityType",
|
|
11734
|
+
type: "string",
|
|
11735
|
+
description: "Entity type stated on the profile (e.g. private limited company, enterprise)."
|
|
11736
|
+
},
|
|
11737
|
+
{
|
|
11738
|
+
name: "ssmCompanyName",
|
|
11739
|
+
type: "string",
|
|
11740
|
+
description: "Business or company name as stated on the profile."
|
|
11741
|
+
},
|
|
11742
|
+
{
|
|
11743
|
+
name: "ssmCompanyRegNo",
|
|
11744
|
+
type: "string",
|
|
11745
|
+
description: "Business or company registration number as stated on the profile."
|
|
11746
|
+
},
|
|
11747
|
+
{
|
|
11748
|
+
name: "companyStatus",
|
|
11749
|
+
type: "string",
|
|
11750
|
+
description: "Registration status as stated on the profile (e.g. existing, dissolved)."
|
|
11751
|
+
},
|
|
11752
|
+
{
|
|
11753
|
+
name: "businessOrigin",
|
|
11754
|
+
type: "string",
|
|
11755
|
+
description: "Business origin as stated on the profile."
|
|
11756
|
+
},
|
|
11757
|
+
{
|
|
11758
|
+
name: "companyIncorporationDate",
|
|
11759
|
+
type: "string",
|
|
11760
|
+
fact: "companyIncorporationDate",
|
|
11761
|
+
description: "Incorporation (or registration) date as stated on the profile, normalized to ISO YYYY-MM-DD. Attestation of the shared companyIncorporationDate fact \u2014 a company has exactly one incorporation date regardless of which document it was extracted from."
|
|
11762
|
+
},
|
|
11763
|
+
{
|
|
11764
|
+
name: "businessCommencementDate",
|
|
11765
|
+
type: "string",
|
|
11766
|
+
description: "Business commencement (or start) date as stated on the profile, normalized to ISO YYYY-MM-DD."
|
|
11767
|
+
},
|
|
11768
|
+
{
|
|
11769
|
+
name: "businessNature",
|
|
11770
|
+
type: "string",
|
|
11771
|
+
description: "Nature of business as stated on the profile."
|
|
11772
|
+
},
|
|
11773
|
+
{
|
|
11774
|
+
name: "registeredAddress",
|
|
11775
|
+
type: "string",
|
|
11776
|
+
description: "Registered business address as stated on the profile."
|
|
11777
|
+
},
|
|
11778
|
+
{
|
|
11779
|
+
name: "totalShareIssued",
|
|
11780
|
+
type: "number",
|
|
11781
|
+
description: "Total shares issued as stated on the profile."
|
|
11782
|
+
},
|
|
11783
|
+
{
|
|
11784
|
+
name: "ssmPaidUpCapital",
|
|
11785
|
+
type: "number",
|
|
11786
|
+
unit: "MYR",
|
|
11787
|
+
description: "Paid-up capital as stated on the profile (falls back to total shares issued when the profile omits an explicit paid-up figure)."
|
|
11788
|
+
},
|
|
11789
|
+
{
|
|
11790
|
+
name: "directors",
|
|
11791
|
+
type: "string",
|
|
11792
|
+
description: "JSON-encoded list of current directors/officers (for enterprises, the business owner normalized into the same shape)."
|
|
11793
|
+
},
|
|
11794
|
+
{
|
|
11795
|
+
name: "shareholders",
|
|
11796
|
+
type: "string",
|
|
11797
|
+
description: "JSON-encoded list of shareholders (for enterprises, the business owner normalized into the same shape)."
|
|
11798
|
+
},
|
|
11799
|
+
{
|
|
11800
|
+
name: "previousDirectors",
|
|
11801
|
+
type: "string",
|
|
11802
|
+
description: "JSON-encoded list of previous directors/officers."
|
|
11803
|
+
},
|
|
11804
|
+
{
|
|
11805
|
+
name: "companyLastOldName",
|
|
11806
|
+
type: "string",
|
|
11807
|
+
description: "The company's most recent former name, when the profile records a name change."
|
|
11808
|
+
},
|
|
11809
|
+
{
|
|
11810
|
+
name: "companyNameDateOfChange",
|
|
11811
|
+
type: "string",
|
|
11812
|
+
description: "Date of the most recent name change, normalized to ISO YYYY-MM-DD."
|
|
11813
|
+
}
|
|
11814
|
+
]
|
|
10963
11815
|
}
|
|
10964
11816
|
]
|
|
10965
11817
|
};
|
|
@@ -10982,6 +11834,9 @@ function buildCategoryRegistry(raw) {
|
|
|
10982
11834
|
}
|
|
10983
11835
|
const byId = /* @__PURE__ */ new Map();
|
|
10984
11836
|
const fieldToCategory = /* @__PURE__ */ new Map();
|
|
11837
|
+
const fieldToFact = /* @__PURE__ */ new Map();
|
|
11838
|
+
const factToCategories = /* @__PURE__ */ new Map();
|
|
11839
|
+
const declarations = /* @__PURE__ */ new Map();
|
|
10985
11840
|
const tables = /* @__PURE__ */ new Set();
|
|
10986
11841
|
const all = [];
|
|
10987
11842
|
for (const cat of raw.categories) {
|
|
@@ -11016,11 +11871,34 @@ function buildCategoryRegistry(raw) {
|
|
|
11016
11871
|
if (typeof f.name !== "string" || f.name.length === 0) {
|
|
11017
11872
|
throw new Error(`adapter category data: ${where} has a field with no name`);
|
|
11018
11873
|
}
|
|
11019
|
-
if (
|
|
11874
|
+
if (f.fact !== void 0 && (typeof f.fact !== "string" || f.fact.length === 0)) {
|
|
11020
11875
|
throw new Error(
|
|
11021
|
-
`adapter category data:
|
|
11876
|
+
`adapter category data: field "${f.name}" (${where}) has an invalid fact \u2014 expected a non-empty string`
|
|
11022
11877
|
);
|
|
11023
11878
|
}
|
|
11879
|
+
const prior = declarations.get(f.name);
|
|
11880
|
+
if (prior) {
|
|
11881
|
+
if (prior.categories.includes(cat.id)) {
|
|
11882
|
+
throw new Error(
|
|
11883
|
+
`adapter category data: ${where} declares field "${f.name}" more than once`
|
|
11884
|
+
);
|
|
11885
|
+
}
|
|
11886
|
+
if (prior.fact === void 0 || f.fact === void 0 || prior.fact !== f.fact) {
|
|
11887
|
+
const describeFact = (fact) => fact === void 0 ? "no fact" : `fact "${fact}"`;
|
|
11888
|
+
throw new Error(
|
|
11889
|
+
`adapter category data: canonical field "${f.name}" declared by more than one category (${prior.categories.join(" + ")} with ${describeFact(prior.fact)} + ${cat.id} with ${describeFact(f.fact)}) \u2014 field names must be globally unique unless every declaring category attests the same fact`
|
|
11890
|
+
);
|
|
11891
|
+
}
|
|
11892
|
+
}
|
|
11893
|
+
if (f.fact !== void 0) {
|
|
11894
|
+
for (const [otherName, otherFact] of fieldToFact) {
|
|
11895
|
+
if (otherFact === f.fact && otherName !== f.name) {
|
|
11896
|
+
throw new Error(
|
|
11897
|
+
`adapter category data: fact "${f.fact}" is carried by two different field names ("${otherName}" + "${f.name}") \u2014 a fact id must map to exactly one canonical field name`
|
|
11898
|
+
);
|
|
11899
|
+
}
|
|
11900
|
+
}
|
|
11901
|
+
}
|
|
11024
11902
|
if (!VALID_FIELD_TYPES.includes(f.type)) {
|
|
11025
11903
|
throw new Error(
|
|
11026
11904
|
`adapter category data: field "${f.name}" (${where}) has invalid type "${f.type}"`
|
|
@@ -11043,10 +11921,26 @@ function buildCategoryRegistry(raw) {
|
|
|
11043
11921
|
type: f.type,
|
|
11044
11922
|
...f.unit !== void 0 ? { unit: f.unit } : {},
|
|
11045
11923
|
...f.range !== void 0 ? { range: Object.freeze([f.range[0], f.range[1]]) } : {},
|
|
11046
|
-
description: f.description
|
|
11924
|
+
description: f.description,
|
|
11925
|
+
...f.fact !== void 0 ? { fact: f.fact } : {}
|
|
11047
11926
|
});
|
|
11048
11927
|
fields.push(spec);
|
|
11049
|
-
|
|
11928
|
+
if (prior) {
|
|
11929
|
+
prior.categories.push(cat.id);
|
|
11930
|
+
fieldToCategory.delete(f.name);
|
|
11931
|
+
} else {
|
|
11932
|
+
declarations.set(f.name, { fact: f.fact, categories: [cat.id] });
|
|
11933
|
+
fieldToCategory.set(f.name, cat.id);
|
|
11934
|
+
}
|
|
11935
|
+
if (f.fact !== void 0) {
|
|
11936
|
+
fieldToFact.set(f.name, f.fact);
|
|
11937
|
+
const attesters = factToCategories.get(f.fact);
|
|
11938
|
+
if (attesters) {
|
|
11939
|
+
attesters.push(cat.id);
|
|
11940
|
+
} else {
|
|
11941
|
+
factToCategories.set(f.fact, [cat.id]);
|
|
11942
|
+
}
|
|
11943
|
+
}
|
|
11050
11944
|
}
|
|
11051
11945
|
const schema = Object.freeze({
|
|
11052
11946
|
id: cat.id,
|
|
@@ -11063,7 +11957,14 @@ function buildCategoryRegistry(raw) {
|
|
|
11063
11957
|
all: Object.freeze(all),
|
|
11064
11958
|
ids: Object.freeze(all.map((c) => c.id)),
|
|
11065
11959
|
byId,
|
|
11066
|
-
fieldToCategory
|
|
11960
|
+
fieldToCategory,
|
|
11961
|
+
fieldToFact,
|
|
11962
|
+
factToCategories: new Map(
|
|
11963
|
+
[...factToCategories].map(([fact, cats]) => [
|
|
11964
|
+
fact,
|
|
11965
|
+
Object.freeze(cats)
|
|
11966
|
+
])
|
|
11967
|
+
)
|
|
11067
11968
|
});
|
|
11068
11969
|
}
|
|
11069
11970
|
var registry = buildCategoryRegistry(adapter_categories_default);
|
|
@@ -11086,6 +11987,12 @@ function allCategories() {
|
|
|
11086
11987
|
function categoryForField(field) {
|
|
11087
11988
|
return registry.fieldToCategory.get(field) ?? null;
|
|
11088
11989
|
}
|
|
11990
|
+
function factOf(field) {
|
|
11991
|
+
return registry.fieldToFact.get(field) ?? null;
|
|
11992
|
+
}
|
|
11993
|
+
function categoriesAttestingFact(factId) {
|
|
11994
|
+
return registry.factToCategories.get(factId) ?? [];
|
|
11995
|
+
}
|
|
11089
11996
|
function isAdapterCategory(id) {
|
|
11090
11997
|
return registry.byId.has(id);
|
|
11091
11998
|
}
|
|
@@ -11130,11 +12037,13 @@ function assertAdapterCategory(id) {
|
|
|
11130
12037
|
buildDocumentRows,
|
|
11131
12038
|
buildFileFieldTables,
|
|
11132
12039
|
buildFileFieldTablesFromInstances,
|
|
12040
|
+
categoriesAttestingFact,
|
|
11133
12041
|
categoryFieldsOf,
|
|
11134
12042
|
categoryForField,
|
|
11135
12043
|
categorySchemaOf,
|
|
11136
12044
|
evaluateExpression,
|
|
11137
12045
|
extractTimePeriods,
|
|
12046
|
+
factOf,
|
|
11138
12047
|
formatDocumentSize,
|
|
11139
12048
|
formatDocumentType,
|
|
11140
12049
|
formatDocumentUploaded,
|