@venite/components 0.16.7 → 0.16.13

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.
Files changed (729) hide show
  1. package/dist/cjs/_commonjsHelpers-bcc1208a.js +25 -0
  2. package/dist/cjs/animation-34a434a2.js +957 -0
  3. package/dist/cjs/app-globals-60a4f972.js +7 -0
  4. package/dist/cjs/book-1a92678a.js +287 -0
  5. package/dist/cjs/change-cdb1e8c0.js +16 -0
  6. package/dist/cjs/cubic-bezier-f3b34d27.js +91 -0
  7. package/dist/cjs/cursor-81bfd01e.js +12 -0
  8. package/dist/cjs/focus-visible-5621d6b1.js +45 -0
  9. package/dist/cjs/framework-delegate-84d33ff0.js +37 -0
  10. package/dist/cjs/gesture-controller-5bd9d825.js +193 -0
  11. package/dist/cjs/haptic-88c261ab.js +49 -0
  12. package/dist/cjs/hardware-back-button-8c2f48d2.js +59 -0
  13. package/dist/cjs/heading-5afc2b24.js +21 -0
  14. package/dist/cjs/helpers-41dfb43a.js +110 -0
  15. package/dist/cjs/image-3bee3e73.js +21 -0
  16. package/dist/cjs/index-1a73a70c.js +211 -0
  17. package/dist/cjs/index-4b7e4228.js +135 -0
  18. package/dist/cjs/index-7aa21373.js +92 -0
  19. package/dist/cjs/index-8197bb45.js +441 -0
  20. package/dist/{ldf/index-ea7a35b9.js → cjs/index-8fe0df8d.js} +213 -1242
  21. package/dist/cjs/index-c5bdf2bc.js +167 -0
  22. package/dist/cjs/index-de13bd01.js +463 -0
  23. package/dist/cjs/index-e4c51e4d.js +307 -0
  24. package/dist/cjs/index.cjs.js +8 -0
  25. package/dist/cjs/input-shims-9c2d56bd.js +357 -0
  26. package/dist/cjs/ion-action-sheet.cjs.entry.js +230 -0
  27. package/dist/cjs/ion-alert.cjs.entry.js +386 -0
  28. package/dist/cjs/ion-app.cjs.entry.js +60 -0
  29. package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
  30. package/dist/cjs/ion-back-button.cjs.entry.js +79 -0
  31. package/dist/cjs/ion-backdrop.cjs.entry.js +67 -0
  32. package/dist/cjs/ion-badge.cjs.entry.js +27 -0
  33. package/dist/cjs/ion-button_13.cjs.entry.js +1786 -0
  34. package/dist/cjs/ion-card-content_6.cjs.entry.js +405 -0
  35. package/dist/cjs/ion-card-subtitle.cjs.entry.js +27 -0
  36. package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
  37. package/dist/cjs/ion-checkbox_3.cjs.entry.js +234 -0
  38. package/dist/cjs/ion-chip.cjs.entry.js +31 -0
  39. package/dist/cjs/ion-datetime_2.cjs.entry.js +1125 -0
  40. package/dist/cjs/ion-fab-button.cjs.entry.js +74 -0
  41. package/dist/cjs/ion-fab-list.cjs.entry.js +45 -0
  42. package/dist/cjs/ion-fab.cjs.entry.js +74 -0
  43. package/dist/cjs/ion-footer.cjs.entry.js +43 -0
  44. package/dist/cjs/ion-img.cjs.entry.js +72 -0
  45. package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +37 -0
  46. package/dist/cjs/ion-infinite-scroll.cjs.entry.js +206 -0
  47. package/dist/cjs/ion-input_2.cjs.entry.js +2645 -0
  48. package/dist/cjs/ion-item-divider.cjs.entry.js +36 -0
  49. package/dist/cjs/ion-item-group.cjs.entry.js +31 -0
  50. package/dist/cjs/ion-item-option.cjs.entry.js +55 -0
  51. package/dist/cjs/ion-item-options.cjs.entry.js +47 -0
  52. package/dist/cjs/ion-item-sliding.cjs.entry.js +359 -0
  53. package/dist/cjs/ion-list-header.cjs.entry.js +28 -0
  54. package/dist/cjs/ion-loading.cjs.entry.js +213 -0
  55. package/dist/cjs/ion-menu-button.cjs.entry.js +61 -0
  56. package/dist/cjs/ion-menu-toggle.cjs.entry.js +47 -0
  57. package/dist/cjs/ion-menu.cjs.entry.js +456 -0
  58. package/dist/cjs/ion-modal.cjs.entry.js +488 -0
  59. package/dist/cjs/ion-nav-link.cjs.entry.js +44 -0
  60. package/dist/cjs/ion-nav.cjs.entry.js +812 -0
  61. package/dist/cjs/ion-note.cjs.entry.js +27 -0
  62. package/dist/cjs/ion-picker-column.cjs.entry.js +327 -0
  63. package/dist/cjs/ion-picker.cjs.entry.js +214 -0
  64. package/dist/cjs/ion-popover.cjs.entry.js +363 -0
  65. package/dist/cjs/ion-progress-bar.cjs.entry.js +67 -0
  66. package/dist/cjs/ion-radio_2.cjs.entry.js +149 -0
  67. package/dist/cjs/ion-range.cjs.entry.js +395 -0
  68. package/dist/cjs/ion-refresher-content.cjs.entry.js +40 -0
  69. package/dist/cjs/ion-refresher.cjs.entry.js +832 -0
  70. package/dist/cjs/ion-reorder-group.cjs.entry.js +281 -0
  71. package/dist/cjs/ion-reorder.cjs.entry.js +31 -0
  72. package/dist/cjs/ion-route-redirect.cjs.entry.js +24 -0
  73. package/dist/cjs/ion-route.cjs.entry.js +49 -0
  74. package/dist/cjs/ion-router-link.cjs.entry.js +35 -0
  75. package/dist/cjs/ion-router-outlet.cjs.entry.js +160 -0
  76. package/dist/cjs/ion-router.cjs.entry.js +631 -0
  77. package/dist/cjs/ion-segment_16.cjs.entry.js +2507 -0
  78. package/dist/cjs/ion-select-popover.cjs.entry.js +33 -0
  79. package/dist/cjs/ion-select_2.cjs.entry.js +444 -0
  80. package/dist/cjs/ion-slide.cjs.entry.js +25 -0
  81. package/dist/cjs/ion-slides.cjs.entry.js +404 -0
  82. package/dist/cjs/ion-spinner.cjs.entry.js +60 -0
  83. package/dist/cjs/ion-split-pane.cjs.entry.js +150 -0
  84. package/dist/cjs/ion-tab-bar.cjs.entry.js +58 -0
  85. package/dist/cjs/ion-tab-button.cjs.entry.js +99 -0
  86. package/dist/cjs/ion-tab.cjs.entry.js +58 -0
  87. package/dist/cjs/ion-tabs.cjs.entry.js +155 -0
  88. package/dist/cjs/ion-text.cjs.entry.js +22 -0
  89. package/dist/cjs/ion-textarea.cjs.entry.js +217 -0
  90. package/dist/cjs/ion-thumbnail.cjs.entry.js +20 -0
  91. package/dist/cjs/ion-toast.cjs.entry.js +280 -0
  92. package/dist/cjs/ion-virtual-scroll.cjs.entry.js +544 -0
  93. package/dist/cjs/ionic-global-581fb4f8.js +204 -0
  94. package/dist/cjs/ios.transition-7244ac4e.js +459 -0
  95. package/dist/cjs/ldf-day-name_5.cjs.entry.js +5682 -0
  96. package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +573 -0
  97. package/dist/cjs/ldf-editable-condition-piece.cjs.entry.js +220 -0
  98. package/dist/cjs/ldf-editable-condition.cjs.entry.js +106 -0
  99. package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +152 -0
  100. package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +496 -0
  101. package/dist/cjs/ldf-editable-metadata.cjs.entry.js +186 -0
  102. package/dist/cjs/ldf-editable-preference-option.cjs.entry.js +72 -0
  103. package/dist/cjs/ldf-editable-preference.cjs.entry.js +89 -0
  104. package/dist/cjs/ldf-editable-preferences.cjs.entry.js +200 -0
  105. package/dist/cjs/ldf-editable-string-list.cjs.entry.js +134 -0
  106. package/dist/cjs/ldf-editor-cursors.cjs.entry.js +276 -0
  107. package/dist/cjs/ldf-editor.cjs.entry.js +238 -0
  108. package/dist/cjs/ldf.cjs.js +22 -0
  109. package/dist/cjs/loader.cjs.js +24 -0
  110. package/dist/cjs/locale-d4e925b1.js +8 -0
  111. package/dist/cjs/md.transition-d86b1ef0.js +62 -0
  112. package/dist/cjs/menu-toggle-util-293e388b.js +11 -0
  113. package/dist/cjs/option-24f3d13a.js +167 -0
  114. package/dist/cjs/overlays-eb464d6d.js +228 -0
  115. package/dist/cjs/preference-a4bd51c4.js +23 -0
  116. package/dist/cjs/refrain-91fb446b.js +21 -0
  117. package/dist/cjs/rubric-5b467a6a.js +1220 -0
  118. package/dist/cjs/specific-class-a1112e78.js +38 -0
  119. package/dist/cjs/spinner-configs-b0bec093.js +112 -0
  120. package/dist/cjs/status-tap-7afb25f5.js +25 -0
  121. package/dist/cjs/swipe-back-f887168e.js +52 -0
  122. package/dist/cjs/swiper.bundle-cb0f61f7.js +6246 -0
  123. package/dist/cjs/tap-click-e0af5237.js +169 -0
  124. package/dist/cjs/text-5edb80f3.js +18 -0
  125. package/dist/cjs/theme-81caa5b0.js +47 -0
  126. package/dist/collection/collection-manifest.json +146 -0
  127. package/dist/collection/components/bible-reading/bible-reading.css +84 -0
  128. package/dist/collection/components/bible-reading/bible-reading.i18n.en.json +13 -0
  129. package/dist/collection/components/bible-reading/bible-reading.i18n.es.json +4 -0
  130. package/dist/collection/components/bible-reading/bible-reading.js +328 -0
  131. package/dist/collection/components/bible-reading/dist/bible-reading.js +354 -0
  132. package/dist/collection/components/bible-reading/fetch-reading.js +17 -0
  133. package/dist/collection/components/day-name/day-name.css +18 -0
  134. package/dist/collection/components/day-name/day-name.i18n.en.json +4 -0
  135. package/dist/{ldf/ldf-day-name.entry.js → collection/components/day-name/day-name.js} +54 -27
  136. package/dist/collection/components/editable-add-block/editable-add-block.css +93 -0
  137. package/dist/collection/components/editable-add-block/editable-add-block.i18n.en.json +5 -0
  138. package/dist/collection/components/editable-add-block/editable-add-block.js +135 -0
  139. package/dist/collection/components/editable-add-block-menu/dist/menu-options.js +230 -0
  140. package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.css +33 -0
  141. package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.i18n.en.json +48 -0
  142. package/dist/collection/components/editable-add-block-menu/editable-add-block-menu.js +101 -0
  143. package/dist/collection/components/editable-add-block-menu/menu-options.js +423 -0
  144. package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.i18n.en.json +11 -0
  145. package/dist/collection/components/editable-antiphon-field/editable-antiphon-field.js +332 -0
  146. package/dist/collection/components/editable-antiphon-field/ldf-editable-antiphon-field.css +7 -0
  147. package/dist/collection/components/editable-boolean/editable-boolean.js +117 -0
  148. package/dist/collection/components/editable-condition/editable-condition.i18n.en.json +7 -0
  149. package/dist/collection/components/editable-condition/editable-condition.js +192 -0
  150. package/dist/collection/components/editable-condition-piece/dist/editable-condition-piece.js +257 -0
  151. package/dist/collection/components/editable-condition-piece/editable-condition-piece.css +34 -0
  152. package/dist/collection/components/editable-condition-piece/editable-condition-piece.i18n.en.json +21 -0
  153. package/dist/collection/components/editable-condition-piece/editable-condition-piece.js +233 -0
  154. package/dist/collection/components/editable-condition-piece/except-only-strings.js +12 -0
  155. package/dist/collection/components/editable-condition-piece/except-only.js +20 -0
  156. package/dist/collection/components/editable-delete/editable-delete.i18n.en.json +6 -0
  157. package/dist/collection/components/editable-delete/editable-delete.js +175 -0
  158. package/dist/collection/components/editable-filter-documents/dist/editable-filter-documents.js +242 -0
  159. package/dist/collection/components/editable-filter-documents/editable-filter-documents.css +11 -0
  160. package/dist/collection/components/editable-filter-documents/editable-filter-documents.i18n.en.json +9 -0
  161. package/dist/collection/components/editable-filter-documents/editable-filter-documents.js +294 -0
  162. package/dist/collection/components/editable-lookup/editable-lookup.js +210 -0
  163. package/dist/collection/components/editable-metadata/editable-metadata.css +44 -0
  164. package/dist/collection/components/editable-metadata/editable-metadata.i18n.en.json +51 -0
  165. package/dist/collection/components/editable-metadata/editable-metadata.js +261 -0
  166. package/dist/collection/components/editable-metadata-buttons/dist/editable-metadata-buttons.js +444 -0
  167. package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.css +37 -0
  168. package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.i18n.en.json +31 -0
  169. package/dist/collection/components/editable-metadata-buttons/editable-metadata-buttons.js +433 -0
  170. package/dist/collection/components/editable-metadata-metadata-fields/dist/editable-metadata-metadata-fields.js +399 -0
  171. package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.i18n.en.json +48 -0
  172. package/dist/collection/components/editable-metadata-metadata-fields/editable-metadata-metadata-fields.js +438 -0
  173. package/dist/collection/components/editable-preference/editable-preference.i18n.en.json +8 -0
  174. package/dist/collection/components/editable-preference/editable-preference.js +166 -0
  175. package/dist/collection/components/editable-preference-option/editable-preference-option.i18n.en.json +9 -0
  176. package/dist/collection/components/editable-preference-option/editable-preference-option.js +128 -0
  177. package/dist/collection/components/editable-preferences/dist/editable-preferences.js +281 -0
  178. package/dist/collection/components/editable-preferences/editable-preferences.css +3 -0
  179. package/dist/collection/components/editable-preferences/editable-preferences.i18n.en.json +10 -0
  180. package/dist/collection/components/editable-preferences/editable-preferences.js +230 -0
  181. package/dist/collection/components/editable-preferences/preference-tree.js +24 -0
  182. package/dist/collection/components/editable-select/dist/editable-select.js +69 -0
  183. package/dist/collection/components/editable-select/editable-select.css +0 -0
  184. package/dist/collection/components/editable-select/editable-select.js +157 -0
  185. package/dist/collection/components/editable-string-list/dist/editable-string-list.js +207 -0
  186. package/dist/collection/components/editable-string-list/editable-string-list.css +21 -0
  187. package/dist/collection/components/editable-string-list/editable-string-list.i18n.en.json +18 -0
  188. package/dist/collection/components/editable-string-list/editable-string-list.js +194 -0
  189. package/dist/collection/components/editable-text/dist/editable-text.js +300 -0
  190. package/dist/collection/components/editable-text/dist/handle-input.js +52 -0
  191. package/dist/collection/components/editable-text/editable-text.css +53 -0
  192. package/dist/collection/components/editable-text/editable-text.i18n.en.json +3 -0
  193. package/dist/collection/components/editable-text/editable-text.js +473 -0
  194. package/dist/collection/components/editable-text/handle-input.js +47 -0
  195. package/dist/collection/components/editor/dist/editor.js +403 -0
  196. package/dist/collection/components/editor/editor.css +41 -0
  197. package/dist/collection/components/editor/editor.js +579 -0
  198. package/dist/collection/components/editor-cursors/editor-cursors.css +43 -0
  199. package/dist/collection/components/editor-cursors/editor-cursors.js +228 -0
  200. package/dist/collection/components/heading/dist/heading.js +210 -0
  201. package/dist/collection/components/heading/editable-node.js +2 -0
  202. package/dist/collection/components/heading/heading.css +96 -0
  203. package/dist/collection/components/heading/heading.i18n.en.json +4 -0
  204. package/dist/collection/components/heading/heading.js +198 -0
  205. package/dist/collection/components/image/image.css +75 -0
  206. package/dist/collection/components/image/image.i18n.en.json +4 -0
  207. package/dist/collection/components/image/image.js +303 -0
  208. package/dist/collection/components/label-bar/label-bar.css +40 -0
  209. package/dist/collection/components/label-bar/label-bar.js +49 -0
  210. package/dist/collection/components/liturgical-document/condition-node.js +86 -0
  211. package/dist/collection/components/liturgical-document/dist/liturgical-document.js +341 -0
  212. package/dist/collection/components/liturgical-document/liturgical-document.css +73 -0
  213. package/dist/collection/components/liturgical-document/liturgical-document.i18n.en.json +45 -0
  214. package/dist/collection/components/liturgical-document/liturgical-document.js +465 -0
  215. package/dist/collection/components/liturgical-document/lookup-node.js +80 -0
  216. package/dist/collection/components/liturgy/liturgy.js +138 -0
  217. package/dist/collection/components/meditation/dist/meditation.js +345 -0
  218. package/dist/collection/components/meditation/meditation.css +63 -0
  219. package/dist/collection/components/meditation/meditation.i18n.en.json +8 -0
  220. package/dist/collection/components/meditation/meditation.js +409 -0
  221. package/dist/collection/components/option/dist/option.js +318 -0
  222. package/dist/collection/components/option/option.css +8 -0
  223. package/dist/collection/components/option/option.i18n.en.json +3 -0
  224. package/dist/{ldf/ldf-option.entry.js → collection/components/option/option.js} +214 -31
  225. package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
  226. package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.css +3 -0
  227. package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.i18n.en.json +3 -0
  228. package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +265 -0
  229. package/dist/collection/components/psalm/dist/psalm.js +383 -0
  230. package/dist/collection/components/psalm/psalm.css +152 -0
  231. package/dist/collection/components/psalm/psalm.i18n.en.json +10 -0
  232. package/dist/collection/components/psalm/psalm.js +361 -0
  233. package/dist/collection/components/refrain/refrain.css +42 -0
  234. package/dist/collection/components/refrain/refrain.js +105 -0
  235. package/dist/collection/components/responsive-prayer/responsive-prayer.css +83 -0
  236. package/dist/collection/components/responsive-prayer/responsive-prayer.i18n.en.json +7 -0
  237. package/dist/collection/components/responsive-prayer/responsive-prayer.js +215 -0
  238. package/dist/collection/components/rubric/rubric.css +9 -0
  239. package/dist/collection/components/rubric/rubric.js +104 -0
  240. package/dist/collection/components/string/dist/string.js +194 -0
  241. package/dist/collection/components/string/string.css +60 -0
  242. package/dist/{ldf/ldf-string.entry.js → collection/components/string/string.js} +179 -18
  243. package/dist/collection/components/text/dist/text.js +234 -0
  244. package/dist/collection/components/text/text.css +52 -0
  245. package/dist/collection/components/text/text.i18n.en.json +7 -0
  246. package/dist/collection/components/text/text.i18n.es.json +3 -0
  247. package/dist/collection/components/text/text.js +224 -0
  248. package/dist/collection/i18n/bible-reading.i18n.en.json +13 -0
  249. package/dist/collection/i18n/bible-reading.i18n.es.json +4 -0
  250. package/dist/collection/i18n/day-name.i18n.en.json +4 -0
  251. package/dist/collection/i18n/editable-add-block-menu.i18n.en.json +48 -0
  252. package/dist/collection/i18n/editable-add-block.i18n.en.json +5 -0
  253. package/dist/collection/i18n/editable-antiphon-field.i18n.en.json +11 -0
  254. package/dist/collection/i18n/editable-condition-piece.i18n.en.json +21 -0
  255. package/dist/collection/i18n/editable-condition.i18n.en.json +7 -0
  256. package/dist/collection/i18n/editable-delete.i18n.en.json +6 -0
  257. package/dist/collection/i18n/editable-filter-documents.i18n.en.json +9 -0
  258. package/dist/collection/i18n/editable-metadata-buttons.i18n.en.json +31 -0
  259. package/dist/collection/i18n/editable-metadata-metadata-fields.i18n.en.json +48 -0
  260. package/dist/collection/i18n/editable-metadata.i18n.en.json +51 -0
  261. package/dist/collection/i18n/editable-preference-option.i18n.en.json +9 -0
  262. package/dist/collection/i18n/editable-preference.i18n.en.json +8 -0
  263. package/dist/collection/i18n/editable-preferences.i18n.en.json +10 -0
  264. package/dist/collection/i18n/editable-string-list.i18n.en.json +18 -0
  265. package/dist/collection/i18n/editable-text.i18n.en.json +3 -0
  266. package/dist/collection/i18n/heading.i18n.en.json +4 -0
  267. package/dist/collection/i18n/image.i18n.en.json +4 -0
  268. package/dist/collection/i18n/liturgical-document.i18n.en.json +45 -0
  269. package/dist/collection/i18n/meditation.i18n.en.json +8 -0
  270. package/dist/collection/i18n/option.i18n.en.json +3 -0
  271. package/dist/collection/i18n/prayers-and-thanksgivings.i18n.en.json +3 -0
  272. package/dist/collection/i18n/psalm.i18n.en.json +10 -0
  273. package/dist/collection/i18n/responsive-prayer.i18n.en.json +7 -0
  274. package/dist/collection/i18n/text.i18n.en.json +7 -0
  275. package/dist/collection/i18n/text.i18n.es.json +3 -0
  276. package/dist/collection/index.js +2 -0
  277. package/dist/collection/interfaces/add-option-to-doc.js +1 -0
  278. package/dist/collection/interfaces/dist/menu-option.js +9 -0
  279. package/dist/collection/interfaces/index.js +2 -0
  280. package/dist/collection/interfaces/menu-option.js +2 -0
  281. package/dist/collection/utils/element-from-path.js +14 -0
  282. package/dist/{ldf/locale-d595f8f6.js → collection/utils/locale.js} +2 -4
  283. package/dist/esm/_commonjsHelpers-ba3f0406.js +21 -0
  284. package/dist/{ldf/animation-6b850b6a.js → esm/animation-7a1025d0.js} +1 -1
  285. package/dist/{ldf/app-globals-d4376e8c.js → esm/app-globals-729b03cf.js} +1 -1
  286. package/dist/esm/book-31b8cdde.js +282 -0
  287. package/dist/esm/change-ea574d32.js +14 -0
  288. package/dist/{ldf → esm}/cubic-bezier-89113939.js +0 -0
  289. package/dist/esm/cursor-0e47f111.js +10 -0
  290. package/dist/{ldf → esm}/focus-visible-571e113e.js +0 -0
  291. package/dist/{ldf → esm}/framework-delegate-7af2c551.js +0 -0
  292. package/dist/esm/gesture-controller-5bf8565e.js +191 -0
  293. package/dist/{ldf/haptic-0d102c16.js → esm/haptic-fc16a4d8.js} +0 -24
  294. package/dist/{ldf → esm}/hardware-back-button-b3b61715.js +0 -0
  295. package/dist/esm/heading-cc5ffa8a.js +19 -0
  296. package/dist/{ldf/helpers-e9bf4204.js → esm/helpers-8c93393b.js} +0 -3
  297. package/dist/esm/image-c6a3f0c5.js +19 -0
  298. package/dist/{ldf/index-dd274afe.js → esm/index-1bf6d100.js} +3 -31
  299. package/dist/{ldf/index-4505cc02.js → esm/index-734a6b69.js} +2 -2
  300. package/dist/{ldf/index-9b41fcc6.js → esm/index-82044e24.js} +3 -190
  301. package/dist/{ldf → esm}/index-86d5f3ab.js +0 -0
  302. package/dist/{ldf/index-fc8c2f30.js → esm/index-9579282b.js} +3 -3
  303. package/dist/{ldf → esm}/index-c7ecbd63.js +0 -0
  304. package/dist/{ldf/index-7845c707.js → esm/index-f08f6130.js} +1 -6
  305. package/dist/esm/index-f0f6a379.js +1765 -0
  306. package/dist/esm/index.js +4 -0
  307. package/dist/{ldf/input-shims-b58afc2a.js → esm/input-shims-a4ad2743.js} +5 -7
  308. package/dist/{ldf → esm}/ion-action-sheet.entry.js +5 -5
  309. package/dist/{ldf → esm}/ion-alert.entry.js +5 -5
  310. package/dist/{ldf → esm}/ion-app.entry.js +6 -6
  311. package/dist/{ldf → esm}/ion-avatar.entry.js +2 -2
  312. package/dist/{ldf → esm}/ion-back-button.entry.js +2 -2
  313. package/dist/{ldf → esm}/ion-backdrop.entry.js +3 -3
  314. package/dist/{ldf → esm}/ion-badge.entry.js +2 -2
  315. package/dist/esm/ion-button_13.entry.js +1770 -0
  316. package/dist/esm/ion-card-content_6.entry.js +396 -0
  317. package/dist/{ldf → esm}/ion-card-subtitle.entry.js +2 -2
  318. package/dist/{ldf/ion-card.entry.js → esm/ion-card_2.entry.js} +27 -3
  319. package/dist/{ldf/ion-checkbox.entry.js → esm/ion-checkbox_3.entry.js} +123 -4
  320. package/dist/{ldf → esm}/ion-chip.entry.js +2 -2
  321. package/dist/{ldf/ion-datetime.entry.js → esm/ion-datetime_2.entry.js} +152 -6
  322. package/dist/{ldf → esm}/ion-fab-button.entry.js +3 -3
  323. package/dist/{ldf → esm}/ion-fab-list.entry.js +2 -2
  324. package/dist/{ldf → esm}/ion-fab.entry.js +2 -2
  325. package/dist/{ldf → esm}/ion-footer.entry.js +2 -2
  326. package/dist/{ldf → esm}/ion-img.entry.js +2 -2
  327. package/dist/{ldf → esm}/ion-infinite-scroll-content.entry.js +2 -2
  328. package/dist/{ldf → esm}/ion-infinite-scroll.entry.js +2 -2
  329. package/dist/{ldf/ldf-editable-text.entry.js → esm/ion-input_2.entry.js} +222 -12
  330. package/dist/{ldf → esm}/ion-item-divider.entry.js +2 -2
  331. package/dist/{ldf → esm}/ion-item-group.entry.js +2 -2
  332. package/dist/{ldf → esm}/ion-item-option.entry.js +2 -2
  333. package/dist/{ldf → esm}/ion-item-options.entry.js +3 -3
  334. package/dist/{ldf → esm}/ion-item-sliding.entry.js +4 -4
  335. package/dist/{ldf → esm}/ion-list-header.entry.js +2 -2
  336. package/dist/{ldf → esm}/ion-loading.entry.js +5 -5
  337. package/dist/{ldf → esm}/ion-menu-button.entry.js +6 -6
  338. package/dist/{ldf → esm}/ion-menu-toggle.entry.js +6 -6
  339. package/dist/{ldf → esm}/ion-menu.entry.js +7 -11
  340. package/dist/{ldf → esm}/ion-modal.entry.js +8 -7
  341. package/dist/{ldf → esm}/ion-nav-link.entry.js +1 -1
  342. package/dist/{ldf → esm}/ion-nav.entry.js +5 -9
  343. package/dist/{ldf → esm}/ion-note.entry.js +2 -2
  344. package/dist/{ldf → esm}/ion-picker-column.entry.js +5 -5
  345. package/dist/{ldf → esm}/ion-picker.entry.js +5 -5
  346. package/dist/{ldf → esm}/ion-popover.entry.js +6 -6
  347. package/dist/{ldf → esm}/ion-progress-bar.entry.js +3 -3
  348. package/dist/{ldf/ion-radio.entry.js → esm/ion-radio_2.entry.js} +57 -4
  349. package/dist/{ldf → esm}/ion-range.entry.js +4 -4
  350. package/dist/{ldf → esm}/ion-refresher-content.entry.js +2 -2
  351. package/dist/{ldf → esm}/ion-refresher.entry.js +7 -57
  352. package/dist/{ldf → esm}/ion-reorder-group.entry.js +4 -4
  353. package/dist/{ldf → esm}/ion-reorder.entry.js +2 -2
  354. package/dist/{ldf → esm}/ion-route-redirect.entry.js +1 -1
  355. package/dist/{ldf → esm}/ion-route.entry.js +1 -1
  356. package/dist/{ldf → esm}/ion-router-link.entry.js +2 -2
  357. package/dist/{ldf → esm}/ion-router-outlet.entry.js +4 -4
  358. package/dist/{ldf → esm}/ion-router.entry.js +2 -2
  359. package/dist/esm/ion-segment_16.entry.js +2488 -0
  360. package/dist/{ldf → esm}/ion-select-popover.entry.js +3 -3
  361. package/dist/{ldf/ion-select.entry.js → esm/ion-select_2.entry.js} +24 -5
  362. package/dist/{ldf → esm}/ion-slide.entry.js +2 -2
  363. package/dist/{ldf → esm}/ion-slides.entry.js +3 -3
  364. package/dist/{ldf → esm}/ion-spinner.entry.js +2 -2
  365. package/dist/{ldf → esm}/ion-split-pane.entry.js +2 -8
  366. package/dist/{ldf → esm}/ion-tab-bar.entry.js +2 -2
  367. package/dist/{ldf → esm}/ion-tab-button.entry.js +2 -2
  368. package/dist/{ldf → esm}/ion-tab.entry.js +1 -9
  369. package/dist/{ldf → esm}/ion-tabs.entry.js +1 -1
  370. package/dist/{ldf → esm}/ion-text.entry.js +2 -2
  371. package/dist/{ldf → esm}/ion-textarea.entry.js +5 -5
  372. package/dist/{ldf → esm}/ion-thumbnail.entry.js +2 -2
  373. package/dist/{ldf → esm}/ion-toast.entry.js +5 -5
  374. package/dist/{ldf → esm}/ion-virtual-scroll.entry.js +1 -1
  375. package/dist/{ldf/ionic-global-98eeb119.js → esm/ionic-global-ef89a0a5.js} +1 -2
  376. package/dist/{ldf/ios.transition-1d534d59.js → esm/ios.transition-b1be0863.js} +4 -4
  377. package/dist/{ldf/ldf-text.entry.js → esm/ldf-day-name_5.entry.js} +508 -126
  378. package/dist/{ldf → esm}/ldf-editable-add-block-menu.entry.js +9 -4
  379. package/dist/{ldf → esm}/ldf-editable-condition-piece.entry.js +24 -4
  380. package/dist/{ldf → esm}/ldf-editable-condition.entry.js +4 -4
  381. package/dist/{ldf → esm}/ldf-editable-filter-documents.entry.js +32 -4
  382. package/dist/{ldf/ldf-editable-metadata-metadata-fields.entry.js → esm/ldf-editable-lookup_2.entry.js} +121 -5
  383. package/dist/{ldf → esm}/ldf-editable-metadata.entry.js +10 -4
  384. package/dist/{ldf → esm}/ldf-editable-preference-option.entry.js +5 -4
  385. package/dist/{ldf → esm}/ldf-editable-preference.entry.js +5 -4
  386. package/dist/{ldf → esm}/ldf-editable-preferences.entry.js +20 -17
  387. package/dist/{ldf → esm}/ldf-editable-string-list.entry.js +4 -4
  388. package/dist/{ldf → esm}/ldf-editor-cursors.entry.js +5 -9
  389. package/dist/{ldf → esm}/ldf-editor.entry.js +6 -4
  390. package/dist/esm/ldf.js +20 -0
  391. package/dist/esm/loader.js +20 -0
  392. package/dist/esm/locale-ec8e14e6.js +6 -0
  393. package/dist/{ldf/md.transition-a8cd439c.js → esm/md.transition-1763f475.js} +4 -4
  394. package/dist/{ldf/menu-toggle-util-9f807d31.js → esm/menu-toggle-util-29e61ff3.js} +1 -1
  395. package/dist/esm/option-da8390ad.js +164 -0
  396. package/dist/{ldf/overlays-10805282.js → esm/overlays-06b43b65.js} +2 -2
  397. package/dist/esm/polyfills/core-js.js +11 -0
  398. package/dist/esm/polyfills/css-shim.js +1 -0
  399. package/dist/esm/polyfills/dom.js +79 -0
  400. package/dist/esm/polyfills/es5-html-element.js +1 -0
  401. package/dist/esm/polyfills/index.js +34 -0
  402. package/dist/esm/polyfills/system.js +6 -0
  403. package/dist/esm/preference-d070d4cb.js +20 -0
  404. package/dist/esm/refrain-75a412cb.js +19 -0
  405. package/dist/esm/rubric-91bf7fed.js +1213 -0
  406. package/dist/esm/specific-class-ef83cfb6.js +36 -0
  407. package/dist/{ldf → esm}/spinner-configs-5dd6891e.js +0 -0
  408. package/dist/{ldf/status-tap-b8afd87d.js → esm/status-tap-7458bd71.js} +1 -1
  409. package/dist/{ldf/swipe-back-2b2f4e51.js → esm/swipe-back-762284df.js} +3 -2
  410. package/dist/{ldf/swiper.bundle-49d79db9.js → esm/swiper.bundle-13b9da83.js} +2 -2
  411. package/dist/{ldf/tap-click-fccc5499.js → esm/tap-click-9b3d603b.js} +1 -1
  412. package/dist/esm/text-ed75fbd4.js +16 -0
  413. package/dist/{ldf → esm}/theme-74c22054.js +0 -0
  414. package/dist/index.cjs.js +1 -0
  415. package/dist/index.js +1 -0
  416. package/dist/ldf/index.esm.js +1 -4
  417. package/dist/ldf/ldf.css +3 -122
  418. package/dist/ldf/ldf.esm.js +1 -123
  419. package/dist/ldf/p-018e57db.entry.js +1 -0
  420. package/dist/ldf/p-03389897.js +1 -0
  421. package/dist/ldf/p-03afc8cb.entry.js +1 -0
  422. package/dist/ldf/p-04715bf0.entry.js +1 -0
  423. package/dist/ldf/p-0491d1d2.js +1 -0
  424. package/dist/ldf/p-07d6d3ad.entry.js +1 -0
  425. package/dist/ldf/p-08584ccc.entry.js +1 -0
  426. package/dist/ldf/p-0873a34a.entry.js +1 -0
  427. package/dist/ldf/p-0ab55cf6.js +1 -0
  428. package/dist/ldf/p-1482a707.js +1 -0
  429. package/dist/ldf/p-177ede88.js +1 -0
  430. package/dist/ldf/p-1902f41e.entry.js +1 -0
  431. package/dist/ldf/p-1a8e2899.entry.js +1 -0
  432. package/dist/ldf/p-1c8cc5bf.entry.js +1 -0
  433. package/dist/ldf/p-1ff665a7.entry.js +1 -0
  434. package/dist/ldf/p-21e2f0a3.entry.js +1 -0
  435. package/dist/ldf/p-23af1bc3.entry.js +1 -0
  436. package/dist/ldf/p-25a736f1.entry.js +1 -0
  437. package/dist/ldf/p-2ae548b3.entry.js +1 -0
  438. package/dist/ldf/p-2c36a583.entry.js +1 -0
  439. package/dist/ldf/p-302dc0d5.entry.js +1 -0
  440. package/dist/ldf/p-327b14ac.entry.js +1 -0
  441. package/dist/ldf/p-32f7ba8e.entry.js +1 -0
  442. package/dist/ldf/p-3545fcdc.entry.js +1 -0
  443. package/dist/ldf/p-374118d7.entry.js +1 -0
  444. package/dist/ldf/p-380f8655.entry.js +1 -0
  445. package/dist/ldf/p-3c9930ff.entry.js +1 -0
  446. package/dist/ldf/p-3ca74c80.js +8 -0
  447. package/dist/ldf/p-3e8ff66b.js +1 -0
  448. package/dist/ldf/p-3f39c2ad.entry.js +1 -0
  449. package/dist/ldf/p-3f8ef67b.entry.js +1 -0
  450. package/dist/ldf/p-402c811f.js +1 -0
  451. package/dist/ldf/p-430c418a.entry.js +1 -0
  452. package/dist/ldf/p-476327d6.js +1 -0
  453. package/dist/ldf/p-48e44122.js +1 -0
  454. package/dist/ldf/p-4a4380fa.entry.js +1 -0
  455. package/dist/ldf/p-4aa9a6f2.js +1 -0
  456. package/dist/ldf/p-4b80de48.js +1 -0
  457. package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
  458. package/dist/ldf/p-5066eaa5.js +1 -0
  459. package/dist/ldf/p-52656429.entry.js +1 -0
  460. package/dist/ldf/p-55d797c1.js +1 -0
  461. package/dist/ldf/p-59340423.entry.js +1 -0
  462. package/dist/ldf/p-594fa9d4.entry.js +1 -0
  463. package/dist/ldf/p-5b43e6be.js +1 -0
  464. package/dist/ldf/p-5b51185b.js +1 -0
  465. package/dist/ldf/p-5be7ff17.entry.js +1 -0
  466. package/dist/ldf/p-5ea6de28.entry.js +1 -0
  467. package/dist/ldf/p-63b5daf6.entry.js +1 -0
  468. package/dist/ldf/p-65563763.entry.js +1 -0
  469. package/dist/ldf/p-65d26c45.js +1 -0
  470. package/dist/ldf/p-65ea7ab3.entry.js +1 -0
  471. package/dist/ldf/p-66a7385e.entry.js +1 -0
  472. package/dist/ldf/p-6857574d.js +1 -0
  473. package/dist/ldf/p-69f85ad3.entry.js +1 -0
  474. package/dist/ldf/p-6fe24d85.entry.js +1 -0
  475. package/dist/ldf/p-70e47f8b.entry.js +1 -0
  476. package/dist/ldf/p-714cf0b2.js +1 -0
  477. package/dist/ldf/p-718ae824.js +1 -0
  478. package/dist/ldf/p-78da8fe1.js +1 -0
  479. package/dist/ldf/p-79a526a1.entry.js +1 -0
  480. package/dist/ldf/p-7abeb82c.entry.js +1 -0
  481. package/dist/ldf/p-7efa633b.entry.js +1 -0
  482. package/dist/ldf/p-800a115c.entry.js +1 -0
  483. package/dist/ldf/p-84f38db6.entry.js +1 -0
  484. package/dist/ldf/p-8767a74e.entry.js +1 -0
  485. package/dist/ldf/p-88dbd8b6.js +1 -0
  486. package/dist/ldf/p-8932ec85.entry.js +1 -0
  487. package/dist/ldf/p-8c2727db.entry.js +1 -0
  488. package/dist/ldf/p-8ec26587.js +1 -0
  489. package/dist/ldf/p-8f67abb8.js +3 -0
  490. package/dist/ldf/p-9155f066.js +1 -0
  491. package/dist/ldf/p-978e2c6d.js +1 -0
  492. package/dist/ldf/p-991c0877.js +1 -0
  493. package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
  494. package/dist/ldf/p-9c1973a6.entry.js +1 -0
  495. package/dist/ldf/p-9c397c49.entry.js +1 -0
  496. package/dist/ldf/p-9e2c172e.entry.js +1 -0
  497. package/dist/ldf/p-a1729dbd.js +1 -0
  498. package/dist/ldf/p-ac7a17ce.entry.js +1 -0
  499. package/dist/ldf/p-acbbd1ec.js +1 -0
  500. package/dist/ldf/p-afc1a02c.js +1 -0
  501. package/dist/ldf/p-b1242016.js +1 -0
  502. package/dist/ldf/p-b62e8f49.js +1 -0
  503. package/dist/ldf/p-b7388aec.entry.js +1 -0
  504. package/dist/ldf/p-b78336d7.entry.js +1 -0
  505. package/dist/ldf/p-ba021918.entry.js +1 -0
  506. package/dist/ldf/p-bdcf2b02.entry.js +1 -0
  507. package/dist/ldf/p-c1df632d.entry.js +1 -0
  508. package/dist/ldf/p-c3042920.entry.js +1 -0
  509. package/dist/ldf/p-c3807857.entry.js +1 -0
  510. package/dist/ldf/p-c3841978.entry.js +1 -0
  511. package/dist/ldf/p-c41e055c.entry.js +1 -0
  512. package/dist/ldf/p-c60a875b.js +1 -0
  513. package/dist/ldf/p-c6163f81.entry.js +1 -0
  514. package/dist/ldf/p-c6a8f4aa.js +1 -0
  515. package/dist/ldf/p-c6b42618.entry.js +1 -0
  516. package/dist/ldf/p-c74d3fd0.entry.js +1 -0
  517. package/dist/ldf/p-c82dd468.entry.js +1 -0
  518. package/dist/ldf/p-ca698b8f.entry.js +1 -0
  519. package/dist/ldf/p-cbfbb80c.entry.js +1 -0
  520. package/dist/ldf/p-d195c957.entry.js +1 -0
  521. package/dist/ldf/p-d282d4f9.js +1 -0
  522. package/dist/ldf/p-d7966e9b.entry.js +1 -0
  523. package/dist/ldf/p-d7f8c770.js +1 -0
  524. package/dist/ldf/p-d9c1c1f6.js +1 -0
  525. package/dist/ldf/p-dc445c36.entry.js +1 -0
  526. package/dist/ldf/p-dd99e42a.entry.js +1 -0
  527. package/dist/ldf/p-de5bb5ad.js +1 -0
  528. package/dist/ldf/p-e0e12ae3.entry.js +1 -0
  529. package/dist/ldf/p-e215fd02.entry.js +1 -0
  530. package/dist/ldf/p-e4be11ad.entry.js +1 -0
  531. package/dist/ldf/p-e4f0cd91.entry.js +1 -0
  532. package/dist/ldf/p-e911e60d.js +1 -0
  533. package/dist/ldf/p-ea66c343.entry.js +1 -0
  534. package/dist/ldf/p-ec5eecdc.entry.js +1 -0
  535. package/dist/ldf/p-ed3327fa.js +1 -0
  536. package/dist/ldf/p-f0de7628.entry.js +1 -0
  537. package/dist/ldf/p-f2ce126e.js +1 -0
  538. package/dist/ldf/p-f3a0c163.js +1 -0
  539. package/dist/ldf/p-fa191f47.entry.js +1 -0
  540. package/dist/ldf/p-fe59a676.entry.js +1 -0
  541. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +363 -0
  542. package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +285 -0
  543. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +483 -0
  544. package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +501 -0
  545. package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +7 -0
  546. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +22 -0
  547. package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +22 -0
  548. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +277 -0
  549. package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +305 -0
  550. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +26 -0
  551. package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +26 -0
  552. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +58 -0
  553. package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +62 -0
  554. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +440 -0
  555. package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +428 -0
  556. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +128 -0
  557. package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +151 -0
  558. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +101 -0
  559. package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +95 -0
  560. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +61 -0
  561. package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +63 -0
  562. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +37 -0
  563. package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +35 -0
  564. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +28 -0
  565. package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +26 -0
  566. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +27 -0
  567. package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +27 -0
  568. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +147 -0
  569. package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +150 -0
  570. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +194 -0
  571. package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +194 -0
  572. package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +108 -0
  573. package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +167 -0
  574. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +106 -0
  575. package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +106 -0
  576. package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +61 -0
  577. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +324 -0
  578. package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +293 -0
  579. package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +116 -0
  580. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +33 -0
  581. package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +37 -0
  582. package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +151 -0
  583. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +92 -0
  584. package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +40 -0
  585. package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
  586. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
  587. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +54 -0
  588. package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +54 -0
  589. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +172 -0
  590. package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +172 -0
  591. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +563 -0
  592. package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +630 -0
  593. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +204 -0
  594. package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +297 -0
  595. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +3 -0
  596. package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +3 -0
  597. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +186 -0
  598. package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +180 -0
  599. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +88 -0
  600. package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +85 -0
  601. package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +42 -0
  602. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +152 -0
  603. package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +163 -0
  604. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +91 -0
  605. package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +114 -0
  606. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +118 -0
  607. package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +94 -0
  608. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +113 -0
  609. package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +104 -0
  610. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +131 -0
  611. package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +127 -0
  612. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +175 -0
  613. package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +178 -0
  614. package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
  615. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +158 -0
  616. package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +104 -0
  617. package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +10 -0
  618. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +16 -0
  619. package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +17 -0
  620. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +216 -0
  621. package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +203 -0
  622. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +122 -0
  623. package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +123 -0
  624. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +117 -0
  625. package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +82 -0
  626. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +191 -0
  627. package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +191 -0
  628. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +151 -0
  629. package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +152 -0
  630. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +275 -0
  631. package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +320 -0
  632. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +177 -0
  633. package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +210 -0
  634. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +15 -0
  635. package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +15 -0
  636. package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +33 -0
  637. package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +58 -0
  638. package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +29 -0
  639. package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/route-outlet.css +10 -0
  640. package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +4 -0
  641. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +348 -0
  642. package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +279 -0
  643. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +64 -0
  644. package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +35 -0
  645. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +442 -0
  646. package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +424 -0
  647. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +123 -0
  648. package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +123 -0
  649. package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
  650. package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.css +14 -0
  651. package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +53 -0
  652. package/dist/node_modules/@ionic/core/dist/collection/components/slide/slide.css +31 -0
  653. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.ios.css +764 -0
  654. package/dist/node_modules/@ionic/core/dist/collection/components/slides/slides.md.css +764 -0
  655. package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +154 -0
  656. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +108 -0
  657. package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +108 -0
  658. package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
  659. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +96 -0
  660. package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +81 -0
  661. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +308 -0
  662. package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +331 -0
  663. package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +19 -0
  664. package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +3 -0
  665. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +142 -0
  666. package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +146 -0
  667. package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +21 -0
  668. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +110 -0
  669. package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +55 -0
  670. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +249 -0
  671. package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +282 -0
  672. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +214 -0
  673. package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +211 -0
  674. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +174 -0
  675. package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +167 -0
  676. package/dist/node_modules/@ionic/core/dist/collection/components/virtual-scroll/virtual-scroll.css +21 -0
  677. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
  678. package/package.json +2 -2
  679. package/dist/ldf/_commonjsHelpers-8fe71198.js +0 -44
  680. package/dist/ldf/css-shim-5630fd5e.js +0 -4
  681. package/dist/ldf/dom-bd0bf1dc.js +0 -73
  682. package/dist/ldf/index-f441adec.js +0 -2901
  683. package/dist/ldf/index-f4e3260e.js +0 -36
  684. package/dist/ldf/ion-button.entry.js +0 -109
  685. package/dist/ldf/ion-buttons.entry.js +0 -38
  686. package/dist/ldf/ion-card-content.entry.js +0 -26
  687. package/dist/ldf/ion-card-header.entry.js +0 -29
  688. package/dist/ldf/ion-card-title.entry.js +0 -23
  689. package/dist/ldf/ion-col.entry.js +0 -114
  690. package/dist/ldf/ion-content.entry.js +0 -299
  691. package/dist/ldf/ion-grid.entry.js +0 -24
  692. package/dist/ldf/ion-header.entry.js +0 -255
  693. package/dist/ldf/ion-icon.entry.js +0 -172
  694. package/dist/ldf/ion-input.entry.js +0 -216
  695. package/dist/ldf/ion-item.entry.js +0 -119
  696. package/dist/ldf/ion-label.entry.js +0 -51
  697. package/dist/ldf/ion-list.entry.js +0 -48
  698. package/dist/ldf/ion-radio-group.entry.js +0 -57
  699. package/dist/ldf/ion-ripple-effect.entry.js +0 -89
  700. package/dist/ldf/ion-row.entry.js +0 -16
  701. package/dist/ldf/ion-searchbar.entry.js +0 -326
  702. package/dist/ldf/ion-segment-button.entry.js +0 -88
  703. package/dist/ldf/ion-segment.entry.js +0 -296
  704. package/dist/ldf/ion-select-option.entry.js +0 -23
  705. package/dist/ldf/ion-skeleton-text.entry.js +0 -29
  706. package/dist/ldf/ion-title.entry.js +0 -44
  707. package/dist/ldf/ion-toggle.entry.js +0 -152
  708. package/dist/ldf/ion-toolbar.entry.js +0 -67
  709. package/dist/ldf/ldf-bible-reading.entry.js +0 -252
  710. package/dist/ldf/ldf-editable-add-block.entry.js +0 -49
  711. package/dist/ldf/ldf-editable-antiphon-field.entry.js +0 -223
  712. package/dist/ldf/ldf-editable-boolean.entry.js +0 -42
  713. package/dist/ldf/ldf-editable-delete.entry.js +0 -97
  714. package/dist/ldf/ldf-editable-lookup.entry.js +0 -115
  715. package/dist/ldf/ldf-editable-metadata-buttons.entry.js +0 -293
  716. package/dist/ldf/ldf-editable-select.entry.js +0 -33
  717. package/dist/ldf/ldf-heading.entry.js +0 -124
  718. package/dist/ldf/ldf-image.entry.js +0 -195
  719. package/dist/ldf/ldf-label-bar.entry.js +0 -22
  720. package/dist/ldf/ldf-liturgical-document.entry.js +0 -462
  721. package/dist/ldf/ldf-liturgy.entry.js +0 -49
  722. package/dist/ldf/ldf-meditation.entry.js +0 -180
  723. package/dist/ldf/ldf-prayers-and-thanksgivings.entry.js +0 -136
  724. package/dist/ldf/ldf-psalm.entry.js +0 -267
  725. package/dist/ldf/ldf-refrain.entry.js +0 -42
  726. package/dist/ldf/ldf-responsive-prayer.entry.js +0 -137
  727. package/dist/ldf/ldf-rubric.entry.js +0 -41
  728. package/dist/ldf/shadow-css-10669ec3.js +0 -383
  729. package/dist/ldf/utils-8d15f916.js +0 -91
