@vocdoni/proto 1.14.4 → 1.14.7

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.
@@ -1475,13 +1475,13 @@ var EntityMetadataStore = {
1475
1475
  const tag = reader.uint32();
1476
1476
  switch (tag >>> 3) {
1477
1477
  case 1:
1478
- if (tag != 10) {
1478
+ if (tag !== 10) {
1479
1479
  break;
1480
1480
  }
1481
1481
  message.items.push(EntityMetadata.decode(reader, reader.uint32()));
1482
1482
  continue;
1483
1483
  }
1484
- if ((tag & 7) == 4 || tag == 0) {
1484
+ if ((tag & 7) === 4 || tag === 0) {
1485
1485
  break;
1486
1486
  }
1487
1487
  reader.skipType(tag & 7);
@@ -1493,10 +1493,8 @@ var EntityMetadataStore = {
1493
1493
  },
1494
1494
  toJSON(message) {
1495
1495
  const obj = {};
1496
- if (message.items) {
1497
- obj.items = message.items.map((e) => e ? EntityMetadata.toJSON(e) : void 0);
1498
- } else {
1499
- obj.items = [];
1496
+ if (message.items?.length) {
1497
+ obj.items = message.items.map((e) => EntityMetadata.toJSON(e));
1500
1498
  }
1501
1499
  return obj;
1502
1500
  },
@@ -1577,19 +1575,19 @@ var EntityMetadata = {
1577
1575
  const tag = reader.uint32();
1578
1576
  switch (tag >>> 3) {
1579
1577
  case 1:
1580
- if (tag != 10) {
1578
+ if (tag !== 10) {
1581
1579
  break;
1582
1580
  }
1583
1581
  message.version = reader.string();
1584
1582
  continue;
1585
1583
  case 2:
1586
- if (tag != 18) {
1584
+ if (tag !== 18) {
1587
1585
  break;
1588
1586
  }
1589
1587
  message.languages.push(reader.string());
1590
1588
  continue;
1591
1589
  case 3:
1592
- if (tag != 26) {
1590
+ if (tag !== 26) {
1593
1591
  break;
1594
1592
  }
1595
1593
  const entry3 = EntityMetadata_NameEntry.decode(reader, reader.uint32());
@@ -1598,7 +1596,7 @@ var EntityMetadata = {
1598
1596
  }
1599
1597
  continue;
1600
1598
  case 4:
1601
- if (tag != 34) {
1599
+ if (tag !== 34) {
1602
1600
  break;
1603
1601
  }
1604
1602
  const entry4 = EntityMetadata_DescriptionEntry.decode(reader, reader.uint32());
@@ -1607,13 +1605,13 @@ var EntityMetadata = {
1607
1605
  }
1608
1606
  continue;
1609
1607
  case 5:
1610
- if (tag != 42) {
1608
+ if (tag !== 42) {
1611
1609
  break;
1612
1610
  }
1613
1611
  message.votingProcesses = EntityMetadata_VotingProcesses.decode(reader, reader.uint32());
1614
1612
  continue;
1615
1613
  case 6:
1616
- if (tag != 50) {
1614
+ if (tag !== 50) {
1617
1615
  break;
1618
1616
  }
1619
1617
  const entry6 = EntityMetadata_NewsFeedEntry.decode(reader, reader.uint32());
@@ -1622,43 +1620,43 @@ var EntityMetadata = {
1622
1620
  }
1623
1621
  continue;
1624
1622
  case 7:
1625
- if (tag != 58) {
1623
+ if (tag !== 58) {
1626
1624
  break;
1627
1625
  }
1628
1626
  message.media = EntityMetadata_Media.decode(reader, reader.uint32());
1629
1627
  continue;
1630
1628
  case 8:
1631
- if (tag != 66) {
1629
+ if (tag !== 66) {
1632
1630
  break;
1633
1631
  }
1634
1632
  message.actions.push(EntityMetadata_Action.decode(reader, reader.uint32()));
1635
1633
  continue;
1636
1634
  case 9:
1637
- if (tag != 74) {
1635
+ if (tag !== 74) {
1638
1636
  break;
1639
1637
  }
1640
1638
  message.bootEntities.push(EntityReference.decode(reader, reader.uint32()));
1641
1639
  continue;
1642
1640
  case 10:
1643
- if (tag != 82) {
1641
+ if (tag !== 82) {
1644
1642
  break;
1645
1643
  }
1646
1644
  message.fallbackBootNodeEntities.push(EntityReference.decode(reader, reader.uint32()));
1647
1645
  continue;
1648
1646
  case 11:
1649
- if (tag != 90) {
1647
+ if (tag !== 90) {
1650
1648
  break;
1651
1649
  }
1652
1650
  message.trustedEntities.push(EntityReference.decode(reader, reader.uint32()));
1653
1651
  continue;
1654
1652
  case 12:
1655
- if (tag != 98) {
1653
+ if (tag !== 98) {
1656
1654
  break;
1657
1655
  }
1658
1656
  message.censusServiceManagedEntities.push(EntityReference.decode(reader, reader.uint32()));
1659
1657
  continue;
1660
1658
  case 100:
1661
- if (tag != 802) {
1659
+ if (tag !== 802) {
1662
1660
  break;
1663
1661
  }
1664
1662
  const entry100 = EntityMetadata_MetaEntry.decode(reader, reader.uint32());
@@ -1667,7 +1665,7 @@ var EntityMetadata = {
1667
1665
  }
1668
1666
  continue;
1669
1667
  }
1670
- if ((tag & 7) == 4 || tag == 0) {
1668
+ if ((tag & 7) === 4 || tag === 0) {
1671
1669
  break;
1672
1670
  }
1673
1671
  reader.skipType(tag & 7);
@@ -1705,66 +1703,68 @@ var EntityMetadata = {
1705
1703
  },
1706
1704
  toJSON(message) {
1707
1705
  const obj = {};
1708
- message.version !== void 0 && (obj.version = message.version);
1709
- if (message.languages) {
1710
- obj.languages = message.languages.map((e) => e);
1711
- } else {
1712
- obj.languages = [];
1706
+ if (message.version !== "") {
1707
+ obj.version = message.version;
1708
+ }
1709
+ if (message.languages?.length) {
1710
+ obj.languages = message.languages;
1713
1711
  }
1714
- obj.name = {};
1715
1712
  if (message.name) {
1716
- Object.entries(message.name).forEach(([k, v]) => {
1717
- obj.name[k] = v;
1718
- });
1713
+ const entries = Object.entries(message.name);
1714
+ if (entries.length > 0) {
1715
+ obj.name = {};
1716
+ entries.forEach(([k, v]) => {
1717
+ obj.name[k] = v;
1718
+ });
1719
+ }
1719
1720
  }
1720
- obj.description = {};
1721
1721
  if (message.description) {
1722
- Object.entries(message.description).forEach(([k, v]) => {
1723
- obj.description[k] = v;
1724
- });
1722
+ const entries = Object.entries(message.description);
1723
+ if (entries.length > 0) {
1724
+ obj.description = {};
1725
+ entries.forEach(([k, v]) => {
1726
+ obj.description[k] = v;
1727
+ });
1728
+ }
1729
+ }
1730
+ if (message.votingProcesses !== void 0) {
1731
+ obj.votingProcesses = EntityMetadata_VotingProcesses.toJSON(message.votingProcesses);
1725
1732
  }
1726
- message.votingProcesses !== void 0 && (obj.votingProcesses = message.votingProcesses ? EntityMetadata_VotingProcesses.toJSON(message.votingProcesses) : void 0);
1727
- obj.newsFeed = {};
1728
1733
  if (message.newsFeed) {
1729
- Object.entries(message.newsFeed).forEach(([k, v]) => {
1730
- obj.newsFeed[k] = v;
1731
- });
1734
+ const entries = Object.entries(message.newsFeed);
1735
+ if (entries.length > 0) {
1736
+ obj.newsFeed = {};
1737
+ entries.forEach(([k, v]) => {
1738
+ obj.newsFeed[k] = v;
1739
+ });
1740
+ }
1732
1741
  }
1733
- message.media !== void 0 && (obj.media = message.media ? EntityMetadata_Media.toJSON(message.media) : void 0);
1734
- if (message.actions) {
1735
- obj.actions = message.actions.map((e) => e ? EntityMetadata_Action.toJSON(e) : void 0);
1736
- } else {
1737
- obj.actions = [];
1742
+ if (message.media !== void 0) {
1743
+ obj.media = EntityMetadata_Media.toJSON(message.media);
1738
1744
  }
1739
- if (message.bootEntities) {
1740
- obj.bootEntities = message.bootEntities.map((e) => e ? EntityReference.toJSON(e) : void 0);
1741
- } else {
1742
- obj.bootEntities = [];
1745
+ if (message.actions?.length) {
1746
+ obj.actions = message.actions.map((e) => EntityMetadata_Action.toJSON(e));
1743
1747
  }
1744
- if (message.fallbackBootNodeEntities) {
1745
- obj.fallbackBootNodeEntities = message.fallbackBootNodeEntities.map(
1746
- (e) => e ? EntityReference.toJSON(e) : void 0
1747
- );
1748
- } else {
1749
- obj.fallbackBootNodeEntities = [];
1748
+ if (message.bootEntities?.length) {
1749
+ obj.bootEntities = message.bootEntities.map((e) => EntityReference.toJSON(e));
1750
1750
  }
1751
- if (message.trustedEntities) {
1752
- obj.trustedEntities = message.trustedEntities.map((e) => e ? EntityReference.toJSON(e) : void 0);
1753
- } else {
1754
- obj.trustedEntities = [];
1751
+ if (message.fallbackBootNodeEntities?.length) {
1752
+ obj.fallbackBootNodeEntities = message.fallbackBootNodeEntities.map((e) => EntityReference.toJSON(e));
1755
1753
  }
1756
- if (message.censusServiceManagedEntities) {
1757
- obj.censusServiceManagedEntities = message.censusServiceManagedEntities.map(
1758
- (e) => e ? EntityReference.toJSON(e) : void 0
1759
- );
1760
- } else {
1761
- obj.censusServiceManagedEntities = [];
1754
+ if (message.trustedEntities?.length) {
1755
+ obj.trustedEntities = message.trustedEntities.map((e) => EntityReference.toJSON(e));
1756
+ }
1757
+ if (message.censusServiceManagedEntities?.length) {
1758
+ obj.censusServiceManagedEntities = message.censusServiceManagedEntities.map((e) => EntityReference.toJSON(e));
1762
1759
  }
1763
- obj.meta = {};
1764
1760
  if (message.meta) {
1765
- Object.entries(message.meta).forEach(([k, v]) => {
1766
- obj.meta[k] = v;
1767
- });
1761
+ const entries = Object.entries(message.meta);
1762
+ if (entries.length > 0) {
1763
+ obj.meta = {};
1764
+ entries.forEach(([k, v]) => {
1765
+ obj.meta[k] = v;
1766
+ });
1767
+ }
1768
1768
  }
1769
1769
  return obj;
1770
1770
  },
@@ -1833,19 +1833,19 @@ var EntityMetadata_NameEntry = {
1833
1833
  const tag = reader.uint32();
1834
1834
  switch (tag >>> 3) {
1835
1835
  case 1:
1836
- if (tag != 10) {
1836
+ if (tag !== 10) {
1837
1837
  break;
1838
1838
  }
1839
1839
  message.key = reader.string();
1840
1840
  continue;
1841
1841
  case 2:
1842
- if (tag != 18) {
1842
+ if (tag !== 18) {
1843
1843
  break;
1844
1844
  }
1845
1845
  message.value = reader.string();
1846
1846
  continue;
1847
1847
  }
1848
- if ((tag & 7) == 4 || tag == 0) {
1848
+ if ((tag & 7) === 4 || tag === 0) {
1849
1849
  break;
1850
1850
  }
1851
1851
  reader.skipType(tag & 7);
@@ -1857,8 +1857,12 @@ var EntityMetadata_NameEntry = {
1857
1857
  },
1858
1858
  toJSON(message) {
1859
1859
  const obj = {};
1860
- message.key !== void 0 && (obj.key = message.key);
1861
- message.value !== void 0 && (obj.value = message.value);
1860
+ if (message.key !== "") {
1861
+ obj.key = message.key;
1862
+ }
1863
+ if (message.value !== "") {
1864
+ obj.value = message.value;
1865
+ }
1862
1866
  return obj;
1863
1867
  },
1864
1868
  create(base) {
@@ -1892,19 +1896,19 @@ var EntityMetadata_DescriptionEntry = {
1892
1896
  const tag = reader.uint32();
1893
1897
  switch (tag >>> 3) {
1894
1898
  case 1:
1895
- if (tag != 10) {
1899
+ if (tag !== 10) {
1896
1900
  break;
1897
1901
  }
1898
1902
  message.key = reader.string();
1899
1903
  continue;
1900
1904
  case 2:
1901
- if (tag != 18) {
1905
+ if (tag !== 18) {
1902
1906
  break;
1903
1907
  }
1904
1908
  message.value = reader.string();
1905
1909
  continue;
1906
1910
  }
1907
- if ((tag & 7) == 4 || tag == 0) {
1911
+ if ((tag & 7) === 4 || tag === 0) {
1908
1912
  break;
1909
1913
  }
1910
1914
  reader.skipType(tag & 7);
@@ -1916,8 +1920,12 @@ var EntityMetadata_DescriptionEntry = {
1916
1920
  },
1917
1921
  toJSON(message) {
1918
1922
  const obj = {};
1919
- message.key !== void 0 && (obj.key = message.key);
1920
- message.value !== void 0 && (obj.value = message.value);
1923
+ if (message.key !== "") {
1924
+ obj.key = message.key;
1925
+ }
1926
+ if (message.value !== "") {
1927
+ obj.value = message.value;
1928
+ }
1921
1929
  return obj;
1922
1930
  },
1923
1931
  create(base) {
@@ -1951,19 +1959,19 @@ var EntityMetadata_VotingProcesses = {
1951
1959
  const tag = reader.uint32();
1952
1960
  switch (tag >>> 3) {
1953
1961
  case 1:
1954
- if (tag != 10) {
1962
+ if (tag !== 10) {
1955
1963
  break;
1956
1964
  }
1957
1965
  message.active.push(reader.string());
1958
1966
  continue;
1959
1967
  case 2:
1960
- if (tag != 18) {
1968
+ if (tag !== 18) {
1961
1969
  break;
1962
1970
  }
1963
1971
  message.ended.push(reader.string());
1964
1972
  continue;
1965
1973
  }
1966
- if ((tag & 7) == 4 || tag == 0) {
1974
+ if ((tag & 7) === 4 || tag === 0) {
1967
1975
  break;
1968
1976
  }
1969
1977
  reader.skipType(tag & 7);
@@ -1978,15 +1986,11 @@ var EntityMetadata_VotingProcesses = {
1978
1986
  },
1979
1987
  toJSON(message) {
1980
1988
  const obj = {};
1981
- if (message.active) {
1982
- obj.active = message.active.map((e) => e);
1983
- } else {
1984
- obj.active = [];
1989
+ if (message.active?.length) {
1990
+ obj.active = message.active;
1985
1991
  }
1986
- if (message.ended) {
1987
- obj.ended = message.ended.map((e) => e);
1988
- } else {
1989
- obj.ended = [];
1992
+ if (message.ended?.length) {
1993
+ obj.ended = message.ended;
1990
1994
  }
1991
1995
  return obj;
1992
1996
  },
@@ -2021,19 +2025,19 @@ var EntityMetadata_NewsFeedEntry = {
2021
2025
  const tag = reader.uint32();
2022
2026
  switch (tag >>> 3) {
2023
2027
  case 1:
2024
- if (tag != 10) {
2028
+ if (tag !== 10) {
2025
2029
  break;
2026
2030
  }
2027
2031
  message.key = reader.string();
2028
2032
  continue;
2029
2033
  case 2:
2030
- if (tag != 18) {
2034
+ if (tag !== 18) {
2031
2035
  break;
2032
2036
  }
2033
2037
  message.value = reader.string();
2034
2038
  continue;
2035
2039
  }
2036
- if ((tag & 7) == 4 || tag == 0) {
2040
+ if ((tag & 7) === 4 || tag === 0) {
2037
2041
  break;
2038
2042
  }
2039
2043
  reader.skipType(tag & 7);
@@ -2045,8 +2049,12 @@ var EntityMetadata_NewsFeedEntry = {
2045
2049
  },
2046
2050
  toJSON(message) {
2047
2051
  const obj = {};
2048
- message.key !== void 0 && (obj.key = message.key);
2049
- message.value !== void 0 && (obj.value = message.value);
2052
+ if (message.key !== "") {
2053
+ obj.key = message.key;
2054
+ }
2055
+ if (message.value !== "") {
2056
+ obj.value = message.value;
2057
+ }
2050
2058
  return obj;
2051
2059
  },
2052
2060
  create(base) {
@@ -2080,19 +2088,19 @@ var EntityMetadata_Media = {
2080
2088
  const tag = reader.uint32();
2081
2089
  switch (tag >>> 3) {
2082
2090
  case 1:
2083
- if (tag != 10) {
2091
+ if (tag !== 10) {
2084
2092
  break;
2085
2093
  }
2086
2094
  message.avatar = reader.string();
2087
2095
  continue;
2088
2096
  case 2:
2089
- if (tag != 18) {
2097
+ if (tag !== 18) {
2090
2098
  break;
2091
2099
  }
2092
2100
  message.header = reader.string();
2093
2101
  continue;
2094
2102
  }
2095
- if ((tag & 7) == 4 || tag == 0) {
2103
+ if ((tag & 7) === 4 || tag === 0) {
2096
2104
  break;
2097
2105
  }
2098
2106
  reader.skipType(tag & 7);
@@ -2107,8 +2115,12 @@ var EntityMetadata_Media = {
2107
2115
  },
2108
2116
  toJSON(message) {
2109
2117
  const obj = {};
2110
- message.avatar !== void 0 && (obj.avatar = message.avatar);
2111
- message.header !== void 0 && (obj.header = message.header);
2118
+ if (message.avatar !== "") {
2119
+ obj.avatar = message.avatar;
2120
+ }
2121
+ if (message.header !== "") {
2122
+ obj.header = message.header;
2123
+ }
2112
2124
  return obj;
2113
2125
  },
2114
2126
  create(base) {
@@ -2154,19 +2166,19 @@ var EntityMetadata_Action = {
2154
2166
  const tag = reader.uint32();
2155
2167
  switch (tag >>> 3) {
2156
2168
  case 1:
2157
- if (tag != 10) {
2169
+ if (tag !== 10) {
2158
2170
  break;
2159
2171
  }
2160
2172
  message.type = reader.string();
2161
2173
  continue;
2162
2174
  case 7:
2163
- if (tag != 58) {
2175
+ if (tag !== 58) {
2164
2176
  break;
2165
2177
  }
2166
2178
  message.actionKey = reader.string();
2167
2179
  continue;
2168
2180
  case 2:
2169
- if (tag != 18) {
2181
+ if (tag !== 18) {
2170
2182
  break;
2171
2183
  }
2172
2184
  const entry2 = EntityMetadata_Action_NameEntry.decode(reader, reader.uint32());
@@ -2175,25 +2187,25 @@ var EntityMetadata_Action = {
2175
2187
  }
2176
2188
  continue;
2177
2189
  case 3:
2178
- if (tag != 26) {
2190
+ if (tag !== 26) {
2179
2191
  break;
2180
2192
  }
2181
2193
  message.visible = reader.string();
2182
2194
  continue;
2183
2195
  case 4:
2184
- if (tag != 34) {
2196
+ if (tag !== 34) {
2185
2197
  break;
2186
2198
  }
2187
2199
  message.url = reader.string();
2188
2200
  continue;
2189
2201
  case 5:
2190
- if (tag != 42) {
2202
+ if (tag !== 42) {
2191
2203
  break;
2192
2204
  }
2193
2205
  message.imageSources.push(EntityMetadata_Action_ImageSource.decode(reader, reader.uint32()));
2194
2206
  continue;
2195
2207
  }
2196
- if ((tag & 7) == 4 || tag == 0) {
2208
+ if ((tag & 7) === 4 || tag === 0) {
2197
2209
  break;
2198
2210
  }
2199
2211
  reader.skipType(tag & 7);
@@ -2215,20 +2227,29 @@ var EntityMetadata_Action = {
2215
2227
  },
2216
2228
  toJSON(message) {
2217
2229
  const obj = {};
2218
- message.type !== void 0 && (obj.type = message.type);
2219
- message.actionKey !== void 0 && (obj.actionKey = message.actionKey);
2220
- obj.name = {};
2230
+ if (message.type !== "") {
2231
+ obj.type = message.type;
2232
+ }
2233
+ if (message.actionKey !== "") {
2234
+ obj.actionKey = message.actionKey;
2235
+ }
2221
2236
  if (message.name) {
2222
- Object.entries(message.name).forEach(([k, v]) => {
2223
- obj.name[k] = v;
2224
- });
2237
+ const entries = Object.entries(message.name);
2238
+ if (entries.length > 0) {
2239
+ obj.name = {};
2240
+ entries.forEach(([k, v]) => {
2241
+ obj.name[k] = v;
2242
+ });
2243
+ }
2244
+ }
2245
+ if (message.visible !== "") {
2246
+ obj.visible = message.visible;
2247
+ }
2248
+ if (message.url !== "") {
2249
+ obj.url = message.url;
2225
2250
  }
2226
- message.visible !== void 0 && (obj.visible = message.visible);
2227
- message.url !== void 0 && (obj.url = message.url);
2228
- if (message.imageSources) {
2229
- obj.imageSources = message.imageSources.map((e) => e ? EntityMetadata_Action_ImageSource.toJSON(e) : void 0);
2230
- } else {
2231
- obj.imageSources = [];
2251
+ if (message.imageSources?.length) {
2252
+ obj.imageSources = message.imageSources.map((e) => EntityMetadata_Action_ImageSource.toJSON(e));
2232
2253
  }
2233
2254
  return obj;
2234
2255
  },
@@ -2272,19 +2293,19 @@ var EntityMetadata_Action_NameEntry = {
2272
2293
  const tag = reader.uint32();
2273
2294
  switch (tag >>> 3) {
2274
2295
  case 1:
2275
- if (tag != 10) {
2296
+ if (tag !== 10) {
2276
2297
  break;
2277
2298
  }
2278
2299
  message.key = reader.string();
2279
2300
  continue;
2280
2301
  case 2:
2281
- if (tag != 18) {
2302
+ if (tag !== 18) {
2282
2303
  break;
2283
2304
  }
2284
2305
  message.value = reader.string();
2285
2306
  continue;
2286
2307
  }
2287
- if ((tag & 7) == 4 || tag == 0) {
2308
+ if ((tag & 7) === 4 || tag === 0) {
2288
2309
  break;
2289
2310
  }
2290
2311
  reader.skipType(tag & 7);
@@ -2296,8 +2317,12 @@ var EntityMetadata_Action_NameEntry = {
2296
2317
  },
2297
2318
  toJSON(message) {
2298
2319
  const obj = {};
2299
- message.key !== void 0 && (obj.key = message.key);
2300
- message.value !== void 0 && (obj.value = message.value);
2320
+ if (message.key !== "") {
2321
+ obj.key = message.key;
2322
+ }
2323
+ if (message.value !== "") {
2324
+ obj.value = message.value;
2325
+ }
2301
2326
  return obj;
2302
2327
  },
2303
2328
  create(base) {
@@ -2340,31 +2365,31 @@ var EntityMetadata_Action_ImageSource = {
2340
2365
  const tag = reader.uint32();
2341
2366
  switch (tag >>> 3) {
2342
2367
  case 1:
2343
- if (tag != 10) {
2368
+ if (tag !== 10) {
2344
2369
  break;
2345
2370
  }
2346
2371
  message.type = reader.string();
2347
2372
  continue;
2348
2373
  case 2:
2349
- if (tag != 18) {
2374
+ if (tag !== 18) {
2350
2375
  break;
2351
2376
  }
2352
2377
  message.name = reader.string();
2353
2378
  continue;
2354
2379
  case 3:
2355
- if (tag != 26) {
2380
+ if (tag !== 26) {
2356
2381
  break;
2357
2382
  }
2358
2383
  message.orientation = reader.string();
2359
2384
  continue;
2360
2385
  case 4:
2361
- if (tag != 34) {
2386
+ if (tag !== 34) {
2362
2387
  break;
2363
2388
  }
2364
2389
  message.overlay = reader.string();
2365
2390
  continue;
2366
2391
  case 5:
2367
- if (tag != 42) {
2392
+ if (tag !== 42) {
2368
2393
  break;
2369
2394
  }
2370
2395
  const entry5 = EntityMetadata_Action_ImageSource_CaptionEntry.decode(reader, reader.uint32());
@@ -2373,7 +2398,7 @@ var EntityMetadata_Action_ImageSource = {
2373
2398
  }
2374
2399
  continue;
2375
2400
  }
2376
- if ((tag & 7) == 4 || tag == 0) {
2401
+ if ((tag & 7) === 4 || tag === 0) {
2377
2402
  break;
2378
2403
  }
2379
2404
  reader.skipType(tag & 7);
@@ -2394,15 +2419,26 @@ var EntityMetadata_Action_ImageSource = {
2394
2419
  },
2395
2420
  toJSON(message) {
2396
2421
  const obj = {};
2397
- message.type !== void 0 && (obj.type = message.type);
2398
- message.name !== void 0 && (obj.name = message.name);
2399
- message.orientation !== void 0 && (obj.orientation = message.orientation);
2400
- message.overlay !== void 0 && (obj.overlay = message.overlay);
2401
- obj.caption = {};
2422
+ if (message.type !== "") {
2423
+ obj.type = message.type;
2424
+ }
2425
+ if (message.name !== "") {
2426
+ obj.name = message.name;
2427
+ }
2428
+ if (message.orientation !== "") {
2429
+ obj.orientation = message.orientation;
2430
+ }
2431
+ if (message.overlay !== "") {
2432
+ obj.overlay = message.overlay;
2433
+ }
2402
2434
  if (message.caption) {
2403
- Object.entries(message.caption).forEach(([k, v]) => {
2404
- obj.caption[k] = v;
2405
- });
2435
+ const entries = Object.entries(message.caption);
2436
+ if (entries.length > 0) {
2437
+ obj.caption = {};
2438
+ entries.forEach(([k, v]) => {
2439
+ obj.caption[k] = v;
2440
+ });
2441
+ }
2406
2442
  }
2407
2443
  return obj;
2408
2444
  },
@@ -2445,19 +2481,19 @@ var EntityMetadata_Action_ImageSource_CaptionEntry = {
2445
2481
  const tag = reader.uint32();
2446
2482
  switch (tag >>> 3) {
2447
2483
  case 1:
2448
- if (tag != 10) {
2484
+ if (tag !== 10) {
2449
2485
  break;
2450
2486
  }
2451
2487
  message.key = reader.string();
2452
2488
  continue;
2453
2489
  case 2:
2454
- if (tag != 18) {
2490
+ if (tag !== 18) {
2455
2491
  break;
2456
2492
  }
2457
2493
  message.value = reader.string();
2458
2494
  continue;
2459
2495
  }
2460
- if ((tag & 7) == 4 || tag == 0) {
2496
+ if ((tag & 7) === 4 || tag === 0) {
2461
2497
  break;
2462
2498
  }
2463
2499
  reader.skipType(tag & 7);
@@ -2469,8 +2505,12 @@ var EntityMetadata_Action_ImageSource_CaptionEntry = {
2469
2505
  },
2470
2506
  toJSON(message) {
2471
2507
  const obj = {};
2472
- message.key !== void 0 && (obj.key = message.key);
2473
- message.value !== void 0 && (obj.value = message.value);
2508
+ if (message.key !== "") {
2509
+ obj.key = message.key;
2510
+ }
2511
+ if (message.value !== "") {
2512
+ obj.value = message.value;
2513
+ }
2474
2514
  return obj;
2475
2515
  },
2476
2516
  create(base) {
@@ -2504,19 +2544,19 @@ var EntityMetadata_MetaEntry = {
2504
2544
  const tag = reader.uint32();
2505
2545
  switch (tag >>> 3) {
2506
2546
  case 1:
2507
- if (tag != 10) {
2547
+ if (tag !== 10) {
2508
2548
  break;
2509
2549
  }
2510
2550
  message.key = reader.string();
2511
2551
  continue;
2512
2552
  case 2:
2513
- if (tag != 18) {
2553
+ if (tag !== 18) {
2514
2554
  break;
2515
2555
  }
2516
2556
  message.value = reader.string();
2517
2557
  continue;
2518
2558
  }
2519
- if ((tag & 7) == 4 || tag == 0) {
2559
+ if ((tag & 7) === 4 || tag === 0) {
2520
2560
  break;
2521
2561
  }
2522
2562
  reader.skipType(tag & 7);
@@ -2528,8 +2568,12 @@ var EntityMetadata_MetaEntry = {
2528
2568
  },
2529
2569
  toJSON(message) {
2530
2570
  const obj = {};
2531
- message.key !== void 0 && (obj.key = message.key);
2532
- message.value !== void 0 && (obj.value = message.value);
2571
+ if (message.key !== "") {
2572
+ obj.key = message.key;
2573
+ }
2574
+ if (message.value !== "") {
2575
+ obj.value = message.value;
2576
+ }
2533
2577
  return obj;
2534
2578
  },
2535
2579
  create(base) {
@@ -2563,19 +2607,19 @@ var EntityReference = {
2563
2607
  const tag = reader.uint32();
2564
2608
  switch (tag >>> 3) {
2565
2609
  case 1:
2566
- if (tag != 10) {
2610
+ if (tag !== 10) {
2567
2611
  break;
2568
2612
  }
2569
2613
  message.entityId = reader.string();
2570
2614
  continue;
2571
2615
  case 2:
2572
- if (tag != 18) {
2616
+ if (tag !== 18) {
2573
2617
  break;
2574
2618
  }
2575
2619
  message.entryPoints.push(reader.string());
2576
2620
  continue;
2577
2621
  }
2578
- if ((tag & 7) == 4 || tag == 0) {
2622
+ if ((tag & 7) === 4 || tag === 0) {
2579
2623
  break;
2580
2624
  }
2581
2625
  reader.skipType(tag & 7);
@@ -2590,11 +2634,11 @@ var EntityReference = {
2590
2634
  },
2591
2635
  toJSON(message) {
2592
2636
  const obj = {};
2593
- message.entityId !== void 0 && (obj.entityId = message.entityId);
2594
- if (message.entryPoints) {
2595
- obj.entryPoints = message.entryPoints.map((e) => e);
2596
- } else {
2597
- obj.entryPoints = [];
2637
+ if (message.entityId !== "") {
2638
+ obj.entityId = message.entityId;
2639
+ }
2640
+ if (message.entryPoints?.length) {
2641
+ obj.entryPoints = message.entryPoints;
2598
2642
  }
2599
2643
  return obj;
2600
2644
  },
@@ -2635,13 +2679,13 @@ var FeedStore = {
2635
2679
  const tag = reader.uint32();
2636
2680
  switch (tag >>> 3) {
2637
2681
  case 1:
2638
- if (tag != 10) {
2682
+ if (tag !== 10) {
2639
2683
  break;
2640
2684
  }
2641
2685
  message.items.push(Feed.decode(reader, reader.uint32()));
2642
2686
  continue;
2643
2687
  }
2644
- if ((tag & 7) == 4 || tag == 0) {
2688
+ if ((tag & 7) === 4 || tag === 0) {
2645
2689
  break;
2646
2690
  }
2647
2691
  reader.skipType(tag & 7);
@@ -2653,10 +2697,8 @@ var FeedStore = {
2653
2697
  },
2654
2698
  toJSON(message) {
2655
2699
  const obj = {};
2656
- if (message.items) {
2657
- obj.items = message.items.map((e) => e ? Feed.toJSON(e) : void 0);
2658
- } else {
2659
- obj.items = [];
2700
+ if (message.items?.length) {
2701
+ obj.items = message.items.map((e) => Feed.toJSON(e));
2660
2702
  }
2661
2703
  return obj;
2662
2704
  },
@@ -2725,61 +2767,61 @@ var Feed = {
2725
2767
  const tag = reader.uint32();
2726
2768
  switch (tag >>> 3) {
2727
2769
  case 1:
2728
- if (tag != 10) {
2770
+ if (tag !== 10) {
2729
2771
  break;
2730
2772
  }
2731
2773
  message.version = reader.string();
2732
2774
  continue;
2733
2775
  case 2:
2734
- if (tag != 18) {
2776
+ if (tag !== 18) {
2735
2777
  break;
2736
2778
  }
2737
2779
  message.title = reader.string();
2738
2780
  continue;
2739
2781
  case 3:
2740
- if (tag != 26) {
2782
+ if (tag !== 26) {
2741
2783
  break;
2742
2784
  }
2743
2785
  message.homePageUrl = reader.string();
2744
2786
  continue;
2745
2787
  case 4:
2746
- if (tag != 34) {
2788
+ if (tag !== 34) {
2747
2789
  break;
2748
2790
  }
2749
2791
  message.description = reader.string();
2750
2792
  continue;
2751
2793
  case 5:
2752
- if (tag != 42) {
2794
+ if (tag !== 42) {
2753
2795
  break;
2754
2796
  }
2755
2797
  message.feedUrl = reader.string();
2756
2798
  continue;
2757
2799
  case 6:
2758
- if (tag != 50) {
2800
+ if (tag !== 50) {
2759
2801
  break;
2760
2802
  }
2761
2803
  message.icon = reader.string();
2762
2804
  continue;
2763
2805
  case 7:
2764
- if (tag != 58) {
2806
+ if (tag !== 58) {
2765
2807
  break;
2766
2808
  }
2767
2809
  message.favicon = reader.string();
2768
2810
  continue;
2769
2811
  case 8:
2770
- if (tag != 64) {
2812
+ if (tag !== 64) {
2771
2813
  break;
2772
2814
  }
2773
2815
  message.expired = reader.bool();
2774
2816
  continue;
2775
2817
  case 9:
2776
- if (tag != 74) {
2818
+ if (tag !== 74) {
2777
2819
  break;
2778
2820
  }
2779
2821
  message.items.push(FeedPost.decode(reader, reader.uint32()));
2780
2822
  continue;
2781
2823
  case 100:
2782
- if (tag != 802) {
2824
+ if (tag !== 802) {
2783
2825
  break;
2784
2826
  }
2785
2827
  const entry100 = Feed_MetaEntry.decode(reader, reader.uint32());
@@ -2788,7 +2830,7 @@ var Feed = {
2788
2830
  }
2789
2831
  continue;
2790
2832
  }
2791
- if ((tag & 7) == 4 || tag == 0) {
2833
+ if ((tag & 7) === 4 || tag === 0) {
2792
2834
  break;
2793
2835
  }
2794
2836
  reader.skipType(tag & 7);
@@ -2814,24 +2856,41 @@ var Feed = {
2814
2856
  },
2815
2857
  toJSON(message) {
2816
2858
  const obj = {};
2817
- message.version !== void 0 && (obj.version = message.version);
2818
- message.title !== void 0 && (obj.title = message.title);
2819
- message.homePageUrl !== void 0 && (obj.homePageUrl = message.homePageUrl);
2820
- message.description !== void 0 && (obj.description = message.description);
2821
- message.feedUrl !== void 0 && (obj.feedUrl = message.feedUrl);
2822
- message.icon !== void 0 && (obj.icon = message.icon);
2823
- message.favicon !== void 0 && (obj.favicon = message.favicon);
2824
- message.expired !== void 0 && (obj.expired = message.expired);
2825
- if (message.items) {
2826
- obj.items = message.items.map((e) => e ? FeedPost.toJSON(e) : void 0);
2827
- } else {
2828
- obj.items = [];
2829
- }
2830
- obj.meta = {};
2859
+ if (message.version !== "") {
2860
+ obj.version = message.version;
2861
+ }
2862
+ if (message.title !== "") {
2863
+ obj.title = message.title;
2864
+ }
2865
+ if (message.homePageUrl !== "") {
2866
+ obj.homePageUrl = message.homePageUrl;
2867
+ }
2868
+ if (message.description !== "") {
2869
+ obj.description = message.description;
2870
+ }
2871
+ if (message.feedUrl !== "") {
2872
+ obj.feedUrl = message.feedUrl;
2873
+ }
2874
+ if (message.icon !== "") {
2875
+ obj.icon = message.icon;
2876
+ }
2877
+ if (message.favicon !== "") {
2878
+ obj.favicon = message.favicon;
2879
+ }
2880
+ if (message.expired === true) {
2881
+ obj.expired = message.expired;
2882
+ }
2883
+ if (message.items?.length) {
2884
+ obj.items = message.items.map((e) => FeedPost.toJSON(e));
2885
+ }
2831
2886
  if (message.meta) {
2832
- Object.entries(message.meta).forEach(([k, v]) => {
2833
- obj.meta[k] = v;
2834
- });
2887
+ const entries = Object.entries(message.meta);
2888
+ if (entries.length > 0) {
2889
+ obj.meta = {};
2890
+ entries.forEach(([k, v]) => {
2891
+ obj.meta[k] = v;
2892
+ });
2893
+ }
2835
2894
  }
2836
2895
  return obj;
2837
2896
  },
@@ -2879,19 +2938,19 @@ var Feed_MetaEntry = {
2879
2938
  const tag = reader.uint32();
2880
2939
  switch (tag >>> 3) {
2881
2940
  case 1:
2882
- if (tag != 10) {
2941
+ if (tag !== 10) {
2883
2942
  break;
2884
2943
  }
2885
2944
  message.key = reader.string();
2886
2945
  continue;
2887
2946
  case 2:
2888
- if (tag != 18) {
2947
+ if (tag !== 18) {
2889
2948
  break;
2890
2949
  }
2891
2950
  message.value = reader.string();
2892
2951
  continue;
2893
2952
  }
2894
- if ((tag & 7) == 4 || tag == 0) {
2953
+ if ((tag & 7) === 4 || tag === 0) {
2895
2954
  break;
2896
2955
  }
2897
2956
  reader.skipType(tag & 7);
@@ -2903,8 +2962,12 @@ var Feed_MetaEntry = {
2903
2962
  },
2904
2963
  toJSON(message) {
2905
2964
  const obj = {};
2906
- message.key !== void 0 && (obj.key = message.key);
2907
- message.value !== void 0 && (obj.value = message.value);
2965
+ if (message.key !== "") {
2966
+ obj.key = message.key;
2967
+ }
2968
+ if (message.value !== "") {
2969
+ obj.value = message.value;
2970
+ }
2908
2971
  return obj;
2909
2972
  },
2910
2973
  create(base) {
@@ -2977,73 +3040,73 @@ var FeedPost = {
2977
3040
  const tag = reader.uint32();
2978
3041
  switch (tag >>> 3) {
2979
3042
  case 1:
2980
- if (tag != 10) {
3043
+ if (tag !== 10) {
2981
3044
  break;
2982
3045
  }
2983
3046
  message.id = reader.string();
2984
3047
  continue;
2985
3048
  case 2:
2986
- if (tag != 18) {
3049
+ if (tag !== 18) {
2987
3050
  break;
2988
3051
  }
2989
3052
  message.title = reader.string();
2990
3053
  continue;
2991
3054
  case 3:
2992
- if (tag != 26) {
3055
+ if (tag !== 26) {
2993
3056
  break;
2994
3057
  }
2995
3058
  message.summary = reader.string();
2996
3059
  continue;
2997
3060
  case 4:
2998
- if (tag != 34) {
3061
+ if (tag !== 34) {
2999
3062
  break;
3000
3063
  }
3001
3064
  message.contentText = reader.string();
3002
3065
  continue;
3003
3066
  case 5:
3004
- if (tag != 42) {
3067
+ if (tag !== 42) {
3005
3068
  break;
3006
3069
  }
3007
3070
  message.contentHtml = reader.string();
3008
3071
  continue;
3009
3072
  case 6:
3010
- if (tag != 50) {
3073
+ if (tag !== 50) {
3011
3074
  break;
3012
3075
  }
3013
3076
  message.url = reader.string();
3014
3077
  continue;
3015
3078
  case 7:
3016
- if (tag != 58) {
3079
+ if (tag !== 58) {
3017
3080
  break;
3018
3081
  }
3019
3082
  message.image = reader.string();
3020
3083
  continue;
3021
3084
  case 8:
3022
- if (tag != 66) {
3085
+ if (tag !== 66) {
3023
3086
  break;
3024
3087
  }
3025
3088
  message.tags.push(reader.string());
3026
3089
  continue;
3027
3090
  case 9:
3028
- if (tag != 74) {
3091
+ if (tag !== 74) {
3029
3092
  break;
3030
3093
  }
3031
3094
  message.datePublished = reader.string();
3032
3095
  continue;
3033
3096
  case 10:
3034
- if (tag != 82) {
3097
+ if (tag !== 82) {
3035
3098
  break;
3036
3099
  }
3037
3100
  message.dateModified = reader.string();
3038
3101
  continue;
3039
3102
  case 11:
3040
- if (tag != 90) {
3103
+ if (tag !== 90) {
3041
3104
  break;
3042
3105
  }
3043
3106
  message.author = FeedPost_Author.decode(reader, reader.uint32());
3044
3107
  continue;
3045
3108
  }
3046
- if ((tag & 7) == 4 || tag == 0) {
3109
+ if ((tag & 7) === 4 || tag === 0) {
3047
3110
  break;
3048
3111
  }
3049
3112
  reader.skipType(tag & 7);
@@ -3067,21 +3130,39 @@ var FeedPost = {
3067
3130
  },
3068
3131
  toJSON(message) {
3069
3132
  const obj = {};
3070
- message.id !== void 0 && (obj.id = message.id);
3071
- message.title !== void 0 && (obj.title = message.title);
3072
- message.summary !== void 0 && (obj.summary = message.summary);
3073
- message.contentText !== void 0 && (obj.contentText = message.contentText);
3074
- message.contentHtml !== void 0 && (obj.contentHtml = message.contentHtml);
3075
- message.url !== void 0 && (obj.url = message.url);
3076
- message.image !== void 0 && (obj.image = message.image);
3077
- if (message.tags) {
3078
- obj.tags = message.tags.map((e) => e);
3079
- } else {
3080
- obj.tags = [];
3081
- }
3082
- message.datePublished !== void 0 && (obj.datePublished = message.datePublished);
3083
- message.dateModified !== void 0 && (obj.dateModified = message.dateModified);
3084
- message.author !== void 0 && (obj.author = message.author ? FeedPost_Author.toJSON(message.author) : void 0);
3133
+ if (message.id !== "") {
3134
+ obj.id = message.id;
3135
+ }
3136
+ if (message.title !== "") {
3137
+ obj.title = message.title;
3138
+ }
3139
+ if (message.summary !== "") {
3140
+ obj.summary = message.summary;
3141
+ }
3142
+ if (message.contentText !== "") {
3143
+ obj.contentText = message.contentText;
3144
+ }
3145
+ if (message.contentHtml !== "") {
3146
+ obj.contentHtml = message.contentHtml;
3147
+ }
3148
+ if (message.url !== "") {
3149
+ obj.url = message.url;
3150
+ }
3151
+ if (message.image !== "") {
3152
+ obj.image = message.image;
3153
+ }
3154
+ if (message.tags?.length) {
3155
+ obj.tags = message.tags;
3156
+ }
3157
+ if (message.datePublished !== "") {
3158
+ obj.datePublished = message.datePublished;
3159
+ }
3160
+ if (message.dateModified !== "") {
3161
+ obj.dateModified = message.dateModified;
3162
+ }
3163
+ if (message.author !== void 0) {
3164
+ obj.author = FeedPost_Author.toJSON(message.author);
3165
+ }
3085
3166
  return obj;
3086
3167
  },
3087
3168
  create(base) {
@@ -3124,19 +3205,19 @@ var FeedPost_Author = {
3124
3205
  const tag = reader.uint32();
3125
3206
  switch (tag >>> 3) {
3126
3207
  case 1:
3127
- if (tag != 10) {
3208
+ if (tag !== 10) {
3128
3209
  break;
3129
3210
  }
3130
3211
  message.name = reader.string();
3131
3212
  continue;
3132
3213
  case 2:
3133
- if (tag != 18) {
3214
+ if (tag !== 18) {
3134
3215
  break;
3135
3216
  }
3136
3217
  message.url = reader.string();
3137
3218
  continue;
3138
3219
  }
3139
- if ((tag & 7) == 4 || tag == 0) {
3220
+ if ((tag & 7) === 4 || tag === 0) {
3140
3221
  break;
3141
3222
  }
3142
3223
  reader.skipType(tag & 7);
@@ -3148,8 +3229,12 @@ var FeedPost_Author = {
3148
3229
  },
3149
3230
  toJSON(message) {
3150
3231
  const obj = {};
3151
- message.name !== void 0 && (obj.name = message.name);
3152
- message.url !== void 0 && (obj.url = message.url);
3232
+ if (message.name !== "") {
3233
+ obj.name = message.name;
3234
+ }
3235
+ if (message.url !== "") {
3236
+ obj.url = message.url;
3237
+ }
3153
3238
  return obj;
3154
3239
  },
3155
3240
  create(base) {
@@ -3189,13 +3274,13 @@ var ProcessMetadataStore = {
3189
3274
  const tag = reader.uint32();
3190
3275
  switch (tag >>> 3) {
3191
3276
  case 1:
3192
- if (tag != 10) {
3277
+ if (tag !== 10) {
3193
3278
  break;
3194
3279
  }
3195
3280
  message.items.push(ProcessMetadata.decode(reader, reader.uint32()));
3196
3281
  continue;
3197
3282
  }
3198
- if ((tag & 7) == 4 || tag == 0) {
3283
+ if ((tag & 7) === 4 || tag === 0) {
3199
3284
  break;
3200
3285
  }
3201
3286
  reader.skipType(tag & 7);
@@ -3207,10 +3292,8 @@ var ProcessMetadataStore = {
3207
3292
  },
3208
3293
  toJSON(message) {
3209
3294
  const obj = {};
3210
- if (message.items) {
3211
- obj.items = message.items.map((e) => e ? ProcessMetadata.toJSON(e) : void 0);
3212
- } else {
3213
- obj.items = [];
3295
+ if (message.items?.length) {
3296
+ obj.items = message.items.map((e) => ProcessMetadata.toJSON(e));
3214
3297
  }
3215
3298
  return obj;
3216
3299
  },
@@ -3259,13 +3342,13 @@ var ProcessMetadata = {
3259
3342
  const tag = reader.uint32();
3260
3343
  switch (tag >>> 3) {
3261
3344
  case 1:
3262
- if (tag != 10) {
3345
+ if (tag !== 10) {
3263
3346
  break;
3264
3347
  }
3265
3348
  message.version = reader.string();
3266
3349
  continue;
3267
3350
  case 2:
3268
- if (tag != 18) {
3351
+ if (tag !== 18) {
3269
3352
  break;
3270
3353
  }
3271
3354
  const entry2 = ProcessMetadata_TitleEntry.decode(reader, reader.uint32());
@@ -3274,7 +3357,7 @@ var ProcessMetadata = {
3274
3357
  }
3275
3358
  continue;
3276
3359
  case 3:
3277
- if (tag != 26) {
3360
+ if (tag !== 26) {
3278
3361
  break;
3279
3362
  }
3280
3363
  const entry3 = ProcessMetadata_DescriptionEntry.decode(reader, reader.uint32());
@@ -3283,7 +3366,7 @@ var ProcessMetadata = {
3283
3366
  }
3284
3367
  continue;
3285
3368
  case 4:
3286
- if (tag != 34) {
3369
+ if (tag !== 34) {
3287
3370
  break;
3288
3371
  }
3289
3372
  const entry4 = ProcessMetadata_MediaEntry.decode(reader, reader.uint32());
@@ -3292,19 +3375,19 @@ var ProcessMetadata = {
3292
3375
  }
3293
3376
  continue;
3294
3377
  case 5:
3295
- if (tag != 42) {
3378
+ if (tag !== 42) {
3296
3379
  break;
3297
3380
  }
3298
3381
  message.questions.push(ProcessMetadata_Question.decode(reader, reader.uint32()));
3299
3382
  continue;
3300
3383
  case 6:
3301
- if (tag != 50) {
3384
+ if (tag !== 50) {
3302
3385
  break;
3303
3386
  }
3304
3387
  message.results = ProcessMetadata_Results.decode(reader, reader.uint32());
3305
3388
  continue;
3306
3389
  case 100:
3307
- if (tag != 802) {
3390
+ if (tag !== 802) {
3308
3391
  break;
3309
3392
  }
3310
3393
  const entry100 = ProcessMetadata_MetaEntry.decode(reader, reader.uint32());
@@ -3313,7 +3396,7 @@ var ProcessMetadata = {
3313
3396
  }
3314
3397
  continue;
3315
3398
  }
3316
- if ((tag & 7) == 4 || tag == 0) {
3399
+ if ((tag & 7) === 4 || tag === 0) {
3317
3400
  break;
3318
3401
  }
3319
3402
  reader.skipType(tag & 7);
@@ -3345,36 +3428,50 @@ var ProcessMetadata = {
3345
3428
  },
3346
3429
  toJSON(message) {
3347
3430
  const obj = {};
3348
- message.version !== void 0 && (obj.version = message.version);
3349
- obj.title = {};
3431
+ if (message.version !== "") {
3432
+ obj.version = message.version;
3433
+ }
3350
3434
  if (message.title) {
3351
- Object.entries(message.title).forEach(([k, v]) => {
3352
- obj.title[k] = v;
3353
- });
3435
+ const entries = Object.entries(message.title);
3436
+ if (entries.length > 0) {
3437
+ obj.title = {};
3438
+ entries.forEach(([k, v]) => {
3439
+ obj.title[k] = v;
3440
+ });
3441
+ }
3354
3442
  }
3355
- obj.description = {};
3356
3443
  if (message.description) {
3357
- Object.entries(message.description).forEach(([k, v]) => {
3358
- obj.description[k] = v;
3359
- });
3444
+ const entries = Object.entries(message.description);
3445
+ if (entries.length > 0) {
3446
+ obj.description = {};
3447
+ entries.forEach(([k, v]) => {
3448
+ obj.description[k] = v;
3449
+ });
3450
+ }
3360
3451
  }
3361
- obj.media = {};
3362
3452
  if (message.media) {
3363
- Object.entries(message.media).forEach(([k, v]) => {
3364
- obj.media[k] = v;
3365
- });
3453
+ const entries = Object.entries(message.media);
3454
+ if (entries.length > 0) {
3455
+ obj.media = {};
3456
+ entries.forEach(([k, v]) => {
3457
+ obj.media[k] = v;
3458
+ });
3459
+ }
3366
3460
  }
3367
- if (message.questions) {
3368
- obj.questions = message.questions.map((e) => e ? ProcessMetadata_Question.toJSON(e) : void 0);
3369
- } else {
3370
- obj.questions = [];
3461
+ if (message.questions?.length) {
3462
+ obj.questions = message.questions.map((e) => ProcessMetadata_Question.toJSON(e));
3463
+ }
3464
+ if (message.results !== void 0) {
3465
+ obj.results = ProcessMetadata_Results.toJSON(message.results);
3371
3466
  }
3372
- message.results !== void 0 && (obj.results = message.results ? ProcessMetadata_Results.toJSON(message.results) : void 0);
3373
- obj.meta = {};
3374
3467
  if (message.meta) {
3375
- Object.entries(message.meta).forEach(([k, v]) => {
3376
- obj.meta[k] = v;
3377
- });
3468
+ const entries = Object.entries(message.meta);
3469
+ if (entries.length > 0) {
3470
+ obj.meta = {};
3471
+ entries.forEach(([k, v]) => {
3472
+ obj.meta[k] = v;
3473
+ });
3474
+ }
3378
3475
  }
3379
3476
  return obj;
3380
3477
  },
@@ -3437,19 +3534,19 @@ var ProcessMetadata_TitleEntry = {
3437
3534
  const tag = reader.uint32();
3438
3535
  switch (tag >>> 3) {
3439
3536
  case 1:
3440
- if (tag != 10) {
3537
+ if (tag !== 10) {
3441
3538
  break;
3442
3539
  }
3443
3540
  message.key = reader.string();
3444
3541
  continue;
3445
3542
  case 2:
3446
- if (tag != 18) {
3543
+ if (tag !== 18) {
3447
3544
  break;
3448
3545
  }
3449
3546
  message.value = reader.string();
3450
3547
  continue;
3451
3548
  }
3452
- if ((tag & 7) == 4 || tag == 0) {
3549
+ if ((tag & 7) === 4 || tag === 0) {
3453
3550
  break;
3454
3551
  }
3455
3552
  reader.skipType(tag & 7);
@@ -3461,8 +3558,12 @@ var ProcessMetadata_TitleEntry = {
3461
3558
  },
3462
3559
  toJSON(message) {
3463
3560
  const obj = {};
3464
- message.key !== void 0 && (obj.key = message.key);
3465
- message.value !== void 0 && (obj.value = message.value);
3561
+ if (message.key !== "") {
3562
+ obj.key = message.key;
3563
+ }
3564
+ if (message.value !== "") {
3565
+ obj.value = message.value;
3566
+ }
3466
3567
  return obj;
3467
3568
  },
3468
3569
  create(base) {
@@ -3496,19 +3597,19 @@ var ProcessMetadata_DescriptionEntry = {
3496
3597
  const tag = reader.uint32();
3497
3598
  switch (tag >>> 3) {
3498
3599
  case 1:
3499
- if (tag != 10) {
3600
+ if (tag !== 10) {
3500
3601
  break;
3501
3602
  }
3502
3603
  message.key = reader.string();
3503
3604
  continue;
3504
3605
  case 2:
3505
- if (tag != 18) {
3606
+ if (tag !== 18) {
3506
3607
  break;
3507
3608
  }
3508
3609
  message.value = reader.string();
3509
3610
  continue;
3510
3611
  }
3511
- if ((tag & 7) == 4 || tag == 0) {
3612
+ if ((tag & 7) === 4 || tag === 0) {
3512
3613
  break;
3513
3614
  }
3514
3615
  reader.skipType(tag & 7);
@@ -3520,8 +3621,12 @@ var ProcessMetadata_DescriptionEntry = {
3520
3621
  },
3521
3622
  toJSON(message) {
3522
3623
  const obj = {};
3523
- message.key !== void 0 && (obj.key = message.key);
3524
- message.value !== void 0 && (obj.value = message.value);
3624
+ if (message.key !== "") {
3625
+ obj.key = message.key;
3626
+ }
3627
+ if (message.value !== "") {
3628
+ obj.value = message.value;
3629
+ }
3525
3630
  return obj;
3526
3631
  },
3527
3632
  create(base) {
@@ -3555,19 +3660,19 @@ var ProcessMetadata_MediaEntry = {
3555
3660
  const tag = reader.uint32();
3556
3661
  switch (tag >>> 3) {
3557
3662
  case 1:
3558
- if (tag != 10) {
3663
+ if (tag !== 10) {
3559
3664
  break;
3560
3665
  }
3561
3666
  message.key = reader.string();
3562
3667
  continue;
3563
3668
  case 2:
3564
- if (tag != 18) {
3669
+ if (tag !== 18) {
3565
3670
  break;
3566
3671
  }
3567
3672
  message.value = reader.string();
3568
3673
  continue;
3569
3674
  }
3570
- if ((tag & 7) == 4 || tag == 0) {
3675
+ if ((tag & 7) === 4 || tag === 0) {
3571
3676
  break;
3572
3677
  }
3573
3678
  reader.skipType(tag & 7);
@@ -3579,8 +3684,12 @@ var ProcessMetadata_MediaEntry = {
3579
3684
  },
3580
3685
  toJSON(message) {
3581
3686
  const obj = {};
3582
- message.key !== void 0 && (obj.key = message.key);
3583
- message.value !== void 0 && (obj.value = message.value);
3687
+ if (message.key !== "") {
3688
+ obj.key = message.key;
3689
+ }
3690
+ if (message.value !== "") {
3691
+ obj.value = message.value;
3692
+ }
3584
3693
  return obj;
3585
3694
  },
3586
3695
  create(base) {
@@ -3617,7 +3726,7 @@ var ProcessMetadata_Question = {
3617
3726
  const tag = reader.uint32();
3618
3727
  switch (tag >>> 3) {
3619
3728
  case 1:
3620
- if (tag != 10) {
3729
+ if (tag !== 10) {
3621
3730
  break;
3622
3731
  }
3623
3732
  const entry1 = ProcessMetadata_Question_TitleEntry.decode(reader, reader.uint32());
@@ -3626,7 +3735,7 @@ var ProcessMetadata_Question = {
3626
3735
  }
3627
3736
  continue;
3628
3737
  case 2:
3629
- if (tag != 18) {
3738
+ if (tag !== 18) {
3630
3739
  break;
3631
3740
  }
3632
3741
  const entry2 = ProcessMetadata_Question_DescriptionEntry.decode(reader, reader.uint32());
@@ -3635,13 +3744,13 @@ var ProcessMetadata_Question = {
3635
3744
  }
3636
3745
  continue;
3637
3746
  case 3:
3638
- if (tag != 26) {
3747
+ if (tag !== 26) {
3639
3748
  break;
3640
3749
  }
3641
3750
  message.choices.push(ProcessMetadata_Question_VoteOption.decode(reader, reader.uint32()));
3642
3751
  continue;
3643
3752
  }
3644
- if ((tag & 7) == 4 || tag == 0) {
3753
+ if ((tag & 7) === 4 || tag === 0) {
3645
3754
  break;
3646
3755
  }
3647
3756
  reader.skipType(tag & 7);
@@ -3663,22 +3772,26 @@ var ProcessMetadata_Question = {
3663
3772
  },
3664
3773
  toJSON(message) {
3665
3774
  const obj = {};
3666
- obj.title = {};
3667
3775
  if (message.title) {
3668
- Object.entries(message.title).forEach(([k, v]) => {
3669
- obj.title[k] = v;
3670
- });
3776
+ const entries = Object.entries(message.title);
3777
+ if (entries.length > 0) {
3778
+ obj.title = {};
3779
+ entries.forEach(([k, v]) => {
3780
+ obj.title[k] = v;
3781
+ });
3782
+ }
3671
3783
  }
3672
- obj.description = {};
3673
3784
  if (message.description) {
3674
- Object.entries(message.description).forEach(([k, v]) => {
3675
- obj.description[k] = v;
3676
- });
3785
+ const entries = Object.entries(message.description);
3786
+ if (entries.length > 0) {
3787
+ obj.description = {};
3788
+ entries.forEach(([k, v]) => {
3789
+ obj.description[k] = v;
3790
+ });
3791
+ }
3677
3792
  }
3678
- if (message.choices) {
3679
- obj.choices = message.choices.map((e) => e ? ProcessMetadata_Question_VoteOption.toJSON(e) : void 0);
3680
- } else {
3681
- obj.choices = [];
3793
+ if (message.choices?.length) {
3794
+ obj.choices = message.choices.map((e) => ProcessMetadata_Question_VoteOption.toJSON(e));
3682
3795
  }
3683
3796
  return obj;
3684
3797
  },
@@ -3727,19 +3840,19 @@ var ProcessMetadata_Question_TitleEntry = {
3727
3840
  const tag = reader.uint32();
3728
3841
  switch (tag >>> 3) {
3729
3842
  case 1:
3730
- if (tag != 10) {
3843
+ if (tag !== 10) {
3731
3844
  break;
3732
3845
  }
3733
3846
  message.key = reader.string();
3734
3847
  continue;
3735
3848
  case 2:
3736
- if (tag != 18) {
3849
+ if (tag !== 18) {
3737
3850
  break;
3738
3851
  }
3739
3852
  message.value = reader.string();
3740
3853
  continue;
3741
3854
  }
3742
- if ((tag & 7) == 4 || tag == 0) {
3855
+ if ((tag & 7) === 4 || tag === 0) {
3743
3856
  break;
3744
3857
  }
3745
3858
  reader.skipType(tag & 7);
@@ -3751,8 +3864,12 @@ var ProcessMetadata_Question_TitleEntry = {
3751
3864
  },
3752
3865
  toJSON(message) {
3753
3866
  const obj = {};
3754
- message.key !== void 0 && (obj.key = message.key);
3755
- message.value !== void 0 && (obj.value = message.value);
3867
+ if (message.key !== "") {
3868
+ obj.key = message.key;
3869
+ }
3870
+ if (message.value !== "") {
3871
+ obj.value = message.value;
3872
+ }
3756
3873
  return obj;
3757
3874
  },
3758
3875
  create(base) {
@@ -3786,19 +3903,19 @@ var ProcessMetadata_Question_DescriptionEntry = {
3786
3903
  const tag = reader.uint32();
3787
3904
  switch (tag >>> 3) {
3788
3905
  case 1:
3789
- if (tag != 10) {
3906
+ if (tag !== 10) {
3790
3907
  break;
3791
3908
  }
3792
3909
  message.key = reader.string();
3793
3910
  continue;
3794
3911
  case 2:
3795
- if (tag != 18) {
3912
+ if (tag !== 18) {
3796
3913
  break;
3797
3914
  }
3798
3915
  message.value = reader.string();
3799
3916
  continue;
3800
3917
  }
3801
- if ((tag & 7) == 4 || tag == 0) {
3918
+ if ((tag & 7) === 4 || tag === 0) {
3802
3919
  break;
3803
3920
  }
3804
3921
  reader.skipType(tag & 7);
@@ -3810,8 +3927,12 @@ var ProcessMetadata_Question_DescriptionEntry = {
3810
3927
  },
3811
3928
  toJSON(message) {
3812
3929
  const obj = {};
3813
- message.key !== void 0 && (obj.key = message.key);
3814
- message.value !== void 0 && (obj.value = message.value);
3930
+ if (message.key !== "") {
3931
+ obj.key = message.key;
3932
+ }
3933
+ if (message.value !== "") {
3934
+ obj.value = message.value;
3935
+ }
3815
3936
  return obj;
3816
3937
  },
3817
3938
  create(base) {
@@ -3845,7 +3966,7 @@ var ProcessMetadata_Question_VoteOption = {
3845
3966
  const tag = reader.uint32();
3846
3967
  switch (tag >>> 3) {
3847
3968
  case 1:
3848
- if (tag != 10) {
3969
+ if (tag !== 10) {
3849
3970
  break;
3850
3971
  }
3851
3972
  const entry1 = ProcessMetadata_Question_VoteOption_TitleEntry.decode(reader, reader.uint32());
@@ -3854,13 +3975,13 @@ var ProcessMetadata_Question_VoteOption = {
3854
3975
  }
3855
3976
  continue;
3856
3977
  case 2:
3857
- if (tag != 16) {
3978
+ if (tag !== 16) {
3858
3979
  break;
3859
3980
  }
3860
3981
  message.value = reader.int32();
3861
3982
  continue;
3862
3983
  }
3863
- if ((tag & 7) == 4 || tag == 0) {
3984
+ if ((tag & 7) === 4 || tag === 0) {
3864
3985
  break;
3865
3986
  }
3866
3987
  reader.skipType(tag & 7);
@@ -3878,13 +3999,18 @@ var ProcessMetadata_Question_VoteOption = {
3878
3999
  },
3879
4000
  toJSON(message) {
3880
4001
  const obj = {};
3881
- obj.title = {};
3882
4002
  if (message.title) {
3883
- Object.entries(message.title).forEach(([k, v]) => {
3884
- obj.title[k] = v;
3885
- });
4003
+ const entries = Object.entries(message.title);
4004
+ if (entries.length > 0) {
4005
+ obj.title = {};
4006
+ entries.forEach(([k, v]) => {
4007
+ obj.title[k] = v;
4008
+ });
4009
+ }
4010
+ }
4011
+ if (message.value !== 0) {
4012
+ obj.value = Math.round(message.value);
3886
4013
  }
3887
- message.value !== void 0 && (obj.value = Math.round(message.value));
3888
4014
  return obj;
3889
4015
  },
3890
4016
  create(base) {
@@ -3923,19 +4049,19 @@ var ProcessMetadata_Question_VoteOption_TitleEntry = {
3923
4049
  const tag = reader.uint32();
3924
4050
  switch (tag >>> 3) {
3925
4051
  case 1:
3926
- if (tag != 10) {
4052
+ if (tag !== 10) {
3927
4053
  break;
3928
4054
  }
3929
4055
  message.key = reader.string();
3930
4056
  continue;
3931
4057
  case 2:
3932
- if (tag != 18) {
4058
+ if (tag !== 18) {
3933
4059
  break;
3934
4060
  }
3935
4061
  message.value = reader.string();
3936
4062
  continue;
3937
4063
  }
3938
- if ((tag & 7) == 4 || tag == 0) {
4064
+ if ((tag & 7) === 4 || tag === 0) {
3939
4065
  break;
3940
4066
  }
3941
4067
  reader.skipType(tag & 7);
@@ -3947,8 +4073,12 @@ var ProcessMetadata_Question_VoteOption_TitleEntry = {
3947
4073
  },
3948
4074
  toJSON(message) {
3949
4075
  const obj = {};
3950
- message.key !== void 0 && (obj.key = message.key);
3951
- message.value !== void 0 && (obj.value = message.value);
4076
+ if (message.key !== "") {
4077
+ obj.key = message.key;
4078
+ }
4079
+ if (message.value !== "") {
4080
+ obj.value = message.value;
4081
+ }
3952
4082
  return obj;
3953
4083
  },
3954
4084
  create(base) {
@@ -3982,19 +4112,19 @@ var ProcessMetadata_Results = {
3982
4112
  const tag = reader.uint32();
3983
4113
  switch (tag >>> 3) {
3984
4114
  case 1:
3985
- if (tag != 10) {
4115
+ if (tag !== 10) {
3986
4116
  break;
3987
4117
  }
3988
4118
  message.aggregation = reader.string();
3989
4119
  continue;
3990
4120
  case 2:
3991
- if (tag != 18) {
4121
+ if (tag !== 18) {
3992
4122
  break;
3993
4123
  }
3994
4124
  message.display = reader.string();
3995
4125
  continue;
3996
4126
  }
3997
- if ((tag & 7) == 4 || tag == 0) {
4127
+ if ((tag & 7) === 4 || tag === 0) {
3998
4128
  break;
3999
4129
  }
4000
4130
  reader.skipType(tag & 7);
@@ -4009,8 +4139,12 @@ var ProcessMetadata_Results = {
4009
4139
  },
4010
4140
  toJSON(message) {
4011
4141
  const obj = {};
4012
- message.aggregation !== void 0 && (obj.aggregation = message.aggregation);
4013
- message.display !== void 0 && (obj.display = message.display);
4142
+ if (message.aggregation !== "") {
4143
+ obj.aggregation = message.aggregation;
4144
+ }
4145
+ if (message.display !== "") {
4146
+ obj.display = message.display;
4147
+ }
4014
4148
  return obj;
4015
4149
  },
4016
4150
  create(base) {
@@ -4044,19 +4178,19 @@ var ProcessMetadata_MetaEntry = {
4044
4178
  const tag = reader.uint32();
4045
4179
  switch (tag >>> 3) {
4046
4180
  case 1:
4047
- if (tag != 10) {
4181
+ if (tag !== 10) {
4048
4182
  break;
4049
4183
  }
4050
4184
  message.key = reader.string();
4051
4185
  continue;
4052
4186
  case 2:
4053
- if (tag != 18) {
4187
+ if (tag !== 18) {
4054
4188
  break;
4055
4189
  }
4056
4190
  message.value = reader.string();
4057
4191
  continue;
4058
4192
  }
4059
- if ((tag & 7) == 4 || tag == 0) {
4193
+ if ((tag & 7) === 4 || tag === 0) {
4060
4194
  break;
4061
4195
  }
4062
4196
  reader.skipType(tag & 7);
@@ -4068,8 +4202,12 @@ var ProcessMetadata_MetaEntry = {
4068
4202
  },
4069
4203
  toJSON(message) {
4070
4204
  const obj = {};
4071
- message.key !== void 0 && (obj.key = message.key);
4072
- message.value !== void 0 && (obj.value = message.value);
4205
+ if (message.key !== "") {
4206
+ obj.key = message.key;
4207
+ }
4208
+ if (message.value !== "") {
4209
+ obj.value = message.value;
4210
+ }
4073
4211
  return obj;
4074
4212
  },
4075
4213
  create(base) {