@youversion/platform-react-ui 1.10.0 → 1.12.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/index.cjs +506 -291
- package/dist/index.js +506 -291
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -530,12 +530,12 @@ var NEVER = Object.freeze({
|
|
|
530
530
|
// @__NO_SIDE_EFFECTS__
|
|
531
531
|
function $constructor(name, initializer3, params) {
|
|
532
532
|
function init(inst, def) {
|
|
533
|
-
var
|
|
533
|
+
var _a4;
|
|
534
534
|
Object.defineProperty(inst, "_zod", {
|
|
535
535
|
value: inst._zod ?? {},
|
|
536
536
|
enumerable: false
|
|
537
537
|
});
|
|
538
|
-
(
|
|
538
|
+
(_a4 = inst._zod).traits ?? (_a4.traits = /* @__PURE__ */ new Set());
|
|
539
539
|
inst._zod.traits.add(name);
|
|
540
540
|
initializer3(inst, def);
|
|
541
541
|
for (const k in _.prototype) {
|
|
@@ -550,10 +550,10 @@ function $constructor(name, initializer3, params) {
|
|
|
550
550
|
}
|
|
551
551
|
Object.defineProperty(Definition, "name", { value: name });
|
|
552
552
|
function _(def) {
|
|
553
|
-
var
|
|
553
|
+
var _a4;
|
|
554
554
|
const inst = params?.Parent ? new Definition() : this;
|
|
555
555
|
init(inst, def);
|
|
556
|
-
(
|
|
556
|
+
(_a4 = inst._zod).deferred ?? (_a4.deferred = []);
|
|
557
557
|
for (const fn of inst._zod.deferred) {
|
|
558
558
|
fn();
|
|
559
559
|
}
|
|
@@ -1126,8 +1126,8 @@ function aborted(x, startIndex = 0) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
function prefixIssues(path, issues) {
|
|
1128
1128
|
return issues.map((iss) => {
|
|
1129
|
-
var
|
|
1130
|
-
(
|
|
1129
|
+
var _a4;
|
|
1130
|
+
(_a4 = iss).path ?? (_a4.path = []);
|
|
1131
1131
|
iss.path.unshift(path);
|
|
1132
1132
|
return iss;
|
|
1133
1133
|
});
|
|
@@ -1291,7 +1291,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1291
1291
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
1292
1292
|
const result = { errors: [] };
|
|
1293
1293
|
const processError = (error47, path = []) => {
|
|
1294
|
-
var
|
|
1294
|
+
var _a4, _b;
|
|
1295
1295
|
for (const issue2 of error47.issues) {
|
|
1296
1296
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1297
1297
|
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
@@ -1312,7 +1312,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
1312
1312
|
const terminal = i === fullpath.length - 1;
|
|
1313
1313
|
if (typeof el === "string") {
|
|
1314
1314
|
curr.properties ?? (curr.properties = {});
|
|
1315
|
-
(
|
|
1315
|
+
(_a4 = curr.properties)[el] ?? (_a4[el] = { errors: [] });
|
|
1316
1316
|
curr = curr.properties[el];
|
|
1317
1317
|
} else {
|
|
1318
1318
|
curr.items ?? (curr.items = []);
|
|
@@ -1601,10 +1601,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1601
1601
|
|
|
1602
1602
|
// ../../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js
|
|
1603
1603
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1604
|
-
var
|
|
1604
|
+
var _a4;
|
|
1605
1605
|
inst._zod ?? (inst._zod = {});
|
|
1606
1606
|
inst._zod.def = def;
|
|
1607
|
-
(
|
|
1607
|
+
(_a4 = inst._zod).onattach ?? (_a4.onattach = []);
|
|
1608
1608
|
});
|
|
1609
1609
|
var numericOriginMap = {
|
|
1610
1610
|
number: "number",
|
|
@@ -1670,8 +1670,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1670
1670
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1671
1671
|
$ZodCheck.init(inst, def);
|
|
1672
1672
|
inst._zod.onattach.push((inst2) => {
|
|
1673
|
-
var
|
|
1674
|
-
(
|
|
1673
|
+
var _a4;
|
|
1674
|
+
(_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value);
|
|
1675
1675
|
});
|
|
1676
1676
|
inst._zod.check = (payload) => {
|
|
1677
1677
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1798,9 +1798,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1798
1798
|
};
|
|
1799
1799
|
});
|
|
1800
1800
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1801
|
-
var
|
|
1801
|
+
var _a4;
|
|
1802
1802
|
$ZodCheck.init(inst, def);
|
|
1803
|
-
(
|
|
1803
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1804
1804
|
const val = payload.value;
|
|
1805
1805
|
return !nullish(val) && val.size !== void 0;
|
|
1806
1806
|
});
|
|
@@ -1826,9 +1826,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1826
1826
|
};
|
|
1827
1827
|
});
|
|
1828
1828
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1829
|
-
var
|
|
1829
|
+
var _a4;
|
|
1830
1830
|
$ZodCheck.init(inst, def);
|
|
1831
|
-
(
|
|
1831
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1832
1832
|
const val = payload.value;
|
|
1833
1833
|
return !nullish(val) && val.size !== void 0;
|
|
1834
1834
|
});
|
|
@@ -1854,9 +1854,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1854
1854
|
};
|
|
1855
1855
|
});
|
|
1856
1856
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1857
|
-
var
|
|
1857
|
+
var _a4;
|
|
1858
1858
|
$ZodCheck.init(inst, def);
|
|
1859
|
-
(
|
|
1859
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1860
1860
|
const val = payload.value;
|
|
1861
1861
|
return !nullish(val) && val.size !== void 0;
|
|
1862
1862
|
});
|
|
@@ -1884,9 +1884,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1884
1884
|
};
|
|
1885
1885
|
});
|
|
1886
1886
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1887
|
-
var
|
|
1887
|
+
var _a4;
|
|
1888
1888
|
$ZodCheck.init(inst, def);
|
|
1889
|
-
(
|
|
1889
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1890
1890
|
const val = payload.value;
|
|
1891
1891
|
return !nullish(val) && val.length !== void 0;
|
|
1892
1892
|
});
|
|
@@ -1913,9 +1913,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
1913
1913
|
};
|
|
1914
1914
|
});
|
|
1915
1915
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1916
|
-
var
|
|
1916
|
+
var _a4;
|
|
1917
1917
|
$ZodCheck.init(inst, def);
|
|
1918
|
-
(
|
|
1918
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1919
1919
|
const val = payload.value;
|
|
1920
1920
|
return !nullish(val) && val.length !== void 0;
|
|
1921
1921
|
});
|
|
@@ -1942,9 +1942,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
1942
1942
|
};
|
|
1943
1943
|
});
|
|
1944
1944
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1945
|
-
var
|
|
1945
|
+
var _a4;
|
|
1946
1946
|
$ZodCheck.init(inst, def);
|
|
1947
|
-
(
|
|
1947
|
+
(_a4 = inst._zod.def).when ?? (_a4.when = (payload) => {
|
|
1948
1948
|
const val = payload.value;
|
|
1949
1949
|
return !nullish(val) && val.length !== void 0;
|
|
1950
1950
|
});
|
|
@@ -1973,7 +1973,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
1973
1973
|
};
|
|
1974
1974
|
});
|
|
1975
1975
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
1976
|
-
var
|
|
1976
|
+
var _a4, _b;
|
|
1977
1977
|
$ZodCheck.init(inst, def);
|
|
1978
1978
|
inst._zod.onattach.push((inst2) => {
|
|
1979
1979
|
const bag = inst2._zod.bag;
|
|
@@ -1984,7 +1984,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
1984
1984
|
}
|
|
1985
1985
|
});
|
|
1986
1986
|
if (def.pattern)
|
|
1987
|
-
(
|
|
1987
|
+
(_a4 = inst._zod).check ?? (_a4.check = (payload) => {
|
|
1988
1988
|
def.pattern.lastIndex = 0;
|
|
1989
1989
|
if (def.pattern.test(payload.value))
|
|
1990
1990
|
return;
|
|
@@ -2186,7 +2186,7 @@ var version = {
|
|
|
2186
2186
|
|
|
2187
2187
|
// ../../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js
|
|
2188
2188
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2189
|
-
var
|
|
2189
|
+
var _a4;
|
|
2190
2190
|
inst ?? (inst = {});
|
|
2191
2191
|
inst._zod.def = def;
|
|
2192
2192
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2201,7 +2201,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
}
|
|
2203
2203
|
if (checks.length === 0) {
|
|
2204
|
-
(
|
|
2204
|
+
(_a4 = inst._zod).deferred ?? (_a4.deferred = []);
|
|
2205
2205
|
inst._zod.deferred?.push(() => {
|
|
2206
2206
|
inst._zod.run = inst._zod.parse;
|
|
2207
2207
|
});
|
|
@@ -10642,7 +10642,7 @@ var JSONSchemaGenerator = class {
|
|
|
10642
10642
|
this.seen = /* @__PURE__ */ new Map();
|
|
10643
10643
|
}
|
|
10644
10644
|
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
10645
|
-
var
|
|
10645
|
+
var _a4;
|
|
10646
10646
|
const def = schema._zod.def;
|
|
10647
10647
|
const formatMap = {
|
|
10648
10648
|
guid: "uuid",
|
|
@@ -11151,7 +11151,7 @@ var JSONSchemaGenerator = class {
|
|
|
11151
11151
|
delete result.schema.default;
|
|
11152
11152
|
}
|
|
11153
11153
|
if (this.io === "input" && result.schema._prefault)
|
|
11154
|
-
(
|
|
11154
|
+
(_a4 = result.schema).default ?? (_a4.default = result.schema._prefault);
|
|
11155
11155
|
delete result.schema._prefault;
|
|
11156
11156
|
const _result = this.seen.get(schema);
|
|
11157
11157
|
return _result.schema;
|
|
@@ -12723,20 +12723,400 @@ var ApiClient = class {
|
|
|
12723
12723
|
});
|
|
12724
12724
|
}
|
|
12725
12725
|
};
|
|
12726
|
-
var
|
|
12726
|
+
var BOOK_IDS = [
|
|
12727
|
+
"GEN",
|
|
12728
|
+
"EXO",
|
|
12729
|
+
"LEV",
|
|
12730
|
+
"NUM",
|
|
12731
|
+
"DEU",
|
|
12732
|
+
"JOS",
|
|
12733
|
+
"JDG",
|
|
12734
|
+
"RUT",
|
|
12735
|
+
"1SA",
|
|
12736
|
+
"2SA",
|
|
12737
|
+
"1KI",
|
|
12738
|
+
"2KI",
|
|
12739
|
+
"1CH",
|
|
12740
|
+
"2CH",
|
|
12741
|
+
"EZR",
|
|
12742
|
+
"NEH",
|
|
12743
|
+
"EST",
|
|
12744
|
+
"JOB",
|
|
12745
|
+
"PSA",
|
|
12746
|
+
"PRO",
|
|
12747
|
+
"ECC",
|
|
12748
|
+
"SNG",
|
|
12749
|
+
"ISA",
|
|
12750
|
+
"JER",
|
|
12751
|
+
"LAM",
|
|
12752
|
+
"EZK",
|
|
12753
|
+
"DAN",
|
|
12754
|
+
"HOS",
|
|
12755
|
+
"JOL",
|
|
12756
|
+
"AMO",
|
|
12757
|
+
"OBA",
|
|
12758
|
+
"JON",
|
|
12759
|
+
"MIC",
|
|
12760
|
+
"NAM",
|
|
12761
|
+
"HAB",
|
|
12762
|
+
"ZEP",
|
|
12763
|
+
"HAG",
|
|
12764
|
+
"ZEC",
|
|
12765
|
+
"MAL",
|
|
12766
|
+
"MAT",
|
|
12767
|
+
"MRK",
|
|
12768
|
+
"LUK",
|
|
12769
|
+
"JHN",
|
|
12770
|
+
"ACT",
|
|
12771
|
+
"ROM",
|
|
12772
|
+
"1CO",
|
|
12773
|
+
"2CO",
|
|
12774
|
+
"GAL",
|
|
12775
|
+
"EPH",
|
|
12776
|
+
"PHP",
|
|
12777
|
+
"COL",
|
|
12778
|
+
"1TH",
|
|
12779
|
+
"2TH",
|
|
12780
|
+
"1TI",
|
|
12781
|
+
"2TI",
|
|
12782
|
+
"TIT",
|
|
12783
|
+
"PHM",
|
|
12784
|
+
"HEB",
|
|
12785
|
+
"JAS",
|
|
12786
|
+
"1PE",
|
|
12787
|
+
"2PE",
|
|
12788
|
+
"1JN",
|
|
12789
|
+
"2JN",
|
|
12790
|
+
"3JN",
|
|
12791
|
+
"JUD",
|
|
12792
|
+
"REV",
|
|
12793
|
+
// dc (Apocrypha) books
|
|
12794
|
+
"TOB",
|
|
12795
|
+
"JDT",
|
|
12796
|
+
"ESG",
|
|
12797
|
+
"WIS",
|
|
12798
|
+
"SIR",
|
|
12799
|
+
"BAR",
|
|
12800
|
+
"LJE",
|
|
12801
|
+
"S3Y",
|
|
12802
|
+
"SUS",
|
|
12803
|
+
"BEL",
|
|
12804
|
+
"1MA",
|
|
12805
|
+
"2MA",
|
|
12806
|
+
"3MA",
|
|
12807
|
+
"4MA",
|
|
12808
|
+
"1ES",
|
|
12809
|
+
"2ES",
|
|
12810
|
+
"MAN",
|
|
12811
|
+
"PS2",
|
|
12812
|
+
"ODA",
|
|
12813
|
+
"PSS",
|
|
12814
|
+
"3ES",
|
|
12815
|
+
"EZA",
|
|
12816
|
+
"5EZ",
|
|
12817
|
+
"6EZ",
|
|
12818
|
+
"DAG",
|
|
12819
|
+
"PS3",
|
|
12820
|
+
"2BA",
|
|
12821
|
+
"LBA",
|
|
12822
|
+
"JUB",
|
|
12823
|
+
"ENO",
|
|
12824
|
+
"1MQ",
|
|
12825
|
+
"2MQ",
|
|
12826
|
+
"3MQ",
|
|
12827
|
+
"REP",
|
|
12828
|
+
"4BA",
|
|
12829
|
+
"LAO",
|
|
12830
|
+
// Luke-Acts combo, treated canonically as New Testament
|
|
12831
|
+
"LKA"
|
|
12832
|
+
];
|
|
12833
|
+
var BOOK_CANON = {
|
|
12834
|
+
GEN: "old_testament",
|
|
12835
|
+
EXO: "old_testament",
|
|
12836
|
+
LEV: "old_testament",
|
|
12837
|
+
NUM: "old_testament",
|
|
12838
|
+
DEU: "old_testament",
|
|
12839
|
+
JOS: "old_testament",
|
|
12840
|
+
JDG: "old_testament",
|
|
12841
|
+
RUT: "old_testament",
|
|
12842
|
+
"1SA": "old_testament",
|
|
12843
|
+
"2SA": "old_testament",
|
|
12844
|
+
"1KI": "old_testament",
|
|
12845
|
+
"2KI": "old_testament",
|
|
12846
|
+
"1CH": "old_testament",
|
|
12847
|
+
"2CH": "old_testament",
|
|
12848
|
+
EZR: "old_testament",
|
|
12849
|
+
NEH: "old_testament",
|
|
12850
|
+
EST: "old_testament",
|
|
12851
|
+
JOB: "old_testament",
|
|
12852
|
+
PSA: "old_testament",
|
|
12853
|
+
PRO: "old_testament",
|
|
12854
|
+
ECC: "old_testament",
|
|
12855
|
+
SNG: "old_testament",
|
|
12856
|
+
ISA: "old_testament",
|
|
12857
|
+
JER: "old_testament",
|
|
12858
|
+
LAM: "old_testament",
|
|
12859
|
+
EZK: "old_testament",
|
|
12860
|
+
DAN: "old_testament",
|
|
12861
|
+
HOS: "old_testament",
|
|
12862
|
+
JOL: "old_testament",
|
|
12863
|
+
AMO: "old_testament",
|
|
12864
|
+
OBA: "old_testament",
|
|
12865
|
+
JON: "old_testament",
|
|
12866
|
+
MIC: "old_testament",
|
|
12867
|
+
NAM: "old_testament",
|
|
12868
|
+
HAB: "old_testament",
|
|
12869
|
+
ZEP: "old_testament",
|
|
12870
|
+
HAG: "old_testament",
|
|
12871
|
+
ZEC: "old_testament",
|
|
12872
|
+
MAL: "old_testament",
|
|
12873
|
+
MAT: "new_testament",
|
|
12874
|
+
MRK: "new_testament",
|
|
12875
|
+
LUK: "new_testament",
|
|
12876
|
+
JHN: "new_testament",
|
|
12877
|
+
ACT: "new_testament",
|
|
12878
|
+
ROM: "new_testament",
|
|
12879
|
+
"1CO": "new_testament",
|
|
12880
|
+
"2CO": "new_testament",
|
|
12881
|
+
GAL: "new_testament",
|
|
12882
|
+
EPH: "new_testament",
|
|
12883
|
+
PHP: "new_testament",
|
|
12884
|
+
COL: "new_testament",
|
|
12885
|
+
"1TH": "new_testament",
|
|
12886
|
+
"2TH": "new_testament",
|
|
12887
|
+
"1TI": "new_testament",
|
|
12888
|
+
"2TI": "new_testament",
|
|
12889
|
+
TIT: "new_testament",
|
|
12890
|
+
PHM: "new_testament",
|
|
12891
|
+
HEB: "new_testament",
|
|
12892
|
+
JAS: "new_testament",
|
|
12893
|
+
"1PE": "new_testament",
|
|
12894
|
+
"2PE": "new_testament",
|
|
12895
|
+
"1JN": "new_testament",
|
|
12896
|
+
"2JN": "new_testament",
|
|
12897
|
+
"3JN": "new_testament",
|
|
12898
|
+
JUD: "new_testament",
|
|
12899
|
+
REV: "new_testament",
|
|
12900
|
+
TOB: "deuterocanon",
|
|
12901
|
+
JDT: "deuterocanon",
|
|
12902
|
+
ESG: "deuterocanon",
|
|
12903
|
+
WIS: "deuterocanon",
|
|
12904
|
+
SIR: "deuterocanon",
|
|
12905
|
+
BAR: "deuterocanon",
|
|
12906
|
+
LJE: "deuterocanon",
|
|
12907
|
+
S3Y: "deuterocanon",
|
|
12908
|
+
SUS: "deuterocanon",
|
|
12909
|
+
BEL: "deuterocanon",
|
|
12910
|
+
"1MA": "deuterocanon",
|
|
12911
|
+
"2MA": "deuterocanon",
|
|
12912
|
+
"3MA": "deuterocanon",
|
|
12913
|
+
"4MA": "deuterocanon",
|
|
12914
|
+
"1ES": "deuterocanon",
|
|
12915
|
+
"2ES": "deuterocanon",
|
|
12916
|
+
MAN: "deuterocanon",
|
|
12917
|
+
PS2: "deuterocanon",
|
|
12918
|
+
ODA: "deuterocanon",
|
|
12919
|
+
PSS: "deuterocanon",
|
|
12920
|
+
"3ES": "deuterocanon",
|
|
12921
|
+
EZA: "deuterocanon",
|
|
12922
|
+
"5EZ": "deuterocanon",
|
|
12923
|
+
"6EZ": "deuterocanon",
|
|
12924
|
+
DAG: "deuterocanon",
|
|
12925
|
+
PS3: "deuterocanon",
|
|
12926
|
+
"2BA": "deuterocanon",
|
|
12927
|
+
LBA: "deuterocanon",
|
|
12928
|
+
JUB: "deuterocanon",
|
|
12929
|
+
ENO: "deuterocanon",
|
|
12930
|
+
"1MQ": "deuterocanon",
|
|
12931
|
+
"2MQ": "deuterocanon",
|
|
12932
|
+
"3MQ": "deuterocanon",
|
|
12933
|
+
REP: "deuterocanon",
|
|
12934
|
+
"4BA": "deuterocanon",
|
|
12935
|
+
LAO: "deuterocanon",
|
|
12936
|
+
LKA: "new_testament"
|
|
12937
|
+
// Luke-Acts combo, treated canonically as New Testament
|
|
12938
|
+
};
|
|
12939
|
+
var BibleVerseSchema = external_exports.object({
|
|
12940
|
+
/** Verse identifier (e.g., "1") */
|
|
12941
|
+
id: external_exports.string(),
|
|
12942
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
12943
|
+
passage_id: external_exports.string(),
|
|
12944
|
+
/** Verse Number (e.g., "1") */
|
|
12945
|
+
title: external_exports.string()
|
|
12946
|
+
});
|
|
12947
|
+
var BibleChapterSchema = external_exports.object({
|
|
12948
|
+
/** Chapter identifier (e.g., "1") */
|
|
12949
|
+
id: external_exports.string(),
|
|
12950
|
+
/** Passage identifier (e.g., "MAT.1") */
|
|
12951
|
+
passage_id: external_exports.string(),
|
|
12952
|
+
/** Chapter title (e.g., "1") */
|
|
12953
|
+
title: external_exports.string(),
|
|
12954
|
+
/** Array of verses */
|
|
12955
|
+
verses: external_exports.array(BibleVerseSchema).optional()
|
|
12956
|
+
});
|
|
12957
|
+
var CanonSchema = external_exports.enum(["old_testament", "new_testament", "deuterocanon"]);
|
|
12958
|
+
var BibleBookIntroSchema = external_exports.object({
|
|
12959
|
+
/** Intro identifier */
|
|
12960
|
+
id: external_exports.string(),
|
|
12961
|
+
/** Intro passage identifier */
|
|
12962
|
+
passage_id: external_exports.string(),
|
|
12963
|
+
/** Intro title */
|
|
12964
|
+
title: external_exports.string()
|
|
12965
|
+
});
|
|
12966
|
+
var BookUsfmSchema = external_exports.union([
|
|
12967
|
+
...BOOK_IDS.map((id) => external_exports.literal(id)),
|
|
12968
|
+
external_exports.string().length(3)
|
|
12969
|
+
]);
|
|
12970
|
+
var BibleBookSchema = external_exports.object({
|
|
12971
|
+
/** Book identifier (e.g., "MAT") */
|
|
12972
|
+
id: BookUsfmSchema,
|
|
12973
|
+
/** Book title (e.g., "Genesis") */
|
|
12974
|
+
title: external_exports.string(),
|
|
12975
|
+
/** Full Book title (e.g., "The First Book of Moses, Commonly Called Genesis") */
|
|
12976
|
+
full_title: external_exports.string(),
|
|
12977
|
+
/** Book abbreviation (e.g., "Gen") */
|
|
12978
|
+
abbreviation: external_exports.string().optional(),
|
|
12979
|
+
/** Canonical section (new_testament, old_testament, deuterocanon) */
|
|
12980
|
+
canon: CanonSchema,
|
|
12981
|
+
/** Intro metadata (optional) */
|
|
12982
|
+
intro: BibleBookIntroSchema.optional(),
|
|
12983
|
+
/** Array of chapter identifiers (e.g., ["GEN.1", "GEN.2", "GEN.3"]) */
|
|
12984
|
+
chapters: external_exports.array(BibleChapterSchema).optional()
|
|
12985
|
+
});
|
|
12986
|
+
var BibleIndexVerseSchema = external_exports.object({
|
|
12987
|
+
/** Verse identifier */
|
|
12988
|
+
id: external_exports.string(),
|
|
12989
|
+
/** Verse title */
|
|
12990
|
+
title: external_exports.string()
|
|
12991
|
+
});
|
|
12992
|
+
var BibleIndexChapterSchema = external_exports.object({
|
|
12993
|
+
/** Chapter identifier */
|
|
12994
|
+
id: external_exports.string(),
|
|
12995
|
+
/** Chapter title */
|
|
12996
|
+
title: external_exports.string(),
|
|
12997
|
+
/** Array of verses in this chapter */
|
|
12998
|
+
verses: external_exports.array(BibleIndexVerseSchema)
|
|
12999
|
+
});
|
|
13000
|
+
var BibleIndexBookSchema = external_exports.object({
|
|
13001
|
+
/** Book identifier */
|
|
13002
|
+
id: BookUsfmSchema,
|
|
13003
|
+
/** Book title */
|
|
13004
|
+
title: external_exports.string(),
|
|
13005
|
+
/** Full book title */
|
|
13006
|
+
full_title: external_exports.string(),
|
|
13007
|
+
/** Book abbreviation */
|
|
13008
|
+
abbreviation: external_exports.string(),
|
|
13009
|
+
/** Canonical section */
|
|
13010
|
+
canon: CanonSchema,
|
|
13011
|
+
/** Array of chapters in this book */
|
|
13012
|
+
chapters: external_exports.array(BibleIndexChapterSchema)
|
|
13013
|
+
});
|
|
13014
|
+
var _BibleIndexSchema = external_exports.object({
|
|
13015
|
+
/** Text direction (e.g., "ltr") */
|
|
13016
|
+
text_direction: external_exports.string(),
|
|
13017
|
+
/** Array of books with chapters and verses */
|
|
13018
|
+
books: external_exports.array(BibleIndexBookSchema)
|
|
13019
|
+
});
|
|
13020
|
+
var _HighlightSchema = external_exports.object({
|
|
13021
|
+
/** Bible version identifier */
|
|
13022
|
+
version_id: external_exports.number().int().positive(),
|
|
13023
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13024
|
+
passage_id: external_exports.string(),
|
|
13025
|
+
/** Hex color code (6 digits, no #) */
|
|
13026
|
+
color: external_exports.string().regex(/^[0-9a-f]{6}$/)
|
|
13027
|
+
});
|
|
13028
|
+
var _CreateHighlightSchema = external_exports.object({
|
|
13029
|
+
/** Bible version identifier */
|
|
13030
|
+
version_id: external_exports.number().int().positive(),
|
|
13031
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13032
|
+
passage_id: external_exports.string(),
|
|
13033
|
+
/** Hex color code (6 digits, no #) */
|
|
13034
|
+
color: external_exports.string().regex(/^[0-9a-f]{6}$/)
|
|
13035
|
+
});
|
|
13036
|
+
var LanguageSchema = external_exports.object({
|
|
13037
|
+
/** BCP 47 language identifier (e.g., "en") */
|
|
13038
|
+
id: external_exports.string().regex(/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/, "BCP 47 id limited to language or language+script"),
|
|
13039
|
+
/** ISO 639 language code */
|
|
13040
|
+
language: external_exports.string().regex(/^[a-z]{2,3}$/, "ISO 639 canonical language subtag"),
|
|
13041
|
+
/** ISO 15924 script code (e.g., "Latn") */
|
|
13042
|
+
script: external_exports.string().regex(/^[A-Z][a-z]{3}$/, 'Script must match ISO 15924 format (e.g., "Latn")').nullable().optional(),
|
|
13043
|
+
/** Script name (e.g., "Latin") */
|
|
13044
|
+
script_name: external_exports.string().nullable().optional(),
|
|
13045
|
+
/** Language aliases */
|
|
13046
|
+
aliases: external_exports.array(external_exports.string()).optional(),
|
|
13047
|
+
/** Display names for different locales */
|
|
13048
|
+
display_names: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
13049
|
+
/** Available scripts for this language (e.g., ["Cyrl", "Latn"]) */
|
|
13050
|
+
scripts: external_exports.array(external_exports.string().regex(/^[A-Z][a-z]{3}$/, "ISO 15924 script code")).optional(),
|
|
13051
|
+
/** Language variants (e.g., ["1996", "fonipa"]) */
|
|
13052
|
+
variants: external_exports.array(external_exports.string()).optional(),
|
|
13053
|
+
/** ISO 3166-1 alpha-2 country codes (e.g., ["RS", "BA", "ME"]) */
|
|
13054
|
+
countries: external_exports.array(external_exports.string().regex(/^[A-Z]{2}$/, "ISO 3166-1 alpha-2 country code")).optional(),
|
|
13055
|
+
/** Text direction (ltr or rtl) */
|
|
13056
|
+
text_direction: external_exports.enum(["ltr", "rtl"]).optional(),
|
|
13057
|
+
/** Writing population count */
|
|
13058
|
+
writing_population: external_exports.number().int().optional(),
|
|
13059
|
+
/** Speaking population count */
|
|
13060
|
+
speaking_population: external_exports.number().int().optional(),
|
|
13061
|
+
/** Default Bible version ID for this language */
|
|
13062
|
+
default_bible_id: external_exports.number().int().nullable().optional()
|
|
13063
|
+
});
|
|
13064
|
+
var BiblePassageSchema = external_exports.object({
|
|
13065
|
+
/** Passage identifier (e.g., "MAT.1.1") */
|
|
13066
|
+
id: external_exports.string(),
|
|
13067
|
+
/** Passage content text */
|
|
13068
|
+
content: external_exports.string(),
|
|
13069
|
+
/** Human-readable reference (e.g., "Matthew 1:1") */
|
|
13070
|
+
reference: external_exports.string()
|
|
13071
|
+
});
|
|
13072
|
+
var BibleVersionSchema = external_exports.object({
|
|
13073
|
+
/** Bible version identifier */
|
|
13074
|
+
id: external_exports.number().int(),
|
|
13075
|
+
/** Bible version abbreviation */
|
|
13076
|
+
abbreviation: external_exports.string(),
|
|
13077
|
+
/** Long copyright text */
|
|
13078
|
+
promotional_content: external_exports.string().nullable().optional(),
|
|
13079
|
+
/** Short copyright text */
|
|
13080
|
+
copyright: external_exports.string().nullable().optional(),
|
|
13081
|
+
/** Bible information text */
|
|
13082
|
+
info: external_exports.string().nullable().optional(),
|
|
13083
|
+
/** Publisher URL */
|
|
13084
|
+
publisher_url: external_exports.url().nullable().optional(),
|
|
13085
|
+
/** Language tag (e.g., "en") */
|
|
13086
|
+
language_tag: external_exports.string(),
|
|
13087
|
+
/** Localized abbreviation */
|
|
13088
|
+
localized_abbreviation: external_exports.string(),
|
|
13089
|
+
/** Localized title */
|
|
13090
|
+
localized_title: external_exports.string(),
|
|
13091
|
+
/** Organization ID of publisher */
|
|
13092
|
+
organization_id: external_exports.string().nullable().optional(),
|
|
13093
|
+
/** Full title */
|
|
13094
|
+
title: external_exports.string(),
|
|
13095
|
+
/** Array of book identifiers (e.g., ["GEN", "EXO", "LEV"]) */
|
|
13096
|
+
books: external_exports.array(BookUsfmSchema),
|
|
13097
|
+
/** YouVersion deep link URL */
|
|
13098
|
+
youversion_deep_link: external_exports.url()
|
|
13099
|
+
});
|
|
13100
|
+
var VOTDSchema = external_exports.object({
|
|
13101
|
+
/** Day of year (1-366) */
|
|
13102
|
+
day: external_exports.number().int().min(1).max(366),
|
|
13103
|
+
/** Passage identifier (e.g., "JHN.3.16") */
|
|
13104
|
+
passage_id: external_exports.string()
|
|
13105
|
+
});
|
|
13106
|
+
var _UserSchema = external_exports.object({
|
|
13107
|
+
avatar_url: external_exports.string(),
|
|
13108
|
+
first_name: external_exports.string(),
|
|
13109
|
+
id: external_exports.uuid(),
|
|
13110
|
+
last_name: external_exports.string()
|
|
13111
|
+
});
|
|
13112
|
+
var _a;
|
|
13113
|
+
var BibleClient = (_a = class {
|
|
12727
13114
|
/**
|
|
12728
13115
|
* Creates a new BibleClient instance.
|
|
12729
13116
|
* @param client The API client to use for requests.
|
|
12730
13117
|
*/
|
|
12731
13118
|
constructor(client) {
|
|
12732
13119
|
__publicField(this, "client");
|
|
12733
|
-
// Validation schemas
|
|
12734
|
-
__publicField(this, "versionIdSchema", external_exports.number().int().positive("Version ID must be a positive integer"));
|
|
12735
|
-
__publicField(this, "bookSchema", external_exports.string().trim().min(3, "Book ID must be exactly 3 characters").max(3, "Book ID must be exactly 3 characters"));
|
|
12736
|
-
__publicField(this, "chapterSchema", external_exports.number().int("Chapter must be an integer").positive("Chapter must be a positive integer"));
|
|
12737
|
-
__publicField(this, "verseSchema", external_exports.number().int("Verse must be an integer").positive("Verse must be a positive integer"));
|
|
12738
|
-
__publicField(this, "languageRangesSchema", external_exports.string().trim().min(1, "Language ranges must be a non-empty string"));
|
|
12739
|
-
__publicField(this, "booleanSchema", external_exports.boolean());
|
|
12740
13120
|
this.client = client;
|
|
12741
13121
|
}
|
|
12742
13122
|
/**
|
|
@@ -12748,21 +13128,26 @@ var BibleClient = class {
|
|
|
12748
13128
|
*/
|
|
12749
13129
|
async getVersions(language_ranges, license_id, options) {
|
|
12750
13130
|
const languageRangeArray = Array.isArray(language_ranges) ? language_ranges : [language_ranges];
|
|
12751
|
-
const parsedLanguageRanges = external_exports.array(
|
|
13131
|
+
const parsedLanguageRanges = external_exports.array(_a.languageRangesSchema).nonempty("At least one language range is required").parse(languageRangeArray);
|
|
12752
13132
|
const params = {
|
|
12753
13133
|
"language_ranges[]": parsedLanguageRanges
|
|
12754
13134
|
};
|
|
12755
|
-
if (license_id
|
|
13135
|
+
if (license_id) {
|
|
12756
13136
|
params.license_id = license_id;
|
|
12757
13137
|
}
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
pageSizeSchema.parse(options.page_size);
|
|
13138
|
+
_a.GetVersionsOptionsSchema.parse(options);
|
|
13139
|
+
if (options?.page_size) {
|
|
12761
13140
|
params.page_size = options.page_size;
|
|
12762
13141
|
}
|
|
12763
|
-
if (options?.
|
|
13142
|
+
if (options?.fields) {
|
|
13143
|
+
params["fields[]"] = options.fields;
|
|
13144
|
+
}
|
|
13145
|
+
if (options?.page_token) {
|
|
12764
13146
|
params.page_token = options.page_token;
|
|
12765
13147
|
}
|
|
13148
|
+
if (options?.all_available) {
|
|
13149
|
+
params.all_available = "true";
|
|
13150
|
+
}
|
|
12766
13151
|
return this.client.get(`/v1/bibles`, params);
|
|
12767
13152
|
}
|
|
12768
13153
|
/**
|
|
@@ -12771,7 +13156,7 @@ var BibleClient = class {
|
|
|
12771
13156
|
* @returns The requested BibleVersion object.
|
|
12772
13157
|
*/
|
|
12773
13158
|
async getVersion(id) {
|
|
12774
|
-
|
|
13159
|
+
_a.versionIdSchema.parse(id);
|
|
12775
13160
|
return this.client.get(`/v1/bibles/${id}`);
|
|
12776
13161
|
}
|
|
12777
13162
|
/**
|
|
@@ -12783,7 +13168,7 @@ var BibleClient = class {
|
|
|
12783
13168
|
* available in the Bible version.
|
|
12784
13169
|
*/
|
|
12785
13170
|
async getBooks(versionId, canon) {
|
|
12786
|
-
|
|
13171
|
+
_a.versionIdSchema.parse(versionId);
|
|
12787
13172
|
return this.client.get(`/v1/bibles/${versionId}/books`, {
|
|
12788
13173
|
...canon && { canon }
|
|
12789
13174
|
});
|
|
@@ -12797,8 +13182,8 @@ var BibleClient = class {
|
|
|
12797
13182
|
* available. Use the `passage_id` with `getPassage()` to fetch intro content.
|
|
12798
13183
|
*/
|
|
12799
13184
|
async getBook(versionId, book) {
|
|
12800
|
-
|
|
12801
|
-
|
|
13185
|
+
_a.versionIdSchema.parse(versionId);
|
|
13186
|
+
_a.bookSchema.parse(book);
|
|
12802
13187
|
return this.client.get(`/v1/bibles/${versionId}/books/${book}`);
|
|
12803
13188
|
}
|
|
12804
13189
|
/**
|
|
@@ -12808,8 +13193,8 @@ var BibleClient = class {
|
|
|
12808
13193
|
* @returns An array of BibleChapter objects.
|
|
12809
13194
|
*/
|
|
12810
13195
|
async getChapters(versionId, book) {
|
|
12811
|
-
|
|
12812
|
-
|
|
13196
|
+
_a.versionIdSchema.parse(versionId);
|
|
13197
|
+
_a.bookSchema.parse(book);
|
|
12813
13198
|
return this.client.get(
|
|
12814
13199
|
`/v1/bibles/${versionId}/books/${book}/chapters`
|
|
12815
13200
|
);
|
|
@@ -12822,9 +13207,9 @@ var BibleClient = class {
|
|
|
12822
13207
|
* @returns The requested BibleChapter object.
|
|
12823
13208
|
*/
|
|
12824
13209
|
async getChapter(versionId, book, chapter) {
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
13210
|
+
_a.versionIdSchema.parse(versionId);
|
|
13211
|
+
_a.bookSchema.parse(book);
|
|
13212
|
+
_a.chapterSchema.parse(chapter);
|
|
12828
13213
|
return this.client.get(
|
|
12829
13214
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}`
|
|
12830
13215
|
);
|
|
@@ -12837,9 +13222,9 @@ var BibleClient = class {
|
|
|
12837
13222
|
* @returns An array of BibleVerse objects.
|
|
12838
13223
|
*/
|
|
12839
13224
|
async getVerses(versionId, book, chapter) {
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
13225
|
+
_a.versionIdSchema.parse(versionId);
|
|
13226
|
+
_a.bookSchema.parse(book);
|
|
13227
|
+
_a.chapterSchema.parse(chapter);
|
|
12843
13228
|
return this.client.get(
|
|
12844
13229
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}/verses`
|
|
12845
13230
|
);
|
|
@@ -12853,10 +13238,10 @@ var BibleClient = class {
|
|
|
12853
13238
|
* @returns The requested BibleVerse object.
|
|
12854
13239
|
*/
|
|
12855
13240
|
async getVerse(versionId, book, chapter, verse) {
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
13241
|
+
_a.versionIdSchema.parse(versionId);
|
|
13242
|
+
_a.bookSchema.parse(book);
|
|
13243
|
+
_a.chapterSchema.parse(chapter);
|
|
13244
|
+
_a.verseSchema.parse(verse);
|
|
12860
13245
|
return this.client.get(
|
|
12861
13246
|
`/v1/bibles/${versionId}/books/${book}/chapters/${chapter}/verses/${verse}`
|
|
12862
13247
|
);
|
|
@@ -12883,12 +13268,12 @@ var BibleClient = class {
|
|
|
12883
13268
|
* ```
|
|
12884
13269
|
*/
|
|
12885
13270
|
async getPassage(versionId, usfm, format = "html", include_headings, include_notes) {
|
|
12886
|
-
|
|
13271
|
+
_a.versionIdSchema.parse(versionId);
|
|
12887
13272
|
if (include_headings !== void 0) {
|
|
12888
|
-
|
|
13273
|
+
_a.booleanSchema.parse(include_headings);
|
|
12889
13274
|
}
|
|
12890
13275
|
if (include_notes !== void 0) {
|
|
12891
|
-
|
|
13276
|
+
_a.booleanSchema.parse(include_notes);
|
|
12892
13277
|
}
|
|
12893
13278
|
const params = {
|
|
12894
13279
|
format
|
|
@@ -12907,7 +13292,7 @@ var BibleClient = class {
|
|
|
12907
13292
|
* @returns The BibleIndex object containing full hierarchy of books, chapters, and verses.
|
|
12908
13293
|
*/
|
|
12909
13294
|
async getIndex(versionId) {
|
|
12910
|
-
|
|
13295
|
+
_a.versionIdSchema.parse(versionId);
|
|
12911
13296
|
return this.client.get(`/v1/bibles/${versionId}/index`);
|
|
12912
13297
|
}
|
|
12913
13298
|
/**
|
|
@@ -12935,19 +13320,32 @@ var BibleClient = class {
|
|
|
12935
13320
|
daySchema.parse(day);
|
|
12936
13321
|
return this.client.get(`/v1/verse_of_the_days/${day}`);
|
|
12937
13322
|
}
|
|
12938
|
-
}
|
|
12939
|
-
|
|
13323
|
+
}, // Validation schemas
|
|
13324
|
+
__publicField(_a, "versionIdSchema", external_exports.number().int().positive("Version ID must be a positive integer")), __publicField(_a, "bookSchema", external_exports.string().trim().min(3, "Book ID must be exactly 3 characters").max(3, "Book ID must be exactly 3 characters")), __publicField(_a, "chapterSchema", external_exports.number().int("Chapter must be an integer").positive("Chapter must be a positive integer")), __publicField(_a, "verseSchema", external_exports.number().int("Verse must be an integer").positive("Verse must be a positive integer")), __publicField(_a, "languageRangesSchema", external_exports.string().trim().min(1, "Language ranges must be a non-empty string")), __publicField(_a, "booleanSchema", external_exports.boolean()), __publicField(_a, "GetVersionsOptionsSchema", external_exports.object({
|
|
13325
|
+
page_size: external_exports.union([external_exports.number().int().positive(), external_exports.literal("*")]).optional(),
|
|
13326
|
+
page_token: external_exports.string().optional(),
|
|
13327
|
+
fields: external_exports.array(BibleVersionSchema.keyof()).optional(),
|
|
13328
|
+
all_available: external_exports.boolean().optional()
|
|
13329
|
+
}).optional().refine(
|
|
13330
|
+
(data) => {
|
|
13331
|
+
if (data?.page_size === "*") {
|
|
13332
|
+
return data.fields && data.fields.length >= 1 && data.fields.length <= 3;
|
|
13333
|
+
}
|
|
13334
|
+
return true;
|
|
13335
|
+
},
|
|
13336
|
+
{
|
|
13337
|
+
message: 'page_size="*" required 1-3 fields to be specified',
|
|
13338
|
+
path: ["page_size", "fields"]
|
|
13339
|
+
}
|
|
13340
|
+
)), _a);
|
|
13341
|
+
var _a2;
|
|
13342
|
+
var LanguagesClient = (_a2 = class {
|
|
12940
13343
|
/**
|
|
12941
13344
|
* Creates a new LanguagesClient instance.
|
|
12942
13345
|
* @param client The API client to use for requests.
|
|
12943
13346
|
*/
|
|
12944
13347
|
constructor(client) {
|
|
12945
13348
|
__publicField(this, "client");
|
|
12946
|
-
__publicField(this, "languageIdSchema", external_exports.string().trim().min(1, "Language ID must be a non-empty string").regex(
|
|
12947
|
-
/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/,
|
|
12948
|
-
"Language ID must match BCP 47 format (language or language+script)"
|
|
12949
|
-
));
|
|
12950
|
-
__publicField(this, "countrySchema", external_exports.string().trim().length(2, "Country code must be a 2-character ISO 3166-1 alpha-2 code").toUpperCase());
|
|
12951
13349
|
this.client = client;
|
|
12952
13350
|
}
|
|
12953
13351
|
/**
|
|
@@ -12958,12 +13356,23 @@ var LanguagesClient = class {
|
|
|
12958
13356
|
async getLanguages(options = {}) {
|
|
12959
13357
|
const params = {};
|
|
12960
13358
|
if (options.country !== void 0) {
|
|
12961
|
-
const country =
|
|
13359
|
+
const country = _a2.countrySchema.parse(options.country);
|
|
12962
13360
|
params.country = country;
|
|
12963
13361
|
}
|
|
13362
|
+
if (options.fields !== void 0) {
|
|
13363
|
+
const fieldsSchema = external_exports.array(LanguageSchema.keyof());
|
|
13364
|
+
fieldsSchema.parse(options.fields);
|
|
13365
|
+
params["fields[]"] = options.fields;
|
|
13366
|
+
}
|
|
12964
13367
|
if (options.page_size !== void 0) {
|
|
12965
|
-
const pageSizeSchema = external_exports.number().int().positive();
|
|
13368
|
+
const pageSizeSchema = external_exports.union([external_exports.number().int().positive(), external_exports.literal("*")]);
|
|
12966
13369
|
pageSizeSchema.parse(options.page_size);
|
|
13370
|
+
if (options.page_size === "*") {
|
|
13371
|
+
const fieldsCount = options.fields?.length ?? 0;
|
|
13372
|
+
if (fieldsCount < 1 || fieldsCount > 3) {
|
|
13373
|
+
throw new Error('page_size="*" requires 1-3 fields to be specified');
|
|
13374
|
+
}
|
|
13375
|
+
}
|
|
12967
13376
|
params.page_size = options.page_size;
|
|
12968
13377
|
}
|
|
12969
13378
|
if (options.page_token !== void 0) {
|
|
@@ -12977,12 +13386,31 @@ var LanguagesClient = class {
|
|
|
12977
13386
|
* @returns The requested Language object.
|
|
12978
13387
|
*/
|
|
12979
13388
|
async getLanguage(languageId) {
|
|
12980
|
-
|
|
13389
|
+
_a2.languageIdSchema.parse(languageId);
|
|
12981
13390
|
return this.client.get(`/v1/languages/${languageId}`);
|
|
12982
13391
|
}
|
|
12983
|
-
}
|
|
12984
|
-
|
|
12985
|
-
|
|
13392
|
+
}, __publicField(_a2, "languageIdSchema", external_exports.string().trim().min(1, "Language ID must be a non-empty string").regex(
|
|
13393
|
+
/^[a-z]{2,3}(?:-[A-Z][a-z]{3})?$/,
|
|
13394
|
+
"Language ID must match BCP 47 format (language or language+script)"
|
|
13395
|
+
)), __publicField(_a2, "countrySchema", external_exports.string().trim().length(2, "Country code must be a 2-character ISO 3166-1 alpha-2 code").toUpperCase()), __publicField(_a2, "GetLanguagesOptionsSchema", external_exports.object({
|
|
13396
|
+
page_size: external_exports.union([external_exports.number(), external_exports.literal("*")]).optional(),
|
|
13397
|
+
fields: external_exports.array(LanguageSchema.keyof()).optional(),
|
|
13398
|
+
page_token: external_exports.string().optional(),
|
|
13399
|
+
country: _a2.countrySchema
|
|
13400
|
+
}).refine(
|
|
13401
|
+
(data) => {
|
|
13402
|
+
if (data.page_size === "*") {
|
|
13403
|
+
return data.fields && data.fields?.length >= 1 && data.fields?.length <= 3;
|
|
13404
|
+
}
|
|
13405
|
+
return true;
|
|
13406
|
+
},
|
|
13407
|
+
{
|
|
13408
|
+
message: 'page_size="*" required 1-3 fields to be specified',
|
|
13409
|
+
path: ["page_size", "fields"]
|
|
13410
|
+
}
|
|
13411
|
+
)), _a2);
|
|
13412
|
+
var _a3;
|
|
13413
|
+
var YouVersionPlatformConfiguration = (_a3 = class {
|
|
12986
13414
|
static getOrSetInstallationId() {
|
|
12987
13415
|
if (typeof window === "undefined") {
|
|
12988
13416
|
return "";
|
|
@@ -13066,7 +13494,7 @@ var YouVersionPlatformConfiguration = (_a = class {
|
|
|
13066
13494
|
static set expiryDateKey(value) {
|
|
13067
13495
|
this._expiryDateKey = value;
|
|
13068
13496
|
}
|
|
13069
|
-
}, __publicField(
|
|
13497
|
+
}, __publicField(_a3, "_appKey", null), __publicField(_a3, "_installationId", null), __publicField(_a3, "_apiHost", "api.youversion.com"), __publicField(_a3, "_refreshTokenKey", null), __publicField(_a3, "_expiryDateKey", null), _a3);
|
|
13070
13498
|
var HighlightsClient = class {
|
|
13071
13499
|
/**
|
|
13072
13500
|
* Creates a new HighlightsClient instance.
|
|
@@ -13689,219 +14117,6 @@ var YouVersionAPI = class {
|
|
|
13689
14117
|
return request;
|
|
13690
14118
|
}
|
|
13691
14119
|
};
|
|
13692
|
-
var BOOK_IDS = [
|
|
13693
|
-
"GEN",
|
|
13694
|
-
"EXO",
|
|
13695
|
-
"LEV",
|
|
13696
|
-
"NUM",
|
|
13697
|
-
"DEU",
|
|
13698
|
-
"JOS",
|
|
13699
|
-
"JDG",
|
|
13700
|
-
"RUT",
|
|
13701
|
-
"1SA",
|
|
13702
|
-
"2SA",
|
|
13703
|
-
"1KI",
|
|
13704
|
-
"2KI",
|
|
13705
|
-
"1CH",
|
|
13706
|
-
"2CH",
|
|
13707
|
-
"EZR",
|
|
13708
|
-
"NEH",
|
|
13709
|
-
"EST",
|
|
13710
|
-
"JOB",
|
|
13711
|
-
"PSA",
|
|
13712
|
-
"PRO",
|
|
13713
|
-
"ECC",
|
|
13714
|
-
"SNG",
|
|
13715
|
-
"ISA",
|
|
13716
|
-
"JER",
|
|
13717
|
-
"LAM",
|
|
13718
|
-
"EZK",
|
|
13719
|
-
"DAN",
|
|
13720
|
-
"HOS",
|
|
13721
|
-
"JOL",
|
|
13722
|
-
"AMO",
|
|
13723
|
-
"OBA",
|
|
13724
|
-
"JON",
|
|
13725
|
-
"MIC",
|
|
13726
|
-
"NAM",
|
|
13727
|
-
"HAB",
|
|
13728
|
-
"ZEP",
|
|
13729
|
-
"HAG",
|
|
13730
|
-
"ZEC",
|
|
13731
|
-
"MAL",
|
|
13732
|
-
"MAT",
|
|
13733
|
-
"MRK",
|
|
13734
|
-
"LUK",
|
|
13735
|
-
"JHN",
|
|
13736
|
-
"ACT",
|
|
13737
|
-
"ROM",
|
|
13738
|
-
"1CO",
|
|
13739
|
-
"2CO",
|
|
13740
|
-
"GAL",
|
|
13741
|
-
"EPH",
|
|
13742
|
-
"PHP",
|
|
13743
|
-
"COL",
|
|
13744
|
-
"1TH",
|
|
13745
|
-
"2TH",
|
|
13746
|
-
"1TI",
|
|
13747
|
-
"2TI",
|
|
13748
|
-
"TIT",
|
|
13749
|
-
"PHM",
|
|
13750
|
-
"HEB",
|
|
13751
|
-
"JAS",
|
|
13752
|
-
"1PE",
|
|
13753
|
-
"2PE",
|
|
13754
|
-
"1JN",
|
|
13755
|
-
"2JN",
|
|
13756
|
-
"3JN",
|
|
13757
|
-
"JUD",
|
|
13758
|
-
"REV",
|
|
13759
|
-
// dc (Apocrypha) books
|
|
13760
|
-
"TOB",
|
|
13761
|
-
"JDT",
|
|
13762
|
-
"ESG",
|
|
13763
|
-
"WIS",
|
|
13764
|
-
"SIR",
|
|
13765
|
-
"BAR",
|
|
13766
|
-
"LJE",
|
|
13767
|
-
"S3Y",
|
|
13768
|
-
"SUS",
|
|
13769
|
-
"BEL",
|
|
13770
|
-
"1MA",
|
|
13771
|
-
"2MA",
|
|
13772
|
-
"3MA",
|
|
13773
|
-
"4MA",
|
|
13774
|
-
"1ES",
|
|
13775
|
-
"2ES",
|
|
13776
|
-
"MAN",
|
|
13777
|
-
"PS2",
|
|
13778
|
-
"ODA",
|
|
13779
|
-
"PSS",
|
|
13780
|
-
"3ES",
|
|
13781
|
-
"EZA",
|
|
13782
|
-
"5EZ",
|
|
13783
|
-
"6EZ",
|
|
13784
|
-
"DAG",
|
|
13785
|
-
"PS3",
|
|
13786
|
-
"2BA",
|
|
13787
|
-
"LBA",
|
|
13788
|
-
"JUB",
|
|
13789
|
-
"ENO",
|
|
13790
|
-
"1MQ",
|
|
13791
|
-
"2MQ",
|
|
13792
|
-
"3MQ",
|
|
13793
|
-
"REP",
|
|
13794
|
-
"4BA",
|
|
13795
|
-
"LAO",
|
|
13796
|
-
// Luke-Acts combo, treated canonically as New Testament
|
|
13797
|
-
"LKA"
|
|
13798
|
-
];
|
|
13799
|
-
var BOOK_CANON = {
|
|
13800
|
-
GEN: "old_testament",
|
|
13801
|
-
EXO: "old_testament",
|
|
13802
|
-
LEV: "old_testament",
|
|
13803
|
-
NUM: "old_testament",
|
|
13804
|
-
DEU: "old_testament",
|
|
13805
|
-
JOS: "old_testament",
|
|
13806
|
-
JDG: "old_testament",
|
|
13807
|
-
RUT: "old_testament",
|
|
13808
|
-
"1SA": "old_testament",
|
|
13809
|
-
"2SA": "old_testament",
|
|
13810
|
-
"1KI": "old_testament",
|
|
13811
|
-
"2KI": "old_testament",
|
|
13812
|
-
"1CH": "old_testament",
|
|
13813
|
-
"2CH": "old_testament",
|
|
13814
|
-
EZR: "old_testament",
|
|
13815
|
-
NEH: "old_testament",
|
|
13816
|
-
EST: "old_testament",
|
|
13817
|
-
JOB: "old_testament",
|
|
13818
|
-
PSA: "old_testament",
|
|
13819
|
-
PRO: "old_testament",
|
|
13820
|
-
ECC: "old_testament",
|
|
13821
|
-
SNG: "old_testament",
|
|
13822
|
-
ISA: "old_testament",
|
|
13823
|
-
JER: "old_testament",
|
|
13824
|
-
LAM: "old_testament",
|
|
13825
|
-
EZK: "old_testament",
|
|
13826
|
-
DAN: "old_testament",
|
|
13827
|
-
HOS: "old_testament",
|
|
13828
|
-
JOL: "old_testament",
|
|
13829
|
-
AMO: "old_testament",
|
|
13830
|
-
OBA: "old_testament",
|
|
13831
|
-
JON: "old_testament",
|
|
13832
|
-
MIC: "old_testament",
|
|
13833
|
-
NAM: "old_testament",
|
|
13834
|
-
HAB: "old_testament",
|
|
13835
|
-
ZEP: "old_testament",
|
|
13836
|
-
HAG: "old_testament",
|
|
13837
|
-
ZEC: "old_testament",
|
|
13838
|
-
MAL: "old_testament",
|
|
13839
|
-
MAT: "new_testament",
|
|
13840
|
-
MRK: "new_testament",
|
|
13841
|
-
LUK: "new_testament",
|
|
13842
|
-
JHN: "new_testament",
|
|
13843
|
-
ACT: "new_testament",
|
|
13844
|
-
ROM: "new_testament",
|
|
13845
|
-
"1CO": "new_testament",
|
|
13846
|
-
"2CO": "new_testament",
|
|
13847
|
-
GAL: "new_testament",
|
|
13848
|
-
EPH: "new_testament",
|
|
13849
|
-
PHP: "new_testament",
|
|
13850
|
-
COL: "new_testament",
|
|
13851
|
-
"1TH": "new_testament",
|
|
13852
|
-
"2TH": "new_testament",
|
|
13853
|
-
"1TI": "new_testament",
|
|
13854
|
-
"2TI": "new_testament",
|
|
13855
|
-
TIT: "new_testament",
|
|
13856
|
-
PHM: "new_testament",
|
|
13857
|
-
HEB: "new_testament",
|
|
13858
|
-
JAS: "new_testament",
|
|
13859
|
-
"1PE": "new_testament",
|
|
13860
|
-
"2PE": "new_testament",
|
|
13861
|
-
"1JN": "new_testament",
|
|
13862
|
-
"2JN": "new_testament",
|
|
13863
|
-
"3JN": "new_testament",
|
|
13864
|
-
JUD: "new_testament",
|
|
13865
|
-
REV: "new_testament",
|
|
13866
|
-
TOB: "deuterocanon",
|
|
13867
|
-
JDT: "deuterocanon",
|
|
13868
|
-
ESG: "deuterocanon",
|
|
13869
|
-
WIS: "deuterocanon",
|
|
13870
|
-
SIR: "deuterocanon",
|
|
13871
|
-
BAR: "deuterocanon",
|
|
13872
|
-
LJE: "deuterocanon",
|
|
13873
|
-
S3Y: "deuterocanon",
|
|
13874
|
-
SUS: "deuterocanon",
|
|
13875
|
-
BEL: "deuterocanon",
|
|
13876
|
-
"1MA": "deuterocanon",
|
|
13877
|
-
"2MA": "deuterocanon",
|
|
13878
|
-
"3MA": "deuterocanon",
|
|
13879
|
-
"4MA": "deuterocanon",
|
|
13880
|
-
"1ES": "deuterocanon",
|
|
13881
|
-
"2ES": "deuterocanon",
|
|
13882
|
-
MAN: "deuterocanon",
|
|
13883
|
-
PS2: "deuterocanon",
|
|
13884
|
-
ODA: "deuterocanon",
|
|
13885
|
-
PSS: "deuterocanon",
|
|
13886
|
-
"3ES": "deuterocanon",
|
|
13887
|
-
EZA: "deuterocanon",
|
|
13888
|
-
"5EZ": "deuterocanon",
|
|
13889
|
-
"6EZ": "deuterocanon",
|
|
13890
|
-
DAG: "deuterocanon",
|
|
13891
|
-
PS3: "deuterocanon",
|
|
13892
|
-
"2BA": "deuterocanon",
|
|
13893
|
-
LBA: "deuterocanon",
|
|
13894
|
-
JUB: "deuterocanon",
|
|
13895
|
-
ENO: "deuterocanon",
|
|
13896
|
-
"1MQ": "deuterocanon",
|
|
13897
|
-
"2MQ": "deuterocanon",
|
|
13898
|
-
"3MQ": "deuterocanon",
|
|
13899
|
-
REP: "deuterocanon",
|
|
13900
|
-
"4BA": "deuterocanon",
|
|
13901
|
-
LAO: "deuterocanon",
|
|
13902
|
-
LKA: "new_testament"
|
|
13903
|
-
// Luke-Acts combo, treated canonically as New Testament
|
|
13904
|
-
};
|
|
13905
14120
|
|
|
13906
14121
|
// src/components/icons/info.tsx
|
|
13907
14122
|
import { jsx, jsxs } from "react/jsx-runtime";
|