@flarehr/apollo-super-selection 5.24.54264 → 5.26.55632

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 (152) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/p-32bef81e.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-5be45043.system.entry.js +69 -0
  5. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  6. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  7. package/dist/lib/cjs/loader.cjs.js +1 -1
  8. package/dist/lib/cjs/{sss-button_43.cjs.entry.js → sss-button_32.cjs.entry.js} +1062 -2263
  9. package/dist/lib/collection/apollo-super-selection.css +1 -1
  10. package/dist/lib/collection/collection-manifest.json +3 -25
  11. package/dist/lib/collection/components/app-host/super-selection-app-host.css +6 -6
  12. package/dist/lib/collection/components/super-campaign/super-campaign.js +12 -24
  13. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +26 -25
  14. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +0 -9
  15. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +5 -9
  16. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +11 -15
  17. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +115 -0
  18. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +5 -0
  19. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
  20. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +3 -3
  21. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +2 -2
  22. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +3 -3
  23. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +3 -3
  24. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +1 -1
  25. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +10 -0
  26. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +4 -16
  27. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +3 -9
  28. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +17 -39
  29. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +3 -4
  30. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +16 -13
  31. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +3 -17
  32. package/dist/lib/esm/apollo-super-selection.js +1 -1
  33. package/dist/lib/esm/loader.js +1 -1
  34. package/dist/lib/esm/{sss-button_43.entry.js → sss-button_32.entry.js} +1062 -2252
  35. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  36. package/dist/lib/esm-es5/loader.js +1 -1
  37. package/dist/lib/esm-es5/sss-button_32.entry.js +69 -0
  38. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +4 -0
  39. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +0 -2
  40. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +11 -0
  41. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +1 -2
  42. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +2 -10
  43. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
  44. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +15 -0
  45. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +20 -0
  46. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
  47. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +2 -0
  48. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +1 -4
  49. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +5 -5
  50. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +3 -4
  51. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
  52. package/dist/lib/types/components.d.ts +17 -203
  53. package/package.json +1 -1
  54. package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
  55. package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
  56. package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
  57. package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
  58. package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -58
  59. package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
  60. package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
  61. package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
  62. package/dist/lib/apollo-super-selection/assets/logo-rei.svg +0 -27
  63. package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
  64. package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
  65. package/dist/lib/apollo-super-selection/assets/logo-unisuper.svg +0 -15
  66. package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
  67. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge1.svg +0 -25
  68. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge2.svg +0 -109
  69. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge3.svg +0 -102
  70. package/dist/lib/apollo-super-selection/p-203c74a8.entry.js +0 -14
  71. package/dist/lib/apollo-super-selection/p-b0120851.system.entry.js +0 -69
  72. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
  73. package/dist/lib/collection/components/super-selection-app/consent/consent-wrapper.js +0 -32
  74. package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -88
  75. package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -43
  76. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
  77. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
  78. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
  79. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -38
  80. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
  81. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -34
  82. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -33
  83. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/rei.js +0 -33
  84. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
  85. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
  86. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.js +0 -56
  87. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.js +0 -49
  88. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -37
  89. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
  90. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
  91. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -10
  92. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -125
  93. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -271
  94. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -15
  95. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -143
  96. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
  97. package/dist/lib/collection/components/super-selection-app/loading-component/loading-component.js +0 -29
  98. package/dist/lib/collection/components/super-selection-app/loading-super-indicator/loading-super-indicator.js +0 -11
  99. package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
  100. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
  101. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
  102. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
  103. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -58
  104. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
  105. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
  106. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
  107. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-rei.svg +0 -27
  108. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
  109. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
  110. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-unisuper.svg +0 -15
  111. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
  112. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge1.svg +0 -25
  113. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge2.svg +0 -109
  114. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge3.svg +0 -102
  115. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
  116. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -178
  117. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page-wrapper.js +0 -32
  118. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -171
  119. package/dist/lib/esm-es5/sss-button_43.entry.js +0 -69
  120. package/dist/lib/types/components/super-selection-app/consent/consent-wrapper.d.ts +0 -5
  121. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -9
  122. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -9
  123. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
  124. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
  125. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
  126. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
  127. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
  128. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
  129. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
  130. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/rei.d.ts +0 -3
  131. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
  132. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
  133. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.d.ts +0 -3
  134. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.d.ts +0 -3
  135. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
  136. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.d.ts +0 -5
  137. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
  138. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -10
  139. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
  140. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -12
  141. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +0 -75
  142. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -26
  143. package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
  144. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
  145. package/dist/lib/types/components/super-selection-app/loading-component/loading-component.d.ts +0 -4
  146. package/dist/lib/types/components/super-selection-app/loading-super-indicator/loading-super-indicator.d.ts +0 -3
  147. package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
  148. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
  149. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -12
  150. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page-wrapper.d.ts +0 -5
  151. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -10
  152. /package/dist/lib/collection/components/super-selection-app/funds/{promoted-fund/services/promoted-fund-join-v2-types.js → custom-fund/my-own-fund/my-own-fund-engagement-step-types.js} +0 -0
@@ -284,7 +284,7 @@ class TapSubscriber extends datoramaAkita.Subscriber {
284
284
  }
285
285
  }
286
286
 
287
- const AppVersion = '5.24.54264';
287
+ const AppVersion = '5.26.55632';
288
288
 
289
289
  // -------------------------------------------------------------------------------------
290
290
  // guards
@@ -987,6 +987,255 @@ const Button = class {
987
987
  }
988
988
  };
989
989
 
990
+ function appReady() {
991
+ postMessage({
992
+ type: 'appReady'
993
+ });
994
+ }
995
+ function postMessage(message, origin) {
996
+ if (origin === undefined)
997
+ origin = '*';
998
+ message.sender = 'flare';
999
+ window.parent.postMessage(message, origin);
1000
+ }
1001
+ function resize(height, width) {
1002
+ postMessage({
1003
+ type: 'contentResized',
1004
+ height,
1005
+ width
1006
+ });
1007
+ }
1008
+ function navigation(url) {
1009
+ postMessage({
1010
+ type: 'pageNavigated',
1011
+ url
1012
+ });
1013
+ }
1014
+ function complete() {
1015
+ postMessage({ type: 'complete' });
1016
+ }
1017
+ function submitSuccess() {
1018
+ postMessage({
1019
+ type: 'submitSuccess'
1020
+ });
1021
+ }
1022
+ const iframe = { appReady, resize, navigation, complete, submitSuccess };
1023
+
1024
+ const appendToMap = (map, propName, value) => {
1025
+ const items = map.get(propName);
1026
+ if (!items) {
1027
+ map.set(propName, [value]);
1028
+ }
1029
+ else if (!items.includes(value)) {
1030
+ items.push(value);
1031
+ }
1032
+ };
1033
+ const debounce = (fn, ms) => {
1034
+ let timeoutId;
1035
+ return (...args) => {
1036
+ if (timeoutId) {
1037
+ clearTimeout(timeoutId);
1038
+ }
1039
+ timeoutId = setTimeout(() => {
1040
+ timeoutId = 0;
1041
+ fn(...args);
1042
+ }, ms);
1043
+ };
1044
+ };
1045
+
1046
+ /**
1047
+ * Check if a possible element isConnected.
1048
+ * The property might not be there, so we check for it.
1049
+ *
1050
+ * We want it to return true if isConnected is not a property,
1051
+ * otherwise we would remove these elements and would not update.
1052
+ *
1053
+ * Better leak in Edge than to be useless.
1054
+ */
1055
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
1056
+ const cleanupElements = debounce((map) => {
1057
+ for (let key of map.keys()) {
1058
+ map.set(key, map.get(key).filter(isConnected));
1059
+ }
1060
+ }, 2000);
1061
+ const stencilSubscription = ({ on }) => {
1062
+ const elmsToUpdate = new Map();
1063
+ if (typeof index.getRenderingRef === 'function') {
1064
+ // If we are not in a stencil project, we do nothing.
1065
+ // This function is not really exported by @stencil/core.
1066
+ on('dispose', () => {
1067
+ elmsToUpdate.clear();
1068
+ });
1069
+ on('get', (propName) => {
1070
+ const elm = index.getRenderingRef();
1071
+ if (elm) {
1072
+ appendToMap(elmsToUpdate, propName, elm);
1073
+ }
1074
+ });
1075
+ on('set', (propName) => {
1076
+ const elements = elmsToUpdate.get(propName);
1077
+ if (elements) {
1078
+ elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
1079
+ }
1080
+ cleanupElements(elmsToUpdate);
1081
+ });
1082
+ on('reset', () => {
1083
+ elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
1084
+ cleanupElements(elmsToUpdate);
1085
+ });
1086
+ }
1087
+ };
1088
+
1089
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
1090
+ let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
1091
+ const handlers = {
1092
+ dispose: [],
1093
+ get: [],
1094
+ set: [],
1095
+ reset: [],
1096
+ };
1097
+ const reset = () => {
1098
+ states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
1099
+ handlers.reset.forEach((cb) => cb());
1100
+ };
1101
+ const dispose = () => {
1102
+ // Call first dispose as resetting the state would
1103
+ // cause less updates ;)
1104
+ handlers.dispose.forEach((cb) => cb());
1105
+ reset();
1106
+ };
1107
+ const get = (propName) => {
1108
+ handlers.get.forEach((cb) => cb(propName));
1109
+ return states.get(propName);
1110
+ };
1111
+ const set = (propName, value) => {
1112
+ const oldValue = states.get(propName);
1113
+ if (shouldUpdate(value, oldValue, propName)) {
1114
+ states.set(propName, value);
1115
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
1116
+ }
1117
+ };
1118
+ const state = (typeof Proxy === 'undefined'
1119
+ ? {}
1120
+ : new Proxy(defaultState, {
1121
+ get(_, propName) {
1122
+ return get(propName);
1123
+ },
1124
+ ownKeys(_) {
1125
+ return Array.from(states.keys());
1126
+ },
1127
+ getOwnPropertyDescriptor() {
1128
+ return {
1129
+ enumerable: true,
1130
+ configurable: true,
1131
+ };
1132
+ },
1133
+ has(_, propName) {
1134
+ return states.has(propName);
1135
+ },
1136
+ set(_, propName, value) {
1137
+ set(propName, value);
1138
+ return true;
1139
+ },
1140
+ }));
1141
+ const on = (eventName, callback) => {
1142
+ handlers[eventName].push(callback);
1143
+ return () => {
1144
+ removeFromArray(handlers[eventName], callback);
1145
+ };
1146
+ };
1147
+ const onChange = (propName, cb) => {
1148
+ const unSet = on('set', (key, newValue) => {
1149
+ if (key === propName) {
1150
+ cb(newValue);
1151
+ }
1152
+ });
1153
+ const unReset = on('reset', () => cb(defaultState[propName]));
1154
+ return () => {
1155
+ unSet();
1156
+ unReset();
1157
+ };
1158
+ };
1159
+ const use = (...subscriptions) => subscriptions.forEach((subscription) => {
1160
+ if (subscription.set) {
1161
+ on('set', subscription.set);
1162
+ }
1163
+ if (subscription.get) {
1164
+ on('get', subscription.get);
1165
+ }
1166
+ if (subscription.reset) {
1167
+ on('reset', subscription.reset);
1168
+ }
1169
+ });
1170
+ return {
1171
+ state,
1172
+ get,
1173
+ set,
1174
+ on,
1175
+ onChange,
1176
+ use,
1177
+ dispose,
1178
+ reset,
1179
+ };
1180
+ };
1181
+ const removeFromArray = (array, item) => {
1182
+ const index = array.indexOf(item);
1183
+ if (index >= 0) {
1184
+ array[index] = array[array.length - 1];
1185
+ array.length--;
1186
+ }
1187
+ };
1188
+
1189
+ const createStore = (defaultState, shouldUpdate) => {
1190
+ const map = createObservableMap(defaultState, shouldUpdate);
1191
+ stencilSubscription(map);
1192
+ return map;
1193
+ };
1194
+
1195
+ const initial = {
1196
+ handleSubmitFn: async function () {
1197
+ return;
1198
+ },
1199
+ fundName: '',
1200
+ fundDetails: { type: 'null' },
1201
+ promotedFundId: undefined
1202
+ };
1203
+ const { state } = createStore(initial);
1204
+
1205
+ var SuperSelectionAppRoutes;
1206
+ (function (SuperSelectionAppRoutes) {
1207
+ SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
1208
+ SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
1209
+ SuperSelectionAppRoutes["ChoicePage"] = "/";
1210
+ SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
1211
+ SuperSelectionAppRoutes["MyOwnFundEngagementStep"] = "/super-choice/my-own-fund-engagement/";
1212
+ SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
1213
+ SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
1214
+ SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
1215
+ SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
1216
+ SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
1217
+ SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
1218
+ SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
1219
+ SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
1220
+ SuperSelectionAppRoutes["Success"] = "/success/";
1221
+ })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
1222
+ const superSelectionAppStencilRoutes = [
1223
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
1224
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
1225
+ index.h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-campaign-host" }),
1226
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
1227
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFundEngagementStep, component: "sss-my-own-fund-engagement-step-host" }),
1228
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
1229
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
1230
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
1231
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
1232
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
1233
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
1234
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
1235
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
1236
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
1237
+ ];
1238
+
990
1239
  function createCommonjsModule(fn, basedir, module) {
991
1240
  return module = {
992
1241
  path: basedir,
@@ -2450,177 +2699,6 @@ exports.sequenceArray =
2450
2699
  exports.traverseArray(_function.identity);
2451
2700
  });
2452
2701
 
2453
- const appendToMap = (map, propName, value) => {
2454
- const items = map.get(propName);
2455
- if (!items) {
2456
- map.set(propName, [value]);
2457
- }
2458
- else if (!items.includes(value)) {
2459
- items.push(value);
2460
- }
2461
- };
2462
- const debounce = (fn, ms) => {
2463
- let timeoutId;
2464
- return (...args) => {
2465
- if (timeoutId) {
2466
- clearTimeout(timeoutId);
2467
- }
2468
- timeoutId = setTimeout(() => {
2469
- timeoutId = 0;
2470
- fn(...args);
2471
- }, ms);
2472
- };
2473
- };
2474
-
2475
- /**
2476
- * Check if a possible element isConnected.
2477
- * The property might not be there, so we check for it.
2478
- *
2479
- * We want it to return true if isConnected is not a property,
2480
- * otherwise we would remove these elements and would not update.
2481
- *
2482
- * Better leak in Edge than to be useless.
2483
- */
2484
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
2485
- const cleanupElements = debounce((map) => {
2486
- for (let key of map.keys()) {
2487
- map.set(key, map.get(key).filter(isConnected));
2488
- }
2489
- }, 2000);
2490
- const stencilSubscription = ({ on }) => {
2491
- const elmsToUpdate = new Map();
2492
- if (typeof index.getRenderingRef === 'function') {
2493
- // If we are not in a stencil project, we do nothing.
2494
- // This function is not really exported by @stencil/core.
2495
- on('dispose', () => {
2496
- elmsToUpdate.clear();
2497
- });
2498
- on('get', (propName) => {
2499
- const elm = index.getRenderingRef();
2500
- if (elm) {
2501
- appendToMap(elmsToUpdate, propName, elm);
2502
- }
2503
- });
2504
- on('set', (propName) => {
2505
- const elements = elmsToUpdate.get(propName);
2506
- if (elements) {
2507
- elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
2508
- }
2509
- cleanupElements(elmsToUpdate);
2510
- });
2511
- on('reset', () => {
2512
- elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
2513
- cleanupElements(elmsToUpdate);
2514
- });
2515
- }
2516
- };
2517
-
2518
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
2519
- let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
2520
- const handlers = {
2521
- dispose: [],
2522
- get: [],
2523
- set: [],
2524
- reset: [],
2525
- };
2526
- const reset = () => {
2527
- states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
2528
- handlers.reset.forEach((cb) => cb());
2529
- };
2530
- const dispose = () => {
2531
- // Call first dispose as resetting the state would
2532
- // cause less updates ;)
2533
- handlers.dispose.forEach((cb) => cb());
2534
- reset();
2535
- };
2536
- const get = (propName) => {
2537
- handlers.get.forEach((cb) => cb(propName));
2538
- return states.get(propName);
2539
- };
2540
- const set = (propName, value) => {
2541
- const oldValue = states.get(propName);
2542
- if (shouldUpdate(value, oldValue, propName)) {
2543
- states.set(propName, value);
2544
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
2545
- }
2546
- };
2547
- const state = (typeof Proxy === 'undefined'
2548
- ? {}
2549
- : new Proxy(defaultState, {
2550
- get(_, propName) {
2551
- return get(propName);
2552
- },
2553
- ownKeys(_) {
2554
- return Array.from(states.keys());
2555
- },
2556
- getOwnPropertyDescriptor() {
2557
- return {
2558
- enumerable: true,
2559
- configurable: true,
2560
- };
2561
- },
2562
- has(_, propName) {
2563
- return states.has(propName);
2564
- },
2565
- set(_, propName, value) {
2566
- set(propName, value);
2567
- return true;
2568
- },
2569
- }));
2570
- const on = (eventName, callback) => {
2571
- handlers[eventName].push(callback);
2572
- return () => {
2573
- removeFromArray(handlers[eventName], callback);
2574
- };
2575
- };
2576
- const onChange = (propName, cb) => {
2577
- const unSet = on('set', (key, newValue) => {
2578
- if (key === propName) {
2579
- cb(newValue);
2580
- }
2581
- });
2582
- const unReset = on('reset', () => cb(defaultState[propName]));
2583
- return () => {
2584
- unSet();
2585
- unReset();
2586
- };
2587
- };
2588
- const use = (...subscriptions) => subscriptions.forEach((subscription) => {
2589
- if (subscription.set) {
2590
- on('set', subscription.set);
2591
- }
2592
- if (subscription.get) {
2593
- on('get', subscription.get);
2594
- }
2595
- if (subscription.reset) {
2596
- on('reset', subscription.reset);
2597
- }
2598
- });
2599
- return {
2600
- state,
2601
- get,
2602
- set,
2603
- on,
2604
- onChange,
2605
- use,
2606
- dispose,
2607
- reset,
2608
- };
2609
- };
2610
- const removeFromArray = (array, item) => {
2611
- const index = array.indexOf(item);
2612
- if (index >= 0) {
2613
- array[index] = array[array.length - 1];
2614
- array.length--;
2615
- }
2616
- };
2617
-
2618
- const createStore = (defaultState, shouldUpdate) => {
2619
- const map = createObservableMap(defaultState, shouldUpdate);
2620
- stencilSubscription(map);
2621
- return map;
2622
- };
2623
-
2624
2702
  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(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};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,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(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 o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
2625
2703
 
2626
2704
  var __assign$1 = (undefined && undefined.__assign) || function () {
@@ -3310,6 +3388,11 @@ function buildBackendApiClient() {
3310
3388
  });
3311
3389
  }
3312
3390
 
