@flarehr/apollo-super-selection 1.3.23196 → 1.3.23524

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 (283) hide show
  1. package/package.json +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.css +0 -1
  3. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +0 -1
  4. package/dist/lib/apollo-super-selection/apollo-super-selection.js +0 -130
  5. package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +0 -3
  6. package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +0 -3
  7. package/dist/lib/apollo-super-selection/index.esm.js +0 -0
  8. package/dist/lib/apollo-super-selection/p-0b86097e.entry.js +0 -14
  9. package/dist/lib/apollo-super-selection/p-14885f78.system.js +0 -15
  10. package/dist/lib/apollo-super-selection/p-15f0e5eb.system.js +0 -1
  11. package/dist/lib/apollo-super-selection/p-22939048.system.entry.js +0 -1
  12. package/dist/lib/apollo-super-selection/p-24d6e2b8.js +0 -1
  13. package/dist/lib/apollo-super-selection/p-29c11183.js +0 -15
  14. package/dist/lib/apollo-super-selection/p-2b42304a.system.entry.js +0 -1
  15. package/dist/lib/apollo-super-selection/p-33eca162.entry.js +0 -1
  16. package/dist/lib/apollo-super-selection/p-4e871154.entry.js +0 -1
  17. package/dist/lib/apollo-super-selection/p-50ea2036.system.js +0 -1
  18. package/dist/lib/apollo-super-selection/p-53b231f0.system.entry.js +0 -1
  19. package/dist/lib/apollo-super-selection/p-5c73c587.entry.js +0 -1
  20. package/dist/lib/apollo-super-selection/p-5e49c211.system.entry.js +0 -69
  21. package/dist/lib/apollo-super-selection/p-69bbf1dd.entry.js +0 -1
  22. package/dist/lib/apollo-super-selection/p-71ca4cf8.system.js +0 -1
  23. package/dist/lib/apollo-super-selection/p-86e3e03f.js +0 -1
  24. package/dist/lib/apollo-super-selection/p-97188c78.system.js +0 -1
  25. package/dist/lib/apollo-super-selection/p-9d2a7c0e.entry.js +0 -1
  26. package/dist/lib/apollo-super-selection/p-a0063575.system.entry.js +0 -1
  27. package/dist/lib/apollo-super-selection/p-b00f648b.entry.js +0 -1
  28. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +0 -1
  29. package/dist/lib/apollo-super-selection/p-c775c0e4.system.entry.js +0 -1
  30. package/dist/lib/apollo-super-selection/p-cd3ed541.system.js +0 -1
  31. package/dist/lib/apollo-super-selection/p-db0bded8.js +0 -1
  32. package/dist/lib/apollo-super-selection/p-e957b393.system.entry.js +0 -1
  33. package/dist/lib/apollo-super-selection/p-fdadb647.js +0 -1
  34. package/dist/lib/cjs/active-router-1f555f75.js +0 -75
  35. package/dist/lib/cjs/apollo-super-selection.cjs.js +0 -22
  36. package/dist/lib/cjs/app-globals-b1125d8c.js +0 -25
  37. package/dist/lib/cjs/context-consumer.cjs.entry.js +0 -29
  38. package/dist/lib/cjs/custom-fund-choice.api-293c1ace.js +0 -3209
  39. package/dist/lib/cjs/datorama-akita-6c9cb8fb.js +0 -3641
  40. package/dist/lib/cjs/index-eb4f212f.js +0 -1766
  41. package/dist/lib/cjs/index.cjs.js +0 -2
  42. package/dist/lib/cjs/loader.cjs.js +0 -24
  43. package/dist/lib/cjs/sss-button_32.cjs.entry.js +0 -14934
  44. package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +0 -111
  45. package/dist/lib/cjs/stencil-async-content.cjs.entry.js +0 -32
  46. package/dist/lib/cjs/stencil-route-title.cjs.entry.js +0 -32
  47. package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +0 -59
  48. package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +0 -32
  49. package/dist/lib/collection/apollo-super-selection.css +0 -1
  50. package/dist/lib/collection/collection-manifest.json +0 -98
  51. package/dist/lib/collection/components/app-host/loading-page.js +0 -9
  52. package/dist/lib/collection/components/app-host/services/app-configuration.query.js +0 -18
  53. package/dist/lib/collection/components/app-host/services/app-configuration.service.js +0 -25
  54. package/dist/lib/collection/components/app-host/services/app-parameters.query.js +0 -13
  55. package/dist/lib/collection/components/app-host/services/app-parameters.service.js +0 -14
  56. package/dist/lib/collection/components/app-host/services/appinsights.service.js +0 -46
  57. package/dist/lib/collection/components/app-host/services/authentication.query.js +0 -21
  58. package/dist/lib/collection/components/app-host/services/authentication.service.js +0 -50
  59. package/dist/lib/collection/components/app-host/services/interop/host-interop.service.js +0 -31
  60. package/dist/lib/collection/components/app-host/services/interop/iframe-interop.service.js +0 -30
  61. package/dist/lib/collection/components/app-host/services/interop/react-native-interop.service.js +0 -20
  62. package/dist/lib/collection/components/app-host/services/interop.query.js +0 -26
  63. package/dist/lib/collection/components/app-host/services/session.store.js +0 -38
  64. package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -24
  65. package/dist/lib/collection/components/app-host/super-selection-app-host.js +0 -87
  66. package/dist/lib/collection/components/external-loading-page/external-loading-page.js +0 -29
  67. package/dist/lib/collection/components/super-byof/super-byof-types.js +0 -1
  68. package/dist/lib/collection/components/super-byof/super-byof.form.js +0 -1
  69. package/dist/lib/collection/components/super-byof/super-byof.js +0 -139
  70. package/dist/lib/collection/components/super-campaign/fund-tile-clicked.handler.js +0 -49
  71. package/dist/lib/collection/components/super-campaign/promoted-fund-joined.handler.js +0 -121
  72. package/dist/lib/collection/components/super-campaign/super-campaign-types.js +0 -6
  73. package/dist/lib/collection/components/super-campaign/super-campaign.js +0 -210
  74. package/dist/lib/collection/components/super-selection-app/api/api-client.js +0 -14
  75. package/dist/lib/collection/components/super-selection-app/api/event-tracking.api.js +0 -9
  76. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors-api.js +0 -9
  77. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors.api.dtos.js +0 -1
  78. package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +0 -16
  79. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +0 -179
  80. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +0 -69
  81. package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +0 -36
  82. package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +0 -3
  83. package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +0 -3
  84. package/dist/lib/collection/components/super-selection-app/choice/choice-router.js +0 -42
  85. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +0 -163
  86. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +0 -39
  87. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.js +0 -1
  88. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.js +0 -50
  89. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +0 -109
  90. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +0 -36
  91. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +0 -114
  92. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js +0 -113
  93. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.js +0 -1
  94. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/member-name-input.js +0 -162
  95. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.js +0 -1
  96. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +0 -115
  97. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.js +0 -11
  98. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/bankBsbNumbers.js +0 -111
  99. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/smsf-engagement-step-host.js +0 -161
  100. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/smsf-engagement-step-types.js +0 -1
  101. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.js +0 -1
  102. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.js +0 -31
  103. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.js +0 -1
  104. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate-choice.api.js +0 -13
  105. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +0 -4
  106. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +0 -37
  107. package/dist/lib/collection/components/super-selection-app/misc/button.js +0 -195
  108. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +0 -7
  109. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +0 -390
  110. package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +0 -52
  111. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +0 -22
  112. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +0 -42
  113. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +0 -66
  114. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +0 -121
  115. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +0 -145
  116. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +0 -223
  117. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +0 -398
  118. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +0 -288
  119. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +0 -37
  120. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +0 -81
  121. package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +0 -15
  122. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +0 -117
  123. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +0 -134
  124. package/dist/lib/collection/components/super-selection-app/services/misc.service.js +0 -7
  125. package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +0 -31
  126. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +0 -38
  127. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +0 -171
  128. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +0 -45
  129. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +0 -155
  130. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +0 -11
  131. package/dist/lib/collection/components/super-selection-app/super-selection-app.css +0 -27
  132. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +0 -291
  133. package/dist/lib/collection/components/super-smsf/super-smsf-types.js +0 -1
  134. package/dist/lib/collection/components/super-smsf/super-smsf.form.js +0 -1
  135. package/dist/lib/collection/components/super-smsf/super-smsf.js +0 -166
  136. package/dist/lib/collection/global/init-host.js +0 -25
  137. package/dist/lib/collection/global/main.dev.js +0 -29
  138. package/dist/lib/collection/global/main.js +0 -11
  139. package/dist/lib/collection/global/stencil-router-workaround.js +0 -12
  140. package/dist/lib/collection/index.js +0 -2
  141. package/dist/lib/collection/utils/config.js +0 -2
  142. package/dist/lib/collection/utils/gtm.js +0 -5
  143. package/dist/lib/collection/utils/iframe.js +0 -33
  144. package/dist/lib/collection/utils/index.js +0 -11
  145. package/dist/lib/collection/utils/lazy.js +0 -29
  146. package/dist/lib/collection/utils/storage.js +0 -5
  147. package/dist/lib/esm/active-router-d18b36fb.js +0 -73
  148. package/dist/lib/esm/apollo-super-selection.js +0 -20
  149. package/dist/lib/esm/app-globals-c1f89805.js +0 -23
  150. package/dist/lib/esm/context-consumer.entry.js +0 -25
  151. package/dist/lib/esm/custom-fund-choice.api-42801d64.js +0 -3188
  152. package/dist/lib/esm/datorama-akita-127aea91.js +0 -3624
  153. package/dist/lib/esm/index-107d7c24.js +0 -1732
  154. package/dist/lib/esm/index.js +0 -1
  155. package/dist/lib/esm/loader.js +0 -20
  156. package/dist/lib/esm/polyfills/core-js.js +0 -11
  157. package/dist/lib/esm/polyfills/css-shim.js +0 -1
  158. package/dist/lib/esm/polyfills/dom.js +0 -79
  159. package/dist/lib/esm/polyfills/es5-html-element.js +0 -1
  160. package/dist/lib/esm/polyfills/index.js +0 -34
  161. package/dist/lib/esm/polyfills/system.js +0 -6
  162. package/dist/lib/esm/sss-button_32.entry.js +0 -14879
  163. package/dist/lib/esm/sss-super-byof-host.entry.js +0 -107
  164. package/dist/lib/esm/stencil-async-content.entry.js +0 -28
  165. package/dist/lib/esm/stencil-route-title.entry.js +0 -28
  166. package/dist/lib/esm/stencil-router-prompt.entry.js +0 -55
  167. package/dist/lib/esm/stencil-router-redirect.entry.js +0 -28
  168. package/dist/lib/esm-es5/active-router-d18b36fb.js +0 -1
  169. package/dist/lib/esm-es5/apollo-super-selection.js +0 -1
  170. package/dist/lib/esm-es5/app-globals-c1f89805.js +0 -1
  171. package/dist/lib/esm-es5/context-consumer.entry.js +0 -1
  172. package/dist/lib/esm-es5/custom-fund-choice.api-42801d64.js +0 -1
  173. package/dist/lib/esm-es5/datorama-akita-127aea91.js +0 -15
  174. package/dist/lib/esm-es5/index-107d7c24.js +0 -1
  175. package/dist/lib/esm-es5/index.js +0 -0
  176. package/dist/lib/esm-es5/loader.js +0 -1
  177. package/dist/lib/esm-es5/sss-button_32.entry.js +0 -69
  178. package/dist/lib/esm-es5/sss-super-byof-host.entry.js +0 -1
  179. package/dist/lib/esm-es5/stencil-async-content.entry.js +0 -1
  180. package/dist/lib/esm-es5/stencil-route-title.entry.js +0 -1
  181. package/dist/lib/esm-es5/stencil-router-prompt.entry.js +0 -1
  182. package/dist/lib/esm-es5/stencil-router-redirect.entry.js +0 -1
  183. package/dist/lib/index.cjs.js +0 -1
  184. package/dist/lib/index.js +0 -1
  185. package/dist/lib/loader/cdn.js +0 -3
  186. package/dist/lib/loader/index.cjs.js +0 -3
  187. package/dist/lib/loader/index.d.ts +0 -13
  188. package/dist/lib/loader/index.es2017.js +0 -3
  189. package/dist/lib/loader/index.js +0 -4
  190. package/dist/lib/loader/package.json +0 -10
  191. package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +0 -3
  192. package/dist/lib/types/components/app-host/loading-page.d.ts +0 -3
  193. package/dist/lib/types/components/app-host/services/app-configuration.query.d.ts +0 -11
  194. package/dist/lib/types/components/app-host/services/app-configuration.service.d.ts +0 -9
  195. package/dist/lib/types/components/app-host/services/app-parameters.query.d.ts +0 -10
  196. package/dist/lib/types/components/app-host/services/app-parameters.service.d.ts +0 -6
  197. package/dist/lib/types/components/app-host/services/appinsights.service.d.ts +0 -15
  198. package/dist/lib/types/components/app-host/services/authentication.query.d.ts +0 -13
  199. package/dist/lib/types/components/app-host/services/authentication.service.d.ts +0 -9
  200. package/dist/lib/types/components/app-host/services/interop/host-interop.service.d.ts +0 -7
  201. package/dist/lib/types/components/app-host/services/interop/iframe-interop.service.d.ts +0 -5
  202. package/dist/lib/types/components/app-host/services/interop/react-native-interop.service.d.ts +0 -7
  203. package/dist/lib/types/components/app-host/services/interop.query.d.ts +0 -11
  204. package/dist/lib/types/components/app-host/services/session.store.d.ts +0 -31
  205. package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -15
  206. package/dist/lib/types/components/super-byof/super-byof-types.d.ts +0 -26
  207. package/dist/lib/types/components/super-byof/super-byof.d.ts +0 -19
  208. package/dist/lib/types/components/super-byof/super-byof.form.d.ts +0 -6
  209. package/dist/lib/types/components/super-campaign/fund-tile-clicked.handler.d.ts +0 -12
  210. package/dist/lib/types/components/super-campaign/promoted-fund-joined.handler.d.ts +0 -15
  211. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +0 -98
  212. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +0 -27
  213. package/dist/lib/types/components/super-selection-app/api/api-client.d.ts +0 -2
  214. package/dist/lib/types/components/super-selection-app/api/event-tracking.api.d.ts +0 -6
  215. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors-api.d.ts +0 -6
  216. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors.api.dtos.d.ts +0 -7
  217. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +0 -171
  218. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +0 -16
  219. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +0 -248
  220. package/dist/lib/types/components/super-selection-app/app-state-pages/success.d.ts +0 -7
  221. package/dist/lib/types/components/super-selection-app/choice/choice-router.d.ts +0 -6
  222. package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +0 -12
  223. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -5
  224. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.d.ts +0 -10
  225. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +0 -43
  226. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +0 -9
  227. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +0 -27
  228. package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -13
  229. package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.d.ts +0 -18
  230. package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.d.ts +0 -26
  231. package/dist/lib/types/components/super-selection-app/funds/custom-fund/member-name-input.d.ts +0 -14
  232. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +0 -15
  233. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +0 -20
  234. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.d.ts +0 -1
  235. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/bankBsbNumbers.d.ts +0 -112
  236. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/smsf-engagement-step-host.d.ts +0 -28
  237. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/smsf-engagement-step-types.d.ts +0 -15
  238. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.d.ts +0 -8
  239. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +0 -23
  240. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.d.ts +0 -6
  241. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.d.ts +0 -9
  242. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +0 -4
  243. package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +0 -3
  244. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +0 -14
  245. package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +0 -52
  246. package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +0 -5
  247. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +0 -9
  248. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +0 -5
  249. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +0 -5
  250. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +0 -18
  251. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +0 -28
  252. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +0 -30
  253. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +0 -52
  254. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +0 -95
  255. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +0 -4
  256. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +0 -14
  257. package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +0 -8
  258. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +0 -25
  259. package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +0 -75
  260. package/dist/lib/types/components/super-selection-app/services/misc.service.d.ts +0 -6
  261. package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +0 -17
  262. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +0 -19
  263. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +0 -43
  264. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +0 -37
  265. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +0 -16
  266. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +0 -42
  267. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -27
  268. package/dist/lib/types/components/super-smsf/super-smsf-types.d.ts +0 -34
  269. package/dist/lib/types/components/super-smsf/super-smsf.d.ts +0 -20
  270. package/dist/lib/types/components/super-smsf/super-smsf.form.d.ts +0 -15
  271. package/dist/lib/types/components.d.ts +0 -522
  272. package/dist/lib/types/global/init-host.d.ts +0 -1
  273. package/dist/lib/types/global/main.d.ts +0 -1
  274. package/dist/lib/types/global/main.dev.d.ts +0 -1
  275. package/dist/lib/types/global/stencil-router-workaround.d.ts +0 -1
  276. package/dist/lib/types/index.d.ts +0 -2
  277. package/dist/lib/types/stencil-public-runtime.d.ts +0 -1555
  278. package/dist/lib/types/utils/config.d.ts +0 -2
  279. package/dist/lib/types/utils/gtm.d.ts +0 -7
  280. package/dist/lib/types/utils/iframe.d.ts +0 -13
  281. package/dist/lib/types/utils/index.d.ts +0 -4
  282. package/dist/lib/types/utils/lazy.d.ts +0 -12
  283. package/dist/lib/types/utils/storage.d.ts +0 -4