@@ -1,2901 +0,0 @@
1
- import { c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-8fe71198.js';
2
-
3
- function addOneDay(date) {
4
- return new Date(date.getTime() + 60 * 60 * 24 * 1000);
5
- }
6
- function subtractOneDay(date) {
7
- return new Date(date.getTime() - 60 * 60 * 24 * 1000);
8
- }
9
-
10
- // strip away everything but year, month, day
11
- function dateOnly(d) {
12
- d.setHours(0);
13
- d.setMinutes(0);
14
- d.setSeconds(0);
15
- d.setMilliseconds(0);
16
- return d;
17
- }
18
-
19
- /** return date from year, month (1-12), and day
20
- * defaults to today if any of fields are undefined */
21
- function dateFromYMD(year, month, day) {
22
- let d = new Date();
23
- d = dateOnly(d);
24
- if (year && month && day) {
25
- d.setFullYear(parseInt(year));
26
- d.setMonth(parseInt(month) - 1, parseInt(day));
27
- }
28
- return d;
29
- }
30
- /** Transforms a string like `YYYY-mm-dd` to a Date */
31
- function dateFromYMDString(ymd) {
32
- const [y, m, d] = ymd.split('-');
33
- return dateFromYMD(y, m, d);
34
- }
35
- /** Transform `Date` into YYYY-M-D */
36
- function dateToYMD(date) {
37
- return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
38
- }
39
-
40
- /** Returns the date of Easter in a given year */
41
- function easterInYear(Y, julian = false) {
42
- if (julian) {
43
- // Computus — Meeus's Julian algorithm
44
- const a = Y % 4, b = Y % 7, c = Y % 19, d = (19 * c + 15) % 30, e = (2 * a + 4 * b - d + 34) % 7, month = (d + e + 114) / 31, day = ((d + e + 114) % 31) + 1;
45
- return dateOnly(new Date(Y, month - 1, day));
46
- }
47
- else {
48
- // Computus - Meeus/Jones/Butcher algorithm
49
- const a = Y % 19, b = Math.floor(Y / 100), c = Y % 100, d = Math.floor(b / 4), e = b % 4, f = Math.floor((b + 8) / 25), g = Math.floor((b - f + 1) / 3), h = (19 * a + b - d - g + 15) % 30, i = Math.floor(c / 4), k = c % 4, L = (32 + 2 * e + 2 * i - h - k) % 7, m = Math.floor((a + 11 * h + 22 * L) / 451), month = Math.floor((h + L - 7 * m + 114) / 31), day = ((h + L - 7 * m + 114) % 31) + 1;
50
- return dateOnly(new Date(Y, month - 1, day));
51
- }
52
- }
53
-
54
- function dailyOfficeYear(date, week) {
55
- // The Daily Office Lectionary is arranged in a two-year cycle. Year One
56
- // begins on the First Sunday of Advent preceding odd-numbered years, and
57
- // Year Two begins on the First Sunday of Advent preceding even-numbered
58
- // years. (Thus, on the First Sunday of Advent, 1976, the Lectionary for
59
- // Year One is begun.)
60
- let D = [1, 2], year;
61
- // if Advent or December, use this year
62
- if (week.season === 'Advent' || date.getMonth() + 1 == 12) {
63
- year = date.getFullYear();
64
- }
65
- else {
66
- year = date.getFullYear() - 1;
67
- }
68
- return D[year % 2];
69
- }
70
- function rclYear(date, week) {
71
- // The RCL is arranged in a three-year cycle. Year A
72
- // begins on the First Sunday of Advent in 2016/19/22,
73
- // Year B in 2017/20/23, Year C in 2018/21/24 etc.
74
- const D = ['A', 'B', 'C'];
75
- let year;
76
- // if Advent or December, use this year
77
- if (week.season === 'Advent' || date.getMonth() + 1 == 12) {
78
- year = date.getFullYear();
79
- }
80
- else {
81
- year = date.getFullYear() - 1;
82
- }
83
- return D[year % 3];
84
- }
85
-
86
- /**
87
- * LiturgicalDay represents a particular moment in the liturgical calendar,
88
- * like "Monday in Holy Week" or "The Eve of the Epiphany."
89
- */
90
- class LiturgicalDay {
91
- //** Constructor takes a Javascript object containing the class's properties */
92
- constructor(data = {}) {
93
- /** True if this moment is the evening. Used to indicate the eve of feasts. */
94
- this.evening = false;
95
- Object.assign(this, data);
96
- }
97
- /** Returns a native Date from the day's date string */
98
- getDate() {
99
- return dateFromYMDString(this.date);
100
- }
101
- /** Given a LiturgicalDay, returns a new LiturgicalDay that includes the feasts passed */
102
- addHolyDays(holydays) {
103
- var _a, _b, _c, _d;
104
- const day = this;
105
- holydays = holydays
106
- // filter out eves if it's not evening
107
- .filter((feast) => !feast.eve || this.evening)
108
- // filter out days that are supposed to stop after a certain Sunday
109
- // viz., the 1979 daily lectionary for January 8, 9, 10, 11, etc., stops at the 1st Sunday after the Epiphany
110
- .filter((feast) => feast.stops_at_sunday !== day.week.slug)
111
- .map((feast) => {
112
- // if a feast has an `evening` field and it's evening, use that
113
- if (feast.hasOwnProperty('evening') && this.evening == true) {
114
- return feast.evening;
115
- }
116
- // if a feast has a `morning` field and it's morning, use that
117
- else if (feast.hasOwnProperty('morning') && this.evening == false) {
118
- return feast.morning;
119
- }
120
- // if a feast is the eve of something and it's evening, use that feast
121
- else if (feast && feast.eve && this.evening == true) {
122
- return feast;
123
- }
124
- // if none of these, just return the feast
125
- else {
126
- return feast;
127
- }
128
- })
129
- .filter((feast) => !!feast);
130
- // Determine whether a holy day takes precedence over the ordinary day
131
- const observed = this.observedDay(this, (this.holy_days || new Array()).concat(holydays));
132
- // overwrite the day's slug with the observed day's slug if they differ
133
- const holy_day_rank = Number((_b = (_a = observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank), holy_day_is_observed = (observed === null || observed === void 0 ? void 0 : observed.slug) && ((observed === null || observed === void 0 ? void 0 : observed.slug) !== day.slug || holy_day_rank > 2), slug = holy_day_is_observed && holy_day_rank > 2 ? observed.slug : day.slug;
134
- let propers = this.propers;
135
- if (slug !== this.slug) {
136
- propers = slug;
137
- }
138
- const color = observed.color || this.color, collect = observed.collect || this.collect, season = observed.season || this.season, octave = (_d = (_c = (this.holy_days || [])) === null || _c === void 0 ? void 0 : _c.concat(holydays)) === null || _d === void 0 ? void 0 : _d.map((holyday) => holyday.octave).filter((octave) => Boolean(octave)).reduce((acc, curr) => (acc ? acc : curr || acc), undefined);
139
- return new LiturgicalDay(Object.assign(Object.assign({}, this), { slug, propers: holy_day_is_observed && holy_day_rank > 2 ? observed === null || observed === void 0 ? void 0 : observed.slug : propers, color,
140
- season,
141
- octave,
142
- collect, holy_days: (this.holy_days || new Array()).concat(holydays), holy_day_observed: holy_day_is_observed ? observed : this.holy_day_observed }));
143
- }
144
- /** Given a `LiturgicalDay` and a set of `HolyDay`s, it returns whichever option takes precedence */
145
- observedDay(day, holydays) {
146
- // rank: Principal Feast (5), Sunday (4), Holy Day (3), random other days (2), ferial weekday (1)
147
- function getRank(item, type) {
148
- var _a;
149
- // ranked items => go with rank
150
- if (type == 'holyday') {
151
- return ((_a = item === null || item === void 0 ? void 0 : item.type) === null || _a === void 0 ? void 0 : _a.rank) || 2;
152
- }
153
- else {
154
- // if `day.date` is defined, used it to generate a date
155
- // otherwise, use the current date
156
- const date = day.date ? dateFromYMDString(day.date) : dateOnly(new Date());
157
- // Sundays => 4
158
- if (date.getDay() == 0) {
159
- return 4;
160
- }
161
- // weekdays => 1
162
- else {
163
- return 1;
164
- }
165
- }
166
- }
167
- const sorted = holydays
168
- .map((holyday) => ({ rank: getRank(holyday, 'holyday'), obj: holyday }))
169
- .concat({ rank: getRank(day, 'weekday'), obj: day })
170
- .sort((a, b) => {
171
- // equal rank => choose earlier feast (probably )
172
- if (a.rank === b.rank && a.obj.mmdd && b.obj.mmdd) {
173
- const [bMM, bDD] = b.obj.mmdd.split('/'), [aMM, aDD] = a.obj.mmdd.split('/'), bDate = new Date(), aDate = new Date();
174
- bDate.setMonth(parseInt(bMM) - 1);
175
- bDate.setDate(parseInt(bDD));
176
- aDate.setMonth(parseInt(aMM) - 1);
177
- aDate.setDate(parseInt(aDD));
178
- return a.obj.mmdd === b.obj.mmdd && a.obj.kalendar !== b.obj.kalendar
179
- ? a.obj.kalendar === day.kalendar
180
- ? -1
181
- : 1
182
- : aDate.getTime() - bDate.getTime();
183
- }
184
- else {
185
- return b.rank - a.rank;
186
- }
187
- });
188
- return Object.assign({}, sorted[0].obj);
189
- }
190
- // whether this day is ranked as a Major Feast
191
- isFeast() {
192
- var _a, _b, _c, _d;
193
- const isSunday = this.getDate().getDay() === 0, hasRank = (((_b = (_a = this.holy_day_observed) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.rank) || 1) >= 3, holyWeek = (_c = this.slug) === null || _c === void 0 ? void 0 : _c.includes('holy-week'), easterWeek = ((_d = this.week) === null || _d === void 0 ? void 0 : _d.slug) === 'easter';
194
- return isSunday || (hasRank && !holyWeek && !easterWeek);
195
- }
196
- }
197
-
198
- //import { PROPERS } from './propers';
199
- const WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
200
- /** Returns the `LiturgicalDay` that a given `Date` falls on */
201
- function liturgicalDay(date, kalendar, evening = false, week) {
202
- const slug = buildDaySlug(date, week.slug), officeYear = dailyOfficeYear(date, week);
203
- return new LiturgicalDay({
204
- date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`,
205
- kalendar,
206
- evening,
207
- slug,
208
- propers: week.proper ? buildDaySlug(date, `proper-${week.proper}`) : slug,
209
- week,
210
- years: {
211
- bcp1979_daily_office: officeYear,
212
- bcp1979_daily_psalms: officeYear,
213
- rclsunday: rclYear(date, week),
214
- },
215
- holy_days: [],
216
- season: week.season,
217
- color: week.color,
218
- });
219
- }
220
- function buildDaySlug(date, slug) {
221
- return `${WEEKDAYS[date.getDay()].toLowerCase()}-${slug}`;
222
- }
223
-
224
- /** Return `Date` of the Sunday before the given `Date`, stripped of time info */
225
- function sundayBefore(date) {
226
- const s = date;
227
- s.setDate(date.getDate() - date.getDay());
228
- s.setHours(0);
229
- s.setMinutes(0);
230
- s.setSeconds(0);
231
- s.setMilliseconds(0);
232
- return s;
233
- }
234
-
235
- const PROPERS = [
236
- '5/11',
237
- '5/18',
238
- '5/25',
239
- '6/1',
240
- '6/8',
241
- '6/15',
242
- '6/22',
243
- '6/29',
244
- '7/6',
245
- '7/13',
246
- '7/20',
247
- '7/27',
248
- '8/3',
249
- '8/10',
250
- '8/17',
251
- '8/24',
252
- '8/31',
253
- '9/7',
254
- '9/14',
255
- '9/21',
256
- '9/28',
257
- '10/5',
258
- '10/12',
259
- '10/19',
260
- '10/26',
261
- '11/2',
262
- '11/9',
263
- '11/16',
264
- '11/23',
265
- '11/30',
266
- ];
267
-
268
- /** Describes properties of the liturgical calendar used in a particular tradition. */
269
- class Calendar {
270
- }
271
- const TEC_1979_CALENDAR = {
272
- julian: false,
273
- easterCycleBegins: 7,
274
- christmasCycleBegins: 4,
275
- hasPropers: true,
276
- };
277
-
278
- // one week in milliseconds
279
- const ONE_WEEK = 7 * 24 * 60 * 60 * 1000;
280
- /** Returns the cycle and week offset that a given `Date` falls in */
281
- function liturgicalWeek(d, calendar = TEC_1979_CALENDAR) {
282
- const date = new Date(d.getTime()); // avoid overwriting existing Date passed in
283
- const year = date.getFullYear(), easter = easterInYear(year, calendar.julian), christmasEve = new Date(year, 11, 24), last_epiphany = sundayBefore(new Date(easter.getTime() - (calendar.easterCycleBegins - 0.1) * ONE_WEEK)), fourth_advent = sundayBefore(christmasEve), last_pentecost = sundayBefore(new Date(fourth_advent.getTime() - (calendar.christmasCycleBegins - 0.1) * ONE_WEEK));
284
- if (date >= last_pentecost || date < last_epiphany) {
285
- return christmasCycleWeek(date, calendar);
286
- }
287
- else {
288
- return easterCycleWeek(date, calendar);
289
- }
290
- }
291
- // Easter Cycle
292
- function easterCycleWeek(date, calendar = TEC_1979_CALENDAR) {
293
- // weeks from Easter
294
- const week = Math.round(weeksFromEaster(sundayBefore(date)) + calendar.easterCycleBegins);
295
- return {
296
- cycle: 'Easter',
297
- week,
298
- // TODO -- adjust based on calendar.easterCycleBegins
299
- proper: week >= 14 && calendar.hasPropers ? calculateProper(date) : undefined,
300
- };
301
- }
302
- function weeksFromEaster(date) {
303
- return (date.getTime() - easterInYear(date.getFullYear()).getTime()) / ONE_WEEK;
304
- }
305
- function calculateProper(date) {
306
- // TODO -- adjust based on calendar.easterCycleBegins
307
- const lastSunday = sundayBefore(date);
308
- let proper;
309
- for (let ii = 0; ii < PROPERS.length - 1; ii++) {
310
- if (closerThan(lastSunday, PROPERS[ii], PROPERS[ii + 1])) {
311
- proper = ii + 1;
312
- break;
313
- }
314
- }
315
- return proper;
316
- }
317
- function closerThan(date, mmdd1, mmdd2) {
318
- // mmdd1 and mmdd2 are format "May 11" : string
319
- let [mm1, dd1] = mmdd1.split('/'), [mm2, dd2] = mmdd2.split('/'), d1 = dateFromYMD(date.getFullYear().toString(), mm1, dd1), d2 = dateFromYMD(date.getFullYear().toString(), mm2, dd2);
320
- // is mmdd1 closer than mmdd2 to date?
321
- return Math.abs(date.getTime() - d1.getTime()) < Math.abs(date.getTime() - d2.getTime());
322
- }
323
- // Christmas Cycle
324
- function christmasCycleWeek(d, calendar) {
325
- const date = dateOnly(d);
326
- const xmasYear = date.getMonth() >= 10 ? date.getFullYear() : date.getFullYear() - 1, xmas = new Date(xmasYear, 11, 25), xmasEve = new Date(xmasYear, 11, 24), epiphany = new Date(xmasYear + 1, 0, 6);
327
- // If in Advent...
328
- if (date <= xmasEve) {
329
- // Have to calculate from Christmas Eve in case Christmas is a Sunday
330
- const fourthAdv = sundayBefore(xmasEve), weeksFromFourthAdv = (sundayBefore(date).getTime() - fourthAdv.getTime()) / ONE_WEEK, week = Math.round(weeksFromFourthAdv) + 4;
331
- return {
332
- cycle: 'Advent',
333
- week,
334
- proper: week == 0 && calendar.hasPropers ? calculateProper(d) : undefined,
335
- };
336
- }
337
- else if (date > xmasEve && date < epiphany) {
338
- // Christmas, between Christmas and Epiphany
339
- const weeksFromXmas = (date.getTime() - sundayBefore(xmas).getTime()) / ONE_WEEK;
340
- return {
341
- cycle: 'Christmas',
342
- week: Math.floor(weeksFromXmas),
343
- };
344
- }
345
- else {
346
- // Epiphany
347
- const weeksFromEpiphany = (date.getTime() - sundayBefore(epiphany).getTime()) / ONE_WEEK;
348
- return {
349
- cycle: 'Epiphany',
350
- week: Math.floor(weeksFromEpiphany),
351
- };
352
- }
353
- }
354
-
355
- var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
356
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
357
- return new (P || (P = Promise))(function (resolve, reject) {
358
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
359
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
360
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
361
- step((generator = generator.apply(thisArg, _arguments || [])).next());
362
- });
363
- };
364
- function transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, todayDate, acc = [], openDays = [], originalDay = undefined) {
365
- var _a, _b, _c, _d, _e, _f;
366
- return __awaiter(this, void 0, void 0, function* () {
367
- // today
368
- const today = yield liturgicalDayFinder(todayDate), todayIsSunday = (_a = today === null || today === void 0 ? void 0 : today.slug) === null || _a === void 0 ? void 0 : _a.startsWith('sunday-'), todaySpecial = yield specialDayFinder(today.slug), todayFeast = yield feastDayFinder(dateFromYMDString(today.date)), todayIsEmpty = isEmpty(acc[0], todayIsSunday, todaySpecial, todayFeast);
369
- // yesterday
370
- const yesterdayDate = subtractOneDay(todayDate), yesterday = yield liturgicalDayFinder(yesterdayDate), yesterdayIsSunday = (_b = yesterday === null || yesterday === void 0 ? void 0 : yesterday.slug) === null || _b === void 0 ? void 0 : _b.startsWith('sunday-'), yesterdaySpecial = yield specialDayFinder(yesterday.slug), yesterdayFeast = yield feastDayFinder(dateFromYMDString(yesterday.date)), yesterdayIsEmpty = isEmpty(acc[0], yesterdayIsSunday, yesterdaySpecial, yesterdayFeast);
371
- const dayBeforeYesterdayDate = subtractOneDay(yesterdayDate), dayBeforeYesterday = yield liturgicalDayFinder(dayBeforeYesterdayDate), dayBeforeYesterdayIsSunday = (_c = dayBeforeYesterday === null || dayBeforeYesterday === void 0 ? void 0 : dayBeforeYesterday.slug) === null || _c === void 0 ? void 0 : _c.startsWith('sunday-'), dayBeforeYesterdaySpecial = yield specialDayFinder(dayBeforeYesterday === null || dayBeforeYesterday === void 0 ? void 0 : dayBeforeYesterday.slug), dayBeforeYesterdayFeast = yield feastDayFinder(dateFromYMDString(dayBeforeYesterday === null || dayBeforeYesterday === void 0 ? void 0 : dayBeforeYesterday.date)), dayBeforeYesterdayIsEmpty = isEmpty(acc[0], dayBeforeYesterdayIsSunday, dayBeforeYesterdaySpecial, dayBeforeYesterdayFeast);
372
- //console.log('\n\ntoday is ', today.date);
373
- //console.log('acc is', acc.map(hd => hd.slug));
374
- //console.log('openDays is ', openDays.map((day) => day.slug));
375
- // if both days are empty
376
- if (todayIsEmpty && yesterdayIsEmpty) {
377
- //console.log('today is empty and yesterday is empty');
378
- // in Christmastide, we need to check an extra day, for the cases in which Christmas is Sunday and feasts can be transferred several days
379
- const isChristmastide = todayDate.getMonth() === 11 && todayDate.getDate() > 25;
380
- // check ONE more day -- we will rarely need to transfer more than two days, but it does happen around Easter Week sometimes
381
- if (dayBeforeYesterdayIsEmpty) {
382
- //console.log(' and the day before yesterday is empty');
383
- const openDaySlugs = openDays.map((day) => day.slug), originalDayIndex = openDaySlugs
384
- .reverse() // because accumulate moving backwards
385
- .indexOf((originalDay === null || originalDay === void 0 ? void 0 : originalDay.slug) || '') || 0;
386
- //console.log('yielding a transferred feast, which is the ', originalDayIndex < 0 ? 0 : originalDayIndex, originalDay?.slug, 'th item in ', acc.map(hd => hd.slug));
387
- return acc.reverse()[originalDayIndex < 0 ? 0 : originalDayIndex]; // reverse because accumulate moving backwards
388
- }
389
- else {
390
- //console.log(' and the day before yesterday is not empty');
391
- return transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, // pass helpers
392
- subtractOneDay(todayDate), // recurse back to yesterday
393
- acc, [...openDays, today], originalDay || today);
394
- }
395
- }
396
- // if today is empty and yesterday is not empty, recurse back one more day
397
- else if (todayIsEmpty && !yesterdayIsEmpty) {
398
- //console.log('today is empty and yesterday is not empty');
399
- const observed = todayFeast ? today.observedDay(today, [todayFeast, yesterdayFeast || todayFeast]) : today, isObserved = observed.slug === (todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.slug);
400
- //console.log('is today’s feast observed today?', isObserved);
401
- return transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, // pass helpers
402
- subtractOneDay(todayDate), // check yesterday
403
- todayFeast && !todayFeast.eve && !isObserved && Number((_d = todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.type) === null || _d === void 0 ? void 0 : _d.rank) >= 3 ? [...acc, todayFeast] : acc, // include today's feast, but don't transfer "Eve of...",
404
- [...openDays, today], originalDay || today);
405
- }
406
- // if today is not empty and today's feast is not observed...
407
- else {
408
- //console.log('today is not empty');
409
- if (yesterdayIsEmpty) {
410
- //console.log(' yesterday is empty');
411
- // if today is observed today don't transfer
412
- const observed = todayFeast ? today.observedDay(today, [todayFeast]) : today;
413
- if (observed.slug == (todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.slug)) {
414
- //console.log(' and the feast is observed today');
415
- return transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, // pass helpers
416
- subtractOneDay(todayDate), // check yesterday
417
- acc, openDays, originalDay || today);
418
- }
419
- else {
420
- //console.log(' and the feast is not observed today');
421
- return transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, // pass helpers
422
- subtractOneDay(todayDate), // check yesterday
423
- todayFeast && !todayFeast.eve && Number((_e = todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.type) === null || _e === void 0 ? void 0 : _e.rank) >= 3 ? [...acc, todayFeast] : acc, openDays, originalDay || today);
424
- }
425
- }
426
- else {
427
- //console.log(' yesterday is not empty');
428
- const observed = todayFeast ? today.observedDay(today, [todayFeast]) : today, isObserved = observed.slug === (todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.slug);
429
- //console.log(' is today’s feast observed?', isObserved);
430
- return transferredFeast(liturgicalDayFinder, specialDayFinder, feastDayFinder, // pass helpers
431
- subtractOneDay(todayDate), // check yesterday
432
- todayFeast && !todayFeast.eve && !isObserved && Number((_f = todayFeast === null || todayFeast === void 0 ? void 0 : todayFeast.type) === null || _f === void 0 ? void 0 : _f.rank) >= 3
433
- ? [...acc, todayFeast]
434
- : acc, // include today's feast, but don't transfer "Eve of..."
435
- openDays, originalDay || today);
436
- }
437
- }
438
- });
439
- }
440
- function isEmpty(forFeast, isSunday, special, feast) {
441
- const isEmptyCheckList = [special, feast]
442
- .concat(isSunday ? { type: { rank: 4 } } : undefined) // if it's a Sunday, it's a 4 by default
443
- .map((day) => { var _a; return (_a = day === null || day === void 0 ? void 0 : day.type) === null || _a === void 0 ? void 0 : _a.rank; })
444
- .filter((rank) => { var _a, _b; return rank && rank > ((_b = (_a = forFeast === null || forFeast === void 0 ? void 0 : forFeast.type) === null || _a === void 0 ? void 0 : _a.rank) !== null && _b !== void 0 ? _b : 3); });
445
- return isEmptyCheckList.length == 0;
446
- }
447
-
448
- class Condition {
449
- //** Constructor takes a Javascript object containing the class's properties */
450
- constructor(data = {}) {
451
- Object.assign(this, data);
452
- }
453
- /** Given a liturgical day and a set of preferences, evaluates whether the condition should be included */
454
- include(day, prefs = {}) {
455
- var _a;
456
- let include = true, evaluatedConditions = new Array(include);
457
- // approach: for every possible condition included, push its truth
458
- // onto evaluatedConditions — then reduce the array and require each condition given to be true
459
- // `day`, `season`, and `weekday` each operate on an except/only pattern
460
- // `day`: is day.slug in the `only` list (and not in the `except` list)?
461
- this.exceptOnlyFactory('day', day.slug, evaluatedConditions);
462
- // `week`: is day.week.slug in the `only` list (and not in the `except` list)?
463
- this.exceptOnlyFactory('week', (_a = day.week) === null || _a === void 0 ? void 0 : _a.slug, evaluatedConditions);
464
- // `weekday`:
465
- this.exceptOnlyFactory('weekday', ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][dateFromYMDString(day.date).getDay()], evaluatedConditions);
466
- // `season`: is day.week.season (the 'base season' for e.g., a saints' day in Lent)
467
- // or day.season (the actual season being observed) in the `only` list (and not in `except`)?
468
- if (this.hasOwnProperty('season') && this.season !== undefined) {
469
- if (this.season.except !== undefined && this.season.except.length > 0) {
470
- evaluatedConditions.push(!this.season.except.includes(day.season));
471
- evaluatedConditions.push(!this.season.except.includes(day.week.season));
472
- }
473
- if (this.season.only !== undefined && this.season.only.length > 0) {
474
- evaluatedConditions.push(this.season.only.includes(day.season) || this.season.only.includes(day.week.season));
475
- }
476
- }
477
- // `feastDay`
478
- if (this.hasOwnProperty('feastDay') && this.feastDay !== undefined) {
479
- const highestFeastRank = Math.max(
480
- // highest rank of holy days given
481
- ...(day.holy_days || [])
482
- .filter((a) => !!a) // exclude any null or undefined from array
483
- .map((a) => (a && a.type && a.type.rank ? a.type.rank : 3))), isSunday = dateFromYMDString(day.date).getDay() == 0, isFeast = highestFeastRank >= 3 || isSunday;
484
- evaluatedConditions.push(isFeast == this.feastDay);
485
- }
486
- // `date`
487
- if (this.hasOwnProperty('date') && this.date !== undefined) {
488
- const liturgyDate = dateFromYMDString(day.date);
489
- for (const property in this.date) {
490
- try {
491
- const [month, date] = (this.date[property] || '').split('/'), conditionDate = new Date(liturgyDate.getFullYear(), parseInt(month) - 1, parseInt(date));
492
- if (property == 'lt') {
493
- evaluatedConditions.push(liturgyDate.getTime() < conditionDate.getTime());
494
- }
495
- else if (property == 'lte') {
496
- evaluatedConditions.push(liturgyDate.getTime() <= conditionDate.getTime());
497
- }
498
- else if (property == 'gt') {
499
- evaluatedConditions.push(liturgyDate.getTime() > conditionDate.getTime());
500
- }
501
- else if (property == 'gte') {
502
- evaluatedConditions.push(liturgyDate.getTime() >= conditionDate.getTime());
503
- }
504
- }
505
- catch (e) {
506
- throw 'Date is formatted incorrectly (should be MM/DD).';
507
- }
508
- }
509
- }
510
- // `day_of_month`
511
- if (this.hasOwnProperty('day_of_month') && this.day_of_month !== undefined) {
512
- const liturgyDate = dateFromYMDString(day.date), liturgyDayOfMonth = liturgyDate.getDate();
513
- for (const property in this.day_of_month) {
514
- if (property == 'eq') {
515
- evaluatedConditions.push(liturgyDayOfMonth == Number(this.day_of_month.eq));
516
- }
517
- else if (property == 'neq') {
518
- evaluatedConditions.push(liturgyDayOfMonth != Number(this.day_of_month.neq));
519
- }
520
- }
521
- }
522
- // `preference`
523
- if (this.hasOwnProperty('preference') && this.preference !== undefined) {
524
- if (this.preference.is) {
525
- evaluatedConditions.push(prefs[this.preference.key] == this.preference.value);
526
- }
527
- else {
528
- evaluatedConditions.push(prefs[this.preference.key] !== this.preference.value);
529
- }
530
- }
531
- return evaluatedConditions.reduce((a, b) => a && b, true);
532
- }
533
- exceptOnlyFactory(property, include, evaluatedConditions) {
534
- const obj = this[property];
535
- if (obj !== undefined) {
536
- if (obj.except) {
537
- evaluatedConditions.push(!obj.except.includes(include));
538
- }
539
- if (obj.only) {
540
- evaluatedConditions.push(obj.only.includes(include));
541
- }
542
- }
543
- }
544
- }
545
-
546
- var Responsive;
547
- (function (Responsive) {
548
- Responsive["AllSizes"] = "all";
549
- Responsive["SmallOnly"] = "small-only";
550
- Responsive["SmallHidden"] = "small-hidden";
551
- })(Responsive || (Responsive = {}));
552
- const TYPES = [
553
- 'liturgy',
554
- 'heading',
555
- 'option',
556
- 'refrain',
557
- 'rubric',
558
- 'text',
559
- 'responsive',
560
- 'bible-reading',
561
- 'psalm',
562
- 'meditation',
563
- 'image',
564
- 'parallel',
565
- ];
566
- const LOOKUP_TYPES = ['lectionary', 'canticle', 'category', 'slug', 'collect'];
567
- const DISPLAY_FORMATS = ['default', 'omit', 'unison', 'abbreviated'];
568
- /** Represents a liturgy of any scope and concreteness, from a complete bullletin to a single prayer. */
569
- class LiturgicalDocument {
570
- //** Constructor takes a Javascript object containing the class's properties */
571
- constructor(data = {}) {
572
- Object.assign(this, data);
573
- }
574
- /** Evaluates the full set of conditions attached to the document and returns a boolean of whether it should be included
575
- * given the day and assigned preferences */
576
- include(day, prefs = {}) {
577
- if (this.condition !== undefined) {
578
- const evaluatedConditions = (this.condition.conditions || []).map((condition) => {
579
- if (!(condition instanceof Condition)) {
580
- condition = new Condition(condition);
581
- }
582
- return condition.include(day || this.day, prefs);
583
- });
584
- //console.log(evaluatedConditions);
585
- if (this.condition.mode == 'or') {
586
- return evaluatedConditions.reduce((a, b) => a || b, false);
587
- }
588
- else {
589
- return evaluatedConditions.reduce((a, b) => a && b, true);
590
- }
591
- }
592
- else {
593
- return true;
594
- }
595
- }
596
- /** Returns the list of all possible `type` values */
597
- availableTypes() {
598
- return TYPES;
599
- }
600
- /** Returns the list of all possible `style` values. Child classes should override if they have styles available. */
601
- availableStyles() {
602
- return [];
603
- }
604
- /** Returns the list of all possible `lookup.type` values */
605
- availableLookupTypes() {
606
- return LOOKUP_TYPES;
607
- }
608
- /** Returns the list of all available `display_format` values */
609
- availableDisplayFormats() {
610
- return DISPLAY_FORMATS;
611
- }
612
- }
613
-
614
- const BIBLE_BOOK_ABBREVIATIONS = [
615
- {
616
- name: 'Genesis',
617
- aliases: ['Gn', 'Gen', 'Genesis'],
618
- },
619
- {
620
- name: 'Exodus',
621
- aliases: ['Exod', 'Ex', 'Exo', 'Exodus'],
622
- },
623
- {
624
- name: 'Leviticus',
625
- aliases: ['Lev', 'Lv', 'Leviticus'],
626
- },
627
- {
628
- name: 'Numbers',
629
- aliases: ['Num', 'Numbers'],
630
- },
631
- {
632
- name: 'Deuteronomy',
633
- aliases: ['Deut', 'Deuteronomy'],
634
- },
635
- {
636
- name: 'Joshua',
637
- aliases: ['Josh', 'Joshua'],
638
- },
639
- {
640
- name: 'Judges',
641
- aliases: ['Judg', 'Jdg', 'Judges'],
642
- },
643
- {
644
- name: 'Ruth',
645
- aliases: ['Ruth'],
646
- },
647
- {
648
- name: '1 Samuel',
649
- aliases: ['1Sam', '1 Sam', '1st Sam', '1st Samuel', 'First Samuel', '1 Samuel'],
650
- },
651
- {
652
- name: '2 Samuel',
653
- aliases: ['2Sam', '2 Sam', '2nd Sam', '2nd Samuel', 'Second Samuel', '2 Samuel'],
654
- },
655
- {
656
- name: '1 Kings',
657
- aliases: ['1Kgs', '1 Kgs', '1st Kgs', '1st Kings', 'First Kings', '1 Kings'],
658
- },
659
- {
660
- name: '2 Kings',
661
- aliases: ['2Kgs', '2 Kgs', '2nd Kgs', '2nd Kings', 'Second Kings', '2 Kings'],
662
- },
663
- {
664
- name: '1 Chronicles',
665
- aliases: ['1Chr', '1 Chr', '1st Chr', '1st Chronicles', 'First Chronicles', '1 Chronicles'],
666
- },
667
- {
668
- name: '2 Chronicles',
669
- aliases: ['2Chr', '2 Chr', '2nd Chr', '2nd Chronicles', 'Second Chronicles', '2 Chronicles'],
670
- },
671
- {
672
- name: 'Ezra',
673
- aliases: ['Ezra'],
674
- },
675
- {
676
- name: 'Nehemiah',
677
- aliases: ['Neh', 'Nehemiah'],
678
- },
679
- {
680
- name: 'Esther',
681
- aliases: ['Esth', 'Est', 'Esther'],
682
- },
683
- {
684
- name: 'Job',
685
- aliases: ['Jb', 'Job'],
686
- },
687
- {
688
- name: 'Psalms',
689
- aliases: ['Ps', 'Psalm', 'Psalms'],
690
- },
691
- {
692
- name: 'Proverbs',
693
- aliases: ['Prov', 'Pro', 'Proverbs'],
694
- },
695
- {
696
- name: 'Ecclesiastes',
697
- aliases: ['Eccl', 'Ecc', 'Ecclesiastes'],
698
- },
699
- {
700
- name: 'The Song of Solomon',
701
- aliases: ['Song', 'Song of Songs', 'Song of Solomon', 'Cant'],
702
- },
703
- {
704
- name: 'Isaiah',
705
- aliases: ['Isa', 'Is', 'Isaiah'],
706
- },
707
- {
708
- name: 'Jeremiah',
709
- aliases: ['Jer', 'Jeremiah'],
710
- },
711
- {
712
- name: 'Letter of Jeremiah',
713
- aliases: ['EJer', 'EpJer', 'Epistle of Jeremiah'],
714
- },
715
- {
716
- name: 'Lamentations',
717
- aliases: ['Lam', 'Lamentations'],
718
- },
719
- {
720
- name: 'Ezekiel',
721
- aliases: ['Ezek', 'Ezekiel'],
722
- },
723
- {
724
- name: 'Daniel',
725
- aliases: ['Dan', 'Daniel'],
726
- },
727
- {
728
- name: 'Hosea',
729
- aliases: ['Hos', 'Hosea'],
730
- },
731
- {
732
- name: 'Joel',
733
- aliases: ['Joel'],
734
- },
735
- {
736
- name: 'Amos',
737
- aliases: ['Amos'],
738
- },
739
- {
740
- name: 'Obadiah',
741
- aliases: ['Obad', 'Oba', 'Obadiah'],
742
- },
743
- {
744
- name: 'Jonah',
745
- aliases: ['Jon', 'Jonah'],
746
- },
747
- {
748
- name: 'Micah',
749
- aliases: ['Mic', 'Micah'],
750
- },
751
- {
752
- name: 'Nahum',
753
- aliases: ['Nah', 'Nahum'],
754
- },
755
- {
756
- name: 'Habakkuk',
757
- aliases: ['Hab', 'Habakkuk'],
758
- },
759
- {
760
- name: 'Zephaniah',
761
- aliases: ['Zeph', 'Zephaniah'],
762
- },
763
- {
764
- name: 'Haggai',
765
- aliases: ['Hag', 'Haggai'],
766
- },
767
- {
768
- name: 'Zechariah',
769
- aliases: ['Zech', 'Zechariah'],
770
- },
771
- {
772
- name: 'Malachi',
773
- aliases: ['Mal', 'Malachi'],
774
- },
775
- {
776
- name: 'Tobit',
777
- aliases: ['Tob', 'Tobit'],
778
- },
779
- {
780
- name: 'Judith',
781
- aliases: ['Jdt', 'Judith'],
782
- },
783
- {
784
- name: 'Baruch',
785
- aliases: ['Bar', 'Baruch'],
786
- },
787
- {
788
- name: '1 Maccabees',
789
- aliases: ['1Macc', '1 Maccabees', 'First Maccabees', '1 Macc'],
790
- },
791
- {
792
- name: '2 Maccabees',
793
- aliases: ['2Macc', '2 Maccabees', 'Second Maccabees', '2 Macc'],
794
- },
795
- {
796
- name: 'Wisdom',
797
- aliases: ['Wis', 'Wisdom'],
798
- },
799
- {
800
- name: 'Sirach',
801
- aliases: ['Sir', 'Ecclus', 'Ben Sira', 'Ecclesiasticus'],
802
- },
803
- {
804
- name: '1 Esdras',
805
- aliases: ['1 Esdr', '1 Esdras', '1 Esd', '1Esdras', '1Esdr', '1Esd'],
806
- },
807
- {
808
- name: '2 Esdras',
809
- aliases: ['2 Esdr', '2 Esdras', '2 Esd', '2Esdras', '2Esdr', '2Esd'],
810
- },
811
- {
812
- name: 'Bel',
813
- aliases: ['Bel', 'Bel & the Dragon'],
814
- },
815
- {
816
- name: 'Azariah',
817
- aliases: ['Azariah', 'Song of the Three Young Men', 'Song of the Three Childr.', 'Song of the Three Children'],
818
- },
819
- {
820
- name: 'Matthew',
821
- aliases: ['Matt', 'Matthew', 'Mt'],
822
- },
823
- {
824
- name: 'Mark',
825
- aliases: ['Mark', 'Mk'],
826
- },
827
- {
828
- name: 'Luke',
829
- aliases: ['Luke', 'Lk'],
830
- },
831
- {
832
- name: 'John',
833
- aliases: ['Jn', 'John', 'Joh'],
834
- },
835
- {
836
- name: 'Acts',
837
- aliases: ['Acts'],
838
- },
839
- {
840
- name: 'Romans',
841
- aliases: ['Rom', 'Romans'],
842
- },
843
- {
844
- name: '1 Corinthians',
845
- aliases: ['1Cor', '1 Cor', '1st Cor', '1st Corinthians', 'First Corinthians', '1 Corinthians'],
846
- },
847
- {
848
- name: '2 Corinthians',
849
- aliases: ['2Cor', '2 Cor', '2nd Cor', '2nd Corinthians', 'Second Corinthians', '2 Corinthians'],
850
- },
851
- {
852
- name: 'Galatians',
853
- aliases: ['Gal', 'Galatians'],
854
- },
855
- {
856
- name: 'Ephesians',
857
- aliases: ['Eph', 'Ephesians'],
858
- },
859
- {
860
- name: 'Philippians',
861
- aliases: ['Phil', 'Philippians'],
862
- },
863
- {
864
- name: 'Colossians',
865
- aliases: ['Col', 'Colossians'],
866
- },
867
- {
868
- name: '1 Thessalonians',
869
- aliases: ['1Thess', '1 Thess', '1st Thess', '1st Thessalonians', 'First Thessalonians', '1 Thessalonians'],
870
- },
871
- {
872
- name: '2 Thessalonians',
873
- aliases: ['2Thess', '2 Thess', '2nd Thess', '2nd Thessalonians', 'Second Thessalonians', '2 Thessalonians'],
874
- },
875
- {
876
- name: '1 Timothy',
877
- aliases: ['1 Tim', '1Tim', '1st Tim', '1st Timothy', 'First Timothy', '1 Timothy'],
878
- },
879
- {
880
- name: '2 Timothy',
881
- aliases: ['2 Tim', '2Tim', '2nd Tim', '2nd Timothy', 'Second Timothy', '2 Timothy'],
882
- },
883
- {
884
- name: 'Titus',
885
- aliases: ['Titus'],
886
- },
887
- {
888
- name: 'Philemon',
889
- aliases: ['Phlm', 'Philemon'],
890
- },
891
- {
892
- name: 'Hebrews',
893
- aliases: ['Heb', 'Hebrews'],
894
- },
895
- {
896
- name: 'James',
897
- aliases: ['Jas', 'James'],
898
- },
899
- {
900
- name: '1 Peter',
901
- aliases: ['1Pet', '1 Pet', '1st Pet', '1st Peter', 'First Peter', '1 Peter'],
902
- },
903
- {
904
- name: '2 Peter',
905
- aliases: ['2Pet', '2 Pet', '2nd Pet', '2nd Peter', 'Second Peter', '2 Peter'],
906
- },
907
- {
908
- name: '1 John',
909
- aliases: ['1John', '1 John', '1st John', 'First John', '1 Joh'],
910
- },
911
- {
912
- name: '2 John',
913
- aliases: ['2John', '2 John', '2nd John', 'Second John', '2 Joh'],
914
- },
915
- {
916
- name: '3 John',
917
- aliases: ['3John', '3 John', '3rd John', 'Third John', '3 Joh'],
918
- },
919
- {
920
- name: 'Jude',
921
- aliases: ['Jude', 'Jd'],
922
- },
923
- {
924
- name: 'Revelation',
925
- aliases: ['Rev', 'Revelation', 'Revelations', 'Apocalypse', 'Apoc'],
926
- },
927
- ];
928
-
929
- const BIBLE_BOOK_NAMES = {
930
- Genesis: {
931
- en: {
932
- short: 'Genesis',
933
- long: 'The Book of Genesis',
934
- },
935
- },
936
- Exodus: {
937
- en: {
938
- short: 'Exodus',
939
- long: 'The Book of Exodus',
940
- },
941
- },
942
- Leviticus: {
943
- en: {
944
- short: 'Leviticus',
945
- long: 'The Book of Leviticus',
946
- },
947
- },
948
- Numbers: {
949
- en: {
950
- short: 'Numbers',
951
- long: 'The Book of Numbers',
952
- },
953
- },
954
- Deuteronomy: {
955
- en: {
956
- short: 'Deuteronomy',
957
- long: 'The Book of Deuteronomy',
958
- },
959
- },
960
- Joshua: {
961
- en: {
962
- short: 'Joshua',
963
- long: 'The Book of Joshua',
964
- },
965
- },
966
- Judges: {
967
- en: {
968
- short: 'Judges',
969
- long: 'The Book of Judges',
970
- },
971
- },
972
- Ruth: {
973
- en: {
974
- short: 'Ruth',
975
- long: 'The Book of Ruth',
976
- },
977
- },
978
- '1 Samuel': {
979
- en: {
980
- short: '1 Samuel',
981
- long: 'The First Book of Samuel',
982
- },
983
- },
984
- '2 Samuel': {
985
- en: {
986
- short: '2 Samuel',
987
- long: 'The Second Book of Samuel',
988
- },
989
- },
990
- '1 Kings': {
991
- en: {
992
- short: '1 Kings',
993
- long: 'The First Book of Kings',
994
- },
995
- },
996
- '2 Kings': {
997
- en: {
998
- short: '2 Kings',
999
- long: 'The Second Book of Kings',
1000
- },
1001
- },
1002
- '1 Chronicles': {
1003
- en: {
1004
- short: '1 Chronicles',
1005
- long: 'The First Book of Chronicles',
1006
- },
1007
- },
1008
- '2 Chronicles': {
1009
- en: {
1010
- short: '2 Chronicles',
1011
- long: 'The Second Book of Chronicles',
1012
- },
1013
- },
1014
- Ezra: {
1015
- en: {
1016
- short: 'Ezra',
1017
- long: 'The Book of Ezra',
1018
- },
1019
- },
1020
- Nehemiah: {
1021
- en: {
1022
- short: 'Nehemiah',
1023
- long: 'The Book of Nehemiah',
1024
- },
1025
- },
1026
- Esther: {
1027
- en: {
1028
- short: 'Esther',
1029
- long: 'The Book of Esther',
1030
- },
1031
- },
1032
- Job: {
1033
- en: {
1034
- short: 'Job',
1035
- long: 'The Book of Job',
1036
- },
1037
- },
1038
- Psalms: {
1039
- en: {
1040
- short: 'Psalms',
1041
- long: 'The Psalms',
1042
- },
1043
- },
1044
- Proverbs: {
1045
- en: {
1046
- short: 'Proverbs',
1047
- long: 'The Book of Proverbs',
1048
- },
1049
- },
1050
- Ecclesiastes: {
1051
- en: {
1052
- short: 'Ecclesiastes',
1053
- long: 'The Book of Ecclesiastes',
1054
- },
1055
- },
1056
- 'The Song of Solomon': {
1057
- en: {
1058
- short: 'The Song of Solomon',
1059
- long: 'The Song of Solomon',
1060
- },
1061
- },
1062
- Isaiah: {
1063
- en: {
1064
- short: 'Isaiah',
1065
- long: 'The Book of the Prophet Isaiah',
1066
- },
1067
- },
1068
- Jeremiah: {
1069
- en: {
1070
- short: 'Jeremiah',
1071
- long: 'The Book of the Prophet Jeremiah',
1072
- },
1073
- },
1074
- Lamentations: {
1075
- en: {
1076
- short: 'Lamentations',
1077
- long: 'The Book of Lamentations',
1078
- },
1079
- },
1080
- Ezekiel: {
1081
- en: {
1082
- short: 'Ezekiel',
1083
- long: 'The Book of the Prophet Ezekiel',
1084
- },
1085
- },
1086
- Daniel: {
1087
- en: {
1088
- short: 'Daniel',
1089
- long: 'The Book of Daniel',
1090
- },
1091
- 'en-CA': {
1092
- short: 'Daniel',
1093
- long: 'The Book of the Prophet Daniel',
1094
- },
1095
- },
1096
- Hosea: {
1097
- en: {
1098
- short: 'Hosea',
1099
- long: 'The Book of the Prophet Hosea',
1100
- },
1101
- },
1102
- Joel: {
1103
- en: {
1104
- short: 'Joel',
1105
- long: 'The Book of the Prophet Joel',
1106
- },
1107
- },
1108
- Amos: {
1109
- en: {
1110
- short: 'Amos',
1111
- long: 'The Book of the Prophet Amos',
1112
- },
1113
- },
1114
- Obadiah: {
1115
- en: {
1116
- short: 'Obadiah',
1117
- long: 'The Book of the Prophet Obadiah',
1118
- },
1119
- },
1120
- Jonah: {
1121
- en: {
1122
- short: 'Jonah',
1123
- long: 'The Book of the Prophet Jonah',
1124
- },
1125
- },
1126
- Micah: {
1127
- en: {
1128
- short: 'Micah',
1129
- long: 'The Book of the Prophet Micah',
1130
- },
1131
- },
1132
- Nahum: {
1133
- en: {
1134
- short: 'Nahum',
1135
- long: 'The Book of the Prophet Nahum',
1136
- },
1137
- },
1138
- Habakkuk: {
1139
- en: {
1140
- short: 'Habakkuk',
1141
- long: 'The Book of the Prophet Habakkuk',
1142
- },
1143
- },
1144
- Zephaniah: {
1145
- en: {
1146
- short: 'Zephaniah',
1147
- long: 'The Book of the Prophet Zephaniah',
1148
- },
1149
- },
1150
- Haggai: {
1151
- en: {
1152
- short: 'Haggai',
1153
- long: 'The Book of the Prophet Haggai',
1154
- },
1155
- },
1156
- Zechariah: {
1157
- en: {
1158
- short: 'Zechariah',
1159
- long: 'The Book of the Prophet Zechariah',
1160
- },
1161
- },
1162
- Malachi: {
1163
- en: {
1164
- short: 'Malachi',
1165
- long: 'The Book of the Prophet Malachi',
1166
- },
1167
- },
1168
- Tobit: {
1169
- en: {
1170
- short: 'Tobit',
1171
- long: 'The Book of Tobit',
1172
- },
1173
- },
1174
- Azariah: {
1175
- en: {
1176
- short: 'The Song of the Three Children',
1177
- long: 'The Song of the Three Children',
1178
- },
1179
- },
1180
- Judith: {
1181
- en: {
1182
- short: 'Judith',
1183
- long: 'The Book of Judith',
1184
- },
1185
- },
1186
- Baruch: {
1187
- en: {
1188
- short: 'Baruch',
1189
- long: 'The Book of Baruch',
1190
- },
1191
- },
1192
- '1 Maccabees': {
1193
- en: {
1194
- short: '1 Maccabees',
1195
- long: 'The First Book of Maccabees',
1196
- },
1197
- },
1198
- '2 Maccabees': {
1199
- en: {
1200
- short: '2 Maccabees',
1201
- long: 'The Second Book of Maccabees',
1202
- },
1203
- },
1204
- Wisdom: {
1205
- en: {
1206
- short: 'Wisdom',
1207
- long: 'The Wisdom of Solomon',
1208
- },
1209
- },
1210
- Sirach: {
1211
- en: {
1212
- short: 'Sirach',
1213
- long: 'The Wisdom of Ben Sira',
1214
- },
1215
- 'en-CA': {
1216
- short: 'Sirach',
1217
- long: 'The Book of Ecclesiasticus',
1218
- },
1219
- },
1220
- Matthew: {
1221
- en: {
1222
- short: 'Matthew',
1223
- long: 'The Gospel According to Matthew',
1224
- },
1225
- 'en-CA': {
1226
- short: 'Matthew',
1227
- long: 'The Gospel According to St. Matthew',
1228
- },
1229
- },
1230
- Mark: {
1231
- en: {
1232
- short: 'Mark',
1233
- long: 'The Gospel According to Mark',
1234
- },
1235
- 'en-CA': {
1236
- short: 'Mark',
1237
- long: 'The Gospel According to St. Mark',
1238
- },
1239
- },
1240
- Luke: {
1241
- en: {
1242
- short: 'Luke',
1243
- long: 'The Gospel According to Luke',
1244
- },
1245
- 'en-CA': {
1246
- short: 'Luke',
1247
- long: 'The Gospel According to St. Luke',
1248
- },
1249
- },
1250
- John: {
1251
- en: {
1252
- short: 'John',
1253
- long: 'The Gospel According to John',
1254
- },
1255
- 'en-CA': {
1256
- short: 'John',
1257
- long: 'The Gospel According to St. John',
1258
- },
1259
- },
1260
- Acts: {
1261
- en: {
1262
- short: 'Acts',
1263
- long: 'The Acts of the Apostles',
1264
- },
1265
- 'en-CA': {
1266
- short: 'Acts',
1267
- long: 'The Book of the Acts of the Apostles',
1268
- },
1269
- },
1270
- Romans: {
1271
- en: {
1272
- short: 'Romans',
1273
- long: 'The Letter to the Romans',
1274
- },
1275
- 'en-CA': {
1276
- short: 'Romans',
1277
- long: 'The Epistle of St. Paul the Apostle to the Romans',
1278
- },
1279
- },
1280
- '1 Corinthians': {
1281
- en: {
1282
- short: '1 Corinthians',
1283
- long: 'The First Letter to the Corinthians',
1284
- },
1285
- 'en-CA': {
1286
- short: '1 Corinthians',
1287
- long: 'The First Epistle of St. Paul the Apostle to the Corinthians',
1288
- },
1289
- },
1290
- '2 Corinthians': {
1291
- en: {
1292
- short: '2 Corinthians',
1293
- long: 'The Second Letter to the Corinthians',
1294
- },
1295
- 'en-CA': {
1296
- short: '2 Corinthians',
1297
- long: 'The Second Epistle of St. Paul the Apostle to the Corinthians',
1298
- },
1299
- },
1300
- Galatians: {
1301
- en: {
1302
- short: 'Galatians',
1303
- long: 'The Letter to the Galatians',
1304
- },
1305
- 'en-CA': {
1306
- short: 'Galatians',
1307
- long: 'The Epistle of St. Paul the Apostle to the Galatians',
1308
- },
1309
- },
1310
- Ephesians: {
1311
- en: {
1312
- short: 'Ephesians',
1313
- long: 'The Letter to the Ephesians',
1314
- },
1315
- 'en-CA': {
1316
- short: 'Ephesians',
1317
- long: 'The Epistle of St. Paul the Apostle to the Ephesians',
1318
- },
1319
- },
1320
- Philippians: {
1321
- en: {
1322
- short: 'Philippians',
1323
- long: 'The Letter to the Philippians',
1324
- },
1325
- 'en-CA': {
1326
- short: 'Philippians',
1327
- long: 'The Epistle of St. Paul the Apostle to the Philippians',
1328
- },
1329
- },
1330
- Colossians: {
1331
- en: {
1332
- short: 'Colossians',
1333
- long: 'The Letter to the Colossians',
1334
- },
1335
- 'en-CA': {
1336
- short: 'Colossians',
1337
- long: 'The Epistle of St. Paul the Apostle to the Colossians',
1338
- },
1339
- },
1340
- '1 Thessalonians': {
1341
- en: {
1342
- short: '1 Thessalonians',
1343
- long: 'The First Letter to the Thessalonians',
1344
- },
1345
- 'en-CA': {
1346
- short: '1 Thessalonians',
1347
- long: 'The First Epistle of St. Paul the Apostle to the Thessalonians',
1348
- },
1349
- },
1350
- '2 Thessalonians': {
1351
- en: {
1352
- short: '2 Thessalonians',
1353
- long: 'The Second Letter to the Thessalonians',
1354
- },
1355
- 'en-CA': {
1356
- short: '2 Thessalonians',
1357
- long: 'The Second Epistle of St. Paul the Apostle to the Thessalonians',
1358
- },
1359
- },
1360
- '1 Timothy': {
1361
- en: {
1362
- short: '1 Timothy',
1363
- long: 'The First Letter to Timothy',
1364
- },
1365
- 'en-CA': {
1366
- short: '1 Timothy',
1367
- long: 'The First Epistle of St. Paul the Apostle to Timothy',
1368
- },
1369
- },
1370
- '2 Timothy': {
1371
- en: {
1372
- short: '2 Timothy',
1373
- long: 'The Second Letter to Timothy',
1374
- },
1375
- 'en-CA': {
1376
- short: '2 Timothy',
1377
- long: 'The Second Epistle of St. Paul the Apostle to Timothy',
1378
- },
1379
- },
1380
- Titus: {
1381
- en: {
1382
- short: 'Titus',
1383
- long: 'The Letter to Titus',
1384
- },
1385
- 'en-CA': {
1386
- short: 'Titus',
1387
- long: 'The Epistle of St. Paul the Apostle to Titus',
1388
- },
1389
- },
1390
- Philemon: {
1391
- en: {
1392
- short: 'Philemon',
1393
- long: 'The Letter to Philemon',
1394
- },
1395
- 'en-CA': {
1396
- short: 'Philemon',
1397
- long: 'The Epistle of St. Paul the Apostle to Philemon',
1398
- },
1399
- },
1400
- Hebrews: {
1401
- en: {
1402
- short: 'Hebrews',
1403
- long: 'The Book of Hebrews',
1404
- },
1405
- 'en-CA': {
1406
- short: 'Hebrews',
1407
- long: 'The Epistle to the Hebrews',
1408
- },
1409
- },
1410
- James: {
1411
- en: {
1412
- short: 'James',
1413
- long: 'The Letter of James',
1414
- },
1415
- 'en-CA': {
1416
- short: 'James',
1417
- long: 'The Epistle General of St. James',
1418
- },
1419
- },
1420
- '1 Peter': {
1421
- en: {
1422
- short: '1 Peter',
1423
- long: 'The First Letter of Peter',
1424
- },
1425
- 'en-CA': {
1426
- short: '1 Peter',
1427
- long: 'The First Epistle General of St. Peter',
1428
- },
1429
- },
1430
- '2 Peter': {
1431
- en: {
1432
- short: '2 Peter',
1433
- long: 'The Second Letter of Peter',
1434
- },
1435
- 'en-CA': {
1436
- short: '2 Peter',
1437
- long: 'The Second Epistle General of St. Peter',
1438
- },
1439
- },
1440
- '1 John': {
1441
- en: {
1442
- short: '1 John',
1443
- long: 'The First Letter of John',
1444
- },
1445
- 'en-CA': {
1446
- short: '2 John',
1447
- long: 'The First Epistle General of St. John',
1448
- },
1449
- },
1450
- '2 John': {
1451
- en: {
1452
- short: '2 John',
1453
- long: 'The Second Letter of John',
1454
- },
1455
- 'en-CA': {
1456
- short: '2 John',
1457
- long: 'The Second Epistle General of St. John',
1458
- },
1459
- },
1460
- '3 John': {
1461
- en: {
1462
- short: '3 John',
1463
- long: 'The Third Letter of John',
1464
- },
1465
- 'en-CA': {
1466
- short: '3 John',
1467
- long: 'The Third Epistle General of St. John',
1468
- },
1469
- },
1470
- Jude: {
1471
- en: {
1472
- short: 'Jude',
1473
- long: 'The Letter of Jude',
1474
- },
1475
- 'en-CA': {
1476
- short: 'Jude',
1477
- long: 'The Epistle General of St. Jude',
1478
- },
1479
- },
1480
- Revelation: {
1481
- en: {
1482
- short: 'Revelation',
1483
- long: 'The Book of Revelation',
1484
- },
1485
- 'en-CA': {
1486
- short: 'Revelation',
1487
- long: 'The Revelation to St. John the Divine',
1488
- },
1489
- },
1490
- '1 Esdras': {
1491
- en: {
1492
- short: '1 Esdras',
1493
- long: 'The Second Book of Esdras',
1494
- },
1495
- },
1496
- '2 Esdras': {
1497
- en: {
1498
- short: '2 Esdras',
1499
- long: 'The Second Book of Esdras',
1500
- },
1501
- },
1502
- Bel: {
1503
- en: {
1504
- short: 'Bel',
1505
- long: 'Bel and the Dragon',
1506
- },
1507
- },
1508
- 'Letter of Jeremiah': {
1509
- en: {
1510
- short: 'Letter of Jeremiah',
1511
- long: 'The Letter of Jeremiah',
1512
- },
1513
- },
1514
- };
1515
-
1516
- function ordinalSuffix(i) {
1517
- var j = i % 10, k = i % 100;
1518
- if (j == 1 && k != 11) {
1519
- return i + 'st';
1520
- }
1521
- if (j == 2 && k != 12) {
1522
- return i + 'nd';
1523
- }
1524
- if (j == 3 && k != 13) {
1525
- return i + 'rd';
1526
- }
1527
- return i + 'th';
1528
- }
1529
-
1530
- const STYLES$6 = ['long', 'short'];
1531
- /** BibleReading represents liturgical instructions. */
1532
- class BibleReading extends LiturgicalDocument {
1533
- //** Constructor takes a Javascript object containing the class's properties */
1534
- constructor(data = {}) {
1535
- super(data);
1536
- }
1537
- /** Replaces ${longName} or ${shortName} in LD passed as intro with appropriate value */
1538
- compileIntro() {
1539
- var _a, _b, _c, _d;
1540
- if (this.metadata && this.metadata.intro) {
1541
- const abbrev = (_a = this.abbrevFromCitation()) !== null && _a !== void 0 ? _a : this.citation, bookCode = this.bookCodeFromAbbrev(abbrev !== null && abbrev !== void 0 ? abbrev : ''), longName = abbrev ? this.longNameFromBookCode(bookCode !== null && bookCode !== void 0 ? bookCode : '', this.language || 'en') : '—', shortName = abbrev ? this.shortNameFromBookCode(bookCode !== null && bookCode !== void 0 ? bookCode : '', this.language || 'en') : '—', chapter = this.chapterFromCitation(), verse = this.verseFromCitation();
1542
- const newValue = new Array();
1543
- const process = (s) => s
1544
- .replace(/\$\{longName\}/g, (longName !== null && longName !== void 0 ? longName : abbrev).replace('The', 'the'))
1545
- .replace(/\$\{shortName\}/g, shortName !== null && shortName !== void 0 ? shortName : abbrev)
1546
- .replace(/\$\{chapter\}/g, `${ordinalSuffix(Number(chapter) || 1)}`)
1547
- .replace(/\$\{verse\}/g, `${ordinalSuffix(Number(verse) || 1)}`);
1548
- (_d = (_c = (_b = this.metadata) === null || _b === void 0 ? void 0 : _b.intro) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.forEach((introValue) => {
1549
- // Intro is presumably a Text or similar
1550
- if (typeof introValue == 'string') {
1551
- newValue.push(process(introValue));
1552
- }
1553
- // Intro is presumably a ResponsivePrayer or similar
1554
- else if (introValue.hasOwnProperty('text')) {
1555
- newValue.push(Object.assign(Object.assign({}, introValue), { text: process(introValue.text) }));
1556
- }
1557
- // if it's neither of those, do nothing at all to it
1558
- else {
1559
- newValue.push(process(introValue));
1560
- }
1561
- });
1562
- this.metadata.compiled_intro = new LiturgicalDocument(Object.assign(Object.assign({}, this.metadata.intro), { value: newValue }));
1563
- }
1564
- }
1565
- /** Generates an abbreviated book name from citation
1566
- * @example
1567
- * // returns 'Genesis'
1568
- * this.citation = 'Gen. 3:4'
1569
- * this.abbrevFromCitation() */
1570
- abbrevFromCitation() {
1571
- let citation;
1572
- try {
1573
- const matches = (this.citation || '').match(/(\d*\s*[a-zA-Z]+)/);
1574
- citation = matches ? matches[0] : '';
1575
- }
1576
- catch (e) {
1577
- citation = this.citation;
1578
- }
1579
- return citation.replace(/\./g, '');
1580
- }
1581
- /** Gives number of first chapter of citation */
1582
- chapterFromCitation() {
1583
- var _a;
1584
- const matches = (_a = (this.citation || '').split(';')[0]) === null || _a === void 0 ? void 0 : _a.match(/[\s\.:](\d+)/g);
1585
- if (matches) {
1586
- const [chapter] = matches;
1587
- return typeof chapter === 'string' ? chapter.trim().replace(/[\.,:]/g, '') : undefined;
1588
- }
1589
- else {
1590
- return undefined;
1591
- }
1592
- }
1593
- /** Gives number of first verse of citation */
1594
- verseFromCitation() {
1595
- var _a;
1596
- const matches = (_a = (this.citation || '').split(';')[0]) === null || _a === void 0 ? void 0 : _a.match(/[\s\.:](\d+)/g);
1597
- if (matches) {
1598
- const [, verse] = matches;
1599
- return typeof verse === 'string' ? verse.trim().replace(/[\.,:]/g, '') : undefined;
1600
- }
1601
- else {
1602
- return undefined;
1603
- }
1604
- }
1605
- /** Given an abbreviated book name, returns the name of the book
1606
- * @example
1607
- * // returns 'Genesis'
1608
- * this.bookCodeFromAbbrev('Gen') */
1609
- bookCodeFromAbbrev(a) {
1610
- if (a) {
1611
- const abbrev = a.replace(/\./g, ''), searchResult = BIBLE_BOOK_ABBREVIATIONS.find((book) => book.name == abbrev || book.aliases.includes(abbrev) || book.name.includes(abbrev));
1612
- return searchResult ? searchResult.name : a;
1613
- }
1614
- else {
1615
- return undefined;
1616
- }
1617
- }
1618
- /** Given a book name, returns the full name in the language passed; if not found, returns book name given
1619
- * @example
1620
- * // returns 'The Book of Genesis'
1621
- * this.longNameFromBookCode('Genesis') */
1622
- longNameFromBookCode(bookName, lang = 'en') {
1623
- const bookCode = this.bookCodeFromAbbrev(bookName);
1624
- if (bookCode) {
1625
- const bookResult = BIBLE_BOOK_NAMES[bookCode];
1626
- let searchResult = (bookResult || {})[lang];
1627
- if (!searchResult) {
1628
- searchResult = (bookResult || {})['en'];
1629
- }
1630
- return searchResult ? searchResult.long : bookName;
1631
- }
1632
- else {
1633
- return undefined;
1634
- }
1635
- }
1636
- /** Given a book name, returns the short name in the language passed; if not found, returns book name given
1637
- * @example
1638
- * // returns 'Genesis'
1639
- * this.shortNameFromBookCode('Genesis') */
1640
- shortNameFromBookCode(bookName, lang = 'en') {
1641
- var _a;
1642
- const bookResult = BIBLE_BOOK_NAMES[(_a = this.bookCodeFromAbbrev(bookName)) !== null && _a !== void 0 ? _a : ''], searchResult = (bookResult || {})[lang];
1643
- return searchResult ? searchResult.short : bookName;
1644
- }
1645
- /** Returns the list of all possible `style` values. */
1646
- availableStyles() {
1647
- return STYLES$6;
1648
- }
1649
- /** No meaningful difference in display formats for this type */
1650
- availableDisplayFormats() {
1651
- return ['default', 'omit'];
1652
- }
1653
- }
1654
-
1655
- class BibleReadingVerse {
1656
- constructor(data = {}) {
1657
- Object.assign(this, data);
1658
- }
1659
- }
1660
-
1661
- var Book;
1662
- (function (Book) {
1663
- Book["Genesis"] = "Genesis";
1664
- Book["Exodus"] = "Exodus";
1665
- Book["Leviticus"] = "Leviticus";
1666
- Book["Numbers"] = "Numbers";
1667
- Book["Deuteronomy"] = "Deuteronomy";
1668
- Book["Joshua"] = "Joshua";
1669
- Book["Judges"] = "Judges";
1670
- Book["Ruth"] = "Ruth";
1671
- Book["FirstSamuel"] = "FirstSamuel";
1672
- Book["SecondSamuel"] = "SecondSamuel";
1673
- Book["FirstKings"] = "FirstKings";
1674
- Book["SecondKings"] = "SecondKings";
1675
- Book["FirstChronicles"] = "FirstChronicles";
1676
- Book["SecondChronicles"] = "SecondChronicles";
1677
- Book["Ezra"] = "Ezra";
1678
- Book["Nehemiah"] = "Nehemiah";
1679
- Book["Esther"] = "Esther";
1680
- Book["Job"] = "Job";
1681
- Book["Psalms"] = "Psalms";
1682
- Book["Proverbs"] = "Proverbs";
1683
- Book["Ecclesiastes"] = "Ecclesiastes";
1684
- Book["SongOfSolomon"] = "SongOfSolomon";
1685
- Book["Isaiah"] = "Isaiah";
1686
- Book["Jeremiah"] = "Jeremiah";
1687
- Book["Lamentations"] = "Lamentations";
1688
- Book["Ezekiel"] = "Ezekiel";
1689
- Book["Daniel"] = "Daniel";
1690
- Book["Hosea"] = "Hosea";
1691
- Book["Joel"] = "Joel";
1692
- Book["Amos"] = "Amos";
1693
- Book["Obadiah"] = "Obadiah";
1694
- Book["Jonah"] = "Jonah";
1695
- Book["Micah"] = "Micah";
1696
- Book["Nahum"] = "Nahum";
1697
- Book["Habakkuk"] = "Habakkuk";
1698
- Book["Zephaniah"] = "Zephaniah";
1699
- Book["Haggai"] = "Haggai";
1700
- Book["Zechariah"] = "Zechariah";
1701
- Book["Malachi"] = "Malachi";
1702
- Book["Matthew"] = "Matthew";
1703
- Book["Mark"] = "Mark";
1704
- Book["Luke"] = "Luke";
1705
- Book["John"] = "John";
1706
- Book["Acts"] = "Acts";
1707
- Book["Romans"] = "Romans";
1708
- Book["FirstCorinthians"] = "FirstCorinthians";
1709
- Book["SecondCorinthians"] = "SecondCorinthians";
1710
- Book["Galatians"] = "Galatians";
1711
- Book["Ephesians"] = "Ephesians";
1712
- Book["Philippians"] = "Philippians";
1713
- Book["Colossians"] = "Colossians";
1714
- Book["FirstThessalonians"] = "FirstThessalonians";
1715
- Book["SecondThessalonians"] = "SecondThessalonians";
1716
- Book["FirstTimothy"] = "FirstTimothy";
1717
- Book["SecondTimothy"] = "SecondTimothy";
1718
- Book["Titus"] = "Titus";
1719
- Book["Philemon"] = "Philemon";
1720
- Book["Hebrews"] = "Hebrews";
1721
- Book["James"] = "James";
1722
- Book["FirstPeter"] = "FirstPeter";
1723
- Book["SecondPeter"] = "SecondPeter";
1724
- Book["FirstJohn"] = "FirstJohn";
1725
- Book["SecondJohn"] = "SecondJohn";
1726
- Book["ThirdJohn"] = "ThirdJohn";
1727
- Book["Jude"] = "Jude";
1728
- Book["Revelation"] = "Revelation";
1729
- Book["None"] = "None";
1730
- Book["Tobit"] = "Tobit";
1731
- Book["Judith"] = "Judith";
1732
- Book["Ester"] = "Ester";
1733
- Book["Wisdom"] = "Wisdom";
1734
- Book["Ecclesiasticus"] = "Ecclesiasticus";
1735
- Book["Baruch"] = "Baruch";
1736
- Book["EpistleJeremiah"] = "EpistleJeremiah";
1737
- Book["PrayerOfAzariah"] = "PrayerOfAzariah";
1738
- Book["Susanna"] = "Susanna";
1739
- Book["FirstMaccabees"] = "FirstMaccabees";
1740
- Book["SecondMaccabees"] = "SecondMaccabees";
1741
- Book["FirstEsdras"] = "FirstEsdras";
1742
- Book["SecondEsdras"] = "SecondEsdras";
1743
- Book["FourthEsdras"] = "FourthEsdras";
1744
- Book["Psalm151"] = "Psalm151";
1745
- Book["ThirdMaccabees"] = "ThirdMaccabees";
1746
- Book["FourthMaccabees"] = "FourthMaccabees";
1747
- Book["Bel"] = "Bel";
1748
- })(Book || (Book = {}));
1749
-
1750
- const BOOKS = [
1751
- ['Genesis', Book.Genesis],
1752
- ['Exodus', Book.Exodus],
1753
- ['Leviticus', Book.Leviticus],
1754
- ['Numbers', Book.Numbers],
1755
- ['Deuteronomy', Book.Deuteronomy],
1756
- ['Joshua', Book.Joshua],
1757
- ['Judges', Book.Judges],
1758
- ['Ruth', Book.Ruth],
1759
- ['First Samuel', Book.FirstSamuel],
1760
- ['Second Samuel', Book.SecondSamuel],
1761
- ['First Kings', Book.FirstKings],
1762
- ['Second Kings', Book.SecondKings],
1763
- ['First Chronicles', Book.FirstChronicles],
1764
- ['Second Chronicles', Book.SecondChronicles],
1765
- ['1 Samuel', Book.FirstSamuel],
1766
- ['2 Samuel', Book.SecondSamuel],
1767
- ['1 Kings', Book.FirstKings],
1768
- ['2 Kings', Book.SecondKings],
1769
- ['1 Chronicles', Book.FirstChronicles],
1770
- ['1 Chron.', Book.FirstChronicles],
1771
- ['2 Chronicles', Book.SecondChronicles],
1772
- ['2 Chron.', Book.SecondChronicles],
1773
- ['Ezra', Book.Ezra],
1774
- ['Nehemiah', Book.Nehemiah],
1775
- ['Esther', Book.Esther],
1776
- ['Job', Book.Job],
1777
- ['Psalms', Book.Psalms],
1778
- ['Proverbs', Book.Proverbs],
1779
- ['Ecclesiastes', Book.Ecclesiastes],
1780
- ['Eccl.', Book.Ecclesiastes],
1781
- ['Song of Solomon', Book.SongOfSolomon],
1782
- ['Song of Songs', Book.SongOfSolomon],
1783
- ['Cantic', Book.SongOfSolomon],
1784
- ['Isaiah', Book.Isaiah],
1785
- ['Jeremiah', Book.Jeremiah],
1786
- ['Lamentations', Book.Lamentations],
1787
- ['Lam', Book.Lamentations],
1788
- ['Ezekiel', Book.Ezekiel],
1789
- ['Daniel', Book.Daniel],
1790
- ['Hosea', Book.Hosea],
1791
- ['Joel', Book.Joel],
1792
- ['Amos', Book.Amos],
1793
- ['Obadiah', Book.Obadiah],
1794
- ['Jonah', Book.Jonah],
1795
- ['Micah', Book.Micah],
1796
- ['Nahum', Book.Nahum],
1797
- ['Habakkuk', Book.Habakkuk],
1798
- ['Zephaniah', Book.Zephaniah],
1799
- ['Haggai', Book.Haggai],
1800
- ['Zechariah', Book.Zechariah],
1801
- ['Malachi', Book.Malachi],
1802
- ['Matthew', Book.Matthew],
1803
- ['Mark', Book.Mark],
1804
- ['Luke', Book.Luke],
1805
- ['John', Book.John],
1806
- ['Acts', Book.Acts],
1807
- ['Romans', Book.Romans],
1808
- ['1 Cor.', Book.FirstCorinthians],
1809
- ['1 Corinthians', Book.FirstCorinthians],
1810
- ['First Corinthians', Book.FirstCorinthians],
1811
- ['2 Cor.', Book.SecondCorinthians],
1812
- ['2 Corinthians', Book.SecondCorinthians],
1813
- ['Second Corinthians', Book.SecondCorinthians],
1814
- ['Galatians', Book.Galatians],
1815
- ['Ephesians', Book.Ephesians],
1816
- ['Eph', Book.Ephesians],
1817
- ['Philippians', Book.Philippians],
1818
- ['Phil', Book.Philippians],
1819
- ['Colossians', Book.Colossians],
1820
- ['Col.', Book.Colossians],
1821
- ['1 Thessalonians', Book.FirstThessalonians],
1822
- ['First Thessalonians', Book.FirstThessalonians],
1823
- ['2 Thessalonians', Book.SecondThessalonians],
1824
- ['Second Thessalonians', Book.SecondThessalonians],
1825
- ['1 Timothy', Book.FirstTimothy],
1826
- ['First Timothy', Book.FirstTimothy],
1827
- ['1 Tim', Book.FirstTimothy],
1828
- ['2 Timothy', Book.SecondTimothy],
1829
- ['Second Timothy', Book.SecondTimothy],
1830
- ['2 Tim', Book.SecondTimothy],
1831
- ['Titus', Book.Titus],
1832
- ['Philemon', Book.Philemon],
1833
- ['Phlm', Book.Philemon],
1834
- ['Hebrews', Book.Hebrews],
1835
- ['James', Book.James],
1836
- ['1 Peter', Book.FirstPeter],
1837
- ['First Peter', Book.FirstPeter],
1838
- ['2 Peter', Book.SecondPeter],
1839
- ['Second Peter', Book.SecondPeter],
1840
- ['1 John', Book.FirstJohn],
1841
- ['2 John', Book.SecondJohn],
1842
- ['3 John', Book.ThirdJohn],
1843
- ['First John', Book.FirstJohn],
1844
- ['Second John', Book.SecondJohn],
1845
- ['Third John', Book.ThirdJohn],
1846
- ['Jude', Book.Jude],
1847
- ['Revelation', Book.Revelation],
1848
- ['Apocalypse', Book.Revelation],
1849
- ['Ester', Book.Ester],
1850
- ['Wisdom', Book.Wisdom],
1851
- ['Wis. Sol.', Book.Wisdom],
1852
- ['Wisdom of Solomon', Book.Wisdom],
1853
- ['Ecclesiasticus', Book.Ecclesiasticus],
1854
- ['Ecclus.', Book.Ecclesiasticus],
1855
- ['Baruch', Book.Baruch],
1856
- ['Epistle of Jeremiah', Book.EpistleJeremiah],
1857
- ['Ep. Jer.', Book.EpistleJeremiah],
1858
- ['Prayer of Azariah', Book.PrayerOfAzariah],
1859
- ['PrAzariah', Book.PrayerOfAzariah],
1860
- ['Susanna', Book.Susanna],
1861
- ['First Maccabees', Book.FirstMaccabees],
1862
- ['Second Maccabees', Book.SecondMaccabees],
1863
- ['1 Maccabees', Book.FirstMaccabees],
1864
- ['2 Maccabees', Book.SecondMaccabees],
1865
- ['First Esdras', Book.FirstEsdras],
1866
- ['Second Esdras', Book.SecondEsdras],
1867
- ['Fourth Esdras', Book.FourthEsdras],
1868
- ['1 Esdras', Book.FirstEsdras],
1869
- ['2 Esdras', Book.SecondEsdras],
1870
- ['4 Esdras', Book.FourthEsdras],
1871
- ['Psalm 151', Book.Psalm151],
1872
- ['Third Maccabees', Book.ThirdMaccabees],
1873
- ['Fourth Maccabees', Book.FourthMaccabees],
1874
- ['3 Maccabees', Book.ThirdMaccabees],
1875
- ['4 Maccabees', Book.FourthMaccabees],
1876
- ['Bel', Book.Bel],
1877
- ['Bel and the Dragon', Book.Bel],
1878
- ['Judith', Book.Judith],
1879
- ];
1880
-
1881
- var lib = createCommonjsModule(function (module, exports) {
1882
- "use strict";
1883
- // Reference: https://www.geeksforgeeks.org/jaro-and-jaro-winkler-similarity/
1884
- Object.defineProperty(exports, "__esModule", { value: true });
1885
- exports.jaroWinkler = exports.jaro = void 0;
1886
- /**
1887
- *
1888
- * @param str1 String 1 for compare
1889
- * @param str2 String 2 for compare
1890
- * @param options to control case sensitive or not
1891
- */
1892
- function jaro(str1, str2, options) {
1893
- // Exit early if either are empty.
1894
- if (str1.length === 0 || str2.length === 0) {
1895
- return 0;
1896
- }
1897
- // Convert to upper if case-sensitive is false.
1898
- if (options && !options.caseSensitive) {
1899
- str1 = str1.toUpperCase();
1900
- str2 = str2.toUpperCase();
1901
- }
1902
- // Exact match
1903
- if (str1 === str2) {
1904
- return 1;
1905
- }
1906
- // Number of matches
1907
- var m = 0;
1908
- // Length of two Strings
1909
- var len1 = str1.length;
1910
- var len2 = str2.length;
1911
- // Maximum distance
1912
- var window = Math.floor(Math.max(len1, len2) / 2) - 1;
1913
- // Hash for matches
1914
- var str1Hash = new Array(len1);
1915
- var str2Hash = new Array(len2);
1916
- for (var i = 0; i < len1; i++) {
1917
- for (var j = Math.max(0, i - window); j <= Math.min(len2, i + window + 1); j++) {
1918
- if (!str1Hash[i] && !str2Hash[j] && str1[i] === str2[j]) {
1919
- ++m;
1920
- str1Hash[i] = str2Hash[j] = true;
1921
- break;
1922
- }
1923
- }
1924
- }
1925
- // Exit early if no matches were found.
1926
- if (m === 0) {
1927
- return 0;
1928
- }
1929
- // Count the transpositions.
1930
- var t = 0;
1931
- var point = 0;
1932
- for (var i = 0; i < len1; i++) {
1933
- if (str1Hash[i]) {
1934
- while (!str2Hash[point]) {
1935
- point++;
1936
- }
1937
- if (str1.charAt(i) !== str2.charAt(point++)) {
1938
- t++;
1939
- }
1940
- }
1941
- }
1942
- t /= 2;
1943
- return (m / len1 + m / len2 + (m - t) / m) / 3;
1944
- }
1945
- exports.jaro = jaro;
1946
- /**
1947
- *
1948
- * @param str1 String 1 for compare
1949
- * @param str2 String 2 for compare
1950
- * @param options to control case sensitive or not
1951
- */
1952
- function jaroWinkler(str1, str2, options) {
1953
- // Jaro Distance
1954
- var jaroDist = jaro(str1, str2, options);
1955
- // Same prefix length, maxium is 4
1956
- var prefix = 0;
1957
- if (jaroDist > 0.7) {
1958
- var minIndex = Math.min(str1.length, str2.length);
1959
- var i = 0;
1960
- while (str1[i] === str2[i] && i < 4 && i < minIndex) {
1961
- ++prefix;
1962
- i++;
1963
- }
1964
- jaroDist += 0.1 * prefix * (1 - jaroDist);
1965
- }
1966
- return jaroDist;
1967
- }
1968
- exports.jaroWinkler = jaroWinkler;
1969
- });
1970
-
1971
- const index = /*@__PURE__*/getDefaultExportFromCjs(lib);
1972
-
1973
- function parseReference(reference) {
1974
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
1975
- let list = [];
1976
- let prev = null;
1977
- let bracketOpened = false;
1978
- for (let part of reference.split(/([,;\[\]\(\)])/)) {
1979
- const trimmed = part.trim();
1980
- if (['', ',', ';', '[', ']', '(', ')'].includes(trimmed)) {
1981
- if (trimmed == '[' || trimmed == '(') {
1982
- bracketOpened = true;
1983
- }
1984
- else if (trimmed == ']' || trimmed == ')') {
1985
- bracketOpened = false;
1986
- }
1987
- }
1988
- else {
1989
- const current = parseSingleReference(part, prev, bracketOpened);
1990
- list.push(current);
1991
- prev = current;
1992
- }
1993
- }
1994
- // handle citations like 1 Cor. 13:[1-3]4-13
1995
- if (((_b = (_a = list[0]) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.verse) == null && ((_c = list[1]) === null || _c === void 0 ? void 0 : _c.bracketed)) {
1996
- list = [
1997
- {
1998
- start: {
1999
- book: (_e = (_d = list[1].start.book) !== null && _d !== void 0 ? _d : list[0].start.book) !== null && _e !== void 0 ? _e : null,
2000
- chapter: (_g = (_f = list[1].start.chapter) !== null && _f !== void 0 ? _f : list[0].start.chapter) !== null && _g !== void 0 ? _g : null,
2001
- verse: (_j = (_h = list[1].start.verse) !== null && _h !== void 0 ? _h : list[0].start.verse) !== null && _j !== void 0 ? _j : null,
2002
- },
2003
- end: {
2004
- book: (_w = (_t = (_q = (_m = (_l = (_k = list[1]) === null || _k === void 0 ? void 0 : _k.end) === null || _l === void 0 ? void 0 : _l.book) !== null && _m !== void 0 ? _m : (_p = (_o = list[0]) === null || _o === void 0 ? void 0 : _o.end) === null || _p === void 0 ? void 0 : _p.book) !== null && _q !== void 0 ? _q : (_s = (_r = list[1]) === null || _r === void 0 ? void 0 : _r.start) === null || _s === void 0 ? void 0 : _s.book) !== null && _t !== void 0 ? _t : (_v = (_u = list[0]) === null || _u === void 0 ? void 0 : _u.start) === null || _v === void 0 ? void 0 : _v.book) !== null && _w !== void 0 ? _w : null,
2005
- chapter: (_8 = (_5 = (_2 = (_z = (_y = (_x = list[1]) === null || _x === void 0 ? void 0 : _x.end) === null || _y === void 0 ? void 0 : _y.chapter) !== null && _z !== void 0 ? _z : (_1 = (_0 = list[0]) === null || _0 === void 0 ? void 0 : _0.end) === null || _1 === void 0 ? void 0 : _1.chapter) !== null && _2 !== void 0 ? _2 : (_4 = (_3 = list[1]) === null || _3 === void 0 ? void 0 : _3.start) === null || _4 === void 0 ? void 0 : _4.chapter) !== null && _5 !== void 0 ? _5 : (_7 = (_6 = list[0]) === null || _6 === void 0 ? void 0 : _6.start) === null || _7 === void 0 ? void 0 : _7.chapter) !== null && _8 !== void 0 ? _8 : null,
2006
- verse: (_20 = (_17 = (_14 = (_11 = (_10 = (_9 = list[1]) === null || _9 === void 0 ? void 0 : _9.end) === null || _10 === void 0 ? void 0 : _10.verse) !== null && _11 !== void 0 ? _11 : (_13 = (_12 = list[0]) === null || _12 === void 0 ? void 0 : _12.end) === null || _13 === void 0 ? void 0 : _13.verse) !== null && _14 !== void 0 ? _14 : (_16 = (_15 = list[1]) === null || _15 === void 0 ? void 0 : _15.start) === null || _16 === void 0 ? void 0 : _16.verse) !== null && _17 !== void 0 ? _17 : (_19 = (_18 = list[0]) === null || _18 === void 0 ? void 0 : _18.start) === null || _19 === void 0 ? void 0 : _19.verse) !== null && _20 !== void 0 ? _20 : null,
2007
- },
2008
- bracketed: true,
2009
- },
2010
- ...list.slice(2),
2011
- ];
2012
- }
2013
- return list;
2014
- }
2015
- function parseSingleReference(reference, previous, bracketed) {
2016
- var _a;
2017
- let range_pieces = reference.split('-');
2018
- const first_half = range_pieces[0];
2019
- const second_half = range_pieces[1];
2020
- const start_partial_structure = previous !== null;
2021
- const BLANK_REF = { book: null, chapter: null, verse: null };
2022
- const start = first_half
2023
- ? (_a = queryFromRe(first_half, /([\d\s]*[\w\.]+[a-zA-Z\s]*)\s*(\d+)?:?(\d+)?/, start_partial_structure, null)) !== null && _a !== void 0 ? _a : Object.assign({}, BLANK_REF) : Object.assign({}, BLANK_REF);
2024
- // fill out the start of the range with the details of the end of the previous range
2025
- // e.g., 1 Tim. 4:1-3, 4-6 will fill out with 1 Tim., chapter 4
2026
- const previous_end = (previous === null || previous === void 0 ? void 0 : previous.end) || null;
2027
- const augmented_start = fillOut(start, previous_end);
2028
- const end = second_half ? queryFromRe(second_half, /([\d\s]*[\w\.]+)\s*(\d+)?:?(\d+)?/, true, augmented_start) : null;
2029
- return {
2030
- start: augmented_start || start,
2031
- end,
2032
- bracketed: bracketed ? true : undefined,
2033
- };
2034
- }
2035
- function queryFromRe(reference, re, partial_structure, template) {
2036
- let query = null;
2037
- const parts = reference.trim().match(re);
2038
- if (partial_structure) {
2039
- if (parts) {
2040
- // book, chapter, and verse matched
2041
- if (parts[1] && parseInt(parts[2]) && parseInt(parts[3])) {
2042
- query = { book: book_name_to_book(parts[1]), chapter: parseInt(parts[2]), verse: parseInt(parts[3]) };
2043
- }
2044
- // chapter and verse matched
2045
- else if (parseInt(parts[1]) && !parts[2] && parseInt(parts[3])) {
2046
- query = { book: null, chapter: parseInt(parts[1]), verse: parseInt(parts[3]) };
2047
- }
2048
- else if (parseInt(parts[1]) && parseInt(parts[2]) && !parts[3]) {
2049
- query = { book: null, chapter: parseInt(parts[1]), verse: parseInt(parts[2]) };
2050
- }
2051
- // verse only
2052
- else if (parseInt(parts[1]) && !parts[2] && !parts[3]) {
2053
- query = { book: null, chapter: null, verse: parseInt(parts[1]) };
2054
- }
2055
- }
2056
- else {
2057
- query = null;
2058
- }
2059
- }
2060
- else {
2061
- const matches = reference.trim().match(re) || [];
2062
- query = {
2063
- book: book_name_to_book(matches[1]),
2064
- chapter: parseInt(matches[2]),
2065
- verse: parseInt(matches[3]),
2066
- };
2067
- }
2068
- return fillOut(query, template);
2069
- }
2070
- function fillOut(query, template) {
2071
- // if template provided, fill out query as needed
2072
- return {
2073
- book: (query === null || query === void 0 ? void 0 : query.book) || (template === null || template === void 0 ? void 0 : template.book) || null,
2074
- chapter: (query === null || query === void 0 ? void 0 : query.chapter) || (template === null || template === void 0 ? void 0 : template.chapter) || null,
2075
- verse: (query === null || query === void 0 ? void 0 : query.verse) || (template === null || template === void 0 ? void 0 : template.verse) || null,
2076
- };
2077
- }
2078
- // Use Jaro-algorithm string-similarities to determine book name
2079
- function book_name_to_book(book_name) {
2080
- const scores = BOOKS.map(([key]) => lib.jaro(key, book_name, { caseSensitive: false })), highest = Math.max(...scores), indexOfHighest = scores.indexOf(highest), [, book] = BOOKS[indexOfHighest];
2081
- return book;
2082
- }
2083
-
2084
- class LectionaryEntry {
2085
- }
2086
-
2087
- class HolyDay {
2088
- //** Constructor takes a Javascript object containing the class's properties */
2089
- constructor(data = {}) {
2090
- Object.assign(this, data);
2091
- }
2092
- }
2093
-
2094
- /** Represents a particular liturgical or sanctoral calendar */
2095
- class Kalendar {
2096
- }
2097
-
2098
- class LiturgicalColor {
2099
- //** Constructor takes a Javascript object containing the class's properties */
2100
- constructor(data = {}) {
2101
- Object.assign(this, data);
2102
- }
2103
- }
2104
-
2105
- class LiturgicalWeek {
2106
- //** Constructor takes a Javascript object containing the class's properties */
2107
- constructor(data = {}) {
2108
- /** Used for English-language formatting, generally when "week" name is the proper name of a Sunday.
2109
- * @example
2110
- * // "Thursday after Pentecost", not "Thursday after the Pentecost" */
2111
- this.omit_the = false;
2112
- Object.assign(this, data);
2113
- }
2114
- }
2115
-
2116
- /** Holds instructions on how to adapt liturgies given the Proper Liturgies for Special Days
2117
- * e.g., Ash Wednesday, */
2118
- class ProperLiturgy {
2119
- }
2120
-
2121
- const SEASONS = [
2122
- 'Advent',
2123
- 'Christmas',
2124
- 'Epiphany',
2125
- 'Lent',
2126
- 'HolyWeek',
2127
- 'Easter',
2128
- 'Ascension',
2129
- 'Pentecost',
2130
- 'Saints',
2131
- 'OrdinaryTime',
2132
- 'Ember',
2133
- 'National',
2134
- 'Rogation',
2135
- 'Mary',
2136
- ];
2137
-
2138
- class CanticleTableEntry {
2139
- }
2140
-
2141
- function filterCanticleTableEntries(entries, day, whichTable, nth, fallbackTable = undefined, defaultCanticles = undefined) {
2142
- const isFeast = day instanceof LiturgicalDay ? day.isFeast() : new LiturgicalDay(day).isFeast(), isEvening = day.evening, date = dateFromYMDString(day.date), dayOfWeek = date.getDay(), days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], weekday = isFeast ? 'FeastDay' : days[dayOfWeek];
2143
- const primaryEntries = fallbackTable ? entries.filter((entry) => entry.table == whichTable) : entries, primaryWeekdayEntries = primaryEntries.filter((entry) => !(entry === null || entry === void 0 ? void 0 : entry.weekday) || (entry === null || entry === void 0 ? void 0 : entry.weekday) == weekday),
2144
- // if not found, try fallback table
2145
- weekdayEntries = primaryWeekdayEntries.length == 0 && fallbackTable
2146
- ? primaryEntries.filter((entry) => (entry === null || entry === void 0 ? void 0 : entry.table) == fallbackTable && (!(entry === null || entry === void 0 ? void 0 : entry.weekday) || (entry === null || entry === void 0 ? void 0 : entry.weekday) == weekday))
2147
- : primaryWeekdayEntries,
2148
- // if entry specifies `season`, `week`, `day`, or `evening`, they must match
2149
- filteredEntries = weekdayEntries.filter((entry) => entry &&
2150
- (!entry.season || entry.season == day.season) &&
2151
- (!entry.week || entry.week == day.week.slug) &&
2152
- (!entry.day || entry.day == day.slug) &&
2153
- entry.evening == isEvening),
2154
- // find based on day with highest precedence, then week, then season, then just take whatever's there
2155
- dayEntries = filteredEntries.filter((e) => e.day == day.slug), weekEntries = filteredEntries.filter((e) => e.week == day.week.slug), seasonEntries = filteredEntries.filter((e) => e.season == day.season);
2156
- let preferredEntries = filteredEntries;
2157
- if ((dayEntries === null || dayEntries === void 0 ? void 0 : dayEntries.length) > 0) {
2158
- preferredEntries = dayEntries;
2159
- }
2160
- else if ((weekEntries === null || weekEntries === void 0 ? void 0 : weekEntries.length) > 0) {
2161
- preferredEntries = weekEntries;
2162
- }
2163
- else if ((seasonEntries === null || seasonEntries === void 0 ? void 0 : seasonEntries.length) > 0) {
2164
- preferredEntries = seasonEntries;
2165
- }
2166
- if ((preferredEntries === null || preferredEntries === void 0 ? void 0 : preferredEntries.length) == 0 && fallbackTable) {
2167
- return filterCanticleTableEntries(entries, day, fallbackTable, nth, undefined, defaultCanticles);
2168
- }
2169
- else if ((preferredEntries === null || preferredEntries === void 0 ? void 0 : preferredEntries.length) == 0 && defaultCanticles !== undefined) {
2170
- const defaultCanticle = new CanticleTableEntry();
2171
- return new Array(Object.assign(Object.assign({}, defaultCanticle), { slug: defaultCanticles[isEvening ? 'evening' : 'morning'][nth] }));
2172
- }
2173
- else {
2174
- return preferredEntries;
2175
- }
2176
- }
2177
-
2178
- class Citation {
2179
- //** Constructor takes a Javascript object containing the class's properties */
2180
- constructor(data = {}) {
2181
- /** The URL (as a string) for the API from which more information about the source can be found */
2182
- this.api = 'https://www.venite.app/api';
2183
- Object.assign(this, data);
2184
- }
2185
- /** Provides a human-readable string form of the citation */
2186
- toString(suppressSource = false) {
2187
- return suppressSource ? this.citation : `${this.source} ${this.citation}`;
2188
- }
2189
- }
2190
-
2191
- class SelectableCitation {
2192
- }
2193
-
2194
- class Source {
2195
- }
2196
-
2197
- const STYLES$5 = ['text', 'day', 'date'];
2198
- class Heading extends LiturgicalDocument {
2199
- //** Constructor takes a Javascript object containing the class's properties */
2200
- constructor(data = {}) {
2201
- super(data);
2202
- }
2203
- /** Returns the list of all possible `style` values. */
2204
- availableStyles() {
2205
- return STYLES$5;
2206
- }
2207
- /** No meaningful difference in display formats for this type */
2208
- availableDisplayFormats() {
2209
- return [];
2210
- }
2211
- }
2212
-
2213
- const STYLES$4 = ['normal', 'slideshow', 'carousel'];
2214
- /** Refrain represents a short text like the Gloria Patri, Hail Mary, or an Antiphon */
2215
- class Image extends LiturgicalDocument {
2216
- //** Constructor takes a Javascript object containing the class's properties */
2217
- constructor(data = {}) {
2218
- super(data);
2219
- }
2220
- /** Returns the list of all possible `style` values. Child classes should override if they have styles available. */
2221
- availableStyles() {
2222
- return STYLES$4;
2223
- }
2224
- availableDisplayFormats() {
2225
- return [];
2226
- }
2227
- }
2228
-
2229
- /** Represents the "recipe" to compile a liturgy */
2230
- class Liturgy extends LiturgicalDocument {
2231
- /** No meaningful differences in display format for liturgies */
2232
- availableDisplayFormats() {
2233
- return [];
2234
- }
2235
- }
2236
-
2237
- /** `Preference` represents a single preference in any given liturgy */
2238
- class Preference {
2239
- //** Constructor takes a Javascript object containing the class's properties */
2240
- constructor(data = {}) {
2241
- Object.assign(this, data);
2242
- }
2243
- /** Given a `value` for the preference, returns the full option */
2244
- getPreferenceOption(value) {
2245
- return this.options.find((option) => option.value == value);
2246
- }
2247
- /** Returns the default value for the preference */
2248
- getDefaultPref() {
2249
- const defaultPref = this.options.filter((opt) => opt.default)[0], firstPref = this.options[0];
2250
- return (defaultPref || firstPref).value;
2251
- }
2252
- }
2253
- class PreferenceOption {
2254
- }
2255
-
2256
- class ClientPreferences {
2257
- }
2258
-
2259
- class Meditation extends LiturgicalDocument {
2260
- //** Constructor takes a Javascript object containing the class's properties */
2261
- constructor(data = {}) {
2262
- super(data);
2263
- }
2264
- }
2265
-
2266
- function versionToString(version) {
2267
- if (typeof version === 'string') {
2268
- return version;
2269
- }
2270
- else {
2271
- return JSON.stringify(version);
2272
- }
2273
- }
2274
-
2275
- const VERSIONS = {
2276
- ip: 'IP',
2277
- bcp1979: 'Rite II',
2278
- bcp1979_psalm: '1979',
2279
- eow: 'EOW',
2280
- coverdale: 'Coverdale',
2281
- rite_i: 'Rite I',
2282
- };
2283
- function modifiedVersion(option) {
2284
- return option.type === 'psalm' && option.style === 'psalm' && option.version === 'bcp1979'
2285
- ? 'bcp1979_psalm'
2286
- : option.version;
2287
- }
2288
- class Option extends LiturgicalDocument {
2289
- //** Constructor takes a Javascript object containing the class's properties */
2290
- constructor(data = {}) {
2291
- super(data);
2292
- }
2293
- availableDisplayFormats() {
2294
- return [];
2295
- }
2296
- uniqueVersions() {
2297
- return (this.value || [])
2298
- .map((o) => versionToString(o.version))
2299
- .reduce((uniques, item) => (uniques.includes(item) ? uniques : [...uniques, item]), []).length;
2300
- }
2301
- uniqueLabels() {
2302
- return (this.value || [])
2303
- .map((o) => o.label)
2304
- .reduce((uniques, item) => (uniques.includes(item) ? uniques : [...uniques, item]), []).length;
2305
- }
2306
- uniqueCitations() {
2307
- return (this.value || [])
2308
- .map((o) => (o.citation ? o.citation.toString() : ''))
2309
- .filter((citation) => !!citation)
2310
- .reduce((uniques, item) => (uniques.includes(item) ? uniques : [...uniques, item]), []).length;
2311
- }
2312
- uniqueCanticleNumbers() {
2313
- return Array.from(new Set((this.value || []).map((o) => { var _a; return (o.style === 'canticle' ? (_a = o.metadata) === null || _a === void 0 ? void 0 : _a.number : o.slug || Math.random()); }))).length;
2314
- }
2315
- /** Gives an appropriate version label for the document given */
2316
- getVersionLabel(option, maxLength = 50) {
2317
- var _a, _b, _c;
2318
- const uniqueVersions = this.uniqueVersions(), uniqueLabels = this.uniqueLabels(), uniqueCitations = this.uniqueCitations(), uniqueCanticleNumbers = this.uniqueCanticleNumbers();
2319
- let label = '';
2320
- if (option.type == 'liturgy') {
2321
- label = option.label || option.version_label || 'Option';
2322
- }
2323
- // Psalm 119 parts => Psalm 119: Aleph
2324
- else if (option.type == 'psalm' &&
2325
- uniqueVersions == 1 &&
2326
- option.label &&
2327
- (((_a = option.slug) === null || _a === void 0 ? void 0 : _a.match(/psalm_119_/)) || ((_b = option.citation) === null || _b === void 0 ? void 0 : _b.toString().match(/Ps[^\d]+119/)))) {
2328
- label = option.label;
2329
- }
2330
- // Other psalms: Psalm 121
2331
- else if (option.type == 'psalm' &&
2332
- option.style == 'psalm' &&
2333
- (option.citation || ((_c = option.metadata) === null || _c === void 0 ? void 0 : _c.number)) &&
2334
- uniqueVersions == 1) {
2335
- label = option.citation ? option.citation.toString() : `Psalm ${option.metadata.number}`;
2336
- }
2337
- // Readings of many citations => include truncated text
2338
- else if (option.type == 'bible-reading' &&
2339
- uniqueCitations > 1 &&
2340
- option.citation &&
2341
- option.value &&
2342
- option.value.length > 0) {
2343
- const text = option.value
2344
- .map((v) => (v.hasOwnProperty('text') ? v.text : v.toString()))
2345
- .join(' ');
2346
- const formattedText = option.style == 'short' ? ` (“${text}”)` : '';
2347
- if (uniqueVersions > 1) {
2348
- label = `${option.citation.toString()} (${option.version})${formattedText}`;
2349
- }
2350
- else {
2351
- label = `${option.citation.toString()}${formattedText}`;
2352
- }
2353
- }
2354
- // Readings with same citation + different versions => Version
2355
- else if (option.type == 'bible-reading' && uniqueCitations == 1) {
2356
- label = versionToString(option.version);
2357
- }
2358
- // Readings with one version => John 1:1-4
2359
- else if (option.type == 'bible-reading' && option.citation && uniqueVersions == 1) {
2360
- label = option.citation.toString();
2361
- }
2362
- // Readings with multiple versions => John 1:1-4 (Version)
2363
- else if (option.type == 'bible-reading' && option.citation && uniqueVersions > 1) {
2364
- label = `${option.citation.toString()} (${versionToString(option.version)})`;
2365
- }
2366
- // Canticles, if only one version
2367
- else if (uniqueVersions == 1 &&
2368
- option.type == 'psalm' &&
2369
- option.style == 'canticle' &&
2370
- option.metadata &&
2371
- option.metadata.localname) {
2372
- label = option.metadata.localname;
2373
- }
2374
- // Canticles, if multiple options for same number
2375
- else if (uniqueVersions > 1 && uniqueCanticleNumbers === 1) {
2376
- label = VERSIONS[versionToString(modifiedVersion(option))];
2377
- }
2378
- // Canticles and invitatories, if multiple options => Venite (EOW)
2379
- else if (uniqueVersions > 1 && option.metadata && option.metadata.hasOwnProperty('localname') && option.version) {
2380
- label = `${option.metadata.localname} (${VERSIONS[versionToString(modifiedVersion(option))]})`;
2381
- }
2382
- // Version label other than BCP 1979 => EOW
2383
- else if (option.version_label && option.version_label !== 'bcp1979') {
2384
- label = option.version_label;
2385
- }
2386
- // If multiple labels, then label => Trisagion, Gloria in Excelsis, Kyrie
2387
- else if (option.label && uniqueLabels > 1 && uniqueVersions == 1) {
2388
- label = option.label;
2389
- }
2390
- // If multiple labels and version, then label (version) => Trisagion (BCP), Gloria in Excelsis (EOW)
2391
- else if (option.label && uniqueLabels > 1 && uniqueVersions > 1) {
2392
- label = `${option.label} (${VERSIONS[versionToString(modifiedVersion(option))]})`;
2393
- }
2394
- // Local name but no version (or version is BCP) => 'The Song of Mary'
2395
- else if (option.metadata &&
2396
- option.metadata.hasOwnProperty('localname') &&
2397
- (!option.version_label || option.version_label == 'bcp1979')) {
2398
- label = option.metadata.localname;
2399
- }
2400
- // Fall back to a version label
2401
- else if (uniqueVersions > 1 && option.version) {
2402
- label = VERSIONS[versionToString(modifiedVersion(option))];
2403
- }
2404
- // Fall back to a citation
2405
- else if (option.citation) {
2406
- label = option.citation.toString();
2407
- }
2408
- // Fallback: stripped version of JSON of value
2409
- else if (option.value) {
2410
- label = `“${JSON.stringify(option.value)
2411
- .replace(/[\[\]\{\}\"\'\:]/g, ' ')
2412
- .replace(/\\n/g, ' ')
2413
- .trim()}”`;
2414
- }
2415
- else {
2416
- throw `Unable to generate a label from ${JSON.stringify(option)}`;
2417
- }
2418
- return label.length > maxLength ? label.substring(0, maxLength) + '...' : label;
2419
- }
2420
- }
2421
-
2422
- class Parallel extends LiturgicalDocument {
2423
- //** Constructor takes a Javascript object containing the class's properties */
2424
- constructor(data = {}) {
2425
- super(data);
2426
- }
2427
- }
2428
-
2429
- const STYLES$3 = ['psalm', 'canticle', 'invitatory'];
2430
- /** Psalm represents liturgical instructions. */
2431
- class Psalm extends LiturgicalDocument {
2432
- //** Constructor takes a Javascript object containing the class's properties */
2433
- constructor(data = {}) {
2434
- super(data);
2435
- }
2436
- /** Returns a filtered list of verses based on citation */
2437
- filteredVerses() {
2438
- let filtered = new Array();
2439
- if (this.citation && (this.citation.match(/Ps[^\s]*\s*\d+/) || this.citation == '')) {
2440
- const versesInCitation = this.versesInCitation(this.citation);
2441
- if (versesInCitation.length == 0) {
2442
- /* if `versesInCitation` is empty, it's probably because
2443
- * something like 'Psalm 80' was passed as citation */
2444
- filtered = this.value;
2445
- }
2446
- else {
2447
- (this.value || []).forEach((section) => {
2448
- const newSection = new Array();
2449
- // okay, this is O(4n)...
2450
- (section.value || []).forEach((verse) => {
2451
- if (!verse.number || versesInCitation.includes(verse.number)) {
2452
- newSection.push(verse);
2453
- }
2454
- else if (versesInCitation.includes(`[${verse.number}`)) {
2455
- newSection.push(Object.assign(Object.assign({}, verse), { verse: '[' + verse.verse }));
2456
- }
2457
- else if (versesInCitation.includes(`${verse.number}]`)) {
2458
- newSection.push(Object.assign(Object.assign({}, verse), { halfverse: verse.halfverse + ']' }));
2459
- }
2460
- else if (versesInCitation.includes(`[${verse.number}]`)) {
2461
- newSection.push(Object.assign(Object.assign({}, verse), { verse: '[' + verse.verse, halfverse: verse.halfverse + ']' }));
2462
- }
2463
- });
2464
- filtered.push(Object.assign(Object.assign({}, section), { value: newSection }));
2465
- });
2466
- }
2467
- }
2468
- else {
2469
- filtered = this.value;
2470
- }
2471
- return filtered;
2472
- }
2473
- /** Transforms an ordinary citation into a list of included verse numbers
2474
- * @example
2475
- * // returns ['1', '2', '3', '6', '7', '11']
2476
- * versesInCitation('Psalm 100:1-3,6-7, 11a')
2477
- * */
2478
- versesInCitation(citation) {
2479
- function makeVerseNumber(startBracket, endBracket, num) {
2480
- if (startBracket && endBracket) {
2481
- return '[' + num + ']';
2482
- }
2483
- else if (startBracket) {
2484
- return '[' + num;
2485
- }
2486
- else if (endBracket) {
2487
- return num + ']';
2488
- }
2489
- else {
2490
- return num;
2491
- }
2492
- }
2493
- // comments assume versesInCitation('Psalm 100:1-3,6-7, 11a')
2494
- // search = [ "Psalm 100", "1-3", "6-7", "11a" ]
2495
- const search = citation.replace(/Ps[\w\.]*\s*/g, '').split(/\s*([\[\]\(\),:\s])\s*/),
2496
- // whole = 'Psalm 100', psalm = 'Psalm', number = '100'
2497
- // [whole, psalm, number] = search[0].match(/(Ps[^\s]*)\s(\d+)/),
2498
- // verseRanges = [ "1-3", "6-7", "11a" ]
2499
- verseRanges = search.slice(1);
2500
- let verses = new Array();
2501
- let startBracket = false;
2502
- let endBracket = false;
2503
- (verseRanges || []).forEach((range, rangeIndex) => {
2504
- if (range === '[' || range === '(') {
2505
- startBracket = true;
2506
- }
2507
- if (verseRanges[rangeIndex + 1] === ']' || verseRanges[rangeIndex + 1] === ')') {
2508
- endBracket = true;
2509
- }
2510
- const [first, last] = range.replace(/[^\d-s–]/g, '').split(/-|–/);
2511
- if (first && last) {
2512
- const hasEndBracket = endBracket;
2513
- for (let ii = parseInt(first); ii <= parseInt(last); ii++) {
2514
- endBracket = hasEndBracket && ii == parseInt(last);
2515
- verses.push(makeVerseNumber(startBracket, endBracket, ii.toString()));
2516
- startBracket = false;
2517
- }
2518
- }
2519
- else {
2520
- if (first) {
2521
- verses.push(makeVerseNumber(startBracket, endBracket, first));
2522
- startBracket = false;
2523
- }
2524
- endBracket = false;
2525
- }
2526
- });
2527
- return verses;
2528
- }
2529
- /** Whether the antiphon should be included */
2530
- includeAntiphon() {
2531
- const metadata = this.metadata || {};
2532
- return (!!metadata.antiphon && !metadata.omit_antiphon // must have an antiphon
2533
- ); //&& // if we're supposed to omit it, omit it
2534
- //!(this.style == 'canticle' && !metadata.omit_gloria);
2535
- }
2536
- /** Whether the antiphon should be repeated after a section of the given index */
2537
- repeatAntiphon(setIndex, filteredValueLength = 0) {
2538
- const metadata = this.metadata || {};
2539
- if (filteredValueLength == 0) {
2540
- filteredValueLength = this.filteredVerses().length;
2541
- }
2542
- return (this.includeAntiphon() && // only if there's an antiphon
2543
- !((metadata.omit_gloria && setIndex == filteredValueLength - 1) // antiphon will repeat after Gloria, so don't include it here as well
2544
- )); // if there's no Gloria, and this is the final set
2545
- }
2546
- /** Returns the list of all possible `style` values. */
2547
- availableStyles() {
2548
- return STYLES$3;
2549
- }
2550
- /** Returns the list ofall possible `display_format` values. */
2551
- availableDisplayFormats() {
2552
- return ['default', 'omit', 'unison', 'wholeverse', 'halfverse'];
2553
- }
2554
- }
2555
- /** Section breaks can be used to introduce a heading, or to indicate a place for an antiphon to be inserted */
2556
- class PsalmSection {
2557
- }
2558
- /** PsalmVerse is a single verse or line
2559
- * @example
2560
- * // 1 The Lord is my shepherd; *
2561
- * // I shall not be in want.
2562
- * { number: "1", verse: "The Lord is my shepherd; *", halfverse: "I shall not be in want."}
2563
- * */
2564
- class PsalmVerse {
2565
- //** Constructor takes a Javascript object containing the class's properties */
2566
- constructor(data = {}) {
2567
- Object.assign(this, data);
2568
- }
2569
- }
2570
-
2571
- const STYLES$2 = ['normal', 'antiphon', 'gloria'];
2572
- /** Refrain represents a short text like the Gloria Patri, Hail Mary, or an Antiphon */
2573
- class Refrain extends LiturgicalDocument {
2574
- //** Constructor takes a Javascript object containing the class's properties */
2575
- constructor(data = {}) {
2576
- super(data);
2577
- }
2578
- /** Returns the list of all possible `style` values. Child classes should override if they have styles available. */
2579
- availableStyles() {
2580
- return STYLES$2;
2581
- }
2582
- availableDisplayFormats() {
2583
- return [];
2584
- }
2585
- }
2586
-
2587
- const STYLES$1 = ['preces', 'litany', 'responsive'];
2588
- /** Text represents collect or any other short prayer. */
2589
- class ResponsivePrayer extends LiturgicalDocument {
2590
- //** Constructor takes a Javascript object containing the class's properties */
2591
- constructor(data = {}) {
2592
- super(data);
2593
- }
2594
- /** Returns the list of all possible `style` values. */
2595
- availableStyles() {
2596
- return STYLES$1;
2597
- }
2598
- availableDisplayFormats() {
2599
- return [];
2600
- }
2601
- }
2602
- /** One line of a responsive prayer
2603
- * @example
2604
- * { label: '℣', text: 'Lord, open my lips.' }
2605
- * @example
2606
- * { label: 'line', text: 'That this evening may be holy, good, and peaceful.' }
2607
- */
2608
- class ResponsivePrayerLine {
2609
- }
2610
-
2611
- /** Rubric represents liturgical instructions. */
2612
- class Rubric extends LiturgicalDocument {
2613
- //** Constructor takes a Javascript object containing the class's properties */
2614
- constructor(data = {}) {
2615
- super(data);
2616
- }
2617
- availableDisplayFormats() {
2618
- return [];
2619
- }
2620
- }
2621
-
2622
- class Sharing {
2623
- //** Constructor takes a Javascript object containing the class's properties */
2624
- constructor(data = {}) {
2625
- Object.assign(this, data);
2626
- }
2627
- }
2628
-
2629
- const STYLES = ['text', 'prayer', 'markdown', 'authorized-prayers'];
2630
- /** Text represents collect or any other short prayer. */
2631
- class Text extends LiturgicalDocument {
2632
- //** Constructor takes a Javascript object containing the class's properties */
2633
- constructor(data = {}) {
2634
- super(data);
2635
- }
2636
- /** Returns the list of all possible `style` values. */
2637
- availableStyles() {
2638
- return STYLES;
2639
- }
2640
- }
2641
-
2642
- class DisplaySettings {
2643
- constructor(dropcaps = 'plain', response = 'bold', repeatAntiphon = 'bracket', fontscale = 'm', font = 'garamond', voiceChoice = '', voiceRate = 0.85, voiceBackground = 'silence', voiceBackgroundVolume = 0.5, psalmVerses = false, bibleVerses = false, meditationBell = 'singing-bowl', darkmode = 'auto', bolded = 'both', psalmPause = 1000) {
2644
- this.dropcaps = dropcaps;
2645
- this.response = response;
2646
- this.repeatAntiphon = repeatAntiphon;
2647
- this.fontscale = fontscale;
2648
- this.font = font;
2649
- this.voiceChoice = voiceChoice;
2650
- this.voiceRate = voiceRate;
2651
- this.voiceBackground = voiceBackground;
2652
- this.voiceBackgroundVolume = voiceBackgroundVolume;
2653
- this.psalmVerses = psalmVerses;
2654
- this.bibleVerses = bibleVerses;
2655
- this.meditationBell = meditationBell;
2656
- this.darkmode = darkmode;
2657
- this.bolded = bolded;
2658
- this.psalmPause = psalmPause;
2659
- }
2660
- }
2661
-
2662
- class Cursor {
2663
- constructor(path, start, end, element) {
2664
- this.path = path;
2665
- this.start = start;
2666
- this.end = end;
2667
- this.element = element;
2668
- }
2669
- }
2670
-
2671
- class Operation {
2672
- }
2673
- class Change {
2674
- //** Constructor takes a Javascript object containing the class's properties */
2675
- constructor(data = {}) {
2676
- Object.assign(this, data);
2677
- }
2678
- fullyPathedOp() {
2679
- const p = this.path
2680
- ? this.path.split('/').filter((part) => (Number(part) ? Number(part) : part))
2681
- : new Array();
2682
- return this.op.map((op) => (Object.assign(Object.assign({}, op), { p })));
2683
- }
2684
- }
2685
-
2686
- class ChangeMessage {
2687
- }
2688
-
2689
- class CursorMessage {
2690
- }
2691
-
2692
- function categoriesToPreferenceTree(categories, preferences) {
2693
- return categories.reduce((obj, category) => (Object.assign(Object.assign({}, obj), { [category]: Object.entries(preferences)
2694
- .map(([key, pref]) => new Preference(Object.assign(Object.assign({}, pref), { key })))
2695
- .filter((pref) => pref.category == category || (!pref.category && category == 'Preferences'))
2696
- .sort((a, b) => (a.index && b.index ? (a.index < b.index ? -1 : 1) : a.label < b.label ? -1 : 1)) })), {});
2697
- }
2698
-
2699
- /* Converts a list of documents into a single document including all the documents in serial */
2700
- function docsToLiturgy(docs) {
2701
- const uniqueLabels = docs
2702
- .map((o) => o === null || o === void 0 ? void 0 : o.label)
2703
- .reduce((uniques, item) => (uniques.includes(item) ? uniques : [...uniques, item]), []).length;
2704
- return (docs === null || docs === void 0 ? void 0 : docs.length) > 1
2705
- ? // if multiple LiturgicalDocuments given, return a Liturgy made up of them
2706
- new Liturgy({
2707
- type: 'liturgy',
2708
- value: docs,
2709
- label: docs[0] ? docs[0].label : undefined,
2710
- })
2711
- : // if only one LiturgicalDocument given, return that document
2712
- docs[0];
2713
- }
2714
-
2715
- /* Converts a list of documents into a single document showing options in parallel */
2716
- function docsToOption(d, versions = undefined) {
2717
- if (Array.isArray(d)) {
2718
- // remove duplicates if literally same JSON
2719
- const docs = Array.from(new Set(d.map((doc) => JSON.stringify(doc)))).map((doc) => new LiturgicalDocument(JSON.parse(doc)));
2720
- // sort by preferred version
2721
- let sorted;
2722
- if (versions !== undefined && versions.length > 0) {
2723
- sorted = docs.sort((a, b) => versions.indexOf(versionToString(a.version)) - versions.indexOf(versionToString(b.version)));
2724
- }
2725
- else {
2726
- sorted = docs;
2727
- }
2728
- return (sorted === null || sorted === void 0 ? void 0 : sorted.length) > 1
2729
- ? // if multiple LiturgicalDocuments given, return an Option made up of them
2730
- new Option({
2731
- type: 'option',
2732
- metadata: { selected: 0 },
2733
- value: sorted,
2734
- })
2735
- : // if only one LiturgicalDocument given, return that document
2736
- sorted[0];
2737
- }
2738
- else {
2739
- return d;
2740
- }
2741
- }
2742
-
2743
- const FAKE_SEASONS = ['Saints', 'Mary'];
2744
- /** Given a set of all possible collects and a `LiturgicalDay`, returns a `LiturgicalDocument` of the correct collect or sequence of collects */
2745
- function findCollect(collects, day, sundayFirst = true, emberDayPrecedesSunday = false, allSaintsSuppressesCollectOfTheDayUnlessSunday = false, allSaintsOctaveSuppressesCollectOfTheDayUnlessSunday = false, allowMultiple = true, sundayRedLetterDaysAlsoIncludeSundayCollect = false) {
2746
- var _a, _b, _c;
2747
- const date = dateFromYMDString(day.date), observedDay = day.collect || day.propers || day.slug, isAllSaintsOctave = date.getMonth() === 10 && date.getDate() === 8, isInOctaveOfAllSaints = date.getMonth() === 10 && date.getDate() >= 1 && date.getDate() <= 8, suppressSundayCollect = (allSaintsSuppressesCollectOfTheDayUnlessSunday && isInOctaveOfAllSaints && date.getDay() !== 0) ||
2748
- (allSaintsOctaveSuppressesCollectOfTheDayUnlessSunday && isAllSaintsOctave && date.getDay() !== 0), redLetterCollects = collects.filter((collect) => collect.slug === observedDay), redLetterCollect = redLetterCollects.length > 0 ? docsToOption(redLetterCollects) : null, sundaySlug = ((_a = day.week) === null || _a === void 0 ? void 0 : _a.propers) || ((_b = day.week) === null || _b === void 0 ? void 0 : _b.slug), sundayCollects = collects.filter((collect) => collect.slug === sundaySlug), sundayCollect = !suppressSundayCollect && sundayCollects.length > 0 ? docsToOption(sundayCollects) : null, season = !FAKE_SEASONS.includes(day.season) ? day.season : ((_c = day.week) === null || _c === void 0 ? void 0 : _c.season) || day.season, seasonalCollects = collects.filter((collect) => collect.slug === season), octaveCollect = day.octave ? docsToOption(collects.filter((collect) => collect.slug === day.octave)) : null, blackLetterDays = (day.holy_days || []).filter((feast) => feast.type && feast.type.rank < 3), blackLetterCollects = blackLetterDays.map((holyday) => docsToOption((holyday.category || [])
2749
- .map((category) => collects
2750
- .filter((collect) => collect.slug === category)
2751
- .map((collect) => (collect.type === 'text' ? processCollectText(collect, holyday) : collect)))
2752
- .concat(collects.filter((collect) => { var _a; return collect.slug === holyday.slug && !((_a = holyday.category) === null || _a === void 0 ? void 0 : _a.includes(holyday.slug)); }))
2753
- .flat())), redLetterOrSunday = redLetterCollect || sundayCollect,
2754
- // don't include the seasonal collect if it's the same as the Sunday, i.e., on the First Sunday of Advent
2755
- observedSeasonalCollect = seasonalCollects
2756
- ? docsToLiturgy(seasonalCollects.filter((collect) => {
2757
- const collectValue = JSON.stringify(collect.value);
2758
- return (collectValue !== JSON.stringify(redLetterOrSunday === null || redLetterOrSunday === void 0 ? void 0 : redLetterOrSunday.value) &&
2759
- blackLetterCollects
2760
- .filter((blCollect) => Boolean(blCollect))
2761
- .map((blCollect) => JSON.stringify(blCollect.value))
2762
- .reduce((prev, curr) => prev && curr !== collectValue, true));
2763
- }))
2764
- : null,
2765
- // don't include the octave collect if it's the same as the collect of the day
2766
- observedOctaveCollect = octaveCollect && JSON.stringify(octaveCollect.value) !== JSON.stringify(redLetterOrSunday === null || redLetterOrSunday === void 0 ? void 0 : redLetterOrSunday.value)
2767
- ? octaveCollect
2768
- : null;
2769
- if (redLetterOrSunday || blackLetterCollects.length > 0) {
2770
- if (sundayFirst || date.getDay() === 0) {
2771
- const collects = [
2772
- redLetterCollect || sundayCollect,
2773
- redLetterCollect &&
2774
- sundayRedLetterDaysAlsoIncludeSundayCollect &&
2775
- JSON.stringify(redLetterCollect.value) !== JSON.stringify(sundayCollect === null || sundayCollect === void 0 ? void 0 : sundayCollect.value) &&
2776
- (date.getDay() === 0 || (date.getDay() == 6 && day.evening))
2777
- ? new LiturgicalDocument(Object.assign(Object.assign({}, sundayCollect), { label: day.week.name }))
2778
- : undefined,
2779
- ...blackLetterCollects,
2780
- observedOctaveCollect,
2781
- observedSeasonalCollect,
2782
- ].filter((collect) => !!collect);
2783
- return docsToLiturgy(filterMultiple(day, collects, allowMultiple));
2784
- }
2785
- else {
2786
- const collects = [
2787
- // Ember Day seasonal collects precede Sunday collects, others follow (Canada)
2788
- emberDayPrecedesSunday && (day.season || '').includes('Ember') ? observedSeasonalCollect : null,
2789
- redLetterCollect,
2790
- ...blackLetterCollects,
2791
- redLetterCollect ? undefined : sundayCollect,
2792
- observedOctaveCollect,
2793
- !emberDayPrecedesSunday || !(day.season || '').includes('Ember') ? observedSeasonalCollect : null,
2794
- ].filter((collect) => !!collect);
2795
- return docsToLiturgy(filterMultiple(day, collects, allowMultiple));
2796
- }
2797
- }
2798
- else {
2799
- console.warn('(LDF findCollect) Could not find a collect for ', day, 'from the available collects', collects);
2800
- return null;
2801
- }
2802
- }
2803
- function filterMultiple(day, collects, allowMultiple) {
2804
- if (allowMultiple) {
2805
- return collects;
2806
- }
2807
- else {
2808
- return [
2809
- collects.find((c) => { var _a; return c.slug === ((_a = day.holy_day_observed) === null || _a === void 0 ? void 0 : _a.slug); }) ||
2810
- (day.slug !== day.week.slug && collects.find((c) => { var _a; return c.slug === ((_a = (day.holy_days || [])[0]) === null || _a === void 0 ? void 0 : _a.slug); })) ||
2811
- collects[0],
2812
- ];
2813
- }
2814
- }
2815
- function processCollectText(collect, day) {
2816
- const saintName = (day.name || '').split(/[,;]/)[0], oldValue = collect.value || new Array(), value = oldValue.map((piece) => piece.replace(/N\./g, saintName).replace(/[\[\]]/g, ''));
2817
- return new Text(Object.assign(Object.assign({}, collect), { value }));
2818
- }
2819
-
2820
- function preferencesToCategories(preferences) {
2821
- return Object.values(preferences)
2822
- .map((pref) => pref.category || 'Preferences')
2823
- .reduce((uniques, item) => (uniques.includes(item) ? uniques : [...uniques, item]), []);
2824
- }
2825
-
2826
- function sortPsalms(a, b) {
2827
- var _a, _b;
2828
- function firstVerse(psalm) {
2829
- const firstSection = psalm.value[0] || new PsalmSection(), firstVerse = firstSection.value[0], firstNumber = firstVerse === null || firstVerse === void 0 ? void 0 : firstVerse.number;
2830
- return Number(firstNumber) || 0;
2831
- }
2832
- let result;
2833
- try {
2834
- const sortByNum = Number((_a = a === null || a === void 0 ? void 0 : a.metadata) === null || _a === void 0 ? void 0 : _a.number) - Number((_b = b === null || b === void 0 ? void 0 : b.metadata) === null || _b === void 0 ? void 0 : _b.number);
2835
- let sortByVerse = undefined;
2836
- // if psalms are same number, sort by
2837
- if (sortByNum === 0) {
2838
- const firstVerseOfA = firstVerse(a), firstVerseOfB = firstVerse(b);
2839
- sortByVerse = firstVerseOfA - firstVerseOfB;
2840
- }
2841
- result = sortByVerse || sortByNum;
2842
- }
2843
- catch (e) {
2844
- console.warn('sortPsalms was unable to determine which of these two psalms should be placed first: ', a, b);
2845
- console.warn(e);
2846
- result = 0;
2847
- }
2848
- return result;
2849
- }
2850
-
2851
- /** Transforms a generic `LiturgicalDocument` (either a class instance or an `Object` that matches the type),
2852
- * into an instance of a more-specific inherited class */
2853
- function specificClass(obj) {
2854
- switch (obj.type) {
2855
- case 'liturgy':
2856
- return new Liturgy(obj);
2857
- case 'heading':
2858
- return new Heading(obj);
2859
- case 'option':
2860
- return new Option(obj);
2861
- case 'refrain':
2862
- return new Refrain(obj);
2863
- case 'rubric':
2864
- return new Rubric(obj);
2865
- case 'text':
2866
- return new Text(obj);
2867
- case 'responsive':
2868
- return new ResponsivePrayer(obj);
2869
- case 'bible-reading':
2870
- return new BibleReading(obj);
2871
- case 'psalm':
2872
- return new Psalm(obj);
2873
- case 'meditation':
2874
- return new Meditation(obj);
2875
- default:
2876
- return obj;
2877
- }
2878
- }
2879
-
2880
- function unwrapOptions(doc) {
2881
- var _a, _b, _c, _d, _e, _f;
2882
- switch (doc === null || doc === void 0 ? void 0 : doc.type) {
2883
- case 'option':
2884
- const filtered = (doc.value || []).filter((entry) => Boolean(entry) && (Boolean(entry.value) || Boolean((entry === null || entry === void 0 ? void 0 : entry.type) === 'bible-reading' && entry.citation)));
2885
- return unwrapOptions(new LiturgicalDocument(filtered[(_b = (_a = doc.metadata) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : 0]));
2886
- case 'liturgy':
2887
- return new Liturgy(Object.assign(Object.assign({}, doc), { value: (doc.value || []).map((subDoc) => unwrapOptions(subDoc)) }));
2888
- case 'psalm':
2889
- if ((_d = (_c = doc === null || doc === void 0 ? void 0 : doc.metadata) === null || _c === void 0 ? void 0 : _c.gloria) === null || _d === void 0 ? void 0 : _d.type) {
2890
- doc.metadata.gloria = unwrapOptions(doc.metadata.gloria);
2891
- }
2892
- if ((_f = (_e = doc === null || doc === void 0 ? void 0 : doc.metadata) === null || _e === void 0 ? void 0 : _e.antiphon) === null || _f === void 0 ? void 0 : _f.type) {
2893
- doc.metadata.antiphon = unwrapOptions(doc.metadata.antiphon);
2894
- }
2895
- return doc;
2896
- default:
2897
- return doc;
2898
- }
2899
- }
2900
-
2901
- export { BibleReading as B, Change as C, Heading as H, Image as I, Liturgy as L, Meditation as M, Option as O, Psalm as P, Refrain as R, SEASONS as S, Text as T, WEEKDAYS as W, ResponsivePrayer as a, LiturgicalDocument as b, Rubric as c, Condition as d, docsToOption as e, categoriesToPreferenceTree as f, Preference as g, Cursor as h, PreferenceOption as i, Responsive as j, dateFromYMDString as k, LiturgicalDay as l, Citation as m, preferencesToCategories as p, specificClass as s, versionToString as v };