3391
+ const slate = {
3392
+ fundId: 'slate',
3393
+ usi: '32367272075001'
3394
+ };
3395
+
3313
3396
  function hydratePromotedFundChoiceDtoKind(dto) {
3314
3397
  if ('slate' in dto) {
3315
3398
  dto.kind = 'slate';
@@ -3345,33 +3428,33 @@ function hydratePromotedFundChoiceDtoKind(dto) {
3345
3428
  function getPromotedFundUsi(dto) {
3346
3429
  switch (dto.kind) {
3347
3430
  case 'slate':
3348
- return none;
3431
+ return slate.usi;
3349
3432
  case 'australianRetirementTrust':
3350
- return some(dto.australianRetirementTrust.usi);
3433
+ return dto.australianRetirementTrust.usi;
3351
3434
  case 'aware':
3352
- return some(dto.aware.usi);
3435
+ return dto.aware.usi;
3353
3436
  case 'active':
3354
- return some(dto.active.usi);
3437
+ return dto.active.usi;
3355
3438
  case 'australianEthical':
3356
- return some(dto.australianEthical.usi);
3439
+ return dto.australianEthical.usi;
3357
3440
  case 'virgin':
3358
- return some(dto.virgin.usi);
3441
+ return dto.virgin.usi;
3359
3442
  case 'spirit':
3360
- return some(dto.spirit.usi);
3443
+ return dto.spirit.usi;
3361
3444
  case 'firstSuper':
3362
- return some(dto.firstSuper.usi);
3445
+ return dto.firstSuper.usi;
3363
3446
  case 'mercerMyChoice':
3364
- return some(dto.mercerMyChoice.usi);
3447
+ return dto.mercerMyChoice.usi;
3365
3448
  case 'generic':
3366
- return some(dto.generic.usi);
3449
+ return dto.generic.usi;
3367
3450
  default:
3368
- return none;
3451
+ return '';
3369
3452
  }
3370
3453
  }
3371
3454
  function getPromotedFundId(dto) {
3372
3455
  switch (dto.kind) {
3373
3456
  case 'slate':
3374
- return 'slate';
3457
+ return slate.fundId;
3375
3458
  case 'australianRetirementTrust':
3376
3459
  return 'australian-retirement-trust';
3377
3460
  case 'aware':
@@ -3397,7 +3480,7 @@ function getPromotedFundId(dto) {
3397
3480
  function getSuperChoiceUsi(dto) {
3398
3481
  switch (dto.kind) {
3399
3482
  case 'Promoted':
3400
- return getPromotedFundUsi(dto.promoted);
3483
+ return some(getPromotedFundUsi(dto.promoted));
3401
3484
  case 'MyOwnFund':
3402
3485
  return some(dto.myOwnFund.usi);
3403
3486
  case 'SMSF':
@@ -3417,33 +3500,33 @@ function getSuperChoiceUsi(dto) {
3417
3500
  function getPromotedFundMemberNumber(dto) {
3418
3501
  switch (dto.kind) {
3419
3502
  case 'slate':
3420
- return some(dto.slate.memberNumber);
3503
+ return dto.slate.memberNumber;
3421
3504
  case 'australianRetirementTrust':
3422
- return some(dto.australianRetirementTrust.memberNumber);
3505
+ return dto.australianRetirementTrust.memberNumber;
3423
3506
  case 'aware':
3424
- return some(dto.aware.memberNumber);
3507
+ return dto.aware.memberNumber;
3425
3508
  case 'active':
3426
- return some(dto.active.memberNumber);
3509
+ return dto.active.memberNumber;
3427
3510
  case 'australianEthical':
3428
- return some(dto.australianEthical.memberNumber);
3511
+ return dto.australianEthical.memberNumber;
3429
3512
  case 'virgin':
3430
- return some(dto.virgin.memberNumber);
3513
+ return dto.virgin.memberNumber;
3431
3514
  case 'spirit':
3432
- return some(dto.spirit.memberNumber);
3515
+ return dto.spirit.memberNumber;
3433
3516
  case 'firstSuper':
3434
- return some(dto.firstSuper.memberNumber);
3517
+ return dto.firstSuper.memberNumber;
3435
3518
  case 'mercerMyChoice':
3436
- return some(dto.mercerMyChoice.memberNumber);
3519
+ return dto.mercerMyChoice.memberNumber;
3437
3520
  case 'generic':
3438
- return some(dto.generic.memberNumber);
3521
+ return dto.generic.memberNumber;
3439
3522
  default:
3440
- return none;
3523
+ return '';
3441
3524
  }
3442
3525
  }
3443
3526
  function getSuperChoiceMemberNumber(dto) {
3444
3527
  switch (dto.kind) {
3445
3528
  case 'Promoted':
3446
- return getPromotedFundMemberNumber(dto.promoted);
3529
+ return some(getPromotedFundMemberNumber(dto.promoted));
3447
3530
  case 'MyOwnFund':
3448
3531
  return some(dto.myOwnFund.memberNumber);
3449
3532
  case 'DefinedBenefits':
@@ -3521,15 +3604,6 @@ class SuperSelectionApi {
3521
3604
  }
3522
3605
  return response;
3523
3606
  }
3524
- async getCampaignConnectAsync() {
3525
- return buildBackendApiClient()
3526
- .url('campaign-connect')
3527
- .get()
3528
- .notFound(() => {
3529
- throw new Error('Failed to fetch campaign connect.');
3530
- })
3531
- .json();
3532
- }
3533
3607
  async clickPromotedTileAsync(payload) {
3534
3608
  return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
3535
3609
  }
@@ -3584,13 +3658,12 @@ const initialState = {
3584
3658
  profileConfiguration: Option.none,
3585
3659
  hasSuccessPageBeenAcknowledged: false,
3586
3660
  hasSuperSelectionBeenSubmitted: false,
3587
- campaignConnectEnabled: false,
3588
3661
  isDefinedBenefitsEligible: Option.none,
3589
- campaignConnect: Option.none,
3590
- superCampaignEnabled: false,
3662
+ superCampaignEnabled: true,
3591
3663
  superCampaignState: undefined,
3592
3664
  superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
3593
- superCampaignIsInView: false
3665
+ hideFooterSection: false,
3666
+ bringYourOwnFundCustomStepEnabled: false
3594
3667
  };
3595
3668
 
3596
3669
  class SuperSelectionAppService {
@@ -3630,9 +3703,6 @@ class SuperSelectionAppService {
3630
3703
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3631
3704
  return this.superCampaignState.PromotedFundIds;
3632
3705
  }
3633
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3634
- return this._state.campaignConnect.value.promotedFunds.map((v) => v.fundId);
3635
- }
3636
3706
  if (Option.isNone(this._state.promotedFunds)) {
3637
3707
  throw Error('Promoted Funds is not set');
3638
3708
  }
@@ -3642,35 +3712,15 @@ class SuperSelectionAppService {
3642
3712
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3643
3713
  return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
3644
3714
  }
3645
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3646
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
3647
- if (index === -1) {
3648
- return Option.fromNullable(null);
3649
- }
3650
- else {
3651
- return Option.fromNullable(index + 1);
3652
- }
3653
- }
3654
3715
  return Option.none;
3655
3716
  }
3656
3717
  get promotedFundsConfig() {
3657
3718
  return {
3658
3719
  shownFunds: this.promotedFunds,
3659
3720
  promotedDefaultFundPosition: Option.toUndefined(this.promotedDefaultFundPosition),
3660
- promotedFundsConfigSource: this.isUsingSuperCampaign
3661
- ? 'superCampaign'
3662
- : Option.isSome(this._state.campaignConnect)
3663
- ? 'campaignConnect'
3664
- : 'superSelection'
3721
+ promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
3665
3722
  };
3666
3723
  }
3667
- get definedBenefitsFundId() {
3668
- if (Option.isSome(this._state.campaignConnect)) {
3669
- const definedBenefitsFund = this._state.campaignConnect.value.promotedFunds.find((fund) => fund.type == 'defined-benefits');
3670
- return Option.fromNullable(definedBenefitsFund === null || definedBenefitsFund === void 0 ? void 0 : definedBenefitsFund.fundId);
3671
- }
3672
- return Option.none;
3673
- }
3674
3724
  get profileId() {
3675
3725
  if (Option.isNone(this._state.profileId)) {
3676
3726
  throw Error('Failed to get Profile ID from JWT');
@@ -3702,9 +3752,6 @@ class SuperSelectionAppService {
3702
3752
  markSuperSelectionAsSubmitted() {
3703
3753
  this._state.hasSuperSelectionBeenSubmitted = true;
3704
3754
  }
3705
- get campaignConnectEnabled() {
3706
- return this._state.campaignConnectEnabled;
3707
- }
3708
3755
  get isDefinedBenefitsEligible() {
3709
3756
  return this._state.isDefinedBenefitsEligible;
3710
3757
  }
@@ -3714,17 +3761,11 @@ class SuperSelectionAppService {
3714
3761
  this._state.profileConfiguration = Option.fromNullable(appStateResponse.profileConfiguration);
3715
3762
  this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
3716
3763
  this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
3717
- this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
3718
- this._state.superCampaignEnabled = appStateResponse.superCampaignEnabled;
3764
+ this._state.bringYourOwnFundCustomStepEnabled =
3765
+ appStateResponse.bringYourOwnFundCustomStepEnabled;
3719
3766
  this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
3720
3767
  this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
3721
3768
  }
3722
- async loadCampaignConnectAsync() {
3723
- if (this._state.campaignConnectEnabled) {
3724
- const campaignConnect = await superSelectionApi.getCampaignConnectAsync();
3725
- this._state.campaignConnect = Option.fromNullable(campaignConnect);
3726
- }
3727
- }
3728
3769
  setSuperCampaignPromotedFundsShown(shownFunds) {
3729
3770
  if (this._state.superCampaignState !== undefined)
3730
3771
  this._state.superCampaignState.promotedFundsShown = shownFunds;
@@ -3755,320 +3796,57 @@ class SuperSelectionAppService {
3755
3796
  get isUsingSuperCampaign() {
3756
3797
  return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
3757
3798
  }
3799
+ get isBringYourOwnFundCustomStepEnabled() {
3800
+ return this.state.bringYourOwnFundCustomStepEnabled;
3801
+ }
3758
3802
  get isSuperCampaignFallbackActivated() {
3759
3803
  return (this.state.superCampaignEnabled &&
3760
3804
  this.superCampaignComponentStatus === SuperCampaignComponentStatus.NotWorking);
3761
3805
  }
3762
- get superCampaignIsInView() {
3763
- return this._state.superCampaignIsInView;
3764
- }
3765
- set superCampaignIsInView(value) {
3766
- this._state.superCampaignIsInView = value;
3767
- }
3768
- }
3769
- const superSelectionAppService = new SuperSelectionAppService();
3770
-
3771
- const SuperFundDisclaimerViewedDetail = {
3772
- create: (superCampaignEnabled) => {
3773
- let isDefinedBenefitsEligibleString = 'Not set';
3774
- if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
3775
- isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
3776
- ? 'True'
3777
- : 'False';
3778
- }
3779
- return {
3780
- isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
3781
- superCampaignEnabled: superCampaignEnabled
3782
- };
3806
+ get hideFooterSection() {
3807
+ return this._state.hideFooterSection;
3783
3808
  }
3784
- };
3785
-
3786
- const initial = {
3787
- fund: {
3788
- id: '',
3789
- type: 'null'
3809
+ set hideFooterSection(value) {
3810
+ this._state.hideFooterSection = value;
3790
3811
  }
3791
- };
3792
- const { state, reset } = createStore(initial);
3793
-
3794
- class EventTrackingApi {
3795
- static get Instance() {
3796
- return this.instance || (this.instance = new this());
3812
+ get backendUrl() {
3813
+ return Option.map(this.getBaseUrl)(this.state.apiBaseUrl);
3797
3814
  }
3798
- async PostAnalyticsEventAsync(event) {
3799
- return buildBackendApiClient().url('analytics-events').post(event).res();
3815
+ getBaseUrl(url) {
3816
+ const parsedUrl = new URL(url);
3817
+ return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
3800
3818
  }
3801
3819
  }
3820
+ const superSelectionAppService = new SuperSelectionAppService();
3802
3821
 
3803
- class EventTrackingService {
3804
- constructor() {
3805
- this.eventTrackingApi = EventTrackingApi.Instance;
3822
+ class NavigationService {
3823
+ navigateInternally(history, route) {
3824
+ const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3825
+ iframe.navigation(path);
3826
+ history.push(path);
3806
3827
  }
3807
- static get Instance() {
3808
- return this.instance || (this.instance = new this());
3828
+ navigateInternallyToStandardChoice(options) {
3829
+ state.handleSubmitFn = options.handleSubmitFn;
3830
+ state.fundName = options.fundName;
3831
+ state.fundDetails = options.fundDetails;
3832
+ state.promotedFundId = options.promotedFundId;
3833
+ this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3809
3834
  }
3810
- async TrackSuperFundPdsViewedAsync(detail) {
3811
- return this.trackEventAsync({
3812
- SuperFundPdsViewed: detail
3813
- });
3835
+ toExternalUrl(url) {
3836
+ const externalUrl = new URL(url);
3837
+ externalUrl.searchParams.append('_extnav', 'true');
3838
+ return externalUrl.href;
3814
3839
  }
3815
- async TrackPromotedSuperFundDetailViewedAsync(detail) {
3816
- return this.trackEventAsync({
3817
- SuperFundDetailViewed: {
3818
- PromotedFund: detail
3819
- }
3820
- });
3840
+ get appBaseUrl() {
3841
+ const baseUrl = superSelectionAppService.appBaseUrl;
3842
+ return baseUrl.replace(/\/$/, '');
3821
3843
  }
3822
- async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3823
- return this.trackEventAsync({
3824
- SuperFundDetailViewed: {
3825
- PromotedDefaultFund: detail
3826
- }
3827
- });
3828
- }
3829
- async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3830
- return this.trackEventAsync({
3831
- SuperFundDetailViewed: {
3832
- MyOwnFund: detail
3833
- }
3834
- });
3835
- }
3836
- async TrackSmsfSuperFundDetailViewedAsync(detail) {
3837
- return this.trackEventAsync({
3838
- SuperFundDetailViewed: {
3839
- Smsf: detail
3840
- }
3841
- });
3842
- }
3843
- async TrackDefaultSuperFundDetailViewedAsync(detail) {
3844
- return this.trackEventAsync({
3845
- SuperFundDetailViewed: {
3846
- DefaultFund: detail
3847
- }
3848
- });
3849
- }
3850
- async TrackSuperFundNominationViewedAsync(detail) {
3851
- return this.trackEventAsync({
3852
- SuperFundNominationViewed: detail
3853
- });
3854
- }
3855
- async TrackSuperFundNominationDeclinedAsync(detail) {
3856
- return this.trackEventAsync({
3857
- SuperFundNominationDeclined: detail
3858
- });
3859
- }
3860
- async TrackSuperFundDisclaimerViewedAsync(detail) {
3861
- return this.trackEventAsync({
3862
- SuperFundDisclaimerViewed: detail
3863
- });
3864
- }
3865
- async TrackSuperFundDisclaimerAcceptedAsync(detail) {
3866
- return this.trackEventAsync({
3867
- SuperFundDisclaimerAccepted: detail
3868
- });
3869
- }
3870
- async TrackSuperFundPrefillViewedAsync(detail) {
3871
- return this.trackEventAsync({
3872
- SuperFundPrefillViewed: detail
3873
- });
3874
- }
3875
- async TrackSuperFundPrefillDeclinedAsync(detail) {
3876
- return this.trackEventAsync({
3877
- SuperFundPrefillDeclined: detail
3878
- });
3879
- }
3880
- async TrackSuperFundDetailChangeRequestedAsync(detail) {
3881
- return this.trackEventAsync({
3882
- SuperFundDetailChangeRequested: detail
3883
- });
3884
- }
3885
- async TrackSuperCampaignActivationSucceededAsync(detail) {
3886
- return this.trackEventAsync({
3887
- SuperCampaignActivationSucceeded: detail
3888
- });
3889
- }
3890
- async trackEventAsync(event) {
3891
- try {
3892
- await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
3893
- }
3894
- catch (_a) {
3895
- return;
3896
- }
3897
- }
3898
- }
3899
-
3900
- function appReady() {
3901
- postMessage({
3902
- type: 'appReady'
3903
- });
3904
- }
3905
- function postMessage(message, origin) {
3906
- if (origin === undefined)
3907
- origin = '*';
3908
- message.sender = 'flare';
3909
- window.parent.postMessage(message, origin);
3910
- }
3911
- function resize(height, width) {
3912
- postMessage({
3913
- type: 'contentResized',
3914
- height,
3915
- width
3916
- });
3917
- }
3918
- function navigation(url) {
3919
- postMessage({
3920
- type: 'pageNavigated',
3921
- url
3922
- });
3923
- }
3924
- function complete() {
3925
- postMessage({ type: 'complete' });
3926
- }
3927
- function submitSuccess() {
3928
- postMessage({
3929
- type: 'submitSuccess'
3930
- });
3931
- }
3932
- const iframe = { appReady, resize, navigation, complete, submitSuccess };
3933
-
3934
- const initial$1 = {
3935
- handleSubmitFn: async function () {
3936
- return;
3937
- },
3938
- fundName: '',
3939
- fundDetails: { type: 'null' },
3940
- promotedFundId: undefined
3941
- };
3942
- const { state: state$1 } = createStore(initial$1);
3943
-
3944
- var SuperSelectionAppRoutes;
3945
- (function (SuperSelectionAppRoutes) {
3946
- SuperSelectionAppRoutes["ConsentPage"] = "/consent";
3947
- SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
3948
- SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
3949
- SuperSelectionAppRoutes["ChoicePage"] = "/";
3950
- SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
3951
- SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
3952
- SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
3953
- SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
3954
- SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
3955
- SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
3956
- SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
3957
- SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
3958
- SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
3959
- SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
3960
- SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
3961
- SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
3962
- SuperSelectionAppRoutes["Success"] = "/success/";
3963
- })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
3964
- const superSelectionAppStencilRoutes = [
3965
- index.h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page-wrapper" }),
3966
- index.h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
3967
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
3968
- index.h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page-wrapper" }),
3969
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
3970
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
3971
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
3972
- index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
3973
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
3974
- index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
3975
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
3976
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
3977
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
3978
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
3979
- index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
3980
- index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
3981
- index.h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
3982
- ];
3983
-
3984
- class NavigationService {
3985
- navigateInternally(history, route) {
3986
- const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3987
- iframe.navigation(path);
3988
- history.push(path);
3989
- }
3990
- navigateInternallyToStandardChoice(options) {
3991
- state$1.handleSubmitFn = options.handleSubmitFn;
3992
- state$1.fundName = options.fundName;
3993
- state$1.fundDetails = options.fundDetails;
3994
- state$1.promotedFundId = options.promotedFundId;
3995
- this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3996
- }
3997
- toExternalUrl(url) {
3998
- const externalUrl = new URL(url);
3999
- externalUrl.searchParams.append('_extnav', 'true');
4000
- return externalUrl.href;
4001
- }
4002
- get appBaseUrl() {
4003
- const baseUrl = superSelectionAppService.appBaseUrl;
4004
- return baseUrl.replace(/\/$/, '');
4005
- }
4006
- toRouteWithLeadingSlash(route) {
4007
- return route.length > 0 && route[0] === '/' ? route : `/${route}`;
3844
+ toRouteWithLeadingSlash(route) {
3845
+ return route.length > 0 && route[0] === '/' ? route : `/${route}`;
4008
3846
  }
4009
3847
  }
4010
3848
  const navigationService = new NavigationService();
4011
3849
 
4012
- const Link = (props, children) => {
4013
- return (index.h("a", { class: props.className || 'font-medium underline underline-offset-2 hover:text-gray-600', target: "_blank", href: navigationService.toExternalUrl(props.href), onClick: props.onClick }, children));
4014
- };
4015
- const PoweredByFlareFS = 'Powered by Flare FS';
4016
- function pdsViewedAsync(name, usi) {
4017
- return EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
4018
- fundUsi: usi,
4019
- fundName: name,
4020
- pageName: 'Panel Fund Page',
4021
- superCampaignEnabled: false
4022
- });
4023
- }
4024
-
4025
- const Consent = class {
4026
- constructor(hostRef) {
4027
- index.registerInstance(this, hostRef);
4028
- this.campaignConnectRequestInProgress = false;
4029
- this.eventTrackingService = EventTrackingService.Instance;
4030
- }
4031
- componentDidLoad() {
4032
- return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(false));
4033
- }
4034
- render() {
4035
- if (this.campaignConnectRequestInProgress) {
4036
- return index.h("sss-loading-super-indicator", null);
4037
- }
4038
- return (index.h("div", null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center leading-8" }, "Important information about super"), index.h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8" }, "The choice of superannuation fund is an important personal financial decision. Next, you\u2019ll be asked to nominate a super fund to receive your employer contributions."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold leading-6" }, "By clicking \u201CContinue\u201D you acknowledge that:"), index.h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6" }, index.h("li", null, "Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"), index.h("li", null, "all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"), index.h("li", null, "in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"), index.h("li", null, "Trustees of the featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform;"), index.h("li", null, "in the event that you choose one of the featured superannuation funds, we may pass on your personal information and TFN to a related party for the purpose of completing your chosen fund's application form."), index.h("li", null, "Your personal data that is provided to us will be subject to our", ' ', index.h(Link, { className: "font-medium text-blue-600 hover:text-blue-800", href: "https://www.flarehr.com/privacy-policy" }, "Privacy Policy"), ".")), index.h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSuperFundDisclaimerAccepted() }, "Continue")))));
4039
- }
4040
- async handleSuperFundDisclaimerAccepted() {
4041
- await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({
4042
- superCampaignEnabled: false
4043
- });
4044
- if (superSelectionAppService.campaignConnectEnabled) {
4045
- this.campaignConnectRequestInProgress = true;
4046
- await superSelectionAppService.loadCampaignConnectAsync();
4047
- if (superSelectionAppService.isDefinedBenefitsEligible &&
4048
- Option.isSome(superSelectionAppService.definedBenefitsFundId)) {
4049
- state.fund = {
4050
- id: superSelectionAppService.definedBenefitsFundId.value,
4051
- type: 'DefinedBenefits'
4052
- };
4053
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PromotedFundJoinV2);
4054
- return;
4055
- }
4056
- }
4057
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
4058
- }
4059
- };
4060
- injectHistory(Consent);
4061
-
4062
- const ConsentWrapper = class {
4063
- constructor(hostRef) {
4064
- index.registerInstance(this, hostRef);
4065
- }
4066
- render() {
4067
- return superSelectionAppService.state.superCampaignEnabled ? (index.h("sss-super-campaign-host", null)) : (index.h("sss-consent-page", null));
4068
- }
4069
- };
4070
- injectHistory(ConsentWrapper);
4071
-
4072
3850
  var CustomFundTypes;
4073
3851
  (function (CustomFundTypes) {
4074
3852
  CustomFundTypes["MyOwnFund"] = "Your current super fund";
@@ -4116,9 +3894,9 @@ const initialStateCustomFund = {
4116
3894
  }
4117
3895
  ]
4118
3896
  };
4119
- const { state: state$2, reset: reset$1 } = createStore(initialStateCustomFund);
3897
+ const { state: state$1, reset } = createStore(initialStateCustomFund);
4120
3898
 
4121
- const customFundOptions = state$2.customFunds;
3899
+ const customFundOptions = state$1.customFunds;
4122
3900
  const CustomFund = class {
4123
3901
  constructor(hostRef) {
4124
3902
  index.registerInstance(this, hostRef);
@@ -4173,67 +3951,183 @@ class AustralianFundLookupService {
4173
3951
  }
4174
3952
  const australianFundLookupService = new AustralianFundLookupService();
4175
3953
 
4176
- class CustomFundChoiceApi {
4177
- async submitDefaultFundChoiceAsync(dto) {
4178
- return buildBackendApiClient()
4179
- .url('super-choice/default')
4180
- .post(dto)
4181
- .badRequest(() => {
4182
- throw new Error('Failed to process default fund join request');
4183
- })
4184
- .text();
4185
- }
4186
- async submitCustomFundChoiceAsync(dto) {
4187
- return buildBackendApiClient()
4188
- .url('super-choice/custom-fund')
4189
- .post(dto)
4190
- .badRequest(() => {
4191
- throw new Error('Failed to process custom fund join request');
4192
- })
4193
- .text();
4194
- }
4195
- async submitSelfManagedFundChoiceAsync(dto) {
4196
- return buildBackendApiClient()
4197
- .url('super-choice/smsf')
4198
- .post(dto)
4199
- .badRequest(() => {
4200
- throw new Error('Failed to process SMSF choice request');
4201
- })
4202
- .text();
4203
- }
4204
- async submitDefinedBenefitsChoiceAsync(dto) {
4205
- return buildBackendApiClient()
4206
- .url('super-choice/defined-benefits')
4207
- .post(dto)
4208
- .badRequest(() => {
4209
- throw new Error('Failed to process Defined Benefits choice request');
4210
- })
4211
- .text();
3954
+ class EventTrackingApi {
3955
+ static get Instance() {
3956
+ return this.instance || (this.instance = new this());
4212
3957
  }
4213
- async validateAbnForSMSF(abn) {
4214
- const response = await buildBackendApiClient()
4215
- .url(`super-choice/smsf/${abn}/validate`)
4216
- .get()
4217
- .badRequest(() => {
4218
- throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4219
- })
4220
- .json();
4221
- return response.result;
3958
+ async PostAnalyticsEventAsync(event) {
3959
+ return buildBackendApiClient().url('analytics-events').post(event).res();
4222
3960
  }
4223
3961
  }
4224
- const customFundChoiceApi = new CustomFundChoiceApi();
4225
3962
 
4226
- const DefaultFund = class {
4227
- constructor(hostRef) {
4228
- index.registerInstance(this, hostRef);
4229
- this.defaultFundProductName = 'Loading fund...';
4230
- this.eventTrackingService = EventTrackingService.Instance;
3963
+ class EventTrackingService {
3964
+ constructor() {
3965
+ this.eventTrackingApi = EventTrackingApi.Instance;
4231
3966
  }
4232
- async componentWillLoad() {
4233
- const defaultFundUsi = superSelectionAppService.defaultFundUsi;
4234
- if (Option.isNone(defaultFundUsi)) {
4235
- return;
4236
- }
3967
+ static get Instance() {
3968
+ return this.instance || (this.instance = new this());
3969
+ }
3970
+ async TrackSuperFundPdsViewedAsync(detail) {
3971
+ return this.trackEventAsync({
3972
+ SuperFundPdsViewed: detail
3973
+ });
3974
+ }
3975
+ async TrackPromotedSuperFundDetailViewedAsync(detail) {
3976
+ return this.trackEventAsync({
3977
+ SuperFundDetailViewed: {
3978
+ PromotedFund: detail
3979
+ }
3980
+ });
3981
+ }
3982
+ async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3983
+ return this.trackEventAsync({
3984
+ SuperFundDetailViewed: {
3985
+ PromotedDefaultFund: detail
3986
+ }
3987
+ });
3988
+ }
3989
+ async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3990
+ return this.trackEventAsync({
3991
+ SuperFundDetailViewed: {
3992
+ MyOwnFund: detail
3993
+ }
3994
+ });
3995
+ }
3996
+ async TrackSmsfSuperFundDetailViewedAsync(detail) {
3997
+ return this.trackEventAsync({
3998
+ SuperFundDetailViewed: {
3999
+ Smsf: detail
4000
+ }
4001
+ });
4002
+ }
4003
+ async TrackDefaultSuperFundDetailViewedAsync(detail) {
4004
+ return this.trackEventAsync({
4005
+ SuperFundDetailViewed: {
4006
+ DefaultFund: detail
4007
+ }
4008
+ });
4009
+ }
4010
+ async TrackSuperFundNominationViewedAsync(detail) {
4011
+ return this.trackEventAsync({
4012
+ SuperFundNominationViewed: detail
4013
+ });
4014
+ }
4015
+ async TrackSuperFundNominationDeclinedAsync(detail) {
4016
+ return this.trackEventAsync({
4017
+ SuperFundNominationDeclined: detail
4018
+ });
4019
+ }
4020
+ async TrackSuperFundDisclaimerViewedAsync(detail) {
4021
+ return this.trackEventAsync({
4022
+ SuperFundDisclaimerViewed: detail
4023
+ });
4024
+ }
4025
+ async TrackSuperFundDisclaimerAcceptedAsync(detail) {
4026
+ return this.trackEventAsync({
4027
+ SuperFundDisclaimerAccepted: detail
4028
+ });
4029
+ }
4030
+ async TrackSuperFundPrefillViewedAsync(detail) {
4031
+ return this.trackEventAsync({
4032
+ SuperFundPrefillViewed: detail
4033
+ });
4034
+ }
4035
+ async TrackSuperFundPrefillDeclinedAsync(detail) {
4036
+ return this.trackEventAsync({
4037
+ SuperFundPrefillDeclined: detail
4038
+ });
4039
+ }
4040
+ async TrackSuperFundDetailChangeRequestedAsync(detail) {
4041
+ return this.trackEventAsync({
4042
+ SuperFundDetailChangeRequested: detail
4043
+ });
4044
+ }
4045
+ async TrackSuperCampaignActivationSucceededAsync(detail) {
4046
+ return this.trackEventAsync({
4047
+ SuperCampaignActivationSucceeded: detail
4048
+ });
4049
+ }
4050
+ async TrackSuperMyOwnFundEngagementStepActivationSucceeded(fundUsi) {
4051
+ return this.trackEventAsync({
4052
+ SuperMyOwnFundEngagementStepActivationSucceeded: { fundUsi }
4053
+ });
4054
+ }
4055
+ async TrackSuperMyOwnFundEngagementStepContinued(fundUsi, reason) {
4056
+ return this.trackEventAsync({
4057
+ SuperMyOwnFundEngagementStepContinued: { fundUsi, reason }
4058
+ });
4059
+ }
4060
+ async trackEventAsync(event) {
4061
+ try {
4062
+ await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
4063
+ }
4064
+ catch (_a) {
4065
+ return;
4066
+ }
4067
+ }
4068
+ }
4069
+
4070
+ class CustomFundChoiceApi {
4071
+ async submitDefaultFundChoiceAsync(dto) {
4072
+ return buildBackendApiClient()
4073
+ .url('super-choice/default')
4074
+ .post(dto)
4075
+ .badRequest(() => {
4076
+ throw new Error('Failed to process default fund join request');
4077
+ })
4078
+ .text();
4079
+ }
4080
+ async submitCustomFundChoiceAsync(dto) {
4081
+ return buildBackendApiClient()
4082
+ .url('super-choice/custom-fund')
4083
+ .post(dto)
4084
+ .badRequest(() => {
4085
+ throw new Error('Failed to process custom fund join request');
4086
+ })
4087
+ .text();
4088
+ }
4089
+ async submitSelfManagedFundChoiceAsync(dto) {
4090
+ return buildBackendApiClient()
4091
+ .url('super-choice/smsf')
4092
+ .post(dto)
4093
+ .badRequest(() => {
4094
+ throw new Error('Failed to process SMSF choice request');
4095
+ })
4096
+ .text();
4097
+ }
4098
+ async submitDefinedBenefitsChoiceAsync(dto) {
4099
+ return buildBackendApiClient()
4100
+ .url('super-choice/defined-benefits')
4101
+ .post(dto)
4102
+ .badRequest(() => {
4103
+ throw new Error('Failed to process Defined Benefits choice request');
4104
+ })
4105
+ .text();
4106
+ }
4107
+ async validateAbnForSMSF(abn) {
4108
+ const response = await buildBackendApiClient()
4109
+ .url(`super-choice/smsf/${abn}/validate`)
4110
+ .get()
4111
+ .badRequest(() => {
4112
+ throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4113
+ })
4114
+ .json();
4115
+ return response.result;
4116
+ }
4117
+ }
4118
+ const customFundChoiceApi = new CustomFundChoiceApi();
4119
+
4120
+ const DefaultFund = class {
4121
+ constructor(hostRef) {
4122
+ index.registerInstance(this, hostRef);
4123
+ this.defaultFundProductName = 'Loading fund...';
4124
+ this.eventTrackingService = EventTrackingService.Instance;
4125
+ }
4126
+ async componentWillLoad() {
4127
+ const defaultFundUsi = superSelectionAppService.defaultFundUsi;
4128
+ if (Option.isNone(defaultFundUsi)) {
4129
+ return;
4130
+ }
4237
4131
  this.isDefaultFundExists = true;
4238
4132
  const defaultFundSearchResult = await australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
4239
4133
  if (Option.isNone(defaultFundSearchResult)) {
@@ -4442,466 +4336,6 @@ const SelectInputAsync = class {
4442
4336
  };
4443
4337
  SelectInputAsync.style = dropdownAsyncCss;
4444
4338
 
4445
- const name = 'Active Super';
4446
- const fund = {
4447
- fundId: 'active',
4448
- name,
4449
- logo: 'logo-active.svg',
4450
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4451
- features: [
4452
- index.h("p", null, "Winner of Canstar's 2023 Outstanding Value \u2013 Superannuation Award considering investment performance, fees and product features*"),
4453
- index.h("p", null, "Recognised as a leader in responsible investment"),
4454
- index.h("p", null, "Calls answered in 20 seconds (average over 5 years)")
4455
- ],
4456
- featureSubText: (index.h("span", null, "*Based on a comparison of the Active Super Accumulation Scheme held by those aged 20-69 years and balances between $30,000 and $1.5 million.")),
4457
- disclaimer: (index.h("p", null,
4458
- "Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at",
4459
- ' ',
4460
- index.h(Link, { onClick: () => pdsViewedAsync(name), href: "https://www.activesuper.com.au/pds" }, "activesuper.com.au"),
4461
- ' ',
4462
- "before making a decision.")),
4463
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4464
- dtoPropName: 'active'
4465
- };
4466
-
4467
- const name$1 = 'Australian Ethical';
4468
- const pdsUrl = 'https://www.australianethical.com.au/super/pds-forms/';
4469
- const fund$1 = {
4470
- fundId: 'australian-ethical',
4471
- name: name$1,
4472
- logo: 'logo-aus-eth.svg',
4473
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4474
- features: [
4475
- index.h("p", null,
4476
- "Fastest growing super fund in Australia",
4477
- index.h("sup", { class: "text-tiny" }, "1")),
4478
- index.h("p", null,
4479
- "Nil investments in fossil fuel companies",
4480
- index.h("sup", { class: "text-tiny" }, "2")),
4481
- index.h("p", null, "Competitive returns")
4482
- ],
4483
- featureSubText: (index.h("ol", { class: "list-decimal list-outside ml-3" },
4484
- index.h("li", null, "Source: KPMG Super Insights Report 2022."),
4485
- index.h("li", null, "All our options go through positive and negative ethical screening in accordance with the Australian Ethical Charter (in place since 1986)."))),
4486
- disclaimer: (index.h("p", null,
4487
- "Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the",
4488
- ' ',
4489
- index.h(Link, { href: "https://www.australianethical.com.au/globalassets/pdf-files/forms--pds/superpension/important-information/ae-financial-services-guide_sec.pdf" }, "Financial Services Guide"),
4490
- ", the",
4491
- ' ',
4492
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Product Disclosure Statement"),
4493
- ' ',
4494
- "and",
4495
- ' ',
4496
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Target Market Determination"),
4497
- ' ',
4498
- "available on our",
4499
- ' ',
4500
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "website"),
4501
- ".")),
4502
- footnoteTextOverride: Option.none,
4503
- dtoPropName: 'australianEthical'
4504
- };
4505
-
4506
- const name$2 = 'Australian Retirement Trust';
4507
- const fund$2 = {
4508
- fundId: 'australian-retirement-trust',
4509
- name: name$2,
4510
- logo: 'logo-art.svg',
4511
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4512
- features: [
4513
- index.h("p", null, "$200 billion in retirement savings"),
4514
- index.h("p", null, "2+ million members"),
4515
- index.h("p", null, "A focus on delivering strong, long\u2011term returns")
4516
- ],
4517
- featureSubText: (index.h("span", null, "QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option.")),
4518
- disclaimer: (index.h("p", null,
4519
- "You should consider the",
4520
- ' ',
4521
- index.h(Link, { href: "https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf", onClick: () => pdsViewedAsync(name$2) }, "Product Disclosure Statement"),
4522
- ' ',
4523
- "and",
4524
- ' ',
4525
- index.h(Link, { href: "https://www.australianretirementtrust.com.au/tmd" }, "Target Market Determination"),
4526
- ' ',
4527
- "before deciding to invest in or apply to become a member of this fund.")),
4528
- abnInfo: name$2,
4529
- abn: '60 905 115 063',
4530
- footnoteTextOverride: Option.none,
4531
- dtoPropName: 'australianRetirementTrust'
4532
- };
4533
-
4534
- const name$3 = 'Aware Super';
4535
- const fund$3 = {
4536
- fundId: 'aware',
4537
- name: name$3,
4538
- logo: 'logo-aware.svg',
4539
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4540
- features: [
4541
- index.h("p", null, "Awarded Canstar\u2019s Outstanding Value Super^ in 2022 and 2023."),
4542
- index.h("p", null,
4543
- "Over 1 million",
4544
- index.h("sup", { class: "text-tiny" }, "\u2021"),
4545
- " Australians trust us with their super."),
4546
- index.h("p", null, "Our super helpful app helps you stay in control of your super.")
4547
- ],
4548
- featureSubText: (index.h("div", { class: "space-y-0.5" },
4549
- index.h("p", null,
4550
- "^ See ",
4551
- index.h(Link, { href: "https://aware.com.au/awards" }, "aware.com.au/awards"),
4552
- " for more information"),
4553
- index.h("p", null,
4554
- index.h("sup", { class: "text-tiny" }, "\u2021"),
4555
- " Member numbers as of December 2023"))),
4556
- disclaimer: (index.h("p", null,
4557
- "You should consider the",
4558
- ' ',
4559
- index.h(Link, { href: "https://aware.com.au/member/campaign/flare-documents?cid=par-aq-no-su-Flare-PDSTMD-Direct-ImpDocs-", onClick: () => pdsViewedAsync(name$3) }, "Product Disclosure Statement and Target Market Determination"),
4560
- ' ',
4561
- "before deciding to invest in or apply to become a member of this fund.")),
4562
- abnInfo: `Aware Super Pty Ltd`,
4563
- abn: '53 226 460 365',
4564
- footnoteTextOverride: Option.none,
4565
- dtoPropName: 'aware'
4566
- };
4567
-
4568
- const name$4 = 'First Super';
4569
- const fund$4 = {
4570
- fundId: 'first-super',
4571
- name: name$4,
4572
- logo: 'logo-first.svg',
4573
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4574
- features: [
4575
- index.h("p", null, "Industry SuperFund that offers five investment options and default insurance"),
4576
- index.h("p", null, "Strong long-term investment returns and superior customer service - members first"),
4577
- index.h("p", null, "Established super fund \u2013 anyone can join including KiwiSaver members")
4578
- ],
4579
- disclaimer: (index.h("div", null,
4580
- index.h("p", null,
4581
- "General advice only which has been prepared without taking into account your objectives, financial situation or needs. Consider whether the advice is appropriate for you and read the Product Disclosure Statement (PDS) before making any investment decisions. PDS and Target Market Determination are available at our",
4582
- ' ',
4583
- index.h(Link, { onClick: () => pdsViewedAsync(name$4), href: "https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/" }, "website"),
4584
- ". Past performance is not a reliable indicator of future performance."),
4585
- index.h("br", null),
4586
- index.h("p", null, "Issued by First Super Pty Ltd ABN 42 053 498 472, AFSL 223988 (Trustee) as Trustee of First Super ABN 56 286 625 181."))),
4587
- footnoteTextOverride: Option.none,
4588
- dtoPropName: 'firstSuper'
4589
- };
4590
-
4591
- const name$5 = 'HESTA';
4592
- const fund$5 = {
4593
- fundId: 'hesta-default',
4594
- name: name$5,
4595
- logo: 'logo-hesta.svg',
4596
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4597
- features: [
4598
- index.h("p", null, "A top-performing super fund* working for real-world impact"),
4599
- index.h("p", null, "1+ million members"),
4600
- index.h("p", null, "Expert help whenever you need it to help you face the future with confidence")
4601
- ],
4602
- featureSubText: undefined,
4603
- disclaimer: (index.h("div", { class: "space-y-2" },
4604
- index.h("p", { class: "italic" },
4605
- "* SuperRatings 10 Year Platinum Performance 2014-2024 (MySuper). Investment performance contributes to but is not the only factor in determining this product rating. Product ratings and awards are only one factor to be considered. See",
4606
- ' ',
4607
- index.h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
4608
- ' ',
4609
- "for more information."),
4610
- index.h("p", null,
4611
- "Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
4612
- ' ',
4613
- index.h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
4614
- ' ',
4615
- "In considering your own circumstances about the suitability of HESTA products, you may wish to consult an adviser or use the ATO YourSuper comparison tool. Please also consider the relevant risks."),
4616
- index.h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
4617
- footnoteTextOverride: Option.none,
4618
- isPromotedDefault: true
4619
- };
4620
-
4621
- const name$6 = 'Mercer MyChoice';
4622
- const fund$6 = {
4623
- fundId: 'mercermychoice',
4624
- name: name$6,
4625
- logo: 'logo-mercer-mychoice.svg',
4626
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4627
- features: [
4628
- index.h("p", null, "Save more super with our low fees"),
4629
- index.h("p", null, "Take control with 6 MyChoice investment options"),
4630
- index.h("p", null, "Join 850,000 Australians who trust our global expertise")
4631
- ],
4632
- disclaimer: (index.h("div", null,
4633
- index.h("p", null,
4634
- "You should consider the",
4635
- ' ',
4636
- index.h(Link, { href: "https://www.mercersuper.com.au/campaign-page/mercer-mychoice", onClick: () => pdsViewedAsync(name$6) }, "Product Disclosure Statement"),
4637
- ' ',
4638
- "and",
4639
- ' ',
4640
- index.h(Link, { href: "https://www.mercersuper.com.au/documents/target-market-determinations" }, "Target Market Determination"),
4641
- ' ',
4642
- "before deciding to invest in or apply to become a member of the fund."),
4643
- index.h("br", null),
4644
- index.h("p", null, "Issued by Mercer Superannuation (Australia) Limited (\u2018Mercer Super\u2019) ABN: 79 004 717 533"))),
4645
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4646
- dtoPropName: 'mercerMyChoice',
4647
- extraBadge: (index.h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
4648
- };
4649
-
4650
- const name$7 = 'REI Super';
4651
- const fund$7 = {
4652
- fundId: 'reisuper',
4653
- name: name$7,
4654
- logo: 'logo-rei.svg',
4655
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4656
- features: [
4657
- index.h("p", null, "Built by and for the real estate industry"),
4658
- index.h("p", null, "Consistent long-term performance with competitive fees*"),
4659
- index.h("p", null, "All profits to members, not shareholders")
4660
- ],
4661
- disclaimer: (index.h("div", { class: "space-y-2" },
4662
- index.h("p", null, "*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),
4663
- index.h("p", null,
4664
- "You should consider the",
4665
- ' ',
4666
- index.h(Link, { href: "https://www.reisuper.com.au/docs/default-source/super/rei-super-pds.pdf?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=pds", onClick: () => pdsViewedAsync(name$7) }, "Product Disclosure Statement"),
4667
- ' ',
4668
- "and",
4669
- ' ',
4670
- index.h(Link, { href: "https://www.reisuper.com.au/publications-and-forms/target-market-determination?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=tmd" }, "Target Market Determination"),
4671
- ' ',
4672
- "before deciding to invest in or apply to become a member of the fund."))),
4673
- abnInfo: `REI Superannuation Fund Pty Ltd`,
4674
- abn: '68 056 044 770',
4675
- footnoteTextOverride: Option.none,
4676
- dtoPropName: 'reisuper'
4677
- };
4678
-
4679
- const name$8 = 'Slate Super';
4680
- const slateUsi = '32367272075001';
4681
- const fund$8 = {
4682
- fundId: 'slate',
4683
- name: name$8,
4684
- logo: 'logo-slate.png',
4685
- route: SuperSelectionAppRoutes.SlateJoin,
4686
- features: [
4687
- index.h("p", null, "A lifestage investment strategy that evolves with you"),
4688
- index.h("p", null, "Advanced mobile app with retirement forecast and smart features"),
4689
- index.h("p", null, "Member advocates at Slate to assist with your account")
4690
- ],
4691
- disclaimer: (index.h("p", { class: "small text-muted" },
4692
- "You should consider the",
4693
- ' ',
4694
- index.h(Link, { href: "https://slate.co/pds/?utm_source=flare&utm_medium=superselection", onClick: () => pdsViewedAsync(name$8, slateUsi) }, "Product Disclosure Statement"),
4695
- ' ',
4696
- "and",
4697
- ' ',
4698
- index.h(Link, { href: "https://slate.co/forms-and-documents/target-market-determination/" }, "Target Market Determination"),
4699
- ' ',
4700
- "before deciding to invest in or apply to become a member of the fund.")),
4701
- abnInfo: `Diversa Trustees Limited`,
4702
- abn: '49 006 421 638',
4703
- footnoteTextOverride: Option.none,
4704
- dtoPropName: 'slate'
4705
- };
4706
-
4707
- const name$9 = 'Spirit Super';
4708
- const fund$9 = {
4709
- fundId: 'spirit',
4710
- name: name$9,
4711
- logo: 'logo-spirit.svg',
4712
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4713
- features: [
4714
- index.h("p", null, "Proud Industry SuperFund - all profits go back to members"),
4715
- index.h("p", null,
4716
- "Best customer experience in super",
4717
- index.h("sup", { class: "text-tiny" }, "1"),
4718
- " and best for value",
4719
- index.h("sup", { class: "text-tiny" }, "2")),
4720
- index.h("p", null,
4721
- "Low fees",
4722
- index.h("sup", { class: "text-tiny" }, "3"),
4723
- " with a focus on strong returns and investing with impact in communities",
4724
- index.h("sup", { class: "text-tiny" }, "4"))
4725
- ],
4726
- featureSubText: (index.h("div", { class: "m-4 pt-2" },
4727
- index.h("ol", { class: "list-decimal space-y-2" },
4728
- index.h("li", null,
4729
- index.h("span", null, "CSBA SenseCX Benchmark 2021-22")),
4730
- index.h("li", null,
4731
- index.h("span", null, "Awarded Best for Value in the WeMoney Superannuation Awards 2022")),
4732
- index.h("li", null,
4733
- index.h("span", null, "Just $67.60 + 0.15% pa admin fees, capped at $517.60")),
4734
- index.h("li", null,
4735
- index.h("span", null, "Rainmaker ESG Leader Rating 2022"))))),
4736
- disclaimer: (index.h("p", null,
4737
- "Past performance isn\u2019t a reliable indicator of future performance. Consider the PDS and TMD at",
4738
- ' ',
4739
- index.h(Link, { href: "https://www.spiritsuper.com.au/pds", onClick: () => pdsViewedAsync(name$9) }, "www.spiritsuper.com.au/pds"),
4740
- ' ',
4741
- "before making a decision. Issuer is Motor Trades Association of Australia Superannuation Fund Pty Ltd (AFSL 238 718, ABN 14 008 650 628), the trustee of Spirit Super (ABN 74 559 365 913). Advice is provided by Quadrant First Pty Ltd (ABN 78 102 167 877, AFSL 284443).")),
4742
- footnoteTextOverride: Option.none,
4743
- dtoPropName: 'spirit'
4744
- };
4745
-
4746
- const name$a = 'Unisuper';
4747
- const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4748
- const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4749
- const fund$a = {
4750
- fundId: 'unisuper-default',
4751
- name: name$a,
4752
- logo: 'logo-unisuper.svg',
4753
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4754
- features: [
4755
- index.h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4756
- index.h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4757
- index.h("p", null,
4758
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4759
- index.h("sup", { class: "text-tiny" }, "#"))
4760
- ],
4761
- disclaimer: (index.h("div", { class: "space-y-2" },
4762
- index.h("p", null,
4763
- "^Read more about our fees and how we compare",
4764
- ' ',
4765
- index.h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4766
- "."),
4767
- index.h("p", null,
4768
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4769
- ' ',
4770
- index.h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4771
- "."),
4772
- index.h("p", null,
4773
- index.h("sup", { class: "text-tiny" }, "#"),
4774
- "See our awards",
4775
- ' ',
4776
- index.h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4777
- "."),
4778
- index.h("p", null,
4779
- "Remember to consider the",
4780
- ' ',
4781
- index.h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$a) }, "Product Disclosure Statement"),
4782
- ' ',
4783
- "and ",
4784
- index.h(Link, { href: tmdUrl }, "Target Market Determination"),
4785
- " that is relevant to you."),
4786
- index.h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4787
- footnoteTextOverride: Option.none,
4788
- isPromotedDefault: true
4789
- };
4790
-
4791
- const name$b = 'Unisuper';
4792
- const pdsUrl$2 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4793
- const tmdUrl$1 = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4794
- const fund$b = {
4795
- fundId: 'unisuper-default-v2',
4796
- name: name$b,
4797
- logo: 'logo-unisuper.svg',
4798
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4799
- features: [
4800
- index.h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4801
- index.h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4802
- index.h("p", null,
4803
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4804
- index.h("sup", { class: "text-tiny" }, "#"))
4805
- ],
4806
- customContent: (index.h("div", { class: "mt-6 flex gap-3" },
4807
- index.h("div", null,
4808
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge1.svg`) })),
4809
- index.h("div", null,
4810
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge2.svg`) })),
4811
- index.h("div", null,
4812
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge3.svg`) })))),
4813
- disclaimer: (index.h("div", { class: "space-y-2" },
4814
- index.h("p", null,
4815
- "^Read more about our fees and how we compare",
4816
- ' ',
4817
- index.h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4818
- "."),
4819
- index.h("p", null,
4820
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4821
- ' ',
4822
- index.h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4823
- "."),
4824
- index.h("p", null,
4825
- index.h("sup", { class: "text-tiny" }, "#"),
4826
- "See our awards",
4827
- ' ',
4828
- index.h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4829
- "."),
4830
- index.h("p", null,
4831
- "Remember to consider the",
4832
- ' ',
4833
- index.h(Link, { href: pdsUrl$2, onClick: () => pdsViewedAsync(name$b) }, "Product Disclosure Statement"),
4834
- ' ',
4835
- "and ",
4836
- index.h(Link, { href: tmdUrl$1 }, "Target Market Determination"),
4837
- " that is relevant to you."),
4838
- index.h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4839
- footnoteTextOverride: Option.none,
4840
- isPromotedDefault: true
4841
- };
4842
-
4843
- const name$c = 'Virgin Money Super';
4844
- const fund$c = {
4845
- fundId: 'virgin',
4846
- name: name$c,
4847
- logo: 'logo-virgin.svg',
4848
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4849
- features: [
4850
- index.h("p", null,
4851
- "Returns above industry and retail super fund medians over the past 5 years",
4852
- index.h("sup", { class: "text-tiny" }, "1")),
4853
- index.h("p", null, "One of the lowest fees in the market"),
4854
- index.h("p", null,
4855
- "Virgin Money rewards you with Velocity Points on your contributions",
4856
- index.h("sup", { class: "text-tiny" }, "2"))
4857
- ],
4858
- featureSubText: (index.h("div", { class: "m-4 pt-2" },
4859
- index.h("ol", { class: "list-decimal space-y-2" },
4860
- index.h("li", null,
4861
- index.h("span", null, "Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),
4862
- index.h("li", null,
4863
- index.h("span", null,
4864
- index.h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://virginmoney.com.au/superannuation/forms-and-key-information/key-documents" }, "Eligibility and T&Cs apply")))))),
4865
- disclaimer: (index.h("p", null,
4866
- "Prepared by Virgin Money Financial Services Pty Ltd ABN 51 113 285 395 AFSL 286869 (\u2018Virgin Money\u2019). Virgin Money Super is a plan in the Mercer Super Trust ABN 19 905 422 981. Virgin Money Super is issued by Mercer Superannuation (Australia) Limited (MSAL) ABN 79 004 717 533 AFSL 235906 as trustee of the Mercer Super Trust. Consider the PDS and TMD at",
4867
- ' ',
4868
- index.h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$c) }, "www.virginmoney.com.au"),
4869
- ' ',
4870
- "before making a decision")),
4871
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4872
- dtoPropName: 'virgin',
4873
- extraBadge: (index.h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
4874
- };
4875
-
4876
- const fundsById = {
4877
- [fund$8.fundId]: fund$8,
4878
- [fund$2.fundId]: fund$2,
4879
- [fund$3.fundId]: fund$3,
4880
- [fund.fundId]: fund,
4881
- [fund$1.fundId]: fund$1,
4882
- [fund$c.fundId]: fund$c,
4883
- [fund$9.fundId]: fund$9,
4884
- [fund$4.fundId]: fund$4,
4885
- [fund$6.fundId]: fund$6,
4886
- [fund$5.fundId]: fund$5,
4887
- [fund$a.fundId]: fund$a,
4888
- [fund$b.fundId]: fund$b,
4889
- [fund$7.fundId]: fund$7
4890
- };
4891
- const allPromotedFunds = Object.values(fundsById);
4892
- const getFundByDtoPropName = (dtoPropName) => {
4893
- const fund = allPromotedFunds.find((f) => f.dtoPropName == dtoPropName);
4894
- return fund ? some(fund) : none;
4895
- };
4896
- const getFundByFundId = (fundId) => {
4897
- const fund = allPromotedFunds.find((f) => f.fundId == fundId);
4898
- return fund ? some(fund) : none;
4899
- };
4900
- const getFundNameByFundId = (fundId) => fundsById[fundId] != undefined ? some(fundsById[fundId].name) : none;
4901
- const getFooterTextOverrideByFundId = (fundId) => { var _a, _b; return (_b = (_a = fundsById[fundId]) === null || _a === void 0 ? void 0 : _a.footnoteTextOverride) !== null && _b !== void 0 ? _b : none; };
4902
- const getFundUsiByFundId = (fundId) => fundId == fund$8.fundId ? some(slateUsi) : none;
4903
- const getLogoSrcByFundId = (fundId) => fundsById[fundId] != undefined ? some(index.getAssetPath(`assets/${fundsById[fundId].logo}`)) : none;
4904
-
4905
4339
  class ExistingFundService {
4906
4340
  async GetExistingFundAsync() {
4907
4341
  var _a;
@@ -4916,24 +4350,13 @@ class ExistingFundService {
4916
4350
  const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
4917
4351
  switch (choiceDetails.kind) {
4918
4352
  case 'Promoted': {
4919
- const fund = choiceDetails.promoted['generic']
4920
- ? getFundByFundId(choiceDetails.promoted['generic'].fundId)
4921
- : getFundByDtoPropName(Object.keys(choiceDetails.promoted)[0]);
4922
- let fundName = '';
4923
- if (isSome(fund)) {
4924
- fundName = fund.value.name;
4925
- }
4926
- else if (isSome(usi)) {
4927
- const fundLookup = await this.getFundByUsiAsync(usi.value);
4928
- fundName = isSome(fundLookup) ? fundLookup.value.productName : usi.value;
4929
- }
4930
- else {
4353
+ if (isNone(usi))
4931
4354
  return none;
4932
- }
4355
+ const fund = await this.getFundByUsiAsync(usi.value);
4933
4356
  return some({
4934
4357
  type: 'Promoted Fund',
4935
4358
  id: getPromotedFundId(choiceDetails.promoted),
4936
- name: fundName,
4359
+ name: isSome(fund) ? fund.value.productName : usi.value,
4937
4360
  usi: usi,
4938
4361
  valid: 'Active',
4939
4362
  memberNumber: memberNumber,
@@ -5067,14 +4490,12 @@ const ExistingChoice = class {
5067
4490
  this.existingFund = chosenFundOption.value;
5068
4491
  }
5069
4492
  else {
5070
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4493
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5071
4494
  }
5072
4495
  }
5073
4496
  render() {
5074
- const PromotedFundView = (props) => {
5075
- const logo = getLogoSrcByFundId(props.id);
5076
- const fundName = getFundNameByFundId(props.id);
5077
- return (index.h("div", { class: "flex justify-center" }, index.h("img", { class: "h-16 object-contain w-full max-w-140", alt: isSome(fundName) ? fundName.value : undefined, src: isSome(logo) ? logo.value : undefined })));
4497
+ const PromotedFundView = (_props) => {
4498
+ return (index.h("div", { class: "flex justify-center" }));
5078
4499
  };
5079
4500
  const MyOwnFundView = () => {
5080
4501
  return (index.h("div", { class: "flex h-20 justify-center items-center relative" }, index.h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), index.h("div", { class: "h-10 w-10 absolute" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", class: "fill-primary-base" }, index.h("path", { d: "M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z" })))));
@@ -5095,7 +4516,7 @@ const ExistingChoice = class {
5095
4516
  switch (this.existingFund.type) {
5096
4517
  case 'Promoted Fund':
5097
4518
  case 'Promoted Default Fund':
5098
- return index.h(PromotedFundView, { id: this.existingFund.id });
4519
+ return index.h(PromotedFundView, { name: this.existingFund.name });
5099
4520
  case 'Self Managed Fund':
5100
4521
  return index.h(SelfManagedFundView, null);
5101
4522
  case 'My Own Fund':
@@ -5132,7 +4553,7 @@ const ExistingChoice = class {
5132
4553
  async handleFundNominationDeclined() {
5133
4554
  const detail = this.createSuperFundNominationDetail(this.existingFund);
5134
4555
  await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
5135
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4556
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5136
4557
  }
5137
4558
  };
5138
4559
 
@@ -5140,13 +4561,13 @@ const DefaultFooterText = 'Powered by Flare';
5140
4561
  const FooterSection = class {
5141
4562
  constructor(hostRef) {
5142
4563
  index.registerInstance(this, hostRef);
5143
- this.footerText = () => Option.isSome(this.textOverride) ? this.textOverride.value : DefaultFooterText;
4564
+ this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
5144
4565
  }
5145
4566
  render() {
5146
4567
  return (index.h("div", { class: {
5147
4568
  'text-center text-gray-500 text-xs w-full max-w-960 mx-auto': true,
5148
- 'mt-8 sm:mt-20': !superSelectionAppService.superCampaignIsInView
5149
- } }, !superSelectionAppService.superCampaignIsInView && index.h("span", null, this.footerText()), index.h("p", { class: "block text-transparent" }, "v", AppVersion)));
4569
+ 'mt-8 sm:mt-20': !superSelectionAppService.hideFooterSection
4570
+ } }, !superSelectionAppService.hideFooterSection && index.h("span", null, this.footerText()), index.h("p", { class: "block text-transparent" }, "v", AppVersion)));
5150
4571
  }
5151
4572
  };
5152
4573
 
@@ -5176,27 +4597,6 @@ const HeaderSection = class {
5176
4597
  }
5177
4598
  };
5178
4599
 
5179
- const IFrameHost = class {
5180
- constructor(hostRef) {
5181
- index.registerInstance(this, hostRef);
5182
- }
5183
- componentDidLoad() {
5184
- this.build(this.iframeElement);
5185
- }
5186
- render() {
5187
- return (index.h("div", { class: "w-screen" }, index.h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
5188
- }
5189
- };
5190
-
5191
- const LoadingComponent = class {
5192
- constructor(hostRef) {
5193
- index.registerInstance(this, hostRef);
5194
- }
5195
- render() {
5196
- return (index.h("div", { class: "w-full bg-white flex flex-col items-center" }, index.h("sss-loading-indicator", null), index.h("h5", { class: "mt-4 text-xl font-bold leading-7" }, this.header), index.h("slot", null)));
5197
- }
5198
- };
5199
-
5200
4600
  const LoadingIndicator = class {
5201
4601
  constructor(hostRef) {
5202
4602
  index.registerInstance(this, hostRef);
@@ -5217,15 +4617,6 @@ const LoadingPage = class {
5217
4617
  }
5218
4618
  };
5219
4619
 
5220
- const LoadingComponent$1 = class {
5221
- constructor(hostRef) {
5222
- index.registerInstance(this, hostRef);
5223
- }
5224
- render() {
5225
- return (index.h("sss-loading-component", { header: "Loading Super" }, index.h("p", { class: "text-base text-gray-600 mt-4 max-w-560 text-center font-normal leading-7" }, "This can take up to 30 seconds.", index.h("br", null), "Please don\u2019t navigate away or refresh your browser.")));
5226
- }
5227
- };
5228
-
5229
4620
  const MyOwnFund = class {
5230
4621
  constructor(hostRef) {
5231
4622
  index.registerInstance(this, hostRef);
@@ -5243,8 +4634,8 @@ const MyOwnFund = class {
5243
4634
  const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
5244
4635
  return (index.h(index.Host, null, index.h("sss-header-section", { currentPage: "own-fund" }), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
5245
4636
  'was-validated': this.formState === 'validated'
5246
- }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, index.h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, index.h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), index.h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-exclamation.svg') })), index.h("div", { class: "ml-2" }, index.h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, index.h("li", null, "Make sure you are a current member of the fund before completing this step."), index.h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), index.h("sss-my-own-fund-inputs", { myOwnFundForm: state$2.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
5247
- state$2.myOwnFundForm = Object.assign(Object.assign({}, state$2.myOwnFundForm), event.detail);
4637
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, index.h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, index.h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), index.h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-exclamation.svg') })), index.h("div", { class: "ml-2" }, index.h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, index.h("li", null, "Make sure you are a current member of the fund before completing this step."), index.h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), index.h("sss-my-own-fund-inputs", { myOwnFundForm: state$1.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
4638
+ state$1.myOwnFundForm = Object.assign(Object.assign({}, state$1.myOwnFundForm), event.detail);
5248
4639
  this.isNotAllInformationProvidedMessageVisible = false;
5249
4640
  } }), this.isNotAllInformationProvidedMessageVisible && (index.h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "sm:max-w-320 w-full" }, index.h("div", { class: "mb-4", onClick:
5250
4641
  // user clicks on disabled button (div wrapper) then validation errors will show
@@ -5255,25 +4646,30 @@ const MyOwnFund = class {
5255
4646
  if (!this.formElement.checkValidity()) {
5256
4647
  return;
5257
4648
  }
5258
- const isAllInformationProvided = isSome(state$2.myOwnFundForm.fundUsi) &&
5259
- isSome(state$2.myOwnFundForm.memberNumber) &&
5260
- isSome(state$2.myOwnFundForm.memberFirstName) &&
5261
- isSome(state$2.myOwnFundForm.memberFamilyName);
4649
+ const isAllInformationProvided = isSome(state$1.myOwnFundForm.fundUsi) &&
4650
+ isSome(state$1.myOwnFundForm.memberNumber) &&
4651
+ isSome(state$1.myOwnFundForm.memberFirstName) &&
4652
+ isSome(state$1.myOwnFundForm.memberFamilyName);
5262
4653
  if (!isAllInformationProvided) {
5263
4654
  this.isNotAllInformationProvidedMessageVisible = true;
5264
4655
  return;
5265
4656
  }
4657
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
4658
+ superSelectionAppService.isUsingSuperCampaign) {
4659
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFundEngagementStep);
4660
+ return;
4661
+ }
5266
4662
  navigationService.navigateInternallyToStandardChoice({
5267
4663
  history: this.history,
5268
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
4664
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
5269
4665
  fundDetails: {
5270
4666
  type: 'myOwnFund',
5271
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
5272
- fundUsi: this.getOrError(state$2.myOwnFundForm.fundUsi),
5273
- memberNumber: this.getOrError(state$2.myOwnFundForm.memberNumber)
4667
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
4668
+ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi),
4669
+ memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber)
5274
4670
  },
5275
4671
  handleSubmitFn: async (standardChoiceFormSignature) => {
5276
- const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$2.myOwnFundForm.fundUsi), memberNumber: this.getOrError(state$2.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(state$2.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(state$2.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
4672
+ const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi), memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(state$1.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(state$1.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5277
4673
  await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
5278
4674
  }
5279
4675
  });
@@ -5286,6 +4682,81 @@ const MyOwnFund = class {
5286
4682
  };
5287
4683
  injectHistory(MyOwnFund);
5288
4684
 
4685
+ const MyOwnFundEngagementStep = class {
4686
+ constructor(hostRef) {
4687
+ index.registerInstance(this, hostRef);
4688
+ this.stepContinued = async (event) => {
4689
+ if (event.detail.sender == 'byof-engagement') {
4690
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi, event.detail.reason);
4691
+ this.navigateToStandardChoice();
4692
+ }
4693
+ };
4694
+ this.subscribeToStepEvents = () => {
4695
+ for (const eventName in this.stepEventHandlers) {
4696
+ document.addEventListener(eventName, this.stepEventHandlers[eventName]);
4697
+ }
4698
+ };
4699
+ this.unSubscribeFromStepEvents = () => {
4700
+ for (const eventName in this.stepEventHandlers) {
4701
+ document.removeEventListener(eventName, this.stepEventHandlers[eventName]);
4702
+ }
4703
+ };
4704
+ this.stepEventHandlers = {
4705
+ continue: this.stepContinued.bind(this)
4706
+ };
4707
+ }
4708
+ async componentWillLoad() {
4709
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
4710
+ superSelectionAppService.isUsingSuperCampaign &&
4711
+ Option.isSome(state$1.myOwnFundForm.fundUsi) &&
4712
+ Option.isSome(state$1.myOwnFundForm.fundName) &&
4713
+ Option.isSome(state$1.myOwnFundForm.memberNumber) &&
4714
+ Option.isSome(state$1.myOwnFundForm.memberFirstName) &&
4715
+ Option.isSome(state$1.myOwnFundForm.memberFamilyName) &&
4716
+ Option.isSome(superSelectionAppService.backendUrl) &&
4717
+ Option.isSome(superSelectionAppService.state.jwt)) {
4718
+ this.backendUrl = superSelectionAppService.backendUrl.value;
4719
+ this.accessToken = superSelectionAppService.state.jwt.value;
4720
+ this.fundUsi = state$1.myOwnFundForm.fundUsi.value;
4721
+ this.fundName = state$1.myOwnFundForm.fundName.value;
4722
+ this.memberNumber = state$1.myOwnFundForm.memberNumber.value;
4723
+ this.memberFirstName = state$1.myOwnFundForm.memberFirstName.value;
4724
+ this.memberFamilyName = state$1.myOwnFundForm.memberFamilyName.value;
4725
+ this.unSubscribeFromStepEvents();
4726
+ this.subscribeToStepEvents();
4727
+ superSelectionAppService.hideFooterSection = true;
4728
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi);
4729
+ }
4730
+ else {
4731
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
4732
+ }
4733
+ }
4734
+ disconnectedCallback() {
4735
+ this.unSubscribeFromStepEvents();
4736
+ superSelectionAppService.hideFooterSection = false;
4737
+ }
4738
+ render() {
4739
+ return (index.h(index.Host, null, index.h("apollo-super-byof-engagement", { "backend-url": this.backendUrl, "access-token": this.accessToken, "fund-usi": this.fundUsi })));
4740
+ }
4741
+ navigateToStandardChoice() {
4742
+ navigationService.navigateInternallyToStandardChoice({
4743
+ history: this.history,
4744
+ fundName: this.fundName,
4745
+ fundDetails: {
4746
+ type: 'myOwnFund',
4747
+ fundName: this.fundName,
4748
+ fundUsi: this.fundUsi,
4749
+ memberNumber: this.memberNumber
4750
+ },
4751
+ handleSubmitFn: async (standardChoiceFormSignature) => {
4752
+ const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi, memberNumber: this.memberNumber, memberFirstName: this.memberFirstName, memberFamilyName: this.memberFamilyName, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
4753
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
4754
+ }
4755
+ });
4756
+ }
4757
+ };
4758
+ injectHistory(MyOwnFundEngagementStep);
4759
+
5289
4760
  const MyOwnFundInputs = class {
5290
4761
  constructor(hostRef) {
5291
4762
  index.registerInstance(this, hostRef);
@@ -5324,7 +4795,7 @@ const MyOwnFundInputs = class {
5324
4795
  'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
5325
4796
  'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5326
4797
  .showValidationErrors
5327
- }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$2.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))), index.h("div", { class: "flex space-x-4" }, index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: toUndefined(state$2.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))), index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: toUndefined(state$2.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
4798
+ }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$1.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))), index.h("div", { class: "flex space-x-4" }, index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))), index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
5328
4799
  }
5329
4800
  updateFund(fund) {
5330
4801
  this.formChanged.emit({ fundUsi: some(fund.value), fundName: some(fund.label) });
@@ -5426,7 +4897,7 @@ const Prefill = class {
5426
4897
  return this.renderInvalidSMSF(this.prefill.data);
5427
4898
  }
5428
4899
  }
5429
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4900
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5430
4901
  return null;
5431
4902
  }
5432
4903
  renderMyOwnFund(data) {
@@ -5821,8 +5292,8 @@ const PrefillInvalidMyOwnFund = class {
5821
5292
  }
5822
5293
  else {
5823
5294
  // If prefill does not exist, or is valid we should
5824
- // not have landed on this page, navigate to consent page
5825
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5295
+ // not have landed on this page, navigate to choice page
5296
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5826
5297
  }
5827
5298
  }
5828
5299
  render() {
@@ -5833,7 +5304,7 @@ const PrefillInvalidMyOwnFund = class {
5833
5304
  async handleChooseAnotherFund() {
5834
5305
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5835
5306
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5836
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5307
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5837
5308
  }
5838
5309
  };
5839
5310
 
@@ -5868,7 +5339,7 @@ const PrefillInvalidSMSF = class {
5868
5339
  }
5869
5340
  else {
5870
5341
  // If prefill does not exist, or is valid we should
5871
- // not have landed on this page, navigate to consent page
5342
+ // not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
5872
5343
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5873
5344
  }
5874
5345
  }
@@ -5896,7 +5367,7 @@ const PrefillInvalidSMSF = class {
5896
5367
  async handleFundNominationDeclined() {
5897
5368
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5898
5369
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5899
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5370
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5900
5371
  }
5901
5372
  };
5902
5373
 
@@ -5936,8 +5407,8 @@ const PrefillMyOwnFund = class {
5936
5407
  }
5937
5408
  else {
5938
5409
  // If prefill does not exist, or is invalid we should
5939
- // not have landed on this page, navigate to consent page
5940
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5410
+ // not have landed on this page, navigate to choice page
5411
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5941
5412
  }
5942
5413
  }
5943
5414
  render() {
@@ -6018,7 +5489,7 @@ const PrefillMyOwnFund = class {
6018
5489
  async handleFundNominationDeclined() {
6019
5490
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
6020
5491
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
6021
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5492
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6022
5493
  }
6023
5494
  };
6024
5495
 
@@ -6168,8 +5639,8 @@ const PrefillSMSF = class {
6168
5639
  }
6169
5640
  else {
6170
5641
  // If prefill does not exist, or is invalid we should
6171
- // not have landed on this page, navigate to consent page
6172
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5642
+ // not have landed on this page, navigate to PrefillInvalidSMSFPage page
5643
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
6173
5644
  }
6174
5645
  }
6175
5646
  render() {
@@ -6375,7 +5846,7 @@ const PrefillSMSF = class {
6375
5846
  async handleFundNominationDeclined() {
6376
5847
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
6377
5848
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
6378
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5849
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6379
5850
  }
6380
5851
  };
6381
5852
 
@@ -6391,181 +5862,344 @@ const PrefillWarningBox = class {
6391
5862
  }
6392
5863
  };
6393
5864
 
6394
- class PromotedFundChoiceApi {
6395
- async submitChoiceAsync(dto) {
6396
- return buildBackendApiClient()
6397
- .url('super-choice/promoted-fund')
6398
- .post(dto)
6399
- .badRequest(() => {
6400
- throw new Error('Failed to process Promoted Fund choice request');
6401
- })
6402
- .text();
6403
- }
6404
- async submitDefaultChoiceAsync(dto) {
6405
- return buildBackendApiClient()
6406
- .url('super-choice/promoted-fund/default')
6407
- .post(dto)
6408
- .badRequest(() => {
6409
- throw new Error('Failed to process Promoted Default Fund choice request');
6410
- })
6411
- .text();
6412
- }
6413
- async submitDefaultChoiceWithJoinAsync(dto) {
6414
- return buildBackendApiClient()
6415
- .url('super-choice/promoted-fund/default-with-join')
6416
- .post(dto)
6417
- .badRequest(() => {
6418
- throw new Error('Failed to process Promoted Default Fund With Join choice request');
6419
- })
6420
- .text();
5865
+ function validateAbn(abn) {
5866
+ const digitArray = abn.split('').map(Number);
5867
+ const isAllDigits = digitArray.every((d) => !isNaN(d));
5868
+ const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
5869
+ if (!isAllDigits || digitArray.length !== weightingFactors.length) {
5870
+ return false;
6421
5871
  }
5872
+ digitArray[0]--;
5873
+ const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
5874
+ return sum % 89 === 0;
6422
5875
  }
6423
- const promotedFundChoiceApi = new PromotedFundChoiceApi();
6424
5876
 
6425
- class PromotedFundJoinV1IFrameBuilder {
6426
- constructor() {
6427
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
6428
- this.environmentDiscriminator = () => {
6429
- return this.hostIsLocalSuperSelection()
6430
- ? 'autodev-partner'
6431
- : window.location.hostname.toLowerCase().split('.')[0];
6432
- };
6433
- this.promotedFundJoinAppUrl = () => {
6434
- return `https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`;
5877
+ const SelfManagedFund = class {
5878
+ constructor(hostRef) {
5879
+ index.registerInstance(this, hostRef);
5880
+ this.isSubmitDisabled = true;
5881
+ this.isAbnValid = validateAbn(state$1.selfManagedFundForm.fundAbn);
5882
+ this.eventTrackingService = EventTrackingService.Instance;
5883
+ this.success = () => {
5884
+ navigationService.navigateInternallyToStandardChoice({
5885
+ history: this.history,
5886
+ fundName: 'Self-managed super fund',
5887
+ fundDetails: {
5888
+ type: 'smsf',
5889
+ fundName: state$1.selfManagedFundForm.fundName,
5890
+ fundEsa: state$1.selfManagedFundForm.fundEsa
5891
+ },
5892
+ handleSubmitFn: async (standardChoiceFormSignature) => {
5893
+ const requestDto = Object.assign({ smsfChoice: {
5894
+ abn: state$1.selfManagedFundForm.fundAbn,
5895
+ fundName: state$1.selfManagedFundForm.fundName,
5896
+ fundAddress: {
5897
+ addressLine1: state$1.selfManagedFundForm.addressLine1,
5898
+ addressLine2: state$1.selfManagedFundForm.addressLine2,
5899
+ city: state$1.selfManagedFundForm.city,
5900
+ state: state$1.selfManagedFundForm.state,
5901
+ postcode: state$1.selfManagedFundForm.postcode
5902
+ },
5903
+ bsb: state$1.selfManagedFundForm.bsb,
5904
+ bankAccountName: state$1.selfManagedFundForm.bankAccountName,
5905
+ bankAccountNumber: state$1.selfManagedFundForm.bankAccountNumber,
5906
+ electronicServiceAddress: state$1.selfManagedFundForm.fundEsa,
5907
+ memberFirstName: state$1.selfManagedFundForm.memberFirstName,
5908
+ memberFamilyName: state$1.selfManagedFundForm.memberFamilyName
5909
+ }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5910
+ await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
5911
+ }
5912
+ });
6435
5913
  };
6436
5914
  }
6437
- build(iframe$1, history) {
6438
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
6439
- return;
6440
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt });
6441
- const handleMessage = (event) => {
6442
- const { data } = event;
6443
- if (!data) {
6444
- return;
6445
- }
6446
- if (data.sender === 'promoted-fund-redirect') {
6447
- window.removeEventListener('message', handleMessage);
6448
- switch (data.type) {
6449
- case 'cancel':
6450
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6451
- break;
6452
- case 'success':
6453
- if (data.memberNumber) {
6454
- const promotedFundId = state.fund.id;
6455
- const fundName = _function.pipe(getFundNameByFundId(promotedFundId), Option.getOrElse(() => ''));
6456
- const usi = data.usi.replace(/ /g, '');
6457
- navigationService.navigateInternallyToStandardChoice({
6458
- history,
6459
- fundName,
6460
- fundDetails: {
6461
- type: 'promoted',
6462
- fundName,
6463
- fundUsi: usi,
6464
- memberNumber: data.memberNumber,
6465
- promotedFundId
6466
- },
6467
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
6468
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
6469
- promotedFundId
6470
- });
6471
- break;
6472
- }
6473
- /* falls through */
6474
- default:
6475
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6476
- break;
6477
- }
6478
- reset();
6479
- return;
6480
- }
6481
- if (data.sender === 'promoted-fund-join') {
6482
- switch (data.type) {
6483
- case 'contentResized':
6484
- iframe$1.height = data.height > 0 ? data.height : iframe$1.height;
6485
- iframe$1.width = data.width > 0 ? data.width : iframe$1.width;
6486
- break;
6487
- case 'pageNavigated':
6488
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
6489
- iframe.navigation(window.location.href);
6490
- break;
6491
- }
6492
- }
5915
+ componentDidLoad() {
5916
+ this.updateIsSubmitDisabled();
5917
+ return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
5918
+ promotedFundsShown: superSelectionAppService.promotedFunds,
5919
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
5920
+ });
5921
+ }
5922
+ render() {
5923
+ return (index.h(index.Host, null, index.h("sss-header-section", { currentPage: "own-fund" }), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
5924
+ 'was-validated': this.formState === 'validated'
5925
+ }, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, index.h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, index.h("p", { class: "sm:text-lg font-bold" }, "Fund details"), index.h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-exclamation.svg') })), index.h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), index.h("sss-self-managed-fund-inputs", { fundForm: state$1.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
5926
+ state$1.selfManagedFundForm = Object.assign(Object.assign({}, state$1.selfManagedFundForm), event.detail);
5927
+ if (event.detail.isAbnValid !== undefined)
5928
+ this.isAbnValid = event.detail.isAbnValid;
5929
+ this.updateIsSubmitDisabled();
5930
+ } })), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "sm:max-w-320 w-full" }, index.h("div", { class: "mb-4", onClick:
5931
+ // user clicks on disabled button (div wrapper) then validation errors will show
5932
+ () => (this.formState = 'validated') }, index.h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), index.h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, index.h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
5933
+ }
5934
+ updateIsSubmitDisabled() {
5935
+ this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
5936
+ }
5937
+ async handleSubmitForm() {
5938
+ this.formState = 'validated';
5939
+ if (this.formElement.checkValidity())
5940
+ this.success();
5941
+ }
5942
+ };
5943
+ injectHistory(SelfManagedFund);
5944
+
5945
+ var AbnValidationStatus;
5946
+ (function (AbnValidationStatus) {
5947
+ AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
5948
+ AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
5949
+ AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
5950
+ })(AbnValidationStatus || (AbnValidationStatus = {}));
5951
+ const SelfManagedFundInputs = class {
5952
+ constructor(hostRef) {
5953
+ index.registerInstance(this, hostRef);
5954
+ this.formChanged = index.createEvent(this, "formChanged", 7);
5955
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5956
+ this.isAbnTouched = false;
5957
+ this.currentBank = none;
5958
+ this.addressErrorMessage = none;
5959
+ this.stateOptions = [
5960
+ { value: 'NSW', label: 'NSW' },
5961
+ { value: 'QLD', label: 'QLD' },
5962
+ { value: 'ACT', label: 'ACT' },
5963
+ { value: 'VIC', label: 'VIC' },
5964
+ { value: 'TAS', label: 'TAS' },
5965
+ { value: 'WA', label: 'WA' },
5966
+ { value: 'SA', label: 'SA' },
5967
+ { value: 'NT', label: 'NT' }
5968
+ ];
5969
+ this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
5970
+ this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
5971
+ }
5972
+ render() {
5973
+ const inputClass = {
5974
+ 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
5975
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5976
+ .showValidationErrors
6493
5977
  };
6494
- window.addEventListener('message', handleMessage);
6495
- const iframeDoc = iframe$1.contentDocument;
6496
- iframeDoc.open();
6497
- const form = iframeDoc.createElement('form');
6498
- form.method = 'POST';
6499
- form.target = '_self';
6500
- form.action = this.promotedFundJoinAppUrl();
6501
- let prop;
6502
- for (prop in postData) {
6503
- const value = postData[prop];
6504
- if (value !== undefined) {
6505
- const input = document.createElement('input');
6506
- input.type = 'hidden';
6507
- input.name = prop;
6508
- input.value = value;
6509
- form.append(input);
5978
+ return (index.h("div", null, index.h("div", null, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$1.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$1.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
5979
+ const abnInput = ev.target;
5980
+ this.updateFormField('fundAbn', abnInput.value.trim());
5981
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5982
+ if (validateAbn(abnInput.value)) {
5983
+ const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
5984
+ this.abnValidationStatus = isAbnUsedForRegulatedFund
5985
+ ? AbnValidationStatus.AbnIsUsedForRegulatedFund
5986
+ : AbnValidationStatus.Valid;
5987
+ }
5988
+ // We need to set a custom validity message to trigger css invalid styles for non valid cases
5989
+ const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
5990
+ ? ''
5991
+ : 'Enter a valid fund ABN (digits only)';
5992
+ abnInput.setCustomValidity(validityMessage);
5993
+ this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
5994
+ }, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$1.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), index.h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, index.h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$1.selfManagedFundForm.addressLine1, onChange: (ev) => {
5995
+ this.updateFormField('addressLine1', ev.target.value.trim());
5996
+ this.updateAddressErrorMessage();
5997
+ }, ref: (el) => (this.addressLine1Element = el) }), index.h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$1.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), index.h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$1.selfManagedFundForm.city, onChange: (ev) => {
5998
+ this.updateFormField('city', ev.target.value.trim());
5999
+ this.updateAddressErrorMessage();
6000
+ }, ref: (el) => (this.cityElement = el) }), index.h("div", { class: "flex -space-x-px" }, index.h("div", { class: "w-1/2 flex-1 min-w-0" }, index.h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$1.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
6001
+ this.updateFormField('postcode', ev.target.value.trim());
6002
+ this.updateAddressErrorMessage();
6003
+ }, ref: (el) => (this.postcodeElement = el) })), index.h("div", { class: "flex-1 min-w-0" }, index.h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
6004
+ this.updateFormField('state', ev.target.value.trim());
6005
+ this.updateAddressErrorMessage();
6006
+ }, ref: (el) => (this.stateElement = el) }, index.h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (index.h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (index.h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), index.h("div", { class: "flex space-x-4" }, index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), index.h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$1.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$1.selfManagedFundForm.bsb }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$1.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
6007
+ }
6008
+ updateFormField(key, value) {
6009
+ this.formChanged.emit({ [key]: value });
6010
+ }
6011
+ async isAbnUsedForRegulatedAsync(abn) {
6012
+ return !(await customFundChoiceApi.validateAbnForSMSF(abn));
6013
+ }
6014
+ renderAbnValidationError() {
6015
+ if (this.isAbnTouched || this.showValidationErrors) {
6016
+ switch (this.abnValidationStatus) {
6017
+ case AbnValidationStatus.Invalid:
6018
+ return index.h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
6019
+ case AbnValidationStatus.AbnIsUsedForRegulatedFund:
6020
+ return (index.h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
6021
+ case AbnValidationStatus.Valid:
6022
+ return [];
6510
6023
  }
6511
6024
  }
6512
- iframeDoc.appendChild(form);
6513
- iframeDoc.close();
6514
- form.submit();
6025
+ return [];
6515
6026
  }
6516
- getMemberData() {
6517
- var _a, _b;
6518
- const superBuyer = superSelectionAppService.superBuyer;
6519
- return {
6520
- title: superBuyer.userProfile.title,
6521
- firstName: superBuyer.userProfile.firstName,
6522
- middleName: superBuyer.userProfile.middleName,
6523
- lastName: superBuyer.userProfile.lastName,
6524
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
6525
- gender: superBuyer.userProfile.gender,
6526
- email: superBuyer.userProfile.email,
6527
- mobilePhone: superBuyer.userProfile.mobilePhone,
6528
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
6529
- addressLine1: superBuyer.userProfile.address.addressLine1,
6530
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
6531
- city: superBuyer.userProfile.address.city,
6532
- state: superBuyer.userProfile.address.state,
6533
- postCode: superBuyer.userProfile.address.postcode
6534
- };
6027
+ filterDigits(str) {
6028
+ return str.replace(/[^0-9]/g, '');
6535
6029
  }
6536
- }
6537
- const PromotedFundJoinV1IFrameBuilder$1 = new PromotedFundJoinV1IFrameBuilder();
6030
+ updateCurrentBank(ev) {
6031
+ const value = this.filterDigits(ev.target.value);
6032
+ const firstTwoNumbers = value.substring(0, 2);
6033
+ const firstThreeNumbers = value.substring(0, 3);
6034
+ const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
6035
+ const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
6036
+ if (firstTwoNumberBankName)
6037
+ this.currentBank = some(firstTwoNumberBankName);
6038
+ if (firstThreeNumberBankName)
6039
+ this.currentBank = some(firstThreeNumberBankName);
6040
+ if (value === '' || value.length > 6)
6041
+ this.currentBank = none;
6042
+ this.updateFormField('bsb', value);
6043
+ }
6044
+ updateCurrentBankAccountNumber(ev) {
6045
+ const value = this.filterDigits(ev.target.value);
6046
+ this.updateFormField('bankAccountNumber', value);
6047
+ }
6048
+ updateAddressErrorMessage() {
6049
+ let message = none;
6050
+ if (isNone(message) && !this.addressLine1Element.checkValidity()) {
6051
+ message = some('Enter a valid address line 1');
6052
+ }
6053
+ if (isNone(message) && !this.cityElement.checkValidity()) {
6054
+ message = some('Enter a valid city/suburb');
6055
+ }
6056
+ if (isNone(message) && !this.postcodeElement.checkValidity()) {
6057
+ message = some('Enter a valid post code');
6058
+ }
6059
+ if (isNone(message) && !this.stateElement.checkValidity()) {
6060
+ message = some('Select a state');
6061
+ }
6062
+ this.addressErrorMessage = message;
6063
+ }
6064
+ };
6538
6065
 
6539
- const PromotedFundJoinV1Page = class {
6066
+ const StandardChoiceFormInputDefaultFund = class {
6540
6067
  constructor(hostRef) {
6541
6068
  index.registerInstance(this, hostRef);
6069
+ this.standardChoiceFormSignature = '';
6070
+ this.isSubmitDisabled = true;
6071
+ this.eventTrackingService = EventTrackingService.Instance;
6072
+ this.ignorePopState = () => window.history.pushState(null, '', null);
6073
+ }
6074
+ connectedCallback() {
6075
+ this.ignorePopState();
6076
+ window.addEventListener('popstate', this.ignorePopState);
6077
+ }
6078
+ disconnectedCallback() {
6079
+ window.removeEventListener('popstate', this.ignorePopState);
6542
6080
  }
6543
6081
  render() {
6544
- return (index.h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV1IFrameBuilder$1.build(iframe, this.history) }));
6082
+ return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" }, state.fundName)), index.h("div", { class: "grid content-center ml-4" }, index.h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
6083
+ await this.trackChangeRequestedAsync();
6084
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6085
+ } }, "Change")))), index.h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), index.h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-information-circle.svg') })), index.h("div", { class: "ml-2" }, index.h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
6086
+ 'mt-3': true,
6087
+ 'was-validated': this.formState === 'validated'
6088
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), index.h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
6089
+ 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
6090
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
6091
+ }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), index.h("div", { class: "mt-6" }, index.h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
6545
6092
  }
6546
- };
6547
-
6548
- // Copyright (c) Microsoft Corporation. All rights reserved.
6549
- // Licensed under the MIT License.
6550
- var strShimFunction = "function";
6551
- var strShimObject = "object";
6552
- var strShimUndefined = "undefined";
6553
- var strShimPrototype = "prototype";
6554
- var strShimHasOwnProperty = "hasOwnProperty";
6555
- /**
6556
- * Returns the current global scope object, for a normal web page this will be the current
6557
- * window, for a Web Worker this will be current worker global scope via "self". The internal
6558
- * implementation returns the first available instance object in the following order
6559
- * - globalThis (New standard)
6560
- * - self (Will return the current window instance for supported browsers)
6561
- * - window (fallback for older browser implementations)
6562
- * - global (NodeJS standard)
6563
- * - <null> (When all else fails)
6564
- * While the return type is a Window for the normal case, not all environments will support all
6565
- * of the properties or functions.
6566
- */
6567
- function getGlobal() {
6568
- if (typeof globalThis !== strShimUndefined && globalThis) {
6093
+ // TODO: fetch external promoted fund logo
6094
+ renderLogo() {
6095
+ return;
6096
+ // if (standardChoiceFormState.promotedFundId == undefined) return;
6097
+ // const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
6098
+ // if (isSome(logoSource)) {
6099
+ // return (
6100
+ // <div class="pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start">
6101
+ // <img
6102
+ // class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
6103
+ // alt={standardChoiceFormState.fundName}
6104
+ // src={logoSource.value}
6105
+ // />
6106
+ // </div>
6107
+ // );
6108
+ // }
6109
+ }
6110
+ async trackChangeRequestedAsync() {
6111
+ const common = {
6112
+ promotedFundsShown: superSelectionAppService.promotedFunds,
6113
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
6114
+ };
6115
+ switch (state.fundDetails.type) {
6116
+ case 'default':
6117
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6118
+ DefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6119
+ });
6120
+ break;
6121
+ case 'myOwnFund':
6122
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6123
+ MyOwnFund: Object.assign(Object.assign({}, state.fundDetails), common)
6124
+ });
6125
+ break;
6126
+ case 'smsf':
6127
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6128
+ Smsf: Object.assign(Object.assign({}, state.fundDetails), common)
6129
+ });
6130
+ break;
6131
+ case 'promoted':
6132
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6133
+ PromotedFund: Object.assign(Object.assign({}, state.fundDetails), common)
6134
+ });
6135
+ break;
6136
+ case 'promotedDefault':
6137
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6138
+ PromotedDefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6139
+ });
6140
+ break;
6141
+ case 'promotedDefaultWithJoin':
6142
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6143
+ PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state.fundDetails), common)
6144
+ });
6145
+ break;
6146
+ case 'null':
6147
+ throw 'standardChoiceFormState.fundDetails was not set';
6148
+ }
6149
+ }
6150
+ async handleSubmitForm() {
6151
+ this.formState = 'validated';
6152
+ if (this.formElement.checkValidity()) {
6153
+ await state.handleSubmitFn(this.standardChoiceFormSignature.trim());
6154
+ superSelectionAppService.markSuperSelectionAsSubmitted();
6155
+ }
6156
+ }
6157
+ };
6158
+
6159
+ const Success = class {
6160
+ constructor(hostRef) {
6161
+ index.registerInstance(this, hostRef);
6162
+ this.ignorePopState = () => window.history.pushState(null, '', null);
6163
+ }
6164
+ connectedCallback() {
6165
+ this.ignorePopState();
6166
+ window.addEventListener('popstate', this.ignorePopState);
6167
+ }
6168
+ disconnectedCallback() {
6169
+ window.removeEventListener('popstate', this.ignorePopState);
6170
+ }
6171
+ render() {
6172
+ const CheckIcon = () => {
6173
+ return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" }, index.h("path", { d: "M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z" })));
6174
+ };
6175
+ return (index.h(index.Host, { class: "text-center" }, index.h("div", { class: "flex justify-center" }, index.h("div", { class: "relative" }, index.h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), index.h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, index.h(CheckIcon, null)))), index.h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), index.h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "max-w-[200px] w-full" }, index.h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, index.h("span", null, "Continue"))))));
6176
+ }
6177
+ handleContinueButtonClick(_event) {
6178
+ superSelectionAppService.completeSuperSelectionFlow();
6179
+ }
6180
+ };
6181
+
6182
+ // Copyright (c) Microsoft Corporation. All rights reserved.
6183
+ // Licensed under the MIT License.
6184
+ var strShimFunction = "function";
6185
+ var strShimObject = "object";
6186
+ var strShimUndefined = "undefined";
6187
+ var strShimPrototype = "prototype";
6188
+ var strShimHasOwnProperty = "hasOwnProperty";
6189
+ /**
6190
+ * Returns the current global scope object, for a normal web page this will be the current
6191
+ * window, for a Web Worker this will be current worker global scope via "self". The internal
6192
+ * implementation returns the first available instance object in the following order
6193
+ * - globalThis (New standard)
6194
+ * - self (Will return the current window instance for supported browsers)
6195
+ * - window (fallback for older browser implementations)
6196
+ * - global (NodeJS standard)
6197
+ * - <null> (When all else fails)
6198
+ * While the return type is a Window for the normal case, not all environments will support all
6199
+ * of the properties or functions.
6200
+ */
6201
+ function getGlobal() {
6202
+ if (typeof globalThis !== strShimUndefined && globalThis) {
6569
6203
  return globalThis;
6570
6204
  }
6571
6205
  if (typeof self !== strShimUndefined && self) {
@@ -16159,813 +15793,117 @@ class AppConfigurationQuery extends datoramaAkita.Query {
16159
15793
  return configuration.value;
16160
15794
  }
16161
15795
  }
16162
- const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16163
-
16164
- class AppInsightsService {
16165
- constructor() {
16166
- this.appInsights = new Lazy(() => new Initialization({
16167
- config: {
16168
- instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
16169
- enableAutoRouteTracking: true,
16170
- autoTrackPageVisitTime: true,
16171
- maxBatchInterval: 1000,
16172
- enableUnhandledPromiseRejectionTracking: true
16173
- }
16174
- }));
16175
- }
16176
- init() {
16177
- this.appInsights.value.loadAppInsights();
16178
- index.setErrorHandler((err) => this.appInsightsErrorHandler(err));
16179
- }
16180
- getAppInsights() {
16181
- return this.appInsights.value;
16182
- }
16183
- addCustomProperties(properties) {
16184
- this.appInsights.value.addTelemetryInitializer((envelope) => {
16185
- envelope.data = envelope.data ? envelope.data : {};
16186
- for (const [k, v] of Object.entries(properties)) {
16187
- envelope.data[k] = v;
16188
- }
16189
- });
16190
- }
16191
- trackErrorTrace(message) {
16192
- this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16193
- }
16194
- appInsightsErrorHandler(error) {
16195
- this.appInsights.value.trackException({
16196
- error: error,
16197
- severityLevel: SeverityLevel.Error
16198
- });
16199
- // eslint-disable-next-line no-console
16200
- const defaultStencilErrorHandler = (error) => console.error(error);
16201
- defaultStencilErrorHandler(error);
16202
- }
16203
- }
16204
- const appInsights = new AppInsightsService();
16205
-
16206
- class PromotedFundJoinV2IFrameBuilder {
16207
- constructor() {
16208
- this.getFundName = (fundId) => {
16209
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
16210
- };
16211
- this.cleanUsi = (usi) => {
16212
- return usi.replace(/ /g, '');
16213
- };
16214
- this.stringIsNullOrEmtpty = (s) => {
16215
- return !(typeof s === 'string' && s.trim().length > 0);
16216
- };
16217
- this.environmentDiscriminator = () => {
16218
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16219
- switch (discriminator) {
16220
- case 'autodev-partner':
16221
- case 'test-partner':
16222
- case 'partner':
16223
- case 'sandbox-partner':
16224
- return discriminator.replace('partner', '');
16225
- default:
16226
- return 'autodev-';
16227
- }
16228
- };
16229
- this.promotedFundJoinAppUrl = () => {
16230
- return `https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`;
16231
- };
16232
- }
16233
- build(iframe$1, history) {
16234
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
16235
- return;
16236
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault', definedBenefitsEligibility: Option.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
16237
- const handleMessage = async (event) => {
16238
- const { data } = event;
16239
- if (!data) {
16240
- return;
16241
- }
16242
- if (data.sender === 'promoted-fund-redirect') {
16243
- window.removeEventListener('message', handleMessage);
16244
- switch (data.type) {
16245
- case 'cancel':
16246
- if (state.fund.type === 'DefinedBenefits') {
16247
- // Note: we don't expect a cancel event from Defined Benefits flow but just in case
16248
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16249
- }
16250
- else {
16251
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16252
- }
16253
- break;
16254
- case 'success': {
16255
- const promotedFundId = state.fund.id;
16256
- const fundName = this.getFundName(promotedFundId);
16257
- const usi = this.cleanUsi(data.usi);
16258
- switch (state.fund.type) {
16259
- case 'Promoted':
16260
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16261
- this.stringIsNullOrEmtpty(data.usi)) {
16262
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16263
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16264
- break;
16265
- }
16266
- navigationService.navigateInternallyToStandardChoice({
16267
- history,
16268
- fundName,
16269
- promotedFundId,
16270
- fundDetails: {
16271
- type: 'promoted',
16272
- fundName,
16273
- fundUsi: usi,
16274
- memberNumber: data.memberNumber,
16275
- promotedFundId
16276
- },
16277
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi: data.usi.replace(/ /g, ''), standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16278
- });
16279
- break;
16280
- case 'PromotedDefault':
16281
- if (this.stringIsNullOrEmtpty(data.usi)) {
16282
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16283
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16284
- break;
16285
- }
16286
- navigationService.navigateInternallyToStandardChoice({
16287
- history,
16288
- fundName,
16289
- promotedFundId,
16290
- fundDetails: {
16291
- type: 'promotedDefault',
16292
- fundName,
16293
- fundUsi: usi,
16294
- promotedFundId
16295
- },
16296
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: promotedFundId, usi,
16297
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16298
- });
16299
- break;
16300
- case 'DefinedBenefits':
16301
- throw Error('DefinedBenefits is not supported in legacy "success" message');
16302
- case 'null':
16303
- throw Error('PromotedFundState.type was not set.');
16304
- }
16305
- break;
16306
- }
16307
- case 'success-promoted': {
16308
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16309
- this.stringIsNullOrEmtpty(data.usi)) {
16310
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16311
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16312
- break;
16313
- }
16314
- const usi = this.cleanUsi(data.usi);
16315
- const fundName = this.getFundName(data.fundId);
16316
- navigationService.navigateInternallyToStandardChoice({
16317
- history,
16318
- fundName,
16319
- promotedFundId: data.fundId,
16320
- fundDetails: {
16321
- type: 'promoted',
16322
- fundName,
16323
- fundUsi: usi,
16324
- memberNumber: data.memberNumber,
16325
- promotedFundId: data.fundId
16326
- },
16327
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16328
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16329
- });
16330
- break;
16331
- }
16332
- case 'success-promoted-default': {
16333
- if (this.stringIsNullOrEmtpty(data.usi)) {
16334
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16335
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16336
- break;
16337
- }
16338
- const usi = this.cleanUsi(data.usi);
16339
- const fundName = this.getFundName(data.fundId);
16340
- navigationService.navigateInternallyToStandardChoice({
16341
- history,
16342
- fundName,
16343
- promotedFundId: data.fundId,
16344
- fundDetails: {
16345
- type: 'promotedDefault',
16346
- fundName,
16347
- fundUsi: usi,
16348
- promotedFundId: data.fundId
16349
- },
16350
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
16351
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16352
- });
16353
- break;
16354
- }
16355
- case 'success-promoted-default-with-join': {
16356
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16357
- this.stringIsNullOrEmtpty(data.usi)) {
16358
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
16359
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16360
- break;
16361
- }
16362
- const usi = this.cleanUsi(data.usi);
16363
- const fundName = this.getFundName(data.fundId);
16364
- navigationService.navigateInternallyToStandardChoice({
16365
- history,
16366
- fundName,
16367
- promotedFundId: data.fundId,
16368
- fundDetails: {
16369
- type: 'promotedDefaultWithJoin',
16370
- fundName,
16371
- fundUsi: usi,
16372
- memberNumber: data.memberNumber,
16373
- promotedFundId: data.fundId
16374
- },
16375
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16376
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16377
- });
16378
- break;
16379
- }
16380
- case 'success-defined-benefits':
16381
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16382
- this.stringIsNullOrEmtpty(data.usi)) {
16383
- appInsights.trackErrorTrace('PFJ C# did not return (DefinedBenefits) memberNumber and/or usi');
16384
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16385
- break;
16386
- }
16387
- await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({ fundUsi: this.cleanUsi(data.usi) }, data), superSelectionAppService.promotedFundsConfig));
16388
- superSelectionAppService.markSuperSelectionAsSubmitted();
16389
- break;
16390
- /* falls through */
16391
- default:
16392
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16393
- break;
16394
- }
16395
- reset();
16396
- return;
16397
- }
16398
- if (data.sender === 'promoted-fund-join') {
16399
- switch (data.type) {
16400
- case 'contentResized':
16401
- iframe$1.height = data.height > 0 ? String(data.height) : iframe$1.height;
16402
- iframe$1.width = data.width > 0 ? String(data.width) : iframe$1.width;
16403
- break;
16404
- case 'pageNavigated':
16405
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
16406
- iframe.navigation(window.location.href);
16407
- break;
16408
- }
16409
- }
16410
- };
16411
- window.addEventListener('message', handleMessage);
16412
- const iframeDoc = iframe$1.contentDocument;
16413
- iframeDoc.open();
16414
- const form = iframeDoc.createElement('form');
16415
- form.method = 'POST';
16416
- form.target = '_self';
16417
- form.action = this.promotedFundJoinAppUrl();
16418
- let prop;
16419
- for (prop in postData) {
16420
- const value = postData[prop];
16421
- if (value !== undefined) {
16422
- const input = document.createElement('input');
16423
- input.name = prop;
16424
- input.type = 'hidden';
16425
- if (typeof value === 'boolean') {
16426
- input.value = value ? 'true' : 'false';
16427
- }
16428
- else {
16429
- input.value = value;
16430
- }
16431
- form.append(input);
16432
- }
16433
- }
16434
- iframeDoc.appendChild(form);
16435
- iframeDoc.close();
16436
- form.submit();
16437
- }
16438
- getMemberData() {
16439
- var _a, _b;
16440
- const superBuyer = superSelectionAppService.superBuyer;
16441
- return {
16442
- title: superBuyer.userProfile.title,
16443
- firstName: superBuyer.userProfile.firstName,
16444
- middleName: superBuyer.userProfile.middleName,
16445
- lastName: superBuyer.userProfile.lastName,
16446
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16447
- gender: superBuyer.userProfile.gender,
16448
- email: superBuyer.userProfile.email,
16449
- mobilePhone: superBuyer.userProfile.mobilePhone,
16450
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16451
- addressLine1: superBuyer.userProfile.address.addressLine1,
16452
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16453
- city: superBuyer.userProfile.address.city,
16454
- state: superBuyer.userProfile.address.state,
16455
- postCode: superBuyer.userProfile.address.postcode
16456
- };
16457
- }
16458
- }
16459
- const PromotedFundJoinV2IFrameBuilder$1 = new PromotedFundJoinV2IFrameBuilder();
16460
-
16461
- const PromotedFundJoinV2Page = class {
16462
- constructor(hostRef) {
16463
- index.registerInstance(this, hostRef);
16464
- }
16465
- render() {
16466
- return (index.h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV2IFrameBuilder$1.build(iframe, this.history) }));
16467
- }
16468
- };
16469
-
16470
- function validateAbn(abn) {
16471
- const digitArray = abn.split('').map(Number);
16472
- const isAllDigits = digitArray.every((d) => !isNaN(d));
16473
- const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
16474
- if (!isAllDigits || digitArray.length !== weightingFactors.length) {
16475
- return false;
16476
- }
16477
- digitArray[0]--;
16478
- const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
16479
- return sum % 89 === 0;
16480
- }
16481
-
16482
- const SelfManagedFund = class {
16483
- constructor(hostRef) {
16484
- index.registerInstance(this, hostRef);
16485
- this.isSubmitDisabled = true;
16486
- this.isAbnValid = validateAbn(state$2.selfManagedFundForm.fundAbn);
16487
- this.eventTrackingService = EventTrackingService.Instance;
16488
- this.success = () => {
16489
- navigationService.navigateInternallyToStandardChoice({
16490
- history: this.history,
16491
- fundName: 'Self-managed super fund',
16492
- fundDetails: {
16493
- type: 'smsf',
16494
- fundName: state$2.selfManagedFundForm.fundName,
16495
- fundEsa: state$2.selfManagedFundForm.fundEsa
16496
- },
16497
- handleSubmitFn: async (standardChoiceFormSignature) => {
16498
- const requestDto = Object.assign({ smsfChoice: {
16499
- abn: state$2.selfManagedFundForm.fundAbn,
16500
- fundName: state$2.selfManagedFundForm.fundName,
16501
- fundAddress: {
16502
- addressLine1: state$2.selfManagedFundForm.addressLine1,
16503
- addressLine2: state$2.selfManagedFundForm.addressLine2,
16504
- city: state$2.selfManagedFundForm.city,
16505
- state: state$2.selfManagedFundForm.state,
16506
- postcode: state$2.selfManagedFundForm.postcode
16507
- },
16508
- bsb: state$2.selfManagedFundForm.bsb,
16509
- bankAccountName: state$2.selfManagedFundForm.bankAccountName,
16510
- bankAccountNumber: state$2.selfManagedFundForm.bankAccountNumber,
16511
- electronicServiceAddress: state$2.selfManagedFundForm.fundEsa,
16512
- memberFirstName: state$2.selfManagedFundForm.memberFirstName,
16513
- memberFamilyName: state$2.selfManagedFundForm.memberFamilyName
16514
- }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
16515
- await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
16516
- }
16517
- });
16518
- };
16519
- }
16520
- componentDidLoad() {
16521
- this.updateIsSubmitDisabled();
16522
- return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
16523
- promotedFundsShown: superSelectionAppService.promotedFunds,
16524
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16525
- });
16526
- }
16527
- render() {
16528
- return (index.h(index.Host, null, index.h("sss-header-section", { currentPage: "own-fund" }), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
16529
- 'was-validated': this.formState === 'validated'
16530
- }, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, index.h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, index.h("p", { class: "sm:text-lg font-bold" }, "Fund details"), index.h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-exclamation.svg') })), index.h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), index.h("sss-self-managed-fund-inputs", { fundForm: state$2.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
16531
- state$2.selfManagedFundForm = Object.assign(Object.assign({}, state$2.selfManagedFundForm), event.detail);
16532
- if (event.detail.isAbnValid !== undefined)
16533
- this.isAbnValid = event.detail.isAbnValid;
16534
- this.updateIsSubmitDisabled();
16535
- } })), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "sm:max-w-320 w-full" }, index.h("div", { class: "mb-4", onClick:
16536
- // user clicks on disabled button (div wrapper) then validation errors will show
16537
- () => (this.formState = 'validated') }, index.h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), index.h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, index.h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
16538
- }
16539
- updateIsSubmitDisabled() {
16540
- this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
16541
- }
16542
- async handleSubmitForm() {
16543
- this.formState = 'validated';
16544
- if (this.formElement.checkValidity())
16545
- this.success();
16546
- }
16547
- };
16548
- injectHistory(SelfManagedFund);
16549
-
16550
- var AbnValidationStatus;
16551
- (function (AbnValidationStatus) {
16552
- AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
16553
- AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
16554
- AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
16555
- })(AbnValidationStatus || (AbnValidationStatus = {}));
16556
- const SelfManagedFundInputs = class {
16557
- constructor(hostRef) {
16558
- index.registerInstance(this, hostRef);
16559
- this.formChanged = index.createEvent(this, "formChanged", 7);
16560
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16561
- this.isAbnTouched = false;
16562
- this.currentBank = none;
16563
- this.addressErrorMessage = none;
16564
- this.stateOptions = [
16565
- { value: 'NSW', label: 'NSW' },
16566
- { value: 'QLD', label: 'QLD' },
16567
- { value: 'ACT', label: 'ACT' },
16568
- { value: 'VIC', label: 'VIC' },
16569
- { value: 'TAS', label: 'TAS' },
16570
- { value: 'WA', label: 'WA' },
16571
- { value: 'SA', label: 'SA' },
16572
- { value: 'NT', label: 'NT' }
16573
- ];
16574
- this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
16575
- this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
16576
- }
16577
- render() {
16578
- const inputClass = {
16579
- 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
16580
- 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
16581
- .showValidationErrors
16582
- };
16583
- return (index.h("div", null, index.h("div", null, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$2.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$2.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
16584
- const abnInput = ev.target;
16585
- this.updateFormField('fundAbn', abnInput.value.trim());
16586
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16587
- if (validateAbn(abnInput.value)) {
16588
- const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
16589
- this.abnValidationStatus = isAbnUsedForRegulatedFund
16590
- ? AbnValidationStatus.AbnIsUsedForRegulatedFund
16591
- : AbnValidationStatus.Valid;
16592
- }
16593
- // We need to set a custom validity message to trigger css invalid styles for non valid cases
16594
- const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
16595
- ? ''
16596
- : 'Enter a valid fund ABN (digits only)';
16597
- abnInput.setCustomValidity(validityMessage);
16598
- this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
16599
- }, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$2.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), index.h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, index.h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$2.selfManagedFundForm.addressLine1, onChange: (ev) => {
16600
- this.updateFormField('addressLine1', ev.target.value.trim());
16601
- this.updateAddressErrorMessage();
16602
- }, ref: (el) => (this.addressLine1Element = el) }), index.h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$2.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), index.h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$2.selfManagedFundForm.city, onChange: (ev) => {
16603
- this.updateFormField('city', ev.target.value.trim());
16604
- this.updateAddressErrorMessage();
16605
- }, ref: (el) => (this.cityElement = el) }), index.h("div", { class: "flex -space-x-px" }, index.h("div", { class: "w-1/2 flex-1 min-w-0" }, index.h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$2.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
16606
- this.updateFormField('postcode', ev.target.value.trim());
16607
- this.updateAddressErrorMessage();
16608
- }, ref: (el) => (this.postcodeElement = el) })), index.h("div", { class: "flex-1 min-w-0" }, index.h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
16609
- this.updateFormField('state', ev.target.value.trim());
16610
- this.updateAddressErrorMessage();
16611
- }, ref: (el) => (this.stateElement = el) }, index.h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (index.h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (index.h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), index.h("div", { class: "flex space-x-4" }, index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), index.h("div", { class: "mt-3 w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), index.h("div", { class: "mt-1" }, index.h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), index.h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$2.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$2.selfManagedFundForm.bsb }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$2.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
16612
- }
16613
- updateFormField(key, value) {
16614
- this.formChanged.emit({ [key]: value });
16615
- }
16616
- async isAbnUsedForRegulatedAsync(abn) {
16617
- return !(await customFundChoiceApi.validateAbnForSMSF(abn));
16618
- }
16619
- renderAbnValidationError() {
16620
- if (this.isAbnTouched || this.showValidationErrors) {
16621
- switch (this.abnValidationStatus) {
16622
- case AbnValidationStatus.Invalid:
16623
- return index.h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
16624
- case AbnValidationStatus.AbnIsUsedForRegulatedFund:
16625
- return (index.h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
16626
- case AbnValidationStatus.Valid:
16627
- return [];
16628
- }
16629
- }
16630
- return [];
16631
- }
16632
- filterDigits(str) {
16633
- return str.replace(/[^0-9]/g, '');
16634
- }
16635
- updateCurrentBank(ev) {
16636
- const value = this.filterDigits(ev.target.value);
16637
- const firstTwoNumbers = value.substring(0, 2);
16638
- const firstThreeNumbers = value.substring(0, 3);
16639
- const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
16640
- const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
16641
- if (firstTwoNumberBankName)
16642
- this.currentBank = some(firstTwoNumberBankName);
16643
- if (firstThreeNumberBankName)
16644
- this.currentBank = some(firstThreeNumberBankName);
16645
- if (value === '' || value.length > 6)
16646
- this.currentBank = none;
16647
- this.updateFormField('bsb', value);
16648
- }
16649
- updateCurrentBankAccountNumber(ev) {
16650
- const value = this.filterDigits(ev.target.value);
16651
- this.updateFormField('bankAccountNumber', value);
16652
- }
16653
- updateAddressErrorMessage() {
16654
- let message = none;
16655
- if (isNone(message) && !this.addressLine1Element.checkValidity()) {
16656
- message = some('Enter a valid address line 1');
16657
- }
16658
- if (isNone(message) && !this.cityElement.checkValidity()) {
16659
- message = some('Enter a valid city/suburb');
16660
- }
16661
- if (isNone(message) && !this.postcodeElement.checkValidity()) {
16662
- message = some('Enter a valid post code');
16663
- }
16664
- if (isNone(message) && !this.stateElement.checkValidity()) {
16665
- message = some('Select a state');
16666
- }
16667
- this.addressErrorMessage = message;
16668
- }
16669
- };
16670
-
16671
- class InteropQuery extends datoramaAkita.Query {
16672
- constructor(store) {
16673
- super(store);
16674
- this.store = store;
16675
- }
16676
- isReactNativeInteropEnabled() {
16677
- return isSome(this.getValue().reactNativeInterop);
16678
- }
16679
- isIframeInteropEnabled() {
16680
- return isSome(this.getValue().iframeInterop);
16681
- }
16682
- getIframeInteropMode() {
16683
- const iframeInterop = this.getValue().iframeInterop;
16684
- if (isNone(iframeInterop)) {
16685
- throw Error('Failed to get iframe interop information: no data in store');
16686
- }
16687
- if (!this.isIframeInteropEnabled()) {
16688
- throw Error('Failed to get iframe interop information: iframe mode is disabled');
16689
- }
16690
- return iframeInterop.value;
16691
- }
16692
- }
16693
- const interopQuery = new InteropQuery(sessionStore);
16694
-
16695
- class SlateChoiceApi {
16696
- async submitSlateChoiceAsync(dto) {
16697
- return buildBackendApiClient()
16698
- .url('super-choice/slate')
16699
- .post(dto)
16700
- .badRequest(() => {
16701
- throw new Error('Failed to process Slate join request');
16702
- })
16703
- .text();
16704
- }
16705
- }
16706
- const slateChoiceApi = new SlateChoiceApi();
16707
-
16708
- class SlateIFrameBuilder {
16709
- constructor() {
16710
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
16711
- this.hostIsDeployed = () => window.location.origin.endsWith('partner.flarehr.com');
16712
- this.skipConsolidation = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16713
- this.skipInsurance = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16714
- this.environmentDiscriminator = () => {
16715
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16716
- switch (discriminator) {
16717
- case 'autodev-partner':
16718
- case 'test-partner':
16719
- case 'partner':
16720
- case 'sandbox-partner':
16721
- return discriminator.replace('partner', '');
16722
- default:
16723
- return 'autodev-';
16724
- }
16725
- };
16726
- this.slateJoinAppUrl = () => {
16727
- return `https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`;
16728
- };
16729
- }
16730
- build(iframe, history) {
16731
- if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
16732
- return;
16733
- const baseUrl = this.hostIsLocalSuperSelection() || this.hostIsDeployed()
16734
- ? `${window.location.origin}/super-selection/embed/v1.0/app`
16735
- : 'https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app';
16736
- const redirectUrl = `${baseUrl}/slate-redirect.html`;
16737
- const postData = Object.assign(Object.assign({}, this.getSlateJoinMemberData()), { successRedirectUrl: redirectUrl, cancelRedirectUrl: redirectUrl, skipConsolidation: this.skipConsolidation(), skipInsurance: this.skipInsurance() });
16738
- if (this.includeJwt()) {
16739
- postData.authToken = superSelectionAppService.jwt;
16740
- }
16741
- const handleMessage = (event) => {
16742
- const { data, origin } = event;
16743
- if (!data) {
16744
- return;
16745
- }
16746
- if (data.sender === 'slate-redirect') {
16747
- window.removeEventListener('message', handleMessage);
16748
- switch (data.type) {
16749
- case 'success':
16750
- if (data.memberNumber) {
16751
- navigationService.navigateInternallyToStandardChoice({
16752
- history,
16753
- fundName: fund$8.name,
16754
- fundDetails: {
16755
- type: 'promoted',
16756
- fundName: fund$8.name,
16757
- fundUsi: slateUsi,
16758
- memberNumber: data.memberNumber,
16759
- promotedFundId: fund$8.fundId
16760
- },
16761
- handleSubmitFn: (standardChoiceFormSignature) => slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
16762
- promotedFundId: fund$8.fundId
16763
- });
16764
- break;
16765
- }
16766
- /* falls through */
16767
- default:
16768
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16769
- break;
16770
- }
16771
- reset();
16772
- return;
16773
- }
16774
- if (data.sender === 'flare' && origin.endsWith('join.slatesuper.com.au')) {
16775
- switch (data.type) {
16776
- case 'contentResized':
16777
- iframe.height = data.height > 0 ? data.height : iframe.height;
16778
- iframe.width = data.width > 0 ? data.width : iframe.width;
16779
- break;
16780
- }
16781
- }
16782
- };
16783
- window.addEventListener('message', handleMessage);
16784
- const iframeDoc = iframe.contentDocument;
16785
- iframeDoc.open();
16786
- const form = iframeDoc.createElement('form');
16787
- form.method = 'POST';
16788
- form.target = '_self';
16789
- form.action = this.slateJoinAppUrl();
16790
- let prop;
16791
- for (prop in postData) {
16792
- const value = postData[prop];
16793
- if (value !== undefined) {
16794
- const input = document.createElement('input');
16795
- input.type = 'hidden';
16796
- input.name = prop;
16797
- input.value = value;
16798
- form.append(input);
16799
- }
16800
- }
16801
- iframeDoc.appendChild(form);
16802
- iframeDoc.close();
16803
- form.submit();
16804
- }
16805
- getSlateJoinMemberData() {
16806
- var _a, _b;
16807
- const superBuyer = superSelectionAppService.superBuyer;
16808
- const toSlateGender = (gender) => {
16809
- switch (gender) {
16810
- case 'Male':
16811
- return 'Male';
16812
- case 'Female':
16813
- return 'Female';
16814
- case 'Intersex':
16815
- return 'Intersex/Indeterminate';
16816
- default:
16817
- return 'Unknown';
16818
- }
16819
- };
16820
- return {
16821
- firstName: superBuyer.userProfile.firstName,
16822
- middleName: superBuyer.userProfile.middleName,
16823
- lastName: superBuyer.userProfile.lastName,
16824
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16825
- gender: toSlateGender(superBuyer.userProfile.gender),
16826
- email: superBuyer.userProfile.email,
16827
- mobilePhone: superBuyer.userProfile.mobilePhone,
16828
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16829
- addressLine1: superBuyer.userProfile.address.addressLine1,
16830
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16831
- city: superBuyer.userProfile.address.city,
16832
- state: superBuyer.userProfile.address.state,
16833
- postCode: superBuyer.userProfile.address.postcode
16834
- };
16835
- }
16836
- includeJwt() {
16837
- return !this.slateJoinAppUrl().match(/autodev|sandbox/);
16838
- }
16839
- }
16840
- const slateIFrameBuilder = new SlateIFrameBuilder();
15796
+ const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16841
15797
 
16842
- const SlateJoinPage = class {
16843
- constructor(hostRef) {
16844
- index.registerInstance(this, hostRef);
15798
+ class AppInsightsService {
15799
+ constructor() {
15800
+ this.appInsights = new Lazy(() => new Initialization({
15801
+ config: {
15802
+ instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
15803
+ enableAutoRouteTracking: true,
15804
+ autoTrackPageVisitTime: true,
15805
+ maxBatchInterval: 1000,
15806
+ enableUnhandledPromiseRejectionTracking: true
15807
+ }
15808
+ }));
16845
15809
  }
16846
- render() {
16847
- return index.h("sss-iframe-host", { build: (iframe) => slateIFrameBuilder.build(iframe, this.history) });
15810
+ init() {
15811
+ this.appInsights.value.loadAppInsights();
15812
+ index.setErrorHandler((err) => this.appInsightsErrorHandler(err));
16848
15813
  }
16849
- };
16850
-
16851
- const StandardChoiceFormInputDefaultFund = class {
16852
- constructor(hostRef) {
16853
- index.registerInstance(this, hostRef);
16854
- this.standardChoiceFormSignature = '';
16855
- this.isSubmitDisabled = true;
16856
- this.eventTrackingService = EventTrackingService.Instance;
16857
- this.ignorePopState = () => window.history.pushState(null, '', null);
15814
+ getAppInsights() {
15815
+ return this.appInsights.value;
16858
15816
  }
16859
- connectedCallback() {
16860
- this.ignorePopState();
16861
- window.addEventListener('popstate', this.ignorePopState);
15817
+ addCustomProperties(properties) {
15818
+ this.appInsights.value.addTelemetryInitializer((envelope) => {
15819
+ envelope.data = envelope.data ? envelope.data : {};
15820
+ for (const [k, v] of Object.entries(properties)) {
15821
+ envelope.data[k] = v;
15822
+ }
15823
+ });
16862
15824
  }
16863
- disconnectedCallback() {
16864
- window.removeEventListener('popstate', this.ignorePopState);
15825
+ trackErrorTrace(message) {
15826
+ this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16865
15827
  }
16866
- render() {
16867
- return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" }, state$1.fundName)), index.h("div", { class: "grid content-center ml-4" }, index.h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
16868
- await this.trackChangeRequestedAsync();
16869
- const changeFundRoute = Option.isSome(superSelectionAppService.state.superChoicePrefill)
16870
- ? SuperSelectionAppRoutes.ConsentPage
16871
- : SuperSelectionAppRoutes.ChoicePage;
16872
- navigationService.navigateInternally(this.history, changeFundRoute);
16873
- } }, "Change")))), index.h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), index.h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-information-circle.svg') })), index.h("div", { class: "ml-2" }, index.h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
16874
- 'mt-3': true,
16875
- 'was-validated': this.formState === 'validated'
16876
- }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), index.h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
16877
- 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
16878
- 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
16879
- }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), index.h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), index.h("div", { class: "mt-6" }, index.h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
15828
+ appInsightsErrorHandler(error) {
15829
+ this.appInsights.value.trackException({
15830
+ error: error,
15831
+ severityLevel: SeverityLevel.Error
15832
+ });
15833
+ // eslint-disable-next-line no-console
15834
+ const defaultStencilErrorHandler = (error) => console.error(error);
15835
+ defaultStencilErrorHandler(error);
16880
15836
  }
16881
- renderLogo() {
16882
- if (state$1.promotedFundId == undefined)
16883
- return;
16884
- const logoSource = getLogoSrcByFundId(state$1.promotedFundId);
16885
- if (Option.isSome(logoSource)) {
16886
- return (index.h("div", { class: "pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start" }, index.h("img", { class: "h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain", alt: state$1.fundName, src: logoSource.value })));
16887
- }
15837
+ }
15838
+ const appInsights = new AppInsightsService();
15839
+
15840
+ class SuperCampaignErrorApi {
15841
+ static get Instance() {
15842
+ return this.instance || (this.instance = new this());
16888
15843
  }
16889
- async trackChangeRequestedAsync() {
16890
- const common = {
16891
- promotedFundsShown: superSelectionAppService.promotedFunds,
16892
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16893
- };
16894
- switch (state$1.fundDetails.type) {
16895
- case 'default':
16896
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16897
- DefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16898
- });
16899
- break;
16900
- case 'myOwnFund':
16901
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16902
- MyOwnFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16903
- });
16904
- break;
16905
- case 'smsf':
16906
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16907
- Smsf: Object.assign(Object.assign({}, state$1.fundDetails), common)
16908
- });
16909
- break;
16910
- case 'promoted':
16911
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16912
- PromotedFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16913
- });
16914
- break;
16915
- case 'promotedDefault':
16916
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16917
- PromotedDefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16918
- });
16919
- break;
16920
- case 'promotedDefaultWithJoin':
16921
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16922
- PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state$1.fundDetails), common)
16923
- });
16924
- break;
16925
- case 'null':
16926
- throw 'standardChoiceFormState.fundDetails was not set';
16927
- }
15844
+ async PostError(error) {
15845
+ buildBackendApiClient().url('super-campaign/errors').post(error);
16928
15846
  }
16929
- async handleSubmitForm() {
16930
- this.formState = 'validated';
16931
- if (this.formElement.checkValidity()) {
16932
- await state$1.handleSubmitFn(this.standardChoiceFormSignature.trim());
16933
- superSelectionAppService.markSuperSelectionAsSubmitted();
15847
+ }
15848
+
15849
+ const SuperFundDisclaimerViewedDetail = {
15850
+ create: (superCampaignEnabled) => {
15851
+ let isDefinedBenefitsEligibleString = 'Not set';
15852
+ if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
15853
+ isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
15854
+ ? 'True'
15855
+ : 'False';
16934
15856
  }
15857
+ return {
15858
+ isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
15859
+ superCampaignEnabled: superCampaignEnabled
15860
+ };
16935
15861
  }
16936
15862
  };
16937
15863
 
16938
- const Success = class {
16939
- constructor(hostRef) {
16940
- index.registerInstance(this, hostRef);
16941
- this.ignorePopState = () => window.history.pushState(null, '', null);
16942
- }
16943
- connectedCallback() {
16944
- this.ignorePopState();
16945
- window.addEventListener('popstate', this.ignorePopState);
16946
- }
16947
- disconnectedCallback() {
16948
- window.removeEventListener('popstate', this.ignorePopState);
15864
+ class PromotedFundChoiceApi {
15865
+ async submitChoiceAsync(dto) {
15866
+ return buildBackendApiClient()
15867
+ .url('super-choice/promoted-fund')
15868
+ .post(dto)
15869
+ .badRequest(() => {
15870
+ throw new Error('Failed to process Promoted Fund choice request');
15871
+ })
15872
+ .text();
16949
15873
  }
16950
- render() {
16951
- const CheckIcon = () => {
16952
- return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" }, index.h("path", { d: "M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z" })));
16953
- };
16954
- return (index.h(index.Host, { class: "text-center" }, index.h("div", { class: "flex justify-center" }, index.h("div", { class: "relative" }, index.h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), index.h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, index.h(CheckIcon, null)))), index.h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), index.h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "max-w-[200px] w-full" }, index.h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, index.h("span", null, "Continue"))))));
15874
+ async submitDefaultChoiceAsync(dto) {
15875
+ return buildBackendApiClient()
15876
+ .url('super-choice/promoted-fund/default')
15877
+ .post(dto)
15878
+ .badRequest(() => {
15879
+ throw new Error('Failed to process Promoted Default Fund choice request');
15880
+ })
15881
+ .text();
16955
15882
  }
16956
- handleContinueButtonClick(_event) {
16957
- superSelectionAppService.completeSuperSelectionFlow();
15883
+ async submitDefaultChoiceWithJoinAsync(dto) {
15884
+ return buildBackendApiClient()
15885
+ .url('super-choice/promoted-fund/default-with-join')
15886
+ .post(dto)
15887
+ .badRequest(() => {
15888
+ throw new Error('Failed to process Promoted Default Fund With Join choice request');
15889
+ })
15890
+ .text();
16958
15891
  }
16959
- };
15892
+ }
15893
+ const promotedFundChoiceApi = new PromotedFundChoiceApi();
16960
15894
 
16961
- class SuperCampaignErrorApi {
16962
- static get Instance() {
16963
- return this.instance || (this.instance = new this());
16964
- }
16965
- async PostError(error) {
16966
- buildBackendApiClient().url('super-campaign/errors').post(error);
15895
+ class SlateChoiceApi {
15896
+ async submitSlateChoiceAsync(dto) {
15897
+ return buildBackendApiClient()
15898
+ .url('super-choice/slate')
15899
+ .post(dto)
15900
+ .badRequest(() => {
15901
+ throw new Error('Failed to process Slate join request');
15902
+ })
15903
+ .text();
16967
15904
  }
16968
15905
  }
15906
+ const slateChoiceApi = new SlateChoiceApi();
16969
15907
 
16970
15908
  class MiscService {
16971
15909
  trackClickPromotedTileAsync(payload) {
@@ -17125,9 +16063,6 @@ const SuperCampaignHost = class {
17125
16063
  }
17126
16064
  return Promise.resolve();
17127
16065
  };
17128
- this.getFundName = (fundId) => {
17129
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
17130
- };
17131
16066
  this.stringIsNullOrEmtpty = (s) => {
17132
16067
  return !(typeof s === 'string' && s.trim().length > 0);
17133
16068
  };
@@ -17137,21 +16072,20 @@ const SuperCampaignHost = class {
17137
16072
  return;
17138
16073
  }
17139
16074
  const usi = Usi.clean(data.usi);
17140
- const fundName = this.getFundName(data.fundId);
17141
16075
  const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
17142
16076
  navigationService.navigateInternallyToStandardChoice({
17143
16077
  history: this.history,
17144
- fundName,
16078
+ fundName: data.fundName,
17145
16079
  promotedFundId: data.fundId,
17146
16080
  fundDetails: {
17147
16081
  type: 'promoted',
17148
- fundName,
16082
+ fundName: data.fundName,
17149
16083
  fundUsi: usi,
17150
16084
  memberNumber: data.memberNumber,
17151
16085
  promotedFundId: data.fundId
17152
16086
  },
17153
16087
  handleSubmitFn: async (standardChoiceFormSignature) => {
17154
- if (data.fundId == fund$8.fundId) {
16088
+ if (data.fundId == slate.fundId) {
17155
16089
  await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
17156
16090
  defaultFundUsiSet }, this.PromotedFundsConfig));
17157
16091
  }
@@ -17169,14 +16103,13 @@ const SuperCampaignHost = class {
17169
16103
  return;
17170
16104
  }
17171
16105
  const usi = Usi.clean(data.usi);
17172
- const fundName = this.getFundName(data.fundId);
17173
16106
  navigationService.navigateInternallyToStandardChoice({
17174
16107
  history: this.history,
17175
- fundName,
16108
+ fundName: data.fundName,
17176
16109
  promotedFundId: data.fundId,
17177
16110
  fundDetails: {
17178
16111
  type: 'promotedDefault',
17179
- fundName,
16112
+ fundName: data.fundName,
17180
16113
  fundUsi: usi,
17181
16114
  promotedFundId: data.fundId
17182
16115
  },
@@ -17190,14 +16123,13 @@ const SuperCampaignHost = class {
17190
16123
  return;
17191
16124
  }
17192
16125
  const usi = Usi.clean(data.usi);
17193
- const fundName = this.getFundName(data.fundId);
17194
16126
  navigationService.navigateInternallyToStandardChoice({
17195
16127
  history: this.history,
17196
- fundName,
16128
+ fundName: data.fundName,
17197
16129
  promotedFundId: data.fundId,
17198
16130
  fundDetails: {
17199
16131
  type: 'promotedDefaultWithJoin',
17200
- fundName,
16132
+ fundName: data.fundName,
17201
16133
  fundUsi: usi,
17202
16134
  memberNumber: data.memberNumber,
17203
16135
  promotedFundId: data.fundId
@@ -17230,14 +16162,14 @@ const SuperCampaignHost = class {
17230
16162
  async componentWillLoad() {
17231
16163
  if (superSelectionAppService.state.superCampaignComponentStatus ===
17232
16164
  SuperCampaignComponentStatus.NotWorking) {
17233
- await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
16165
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
17234
16166
  return;
17235
16167
  }
17236
16168
  let superCampaingScriptPath = undefined;
17237
16169
  try {
17238
- if (Option.isSome(superSelectionAppService.state.apiBaseUrl) &&
16170
+ if (Option.isSome(superSelectionAppService.backendUrl) &&
17239
16171
  Option.isSome(superSelectionAppService.state.jwt)) {
17240
- this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16172
+ this.backendUrl = superSelectionAppService.backendUrl.value;
17241
16173
  this.accessToken = superSelectionAppService.state.jwt.value;
17242
16174
  this.unSubscribeFromSuperCampaignEvents();
17243
16175
  if (superSelectionAppService.state.superCampaignComponentStatus ===
@@ -17248,7 +16180,7 @@ const SuperCampaignHost = class {
17248
16180
  }
17249
16181
  this.subscribeToSuperCampaignEvents();
17250
16182
  this.scriptImported = true;
17251
- superSelectionAppService.superCampaignIsInView = true;
16183
+ superSelectionAppService.hideFooterSection = true;
17252
16184
  }
17253
16185
  else {
17254
16186
  throw Error(`SuperCampaignHost pre-requisites not met.`);
@@ -17264,7 +16196,7 @@ const SuperCampaignHost = class {
17264
16196
  disconnectedCallback() {
17265
16197
  clearTimeout(this.loadingTimeoutRef);
17266
16198
  this.unSubscribeFromSuperCampaignEvents();
17267
- superSelectionAppService.superCampaignIsInView = false;
16199
+ superSelectionAppService.hideFooterSection = false;
17268
16200
  }
17269
16201
  render() {
17270
16202
  return (index.h("div", null, this.scriptImported ? (index.h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
@@ -17289,10 +16221,6 @@ const SuperCampaignHost = class {
17289
16221
  createApolloSuperCampaignScriptUrl(envTag) {
17290
16222
  return `https://npm-cdn.flarehr.com/@flarehr/apollo-super-campaign@${envTag}/dist/apollo-super-campaign.js`;
17291
16223
  }
17292
- getBaseUrl(url) {
17293
- const parsedUrl = new URL(url);
17294
- return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
17295
- }
17296
16224
  get SuperCampaignState() {
17297
16225
  if (superSelectionAppService.superCampaignState != undefined)
17298
16226
  return superSelectionAppService.superCampaignState;
@@ -17304,136 +16232,6 @@ const SuperCampaignHost = class {
17304
16232
  };
17305
16233
  injectHistory(SuperCampaignHost);
17306
16234
 
17307
- const SuperChoiceItemBottom = class {
17308
- constructor(hostRef) {
17309
- index.registerInstance(this, hostRef);
17310
- this.joinFundClicked = index.createEvent(this, "joinFundClicked", 7);
17311
- }
17312
- render() {
17313
- return (index.h(index.Host, null, index.h("div", { class: "py-6 px-4 flex flex-col justify-between h-full" }, index.h("div", null, index.h("div", { class: { 'md:max-w-[240px]': true, 'lg:max-w-full': this.isMultiFund } }, index.h("sss-button", { testid: "choose-this-fund-button", class: "uuid-button-continue", fillWidth: true, onClick: () => this.handleFundClick() }, "Choose this fund")), index.h("div", { class: "text-xs text-gray-500 mt-6 leading-4" }, this.disclaimer)), this.abnInfo && this.abn && (index.h("div", { class: "text-xs text-gray-500 mt-2" }, index.h("p", null, "Issued by ", this.abnInfo, "."), index.h("p", null, "ABN: ", this.abn))))));
17314
- }
17315
- handleFundClick() {
17316
- return this.joinFundClicked.emit();
17317
- }
17318
- };
17319
-
17320
- const SuperChoiceItemTop = class {
17321
- constructor(hostRef) {
17322
- index.registerInstance(this, hostRef);
17323
- }
17324
- render() {
17325
- return (index.h(index.Host, null, index.h("div", { class: "px-4 pt-6" }, index.h("div", { class: "text-right w-100 -mt-5 -mr-2" }, this.extraBadge, this.isPromotedDefault && (index.h("span", { class: "text-xs bg-blue-100 text-blue-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Employer Default")), index.h("span", { class: "text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5" }, "Featured")), index.h("div", { class: { 'flex lg:block mt-2 md:mt-0': true, 'lg:mt-4': this.isMultiFund } }, index.h("img", { class: {
17326
- 'h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left': true,
17327
- 'lg:block': this.isMultiFund
17328
- }, alt: this.name, src: index.getAssetPath(`assets/${this.logo}`) }), index.h("div", { class: "grid content-center" }, index.h("p", { class: {
17329
- 'text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0': true,
17330
- 'lg:mt-4': this.isMultiFund
17331
- } }, this.name))), index.h("div", { class: "mt-4 sm:mt-2 text-sm space-y-2" }, this.features.map((feature) => (index.h("div", { class: "flex" }, index.h("div", { class: "h-5 w-5 flex-none mr-1.5" }, index.h("img", { alt: "checked", src: index.getAssetPath(`assets/icon-check.svg`) })), index.h("div", { class: "leading-5" }, feature))))), this.featureSubText && (index.h("p", { class: "text-xs text-gray-500 italic mt-4 leading-4" }, this.featureSubText)), this.customContent)));
17332
- }
17333
- };
17334
-
17335
- const SuperChoicePage = class {
17336
- constructor(hostRef) {
17337
- index.registerInstance(this, hostRef);
17338
- this.promotedFunds = this.getPromotedFunds();
17339
- this.eventTrackingService = EventTrackingService.Instance;
17340
- }
17341
- async componentDidLoad() {
17342
- const promotedFundsShown = this.promotedFunds.map((item) => item.fundId);
17343
- await superSelectionAppService.viewSuperFundPanelAsync(promotedFundsShown);
17344
- }
17345
- render() {
17346
- const mygovLink = 'https://my.gov.au';
17347
- const mygovLinkDisplay = 'www.my.gov.au';
17348
- const superfundsLink = 'https://www.apra.gov.au/register-of-superannuation-institutions';
17349
- const superfundsLinkDisplay = 'www.apra.gov.au';
17350
- const isMultiFund = this.promotedFunds.length > 1;
17351
- return (index.h(index.Host, null, index.h("div", null, index.h("sss-header-section", { currentPage: "choice" }), index.h("div", { class: "mt-8 text-sm text-center leading-6" }, index.h("p", { class: "leading-6" }, "Not ready to join a new fund, or want to nominate another super fund?"), index.h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, index.h("span", { class: "inline-block text-primary-base font-medium mt-3" }, "Skip Featured Funds\u00A0", index.h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "inline h-5 w-5 fill-primary-base group-hover:fill-white" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3" }))))), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: {
17352
- 'lg:grid border-l border-t lg:border-b rounded-lg': true,
17353
- 'lg:grid-cols-1 max-w-720': this.promotedFunds.length === 1,
17354
- 'lg:grid-cols-2 max-w-720': this.promotedFunds.length === 2,
17355
- 'lg:grid-cols-3 max-w-960': this.promotedFunds.length === 3
17356
- } }, this.promotedFunds.map((fund, index$1) => (index.h("div", { class: {
17357
- 'border-r': true,
17358
- 'rounded-tr-lg': index$1 === 0,
17359
- 'lg:rounded-tr-none': index$1 === 0 && index$1 !== this.promotedFunds.length - 1,
17360
- 'rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg': index$1 === this.promotedFunds.length - 1
17361
- } }, index.h("div", { class: {
17362
- 'flex border-b lg:border-b-0': true,
17363
- 'rounded-b-lg': index$1 === this.promotedFunds.length - 1
17364
- } }, index.h("div", { class: {
17365
- 'hidden md:flex w-36 justify-center pt-6 pl-6': true,
17366
- 'lg:hidden': isMultiFund
17367
- } }, index.h("img", { class: "h-16 object-contain w-full max-w-[96px]", alt: fund.name, src: index.getAssetPath(`assets/${fund.logo}`) })), index.h("div", { class: "w-full" }, index.h("sss-super-choice-item-top", { logo: fund.logo, name: fund.name, features: fund.features, featureSubText: fund.featureSubText, customContent: fund.customContent, isMultiFund: isMultiFund, isPromotedDefault: fund.isPromotedDefault, extraBadge: fund.extraBadge }), index.h("div", { class: { 'lg:hidden': isMultiFund } }, index.h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) }))))))), this.promotedFunds.map((fund, index$1) => (index.h("div", { class: {
17368
- 'hidden border-r': true,
17369
- 'lg:block': isMultiFund,
17370
- 'rounded-br-lg': index$1 === this.promotedFunds.length - 1
17371
- } }, index.h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) })))))), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "pb-8 sm:pb-12 max-w-720 border-b" }, index.h("h5", { class: "font-bold sm:text-lg" }, "Or, choose another super fund:"), index.h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base" }, index.h("li", null, "Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."), index.h("li", null, "If you are unsure of your current super fund details, you can find out at", ' ', index.h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(mygovLink) }, mygovLinkDisplay)), index.h("li", null, "A full list of super funds can be viewed at", ' ', index.h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(superfundsLink) }, superfundsLinkDisplay))), index.h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, index.h("sss-button", { testid: "choose-another-super-fund-button", fillWidthOnMobile: true }, "Choose another super fund")))), index.h("div", { class: "flex justify-center" }, index.h("div", { class: "pt-8 sm:pt-12 max-w-720" }, index.h("h5", { class: "font-semibold" }, "IMPORTANT INFORMATION:"), index.h("ul", { class: "list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6" }, index.h("li", null, "The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."), index.h("li", null, "This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."), index.h("li", null, "Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."), index.h("li", null, "You should consider the relevant superannuation fund\u2019s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund\u2019s website."), index.h("li", null, "You should be aware that the trustees of featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform.")))))));
17372
- }
17373
- getPromotedFunds() {
17374
- const fundTiles = [];
17375
- superSelectionAppService.promotedFunds.forEach((fundId) => {
17376
- const fund = allPromotedFunds.find((fund) => fundId === fund.fundId);
17377
- if (fund !== undefined) {
17378
- fundTiles.push(fund);
17379
- }
17380
- });
17381
- return fundTiles;
17382
- }
17383
- async handleJoinSuperClickAsync(fund) {
17384
- const promotedFundsShown = superSelectionAppService.promotedFunds;
17385
- const fundUsi = getFundUsiByFundId(fund.fundId);
17386
- const fundName = getFundNameByFundId(fund.fundId);
17387
- await Promise.all([
17388
- fund.isPromotedDefault == true
17389
- ? this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({
17390
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : '',
17391
- fundName: Option.isSome(fundName) ? fundName.value : '',
17392
- promotedFundId: fund.fundId,
17393
- promotedFundsShown,
17394
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17395
- superCampaignEnabled: false
17396
- })
17397
- : this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({
17398
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : undefined,
17399
- fundName: Option.isSome(fundName) ? fundName.value : '',
17400
- promotedFundId: fund.fundId,
17401
- promotedFundsShown,
17402
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17403
- superCampaignEnabled: false
17404
- }),
17405
- miscService.trackClickPromotedTileAsync(fund.isPromotedDefault
17406
- ? {
17407
- promotedDefault: {
17408
- fundId: fund.fundId
17409
- }
17410
- }
17411
- : {
17412
- promoted: {
17413
- fundId: fund.fundId
17414
- }
17415
- })
17416
- ]);
17417
- state.fund = {
17418
- id: fund.fundId,
17419
- type: fund.isPromotedDefault ? 'PromotedDefault' : 'Promoted'
17420
- };
17421
- return navigationService.navigateInternally(this.history, fund.route);
17422
- }
17423
- static get assetsDirs() { return ["assets"]; }
17424
- };
17425
- injectHistory(SuperChoicePage);
17426
-
17427
- const SuperChoicePageWrapper = class {
17428
- constructor(hostRef) {
17429
- index.registerInstance(this, hostRef);
17430
- }
17431
- render() {
17432
- return superSelectionAppService.state.superCampaignEnabled ? (index.h("sss-super-campaign-host", null)) : (index.h("sss-super-choice-page", null));
17433
- }
17434
- };
17435
- injectHistory(SuperChoicePageWrapper);
17436
-
17437
16235
  const routeCss = "stencil-route.inactive{display:none}";
17438
16236
 
17439
16237
  const Route = class {
@@ -18430,7 +17228,7 @@ const SuperSelectionApp = class {
18430
17228
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
18431
17229
  }
18432
17230
  else {
18433
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
17231
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
18434
17232
  }
18435
17233
  }
18436
17234
  authTokenChanged(newValue) {
@@ -18442,24 +17240,12 @@ const SuperSelectionApp = class {
18442
17240
  render() {
18443
17241
  return (index.h(index.Host, null, index.h("link", { rel: "stylesheet", href: index.getAssetPath('apollo-super-selection.css'), media: "all" }), this.renderAppContent()));
18444
17242
  }
18445
- isFundJoinPage() {
18446
- return (window.location.pathname.includes(SuperSelectionAppRoutes.SlateJoin) ||
18447
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV1) ||
18448
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV2));
18449
- }
18450
- getFooterTextOverride() {
18451
- return getFooterTextOverrideByFundId(state.fund.id);
18452
- }
18453
17243
  routerBaseUrl() {
18454
17244
  var _a;
18455
17245
  return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
18456
17246
  }
18457
17247
  renderAppContent() {
18458
- return (index.h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (index.h("div", { class: {
18459
- 'pt-28': true,
18460
- '-mt-12 pb-6': !this.isFundJoinPage(),
18461
- '-mt-28': this.isFundJoinPage() // -mt value same as pt to negate it in embedded fund join pages
18462
- } }, superSelectionAppStencilRoutes, index.h("sss-footer-section", { textOverride: this.getFooterTextOverride() }))) : (index.h("div", { class: "flex justify-center py-20" }, index.h("sss-loading-indicator", null))))));
17248
+ return (index.h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (index.h("div", { class: "pt-28 -mt-12 pb-6" }, superSelectionAppStencilRoutes, index.h("sss-footer-section", null))) : (index.h("div", { class: "flex justify-center py-20" }, index.h("sss-loading-indicator", null))))));
18463
17249
  }
18464
17250
  static get assetsDirs() { return ["assets"]; }
18465
17251
  static get watchers() { return {
@@ -19072,6 +17858,30 @@ class AuthenticationService {
19072
17858
  }
19073
17859
  const authenticationService = new AuthenticationService();
19074
17860
 
17861
+ class InteropQuery extends datoramaAkita.Query {
17862
+ constructor(store) {
17863
+ super(store);
17864
+ this.store = store;
17865
+ }
17866
+ isReactNativeInteropEnabled() {
17867
+ return isSome(this.getValue().reactNativeInterop);
17868
+ }
17869
+ isIframeInteropEnabled() {
17870
+ return isSome(this.getValue().iframeInterop);
17871
+ }
17872
+ getIframeInteropMode() {
17873
+ const iframeInterop = this.getValue().iframeInterop;
17874
+ if (isNone(iframeInterop)) {
17875
+ throw Error('Failed to get iframe interop information: no data in store');
17876
+ }
17877
+ if (!this.isIframeInteropEnabled()) {
17878
+ throw Error('Failed to get iframe interop information: iframe mode is disabled');
17879
+ }
17880
+ return iframeInterop.value;
17881
+ }
17882
+ }
17883
+ const interopQuery = new InteropQuery(sessionStore);
17884
+
19075
17885
  class IFrameInteropService {
19076
17886
  static completeSuperSelectionStep() {
19077
17887
  const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
@@ -19173,7 +17983,7 @@ class AppParametersQuery extends datoramaAkita.Query {
19173
17983
  }
19174
17984
  const appParametersQuery = new AppParametersQuery(sessionStore);
19175
17985
 
19176
- const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#fef3c7;--fl-color-primary-dark:#d97706;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
17986
+ const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#2E66F7;--fl-color-primary-light:#EAF0FE;--fl-color-primary-dark:#031495;--fl-color-primary-disabled:#88ABFA;--fl-color-primary-hover:#5786F8;--fl-color-primary-focus:#1033C6;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
19177
17987
 
19178
17988
  const SuperSelectionAppHost = class {
19179
17989
  constructor(hostRef) {
@@ -19236,20 +18046,16 @@ const SuperSelectionAppHost = class {
19236
18046
  SuperSelectionAppHost.style = superSelectionAppHostCss;
19237
18047
 
19238
18048
  exports.sss_button = Button;
19239
- exports.sss_consent_page = Consent;
19240
- exports.sss_consent_page_wrapper = ConsentWrapper;
19241
18049
  exports.sss_custom_fund = CustomFund;
19242
18050
  exports.sss_default_fund = DefaultFund;
19243
18051
  exports.sss_dropdown_async = SelectInputAsync;
19244
18052
  exports.sss_existing_choice_page = ExistingChoice;
19245
18053
  exports.sss_footer_section = FooterSection;
19246
18054
  exports.sss_header_section = HeaderSection;
19247
- exports.sss_iframe_host = IFrameHost;
19248
- exports.sss_loading_component = LoadingComponent;
19249
18055
  exports.sss_loading_indicator = LoadingIndicator;
19250
18056
  exports.sss_loading_page = LoadingPage;
19251
- exports.sss_loading_super_indicator = LoadingComponent$1;
19252
18057
  exports.sss_my_own_fund = MyOwnFund;
18058
+ exports.sss_my_own_fund_engagement_step_host = MyOwnFundEngagementStep;
19253
18059
  exports.sss_my_own_fund_inputs = MyOwnFundInputs;
19254
18060
  exports.sss_name_input = MemberNameInput;
19255
18061
  exports.sss_prefill = Prefill;
@@ -19260,18 +18066,11 @@ exports.sss_prefill_invalid_smsf = PrefillInvalidSMSF;
19260
18066
  exports.sss_prefill_my_own_fund = PrefillMyOwnFund;
19261
18067
  exports.sss_prefill_smsf = PrefillSMSF;
19262
18068
  exports.sss_prefill_warning_box = PrefillWarningBox;
19263
- exports.sss_promoted_fund_join_v1_page = PromotedFundJoinV1Page;
19264
- exports.sss_promoted_fund_join_v2_page = PromotedFundJoinV2Page;
19265
18069
  exports.sss_self_managed_fund = SelfManagedFund;
19266
18070
  exports.sss_self_managed_fund_inputs = SelfManagedFundInputs;
19267
- exports.sss_slate_join_page = SlateJoinPage;
19268
18071
  exports.sss_standard_choice_form = StandardChoiceFormInputDefaultFund;
19269
18072
  exports.sss_success = Success;
19270
18073
  exports.sss_super_campaign_host = SuperCampaignHost;
19271
- exports.sss_super_choice_item_bottom = SuperChoiceItemBottom;
19272
- exports.sss_super_choice_item_top = SuperChoiceItemTop;
19273
- exports.sss_super_choice_page = SuperChoicePage;
19274
- exports.sss_super_choice_page_wrapper = SuperChoicePageWrapper;
19275
18074
  exports.stencil_route = Route;
19276
18075
  exports.stencil_route_link = RouteLink$1;
19277
18076
  exports.stencil_route_switch = RouteSwitch;