@@ -1,107 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-107d7c24.js';
2
- import { E as EventTrackingService, a as superSelectionAppService, O as Option, l as state, b as navigationService, S as SuperSelectionAppRoutes, e as customFundChoiceApi, c as injectHistory } from './custom-fund-choice.api-42801d64.js';
3
- import './active-router-d18b36fb.js';
4
-
5
- const LoadWaitingTimeout = 30000;
6
-
7
- var SuperByofComponentStatus;
8
- (function (SuperByofComponentStatus) {
9
- SuperByofComponentStatus[SuperByofComponentStatus["NotLoaded"] = 1] = "NotLoaded";
10
- SuperByofComponentStatus[SuperByofComponentStatus["Loaded"] = 2] = "Loaded";
11
- })(SuperByofComponentStatus || (SuperByofComponentStatus = {}));
12
- let superByofComponentStatus = SuperByofComponentStatus.NotLoaded;
13
- const SuperByofHost = class {
14
- constructor(hostRef) {
15
- registerInstance(this, hostRef);
16
- this.eventTrackingService = EventTrackingService.Instance;
17
- this.subscribeToSuperByofEvents = () => {
18
- for (const eventName in this.byofEventHandlers) {
19
- document.addEventListener(eventName, this.byofEventHandlers[eventName]);
20
- }
21
- };
22
- this.unSubscribeFromSuperByofEvents = () => {
23
- for (const eventName in this.byofEventHandlers) {
24
- document.removeEventListener(eventName, this.byofEventHandlers[eventName]);
25
- }
26
- };
27
- this.byofLoaded = async (event) => {
28
- if (event.detail.sender === 'super-byof') {
29
- superByofComponentStatus = SuperByofComponentStatus.Loaded;
30
- clearTimeout(this.loadingTimeoutRef);
31
- this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({
32
- promotedFundsShown: superSelectionAppService.promotedFunds,
33
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
34
- });
35
- }
36
- return Promise.resolve();
37
- };
38
- this.byofCompleted = async (event) => {
39
- if (event.detail.sender === 'super-byof') {
40
- state.myOwnFundForm = {
41
- fundUsi: Option.fromNullable(event.detail.fundUsi),
42
- fundName: Option.fromNullable(event.detail.fundName),
43
- memberNumber: Option.fromNullable(event.detail.memberNumber),
44
- memberFirstName: Option.fromNullable(event.detail.memberFirstName),
45
- memberFamilyName: Option.fromNullable(event.detail.memberLastName)
46
- };
47
- if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
48
- superSelectionAppService.isUsingSuperCampaign) {
49
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFundEngagementStep);
50
- return;
51
- }
52
- navigationService.navigateInternallyToStandardChoice({
53
- history: this.history,
54
- fundName: event.detail.fundName,
55
- fundDetails: {
56
- type: 'myOwnFund',
57
- fundName: event.detail.fundName,
58
- fundUsi: event.detail.fundUsi,
59
- memberNumber: event.detail.memberNumber
60
- },
61
- handleSubmitFn: async (standardChoiceFormSignature) => {
62
- const customFundChoiceDto = Object.assign({ fundUsi: event.detail.fundUsi, memberNumber: event.detail.memberNumber, memberFirstName: event.detail.memberFirstName, memberFamilyName: event.detail.memberLastName, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
63
- await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
64
- }
65
- });
66
- }
67
- };
68
- this.byofCancelled = async (event) => {
69
- if (event.detail.sender === 'super-byof') {
70
- await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
71
- }
72
- };
73
- this.byofEventHandlers = {
74
- 'byof-loaded': this.byofLoaded.bind(this),
75
- 'byof-completed': this.byofCompleted.bind(this),
76
- 'byof-cancelled': this.byofCancelled.bind(this)
77
- };
78
- }
79
- async componentWillLoad() {
80
- if (Option.isSome(superSelectionAppService.backendUrl) && Option.isSome(superSelectionAppService.state.jwt)) {
81
- this.backendUrl = superSelectionAppService.backendUrl.value;
82
- this.accessToken = superSelectionAppService.state.jwt.value;
83
- if (superByofComponentStatus === SuperByofComponentStatus.NotLoaded) {
84
- this.loadingTimeoutRef = setTimeout(this.byofLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
85
- }
86
- this.subscribeToSuperByofEvents();
87
- }
88
- else {
89
- throw Error(`SuperByofHost pre-requisites not met.`);
90
- }
91
- }
92
- disconnectedCallback() {
93
- clearTimeout(this.loadingTimeoutRef);
94
- this.unSubscribeFromSuperByofEvents();
95
- }
96
- render() {
97
- return (h(Host, null, h("sss-header-section", null), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("apollo-super-byof", { "backend-url": this.backendUrl, "access-token": this.accessToken })))));
98
- }
99
- async byofLoadingTimeoutTriggered() {
100
- if (superByofComponentStatus !== SuperByofComponentStatus.Loaded) {
101
- throw Error(`BYOF component failed to load.`);
102
- }
103
- }
104
- };
105
- injectHistory(SuperByofHost);
106
-
107
- export { SuperByofHost as sss_super_byof_host };
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, h } from './index-107d7c24.js';
2
-
3
- const AsyncContent = class {
4
- constructor(hostRef) {
5
- registerInstance(this, hostRef);
6
- this.content = '';
7
- }
8
- componentWillLoad() {
9
- if (this.documentLocation != null) {
10
- return this.fetchNewContent(this.documentLocation);
11
- }
12
- }
13
- fetchNewContent(newDocumentLocation) {
14
- return fetch(newDocumentLocation)
15
- .then(response => response.text())
16
- .then(data => {
17
- this.content = data;
18
- });
19
- }
20
- render() {
21
- return (h("div", { innerHTML: this.content }));
22
- }
23
- static get watchers() { return {
24
- "documentLocation": ["fetchNewContent"]
25
- }; }
26
- };
27
-
28
- export { AsyncContent as stencil_async_content };
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-107d7c24.js';
2
- import { A as ActiveRouter } from './active-router-d18b36fb.js';
3
-
4
- const RouteTitle = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.titleSuffix = '';
8
- this.pageTitle = '';
9
- }
10
- updateDocumentTitle() {
11
- const el = this.el;
12
- if (el.ownerDocument) {
13
- el.ownerDocument.title = `${this.pageTitle}${this.titleSuffix || ''}`;
14
- }
15
- }
16
- componentWillLoad() {
17
- this.updateDocumentTitle();
18
- }
19
- get el() { return getElement(this); }
20
- static get watchers() { return {
21
- "pageTitle": ["updateDocumentTitle"]
22
- }; }
23
- };
24
- ActiveRouter.injectProps(RouteTitle, [
25
- 'titleSuffix',
26
- ]);
27
-
28
- export { RouteTitle as stencil_route_title };
@@ -1,55 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-107d7c24.js';
2
- import { A as ActiveRouter } from './active-router-d18b36fb.js';
3
-
4
- const StencilRouterPrompt = class {
5
- constructor(hostRef) {
6
- registerInstance(this, hostRef);
7
- this.when = true;
8
- this.message = '';
9
- }
10
- enable(message) {
11
- if (this.unblock) {
12
- this.unblock();
13
- }
14
- if (this.history) {
15
- this.unblock = this.history.block(message);
16
- }
17
- }
18
- disable() {
19
- if (this.unblock) {
20
- this.unblock();
21
- this.unblock = undefined;
22
- }
23
- }
24
- componentWillLoad() {
25
- if (this.when) {
26
- this.enable(this.message);
27
- }
28
- }
29
- updateMessage(newMessage, prevMessage) {
30
- if (this.when) {
31
- if (!this.when || prevMessage !== newMessage) {
32
- this.enable(this.message);
33
- }
34
- }
35
- else {
36
- this.disable();
37
- }
38
- }
39
- componentDidUnload() {
40
- this.disable();
41
- }
42
- render() {
43
- return null;
44
- }
45
- get el() { return getElement(this); }
46
- static get watchers() { return {
47
- "message": ["updateMessage"],
48
- "when": ["updateMessage"]
49
- }; }
50
- };
51
- ActiveRouter.injectProps(StencilRouterPrompt, [
52
- 'history',
53
- ]);
54
-
55
- export { StencilRouterPrompt as stencil_router_prompt };
@@ -1,28 +0,0 @@
1
- import { r as registerInstance, a as getElement } from './index-107d7c24.js';
2
- import { A as ActiveRouter } from './active-router-d18b36fb.js';
3
-
4
- // Get the URL for this route link without the root from the router
5
- const getUrl = (url, root) => {
6
- // Don't allow double slashes
7
- if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') {
8
- return root.slice(0, root.length - 1) + url;
9
- }
10
- return root + url;
11
- };
12
- const Redirect = class {
13
- constructor(hostRef) {
14
- registerInstance(this, hostRef);
15
- }
16
- componentWillLoad() {
17
- if (this.history && this.root && this.url) {
18
- return this.history.replace(getUrl(this.url, this.root));
19
- }
20
- }
21
- get el() { return getElement(this); }
22
- };
23
- ActiveRouter.injectProps(Redirect, [
24
- 'history',
25
- 'root'
26
- ]);
27
-
28
- export { Redirect as stencil_router_redirect };
@@ -1 +0,0 @@
1
- var __spreadArrays=this&&this.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),a=0,e=0;e<t;e++)for(var o=arguments[e],i=0,c=o.length;i<c;i++,a++)n[a]=o[i];return n};import{h}from"./index-107d7c24.js";var createProviderConsumer=function(r,e){var t=new Map;var n=r;var a=function(r,e){if(Array.isArray(r)){__spreadArrays(r).forEach((function(r){e[r]=n[r]}))}else{e[r]=Object.assign({},n)}};var o=function(r,e){if(!t.has(r)){t.set(r,e);a(e,r)}return function(){if(t.has(r)){t.delete(r)}}};var i=function(r,e){var o=r.state;n=o;t.forEach(a);return e};var c=function(r,t){return e(o,t[0])};var s=function(r,e){var n=r.prototype;var a=n.connectedCallback;var i=n.disconnectedCallback;n.connectedCallback=function(){o(this,e);if(a){return a.call(this)}};n.disconnectedCallback=function(){t.delete(this);if(i){i.call(this)}}};return{Provider:i,Consumer:c,injectProps:s}};var ActiveRouter=createProviderConsumer({historyType:"browser",location:{pathname:"",query:{},key:""},titleSuffix:"",root:"/",routeViewsUpdated:function(){}},(function(r,e){return h("context-consumer",{subscribe:r,renderer:e})}));export{ActiveRouter as A};
@@ -1 +0,0 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-107d7c24.js";import"./datorama-akita-127aea91.js";import{g as globalScripts}from"./app-globals-c1f89805.js";var patchBrowser=function(){var e=import.meta.url;var s={};if(e!==""){s.resourcesUrl=new URL(".",e).href}return promiseResolve(s)};patchBrowser().then((function(e){globalScripts();return bootstrapLazy([["sss-super-byof-host",[[0,"sss-super-byof-host",{history:[16],backendUrl:[32],accessToken:[32]}]]],["context-consumer",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["stencil-async-content",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["stencil-route-title",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["stencil-router-prompt",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["stencil-router-redirect",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["sss-button_32",[[0,"sss-prefill",{history:[16],prefill:[32]}],[1,"super-selection-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32],ignoreExistingSelection:[32]}],[0,"sss-default-fund",{history:[16],defaultFundProductName:[32]}],[0,"sss-super-campaign-featured-funds",{history:[16],backendUrl:[32],accessToken:[32],currentView:[32]}],[0,"sss-super-smsf-host",{history:[16],backendUrl:[32],accessToken:[32]}],[0,"sss-existing-choice-page",{history:[16],existingFund:[32]}],[0,"sss-standard-choice-form",{history:[16],standardChoiceFormSignature:[32],formState:[32],isSubmitDisabled:[32]}],[0,"sss-success"],[0,"sss-choice-router",{history:[16]}],[0,"sss-my-own-fund-engagement-step-host",{history:[16],backendUrl:[32],accessToken:[32],fundUsi:[32],fundName:[32],memberNumber:[32],memberFirstName:[32],memberFamilyName:[32]}],[0,"sss-smsf-engagement-step-host",{history:[16],backendUrl:[32],accessToken:[32],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddress:[32],bsb:[32],bankAccountName:[32],bankAccountNumber:[32],memberFirstName:[32],memberFamilyName:[32],accountId:[32],partnerId:[32]}],[0,"sss-super-campaign-host",{history:[16],scriptImported:[32],backendUrl:[32],accessToken:[32]}],[0,"sss-dropdown-async",{testId:[1,"test-id"],placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],showValidationErrors:[4,"show-validation-errors"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-name-input",{testId:[1,"test-id"],value:[1],name:[1],readableName:[1,"readable-name"],showValidationErrors:[4,"show-validation-errors"],errorMessage:[32]}],[0,"sss-prefill-my-own-fund",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-smsf",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[0,"sss-prefill-invalid-my-own-fund",{history:[16],prefill:[16],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-invalid-smsf",{history:[16],prefill:[16],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[1,"super-selection-app",{ignoreExistingSelection:[4,"ignore-existing-selection"],accessToken:[1,"access-token"],backendUrl:[1,"backend-url"],appBaseUrl:[1,"app-base-url"],history:[16],location:[16],isSelfHosted:[4,"is-self-hosted"],isAppInitialised:[32]}],[0,"sss-loading-page"],[0,"sss-footer-section",{textOverride:[1,"text-override"]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[0,"sss-prefill-warning-box",{notificationList:[16]}],[0,"sss-header-section"],[4,"sss-custom-fund",{history:[16],currentCustomFund:[32],fundOptionsList:[32],showFundOptionsSelection:[32]}],[0,"sss-prefill-display-field",{field:[16]}],[0,"sss-prefill-error-box",{withHeader:[4,"with-header"],notificationList:[16]}],[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"sss-button",{testid:[1],fillWidth:[4,"fill-width"],fillWidthOnMobile:[4,"fill-width-on-mobile"],disabled:[4],variant:[1],size:[1],promiseFn:[16],state:[32]}],[0,"sss-loading-indicator",{theme:[1],size:[2]}],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]]],e)}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function l(t){try{u(r["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):o(t.value).then(i,l)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(t){return function(e){return u([t,e])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(a=i[0]&2?o["return"]:i[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;if(o=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;o=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){n.label=i[1];break}if(i[0]===6&&n.label<a[1]){n.label=a[1];a=i;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(i);break}if(a[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];o=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{e as enableAkitaProdMode}from"./datorama-akita-127aea91.js";function stencilRouterWorkaround(){if(window.location==window.parent.location){return}delete window.sessionStorage;window.sessionStorage={}}function appGlobalScript(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){stencilRouterWorkaround();enableAkitaProdMode();return[2]}))}))}var globalScripts=appGlobalScript;export{globalScripts as g};
@@ -1 +0,0 @@
1
- import{r as registerInstance,a as getElement}from"./index-107d7c24.js";var ContextConsumer=function(){function e(e){registerInstance(this,e);this.context={};this.renderer=function(){return null}}e.prototype.connectedCallback=function(){if(this.subscribe!=null){this.unsubscribe=this.subscribe(this.el,"context")}};e.prototype.disconnectedCallback=function(){if(this.unsubscribe!=null){this.unsubscribe()}};e.prototype.render=function(){return this.renderer(Object.assign({},this.context))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();export{ContextConsumer as context_consumer};
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):i(e.value).then(u,a)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(t){return s([e,t])}}function s(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{e as getRenderingRef,f as forceUpdate,h}from"./index-107d7c24.js";import{A as ActiveRouter}from"./active-router-d18b36fb.js";var isSome=function(e){return e._tag==="Some"};var isNone=function(e){return e._tag==="None"};var none={_tag:"None"};var some=function(e){return{_tag:"Some",value:e}};function fromNullable(e){return e==null?none:some(e)}function toUndefined(e){return isNone(e)?undefined:e.value}function injectHistory(e){ActiveRouter.injectProps(e,["history","location"])}function appReady(){postMessage({type:"appReady"})}function postMessage(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function resize(e,t){postMessage({type:"contentResized",height:e,width:t})}function navigation(e){postMessage({type:"pageNavigated",url:e})}function complete(){postMessage({type:"complete"})}function submitSuccess(){postMessage({type:"submitSuccess"})}var iframe={appReady:appReady,resize:resize,navigation:navigation,complete:complete,submitSuccess:submitSuccess};var appendToMap=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var debounce=function(e,t){var n;return function(){var r=[];for(var i=0;i<arguments.length;i++){r[i]=arguments[i]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(isConnected))}}),2e3);var stencilSubscription=function(e){var t=e.on;var n=new Map;if(typeof getRenderingRef==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=getRenderingRef();if(t){appendToMap(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(forceUpdate))}cleanupElements(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(n)}))}};var createObservableMap=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var i=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var o=function(){r.dispose.forEach((function(e){return e()}));i()};var u=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var a=function(e,i){var o=n.get(e);if(t(i,o,e)){n.set(e,i);r.set.forEach((function(t){return t(e,i,o)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return u(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){a(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){removeFromArray(r[e],t)}};var f=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var i=c("reset",(function(){return n(e[t])}));return function(){r();i()}};var p=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:s,get:u,set:a,on:c,onChange:f,use:p,dispose:o,reset:i}};var removeFromArray=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var createStore=function(e,t){var n=createObservableMap(e,t);stencilSubscription(n);return n};var initial={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",fundDetails:{type:"null"},promotedFundId:undefined};var state=createStore(initial).state;var SuperSelectionAppRoutes;(function(e){e["ExistingChoicePage"]="/existing";e["SuperCampaign"]="/super-campaign";e["ChoicePage"]="/";e["MyOwnFund"]="/super-choice/my-own-fund/";e["MyOwnFundEngagementStep"]="/super-choice/my-own-fund-engagement/";e["SmsfEngagementStep"]="/super-choice/smsf-engagement/";e["Prefill"]="/super-choice/prefill/";e["PrefillInvalidMyOwnFundPage"]="/super-choice/sss-prefill-invalid-my-own-fund/";e["PrefillMyOwnFundPage"]="/super-choice/prefill-my-own-fund/";e["PrefillSMSFPage"]="/super-choice/prefill-smsf/";e["PrefillInvalidSMSFPage"]="/super-choice/prefill-invalid-smsf/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["FeaturedFunds"]="/super-choice/featured-funds/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(SuperSelectionAppRoutes||(SuperSelectionAppRoutes={}));var superSelectionAppStencilRoutes=[h("stencil-route",{url:SuperSelectionAppRoutes.ExistingChoicePage,component:"sss-existing-choice-page"}),h("stencil-route",{url:SuperSelectionAppRoutes.SuperCampaign,component:"sss-super-campaign-host"}),h("stencil-route",{exact:true,url:SuperSelectionAppRoutes.ChoicePage,component:"sss-choice-router"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFund,component:"sss-super-byof-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.SmsfEngagementStep,component:"sss-smsf-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.Prefill,component:"sss-prefill"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillSMSFPage,component:"sss-prefill-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.SelfManagedFund,component:"sss-super-smsf-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.DefaultFund,component:"sss-default-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),h("stencil-route",{url:SuperSelectionAppRoutes.StandardChoice,component:"sss-standard-choice-form"}),h("stencil-route",{url:SuperSelectionAppRoutes.Success,component:"sss-success"})];function createCommonjsModule(e,t,n){return n={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var _function=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function i(e){return function(){return e}}t.constant=i;t.constTrue=i(true);t.constFalse=i(false);t.constNull=i(null);t.constUndefined=i(undefined);t.constVoid=t.constUndefined;function o(e){return function(t,n){return e(n,t)}}t.flip=o;function u(e,t,n,r,i,o,u,a,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return u(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return a(u(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(a(u(o(i(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=u;function a(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=a;function s(e){return e+1}t.increment=s;function c(e){return e-1}t.decrement=c;function f(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=f;function p(e){return function(t){return e.apply(void 0,t)}}t.tupled=p;function l(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=l;function d(e,t,n,r,i,o,u,a,s,c,f,p,l,d,h,m,v,g,y,_){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return u(o(i(r(n(t(e))))));case 8:return a(u(o(i(r(n(t(e)))))));case 9:return s(a(u(o(i(r(n(t(e))))))));case 10:return c(s(a(u(o(i(r(n(t(e)))))))));case 11:return f(c(s(a(u(o(i(r(n(t(e))))))))));case 12:return p(f(c(s(a(u(o(i(r(n(t(e)))))))))));case 13:return l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))));case 14:return d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))));case 15:return h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))));case 16:return m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))));case 17:return v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))))));case 18:return g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))))));case 19:return y(g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))))))));case 20:return _(y(g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))))))))}return}t.pipe=d;t.hole=f;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var m=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=m}));var Option=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var i=function(e){return{_tag:"Some",value:e}};t.some=i;function o(e){return e==null?t.none:t.some(e)}t.fromNullable=o;function u(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=u;function a(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=a;function s(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=s;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function f(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=f;function p(e){return t.isNone(e)?null:e.value}t.toNullable=p;function l(e){return t.isNone(e)?undefined:e.value}t.toUndefined=l;var d=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=d;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return o(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=m;function m(e){return function(n){return t.isNone(n)?t.none:o(e(n.value))}}t.chainNullableK=m;var v=function(e,n){return _function.pipe(e,t.map(n))};var g=function(e,n){return _function.pipe(e,t.ap(n))};var y=function(e,n){return _function.pipe(e,t.chain(n))};var _=function(e,n,r){return _function.pipe(e,t.reduce(n,r))};var b=function(e){var n=t.foldMap(e);return function(e,t){return _function.pipe(e,n(t))}};var S=function(e,n,r){return _function.pipe(e,t.reduceRight(n,r))};var w=function(e){var n=t.traverse(e);return function(e,t){return _function.pipe(e,n(t))}};var F=function(e,n){return _function.pipe(e,t.alt(n))};var C=function(e,n){return _function.pipe(e,t.filter(n))};var A=function(e,n){return _function.pipe(e,t.filterMap(n))};var E=function(e,n){return _function.pipe(e,t.extend(n))};var O=function(e,n){return _function.pipe(e,t.partition(n))};var N=function(e,n){return _function.pipe(e,t.partitionMap(n))};var P=function(e){var n=t.wither(e);return function(e,t){return _function.pipe(e,n(t))}};var R=function(e){var n=t.wilt(e);return function(e,t){return _function.pipe(e,n(t))}};var k=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=k;var M=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=M;var D=function(e){return _function.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=D;var T=function(e){return _function.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=T;t.of=t.some;var I=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=I;var j=function(e){return t.chain((function(n){return _function.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=j;t.flatten=t.chain(_function.identity);var U=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=U;t.alt=t.altW;var B=function(){return t.none};t.zero=B;var x=function(){return t.none};t.throwError=x;var W=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=W;t.duplicate=t.extend(_function.identity);var q=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=q;var L=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=L;var $=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=$;t.compact=t.flatten;var V={left:t.none,right:t.none};var z=function(e){var n=_function.pipe(e,t.map((function(e){return{left:s(e),right:c(e)}})));return t.isNone(n)?V:n.value};t.separate=z;var J=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=J;var H=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=H;var K=function(e){return function(t){return{left:C(t,(function(t){return!e(t)})),right:C(t,e)}}};t.partition=K;var Q=function(e){return _function.flow(t.map(e),t.separate)};t.partitionMap=Q;var Y=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=Y;var X=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=X;var G=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=G;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:s(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function ie(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=ie;function oe(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=oe;function ue(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=ue;function ae(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=ae;t.Functor={URI:t.URI,map:v};t.Applicative={URI:t.URI,map:v,ap:g,of:t.of};t.Monad={URI:t.URI,map:v,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:_,foldMap:b,reduceRight:S};t.Alt={URI:t.URI,map:v,alt:F};t.Alternative={URI:t.URI,map:v,ap:g,of:t.of,alt:F,zero:t.zero};t.Extend={URI:t.URI,map:v,extend:E};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:v,compact:t.compact,separate:t.separate,filter:C,filterMap:A,partition:O,partitionMap:N};t.Traversable={URI:t.URI,map:v,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence};t.Witherable={URI:t.URI,map:v,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:C,filterMap:A,partition:O,partitionMap:N,wither:P,wilt:R};t.MonadThrow={URI:t.URI,map:v,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:v,of:t.of,ap:g,chain:y,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence,zero:t.zero,alt:F,extend:E,compact:t.compact,separate:t.separate,filter:C,filterMap:A,partition:O,partitionMap:N,wither:P,wilt:R,throwError:t.throwError};function se(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=se;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function fe(e){return function(n){return t.isSome(e(n))}}t.getRefinement=fe;t.Do=t.of({});var pe=function(e){return t.map(_function.bindTo_(e))};t.bindTo=pe;var le=function(e,n){return t.chain((function(r){return _function.pipe(n(r),t.map((function(t){return _function.bind_(r,e,t)})))}))};t.bind=le;var de=function(e,n){return _function.flow(t.map((function(t){return function(n){return _function.bind_(t,e,n)}})),t.ap(n))};t.apS=de;var he=function(e){return function(n){var r=[];for(var i=0;i<n.length;i++){var o=e(i,n[i]);if(t.isNone(o)){return t.none}r.push(o.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var me=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=me;t.sequenceArray=t.traverseArray(_function.identity)}));function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,u=0,a="";i=n.charAt(u++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var i=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[i]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";var __assign=undefined&&undefined.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArrays=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var mix=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=__assign({},e);for(var i in t){if(t.hasOwnProperty(i)){if(t[i]instanceof Array&&e[i]instanceof Array){r[i]=n?__spreadArrays(e[i],t[i]):t[i]}else if(typeof t[i]==="object"&&typeof e[i]==="object"){r[i]=mix(e[i],t[i],n)}else{r[i]=t[i]}}}return r};var __spreadArrays$1=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var config={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,i=r===void 0?true:r,o=n.instance,u=o===void 0?false:o;var a=[];for(var s=2;s<arguments.length;s++){a[s-2]=arguments[s]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(i&&!c)throw new Error(e+" is not defined");return u&&c?new(c.bind.apply(c,__spreadArrays$1([void 0],a))):c}};var onMatch=function(e,t,n,r){if(!e.getEntriesByName)return false;var i=e.getEntriesByName(t);if(i&&i.length>0){n(i.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);perfs.callbacks.delete(t);if(perfs.callbacks.size<1){perfs.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var lazyObserver=function(e,t){if(!perfs.observer&&e&&t){perfs.observer=new t((function(t){perfs.callbacks.forEach((function(n,r){onMatch(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return perfs.observer};var perfs={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=config.polyfill("performance",{doThrow:false});var r=config.polyfill("PerformanceObserver",{doThrow:false});if(!lazyObserver(n,r))return;if(!onMatch(n,e,t,n)){if(perfs.callbacks.size<1)perfs.observer.observe({entryTypes:["resource","measure"]});perfs.callbacks.set(e,t)}}};var middlewareHelper=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,i){return i===e.length-2?r(n(t)):r(n)}))}};var WretchErrorWrapper=function(){function e(e){this.error=e}return e}();var resolver=function(e){var t=e._url,n=e._catchers,r=e._resolvers,i=e._middlewares,o=e._options;var u=new Map(n);var a=mix(config.defaults,o);var s=config.polyfill("AbortController",{doThrow:false,instance:true});if(!a["signal"]&&s){a["signal"]=s.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var f=middlewareHelper(i)(config.polyfill("fetch"))(t,a);var p=f.catch((function(e){throw new WretchErrorWrapper(e)})).then((function(e){c.clear();if(!e.ok){return e[config.errorType||"text"]().then((function(t){var n=new Error(t);n[config.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var l=function(t){return t.catch((function(t){c.clear();var n=t instanceof WretchErrorWrapper?t.error:t;if(t instanceof WretchErrorWrapper&&u.has("__fromFetch"))return u.get("__fromFetch")(n,e);else if(u.has(n.status))return u.get(n.status)(n,e);else if(u.has(n.name))return u.get(n.name)(n,e);else throw n}))};var d=function(e){return function(t){return e?l(p.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):l(p.then((function(e){return t?t(e):e})))}};var h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(e){f.then((function(t){return perfs.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=s}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[s,h]},error:function(e,t){u.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var __assign$1=undefined&&undefined.__assign||function(){__assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign$1.apply(this,arguments)};var __spreadArrays$2=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var JSON_MIME="application/json";var CONTENT_TYPE_HEADER="Content-Type";var Wretcher=function(){function e(e,t,n,r,i,o){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(i===void 0){i=[]}if(o===void 0){o=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=i;this._deferredChain=o}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,i=r===void 0?this._url:r,o=n.options,u=o===void 0?this._options:o,a=n.catchers,s=a===void 0?this._catchers:a,c=n.resolvers,f=c===void 0?this._resolvers:c,p=n.middlewares,l=p===void 0?this._middlewares:p,d=n.deferredChain,h=d===void 0?this._deferredChain:d;return new e(i,__assign$1({},u),new Map(s),__spreadArrays$2(f),__spreadArrays$2(l),__spreadArrays$2(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}config.defaults=t?mix(config.defaults,e):e;return this};e.prototype.errorType=function(e){config.errorType=e;return this};e.prototype.polyfills=function(e){config.polyfills=__assign$1(__assign$1({},config.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?mix(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:appendQueryParams(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:mix(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[CONTENT_TYPE_HEADER]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:__spreadArrays$2(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:__spreadArrays$2(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:__spreadArrays$2(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var i=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==CONTENT_TYPE_HEADER.toLowerCase()||n.startsWith(JSON_MIME)})))?this.json(n):this.body(n);i=i.options(__assign$1(__assign$1({},t),{method:e}));var o=i._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),i);return resolver(o)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===CONTENT_TYPE_HEADER.toLowerCase()&&n.startsWith(JSON_MIME)})))===null||t===void 0?void 0:t[1];return this.content(n||JSON_MIME).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(convertFormData(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:convertFormUrl(e)).content("application/x-www-form-urlencoded")};return e}();var appendQueryParams=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var i=config.polyfill("URLSearchParams",{instance:true});for(var o in t){if(t[o]instanceof Array){for(var u=0,a=t[o];u<a.length;u++){var s=a[u];i.append(o,s)}}else{i.append(o,t[o])}}r=i.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function convertFormData(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=config.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var i=e[0],o=e[1];var u=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);u=u?u+"["+i+"]":i;if(o instanceof Array){for(var a=0,s=o;a<s.length;a++){var c=s[a];n.append(u+"[]",c)}}else if(t&&typeof o==="object"&&(!(t instanceof Array)||!t.includes(i))){if(o!==null){convertFormData(o,t,n,__spreadArrays$2(r,[i]))}}else{n.append(u,o)}}));return n}function encodeQueryValue(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function convertFormUrl(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return encodeQueryValue(t,e)})).join("&")}return encodeQueryValue(t,n)})).join("&")}var factory=Wretcher.factory;factory["default"]=Wretcher.factory;function buildBackendApiClient(){var e=superSelectionAppService.jwt;var t=superSelectionAppService.profileId;var n=superSelectionAppService.accountIdOrDefault;var r=superSelectionAppService.partnerIdOrDefault;return factory(superSelectionAppService.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var slate={fundId:"slate",usi:"32367272075001"};function hydratePromotedFundChoiceDtoKind(e){if("slate"in e){e.kind="slate"}else if("australianRetirementTrust"in e){e.kind="australianRetirementTrust"}else if("aware"in e){e.kind="aware"}else if("active"in e){e.kind="active"}else if("australianEthical"in e){e.kind="australianEthical"}else if("virgin"in e){e.kind="virgin"}else if("spirit"in e){e.kind="spirit"}else if("firstSuper"in e){e.kind="firstSuper"}else if("mercerMyChoice"in e){e.kind="mercerMyChoice"}else if("generic"in e){e.kind="generic"}}function getPromotedFundUsi(e){switch(e.kind){case"slate":return slate.usi;case"australianRetirementTrust":return e.australianRetirementTrust.usi;case"aware":return e.aware.usi;case"active":return e.active.usi;case"australianEthical":return e.australianEthical.usi;case"virgin":return e.virgin.usi;case"spirit":return e.spirit.usi;case"firstSuper":return e.firstSuper.usi;case"mercerMyChoice":return e.mercerMyChoice.usi;case"generic":return e.generic.usi;default:return""}}function getPromotedFundId(e){switch(e.kind){case"slate":return slate.fundId;case"australianRetirementTrust":return"australian-retirement-trust";case"aware":return"aware";case"active":return"active";case"australianEthical":return"australian-ethical";case"virgin":return"virgin";case"spirit":return"spirit";case"firstSuper":return"first-super";case"mercerMyChoice":return"mercermychoice";case"generic":return e.generic.fundId;default:return""}}function getSuperChoiceUsi(e){switch(e.kind){case"Promoted":return some(getPromotedFundUsi(e.promoted));case"MyOwnFund":return some(e.myOwnFund.usi);case"SMSF":return none;case"Default":return some(e.default.usi);case"PromotedDefault":return some(e.promotedDefault.usi);case"DefinedBenefits":return some(e.definedBenefits.usi);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.usi);default:return none}}function getPromotedFundMemberNumber(e){switch(e.kind){case"slate":return e.slate.memberNumber;case"australianRetirementTrust":return e.australianRetirementTrust.memberNumber;case"aware":return e.aware.memberNumber;case"active":return e.active.memberNumber;case"australianEthical":return e.australianEthical.memberNumber;case"virgin":return e.virgin.memberNumber;case"spirit":return e.spirit.memberNumber;case"firstSuper":return e.firstSuper.memberNumber;case"mercerMyChoice":return e.mercerMyChoice.memberNumber;case"generic":return e.generic.memberNumber;default:return""}}function getSuperChoiceMemberNumber(e){switch(e.kind){case"Promoted":return some(getPromotedFundMemberNumber(e.promoted));case"MyOwnFund":return some(e.myOwnFund.memberNumber);case"DefinedBenefits":return some(e.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":return none;default:return none}}function hydrateSuperChoiceDetailsDtoKind(e){if("promoted"in e){e.kind="Promoted"}else if("myOwnFund"in e){e.kind="MyOwnFund"}else if("smsf"in e){e.kind="SMSF"}else if("default"in e){e.kind="Default"}else if("promotedDefault"in e){e.kind="PromotedDefault"}else if("definedBenefits"in e){e.kind="DefinedBenefits"}else if("promotedDefaultWithJoin"in e){e.kind="PromotedDefaultWithJoin"}}var SuperSelectionApi=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,buildBackendApiClient().url("super-choice/australian-funds-v2?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAustralianFundAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=t?"?includeInactive=true":"";return[2,buildBackendApiClient().url("super-choice/australian-funds/"+e+n).get().notFound((function(){throw new Error("Failed to fetch australian super fund.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()];case 1:t=n.sent();if((e=t.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails){hydrateSuperChoiceDetailsDtoKind(t.superBuyer.superChoice.choiceDetails);switch(t.superBuyer.superChoice.choiceDetails.kind){case"Promoted":hydratePromotedFundChoiceDtoKind(t.superBuyer.superChoice.choiceDetails.promoted);break}}return[2,t]}}))}))};e.prototype.clickPromotedTileAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("click-promoted-tile").post(e).res()]}))}))};e.prototype.viewSuperFundPanelAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("view-super-fund-panel").post(e).res()]}))}))};e.prototype.toSearchFilterQueryString=function(e){return"search="+e.searchString+(e.maxRecordCount>0?"&maxRecordCount="+e.maxRecordCount:"")};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var i=function(e){return e&&e.length};return[n,r].filter(i).join("&")};return e}();var superSelectionApi=new SuperSelectionApi;var SuperCampaignComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded";e[e["NotWorking"]=3]="NotWorking"})(SuperCampaignComponentStatus||(SuperCampaignComponentStatus={}));var SuperCampaignState=function(){function e(){this._promotedFundsShown=[]}Object.defineProperty(e.prototype,"PromotedFundIds",{get:function(){return this._promotedFundsShown.map((function(e){return e.fundId}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsShown",{set:function(e){this._promotedFundsShown=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"DefaultFundPosition",{get:function(){var e=this._promotedFundsShown.findIndex((function(e){return e.fundType==="promoted-default"}));if(e===-1)return undefined;return e+1},enumerable:false,configurable:true});return e}();var initialState={apiBaseUrl:Option.none,appBaseUrl:Option.none,profileId:Option.none,jwt:Option.none,superBuyer:Option.none,superChoicePrefill:Option.none,promotedFunds:Option.none,accountConfiguration:Option.none,profileConfiguration:Option.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false,isDefinedBenefitsEligible:Option.none,superCampaignEnabled:true,superCampaignState:undefined,superCampaignComponentStatus:SuperCampaignComponentStatus.NotLoaded,hideFooterSection:false,bringYourOwnFundCustomStepEnabled:false,smsfCustomStepEnabled:false,featuredFundsEnabled:false};var SuperSelectionAppService=function(){function e(){var e=this;var t=createStore(initialState),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=_function.pipe(t,Option.chain((function(e){return Option.fromNullable(o(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(Option.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(Option.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(Option.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return this.superCampaignState.PromotedFundIds}if(Option.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedDefaultFundPosition",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return Option.fromNullable(this.superCampaignState.DefaultFundPosition)}return Option.none},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsConfig",{get:function(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:Option.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:this.isUsingSuperCampaign?"superCampaign":"superSelection"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(Option.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){var e=_function.pipe(this._state.profileConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten);if(Option.isSome(e)){return e}return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return e.accountId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return _function.pipe(this._state.superBuyer,Option.map((function(e){return e.partnerId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(Option.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};Object.defineProperty(e.prototype,"isDefinedBenefitsEligible",{get:function(){return this._state.isDefinedBenefitsEligible},enumerable:false,configurable:true});e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,superSelectionApi.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=Option.fromNullable(e.accountConfiguration);this._state.profileConfiguration=Option.fromNullable(e.profileConfiguration);this._state.superBuyer=Option.fromNullable(e.superBuyer);this._state.promotedFunds=Option.fromNullable(e.promotedFunds);this._state.bringYourOwnFundCustomStepEnabled=e.bringYourOwnFundCustomStepEnabled;this._state.smsfCustomStepEnabled=e.smsfCustomStepEnabled;this._state.featuredFundsEnabled=e.featuredFundsEnabled;this._state.superChoicePrefill=Option.fromNullable(e.prefill);this._state.isDefinedBenefitsEligible=Option.fromNullable(e.isDefinedBenefitsEligible);if(Option.isSome(this._state.accountConfiguration)){if(this._state.accountConfiguration.value.featureSet.type==="basic"){this._state.superCampaignEnabled=false}}return[2]}}))}))};e.prototype.setSuperCampaignPromotedFundsShown=function(e){if(this._state.superCampaignState!==undefined)this._state.superCampaignState.promotedFundsShown=e;else throw new Error("Cannot set shown funds for SuperCampaing state because it is undefined")};e.prototype.viewSuperFundPanelAsync=function(e,t){return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({},this.promotedFundsConfig),{shownFunds:t?t:this.promotedFundsConfig.shownFunds,placementId:e}))};Object.defineProperty(e.prototype,"superCampaignState",{get:function(){return this._state.superCampaignState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignComponentStatus",{get:function(){return this._state.superCampaignComponentStatus},set:function(e){if(e===SuperCampaignComponentStatus.Loaded){this._state.superCampaignComponentStatus=SuperCampaignComponentStatus.Loaded;this._state.superCampaignState=new SuperCampaignState}else{this._state.superCampaignComponentStatus=e;this._state.superCampaignState=undefined}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUsingSuperCampaign",{get:function(){return this.state.superCampaignEnabled&&this.superCampaignState!==undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBringYourOwnFundCustomStepEnabled",{get:function(){return this.state.bringYourOwnFundCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSmsfCustomStepEnabled",{get:function(){return this.state.smsfCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFeaturedFundsEnabled",{get:function(){return this.state.featuredFundsEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignCanNotBeActivated",{get:function(){return!this.state.superCampaignEnabled||this.superCampaignComponentStatus===SuperCampaignComponentStatus.NotWorking},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hideFooterSection",{get:function(){return this._state.hideFooterSection},set:function(e){this._state.hideFooterSection=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"backendUrl",{get:function(){return Option.map(this.getBaseUrl)(this.state.apiBaseUrl)},enumerable:false,configurable:true});e.prototype.getBaseUrl=function(e){var t=new URL(e);return t.protocol+"//"+t.hostname+(t.port.length>0?":"+t.port:"")};return e}();var superSelectionAppService=new SuperSelectionAppService;var NavigationService=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);iframe.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){state.handleSubmitFn=e.handleSubmitFn;state.fundName=e.fundName;state.fundDetails=e.fundDetails;state.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,SuperSelectionAppRoutes.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=superSelectionAppService.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var navigationService=new NavigationService;var CustomFundTypes;(function(e){e["MyOwnFund"]="Existing super fund";e["DefaultFund"]="Default super fund";e["SelfManagedFund"]="Self-managed super fund";e["FeaturedFunds"]="Featured super funds"})(CustomFundTypes||(CustomFundTypes={}));var initialStateCustomFund={myOwnFundForm:{fundUsi:none,fundName:none,memberNumber:none,memberFirstName:none,memberFamilyName:none},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:"",memberFirstName:"",memberFamilyName:""}};var _j=createStore(initialStateCustomFund),state$1=_j.state,reset=_j.reset;var EventTrackingApi=function(){function e(){}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.PostAnalyticsEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("analytics-events").post(e).res()]}))}))};return e}();var EventTrackingService=function(){function e(){this.eventTrackingApi=EventTrackingApi.Instance}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.TrackSuperFundPdsViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPdsViewed:e})]}))}))};e.prototype.TrackPromotedSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})]}))}))};e.prototype.TrackPromotedDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:e}})]}))}))};e.prototype.TrackMyOwnSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})]}))}))};e.prototype.TrackSmsfSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})]}))}))};e.prototype.TrackDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})]}))}))};e.prototype.TrackSuperFundNominationViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationViewed:e})]}))}))};e.prototype.TrackSuperFundNominationDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationDeclined:e})]}))}))};e.prototype.TrackSuperFundDisclaimerViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerViewed:e})]}))}))};e.prototype.TrackSuperFundDisclaimerAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerAccepted:e})]}))}))};e.prototype.TrackSuperFundPrefillViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillViewed:e})]}))}))};e.prototype.TrackSuperFundPrefillDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillDeclined:e})]}))}))};e.prototype.TrackSuperFundDetailChangeRequestedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailChangeRequested:e})]}))}))};e.prototype.TrackSuperCampaignActivationSucceededAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperCampaignActivationSucceeded:e})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepActivationSucceeded=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepActivationSucceeded:{fundUsi:e}})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepContinued=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepContinued:{fundUsi:e,reason:t}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepActivationSucceeded=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.trackEventAsync({SuperSmsfEngagementStepActivationSucceeded:{}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepContinued=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperSmsfEngagementStepContinued:{reason:e}})]}))}))};e.prototype.trackEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,this.eventTrackingApi.PostAnalyticsEventAsync({event:e})];case 1:n.sent();return[3,3];case 2:t=n.sent();return[2];case 3:return[2]}}))}))};return e}();var CustomFundChoiceApi=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};e.prototype.submitDefinedBenefitsChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/defined-benefits").post(e).badRequest((function(){throw new Error("Failed to process Defined Benefits choice request")})).text()]}))}))};e.prototype.validateAbnForSMSF=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("super-choice/smsf/"+e+"/validate").get().badRequest((function(){throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()];case 1:t=n.sent();return[2,t.result]}}))}))};return e}();var customFundChoiceApi=new CustomFundChoiceApi;export{CustomFundTypes as C,EventTrackingService as E,Option as O,SuperSelectionAppRoutes as S,superSelectionAppService as a,navigationService as b,injectHistory as c,superSelectionApi as d,customFundChoiceApi as e,isNone as f,getPromotedFundId as g,buildBackendApiClient as h,isSome as i,getSuperChoiceUsi as j,getSuperChoiceMemberNumber as k,state$1 as l,state as m,none as n,slate as o,SuperCampaignComponentStatus as p,iframe as q,superSelectionAppStencilRoutes as r,some as s,toUndefined as t,factory as u,fromNullable as v};
@@ -1,15 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- var __extends=this&&this.__extends||function(){var t=function(e,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]};return t(e,r)};return function(e,r){t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var i=Array(t),n=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i};function __rest(t,e){var r={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0)r[i]=t[i];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++){if(e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n]))r[i[n]]=t[i[n]]}return r}function __decorate(t,e,r,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)if(o=t[a])s=(n<3?o(s):n>3?o(e,r,s):o(e,r))||s;return n>3&&s&&Object.defineProperty(e,r,s),s}function __metadata(t,e){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,e)}function isFunction(t){return typeof t==="function"}var _enable_super_gross_mode_that_will_cause_bad_things=false;var config={Promise:undefined,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else if(_enable_super_gross_mode_that_will_cause_bad_things){console.log("RxJS: Back to a better error behavior. Thank you. <3")}_enable_super_gross_mode_that_will_cause_bad_things=t},get useDeprecatedSynchronousErrorHandling(){return _enable_super_gross_mode_that_will_cause_bad_things}};function hostReportError(t){setTimeout((function(){throw t}),0)}var empty={closed:true,next:function(t){},error:function(t){if(config.useDeprecatedSynchronousErrorHandling){throw t}else{hostReportError(t)}},complete:function(){}};var isArray=function(){return Array.isArray||function(t){return t&&typeof t.length==="number"}}();function isObject(t){return t!==null&&typeof t==="object"}var UnsubscriptionErrorImpl=function(){function t(t){Error.call(this);this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"";this.name="UnsubscriptionError";this.errors=t;return this}t.prototype=Object.create(Error.prototype);return t}();var UnsubscriptionError=UnsubscriptionErrorImpl;var Subscription=function(){function t(t){this.closed=false;this._parentOrParents=null;this._subscriptions=null;if(t){this._ctorUnsubscribe=true;this._unsubscribe=t}}t.prototype.unsubscribe=function(){var e;if(this.closed){return}var r=this,i=r._parentOrParents,n=r._ctorUnsubscribe,s=r._unsubscribe,o=r._subscriptions;this.closed=true;this._parentOrParents=null;this._subscriptions=null;if(i instanceof t){i.remove(this)}else if(i!==null){for(var a=0;a<i.length;++a){var u=i[a];u.remove(this)}}if(isFunction(s)){if(n){this._unsubscribe=undefined}try{s.call(this)}catch(t){e=t instanceof UnsubscriptionError?flattenUnsubscriptionErrors(t.errors):[t]}}if(isArray(o)){var a=-1;var c=o.length;while(++a<c){var f=o[a];if(isObject(f)){try{f.unsubscribe()}catch(t){e=e||[];if(t instanceof UnsubscriptionError){e=e.concat(flattenUnsubscriptionErrors(t.errors))}else{e.push(t)}}}}}if(e){throw new UnsubscriptionError(e)}};t.prototype.add=function(e){var r=e;if(!e){return t.EMPTY}switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||typeof r.unsubscribe!=="function"){return r}else if(this.closed){r.unsubscribe();return r}else if(!(r instanceof t)){var i=r;r=new t;r._subscriptions=[i]}break;default:{throw new Error("unrecognized teardown "+e+" added to Subscription.")}}var n=r._parentOrParents;if(n===null){r._parentOrParents=this}else if(n instanceof t){if(n===this){return r}r._parentOrParents=[n,this]}else if(n.indexOf(this)===-1){n.push(this)}else{return r}var s=this._subscriptions;if(s===null){this._subscriptions=[r]}else{s.push(r)}return r};t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);if(r!==-1){e.splice(r,1)}}};return t}();Subscription.EMPTY=function(t){t.closed=true;return t}(new Subscription);function flattenUnsubscriptionErrors(t){return t.reduce((function(t,e){return t.concat(e instanceof UnsubscriptionError?e.errors:e)}),[])}var rxSubscriber=function(){return typeof Symbol==="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}();var Subscriber=function(t){__extends(e,t);function e(r,i,n){var s=t.call(this)||this;s.syncErrorValue=null;s.syncErrorThrown=false;s.syncErrorThrowable=false;s.isStopped=false;switch(arguments.length){case 0:s.destination=empty;break;case 1:if(!r){s.destination=empty;break}if(typeof r==="object"){if(r instanceof e){s.syncErrorThrowable=r.syncErrorThrowable;s.destination=r;r.add(s)}else{s.syncErrorThrowable=true;s.destination=new SafeSubscriber(s,r)}break}default:s.syncErrorThrowable=true;s.destination=new SafeSubscriber(s,r,i,n);break}return s}e.prototype[rxSubscriber]=function(){return this};e.create=function(t,r,i){var n=new e(t,r,i);n.syncErrorThrowable=false;return n};e.prototype.next=function(t){if(!this.isStopped){this._next(t)}};e.prototype.error=function(t){if(!this.isStopped){this.isStopped=true;this._error(t)}};e.prototype.complete=function(){if(!this.isStopped){this.isStopped=true;this._complete()}};e.prototype.unsubscribe=function(){if(this.closed){return}this.isStopped=true;t.prototype.unsubscribe.call(this)};e.prototype._next=function(t){this.destination.next(t)};e.prototype._error=function(t){this.destination.error(t);this.unsubscribe()};e.prototype._complete=function(){this.destination.complete();this.unsubscribe()};e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;this._parentOrParents=null;this.unsubscribe();this.closed=false;this.isStopped=false;this._parentOrParents=t;return this};return e}(Subscription);var SafeSubscriber=function(t){__extends(e,t);function e(e,r,i,n){var s=t.call(this)||this;s._parentSubscriber=e;var o;var a=s;if(isFunction(r)){o=r}else if(r){o=r.next;i=r.error;n=r.complete;if(r!==empty){a=Object.create(r);if(isFunction(a.unsubscribe)){s.add(a.unsubscribe.bind(a))}a.unsubscribe=s.unsubscribe.bind(s)}}s._context=a;s._next=o;s._error=i;s._complete=n;return s}e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;if(!config.useDeprecatedSynchronousErrorHandling||!e.syncErrorThrowable){this.__tryOrUnsub(this._next,t)}else if(this.__tryOrSetError(e,this._next,t)){this.unsubscribe()}}};e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;var r=config.useDeprecatedSynchronousErrorHandling;if(this._error){if(!r||!e.syncErrorThrowable){this.__tryOrUnsub(this._error,t);this.unsubscribe()}else{this.__tryOrSetError(e,this._error,t);this.unsubscribe()}}else if(!e.syncErrorThrowable){this.unsubscribe();if(r){throw t}hostReportError(t)}else{if(r){e.syncErrorValue=t;e.syncErrorThrown=true}else{hostReportError(t)}this.unsubscribe()}}};e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};if(!config.useDeprecatedSynchronousErrorHandling||!e.syncErrorThrowable){this.__tryOrUnsub(r);this.unsubscribe()}else{this.__tryOrSetError(e,r);this.unsubscribe()}}else{this.unsubscribe()}}};e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){this.unsubscribe();if(config.useDeprecatedSynchronousErrorHandling){throw t}else{hostReportError(t)}}};e.prototype.__tryOrSetError=function(t,e,r){if(!config.useDeprecatedSynchronousErrorHandling){throw new Error("bad call")}try{e.call(this._context,r)}catch(e){if(config.useDeprecatedSynchronousErrorHandling){t.syncErrorValue=e;t.syncErrorThrown=true;return true}else{hostReportError(e);return true}}return false};e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null;this._parentSubscriber=null;t.unsubscribe()};return e}(Subscriber);function canReportError(t){while(t){var e=t.closed,r=t.destination,i=t.isStopped;if(e||i){return false}else if(r&&r instanceof Subscriber){t=r}else{t=null}}return true}function toSubscriber(t,e,r){if(t){if(t instanceof Subscriber){return t}if(t[rxSubscriber]){return t[rxSubscriber]()}}if(!t&&!e&&!r){return new Subscriber(empty)}return new Subscriber(t,e,r)}var observable=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}();function identity(t){return t}function pipeFromArray(t){if(t.length===0){return identity}if(t.length===1){return t[0]}return function e(r){return t.reduce((function(t,e){return e(t)}),r)}}var Observable=function(){function t(t){this._isScalar=false;if(t){this._subscribe=t}}t.prototype.lift=function(e){var r=new t;r.source=this;r.operator=e;return r};t.prototype.subscribe=function(t,e,r){var i=this.operator;var n=toSubscriber(t,e,r);if(i){n.add(i.call(n,this.source))}else{n.add(this.source||config.useDeprecatedSynchronousErrorHandling&&!n.syncErrorThrowable?this._subscribe(n):this._trySubscribe(n))}if(config.useDeprecatedSynchronousErrorHandling){if(n.syncErrorThrowable){n.syncErrorThrowable=false;if(n.syncErrorThrown){throw n.syncErrorValue}}}return n};t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){if(config.useDeprecatedSynchronousErrorHandling){t.syncErrorThrown=true;t.syncErrorValue=e}if(canReportError(t)){t.error(e)}else{console.warn(e)}}};t.prototype.forEach=function(t,e){var r=this;e=getPromiseCtor(e);return new e((function(e,i){var n;n=r.subscribe((function(e){try{t(e)}catch(t){i(t);if(n){n.unsubscribe()}}}),i,e)}))};t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)};t.prototype[observable]=function(){return this};t.prototype.pipe=function(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}if(t.length===0){return this}return pipeFromArray(t)(this)};t.prototype.toPromise=function(t){var e=this;t=getPromiseCtor(t);return new t((function(t,r){var i;e.subscribe((function(t){return i=t}),(function(t){return r(t)}),(function(){return t(i)}))}))};return t}();Observable.create=function(t){return new Observable(t)};function getPromiseCtor(t){if(!t){t=Promise}if(!t){throw new Error("no Promise impl found")}return t}var ObjectUnsubscribedErrorImpl=function(){function t(){Error.call(this);this.message="object unsubscribed";this.name="ObjectUnsubscribedError";return this}t.prototype=Object.create(Error.prototype);return t}();var ObjectUnsubscribedError=ObjectUnsubscribedErrorImpl;var SubjectSubscription=function(t){__extends(e,t);function e(e,r){var i=t.call(this)||this;i.subject=e;i.subscriber=r;i.closed=false;return i}e.prototype.unsubscribe=function(){if(this.closed){return}this.closed=true;var t=this.subject;var e=t.observers;this.subject=null;if(!e||e.length===0||t.isStopped||t.closed){return}var r=e.indexOf(this.subscriber);if(r!==-1){e.splice(r,1)}};return e}(Subscription);var SubjectSubscriber=function(t){__extends(e,t);function e(e){var r=t.call(this,e)||this;r.destination=e;return r}return e}(Subscriber);var Subject=function(t){__extends(e,t);function e(){var e=t.call(this)||this;e.observers=[];e.closed=false;e.isStopped=false;e.hasError=false;e.thrownError=null;return e}e.prototype[rxSubscriber]=function(){return new SubjectSubscriber(this)};e.prototype.lift=function(t){var e=new AnonymousSubject(this,this);e.operator=t;return e};e.prototype.next=function(t){if(this.closed){throw new ObjectUnsubscribedError}if(!this.isStopped){var e=this.observers;var r=e.length;var i=e.slice();for(var n=0;n<r;n++){i[n].next(t)}}};e.prototype.error=function(t){if(this.closed){throw new ObjectUnsubscribedError}this.hasError=true;this.thrownError=t;this.isStopped=true;var e=this.observers;var r=e.length;var i=e.slice();for(var n=0;n<r;n++){i[n].error(t)}this.observers.length=0};e.prototype.complete=function(){if(this.closed){throw new ObjectUnsubscribedError}this.isStopped=true;var t=this.observers;var e=t.length;var r=t.slice();for(var i=0;i<e;i++){r[i].complete()}this.observers.length=0};e.prototype.unsubscribe=function(){this.isStopped=true;this.closed=true;this.observers=null};e.prototype._trySubscribe=function(e){if(this.closed){throw new ObjectUnsubscribedError}else{return t.prototype._trySubscribe.call(this,e)}};e.prototype._subscribe=function(t){if(this.closed){throw new ObjectUnsubscribedError}else if(this.hasError){t.error(this.thrownError);return Subscription.EMPTY}else if(this.isStopped){t.complete();return Subscription.EMPTY}else{this.observers.push(t);return new SubjectSubscription(this,t)}};e.prototype.asObservable=function(){var t=new Observable;t.source=this;return t};return e}(Observable);Subject.create=function(t,e){return new AnonymousSubject(t,e)};var AnonymousSubject=function(t){__extends(e,t);function e(e,r){var i=t.call(this)||this;i.destination=e;i.source=r;return i}e.prototype.next=function(t){var e=this.destination;if(e&&e.next){e.next(t)}};e.prototype.error=function(t){var e=this.destination;if(e&&e.error){this.destination.error(t)}};e.prototype.complete=function(){var t=this.destination;if(t&&t.complete){this.destination.complete()}};e.prototype._subscribe=function(t){var e=this.source;if(e){return this.source.subscribe(t)}else{return Subscription.EMPTY}};return e}(Subject);var BehaviorSubject=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;r._value=e;return r}Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:false,configurable:true});e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);if(r&&!r.closed){e.next(this._value)}return r};e.prototype.getValue=function(){if(this.hasError){throw this.thrownError}else if(this.closed){throw new ObjectUnsubscribedError}else{return this._value}};e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)};return e}(Subject);var Action=function(t){__extends(e,t);function e(e,r){return t.call(this)||this}e.prototype.schedule=function(t,e){if(e===void 0){e=0}return this};return e}(Subscription);var AsyncAction=function(t){__extends(e,t);function e(e,r){var i=t.call(this,e,r)||this;i.scheduler=e;i.work=r;i.pending=false;return i}e.prototype.schedule=function(t,e){if(e===void 0){e=0}if(this.closed){return this}this.state=t;var r=this.id;var i=this.scheduler;if(r!=null){this.id=this.recycleAsyncId(i,r,e)}this.pending=true;this.delay=e;this.id=this.id||this.requestAsyncId(i,this.id,e);return this};e.prototype.requestAsyncId=function(t,e,r){if(r===void 0){r=0}return setInterval(t.flush.bind(t,this),r)};e.prototype.recycleAsyncId=function(t,e,r){if(r===void 0){r=0}if(r!==null&&this.delay===r&&this.pending===false){return e}clearInterval(e);return undefined};e.prototype.execute=function(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;var r=this._execute(t,e);if(r){return r}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}};e.prototype._execute=function(t,e){var r=false;var i=undefined;try{this.work(t)}catch(t){r=true;i=!!t&&t||new Error(t)}if(r){this.unsubscribe();return i}};e.prototype._unsubscribe=function(){var t=this.id;var e=this.scheduler;var r=e.actions;var i=r.indexOf(this);this.work=null;this.state=null;this.pending=false;this.scheduler=null;if(i!==-1){r.splice(i,1)}if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null};return e}(Action);var QueueAction=function(t){__extends(e,t);function e(e,r){var i=t.call(this,e,r)||this;i.scheduler=e;i.work=r;return i}e.prototype.schedule=function(e,r){if(r===void 0){r=0}if(r>0){return t.prototype.schedule.call(this,e,r)}this.delay=r;this.state=e;this.scheduler.flush(this);return this};e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)};e.prototype.requestAsyncId=function(e,r,i){if(i===void 0){i=0}if(i!==null&&i>0||i===null&&this.delay>0){return t.prototype.requestAsyncId.call(this,e,r,i)}return e.flush(this)};return e}(AsyncAction);var Scheduler=function(){function t(e,r){if(r===void 0){r=t.now}this.SchedulerAction=e;this.now=r}t.prototype.schedule=function(t,e,r){if(e===void 0){e=0}return new this.SchedulerAction(this,t).schedule(r,e)};return t}();Scheduler.now=function(){return Date.now()};var AsyncScheduler=function(t){__extends(e,t);function e(r,i){if(i===void 0){i=Scheduler.now}var n=t.call(this,r,(function(){if(e.delegate&&e.delegate!==n){return e.delegate.now()}else{return i()}}))||this;n.actions=[];n.active=false;n.scheduled=undefined;return n}e.prototype.schedule=function(r,i,n){if(i===void 0){i=0}if(e.delegate&&e.delegate!==this){return e.delegate.schedule(r,i,n)}else{return t.prototype.schedule.call(this,r,i,n)}};e.prototype.flush=function(t){var e=this.actions;if(this.active){e.push(t);return}var r;this.active=true;do{if(r=t.execute(t.state,t.delay)){break}}while(t=e.shift());this.active=false;if(r){while(t=e.shift()){t.unsubscribe()}throw r}};return e}(Scheduler);var QueueScheduler=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(AsyncScheduler);var queueScheduler=new QueueScheduler(QueueAction);var queue=queueScheduler;var EMPTY=new Observable((function(t){return t.complete()}));function empty$1(t){return t?emptyScheduled(t):EMPTY}function emptyScheduled(t){return new Observable((function(e){return t.schedule((function(){return e.complete()}))}))}function isScheduler(t){return t&&typeof t.schedule==="function"}var subscribeToArray=function(t){return function(e){for(var r=0,i=t.length;r<i&&!e.closed;r++){e.next(t[r])}e.complete()}};function scheduleArray(t,e){return new Observable((function(r){var i=new Subscription;var n=0;i.add(e.schedule((function(){if(n===t.length){r.complete();return}r.next(t[n++]);if(!r.closed){i.add(this.schedule())}})));return i}))}function fromArray(t,e){if(!e){return new Observable(subscribeToArray(t))}else{return scheduleArray(t,e)}}function of(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}var r=t[t.length-1];if(isScheduler(r)){t.pop();return scheduleArray(t,r)}else{return fromArray(t)}}function throwError(t,e){if(!e){return new Observable((function(e){return e.error(t)}))}else{return new Observable((function(r){return e.schedule(dispatch,0,{error:t,subscriber:r})}))}}function dispatch(t){var e=t.error,r=t.subscriber;r.error(e)}var NotificationKind;(function(t){t["NEXT"]="N";t["ERROR"]="E";t["COMPLETE"]="C"})(NotificationKind||(NotificationKind={}));var Notification=function(){function t(t,e,r){this.kind=t;this.value=e;this.error=r;this.hasValue=t==="N"}t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}};t.prototype.do=function(t,e,r){var i=this.kind;switch(i){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}};t.prototype.accept=function(t,e,r){if(t&&typeof t.next==="function"){return this.observe(t)}else{return this.do(t,e,r)}};t.prototype.toObservable=function(){var t=this.kind;switch(t){case"N":return of(this.value);case"E":return throwError(this.error);case"C":return empty$1()}throw new Error("unexpected notification kind value")};t.createNext=function(e){if(typeof e!=="undefined"){return new t("N",e)}return t.undefinedValueNotification};t.createError=function(e){return new t("E",undefined,e)};t.createComplete=function(){return t.completeNotification};return t}();Notification.completeNotification=new Notification("C");Notification.undefinedValueNotification=new Notification("N",undefined);var ObserveOnSubscriber=function(t){__extends(e,t);function e(e,r,i){if(i===void 0){i=0}var n=t.call(this,e)||this;n.scheduler=r;n.delay=i;return n}e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r);this.unsubscribe()};e.prototype.scheduleMessage=function(t){var r=this.destination;r.add(this.scheduler.schedule(e.dispatch,this.delay,new ObserveOnMessage(t,this.destination)))};e.prototype._next=function(t){this.scheduleMessage(Notification.createNext(t))};e.prototype._error=function(t){this.scheduleMessage(Notification.createError(t));this.unsubscribe()};e.prototype._complete=function(){this.scheduleMessage(Notification.createComplete());this.unsubscribe()};return e}(Subscriber);var ObserveOnMessage=function(){function t(t,e){this.notification=t;this.destination=e}return t}();var ReplaySubject=function(t){__extends(e,t);function e(e,r,i){if(e===void 0){e=Number.POSITIVE_INFINITY}if(r===void 0){r=Number.POSITIVE_INFINITY}var n=t.call(this)||this;n.scheduler=i;n._events=[];n._infiniteTimeWindow=false;n._bufferSize=e<1?1:e;n._windowTime=r<1?1:r;if(r===Number.POSITIVE_INFINITY){n._infiniteTimeWindow=true;n.next=n.nextInfiniteTimeWindow}else{n.next=n.nextTimeWindow}return n}e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var r=this._events;r.push(e);if(r.length>this._bufferSize){r.shift()}}t.prototype.next.call(this,e)};e.prototype.nextTimeWindow=function(e){if(!this.isStopped){this._events.push(new ReplayEvent(this._getNow(),e));this._trimBufferThenGetEvents()}t.prototype.next.call(this,e)};e.prototype._subscribe=function(t){var e=this._infiniteTimeWindow;var r=e?this._events:this._trimBufferThenGetEvents();var i=this.scheduler;var n=r.length;var s;if(this.closed){throw new ObjectUnsubscribedError}else if(this.isStopped||this.hasError){s=Subscription.EMPTY}else{this.observers.push(t);s=new SubjectSubscription(this,t)}if(i){t.add(t=new ObserveOnSubscriber(t,i))}if(e){for(var o=0;o<n&&!t.closed;o++){t.next(r[o])}}else{for(var o=0;o<n&&!t.closed;o++){t.next(r[o].value)}}if(this.hasError){t.error(this.thrownError)}else if(this.isStopped){t.complete()}return s};e.prototype._getNow=function(){return(this.scheduler||queue).now()};e.prototype._trimBufferThenGetEvents=function(){var t=this._getNow();var e=this._bufferSize;var r=this._windowTime;var i=this._events;var n=i.length;var s=0;while(s<n){if(t-i[s].time<r){break}s++}if(n>e){s=Math.max(s,n-e)}if(s>0){i.splice(0,s)}return i};return e}(Subject);var ReplayEvent=function(){function t(t,e){this.time=t;this.value=e}return t}();var asyncScheduler=new AsyncScheduler(AsyncAction);var async=asyncScheduler;function isObservable(t){return!!t&&(t instanceof Observable||typeof t.lift==="function"&&typeof t.subscribe==="function")}var ArgumentOutOfRangeErrorImpl=function(){function t(){Error.call(this);this.message="argument out of range";this.name="ArgumentOutOfRangeError";return this}t.prototype=Object.create(Error.prototype);return t}();var ArgumentOutOfRangeError=ArgumentOutOfRangeErrorImpl;function map(t,e){return function r(i){if(typeof t!=="function"){throw new TypeError("argument is not a function. Are you looking for `mapTo()`?")}return i.lift(new MapOperator(t,e))}}var MapOperator=function(){function t(t,e){this.project=t;this.thisArg=e}t.prototype.call=function(t,e){return e.subscribe(new MapSubscriber(t,this.project,this.thisArg))};return t}();var MapSubscriber=function(t){__extends(e,t);function e(e,r,i){var n=t.call(this,e)||this;n.project=r;n.count=0;n.thisArg=i||n;return n}e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){this.destination.error(t);return}this.destination.next(e)};return e}(Subscriber);var subscribeToPromise=function(t){return function(e){t.then((function(t){if(!e.closed){e.next(t);e.complete()}}),(function(t){return e.error(t)})).then(null,hostReportError);return e}};function getSymbolIterator(){if(typeof Symbol!=="function"||!Symbol.iterator){return"@@iterator"}return Symbol.iterator}var iterator=getSymbolIterator();var subscribeToIterable=function(t){return function(e){var r=t[iterator]();do{var i=void 0;try{i=r.next()}catch(t){e.error(t);return e}if(i.done){e.complete();break}e.next(i.value);if(e.closed){break}}while(true);if(typeof r.return==="function"){e.add((function(){if(r.return){r.return()}}))}return e}};var subscribeToObservable=function(t){return function(e){var r=t[observable]();if(typeof r.subscribe!=="function"){throw new TypeError("Provided object does not correctly implement Symbol.observable")}else{return r.subscribe(e)}}};var isArrayLike=function(t){return t&&typeof t.length==="number"&&typeof t!=="function"};function isPromise(t){return!!t&&typeof t.subscribe!=="function"&&typeof t.then==="function"}var subscribeTo=function(t){if(!!t&&typeof t[observable]==="function"){return subscribeToObservable(t)}else if(isArrayLike(t)){return subscribeToArray(t)}else if(isPromise(t)){return subscribeToPromise(t)}else if(!!t&&typeof t[iterator]==="function"){return subscribeToIterable(t)}else{var e=isObject(t)?"an invalid object":"'"+t+"'";var r="You provided "+e+" where a stream was expected."+" You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(r)}};function scheduleObservable(t,e){return new Observable((function(r){var i=new Subscription;i.add(e.schedule((function(){var n=t[observable]();i.add(n.subscribe({next:function(t){i.add(e.schedule((function(){return r.next(t)})))},error:function(t){i.add(e.schedule((function(){return r.error(t)})))},complete:function(){i.add(e.schedule((function(){return r.complete()})))}}))})));return i}))}function schedulePromise(t,e){return new Observable((function(r){var i=new Subscription;i.add(e.schedule((function(){return t.then((function(t){i.add(e.schedule((function(){r.next(t);i.add(e.schedule((function(){return r.complete()})))})))}),(function(t){i.add(e.schedule((function(){return r.error(t)})))}))})));return i}))}function scheduleIterable(t,e){if(!t){throw new Error("Iterable cannot be null")}return new Observable((function(r){var i=new Subscription;var n;i.add((function(){if(n&&typeof n.return==="function"){n.return()}}));i.add(e.schedule((function(){n=t[iterator]();i.add(e.schedule((function(){if(r.closed){return}var t;var e;try{var i=n.next();t=i.value;e=i.done}catch(t){r.error(t);return}if(e){r.complete()}else{r.next(t);this.schedule()}})))})));return i}))}function isInteropObservable(t){return t&&typeof t[observable]==="function"}function isIterable(t){return t&&typeof t[iterator]==="function"}function scheduled(t,e){if(t!=null){if(isInteropObservable(t)){return scheduleObservable(t,e)}else if(isPromise(t)){return schedulePromise(t,e)}else if(isArrayLike(t)){return scheduleArray(t,e)}else if(isIterable(t)||typeof t==="string"){return scheduleIterable(t,e)}}throw new TypeError((t!==null&&typeof t||t)+" is not observable")}function from(t,e){if(!e){if(t instanceof Observable){return t}return new Observable(subscribeTo(t))}else{return scheduled(t,e)}}var SimpleInnerSubscriber=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;r.parent=e;return r}e.prototype._next=function(t){this.parent.notifyNext(t)};e.prototype._error=function(t){this.parent.notifyError(t);this.unsubscribe()};e.prototype._complete=function(){this.parent.notifyComplete();this.unsubscribe()};return e}(Subscriber);var SimpleOuterSubscriber=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype.notifyNext=function(t){this.destination.next(t)};e.prototype.notifyError=function(t){this.destination.error(t)};e.prototype.notifyComplete=function(){this.destination.complete()};return e}(Subscriber);function innerSubscribe(t,e){if(e.closed){return undefined}if(t instanceof Observable){return t.subscribe(e)}return subscribeTo(t)(e)}function filter(t,e){return function r(i){return i.lift(new FilterOperator(t,e))}}var FilterOperator=function(){function t(t,e){this.predicate=t;this.thisArg=e}t.prototype.call=function(t,e){return e.subscribe(new FilterSubscriber(t,this.predicate,this.thisArg))};return t}();var FilterSubscriber=function(t){__extends(e,t);function e(e,r,i){var n=t.call(this,e)||this;n.predicate=r;n.thisArg=i;n.count=0;return n}e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){this.destination.error(t);return}if(e){this.destination.next(t)}};return e}(Subscriber);function isDate(t){return t instanceof Date&&!isNaN(+t)}function delay(t,e){if(e===void 0){e=async}var r=isDate(t);var i=r?+t-e.now():Math.abs(t);return function(t){return t.lift(new DelayOperator(i,e))}}var DelayOperator=function(){function t(t,e){this.delay=t;this.scheduler=e}t.prototype.call=function(t,e){return e.subscribe(new DelaySubscriber(t,this.delay,this.scheduler))};return t}();var DelaySubscriber=function(t){__extends(e,t);function e(e,r,i){var n=t.call(this,e)||this;n.delay=r;n.scheduler=i;n.queue=[];n.active=false;n.errored=false;return n}e.dispatch=function(t){var e=t.source;var r=e.queue;var i=t.scheduler;var n=t.destination;while(r.length>0&&r[0].time-i.now()<=0){r.shift().notification.observe(n)}if(r.length>0){var s=Math.max(0,r[0].time-i.now());this.schedule(t,s)}else{this.unsubscribe();e.active=false}};e.prototype._schedule=function(t){this.active=true;var r=this.destination;r.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))};e.prototype.scheduleNotification=function(t){if(this.errored===true){return}var e=this.scheduler;var r=new DelayMessage(e.now()+this.delay,t);this.queue.push(r);if(this.active===false){this._schedule(e)}};e.prototype._next=function(t){this.scheduleNotification(Notification.createNext(t))};e.prototype._error=function(t){this.errored=true;this.queue=[];this.destination.error(t);this.unsubscribe()};e.prototype._complete=function(){this.scheduleNotification(Notification.createComplete());this.unsubscribe()};return e}(Subscriber);var DelayMessage=function(){function t(t,e){this.time=t;this.notification=e}return t}();function distinctUntilChanged(t,e){return function(r){return r.lift(new DistinctUntilChangedOperator(t,e))}}var DistinctUntilChangedOperator=function(){function t(t,e){this.compare=t;this.keySelector=e}t.prototype.call=function(t,e){return e.subscribe(new DistinctUntilChangedSubscriber(t,this.compare,this.keySelector))};return t}();var DistinctUntilChangedSubscriber=function(t){__extends(e,t);function e(e,r,i){var n=t.call(this,e)||this;n.keySelector=i;n.hasKey=false;if(typeof r==="function"){n.compare=r}return n}e.prototype.compare=function(t,e){return t===e};e.prototype._next=function(t){var e;try{var r=this.keySelector;e=r?r(t):t}catch(t){return this.destination.error(t)}var i=false;if(this.hasKey){try{var n=this.compare;i=n(this.key,e)}catch(t){return this.destination.error(t)}}else{this.hasKey=true}if(!i){this.key=e;this.destination.next(t)}};return e}(Subscriber);function take(t){return function(e){if(t===0){return empty$1()}else{return e.lift(new TakeOperator(t))}}}var TakeOperator=function(){function t(t){this.total=t;if(this.total<0){throw new ArgumentOutOfRangeError}}t.prototype.call=function(t,e){return e.subscribe(new TakeSubscriber(t,this.total))};return t}();var TakeSubscriber=function(t){__extends(e,t);function e(e,r){var i=t.call(this,e)||this;i.total=r;i.count=0;return i}e.prototype._next=function(t){var e=this.total;var r=++this.count;if(r<=e){this.destination.next(t);if(r===e){this.destination.complete();this.unsubscribe()}}};return e}(Subscriber);function switchMap(t,e){if(typeof e==="function"){return function(r){return r.pipe(switchMap((function(r,i){return from(t(r,i)).pipe(map((function(t,n){return e(r,t,i,n)})))})))}}return function(e){return e.lift(new SwitchMapOperator(t))}}var SwitchMapOperator=function(){function t(t){this.project=t}t.prototype.call=function(t,e){return e.subscribe(new SwitchMapSubscriber(t,this.project))};return t}();var SwitchMapSubscriber=function(t){__extends(e,t);function e(e,r){var i=t.call(this,e)||this;i.project=r;i.index=0;return i}e.prototype._next=function(t){var e;var r=this.index++;try{e=this.project(t,r)}catch(t){this.destination.error(t);return}this._innerSub(e)};e.prototype._innerSub=function(t){var e=this.innerSubscription;if(e){e.unsubscribe()}var r=new SimpleInnerSubscriber(this);var i=this.destination;i.add(r);this.innerSubscription=innerSubscribe(t,r);if(this.innerSubscription!==r){i.add(this.innerSubscription)}};e.prototype._complete=function(){var e=this.innerSubscription;if(!e||e.closed){t.prototype._complete.call(this)}this.unsubscribe()};e.prototype._unsubscribe=function(){this.innerSubscription=undefined};e.prototype.notifyComplete=function(){this.innerSubscription=undefined;if(this.isStopped){t.prototype._complete.call(this)}};e.prototype.notifyNext=function(t){this.destination.next(t)};return e}(SimpleOuterSubscriber);var currentAction={type:null,entityIds:null,skip:false};var customActionActive=false;function resetCustomAction(){customActionActive=false}function logAction(t,e){setAction(t,e);customActionActive=true}function setAction(t,e){if(customActionActive===false){currentAction.type=t;currentAction.entityIds=e}}function action(t,e){return function(r,i,n){var s=n.value;n.value=function(){var r=[];for(var i=0;i<arguments.length;i++){r[i]=arguments[i]}logAction(t,e);return s.apply(this,r)};return n}}function hasEntity(t,e){return t.hasOwnProperty(e)}function addEntities(t){var e=t.state,r=t.entities,i=t.idKey,n=t.options,s=n===void 0?{}:n,o=t.preAddEntity;var a={};var u=[];var c=false;for(var f=0,l=r;f<l.length;f++){var h=l[f];if(hasEntity(e.entities,h[i])===false){var p=o(h);var d=p[i];a[d]=p;if(s.prepend)u.unshift(d);else u.push(d);c=true}}return c?{newState:Object.assign({},e,{entities:Object.assign({},e.entities,a),ids:s.prepend?__spreadArrays(u,e.ids):__spreadArrays(e.ids,u)}),newIds:u}:null}function isNil(t){return t===null||t===undefined}function coerceArray(t){if(isNil(t)){return[]}return Array.isArray(t)?t:[t]}var DEFAULT_ID_KEY="id";var EntityActions;(function(t){t["Set"]="Set";t["Add"]="Add";t["Update"]="Update";t["Remove"]="Remove"})(EntityActions||(EntityActions={}));var isBrowser=typeof window!=="undefined";var __DEV__=true;function enableAkitaProdMode(){__DEV__=false;if(isBrowser){delete window.$$stores;delete window.$$queries}}function isDev(){return __DEV__}function isObject$1(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function isArray$1(t){return Array.isArray(t)}function getActiveEntities(t,e,r){var i;if(isArray$1(t)){i=t}else{if(isObject$1(t)){if(isNil(r))return;t=Object.assign({wrap:true},t);var n=e.indexOf(r);if(t.prev){var s=n===0;if(s&&!t.wrap)return;i=s?e[e.length-1]:e[n-1]}else if(t.next){var o=e.length===n+1;if(o&&!t.wrap)return;i=o?e[0]:e[n+1]}}else{if(t===r)return;i=t}}return i}var getInitialEntitiesState=function(){return{entities:{},ids:[],loading:true,error:null}};function isDefined(t){return isNil(t)===false}function isEmpty(t){if(isArray$1(t)){return t.length===0}return false}function isFunction$1(t){return typeof t==="function"}function isUndefined(t){return t===undefined}function hasActiveState(t){return t.hasOwnProperty("active")}function isMultiActiveState(t){return isArray$1(t)}function resolveActiveEntity(t){var e=t.active,r=t.ids,i=t.entities;if(isMultiActiveState(e)){return getExitingActives(e,r)}if(hasEntity(i,e)===false){return null}return e}function getExitingActives(t,e){var r=t.filter((function(t){return e.indexOf(t)>-1}));if(r.length===t.length){return t}return r}function removeEntities(t){var e=t.state,r=t.ids;if(isNil(r))return removeAllEntities(e);var i=e.entities;var n={};for(var s=0,o=e.ids;s<o.length;s++){var a=o[s];if(r.includes(a)===false){n[a]=i[a]}}var u=Object.assign({},e,{entities:n,ids:e.ids.filter((function(t){return r.includes(t)===false}))});if(hasActiveState(e)){u.active=resolveActiveEntity(u)}return u}function removeAllEntities(t){return Object.assign({},t,{entities:{},ids:[],active:isMultiActiveState(t.active)?[]:null})}function toEntitiesObject(t,e,r){var i={entities:{},ids:[]};for(var n=0,s=t;n<s.length;n++){var o=s[n];var a=r(o);i.entities[a[e]]=a;i.ids.push(a[e])}return i}function isEntityState(t){return t.entities&&t.ids}function applyMiddleware(t,e){var r={};for(var i=0,n=Object.keys(t);i<n.length;i++){var s=n[i];r[s]=e(t[s])}return r}function setEntities(t){var e=t.state,r=t.entities,i=t.idKey,n=t.preAddEntity,s=t.isNativePreAdd;var o;var a;if(isArray$1(r)){var u=toEntitiesObject(r,i,n);o=u.entities;a=u.ids}else if(isEntityState(r)){o=s?r.entities:applyMiddleware(r.entities,n);a=r.ids}else{o=s?r:applyMiddleware(r,n);a=Object.keys(o).map((function(t){return isNaN(t)?t:Number(t)}))}var c=Object.assign({},e,{entities:o,ids:a,loading:false});if(hasActiveState(e)){c.active=resolveActiveEntity(c)}return c}var CONFIG={resettable:false,ttl:null,producerFn:undefined};function getAkitaConfig(){return CONFIG}function getGlobalProducerFn(){return CONFIG.producerFn}function deepFreeze(t){Object.freeze(t);var e=typeof t==="function";var r=Object.prototype.hasOwnProperty;Object.getOwnPropertyNames(t).forEach((function(i){if(r.call(t,i)&&(e?i!=="caller"&&i!=="callee"&&i!=="arguments":true)&&t[i]!==null&&(typeof t[i]==="object"||typeof t[i]==="function")&&!Object.isFrozen(t[i])){deepFreeze(t[i])}}));return t}var $$deleteStore=new Subject;var $$addStore=new ReplaySubject(50,5e3);var $$updateStore=new Subject;function dispatchDeleted(t){$$deleteStore.next(t)}function dispatchAdded(t){$$addStore.next(t)}function dispatchUpdate(t,e){$$updateStore.next({storeName:t,action:e})}function assertStoreHasName(t,e){if(!t){console.error("@StoreConfig({ name }) is missing in "+e)}}function toBoolean(t){return t!=null&&""+t!=="false"}function isPlainObject(t){return toBoolean(t)&&t.constructor.name==="Object"}var configKey="akitaConfig";function StoreConfig(t){return function(e){e[configKey]={idKey:"id"};for(var r=0,i=Object.keys(t);r<i.length;r++){var n=i[r];if(n==="name"){e[configKey]["storeName"]=t[n]}else{e[configKey][n]=t[n]}}}}var __stores__={};var __queries__={};if(isBrowser){window.$$stores=__stores__;window.$$queries=__queries__}var transactionFinished=new Subject;var transactionInProcess=new BehaviorSubject(false);var transactionManager={activeTransactions:0,batchTransaction:null};function startBatch(){if(!isTransactionInProcess()){transactionManager.batchTransaction=new Subject}transactionManager.activeTransactions++;transactionInProcess.next(true)}function endBatch(){if(--transactionManager.activeTransactions===0){transactionManager.batchTransaction.next(true);transactionManager.batchTransaction.complete();transactionInProcess.next(false);transactionFinished.next(true)}}function isTransactionInProcess(){return transactionManager.activeTransactions>0}function commit(){return transactionManager.batchTransaction?transactionManager.batchTransaction.asObservable():of(true)}function applyTransaction(t,e){if(e===void 0){e=undefined}startBatch();try{return t.apply(e)}finally{logAction("@Transaction");endBatch()}}function transaction(){return function(t,e,r){var i=r.value;r.value=function(){var t=this;var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}return applyTransaction((function(){return i.apply(t,e)}),this)};return r}}var Store=function(){function t(t,e){if(e===void 0){e={}}this.options=e;this.inTransaction=false;this.cache={active:new BehaviorSubject(false),ttl:null};this.onInit(t)}t.prototype.setLoading=function(t){if(t===void 0){t=false}if(t!==this._value().loading){isDev()&&setAction("Set Loading");this._setState((function(e){return Object.assign({},e,{loading:t})}))}};t.prototype.setHasCache=function(t,e){var r=this;if(e===void 0){e={restartTTL:false}}if(t!==this.cache.active.value){this.cache.active.next(t)}if(e.restartTTL){var i=this.getCacheTTL();if(i){if(this.cache.ttl!==null){clearTimeout(this.cache.ttl)}this.cache.ttl=setTimeout((function(){return r.setHasCache(false)}),i)}}};t.prototype.getValue=function(){return this.storeValue};t.prototype.setError=function(t){if(t!==this._value().error){isDev()&&setAction("Set Error");this._setState((function(e){return Object.assign({},e,{error:t})}))}};t.prototype._select=function(t){return this.store.asObservable().pipe(map((function(e){return t(e.state)})),distinctUntilChanged())};t.prototype._value=function(){return this.storeValue};t.prototype._cache=function(){return this.cache.active};Object.defineProperty(t.prototype,"config",{get:function(){return this.constructor[configKey]||{}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"storeName",{get:function(){return this.config.storeName||this.options.storeName||this.options.name},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"deepFreeze",{get:function(){return this.config.deepFreezeFn||this.options.deepFreezeFn||deepFreeze},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"cacheConfig",{get:function(){return this.config.cache||this.options.cache},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"_producerFn",{get:function(){return this.config.producerFn||this.options.producerFn||getGlobalProducerFn()},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"resettable",{get:function(){return isDefined(this.config.resettable)?this.config.resettable:this.options.resettable},enumerable:false,configurable:true});t.prototype._setState=function(t,e){var r=this;if(e===void 0){e=true}if(isFunction$1(t)){var i=t(this._value());this.storeValue=__DEV__?this.deepFreeze(i):i}else{this.storeValue=t}if(!this.store){this.store=new BehaviorSubject({state:this.storeValue});if(isDev()){this.store.subscribe((function(t){var e=t.action;if(e){dispatchUpdate(r.storeName,e)}}))}return}if(isTransactionInProcess()){this.handleTransaction();return}this.dispatch(this.storeValue,e)};t.prototype.reset=function(){var t=this;if(this.isResettable()){isDev()&&setAction("Reset");this._setState((function(){return Object.assign({},t._initialState)}));this.setHasCache(false)}else{isDev()&&console.warn("You need to enable the reset functionality")}};t.prototype.update=function(t){isDev()&&setAction("Update");var e;var r=this._value();if(isFunction$1(t)){e=isFunction$1(this._producerFn)?this._producerFn(r,t):t(r)}else{e=t}var i=this.akitaPreUpdate(r,Object.assign({},r,e));var n=isPlainObject(r)?i:new r.constructor(i);this._setState(n)};t.prototype.updateStoreConfig=function(t){this.options=Object.assign({},this.options,t)};t.prototype.akitaPreUpdate=function(t,e){return e};t.prototype.ngOnDestroy=function(){this.destroy()};t.prototype.destroy=function(){var t=isBrowser?window.hmrEnabled:false;if(!t&&this===__stores__[this.storeName]){delete __stores__[this.storeName];dispatchDeleted(this.storeName);this.setHasCache(false);this.cache.active.complete();this.store.complete()}};t.prototype.onInit=function(t){__stores__[this.storeName]=this;this._setState((function(){return t}));dispatchAdded(this.storeName);if(this.isResettable()){this._initialState=t}isDev()&&assertStoreHasName(this.storeName,this.constructor.name)};t.prototype.dispatch=function(t,e){if(e===void 0){e=true}var r=undefined;if(e){r=currentAction;resetCustomAction()}this.store.next({state:t,action:r})};t.prototype.watchTransaction=function(){var t=this;commit().subscribe((function(){t.inTransaction=false;t.dispatch(t._value())}))};t.prototype.isResettable=function(){if(this.resettable===false){return false}return this.resettable||getAkitaConfig().resettable};t.prototype.handleTransaction=function(){if(!this.inTransaction){this.watchTransaction();this.inTransaction=true}};t.prototype.getCacheTTL=function(){return this.cacheConfig&&this.cacheConfig.ttl||getAkitaConfig().ttl};return t}();function updateEntities(t){var e=t.state,r=t.ids,i=t.idKey,n=t.newStateOrFn,s=t.preUpdateEntity,o=t.producerFn,a=t.onEntityIdChanges;var u={};var c=false;var f;for(var l=0,h=r;l<h.length;l++){var p=h[l];if(hasEntity(e.entities,p)===false){continue}var d=e.entities[p];var b=void 0;if(isFunction$1(n)){b=isFunction$1(o)?o(d,n):n(d)}else{b=n}var y=b.hasOwnProperty(i)&&b[i]!==d[i];var v=void 0;f=p;if(y){c=true;f=b[i]}var g=Object.assign({},d,b);if(isPlainObject(d)){v=g}else{if(isPlainObject(b)){v=new d.constructor(g)}else{v=new b.constructor(g)}}u[f]=s(d,v)}var _=e.ids;var S=e.entities;if(c){var m=r[0];var E=e.entities,w=m,O=__rest(E,[typeof w==="symbol"?w:w+""]);S=O;_=e.ids.map((function(t){return t===m?f:t}));a(m,f)}return Object.assign({},e,{entities:Object.assign({},S,u),ids:_})}var _b;var EntityStore=function(t){__extends(e,t);function e(e,r){if(e===void 0){e={}}if(r===void 0){r={}}var i=t.call(this,Object.assign({},getInitialEntitiesState(),e),r)||this;i.options=r;i.entityActions=new Subject;i.entityIdChanges=new Subject;return i}Object.defineProperty(e.prototype,"selectEntityAction$",{get:function(){return this.entityActions.asObservable()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectEntityIdChanges$",{get:function(){return this.entityIdChanges.asObservable()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"idKey",{get:function(){return this.config.idKey||this.options.idKey||DEFAULT_ID_KEY},enumerable:false,configurable:true});e.prototype.set=function(t,r){var i=this;if(r===void 0){r={}}if(isNil(t))return;isDev()&&setAction("Set Entity");var n=this.akitaPreAddEntity===e.prototype.akitaPreAddEntity;this.setHasCache(true,{restartTTL:true});this._setState((function(e){var s=setEntities({state:e,entities:t,idKey:i.idKey,preAddEntity:i.akitaPreAddEntity,isNativePreAdd:n});if(isUndefined(r.activeId)===false){s.active=r.activeId}return s}));if(this.hasInitialUIState()){this.handleUICreation()}this.entityActions.next({type:EntityActions.Set,ids:this.ids})};e.prototype.add=function(t,e){if(e===void 0){e={loading:false}}var r=coerceArray(t);if(isEmpty(r))return;var i=addEntities({state:this._value(),preAddEntity:this.akitaPreAddEntity,entities:r,idKey:this.idKey,options:e});if(i){isDev()&&setAction("Add Entity");i.newState.loading=e.loading;this._setState((function(){return i.newState}));if(this.hasInitialUIState()){this.handleUICreation(true)}this.entityActions.next({type:EntityActions.Add,ids:i.newIds})}};e.prototype.update=function(e,r){var i=this;if(isUndefined(r)){t.prototype.update.call(this,e);return}var n=[];if(isFunction$1(e)){n=this.ids.filter((function(t){return e(i.entities[t])}))}else{n=isNil(e)?this.ids:coerceArray(e)}if(isEmpty(n))return;isDev()&&setAction("Update Entity",n);var s;this._setState((function(t){return updateEntities({idKey:i.idKey,ids:n,preUpdateEntity:i.akitaPreUpdateEntity,state:t,newStateOrFn:r,producerFn:i._producerFn,onEntityIdChanges:function(t,e){s={oldId:t,newId:e};i.entityIdChanges.next(Object.assign({},s,{pending:true}))}})}));if(s){this.entityIdChanges.next(Object.assign({},s,{pending:false}))}this.entityActions.next({type:EntityActions.Update,ids:n})};e.prototype.upsert=function(t,e,r,i){var n=this;if(i===void 0){i={}}var s=coerceArray(t);var o=function(t){return function(e){return hasEntity(n.entities,e)===t}};var a=isFunction$1(r)?i.baseClass:r?r.baseClass:undefined;var u=isFunction$1(a);var c=s.filter(o(true));var f=s.filter(o(false)).map((function(t){var i;var s=typeof e==="function"?e({}):e;var o=isFunction$1(r)?r(t,s):s;var c=Object.assign({},o,(i={},i[n.idKey]=t,i));if(u){return new a(c)}return c}));this.update(c,e);this.add(f);isDev()&&logAction("Upsert Entity")};e.prototype.upsertMany=function(t,e){if(e===void 0){e={}}var r=[];var i=[];var n={};for(var s=0,o=t;s<o.length;s++){var a=o[s];var u=this.akitaPreCheckEntity(a);var c=u[this.idKey];if(hasEntity(this.entities,c)){var f=this._value().entities[c];var l=Object.assign({},this._value().entities[c],u);var h=e.baseClass?new e.baseClass(l):l;var p=this.akitaPreUpdateEntity(f,h);var d=p[this.idKey];n[d]=p;i.push(d)}else{var b=e.baseClass?new e.baseClass(u):u;var p=this.akitaPreAddEntity(b);var d=p[this.idKey];r.push(d);n[d]=p}}isDev()&&logAction("Upsert Many");this._setState((function(t){return Object.assign({},t,{ids:r.length?__spreadArrays(t.ids,r):t.ids,entities:Object.assign({},t.entities,n),loading:!!e.loading})}));i.length&&this.entityActions.next({type:EntityActions.Update,ids:i});r.length&&this.entityActions.next({type:EntityActions.Add,ids:r});if(r.length&&this.hasUIStore()){this.handleUICreation(true)}};e.prototype.replace=function(t,e){var r=coerceArray(t);if(isEmpty(r))return;var i={};for(var n=0,s=r;n<s.length;n++){var o=s[n];e[this.idKey]=o;i[o]=e}isDev()&&setAction("Replace Entity",t);this._setState((function(t){return Object.assign({},t,{entities:Object.assign({},t.entities,i)})}))};e.prototype.move=function(t,e){var r=this.ids.slice();r.splice(e<0?r.length+e:e,0,r.splice(t,1)[0]);isDev()&&setAction("Move Entity");this._setState((function(t){return Object.assign({},t,{entities:Object.assign({},t.entities),ids:r})}))};e.prototype.remove=function(t){var e=this;if(isEmpty(this.ids))return;var r=isDefined(t);var i=[];if(isFunction$1(t)){i=this.ids.filter((function(r){return t(e.entities[r])}))}else{i=r?coerceArray(t):this.ids}if(isEmpty(i))return;isDev()&&setAction("Remove Entity",i);this._setState((function(t){return removeEntities({state:t,ids:i})}));if(!r){this.setHasCache(false)}this.handleUIRemove(i);this.entityActions.next({type:EntityActions.Remove,ids:i})};e.prototype.updateActive=function(t){var e=coerceArray(this.active);isDev()&&setAction("Update Active",e);this.update(e,t)};e.prototype.setActive=function(t){var e=getActiveEntities(t,this.ids,this.active);if(e===undefined){return}isDev()&&setAction("Set Active",e);this._setActive(e)};e.prototype.addActive=function(t){var e=this;var r=coerceArray(t);if(isEmpty(r))return;var i=r.every((function(t){return e.active.indexOf(t)>-1}));if(i)return;isDev()&&setAction("Add Active",t);this._setState((function(t){var e=Array.from(new Set(__spreadArrays(t.active,r)));return Object.assign({},t,{active:e})}))};e.prototype.removeActive=function(t){var e=this;var r=coerceArray(t);if(isEmpty(r))return;var i=r.some((function(t){return e.active.indexOf(t)>-1}));if(!i)return;isDev()&&setAction("Remove Active",t);this._setState((function(t){return Object.assign({},t,{active:Array.isArray(t.active)?t.active.filter((function(t){return r.indexOf(t)===-1})):null})}))};e.prototype.toggleActive=function(t){var e=this;var r=coerceArray(t);var i=function(t){return function(r){return e.active.includes(r)===t}};var n=r.filter(i(true));var s=r.filter(i(false));this.removeActive(n);this.addActive(s);isDev()&&logAction("Toggle Active")};e.prototype.createUIStore=function(t,e){if(t===void 0){t={}}if(e===void 0){e={}}var r={name:"UI/"+this.storeName,idKey:this.idKey};this.ui=new EntityUIStore(t,Object.assign({},r,e));return this.ui};e.prototype.destroy=function(){t.prototype.destroy.call(this);if(this.ui instanceof e){this.ui.destroy()}this.entityActions.complete()};e.prototype.akitaPreUpdateEntity=function(t,e){return e};e.prototype.akitaPreAddEntity=function(t){return t};e.prototype.akitaPreCheckEntity=function(t){return t};Object.defineProperty(e.prototype,"ids",{get:function(){return this._value().ids},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"entities",{get:function(){return this._value().entities},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"active",{get:function(){return this._value().active},enumerable:false,configurable:true});e.prototype._setActive=function(t){this._setState((function(e){return Object.assign({},e,{active:t})}))};e.prototype.handleUICreation=function(t){var e=this;if(t===void 0){t=false}var r=this.ids;var i=isFunction$1(this.ui._akitaCreateEntityFn);var n;var s=function(t){var r;var n=e.entities[t];var s=i?e.ui._akitaCreateEntityFn(n):e.ui._akitaCreateEntityFn;return Object.assign((r={},r[e.idKey]=n[e.idKey],r),s)};if(t){n=this.ids.filter((function(t){return isUndefined(e.ui.entities[t])})).map(s)}else{n=r.map(s)}t?this.ui.add(n):this.ui.set(n)};e.prototype.hasInitialUIState=function(){return this.hasUIStore()&&isUndefined(this.ui._akitaCreateEntityFn)===false};e.prototype.handleUIRemove=function(t){if(this.hasUIStore()){this.ui.remove(t)}};e.prototype.hasUIStore=function(){return this.ui instanceof EntityUIStore};return e}(Store);__decorate([transaction(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object,Object,Object,Object]),__metadata("design:returntype",void 0)],EntityStore.prototype,"upsert",null);__decorate([transaction(),__metadata("design:type",Function),__metadata("design:paramtypes",[typeof(_b=typeof T!=="undefined"&&T)==="function"?_b:Object]),__metadata("design:returntype",void 0)],EntityStore.prototype,"toggleActive",null);var EntityUIStore=function(t){__extends(e,t);function e(e,r){if(e===void 0){e={}}if(r===void 0){r={}}return t.call(this,e,r)||this}e.prototype.setInitialEntityState=function(t){this._akitaCreateEntityFn=t};return e}(EntityStore);var Order;(function(t){t["ASC"]="asc";t["DESC"]="desc"})(Order||(Order={}));function isString(t){return typeof t==="string"}var queryConfigKey="akitaQueryConfig";function compareKeys(t){return function(e,r){var i=isFunction$1(t[0]);return t.some((function(t){if(i){return t(e)!==t(r)}return e[t]!==r[t]}))===false}}var Query=function(){function t(t){this.store=t;this.__store__=t;if(isDev()){__queries__[t.storeName]=this}}t.prototype.select=function(t){var e;if(isFunction$1(t)){e=t}else if(isString(t)){e=function(e){return e[t]}}else if(Array.isArray(t)){return this.store._select((function(t){return t})).pipe(distinctUntilChanged(compareKeys(t)),map((function(e){if(isFunction$1(t[0])){return t.map((function(t){return t(e)}))}return t.reduce((function(t,r){t[r]=e[r];return t}),{})})))}else{e=function(t){return t}}return this.store._select(e)};t.prototype.selectLoading=function(){return this.select((function(t){return t.loading}))};t.prototype.selectError=function(){return this.select((function(t){return t.error}))};t.prototype.getValue=function(){return this.store._value()};t.prototype.selectHasCache=function(){return this.store._cache().asObservable()};t.prototype.getHasCache=function(){return this.store._cache().value};Object.defineProperty(t.prototype,"config",{get:function(){return this.constructor[queryConfigKey]},enumerable:false,configurable:true});return t}();var filterNil=function(t){return t.pipe(filter((function(t){return t!==null&&typeof t!=="undefined"})))};function getValue(t,e){if(e.split(".").length===1){return t}var r=e.split(".").slice(1).join(".");return r.split(".").reduce((function(t,e){return t&&t[e]}),t)}function setValue(t,e,r){var i=e.split(".");if(i.length===1){return Object.assign({},t,r)}t=Object.assign({},t);var n=i.length-2;var s=e.split(".").slice(1);s.reduce((function(t,e,i){if(i!==n){t[e]=Object.assign({},t[e]);return t&&t[e]}t[e]=Array.isArray(t[e])||!isObject$1(t[e])?r:Object.assign({},t[e],r);return t&&t[e]}),t);return t}var _persistStateInit=new ReplaySubject(1);var AkitaPlugin=function(){function t(t,e){this.query=t;if(e&&e.resetFn){if(getAkitaConfig().resettable){this.onReset(e.resetFn)}}}t.prototype.getQuery=function(){return this.query};t.prototype.getStore=function(){return this.getQuery().__store__};t.prototype.isEntityBased=function(t){return toBoolean(t)};t.prototype.selectSource=function(t,e){var r=this;if(this.isEntityBased(t)){return this.getQuery().selectEntity(t).pipe(filterNil)}if(e){return this.getQuery().select((function(t){return getValue(t,r.withStoreName(e))}))}return this.getQuery().select()};t.prototype.getSource=function(t,e){if(this.isEntityBased(t)){return this.getQuery().getEntity(t)}var r=this.getQuery().getValue();if(e){return getValue(r,this.withStoreName(e))}return r};t.prototype.withStoreName=function(t){return this.storeName+"."+t};Object.defineProperty(t.prototype,"storeName",{get:function(){return this.getStore().storeName},enumerable:false,configurable:true});t.prototype.updateStore=function(t,e,r){var i=this;if(this.isEntityBased(e)){this.getStore().update(e,t)}else{if(r){this.getStore()._setState((function(e){return setValue(e,i.withStoreName(r),t)}));return}this.getStore()._setState((function(e){return Object.assign({},e,t)}))}};t.prototype.onReset=function(t){var e=this;var r=this.getStore().reset;this.getStore().reset=function(){var i=[];for(var n=0;n<arguments.length;n++){i[n]=arguments[n]}setTimeout((function(){r.apply(e.getStore(),i);t()}))}};return t}();var paginatorDefaults={pagesControls:false,range:false,startWith:1,cacheTimeout:undefined,clearStoreWithCache:true};var PaginatorPlugin=function(t){__extends(e,t);function e(e,r){if(r===void 0){r={}}var i=t.call(this,e,{resetFn:function(){i.initial=false;i.destroy({clearCache:true,currentPage:1})}})||this;i.query=e;i.config=r;i.metadata=new Map;i.pages=new Map;i.pagination={currentPage:1,perPage:0,total:0,lastPage:0,data:[]};i.initial=true;i.isLoading$=i.query.selectLoading().pipe(delay(0));i.config=Object.assign(paginatorDefaults,r);var n=i.config,s=n.startWith,o=n.cacheTimeout;i.page=new BehaviorSubject(s);if(isObservable(o)){i.clearCacheSubscription=o.subscribe((function(){return i.clearCache()}))}return i}Object.defineProperty(e.prototype,"pageChanges",{get:function(){return this.page.asObservable()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentPage",{get:function(){return this.pagination.currentPage},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFirst",{get:function(){return this.currentPage===1},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isLast",{get:function(){return this.currentPage===this.pagination.lastPage},enumerable:false,configurable:true});e.prototype.withControls=function(){this.config.pagesControls=true;return this};e.prototype.withRange=function(){this.config.range=true;return this};e.prototype.setLoading=function(t){if(t===void 0){t=true}this.getStore().setLoading(t)};e.prototype.update=function(t){this.pagination=t;this.addPage(t.data)};e.prototype.addPage=function(t){var e=this;this.pages.set(this.currentPage,{ids:t.map((function(t){return t[e.getStore().idKey]}))});this.getStore().upsertMany(t)};e.prototype.clearCache=function(t){if(t===void 0){t={}}if(!this.initial){logAction("@Pagination - Clear Cache");if(t.clearStore!==false&&(this.config.clearStoreWithCache||t.clearStore)){this.getStore().remove()}this.pages=new Map;this.metadata=new Map}this.initial=false};e.prototype.clearPage=function(t){this.pages.delete(t)};e.prototype.destroy=function(t){var e=t===void 0?{}:t,r=e.clearCache,i=e.currentPage;if(this.clearCacheSubscription){this.clearCacheSubscription.unsubscribe()}if(r){this.clearCache()}if(!isUndefined(i)){this.setPage(i)}this.initial=true};e.prototype.isPageActive=function(t){return this.currentPage===t};e.prototype.setPage=function(t){if(t!==this.currentPage||!this.hasPage(t)){this.page.next(this.pagination.currentPage=t)}};e.prototype.nextPage=function(){if(this.currentPage!==this.pagination.lastPage){this.setPage(this.pagination.currentPage+1)}};e.prototype.prevPage=function(){if(this.pagination.currentPage>1){this.setPage(this.pagination.currentPage-1)}};e.prototype.setLastPage=function(){this.setPage(this.pagination.lastPage)};e.prototype.setFirstPage=function(){this.setPage(1)};e.prototype.hasPage=function(t){return this.pages.has(t)};e.prototype.getPage=function(t){var e=this;var r=this.pagination.currentPage;if(this.hasPage(r)){return this.selectPage(r)}else{this.setLoading(true);return from(t()).pipe(switchMap((function(t){r=t.currentPage;applyTransaction((function(){e.setLoading(false);e.update(t)}));return e.selectPage(r)})))}};e.prototype.getQuery=function(){return this.query};e.prototype.refreshCurrentPage=function(){if(isNil(this.currentPage)===false){this.clearPage(this.currentPage);this.setPage(this.currentPage)}};e.prototype.getFrom=function(){if(this.isFirst){return 1}return(this.currentPage-1)*this.pagination.perPage+1};e.prototype.getTo=function(){if(this.isLast){return this.pagination.total}return this.currentPage*this.pagination.perPage};e.prototype.selectPage=function(t){var e=this;return this.query.selectAll({asObject:true}).pipe(take(1),map((function(r){var i=Object.assign({},e.pagination,{data:e.pages.get(t).ids.map((function(t){return r[t]}))});var n=e.config,s=n.range,o=n.pagesControls;if(isNaN(e.pagination.total)){if(i.lastPage===1){i.total=i.data?i.data.length:0}else{i.total=i.perPage*i.lastPage}e.pagination.total=i.total}if(s){i.from=e.getFrom();i.to=e.getTo()}if(o){i.pageControls=generatePages(e.pagination.total,e.pagination.perPage)}return i})))};return e}(AkitaPlugin);__decorate([action("@Pagination - New Page"),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],PaginatorPlugin.prototype,"update",null);function generatePages(t,e){var r=Math.ceil(t/e);var i=[];for(var n=0;n<r;n++){i.push(n+1)}return i}var StoreAction;(function(t){t["Update"]="UPDATE"})(StoreAction||(StoreAction={}));var EntityStoreAction;(function(t){t["Update"]="UPDATE";t["AddEntities"]="ADD_ENTITIES";t["SetEntities"]="SET_ENTITIES";t["UpdateEntities"]="UPDATE_ENTITIES";t["RemoveEntities"]="REMOVE_ENTITIES";t["UpsertEntities"]="UPSERT_ENTITIES";t["UpsertManyEntities"]="UPSERT_MANY_ENTITIES"})(EntityStoreAction||(EntityStoreAction={}));export{Observable as O,Query as Q,SimpleOuterSubscriber as S,SimpleInnerSubscriber as a,isArray as b,isFunction as c,async as d,enableAkitaProdMode as e,from as f,Subscriber as g,distinctUntilChanged as h,innerSubscribe as i,filter as j,StoreConfig as k,Store as l,map as m};