@flarehr/apollo-super-selection 5.23.54085 → 5.25.54575

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 (144) 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-64e00db6.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  5. package/dist/lib/apollo-super-selection/p-cf19c194.system.entry.js +69 -0
  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_31.cjs.entry.js} +945 -2213
  9. package/dist/lib/collection/apollo-super-selection.css +1 -1
  10. package/dist/lib/collection/collection-manifest.json +1 -25
  11. package/dist/lib/collection/components/super-campaign/super-campaign.js +8 -16
  12. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +52 -24
  13. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +0 -9
  14. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +5 -9
  15. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +9 -13
  16. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
  17. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +3 -3
  18. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +2 -2
  19. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +3 -3
  20. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +3 -3
  21. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +1 -1
  22. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +5 -8
  23. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -9
  24. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +1 -35
  25. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +1 -3
  26. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +16 -13
  27. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +3 -17
  28. package/dist/lib/esm/apollo-super-selection.js +1 -1
  29. package/dist/lib/esm/loader.js +1 -1
  30. package/dist/lib/esm/{sss-button_43.entry.js → sss-button_31.entry.js} +946 -2202
  31. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  32. package/dist/lib/esm-es5/loader.js +1 -1
  33. package/dist/lib/esm-es5/sss-button_31.entry.js +69 -0
  34. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +4 -0
  35. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +0 -1
  36. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +1 -2
  37. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +2 -10
  38. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
  39. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
  40. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +0 -4
  41. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +0 -3
  42. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +1 -3
  43. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
  44. package/dist/lib/types/components.d.ts +2 -203
  45. package/package.json +1 -1
  46. package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
  47. package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
  48. package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
  49. package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
  50. package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -58
  51. package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
  52. package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
  53. package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
  54. package/dist/lib/apollo-super-selection/assets/logo-rei.svg +0 -27
  55. package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
  56. package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
  57. package/dist/lib/apollo-super-selection/assets/logo-unisuper.svg +0 -15
  58. package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
  59. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge1.svg +0 -25
  60. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge2.svg +0 -109
  61. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge3.svg +0 -102
  62. package/dist/lib/apollo-super-selection/p-8e24008c.system.entry.js +0 -69
  63. package/dist/lib/apollo-super-selection/p-a8cbd8bb.entry.js +0 -14
  64. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
  65. package/dist/lib/collection/components/super-selection-app/consent/consent-wrapper.js +0 -32
  66. package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -88
  67. package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -43
  68. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
  69. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
  70. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
  71. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -38
  72. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
  73. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -34
  74. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -33
  75. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/rei.js +0 -33
  76. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
  77. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
  78. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.js +0 -56
  79. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.js +0 -49
  80. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -37
  81. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
  82. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
  83. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -10
  84. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -125
  85. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -271
  86. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.js +0 -1
  87. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -15
  88. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -143
  89. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
  90. package/dist/lib/collection/components/super-selection-app/loading-component/loading-component.js +0 -29
  91. package/dist/lib/collection/components/super-selection-app/loading-super-indicator/loading-super-indicator.js +0 -11
  92. package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
  93. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
  94. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
  95. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
  96. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -58
  97. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
  98. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
  99. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
  100. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-rei.svg +0 -27
  101. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
  102. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
  103. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-unisuper.svg +0 -15
  104. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
  105. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge1.svg +0 -25
  106. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge2.svg +0 -109
  107. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge3.svg +0 -102
  108. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
  109. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -178
  110. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page-wrapper.js +0 -32
  111. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -171
  112. package/dist/lib/esm-es5/sss-button_43.entry.js +0 -69
  113. package/dist/lib/types/components/super-selection-app/consent/consent-wrapper.d.ts +0 -5
  114. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -9
  115. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -9
  116. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
  117. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
  118. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
  119. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
  120. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
  121. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
  122. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
  123. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/rei.d.ts +0 -3
  124. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
  125. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
  126. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.d.ts +0 -3
  127. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.d.ts +0 -3
  128. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
  129. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.d.ts +0 -5
  130. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
  131. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -10
  132. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
  133. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -12
  134. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +0 -75
  135. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -26
  136. package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
  137. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
  138. package/dist/lib/types/components/super-selection-app/loading-component/loading-component.d.ts +0 -4
  139. package/dist/lib/types/components/super-selection-app/loading-super-indicator/loading-super-indicator.d.ts +0 -3
  140. package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
  141. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
  142. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -12
  143. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page-wrapper.d.ts +0 -5
  144. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -10
@@ -284,7 +284,7 @@ class TapSubscriber extends datoramaAkita.Subscriber {
284
284
  }
285
285
  }
286
286
 
287
- const AppVersion = '5.23.54085';
287
+ const AppVersion = '5.25.54575';
288
288
 
289
289
  // -------------------------------------------------------------------------------------
290
290
  // guards
@@ -987,6 +987,253 @@ 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["Prefill"] = "/super-choice/prefill/";
1212
+ SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
1213
+ SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
1214
+ SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
1215
+ SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
1216
+ SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
1217
+ SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
1218
+ SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
1219
+ SuperSelectionAppRoutes["Success"] = "/success/";
1220
+ })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
1221
+ const superSelectionAppStencilRoutes = [
1222
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
1223
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
1224
+ index.h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-campaign-host" }),
1225
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
1226
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
1227
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
1228
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
1229
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
1230
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
1231
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
1232
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
1233
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
1234
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
1235
+ ];
1236
+
990
1237
  function createCommonjsModule(fn, basedir, module) {
991
1238
  return module = {
992
1239
  path: basedir,
@@ -2450,177 +2697,6 @@ exports.sequenceArray =
2450
2697
  exports.traverseArray(_function.identity);
2451
2698
  });
2452
2699
 
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
2700
  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
2701
 
2626
2702
  var __assign$1 = (undefined && undefined.__assign) || function () {
@@ -3310,6 +3386,11 @@ function buildBackendApiClient() {
3310
3386
  });
3311
3387
  }
3312
3388
 
3389
+ const slate = {
3390
+ fundId: 'slate',
3391
+ usi: '32367272075001'
3392
+ };
3393
+
3313
3394
  function hydratePromotedFundChoiceDtoKind(dto) {
3314
3395
  if ('slate' in dto) {
3315
3396
  dto.kind = 'slate';
@@ -3345,33 +3426,59 @@ function hydratePromotedFundChoiceDtoKind(dto) {
3345
3426
  function getPromotedFundUsi(dto) {
3346
3427
  switch (dto.kind) {
3347
3428
  case 'slate':
3348
- return none;
3429
+ return slate.usi;
3349
3430
  case 'australianRetirementTrust':
3350
- return some(dto.australianRetirementTrust.usi);
3431
+ return dto.australianRetirementTrust.usi;
3351
3432
  case 'aware':
3352
- return some(dto.aware.usi);
3433
+ return dto.aware.usi;
3353
3434
  case 'active':
3354
- return some(dto.active.usi);
3435
+ return dto.active.usi;
3355
3436
  case 'australianEthical':
3356
- return some(dto.australianEthical.usi);
3437
+ return dto.australianEthical.usi;
3357
3438
  case 'virgin':
3358
- return some(dto.virgin.usi);
3439
+ return dto.virgin.usi;
3359
3440
  case 'spirit':
3360
- return some(dto.spirit.usi);
3441
+ return dto.spirit.usi;
3361
3442
  case 'firstSuper':
3362
- return some(dto.firstSuper.usi);
3443
+ return dto.firstSuper.usi;
3363
3444
  case 'mercerMyChoice':
3364
- return some(dto.mercerMyChoice.usi);
3445
+ return dto.mercerMyChoice.usi;
3365
3446
  case 'generic':
3366
- return some(dto.generic.usi);
3447
+ return dto.generic.usi;
3367
3448
  default:
3368
- return none;
3449
+ return '';
3450
+ }
3451
+ }
3452
+ function getPromotedFundId(dto) {
3453
+ switch (dto.kind) {
3454
+ case 'slate':
3455
+ return slate.fundId;
3456
+ case 'australianRetirementTrust':
3457
+ return 'australian-retirement-trust';
3458
+ case 'aware':
3459
+ return 'aware';
3460
+ case 'active':
3461
+ return 'active';
3462
+ case 'australianEthical':
3463
+ return 'australian-ethical';
3464
+ case 'virgin':
3465
+ return 'virgin';
3466
+ case 'spirit':
3467
+ return 'spirit';
3468
+ case 'firstSuper':
3469
+ return 'first-super';
3470
+ case 'mercerMyChoice':
3471
+ return 'mercermychoice';
3472
+ case 'generic':
3473
+ return dto.generic.fundId;
3474
+ default:
3475
+ return '';
3369
3476
  }
3370
3477
  }
3371
3478
  function getSuperChoiceUsi(dto) {
3372
3479
  switch (dto.kind) {
3373
3480
  case 'Promoted':
3374
- return getPromotedFundUsi(dto.promoted);
3481
+ return some(getPromotedFundUsi(dto.promoted));
3375
3482
  case 'MyOwnFund':
3376
3483
  return some(dto.myOwnFund.usi);
3377
3484
  case 'SMSF':
@@ -3391,33 +3498,33 @@ function getSuperChoiceUsi(dto) {
3391
3498
  function getPromotedFundMemberNumber(dto) {
3392
3499
  switch (dto.kind) {
3393
3500
  case 'slate':
3394
- return some(dto.slate.memberNumber);
3501
+ return dto.slate.memberNumber;
3395
3502
  case 'australianRetirementTrust':
3396
- return some(dto.australianRetirementTrust.memberNumber);
3503
+ return dto.australianRetirementTrust.memberNumber;
3397
3504
  case 'aware':
3398
- return some(dto.aware.memberNumber);
3505
+ return dto.aware.memberNumber;
3399
3506
  case 'active':
3400
- return some(dto.active.memberNumber);
3507
+ return dto.active.memberNumber;
3401
3508
  case 'australianEthical':
3402
- return some(dto.australianEthical.memberNumber);
3509
+ return dto.australianEthical.memberNumber;
3403
3510
  case 'virgin':
3404
- return some(dto.virgin.memberNumber);
3511
+ return dto.virgin.memberNumber;
3405
3512
  case 'spirit':
3406
- return some(dto.spirit.memberNumber);
3513
+ return dto.spirit.memberNumber;
3407
3514
  case 'firstSuper':
3408
- return some(dto.firstSuper.memberNumber);
3515
+ return dto.firstSuper.memberNumber;
3409
3516
  case 'mercerMyChoice':
3410
- return some(dto.mercerMyChoice.memberNumber);
3517
+ return dto.mercerMyChoice.memberNumber;
3411
3518
  case 'generic':
3412
- return some(dto.generic.memberNumber);
3519
+ return dto.generic.memberNumber;
3413
3520
  default:
3414
- return none;
3521
+ return '';
3415
3522
  }
3416
3523
  }
3417
3524
  function getSuperChoiceMemberNumber(dto) {
3418
3525
  switch (dto.kind) {
3419
3526
  case 'Promoted':
3420
- return getPromotedFundMemberNumber(dto.promoted);
3527
+ return some(getPromotedFundMemberNumber(dto.promoted));
3421
3528
  case 'MyOwnFund':
3422
3529
  return some(dto.myOwnFund.memberNumber);
3423
3530
  case 'DefinedBenefits':
@@ -3495,15 +3602,6 @@ class SuperSelectionApi {
3495
3602
  }
3496
3603
  return response;
3497
3604
  }
3498
- async getCampaignConnectAsync() {
3499
- return buildBackendApiClient()
3500
- .url('campaign-connect')
3501
- .get()
3502
- .notFound(() => {
3503
- throw new Error('Failed to fetch campaign connect.');
3504
- })
3505
- .json();
3506
- }
3507
3605
  async clickPromotedTileAsync(payload) {
3508
3606
  return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
3509
3607
  }
@@ -3558,10 +3656,8 @@ const initialState = {
3558
3656
  profileConfiguration: Option.none,
3559
3657
  hasSuccessPageBeenAcknowledged: false,
3560
3658
  hasSuperSelectionBeenSubmitted: false,
3561
- campaignConnectEnabled: false,
3562
3659
  isDefinedBenefitsEligible: Option.none,
3563
- campaignConnect: Option.none,
3564
- superCampaignEnabled: false,
3660
+ superCampaignEnabled: true,
3565
3661
  superCampaignState: undefined,
3566
3662
  superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
3567
3663
  superCampaignIsInView: false
@@ -3604,9 +3700,6 @@ class SuperSelectionAppService {
3604
3700
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3605
3701
  return this.superCampaignState.PromotedFundIds;
3606
3702
  }
3607
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3608
- return this._state.campaignConnect.value.promotedFunds.map((v) => v.fundId);
3609
- }
3610
3703
  if (Option.isNone(this._state.promotedFunds)) {
3611
3704
  throw Error('Promoted Funds is not set');
3612
3705
  }
@@ -3616,35 +3709,15 @@ class SuperSelectionAppService {
3616
3709
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3617
3710
  return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
3618
3711
  }
3619
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3620
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
3621
- if (index === -1) {
3622
- return Option.fromNullable(null);
3623
- }
3624
- else {
3625
- return Option.fromNullable(index + 1);
3626
- }
3627
- }
3628
3712
  return Option.none;
3629
3713
  }
3630
3714
  get promotedFundsConfig() {
3631
3715
  return {
3632
3716
  shownFunds: this.promotedFunds,
3633
3717
  promotedDefaultFundPosition: Option.toUndefined(this.promotedDefaultFundPosition),
3634
- promotedFundsConfigSource: this.isUsingSuperCampaign
3635
- ? 'superCampaign'
3636
- : Option.isSome(this._state.campaignConnect)
3637
- ? 'campaignConnect'
3638
- : 'superSelection'
3718
+ promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
3639
3719
  };
3640
3720
  }
3641
- get definedBenefitsFundId() {
3642
- if (Option.isSome(this._state.campaignConnect)) {
3643
- const definedBenefitsFund = this._state.campaignConnect.value.promotedFunds.find((fund) => fund.type == 'defined-benefits');
3644
- return Option.fromNullable(definedBenefitsFund === null || definedBenefitsFund === void 0 ? void 0 : definedBenefitsFund.fundId);
3645
- }
3646
- return Option.none;
3647
- }
3648
3721
  get profileId() {
3649
3722
  if (Option.isNone(this._state.profileId)) {
3650
3723
  throw Error('Failed to get Profile ID from JWT');
@@ -3676,9 +3749,6 @@ class SuperSelectionAppService {
3676
3749
  markSuperSelectionAsSubmitted() {
3677
3750
  this._state.hasSuperSelectionBeenSubmitted = true;
3678
3751
  }
3679
- get campaignConnectEnabled() {
3680
- return this._state.campaignConnectEnabled;
3681
- }
3682
3752
  get isDefinedBenefitsEligible() {
3683
3753
  return this._state.isDefinedBenefitsEligible;
3684
3754
  }
@@ -3688,17 +3758,9 @@ class SuperSelectionAppService {
3688
3758
  this._state.profileConfiguration = Option.fromNullable(appStateResponse.profileConfiguration);
3689
3759
  this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
3690
3760
  this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
3691
- this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
3692
- this._state.superCampaignEnabled = appStateResponse.superCampaignEnabled;
3693
3761
  this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
3694
3762
  this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
3695
3763
  }
3696
- async loadCampaignConnectAsync() {
3697
- if (this._state.campaignConnectEnabled) {
3698
- const campaignConnect = await superSelectionApi.getCampaignConnectAsync();
3699
- this._state.campaignConnect = Option.fromNullable(campaignConnect);
3700
- }
3701
- }
3702
3764
  setSuperCampaignPromotedFundsShown(shownFunds) {
3703
3765
  if (this._state.superCampaignState !== undefined)
3704
3766
  this._state.superCampaignState.promotedFundsShown = shownFunds;
@@ -3742,306 +3804,33 @@ class SuperSelectionAppService {
3742
3804
  }
3743
3805
  const superSelectionAppService = new SuperSelectionAppService();
3744
3806
 
3745
- const SuperFundDisclaimerViewedDetail = {
3746
- create: (superCampaignEnabled) => {
3747
- let isDefinedBenefitsEligibleString = 'Not set';
3748
- if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
3749
- isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
3750
- ? 'True'
3751
- : 'False';
3752
- }
3753
- return {
3754
- isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
3755
- superCampaignEnabled: superCampaignEnabled
3756
- };
3807
+ class NavigationService {
3808
+ navigateInternally(history, route) {
3809
+ const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3810
+ iframe.navigation(path);
3811
+ history.push(path);
3757
3812
  }
3758
- };
3759
-
3760
- const initial = {
3761
- fund: {
3762
- id: '',
3763
- type: 'null'
3813
+ navigateInternallyToStandardChoice(options) {
3814
+ state.handleSubmitFn = options.handleSubmitFn;
3815
+ state.fundName = options.fundName;
3816
+ state.fundDetails = options.fundDetails;
3817
+ state.promotedFundId = options.promotedFundId;
3818
+ this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3764
3819
  }
3765
- };
3766
- const { state, reset } = createStore(initial);
3767
-
3768
- class EventTrackingApi {
3769
- static get Instance() {
3770
- return this.instance || (this.instance = new this());
3820
+ toExternalUrl(url) {
3821
+ const externalUrl = new URL(url);
3822
+ externalUrl.searchParams.append('_extnav', 'true');
3823
+ return externalUrl.href;
3771
3824
  }
3772
- async PostAnalyticsEventAsync(event) {
3773
- return buildBackendApiClient().url('analytics-events').post(event).res();
3825
+ get appBaseUrl() {
3826
+ const baseUrl = superSelectionAppService.appBaseUrl;
3827
+ return baseUrl.replace(/\/$/, '');
3828
+ }
3829
+ toRouteWithLeadingSlash(route) {
3830
+ return route.length > 0 && route[0] === '/' ? route : `/${route}`;
3774
3831
  }
3775
3832
  }
3776
-
3777
- class EventTrackingService {
3778
- constructor() {
3779
- this.eventTrackingApi = EventTrackingApi.Instance;
3780
- }
3781
- static get Instance() {
3782
- return this.instance || (this.instance = new this());
3783
- }
3784
- async TrackSuperFundPdsViewedAsync(detail) {
3785
- return this.trackEventAsync({
3786
- SuperFundPdsViewed: detail
3787
- });
3788
- }
3789
- async TrackPromotedSuperFundDetailViewedAsync(detail) {
3790
- return this.trackEventAsync({
3791
- SuperFundDetailViewed: {
3792
- PromotedFund: detail
3793
- }
3794
- });
3795
- }
3796
- async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3797
- return this.trackEventAsync({
3798
- SuperFundDetailViewed: {
3799
- PromotedDefaultFund: detail
3800
- }
3801
- });
3802
- }
3803
- async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3804
- return this.trackEventAsync({
3805
- SuperFundDetailViewed: {
3806
- MyOwnFund: detail
3807
- }
3808
- });
3809
- }
3810
- async TrackSmsfSuperFundDetailViewedAsync(detail) {
3811
- return this.trackEventAsync({
3812
- SuperFundDetailViewed: {
3813
- Smsf: detail
3814
- }
3815
- });
3816
- }
3817
- async TrackDefaultSuperFundDetailViewedAsync(detail) {
3818
- return this.trackEventAsync({
3819
- SuperFundDetailViewed: {
3820
- DefaultFund: detail
3821
- }
3822
- });
3823
- }
3824
- async TrackSuperFundNominationViewedAsync(detail) {
3825
- return this.trackEventAsync({
3826
- SuperFundNominationViewed: detail
3827
- });
3828
- }
3829
- async TrackSuperFundNominationDeclinedAsync(detail) {
3830
- return this.trackEventAsync({
3831
- SuperFundNominationDeclined: detail
3832
- });
3833
- }
3834
- async TrackSuperFundDisclaimerViewedAsync(detail) {
3835
- return this.trackEventAsync({
3836
- SuperFundDisclaimerViewed: detail
3837
- });
3838
- }
3839
- async TrackSuperFundDisclaimerAcceptedAsync(detail) {
3840
- return this.trackEventAsync({
3841
- SuperFundDisclaimerAccepted: detail
3842
- });
3843
- }
3844
- async TrackSuperFundPrefillViewedAsync(detail) {
3845
- return this.trackEventAsync({
3846
- SuperFundPrefillViewed: detail
3847
- });
3848
- }
3849
- async TrackSuperFundPrefillDeclinedAsync(detail) {
3850
- return this.trackEventAsync({
3851
- SuperFundPrefillDeclined: detail
3852
- });
3853
- }
3854
- async TrackSuperFundDetailChangeRequestedAsync(detail) {
3855
- return this.trackEventAsync({
3856
- SuperFundDetailChangeRequested: detail
3857
- });
3858
- }
3859
- async TrackSuperCampaignActivationSucceededAsync(detail) {
3860
- return this.trackEventAsync({
3861
- SuperCampaignActivationSucceeded: detail
3862
- });
3863
- }
3864
- async trackEventAsync(event) {
3865
- try {
3866
- await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
3867
- }
3868
- catch (_a) {
3869
- return;
3870
- }
3871
- }
3872
- }
3873
-
3874
- function appReady() {
3875
- postMessage({
3876
- type: 'appReady'
3877
- });
3878
- }
3879
- function postMessage(message, origin) {
3880
- if (origin === undefined)
3881
- origin = '*';
3882
- message.sender = 'flare';
3883
- window.parent.postMessage(message, origin);
3884
- }
3885
- function resize(height, width) {
3886
- postMessage({
3887
- type: 'contentResized',
3888
- height,
3889
- width
3890
- });
3891
- }
3892
- function navigation(url) {
3893
- postMessage({
3894
- type: 'pageNavigated',
3895
- url
3896
- });
3897
- }
3898
- function complete() {
3899
- postMessage({ type: 'complete' });
3900
- }
3901
- function submitSuccess() {
3902
- postMessage({
3903
- type: 'submitSuccess'
3904
- });
3905
- }
3906
- const iframe = { appReady, resize, navigation, complete, submitSuccess };
3907
-
3908
- const initial$1 = {
3909
- handleSubmitFn: async function () {
3910
- return;
3911
- },
3912
- fundName: '',
3913
- fundDetails: { type: 'null' },
3914
- promotedFundId: undefined
3915
- };
3916
- const { state: state$1 } = createStore(initial$1);
3917
-
3918
- var SuperSelectionAppRoutes;
3919
- (function (SuperSelectionAppRoutes) {
3920
- SuperSelectionAppRoutes["ConsentPage"] = "/consent";
3921
- SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
3922
- SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
3923
- SuperSelectionAppRoutes["ChoicePage"] = "/";
3924
- SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
3925
- SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
3926
- SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
3927
- SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
3928
- SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
3929
- SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
3930
- SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
3931
- SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
3932
- SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
3933
- SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
3934
- SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
3935
- SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
3936
- SuperSelectionAppRoutes["Success"] = "/success/";
3937
- })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
3938
- const superSelectionAppStencilRoutes = [
3939
- index.h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page-wrapper" }),
3940
- index.h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
3941
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
3942
- index.h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page-wrapper" }),
3943
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
3944
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
3945
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
3946
- index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
3947
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
3948
- index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
3949
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
3950
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
3951
- index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
3952
- index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
3953
- index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
3954
- index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
3955
- index.h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
3956
- ];
3957
-
3958
- class NavigationService {
3959
- navigateInternally(history, route) {
3960
- const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3961
- iframe.navigation(path);
3962
- history.push(path);
3963
- }
3964
- navigateInternallyToStandardChoice(options) {
3965
- state$1.handleSubmitFn = options.handleSubmitFn;
3966
- state$1.fundName = options.fundName;
3967
- state$1.fundDetails = options.fundDetails;
3968
- state$1.promotedFundId = options.promotedFundId;
3969
- this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3970
- }
3971
- toExternalUrl(url) {
3972
- const externalUrl = new URL(url);
3973
- externalUrl.searchParams.append('_extnav', 'true');
3974
- return externalUrl.href;
3975
- }
3976
- get appBaseUrl() {
3977
- const baseUrl = superSelectionAppService.appBaseUrl;
3978
- return baseUrl.replace(/\/$/, '');
3979
- }
3980
- toRouteWithLeadingSlash(route) {
3981
- return route.length > 0 && route[0] === '/' ? route : `/${route}`;
3982
- }
3983
- }
3984
- const navigationService = new NavigationService();
3985
-
3986
- const Link = (props, children) => {
3987
- 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));
3988
- };
3989
- const PoweredByFlareFS = 'Powered by Flare FS';
3990
- function pdsViewedAsync(name, usi) {
3991
- return EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
3992
- fundUsi: usi,
3993
- fundName: name,
3994
- pageName: 'Panel Fund Page',
3995
- superCampaignEnabled: false
3996
- });
3997
- }
3998
-
3999
- const Consent = class {
4000
- constructor(hostRef) {
4001
- index.registerInstance(this, hostRef);
4002
- this.campaignConnectRequestInProgress = false;
4003
- this.eventTrackingService = EventTrackingService.Instance;
4004
- }
4005
- componentDidLoad() {
4006
- return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(false));
4007
- }
4008
- render() {
4009
- if (this.campaignConnectRequestInProgress) {
4010
- return index.h("sss-loading-super-indicator", null);
4011
- }
4012
- 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")))));
4013
- }
4014
- async handleSuperFundDisclaimerAccepted() {
4015
- await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({
4016
- superCampaignEnabled: false
4017
- });
4018
- if (superSelectionAppService.campaignConnectEnabled) {
4019
- this.campaignConnectRequestInProgress = true;
4020
- await superSelectionAppService.loadCampaignConnectAsync();
4021
- if (superSelectionAppService.isDefinedBenefitsEligible &&
4022
- Option.isSome(superSelectionAppService.definedBenefitsFundId)) {
4023
- state.fund = {
4024
- id: superSelectionAppService.definedBenefitsFundId.value,
4025
- type: 'DefinedBenefits'
4026
- };
4027
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PromotedFundJoinV2);
4028
- return;
4029
- }
4030
- }
4031
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
4032
- }
4033
- };
4034
- injectHistory(Consent);
4035
-
4036
- const ConsentWrapper = class {
4037
- constructor(hostRef) {
4038
- index.registerInstance(this, hostRef);
4039
- }
4040
- render() {
4041
- return superSelectionAppService.state.superCampaignEnabled ? (index.h("sss-super-campaign-host", null)) : (index.h("sss-consent-page", null));
4042
- }
4043
- };
4044
- injectHistory(ConsentWrapper);
3833
+ const navigationService = new NavigationService();
4045
3834
 
4046
3835
  var CustomFundTypes;
4047
3836
  (function (CustomFundTypes) {
@@ -4090,9 +3879,9 @@ const initialStateCustomFund = {
4090
3879
  }
4091
3880
  ]
4092
3881
  };
4093
- const { state: state$2, reset: reset$1 } = createStore(initialStateCustomFund);
3882
+ const { state: state$1, reset } = createStore(initialStateCustomFund);
4094
3883
 
4095
- const customFundOptions = state$2.customFunds;
3884
+ const customFundOptions = state$1.customFunds;
4096
3885
  const CustomFund = class {
4097
3886
  constructor(hostRef) {
4098
3887
  index.registerInstance(this, hostRef);
@@ -4147,57 +3936,163 @@ class AustralianFundLookupService {
4147
3936
  }
4148
3937
  const australianFundLookupService = new AustralianFundLookupService();
4149
3938
 
4150
- class CustomFundChoiceApi {
4151
- async submitDefaultFundChoiceAsync(dto) {
4152
- return buildBackendApiClient()
4153
- .url('super-choice/default')
4154
- .post(dto)
4155
- .badRequest(() => {
4156
- throw new Error('Failed to process default fund join request');
4157
- })
4158
- .text();
4159
- }
4160
- async submitCustomFundChoiceAsync(dto) {
4161
- return buildBackendApiClient()
4162
- .url('super-choice/custom-fund')
4163
- .post(dto)
4164
- .badRequest(() => {
4165
- throw new Error('Failed to process custom fund join request');
4166
- })
4167
- .text();
4168
- }
4169
- async submitSelfManagedFundChoiceAsync(dto) {
4170
- return buildBackendApiClient()
4171
- .url('super-choice/smsf')
4172
- .post(dto)
4173
- .badRequest(() => {
4174
- throw new Error('Failed to process SMSF choice request');
4175
- })
4176
- .text();
4177
- }
4178
- async submitDefinedBenefitsChoiceAsync(dto) {
4179
- return buildBackendApiClient()
4180
- .url('super-choice/defined-benefits')
4181
- .post(dto)
4182
- .badRequest(() => {
4183
- throw new Error('Failed to process Defined Benefits choice request');
4184
- })
4185
- .text();
3939
+ class EventTrackingApi {
3940
+ static get Instance() {
3941
+ return this.instance || (this.instance = new this());
4186
3942
  }
4187
- async validateAbnForSMSF(abn) {
4188
- const response = await buildBackendApiClient()
4189
- .url(`super-choice/smsf/${abn}/validate`)
4190
- .get()
4191
- .badRequest(() => {
4192
- throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4193
- })
4194
- .json();
4195
- return response.result;
3943
+ async PostAnalyticsEventAsync(event) {
3944
+ return buildBackendApiClient().url('analytics-events').post(event).res();
4196
3945
  }
4197
3946
  }
4198
- const customFundChoiceApi = new CustomFundChoiceApi();
4199
3947
 
4200
- const DefaultFund = class {
3948
+ class EventTrackingService {
3949
+ constructor() {
3950
+ this.eventTrackingApi = EventTrackingApi.Instance;
3951
+ }
3952
+ static get Instance() {
3953
+ return this.instance || (this.instance = new this());
3954
+ }
3955
+ async TrackSuperFundPdsViewedAsync(detail) {
3956
+ return this.trackEventAsync({
3957
+ SuperFundPdsViewed: detail
3958
+ });
3959
+ }
3960
+ async TrackPromotedSuperFundDetailViewedAsync(detail) {
3961
+ return this.trackEventAsync({
3962
+ SuperFundDetailViewed: {
3963
+ PromotedFund: detail
3964
+ }
3965
+ });
3966
+ }
3967
+ async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3968
+ return this.trackEventAsync({
3969
+ SuperFundDetailViewed: {
3970
+ PromotedDefaultFund: detail
3971
+ }
3972
+ });
3973
+ }
3974
+ async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3975
+ return this.trackEventAsync({
3976
+ SuperFundDetailViewed: {
3977
+ MyOwnFund: detail
3978
+ }
3979
+ });
3980
+ }
3981
+ async TrackSmsfSuperFundDetailViewedAsync(detail) {
3982
+ return this.trackEventAsync({
3983
+ SuperFundDetailViewed: {
3984
+ Smsf: detail
3985
+ }
3986
+ });
3987
+ }
3988
+ async TrackDefaultSuperFundDetailViewedAsync(detail) {
3989
+ return this.trackEventAsync({
3990
+ SuperFundDetailViewed: {
3991
+ DefaultFund: detail
3992
+ }
3993
+ });
3994
+ }
3995
+ async TrackSuperFundNominationViewedAsync(detail) {
3996
+ return this.trackEventAsync({
3997
+ SuperFundNominationViewed: detail
3998
+ });
3999
+ }
4000
+ async TrackSuperFundNominationDeclinedAsync(detail) {
4001
+ return this.trackEventAsync({
4002
+ SuperFundNominationDeclined: detail
4003
+ });
4004
+ }
4005
+ async TrackSuperFundDisclaimerViewedAsync(detail) {
4006
+ return this.trackEventAsync({
4007
+ SuperFundDisclaimerViewed: detail
4008
+ });
4009
+ }
4010
+ async TrackSuperFundDisclaimerAcceptedAsync(detail) {
4011
+ return this.trackEventAsync({
4012
+ SuperFundDisclaimerAccepted: detail
4013
+ });
4014
+ }
4015
+ async TrackSuperFundPrefillViewedAsync(detail) {
4016
+ return this.trackEventAsync({
4017
+ SuperFundPrefillViewed: detail
4018
+ });
4019
+ }
4020
+ async TrackSuperFundPrefillDeclinedAsync(detail) {
4021
+ return this.trackEventAsync({
4022
+ SuperFundPrefillDeclined: detail
4023
+ });
4024
+ }
4025
+ async TrackSuperFundDetailChangeRequestedAsync(detail) {
4026
+ return this.trackEventAsync({
4027
+ SuperFundDetailChangeRequested: detail
4028
+ });
4029
+ }
4030
+ async TrackSuperCampaignActivationSucceededAsync(detail) {
4031
+ return this.trackEventAsync({
4032
+ SuperCampaignActivationSucceeded: detail
4033
+ });
4034
+ }
4035
+ async trackEventAsync(event) {
4036
+ try {
4037
+ await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
4038
+ }
4039
+ catch (_a) {
4040
+ return;
4041
+ }
4042
+ }
4043
+ }
4044
+
4045
+ class CustomFundChoiceApi {
4046
+ async submitDefaultFundChoiceAsync(dto) {
4047
+ return buildBackendApiClient()
4048
+ .url('super-choice/default')
4049
+ .post(dto)
4050
+ .badRequest(() => {
4051
+ throw new Error('Failed to process default fund join request');
4052
+ })
4053
+ .text();
4054
+ }
4055
+ async submitCustomFundChoiceAsync(dto) {
4056
+ return buildBackendApiClient()
4057
+ .url('super-choice/custom-fund')
4058
+ .post(dto)
4059
+ .badRequest(() => {
4060
+ throw new Error('Failed to process custom fund join request');
4061
+ })
4062
+ .text();
4063
+ }
4064
+ async submitSelfManagedFundChoiceAsync(dto) {
4065
+ return buildBackendApiClient()
4066
+ .url('super-choice/smsf')
4067
+ .post(dto)
4068
+ .badRequest(() => {
4069
+ throw new Error('Failed to process SMSF choice request');
4070
+ })
4071
+ .text();
4072
+ }
4073
+ async submitDefinedBenefitsChoiceAsync(dto) {
4074
+ return buildBackendApiClient()
4075
+ .url('super-choice/defined-benefits')
4076
+ .post(dto)
4077
+ .badRequest(() => {
4078
+ throw new Error('Failed to process Defined Benefits choice request');
4079
+ })
4080
+ .text();
4081
+ }
4082
+ async validateAbnForSMSF(abn) {
4083
+ const response = await buildBackendApiClient()
4084
+ .url(`super-choice/smsf/${abn}/validate`)
4085
+ .get()
4086
+ .badRequest(() => {
4087
+ throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4088
+ })
4089
+ .json();
4090
+ return response.result;
4091
+ }
4092
+ }
4093
+ const customFundChoiceApi = new CustomFundChoiceApi();
4094
+
4095
+ const DefaultFund = class {
4201
4096
  constructor(hostRef) {
4202
4097
  index.registerInstance(this, hostRef);
4203
4098
  this.defaultFundProductName = 'Loading fund...';
@@ -4416,466 +4311,6 @@ const SelectInputAsync = class {
4416
4311
  };
4417
4312
  SelectInputAsync.style = dropdownAsyncCss;
4418
4313
 
4419
- const name = 'Active Super';
4420
- const fund = {
4421
- fundId: 'active',
4422
- name,
4423
- logo: 'logo-active.svg',
4424
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4425
- features: [
4426
- index.h("p", null, "Winner of Canstar's 2023 Outstanding Value \u2013 Superannuation Award considering investment performance, fees and product features*"),
4427
- index.h("p", null, "Recognised as a leader in responsible investment"),
4428
- index.h("p", null, "Calls answered in 20 seconds (average over 5 years)")
4429
- ],
4430
- 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.")),
4431
- disclaimer: (index.h("p", null,
4432
- "Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at",
4433
- ' ',
4434
- index.h(Link, { onClick: () => pdsViewedAsync(name), href: "https://www.activesuper.com.au/pds" }, "activesuper.com.au"),
4435
- ' ',
4436
- "before making a decision.")),
4437
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4438
- dtoPropName: 'active'
4439
- };
4440
-
4441
- const name$1 = 'Australian Ethical';
4442
- const pdsUrl = 'https://www.australianethical.com.au/super/pds-forms/';
4443
- const fund$1 = {
4444
- fundId: 'australian-ethical',
4445
- name: name$1,
4446
- logo: 'logo-aus-eth.svg',
4447
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4448
- features: [
4449
- index.h("p", null,
4450
- "Fastest growing super fund in Australia",
4451
- index.h("sup", { class: "text-tiny" }, "1")),
4452
- index.h("p", null,
4453
- "Nil investments in fossil fuel companies",
4454
- index.h("sup", { class: "text-tiny" }, "2")),
4455
- index.h("p", null, "Competitive returns")
4456
- ],
4457
- featureSubText: (index.h("ol", { class: "list-decimal list-outside ml-3" },
4458
- index.h("li", null, "Source: KPMG Super Insights Report 2022."),
4459
- 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)."))),
4460
- disclaimer: (index.h("p", null,
4461
- "Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the",
4462
- ' ',
4463
- 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"),
4464
- ", the",
4465
- ' ',
4466
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Product Disclosure Statement"),
4467
- ' ',
4468
- "and",
4469
- ' ',
4470
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Target Market Determination"),
4471
- ' ',
4472
- "available on our",
4473
- ' ',
4474
- index.h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "website"),
4475
- ".")),
4476
- footnoteTextOverride: Option.none,
4477
- dtoPropName: 'australianEthical'
4478
- };
4479
-
4480
- const name$2 = 'Australian Retirement Trust';
4481
- const fund$2 = {
4482
- fundId: 'australian-retirement-trust',
4483
- name: name$2,
4484
- logo: 'logo-art.svg',
4485
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4486
- features: [
4487
- index.h("p", null, "$200 billion in retirement savings"),
4488
- index.h("p", null, "2+ million members"),
4489
- index.h("p", null, "A focus on delivering strong, long\u2011term returns")
4490
- ],
4491
- 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.")),
4492
- disclaimer: (index.h("p", null,
4493
- "You should consider the",
4494
- ' ',
4495
- 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"),
4496
- ' ',
4497
- "and",
4498
- ' ',
4499
- index.h(Link, { href: "https://www.australianretirementtrust.com.au/tmd" }, "Target Market Determination"),
4500
- ' ',
4501
- "before deciding to invest in or apply to become a member of this fund.")),
4502
- abnInfo: name$2,
4503
- abn: '60 905 115 063',
4504
- footnoteTextOverride: Option.none,
4505
- dtoPropName: 'australianRetirementTrust'
4506
- };
4507
-
4508
- const name$3 = 'Aware Super';
4509
- const fund$3 = {
4510
- fundId: 'aware',
4511
- name: name$3,
4512
- logo: 'logo-aware.svg',
4513
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4514
- features: [
4515
- index.h("p", null, "Awarded Canstar\u2019s Outstanding Value Super^ in 2022 and 2023."),
4516
- index.h("p", null,
4517
- "Over 1 million",
4518
- index.h("sup", { class: "text-tiny" }, "\u2021"),
4519
- " Australians trust us with their super."),
4520
- index.h("p", null, "Our super helpful app helps you stay in control of your super.")
4521
- ],
4522
- featureSubText: (index.h("div", { class: "space-y-0.5" },
4523
- index.h("p", null,
4524
- "^ See ",
4525
- index.h(Link, { href: "https://aware.com.au/awards" }, "aware.com.au/awards"),
4526
- " for more information"),
4527
- index.h("p", null,
4528
- index.h("sup", { class: "text-tiny" }, "\u2021"),
4529
- " Member numbers as of December 2023"))),
4530
- disclaimer: (index.h("p", null,
4531
- "You should consider the",
4532
- ' ',
4533
- 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"),
4534
- ' ',
4535
- "before deciding to invest in or apply to become a member of this fund.")),
4536
- abnInfo: `Aware Super Pty Ltd`,
4537
- abn: '53 226 460 365',
4538
- footnoteTextOverride: Option.none,
4539
- dtoPropName: 'aware'
4540
- };
4541
-
4542
- const name$4 = 'First Super';
4543
- const fund$4 = {
4544
- fundId: 'first-super',
4545
- name: name$4,
4546
- logo: 'logo-first.svg',
4547
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4548
- features: [
4549
- index.h("p", null, "Industry SuperFund that offers five investment options and default insurance"),
4550
- index.h("p", null, "Strong long-term investment returns and superior customer service - members first"),
4551
- index.h("p", null, "Established super fund \u2013 anyone can join including KiwiSaver members")
4552
- ],
4553
- disclaimer: (index.h("div", null,
4554
- index.h("p", null,
4555
- "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",
4556
- ' ',
4557
- index.h(Link, { onClick: () => pdsViewedAsync(name$4), href: "https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/" }, "website"),
4558
- ". Past performance is not a reliable indicator of future performance."),
4559
- index.h("br", null),
4560
- 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."))),
4561
- footnoteTextOverride: Option.none,
4562
- dtoPropName: 'firstSuper'
4563
- };
4564
-
4565
- const name$5 = 'HESTA';
4566
- const fund$5 = {
4567
- fundId: 'hesta-default',
4568
- name: name$5,
4569
- logo: 'logo-hesta.svg',
4570
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4571
- features: [
4572
- index.h("p", null, "A top-performing super fund* working for real-world impact"),
4573
- index.h("p", null, "1+ million members"),
4574
- index.h("p", null, "Expert help whenever you need it to help you face the future with confidence")
4575
- ],
4576
- featureSubText: undefined,
4577
- disclaimer: (index.h("div", { class: "space-y-2" },
4578
- index.h("p", { class: "italic" },
4579
- "* 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",
4580
- ' ',
4581
- index.h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
4582
- ' ',
4583
- "for more information."),
4584
- index.h("p", null,
4585
- "Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
4586
- ' ',
4587
- index.h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
4588
- ' ',
4589
- "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."),
4590
- index.h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
4591
- footnoteTextOverride: Option.none,
4592
- isPromotedDefault: true
4593
- };
4594
-
4595
- const name$6 = 'Mercer MyChoice';
4596
- const fund$6 = {
4597
- fundId: 'mercermychoice',
4598
- name: name$6,
4599
- logo: 'logo-mercer-mychoice.svg',
4600
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4601
- features: [
4602
- index.h("p", null, "Save more super with our low fees"),
4603
- index.h("p", null, "Take control with 6 MyChoice investment options"),
4604
- index.h("p", null, "Join 850,000 Australians who trust our global expertise")
4605
- ],
4606
- disclaimer: (index.h("div", null,
4607
- index.h("p", null,
4608
- "You should consider the",
4609
- ' ',
4610
- index.h(Link, { href: "https://www.mercersuper.com.au/campaign-page/mercer-mychoice", onClick: () => pdsViewedAsync(name$6) }, "Product Disclosure Statement"),
4611
- ' ',
4612
- "and",
4613
- ' ',
4614
- index.h(Link, { href: "https://www.mercersuper.com.au/documents/target-market-determinations" }, "Target Market Determination"),
4615
- ' ',
4616
- "before deciding to invest in or apply to become a member of the fund."),
4617
- index.h("br", null),
4618
- index.h("p", null, "Issued by Mercer Superannuation (Australia) Limited (\u2018Mercer Super\u2019) ABN: 79 004 717 533"))),
4619
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4620
- dtoPropName: 'mercerMyChoice',
4621
- 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"))
4622
- };
4623
-
4624
- const name$7 = 'REI Super';
4625
- const fund$7 = {
4626
- fundId: 'reisuper',
4627
- name: name$7,
4628
- logo: 'logo-rei.svg',
4629
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4630
- features: [
4631
- index.h("p", null, "Built by and for the real estate industry"),
4632
- index.h("p", null, "Consistent long-term performance with competitive fees*"),
4633
- index.h("p", null, "All profits to members, not shareholders")
4634
- ],
4635
- disclaimer: (index.h("div", { class: "space-y-2" },
4636
- index.h("p", null, "*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),
4637
- index.h("p", null,
4638
- "You should consider the",
4639
- ' ',
4640
- 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"),
4641
- ' ',
4642
- "and",
4643
- ' ',
4644
- 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"),
4645
- ' ',
4646
- "before deciding to invest in or apply to become a member of the fund."))),
4647
- abnInfo: `REI Superannuation Fund Pty Ltd`,
4648
- abn: '68 056 044 770',
4649
- footnoteTextOverride: Option.none,
4650
- dtoPropName: 'reisuper'
4651
- };
4652
-
4653
- const name$8 = 'Slate Super';
4654
- const slateUsi = '32367272075001';
4655
- const fund$8 = {
4656
- fundId: 'slate',
4657
- name: name$8,
4658
- logo: 'logo-slate.png',
4659
- route: SuperSelectionAppRoutes.SlateJoin,
4660
- features: [
4661
- index.h("p", null, "A lifestage investment strategy that evolves with you"),
4662
- index.h("p", null, "Advanced mobile app with retirement forecast and smart features"),
4663
- index.h("p", null, "Member advocates at Slate to assist with your account")
4664
- ],
4665
- disclaimer: (index.h("p", { class: "small text-muted" },
4666
- "You should consider the",
4667
- ' ',
4668
- index.h(Link, { href: "https://slate.co/pds/?utm_source=flare&utm_medium=superselection", onClick: () => pdsViewedAsync(name$8, slateUsi) }, "Product Disclosure Statement"),
4669
- ' ',
4670
- "and",
4671
- ' ',
4672
- index.h(Link, { href: "https://slate.co/forms-and-documents/target-market-determination/" }, "Target Market Determination"),
4673
- ' ',
4674
- "before deciding to invest in or apply to become a member of the fund.")),
4675
- abnInfo: `Diversa Trustees Limited`,
4676
- abn: '49 006 421 638',
4677
- footnoteTextOverride: Option.none,
4678
- dtoPropName: 'slate'
4679
- };
4680
-
4681
- const name$9 = 'Spirit Super';
4682
- const fund$9 = {
4683
- fundId: 'spirit',
4684
- name: name$9,
4685
- logo: 'logo-spirit.svg',
4686
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4687
- features: [
4688
- index.h("p", null, "Proud Industry SuperFund - all profits go back to members"),
4689
- index.h("p", null,
4690
- "Best customer experience in super",
4691
- index.h("sup", { class: "text-tiny" }, "1"),
4692
- " and best for value",
4693
- index.h("sup", { class: "text-tiny" }, "2")),
4694
- index.h("p", null,
4695
- "Low fees",
4696
- index.h("sup", { class: "text-tiny" }, "3"),
4697
- " with a focus on strong returns and investing with impact in communities",
4698
- index.h("sup", { class: "text-tiny" }, "4"))
4699
- ],
4700
- featureSubText: (index.h("div", { class: "m-4 pt-2" },
4701
- index.h("ol", { class: "list-decimal space-y-2" },
4702
- index.h("li", null,
4703
- index.h("span", null, "CSBA SenseCX Benchmark 2021-22")),
4704
- index.h("li", null,
4705
- index.h("span", null, "Awarded Best for Value in the WeMoney Superannuation Awards 2022")),
4706
- index.h("li", null,
4707
- index.h("span", null, "Just $67.60 + 0.15% pa admin fees, capped at $517.60")),
4708
- index.h("li", null,
4709
- index.h("span", null, "Rainmaker ESG Leader Rating 2022"))))),
4710
- disclaimer: (index.h("p", null,
4711
- "Past performance isn\u2019t a reliable indicator of future performance. Consider the PDS and TMD at",
4712
- ' ',
4713
- index.h(Link, { href: "https://www.spiritsuper.com.au/pds", onClick: () => pdsViewedAsync(name$9) }, "www.spiritsuper.com.au/pds"),
4714
- ' ',
4715
- "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).")),
4716
- footnoteTextOverride: Option.none,
4717
- dtoPropName: 'spirit'
4718
- };
4719
-
4720
- const name$a = 'Unisuper';
4721
- const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4722
- const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4723
- const fund$a = {
4724
- fundId: 'unisuper-default',
4725
- name: name$a,
4726
- logo: 'logo-unisuper.svg',
4727
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4728
- features: [
4729
- index.h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4730
- index.h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4731
- index.h("p", null,
4732
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4733
- index.h("sup", { class: "text-tiny" }, "#"))
4734
- ],
4735
- disclaimer: (index.h("div", { class: "space-y-2" },
4736
- index.h("p", null,
4737
- "^Read more about our fees and how we compare",
4738
- ' ',
4739
- index.h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4740
- "."),
4741
- index.h("p", null,
4742
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4743
- ' ',
4744
- index.h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4745
- "."),
4746
- index.h("p", null,
4747
- index.h("sup", { class: "text-tiny" }, "#"),
4748
- "See our awards",
4749
- ' ',
4750
- index.h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4751
- "."),
4752
- index.h("p", null,
4753
- "Remember to consider the",
4754
- ' ',
4755
- index.h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$a) }, "Product Disclosure Statement"),
4756
- ' ',
4757
- "and ",
4758
- index.h(Link, { href: tmdUrl }, "Target Market Determination"),
4759
- " that is relevant to you."),
4760
- index.h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4761
- footnoteTextOverride: Option.none,
4762
- isPromotedDefault: true
4763
- };
4764
-
4765
- const name$b = 'Unisuper';
4766
- const pdsUrl$2 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4767
- const tmdUrl$1 = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4768
- const fund$b = {
4769
- fundId: 'unisuper-default-v2',
4770
- name: name$b,
4771
- logo: 'logo-unisuper.svg',
4772
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4773
- features: [
4774
- index.h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4775
- index.h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4776
- index.h("p", null,
4777
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4778
- index.h("sup", { class: "text-tiny" }, "#"))
4779
- ],
4780
- customContent: (index.h("div", { class: "mt-6 flex gap-3" },
4781
- index.h("div", null,
4782
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge1.svg`) })),
4783
- index.h("div", null,
4784
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge2.svg`) })),
4785
- index.h("div", null,
4786
- index.h("img", { alt: name$b, src: index.getAssetPath(`assets/unisuper-default-badge3.svg`) })))),
4787
- disclaimer: (index.h("div", { class: "space-y-2" },
4788
- index.h("p", null,
4789
- "^Read more about our fees and how we compare",
4790
- ' ',
4791
- index.h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4792
- "."),
4793
- index.h("p", null,
4794
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4795
- ' ',
4796
- index.h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4797
- "."),
4798
- index.h("p", null,
4799
- index.h("sup", { class: "text-tiny" }, "#"),
4800
- "See our awards",
4801
- ' ',
4802
- index.h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4803
- "."),
4804
- index.h("p", null,
4805
- "Remember to consider the",
4806
- ' ',
4807
- index.h(Link, { href: pdsUrl$2, onClick: () => pdsViewedAsync(name$b) }, "Product Disclosure Statement"),
4808
- ' ',
4809
- "and ",
4810
- index.h(Link, { href: tmdUrl$1 }, "Target Market Determination"),
4811
- " that is relevant to you."),
4812
- index.h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4813
- footnoteTextOverride: Option.none,
4814
- isPromotedDefault: true
4815
- };
4816
-
4817
- const name$c = 'Virgin Money Super';
4818
- const fund$c = {
4819
- fundId: 'virgin',
4820
- name: name$c,
4821
- logo: 'logo-virgin.svg',
4822
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4823
- features: [
4824
- index.h("p", null,
4825
- "Returns above industry and retail super fund medians over the past 5 years",
4826
- index.h("sup", { class: "text-tiny" }, "1")),
4827
- index.h("p", null, "One of the lowest fees in the market"),
4828
- index.h("p", null,
4829
- "Virgin Money rewards you with Velocity Points on your contributions",
4830
- index.h("sup", { class: "text-tiny" }, "2"))
4831
- ],
4832
- featureSubText: (index.h("div", { class: "m-4 pt-2" },
4833
- index.h("ol", { class: "list-decimal space-y-2" },
4834
- index.h("li", null,
4835
- index.h("span", null, "Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),
4836
- index.h("li", null,
4837
- index.h("span", null,
4838
- 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")))))),
4839
- disclaimer: (index.h("p", null,
4840
- "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",
4841
- ' ',
4842
- index.h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$c) }, "www.virginmoney.com.au"),
4843
- ' ',
4844
- "before making a decision")),
4845
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4846
- dtoPropName: 'virgin',
4847
- 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"))
4848
- };
4849
-
4850
- const fundsById = {
4851
- [fund$8.fundId]: fund$8,
4852
- [fund$2.fundId]: fund$2,
4853
- [fund$3.fundId]: fund$3,
4854
- [fund.fundId]: fund,
4855
- [fund$1.fundId]: fund$1,
4856
- [fund$c.fundId]: fund$c,
4857
- [fund$9.fundId]: fund$9,
4858
- [fund$4.fundId]: fund$4,
4859
- [fund$6.fundId]: fund$6,
4860
- [fund$5.fundId]: fund$5,
4861
- [fund$a.fundId]: fund$a,
4862
- [fund$b.fundId]: fund$b,
4863
- [fund$7.fundId]: fund$7
4864
- };
4865
- const allPromotedFunds = Object.values(fundsById);
4866
- const getFundByDtoPropName = (dtoPropName) => {
4867
- const fund = allPromotedFunds.find((f) => f.dtoPropName == dtoPropName);
4868
- return fund ? some(fund) : none;
4869
- };
4870
- const getFundByFundId = (fundId) => {
4871
- const fund = allPromotedFunds.find((f) => f.fundId == fundId);
4872
- return fund ? some(fund) : none;
4873
- };
4874
- const getFundNameByFundId = (fundId) => fundsById[fundId] != undefined ? some(fundsById[fundId].name) : none;
4875
- 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; };
4876
- const getFundUsiByFundId = (fundId) => fundId == fund$8.fundId ? some(slateUsi) : none;
4877
- const getLogoSrcByFundId = (fundId) => fundsById[fundId] != undefined ? some(index.getAssetPath(`assets/${fundsById[fundId].logo}`)) : none;
4878
-
4879
4314
  class ExistingFundService {
4880
4315
  async GetExistingFundAsync() {
4881
4316
  var _a;
@@ -4890,15 +4325,13 @@ class ExistingFundService {
4890
4325
  const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
4891
4326
  switch (choiceDetails.kind) {
4892
4327
  case 'Promoted': {
4893
- const fund = choiceDetails.promoted['generic']
4894
- ? getFundByFundId(choiceDetails.promoted['generic'].fundId)
4895
- : getFundByDtoPropName(Object.keys(choiceDetails.promoted)[0]);
4896
- if (isNone(fund))
4328
+ if (isNone(usi))
4897
4329
  return none;
4330
+ const fund = await this.getFundByUsiAsync(usi.value);
4898
4331
  return some({
4899
4332
  type: 'Promoted Fund',
4900
- id: fund.value.fundId,
4901
- name: fund.value.name,
4333
+ id: getPromotedFundId(choiceDetails.promoted),
4334
+ name: isSome(fund) ? fund.value.productName : usi.value,
4902
4335
  usi: usi,
4903
4336
  valid: 'Active',
4904
4337
  memberNumber: memberNumber,
@@ -5032,14 +4465,12 @@ const ExistingChoice = class {
5032
4465
  this.existingFund = chosenFundOption.value;
5033
4466
  }
5034
4467
  else {
5035
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4468
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5036
4469
  }
5037
4470
  }
5038
4471
  render() {
5039
- const PromotedFundView = (props) => {
5040
- const logo = getLogoSrcByFundId(props.id);
5041
- const fundName = getFundNameByFundId(props.id);
5042
- 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 })));
4472
+ const PromotedFundView = (_props) => {
4473
+ return (index.h("div", { class: "flex justify-center" }));
5043
4474
  };
5044
4475
  const MyOwnFundView = () => {
5045
4476
  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" })))));
@@ -5060,7 +4491,7 @@ const ExistingChoice = class {
5060
4491
  switch (this.existingFund.type) {
5061
4492
  case 'Promoted Fund':
5062
4493
  case 'Promoted Default Fund':
5063
- return index.h(PromotedFundView, { id: this.existingFund.id });
4494
+ return index.h(PromotedFundView, { name: this.existingFund.name });
5064
4495
  case 'Self Managed Fund':
5065
4496
  return index.h(SelfManagedFundView, null);
5066
4497
  case 'My Own Fund':
@@ -5097,7 +4528,7 @@ const ExistingChoice = class {
5097
4528
  async handleFundNominationDeclined() {
5098
4529
  const detail = this.createSuperFundNominationDetail(this.existingFund);
5099
4530
  await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
5100
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4531
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5101
4532
  }
5102
4533
  };
5103
4534
 
@@ -5105,7 +4536,7 @@ const DefaultFooterText = 'Powered by Flare';
5105
4536
  const FooterSection = class {
5106
4537
  constructor(hostRef) {
5107
4538
  index.registerInstance(this, hostRef);
5108
- this.footerText = () => Option.isSome(this.textOverride) ? this.textOverride.value : DefaultFooterText;
4539
+ this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
5109
4540
  }
5110
4541
  render() {
5111
4542
  return (index.h("div", { class: {
@@ -5141,27 +4572,6 @@ const HeaderSection = class {
5141
4572
  }
5142
4573
  };
5143
4574
 
5144
- const IFrameHost = class {
5145
- constructor(hostRef) {
5146
- index.registerInstance(this, hostRef);
5147
- }
5148
- componentDidLoad() {
5149
- this.build(this.iframeElement);
5150
- }
5151
- render() {
5152
- return (index.h("div", { class: "w-screen" }, index.h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
5153
- }
5154
- };
5155
-
5156
- const LoadingComponent = class {
5157
- constructor(hostRef) {
5158
- index.registerInstance(this, hostRef);
5159
- }
5160
- render() {
5161
- 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)));
5162
- }
5163
- };
5164
-
5165
4575
  const LoadingIndicator = class {
5166
4576
  constructor(hostRef) {
5167
4577
  index.registerInstance(this, hostRef);
@@ -5182,15 +4592,6 @@ const LoadingPage = class {
5182
4592
  }
5183
4593
  };
5184
4594
 
5185
- const LoadingComponent$1 = class {
5186
- constructor(hostRef) {
5187
- index.registerInstance(this, hostRef);
5188
- }
5189
- render() {
5190
- 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.")));
5191
- }
5192
- };
5193
-
5194
4595
  const MyOwnFund = class {
5195
4596
  constructor(hostRef) {
5196
4597
  index.registerInstance(this, hostRef);
@@ -5208,8 +4609,8 @@ const MyOwnFund = class {
5208
4609
  const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
5209
4610
  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: {
5210
4611
  'was-validated': this.formState === 'validated'
5211
- }, 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) => {
5212
- state$2.myOwnFundForm = Object.assign(Object.assign({}, state$2.myOwnFundForm), event.detail);
4612
+ }, 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) => {
4613
+ state$1.myOwnFundForm = Object.assign(Object.assign({}, state$1.myOwnFundForm), event.detail);
5213
4614
  this.isNotAllInformationProvidedMessageVisible = false;
5214
4615
  } }), 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:
5215
4616
  // user clicks on disabled button (div wrapper) then validation errors will show
@@ -5220,25 +4621,25 @@ const MyOwnFund = class {
5220
4621
  if (!this.formElement.checkValidity()) {
5221
4622
  return;
5222
4623
  }
5223
- const isAllInformationProvided = isSome(state$2.myOwnFundForm.fundUsi) &&
5224
- isSome(state$2.myOwnFundForm.memberNumber) &&
5225
- isSome(state$2.myOwnFundForm.memberFirstName) &&
5226
- isSome(state$2.myOwnFundForm.memberFamilyName);
4624
+ const isAllInformationProvided = isSome(state$1.myOwnFundForm.fundUsi) &&
4625
+ isSome(state$1.myOwnFundForm.memberNumber) &&
4626
+ isSome(state$1.myOwnFundForm.memberFirstName) &&
4627
+ isSome(state$1.myOwnFundForm.memberFamilyName);
5227
4628
  if (!isAllInformationProvided) {
5228
4629
  this.isNotAllInformationProvidedMessageVisible = true;
5229
4630
  return;
5230
4631
  }
5231
4632
  navigationService.navigateInternallyToStandardChoice({
5232
4633
  history: this.history,
5233
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
4634
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
5234
4635
  fundDetails: {
5235
4636
  type: 'myOwnFund',
5236
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
5237
- fundUsi: this.getOrError(state$2.myOwnFundForm.fundUsi),
5238
- memberNumber: this.getOrError(state$2.myOwnFundForm.memberNumber)
4637
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
4638
+ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi),
4639
+ memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber)
5239
4640
  },
5240
4641
  handleSubmitFn: async (standardChoiceFormSignature) => {
5241
- 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);
4642
+ 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);
5242
4643
  await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
5243
4644
  }
5244
4645
  });
@@ -5289,7 +4690,7 @@ const MyOwnFundInputs = class {
5289
4690
  'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
5290
4691
  'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5291
4692
  .showValidationErrors
5292
- }, 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()) }))))));
4693
+ }, 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()) }))))));
5293
4694
  }
5294
4695
  updateFund(fund) {
5295
4696
  this.formChanged.emit({ fundUsi: some(fund.value), fundName: some(fund.label) });
@@ -5391,7 +4792,7 @@ const Prefill = class {
5391
4792
  return this.renderInvalidSMSF(this.prefill.data);
5392
4793
  }
5393
4794
  }
5394
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4795
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5395
4796
  return null;
5396
4797
  }
5397
4798
  renderMyOwnFund(data) {
@@ -5786,8 +5187,8 @@ const PrefillInvalidMyOwnFund = class {
5786
5187
  }
5787
5188
  else {
5788
5189
  // If prefill does not exist, or is valid we should
5789
- // not have landed on this page, navigate to consent page
5790
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5190
+ // not have landed on this page, navigate to choice page
5191
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5791
5192
  }
5792
5193
  }
5793
5194
  render() {
@@ -5798,7 +5199,7 @@ const PrefillInvalidMyOwnFund = class {
5798
5199
  async handleChooseAnotherFund() {
5799
5200
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5800
5201
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5801
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5202
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5802
5203
  }
5803
5204
  };
5804
5205
 
@@ -5833,7 +5234,7 @@ const PrefillInvalidSMSF = class {
5833
5234
  }
5834
5235
  else {
5835
5236
  // If prefill does not exist, or is valid we should
5836
- // not have landed on this page, navigate to consent page
5237
+ // not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
5837
5238
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5838
5239
  }
5839
5240
  }
@@ -5861,7 +5262,7 @@ const PrefillInvalidSMSF = class {
5861
5262
  async handleFundNominationDeclined() {
5862
5263
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5863
5264
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5864
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5265
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5865
5266
  }
5866
5267
  };
5867
5268
 
@@ -5901,8 +5302,8 @@ const PrefillMyOwnFund = class {
5901
5302
  }
5902
5303
  else {
5903
5304
  // If prefill does not exist, or is invalid we should
5904
- // not have landed on this page, navigate to consent page
5905
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5305
+ // not have landed on this page, navigate to choice page
5306
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5906
5307
  }
5907
5308
  }
5908
5309
  render() {
@@ -5983,7 +5384,7 @@ const PrefillMyOwnFund = class {
5983
5384
  async handleFundNominationDeclined() {
5984
5385
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5985
5386
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5986
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5387
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5987
5388
  }
5988
5389
  };
5989
5390
 
@@ -6133,8 +5534,8 @@ const PrefillSMSF = class {
6133
5534
  }
6134
5535
  else {
6135
5536
  // If prefill does not exist, or is invalid we should
6136
- // not have landed on this page, navigate to consent page
6137
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5537
+ // not have landed on this page, navigate to PrefillInvalidSMSFPage page
5538
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
6138
5539
  }
6139
5540
  }
6140
5541
  render() {
@@ -6340,7 +5741,7 @@ const PrefillSMSF = class {
6340
5741
  async handleFundNominationDeclined() {
6341
5742
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
6342
5743
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
6343
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5744
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6344
5745
  }
6345
5746
  };
6346
5747
 
@@ -6356,157 +5757,320 @@ const PrefillWarningBox = class {
6356
5757
  }
6357
5758
  };
6358
5759
 
6359
- class PromotedFundChoiceApi {
6360
- async submitChoiceAsync(dto) {
6361
- return buildBackendApiClient()
6362
- .url('super-choice/promoted-fund')
6363
- .post(dto)
6364
- .badRequest(() => {
6365
- throw new Error('Failed to process Promoted Fund choice request');
6366
- })
6367
- .text();
6368
- }
6369
- async submitDefaultChoiceAsync(dto) {
6370
- return buildBackendApiClient()
6371
- .url('super-choice/promoted-fund/default')
6372
- .post(dto)
6373
- .badRequest(() => {
6374
- throw new Error('Failed to process Promoted Default Fund choice request');
6375
- })
6376
- .text();
6377
- }
6378
- async submitDefaultChoiceWithJoinAsync(dto) {
6379
- return buildBackendApiClient()
6380
- .url('super-choice/promoted-fund/default-with-join')
6381
- .post(dto)
6382
- .badRequest(() => {
6383
- throw new Error('Failed to process Promoted Default Fund With Join choice request');
6384
- })
6385
- .text();
5760
+ function validateAbn(abn) {
5761
+ const digitArray = abn.split('').map(Number);
5762
+ const isAllDigits = digitArray.every((d) => !isNaN(d));
5763
+ const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
5764
+ if (!isAllDigits || digitArray.length !== weightingFactors.length) {
5765
+ return false;
6386
5766
  }
5767
+ digitArray[0]--;
5768
+ const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
5769
+ return sum % 89 === 0;
6387
5770
  }
6388
- const promotedFundChoiceApi = new PromotedFundChoiceApi();
6389
5771
 
6390
- class PromotedFundJoinV1IFrameBuilder {
6391
- constructor() {
6392
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
6393
- this.environmentDiscriminator = () => {
6394
- return this.hostIsLocalSuperSelection()
6395
- ? 'autodev-partner'
6396
- : window.location.hostname.toLowerCase().split('.')[0];
6397
- };
6398
- this.promotedFundJoinAppUrl = () => {
6399
- return `https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`;
6400
- };
6401
- }
6402
- build(iframe$1, history) {
6403
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
6404
- return;
6405
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt });
6406
- const handleMessage = (event) => {
6407
- const { data } = event;
6408
- if (!data) {
6409
- return;
6410
- }
6411
- if (data.sender === 'promoted-fund-redirect') {
6412
- window.removeEventListener('message', handleMessage);
6413
- switch (data.type) {
6414
- case 'cancel':
6415
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6416
- break;
6417
- case 'success':
6418
- if (data.memberNumber) {
6419
- const promotedFundId = state.fund.id;
6420
- const fundName = _function.pipe(getFundNameByFundId(promotedFundId), Option.getOrElse(() => ''));
6421
- const usi = data.usi.replace(/ /g, '');
6422
- navigationService.navigateInternallyToStandardChoice({
6423
- history,
6424
- fundName,
6425
- fundDetails: {
6426
- type: 'promoted',
6427
- fundName,
6428
- fundUsi: usi,
6429
- memberNumber: data.memberNumber,
6430
- promotedFundId
6431
- },
6432
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
6433
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
6434
- promotedFundId
6435
- });
6436
- break;
6437
- }
6438
- /* falls through */
6439
- default:
6440
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6441
- break;
6442
- }
6443
- reset();
6444
- return;
6445
- }
6446
- if (data.sender === 'promoted-fund-join') {
6447
- switch (data.type) {
6448
- case 'contentResized':
6449
- iframe$1.height = data.height > 0 ? data.height : iframe$1.height;
6450
- iframe$1.width = data.width > 0 ? data.width : iframe$1.width;
6451
- break;
6452
- case 'pageNavigated':
6453
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
6454
- iframe.navigation(window.location.href);
6455
- break;
5772
+ const SelfManagedFund = class {
5773
+ constructor(hostRef) {
5774
+ index.registerInstance(this, hostRef);
5775
+ this.isSubmitDisabled = true;
5776
+ this.isAbnValid = validateAbn(state$1.selfManagedFundForm.fundAbn);
5777
+ this.eventTrackingService = EventTrackingService.Instance;
5778
+ this.success = () => {
5779
+ navigationService.navigateInternallyToStandardChoice({
5780
+ history: this.history,
5781
+ fundName: 'Self-managed super fund',
5782
+ fundDetails: {
5783
+ type: 'smsf',
5784
+ fundName: state$1.selfManagedFundForm.fundName,
5785
+ fundEsa: state$1.selfManagedFundForm.fundEsa
5786
+ },
5787
+ handleSubmitFn: async (standardChoiceFormSignature) => {
5788
+ const requestDto = Object.assign({ smsfChoice: {
5789
+ abn: state$1.selfManagedFundForm.fundAbn,
5790
+ fundName: state$1.selfManagedFundForm.fundName,
5791
+ fundAddress: {
5792
+ addressLine1: state$1.selfManagedFundForm.addressLine1,
5793
+ addressLine2: state$1.selfManagedFundForm.addressLine2,
5794
+ city: state$1.selfManagedFundForm.city,
5795
+ state: state$1.selfManagedFundForm.state,
5796
+ postcode: state$1.selfManagedFundForm.postcode
5797
+ },
5798
+ bsb: state$1.selfManagedFundForm.bsb,
5799
+ bankAccountName: state$1.selfManagedFundForm.bankAccountName,
5800
+ bankAccountNumber: state$1.selfManagedFundForm.bankAccountNumber,
5801
+ electronicServiceAddress: state$1.selfManagedFundForm.fundEsa,
5802
+ memberFirstName: state$1.selfManagedFundForm.memberFirstName,
5803
+ memberFamilyName: state$1.selfManagedFundForm.memberFamilyName
5804
+ }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5805
+ await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
6456
5806
  }
6457
- }
5807
+ });
5808
+ };
5809
+ }
5810
+ componentDidLoad() {
5811
+ this.updateIsSubmitDisabled();
5812
+ return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
5813
+ promotedFundsShown: superSelectionAppService.promotedFunds,
5814
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
5815
+ });
5816
+ }
5817
+ render() {
5818
+ 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: {
5819
+ 'was-validated': this.formState === 'validated'
5820
+ }, 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) => {
5821
+ state$1.selfManagedFundForm = Object.assign(Object.assign({}, state$1.selfManagedFundForm), event.detail);
5822
+ if (event.detail.isAbnValid !== undefined)
5823
+ this.isAbnValid = event.detail.isAbnValid;
5824
+ this.updateIsSubmitDisabled();
5825
+ } })), 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:
5826
+ // user clicks on disabled button (div wrapper) then validation errors will show
5827
+ () => (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")))))))));
5828
+ }
5829
+ updateIsSubmitDisabled() {
5830
+ this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
5831
+ }
5832
+ async handleSubmitForm() {
5833
+ this.formState = 'validated';
5834
+ if (this.formElement.checkValidity())
5835
+ this.success();
5836
+ }
5837
+ };
5838
+ injectHistory(SelfManagedFund);
5839
+
5840
+ var AbnValidationStatus;
5841
+ (function (AbnValidationStatus) {
5842
+ AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
5843
+ AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
5844
+ AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
5845
+ })(AbnValidationStatus || (AbnValidationStatus = {}));
5846
+ const SelfManagedFundInputs = class {
5847
+ constructor(hostRef) {
5848
+ index.registerInstance(this, hostRef);
5849
+ this.formChanged = index.createEvent(this, "formChanged", 7);
5850
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5851
+ this.isAbnTouched = false;
5852
+ this.currentBank = none;
5853
+ this.addressErrorMessage = none;
5854
+ this.stateOptions = [
5855
+ { value: 'NSW', label: 'NSW' },
5856
+ { value: 'QLD', label: 'QLD' },
5857
+ { value: 'ACT', label: 'ACT' },
5858
+ { value: 'VIC', label: 'VIC' },
5859
+ { value: 'TAS', label: 'TAS' },
5860
+ { value: 'WA', label: 'WA' },
5861
+ { value: 'SA', label: 'SA' },
5862
+ { value: 'NT', label: 'NT' }
5863
+ ];
5864
+ this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
5865
+ this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
5866
+ }
5867
+ render() {
5868
+ const inputClass = {
5869
+ '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,
5870
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5871
+ .showValidationErrors
6458
5872
  };
6459
- window.addEventListener('message', handleMessage);
6460
- const iframeDoc = iframe$1.contentDocument;
6461
- iframeDoc.open();
6462
- const form = iframeDoc.createElement('form');
6463
- form.method = 'POST';
6464
- form.target = '_self';
6465
- form.action = this.promotedFundJoinAppUrl();
6466
- let prop;
6467
- for (prop in postData) {
6468
- const value = postData[prop];
6469
- if (value !== undefined) {
6470
- const input = document.createElement('input');
6471
- input.type = 'hidden';
6472
- input.name = prop;
6473
- input.value = value;
6474
- form.append(input);
5873
+ 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) => {
5874
+ const abnInput = ev.target;
5875
+ this.updateFormField('fundAbn', abnInput.value.trim());
5876
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5877
+ if (validateAbn(abnInput.value)) {
5878
+ const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
5879
+ this.abnValidationStatus = isAbnUsedForRegulatedFund
5880
+ ? AbnValidationStatus.AbnIsUsedForRegulatedFund
5881
+ : AbnValidationStatus.Valid;
5882
+ }
5883
+ // We need to set a custom validity message to trigger css invalid styles for non valid cases
5884
+ const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
5885
+ ? ''
5886
+ : 'Enter a valid fund ABN (digits only)';
5887
+ abnInput.setCustomValidity(validityMessage);
5888
+ this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
5889
+ }, 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) => {
5890
+ this.updateFormField('addressLine1', ev.target.value.trim());
5891
+ this.updateAddressErrorMessage();
5892
+ }, 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) => {
5893
+ this.updateFormField('city', ev.target.value.trim());
5894
+ this.updateAddressErrorMessage();
5895
+ }, 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) => {
5896
+ this.updateFormField('postcode', ev.target.value.trim());
5897
+ this.updateAddressErrorMessage();
5898
+ }, 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) => {
5899
+ this.updateFormField('state', ev.target.value.trim());
5900
+ this.updateAddressErrorMessage();
5901
+ }, 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")))));
5902
+ }
5903
+ updateFormField(key, value) {
5904
+ this.formChanged.emit({ [key]: value });
5905
+ }
5906
+ async isAbnUsedForRegulatedAsync(abn) {
5907
+ return !(await customFundChoiceApi.validateAbnForSMSF(abn));
5908
+ }
5909
+ renderAbnValidationError() {
5910
+ if (this.isAbnTouched || this.showValidationErrors) {
5911
+ switch (this.abnValidationStatus) {
5912
+ case AbnValidationStatus.Invalid:
5913
+ return index.h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
5914
+ case AbnValidationStatus.AbnIsUsedForRegulatedFund:
5915
+ return (index.h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
5916
+ case AbnValidationStatus.Valid:
5917
+ return [];
6475
5918
  }
6476
5919
  }
6477
- iframeDoc.appendChild(form);
6478
- iframeDoc.close();
6479
- form.submit();
5920
+ return [];
6480
5921
  }
6481
- getMemberData() {
6482
- var _a, _b;
6483
- const superBuyer = superSelectionAppService.superBuyer;
6484
- return {
6485
- title: superBuyer.userProfile.title,
6486
- firstName: superBuyer.userProfile.firstName,
6487
- middleName: superBuyer.userProfile.middleName,
6488
- lastName: superBuyer.userProfile.lastName,
6489
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
6490
- gender: superBuyer.userProfile.gender,
6491
- email: superBuyer.userProfile.email,
6492
- mobilePhone: superBuyer.userProfile.mobilePhone,
6493
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
6494
- addressLine1: superBuyer.userProfile.address.addressLine1,
6495
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
6496
- city: superBuyer.userProfile.address.city,
6497
- state: superBuyer.userProfile.address.state,
6498
- postCode: superBuyer.userProfile.address.postcode
5922
+ filterDigits(str) {
5923
+ return str.replace(/[^0-9]/g, '');
5924
+ }
5925
+ updateCurrentBank(ev) {
5926
+ const value = this.filterDigits(ev.target.value);
5927
+ const firstTwoNumbers = value.substring(0, 2);
5928
+ const firstThreeNumbers = value.substring(0, 3);
5929
+ const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
5930
+ const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
5931
+ if (firstTwoNumberBankName)
5932
+ this.currentBank = some(firstTwoNumberBankName);
5933
+ if (firstThreeNumberBankName)
5934
+ this.currentBank = some(firstThreeNumberBankName);
5935
+ if (value === '' || value.length > 6)
5936
+ this.currentBank = none;
5937
+ this.updateFormField('bsb', value);
5938
+ }
5939
+ updateCurrentBankAccountNumber(ev) {
5940
+ const value = this.filterDigits(ev.target.value);
5941
+ this.updateFormField('bankAccountNumber', value);
5942
+ }
5943
+ updateAddressErrorMessage() {
5944
+ let message = none;
5945
+ if (isNone(message) && !this.addressLine1Element.checkValidity()) {
5946
+ message = some('Enter a valid address line 1');
5947
+ }
5948
+ if (isNone(message) && !this.cityElement.checkValidity()) {
5949
+ message = some('Enter a valid city/suburb');
5950
+ }
5951
+ if (isNone(message) && !this.postcodeElement.checkValidity()) {
5952
+ message = some('Enter a valid post code');
5953
+ }
5954
+ if (isNone(message) && !this.stateElement.checkValidity()) {
5955
+ message = some('Select a state');
5956
+ }
5957
+ this.addressErrorMessage = message;
5958
+ }
5959
+ };
5960
+
5961
+ const StandardChoiceFormInputDefaultFund = class {
5962
+ constructor(hostRef) {
5963
+ index.registerInstance(this, hostRef);
5964
+ this.standardChoiceFormSignature = '';
5965
+ this.isSubmitDisabled = true;
5966
+ this.eventTrackingService = EventTrackingService.Instance;
5967
+ this.ignorePopState = () => window.history.pushState(null, '', null);
5968
+ }
5969
+ connectedCallback() {
5970
+ this.ignorePopState();
5971
+ window.addEventListener('popstate', this.ignorePopState);
5972
+ }
5973
+ disconnectedCallback() {
5974
+ window.removeEventListener('popstate', this.ignorePopState);
5975
+ }
5976
+ render() {
5977
+ 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 () => {
5978
+ await this.trackChangeRequestedAsync();
5979
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5980
+ } }, "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: {
5981
+ 'mt-3': true,
5982
+ 'was-validated': this.formState === 'validated'
5983
+ }, 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: {
5984
+ '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,
5985
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
5986
+ }, 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"))))))));
5987
+ }
5988
+ // TODO: fetch external promoted fund logo
5989
+ renderLogo() {
5990
+ return;
5991
+ // if (standardChoiceFormState.promotedFundId == undefined) return;
5992
+ // const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
5993
+ // if (isSome(logoSource)) {
5994
+ // return (
5995
+ // <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">
5996
+ // <img
5997
+ // class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
5998
+ // alt={standardChoiceFormState.fundName}
5999
+ // src={logoSource.value}
6000
+ // />
6001
+ // </div>
6002
+ // );
6003
+ // }
6004
+ }
6005
+ async trackChangeRequestedAsync() {
6006
+ const common = {
6007
+ promotedFundsShown: superSelectionAppService.promotedFunds,
6008
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
6499
6009
  };
6010
+ switch (state.fundDetails.type) {
6011
+ case 'default':
6012
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6013
+ DefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6014
+ });
6015
+ break;
6016
+ case 'myOwnFund':
6017
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6018
+ MyOwnFund: Object.assign(Object.assign({}, state.fundDetails), common)
6019
+ });
6020
+ break;
6021
+ case 'smsf':
6022
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6023
+ Smsf: Object.assign(Object.assign({}, state.fundDetails), common)
6024
+ });
6025
+ break;
6026
+ case 'promoted':
6027
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6028
+ PromotedFund: Object.assign(Object.assign({}, state.fundDetails), common)
6029
+ });
6030
+ break;
6031
+ case 'promotedDefault':
6032
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6033
+ PromotedDefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6034
+ });
6035
+ break;
6036
+ case 'promotedDefaultWithJoin':
6037
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6038
+ PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state.fundDetails), common)
6039
+ });
6040
+ break;
6041
+ case 'null':
6042
+ throw 'standardChoiceFormState.fundDetails was not set';
6043
+ }
6500
6044
  }
6501
- }
6502
- const PromotedFundJoinV1IFrameBuilder$1 = new PromotedFundJoinV1IFrameBuilder();
6045
+ async handleSubmitForm() {
6046
+ this.formState = 'validated';
6047
+ if (this.formElement.checkValidity()) {
6048
+ await state.handleSubmitFn(this.standardChoiceFormSignature.trim());
6049
+ superSelectionAppService.markSuperSelectionAsSubmitted();
6050
+ }
6051
+ }
6052
+ };
6503
6053
 
6504
- const PromotedFundJoinV1Page = class {
6054
+ const Success = class {
6505
6055
  constructor(hostRef) {
6506
6056
  index.registerInstance(this, hostRef);
6057
+ this.ignorePopState = () => window.history.pushState(null, '', null);
6058
+ }
6059
+ connectedCallback() {
6060
+ this.ignorePopState();
6061
+ window.addEventListener('popstate', this.ignorePopState);
6062
+ }
6063
+ disconnectedCallback() {
6064
+ window.removeEventListener('popstate', this.ignorePopState);
6507
6065
  }
6508
6066
  render() {
6509
- return (index.h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV1IFrameBuilder$1.build(iframe, this.history) }));
6067
+ const CheckIcon = () => {
6068
+ 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" })));
6069
+ };
6070
+ 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"))))));
6071
+ }
6072
+ handleContinueButtonClick(_event) {
6073
+ superSelectionAppService.completeSuperSelectionFlow();
6510
6074
  }
6511
6075
  };
6512
6076
 
@@ -16118,819 +15682,123 @@ class AppConfigurationQuery extends datoramaAkita.Query {
16118
15682
  }
16119
15683
  get configuration() {
16120
15684
  const configuration = this.getValue().appConfiguration;
16121
- if (isNone(configuration)) {
16122
- throw Error('App configuration is not yet loaded');
16123
- }
16124
- return configuration.value;
16125
- }
16126
- }
16127
- const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16128
-
16129
- class AppInsightsService {
16130
- constructor() {
16131
- this.appInsights = new Lazy(() => new Initialization({
16132
- config: {
16133
- instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
16134
- enableAutoRouteTracking: true,
16135
- autoTrackPageVisitTime: true,
16136
- maxBatchInterval: 1000,
16137
- enableUnhandledPromiseRejectionTracking: true
16138
- }
16139
- }));
16140
- }
16141
- init() {
16142
- this.appInsights.value.loadAppInsights();
16143
- index.setErrorHandler((err) => this.appInsightsErrorHandler(err));
16144
- }
16145
- getAppInsights() {
16146
- return this.appInsights.value;
16147
- }
16148
- addCustomProperties(properties) {
16149
- this.appInsights.value.addTelemetryInitializer((envelope) => {
16150
- envelope.data = envelope.data ? envelope.data : {};
16151
- for (const [k, v] of Object.entries(properties)) {
16152
- envelope.data[k] = v;
16153
- }
16154
- });
16155
- }
16156
- trackErrorTrace(message) {
16157
- this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16158
- }
16159
- appInsightsErrorHandler(error) {
16160
- this.appInsights.value.trackException({
16161
- error: error,
16162
- severityLevel: SeverityLevel.Error
16163
- });
16164
- // eslint-disable-next-line no-console
16165
- const defaultStencilErrorHandler = (error) => console.error(error);
16166
- defaultStencilErrorHandler(error);
16167
- }
16168
- }
16169
- const appInsights = new AppInsightsService();
16170
-
16171
- class PromotedFundJoinV2IFrameBuilder {
16172
- constructor() {
16173
- this.getFundName = (fundId) => {
16174
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
16175
- };
16176
- this.cleanUsi = (usi) => {
16177
- return usi.replace(/ /g, '');
16178
- };
16179
- this.stringIsNullOrEmtpty = (s) => {
16180
- return !(typeof s === 'string' && s.trim().length > 0);
16181
- };
16182
- this.environmentDiscriminator = () => {
16183
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16184
- switch (discriminator) {
16185
- case 'autodev-partner':
16186
- case 'test-partner':
16187
- case 'partner':
16188
- case 'sandbox-partner':
16189
- return discriminator.replace('partner', '');
16190
- default:
16191
- return 'autodev-';
16192
- }
16193
- };
16194
- this.promotedFundJoinAppUrl = () => {
16195
- return `https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`;
16196
- };
16197
- }
16198
- build(iframe$1, history) {
16199
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
16200
- return;
16201
- 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) });
16202
- const handleMessage = async (event) => {
16203
- const { data } = event;
16204
- if (!data) {
16205
- return;
16206
- }
16207
- if (data.sender === 'promoted-fund-redirect') {
16208
- window.removeEventListener('message', handleMessage);
16209
- switch (data.type) {
16210
- case 'cancel':
16211
- if (state.fund.type === 'DefinedBenefits') {
16212
- // Note: we don't expect a cancel event from Defined Benefits flow but just in case
16213
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16214
- }
16215
- else {
16216
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16217
- }
16218
- break;
16219
- case 'success': {
16220
- const promotedFundId = state.fund.id;
16221
- const fundName = this.getFundName(promotedFundId);
16222
- const usi = this.cleanUsi(data.usi);
16223
- switch (state.fund.type) {
16224
- case 'Promoted':
16225
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16226
- this.stringIsNullOrEmtpty(data.usi)) {
16227
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16228
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16229
- break;
16230
- }
16231
- navigationService.navigateInternallyToStandardChoice({
16232
- history,
16233
- fundName,
16234
- promotedFundId,
16235
- fundDetails: {
16236
- type: 'promoted',
16237
- fundName,
16238
- fundUsi: usi,
16239
- memberNumber: data.memberNumber,
16240
- promotedFundId
16241
- },
16242
- 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))
16243
- });
16244
- break;
16245
- case 'PromotedDefault':
16246
- if (this.stringIsNullOrEmtpty(data.usi)) {
16247
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16248
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16249
- break;
16250
- }
16251
- navigationService.navigateInternallyToStandardChoice({
16252
- history,
16253
- fundName,
16254
- promotedFundId,
16255
- fundDetails: {
16256
- type: 'promotedDefault',
16257
- fundName,
16258
- fundUsi: usi,
16259
- promotedFundId
16260
- },
16261
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: promotedFundId, usi,
16262
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16263
- });
16264
- break;
16265
- case 'DefinedBenefits':
16266
- throw Error('DefinedBenefits is not supported in legacy "success" message');
16267
- case 'null':
16268
- throw Error('PromotedFundState.type was not set.');
16269
- }
16270
- break;
16271
- }
16272
- case 'success-promoted': {
16273
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16274
- this.stringIsNullOrEmtpty(data.usi)) {
16275
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16276
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16277
- break;
16278
- }
16279
- const usi = this.cleanUsi(data.usi);
16280
- const fundName = this.getFundName(data.fundId);
16281
- navigationService.navigateInternallyToStandardChoice({
16282
- history,
16283
- fundName,
16284
- promotedFundId: data.fundId,
16285
- fundDetails: {
16286
- type: 'promoted',
16287
- fundName,
16288
- fundUsi: usi,
16289
- memberNumber: data.memberNumber,
16290
- promotedFundId: data.fundId
16291
- },
16292
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16293
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16294
- });
16295
- break;
16296
- }
16297
- case 'success-promoted-default': {
16298
- if (this.stringIsNullOrEmtpty(data.usi)) {
16299
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16300
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16301
- break;
16302
- }
16303
- const usi = this.cleanUsi(data.usi);
16304
- const fundName = this.getFundName(data.fundId);
16305
- navigationService.navigateInternallyToStandardChoice({
16306
- history,
16307
- fundName,
16308
- promotedFundId: data.fundId,
16309
- fundDetails: {
16310
- type: 'promotedDefault',
16311
- fundName,
16312
- fundUsi: usi,
16313
- promotedFundId: data.fundId
16314
- },
16315
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
16316
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16317
- });
16318
- break;
16319
- }
16320
- case 'success-promoted-default-with-join': {
16321
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16322
- this.stringIsNullOrEmtpty(data.usi)) {
16323
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
16324
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16325
- break;
16326
- }
16327
- const usi = this.cleanUsi(data.usi);
16328
- const fundName = this.getFundName(data.fundId);
16329
- navigationService.navigateInternallyToStandardChoice({
16330
- history,
16331
- fundName,
16332
- promotedFundId: data.fundId,
16333
- fundDetails: {
16334
- type: 'promotedDefaultWithJoin',
16335
- fundName,
16336
- fundUsi: usi,
16337
- memberNumber: data.memberNumber,
16338
- promotedFundId: data.fundId
16339
- },
16340
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16341
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16342
- });
16343
- break;
16344
- }
16345
- case 'success-defined-benefits':
16346
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16347
- this.stringIsNullOrEmtpty(data.usi)) {
16348
- appInsights.trackErrorTrace('PFJ C# did not return (DefinedBenefits) memberNumber and/or usi');
16349
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16350
- break;
16351
- }
16352
- await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({ fundUsi: this.cleanUsi(data.usi) }, data), superSelectionAppService.promotedFundsConfig));
16353
- superSelectionAppService.markSuperSelectionAsSubmitted();
16354
- break;
16355
- /* falls through */
16356
- default:
16357
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16358
- break;
16359
- }
16360
- reset();
16361
- return;
16362
- }
16363
- if (data.sender === 'promoted-fund-join') {
16364
- switch (data.type) {
16365
- case 'contentResized':
16366
- iframe$1.height = data.height > 0 ? String(data.height) : iframe$1.height;
16367
- iframe$1.width = data.width > 0 ? String(data.width) : iframe$1.width;
16368
- break;
16369
- case 'pageNavigated':
16370
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
16371
- iframe.navigation(window.location.href);
16372
- break;
16373
- }
16374
- }
16375
- };
16376
- window.addEventListener('message', handleMessage);
16377
- const iframeDoc = iframe$1.contentDocument;
16378
- iframeDoc.open();
16379
- const form = iframeDoc.createElement('form');
16380
- form.method = 'POST';
16381
- form.target = '_self';
16382
- form.action = this.promotedFundJoinAppUrl();
16383
- let prop;
16384
- for (prop in postData) {
16385
- const value = postData[prop];
16386
- if (value !== undefined) {
16387
- const input = document.createElement('input');
16388
- input.name = prop;
16389
- input.type = 'hidden';
16390
- if (typeof value === 'boolean') {
16391
- input.value = value ? 'true' : 'false';
16392
- }
16393
- else {
16394
- input.value = value;
16395
- }
16396
- form.append(input);
16397
- }
16398
- }
16399
- iframeDoc.appendChild(form);
16400
- iframeDoc.close();
16401
- form.submit();
16402
- }
16403
- getMemberData() {
16404
- var _a, _b;
16405
- const superBuyer = superSelectionAppService.superBuyer;
16406
- return {
16407
- title: superBuyer.userProfile.title,
16408
- firstName: superBuyer.userProfile.firstName,
16409
- middleName: superBuyer.userProfile.middleName,
16410
- lastName: superBuyer.userProfile.lastName,
16411
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16412
- gender: superBuyer.userProfile.gender,
16413
- email: superBuyer.userProfile.email,
16414
- mobilePhone: superBuyer.userProfile.mobilePhone,
16415
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16416
- addressLine1: superBuyer.userProfile.address.addressLine1,
16417
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16418
- city: superBuyer.userProfile.address.city,
16419
- state: superBuyer.userProfile.address.state,
16420
- postCode: superBuyer.userProfile.address.postcode
16421
- };
16422
- }
16423
- }
16424
- const PromotedFundJoinV2IFrameBuilder$1 = new PromotedFundJoinV2IFrameBuilder();
16425
-
16426
- const PromotedFundJoinV2Page = class {
16427
- constructor(hostRef) {
16428
- index.registerInstance(this, hostRef);
16429
- }
16430
- render() {
16431
- return (index.h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV2IFrameBuilder$1.build(iframe, this.history) }));
16432
- }
16433
- };
16434
-
16435
- function validateAbn(abn) {
16436
- const digitArray = abn.split('').map(Number);
16437
- const isAllDigits = digitArray.every((d) => !isNaN(d));
16438
- const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
16439
- if (!isAllDigits || digitArray.length !== weightingFactors.length) {
16440
- return false;
16441
- }
16442
- digitArray[0]--;
16443
- const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
16444
- return sum % 89 === 0;
16445
- }
16446
-
16447
- const SelfManagedFund = class {
16448
- constructor(hostRef) {
16449
- index.registerInstance(this, hostRef);
16450
- this.isSubmitDisabled = true;
16451
- this.isAbnValid = validateAbn(state$2.selfManagedFundForm.fundAbn);
16452
- this.eventTrackingService = EventTrackingService.Instance;
16453
- this.success = () => {
16454
- navigationService.navigateInternallyToStandardChoice({
16455
- history: this.history,
16456
- fundName: 'Self-managed super fund',
16457
- fundDetails: {
16458
- type: 'smsf',
16459
- fundName: state$2.selfManagedFundForm.fundName,
16460
- fundEsa: state$2.selfManagedFundForm.fundEsa
16461
- },
16462
- handleSubmitFn: async (standardChoiceFormSignature) => {
16463
- const requestDto = Object.assign({ smsfChoice: {
16464
- abn: state$2.selfManagedFundForm.fundAbn,
16465
- fundName: state$2.selfManagedFundForm.fundName,
16466
- fundAddress: {
16467
- addressLine1: state$2.selfManagedFundForm.addressLine1,
16468
- addressLine2: state$2.selfManagedFundForm.addressLine2,
16469
- city: state$2.selfManagedFundForm.city,
16470
- state: state$2.selfManagedFundForm.state,
16471
- postcode: state$2.selfManagedFundForm.postcode
16472
- },
16473
- bsb: state$2.selfManagedFundForm.bsb,
16474
- bankAccountName: state$2.selfManagedFundForm.bankAccountName,
16475
- bankAccountNumber: state$2.selfManagedFundForm.bankAccountNumber,
16476
- electronicServiceAddress: state$2.selfManagedFundForm.fundEsa,
16477
- memberFirstName: state$2.selfManagedFundForm.memberFirstName,
16478
- memberFamilyName: state$2.selfManagedFundForm.memberFamilyName
16479
- }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
16480
- await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
16481
- }
16482
- });
16483
- };
16484
- }
16485
- componentDidLoad() {
16486
- this.updateIsSubmitDisabled();
16487
- return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
16488
- promotedFundsShown: superSelectionAppService.promotedFunds,
16489
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16490
- });
16491
- }
16492
- render() {
16493
- 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: {
16494
- 'was-validated': this.formState === 'validated'
16495
- }, 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) => {
16496
- state$2.selfManagedFundForm = Object.assign(Object.assign({}, state$2.selfManagedFundForm), event.detail);
16497
- if (event.detail.isAbnValid !== undefined)
16498
- this.isAbnValid = event.detail.isAbnValid;
16499
- this.updateIsSubmitDisabled();
16500
- } })), 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:
16501
- // user clicks on disabled button (div wrapper) then validation errors will show
16502
- () => (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")))))))));
16503
- }
16504
- updateIsSubmitDisabled() {
16505
- this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
16506
- }
16507
- async handleSubmitForm() {
16508
- this.formState = 'validated';
16509
- if (this.formElement.checkValidity())
16510
- this.success();
16511
- }
16512
- };
16513
- injectHistory(SelfManagedFund);
16514
-
16515
- var AbnValidationStatus;
16516
- (function (AbnValidationStatus) {
16517
- AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
16518
- AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
16519
- AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
16520
- })(AbnValidationStatus || (AbnValidationStatus = {}));
16521
- const SelfManagedFundInputs = class {
16522
- constructor(hostRef) {
16523
- index.registerInstance(this, hostRef);
16524
- this.formChanged = index.createEvent(this, "formChanged", 7);
16525
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16526
- this.isAbnTouched = false;
16527
- this.currentBank = none;
16528
- this.addressErrorMessage = none;
16529
- this.stateOptions = [
16530
- { value: 'NSW', label: 'NSW' },
16531
- { value: 'QLD', label: 'QLD' },
16532
- { value: 'ACT', label: 'ACT' },
16533
- { value: 'VIC', label: 'VIC' },
16534
- { value: 'TAS', label: 'TAS' },
16535
- { value: 'WA', label: 'WA' },
16536
- { value: 'SA', label: 'SA' },
16537
- { value: 'NT', label: 'NT' }
16538
- ];
16539
- this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
16540
- this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
16541
- }
16542
- render() {
16543
- const inputClass = {
16544
- '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,
16545
- 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
16546
- .showValidationErrors
16547
- };
16548
- 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) => {
16549
- const abnInput = ev.target;
16550
- this.updateFormField('fundAbn', abnInput.value.trim());
16551
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16552
- if (validateAbn(abnInput.value)) {
16553
- const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
16554
- this.abnValidationStatus = isAbnUsedForRegulatedFund
16555
- ? AbnValidationStatus.AbnIsUsedForRegulatedFund
16556
- : AbnValidationStatus.Valid;
16557
- }
16558
- // We need to set a custom validity message to trigger css invalid styles for non valid cases
16559
- const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
16560
- ? ''
16561
- : 'Enter a valid fund ABN (digits only)';
16562
- abnInput.setCustomValidity(validityMessage);
16563
- this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
16564
- }, 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) => {
16565
- this.updateFormField('addressLine1', ev.target.value.trim());
16566
- this.updateAddressErrorMessage();
16567
- }, 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) => {
16568
- this.updateFormField('city', ev.target.value.trim());
16569
- this.updateAddressErrorMessage();
16570
- }, 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) => {
16571
- this.updateFormField('postcode', ev.target.value.trim());
16572
- this.updateAddressErrorMessage();
16573
- }, 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) => {
16574
- this.updateFormField('state', ev.target.value.trim());
16575
- this.updateAddressErrorMessage();
16576
- }, 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")))));
16577
- }
16578
- updateFormField(key, value) {
16579
- this.formChanged.emit({ [key]: value });
16580
- }
16581
- async isAbnUsedForRegulatedAsync(abn) {
16582
- return !(await customFundChoiceApi.validateAbnForSMSF(abn));
16583
- }
16584
- renderAbnValidationError() {
16585
- if (this.isAbnTouched || this.showValidationErrors) {
16586
- switch (this.abnValidationStatus) {
16587
- case AbnValidationStatus.Invalid:
16588
- return index.h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
16589
- case AbnValidationStatus.AbnIsUsedForRegulatedFund:
16590
- return (index.h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
16591
- case AbnValidationStatus.Valid:
16592
- return [];
16593
- }
16594
- }
16595
- return [];
16596
- }
16597
- filterDigits(str) {
16598
- return str.replace(/[^0-9]/g, '');
16599
- }
16600
- updateCurrentBank(ev) {
16601
- const value = this.filterDigits(ev.target.value);
16602
- const firstTwoNumbers = value.substring(0, 2);
16603
- const firstThreeNumbers = value.substring(0, 3);
16604
- const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
16605
- const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
16606
- if (firstTwoNumberBankName)
16607
- this.currentBank = some(firstTwoNumberBankName);
16608
- if (firstThreeNumberBankName)
16609
- this.currentBank = some(firstThreeNumberBankName);
16610
- if (value === '' || value.length > 6)
16611
- this.currentBank = none;
16612
- this.updateFormField('bsb', value);
16613
- }
16614
- updateCurrentBankAccountNumber(ev) {
16615
- const value = this.filterDigits(ev.target.value);
16616
- this.updateFormField('bankAccountNumber', value);
16617
- }
16618
- updateAddressErrorMessage() {
16619
- let message = none;
16620
- if (isNone(message) && !this.addressLine1Element.checkValidity()) {
16621
- message = some('Enter a valid address line 1');
16622
- }
16623
- if (isNone(message) && !this.cityElement.checkValidity()) {
16624
- message = some('Enter a valid city/suburb');
16625
- }
16626
- if (isNone(message) && !this.postcodeElement.checkValidity()) {
16627
- message = some('Enter a valid post code');
16628
- }
16629
- if (isNone(message) && !this.stateElement.checkValidity()) {
16630
- message = some('Select a state');
16631
- }
16632
- this.addressErrorMessage = message;
16633
- }
16634
- };
16635
-
16636
- class InteropQuery extends datoramaAkita.Query {
16637
- constructor(store) {
16638
- super(store);
16639
- this.store = store;
16640
- }
16641
- isReactNativeInteropEnabled() {
16642
- return isSome(this.getValue().reactNativeInterop);
16643
- }
16644
- isIframeInteropEnabled() {
16645
- return isSome(this.getValue().iframeInterop);
16646
- }
16647
- getIframeInteropMode() {
16648
- const iframeInterop = this.getValue().iframeInterop;
16649
- if (isNone(iframeInterop)) {
16650
- throw Error('Failed to get iframe interop information: no data in store');
16651
- }
16652
- if (!this.isIframeInteropEnabled()) {
16653
- throw Error('Failed to get iframe interop information: iframe mode is disabled');
16654
- }
16655
- return iframeInterop.value;
16656
- }
16657
- }
16658
- const interopQuery = new InteropQuery(sessionStore);
16659
-
16660
- class SlateChoiceApi {
16661
- async submitSlateChoiceAsync(dto) {
16662
- return buildBackendApiClient()
16663
- .url('super-choice/slate')
16664
- .post(dto)
16665
- .badRequest(() => {
16666
- throw new Error('Failed to process Slate join request');
16667
- })
16668
- .text();
16669
- }
16670
- }
16671
- const slateChoiceApi = new SlateChoiceApi();
16672
-
16673
- class SlateIFrameBuilder {
16674
- constructor() {
16675
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
16676
- this.hostIsDeployed = () => window.location.origin.endsWith('partner.flarehr.com');
16677
- this.skipConsolidation = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16678
- this.skipInsurance = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16679
- this.environmentDiscriminator = () => {
16680
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16681
- switch (discriminator) {
16682
- case 'autodev-partner':
16683
- case 'test-partner':
16684
- case 'partner':
16685
- case 'sandbox-partner':
16686
- return discriminator.replace('partner', '');
16687
- default:
16688
- return 'autodev-';
16689
- }
16690
- };
16691
- this.slateJoinAppUrl = () => {
16692
- return `https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`;
16693
- };
16694
- }
16695
- build(iframe, history) {
16696
- if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
16697
- return;
16698
- const baseUrl = this.hostIsLocalSuperSelection() || this.hostIsDeployed()
16699
- ? `${window.location.origin}/super-selection/embed/v1.0/app`
16700
- : 'https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app';
16701
- const redirectUrl = `${baseUrl}/slate-redirect.html`;
16702
- const postData = Object.assign(Object.assign({}, this.getSlateJoinMemberData()), { successRedirectUrl: redirectUrl, cancelRedirectUrl: redirectUrl, skipConsolidation: this.skipConsolidation(), skipInsurance: this.skipInsurance() });
16703
- if (this.includeJwt()) {
16704
- postData.authToken = superSelectionAppService.jwt;
16705
- }
16706
- const handleMessage = (event) => {
16707
- const { data, origin } = event;
16708
- if (!data) {
16709
- return;
16710
- }
16711
- if (data.sender === 'slate-redirect') {
16712
- window.removeEventListener('message', handleMessage);
16713
- switch (data.type) {
16714
- case 'success':
16715
- if (data.memberNumber) {
16716
- navigationService.navigateInternallyToStandardChoice({
16717
- history,
16718
- fundName: fund$8.name,
16719
- fundDetails: {
16720
- type: 'promoted',
16721
- fundName: fund$8.name,
16722
- fundUsi: slateUsi,
16723
- memberNumber: data.memberNumber,
16724
- promotedFundId: fund$8.fundId
16725
- },
16726
- handleSubmitFn: (standardChoiceFormSignature) => slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
16727
- promotedFundId: fund$8.fundId
16728
- });
16729
- break;
16730
- }
16731
- /* falls through */
16732
- default:
16733
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16734
- break;
16735
- }
16736
- reset();
16737
- return;
16738
- }
16739
- if (data.sender === 'flare' && origin.endsWith('join.slatesuper.com.au')) {
16740
- switch (data.type) {
16741
- case 'contentResized':
16742
- iframe.height = data.height > 0 ? data.height : iframe.height;
16743
- iframe.width = data.width > 0 ? data.width : iframe.width;
16744
- break;
16745
- }
16746
- }
16747
- };
16748
- window.addEventListener('message', handleMessage);
16749
- const iframeDoc = iframe.contentDocument;
16750
- iframeDoc.open();
16751
- const form = iframeDoc.createElement('form');
16752
- form.method = 'POST';
16753
- form.target = '_self';
16754
- form.action = this.slateJoinAppUrl();
16755
- let prop;
16756
- for (prop in postData) {
16757
- const value = postData[prop];
16758
- if (value !== undefined) {
16759
- const input = document.createElement('input');
16760
- input.type = 'hidden';
16761
- input.name = prop;
16762
- input.value = value;
16763
- form.append(input);
16764
- }
16765
- }
16766
- iframeDoc.appendChild(form);
16767
- iframeDoc.close();
16768
- form.submit();
16769
- }
16770
- getSlateJoinMemberData() {
16771
- var _a, _b;
16772
- const superBuyer = superSelectionAppService.superBuyer;
16773
- const toSlateGender = (gender) => {
16774
- switch (gender) {
16775
- case 'Male':
16776
- return 'Male';
16777
- case 'Female':
16778
- return 'Female';
16779
- case 'Intersex':
16780
- return 'Intersex/Indeterminate';
16781
- default:
16782
- return 'Unknown';
16783
- }
16784
- };
16785
- return {
16786
- firstName: superBuyer.userProfile.firstName,
16787
- middleName: superBuyer.userProfile.middleName,
16788
- lastName: superBuyer.userProfile.lastName,
16789
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16790
- gender: toSlateGender(superBuyer.userProfile.gender),
16791
- email: superBuyer.userProfile.email,
16792
- mobilePhone: superBuyer.userProfile.mobilePhone,
16793
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16794
- addressLine1: superBuyer.userProfile.address.addressLine1,
16795
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16796
- city: superBuyer.userProfile.address.city,
16797
- state: superBuyer.userProfile.address.state,
16798
- postCode: superBuyer.userProfile.address.postcode
16799
- };
16800
- }
16801
- includeJwt() {
16802
- return !this.slateJoinAppUrl().match(/autodev|sandbox/);
15685
+ if (isNone(configuration)) {
15686
+ throw Error('App configuration is not yet loaded');
15687
+ }
15688
+ return configuration.value;
16803
15689
  }
16804
15690
  }
16805
- const slateIFrameBuilder = new SlateIFrameBuilder();
15691
+ const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16806
15692
 
16807
- const SlateJoinPage = class {
16808
- constructor(hostRef) {
16809
- index.registerInstance(this, hostRef);
15693
+ class AppInsightsService {
15694
+ constructor() {
15695
+ this.appInsights = new Lazy(() => new Initialization({
15696
+ config: {
15697
+ instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
15698
+ enableAutoRouteTracking: true,
15699
+ autoTrackPageVisitTime: true,
15700
+ maxBatchInterval: 1000,
15701
+ enableUnhandledPromiseRejectionTracking: true
15702
+ }
15703
+ }));
16810
15704
  }
16811
- render() {
16812
- return index.h("sss-iframe-host", { build: (iframe) => slateIFrameBuilder.build(iframe, this.history) });
15705
+ init() {
15706
+ this.appInsights.value.loadAppInsights();
15707
+ index.setErrorHandler((err) => this.appInsightsErrorHandler(err));
16813
15708
  }
16814
- };
16815
-
16816
- const StandardChoiceFormInputDefaultFund = class {
16817
- constructor(hostRef) {
16818
- index.registerInstance(this, hostRef);
16819
- this.standardChoiceFormSignature = '';
16820
- this.isSubmitDisabled = true;
16821
- this.eventTrackingService = EventTrackingService.Instance;
16822
- this.ignorePopState = () => window.history.pushState(null, '', null);
15709
+ getAppInsights() {
15710
+ return this.appInsights.value;
16823
15711
  }
16824
- connectedCallback() {
16825
- this.ignorePopState();
16826
- window.addEventListener('popstate', this.ignorePopState);
15712
+ addCustomProperties(properties) {
15713
+ this.appInsights.value.addTelemetryInitializer((envelope) => {
15714
+ envelope.data = envelope.data ? envelope.data : {};
15715
+ for (const [k, v] of Object.entries(properties)) {
15716
+ envelope.data[k] = v;
15717
+ }
15718
+ });
16827
15719
  }
16828
- disconnectedCallback() {
16829
- window.removeEventListener('popstate', this.ignorePopState);
15720
+ trackErrorTrace(message) {
15721
+ this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16830
15722
  }
16831
- render() {
16832
- 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 () => {
16833
- await this.trackChangeRequestedAsync();
16834
- const changeFundRoute = Option.isSome(superSelectionAppService.state.superChoicePrefill)
16835
- ? SuperSelectionAppRoutes.ConsentPage
16836
- : SuperSelectionAppRoutes.ChoicePage;
16837
- navigationService.navigateInternally(this.history, changeFundRoute);
16838
- } }, "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: {
16839
- 'mt-3': true,
16840
- 'was-validated': this.formState === 'validated'
16841
- }, 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: {
16842
- '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,
16843
- 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
16844
- }, 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"))))))));
15723
+ appInsightsErrorHandler(error) {
15724
+ this.appInsights.value.trackException({
15725
+ error: error,
15726
+ severityLevel: SeverityLevel.Error
15727
+ });
15728
+ // eslint-disable-next-line no-console
15729
+ const defaultStencilErrorHandler = (error) => console.error(error);
15730
+ defaultStencilErrorHandler(error);
16845
15731
  }
16846
- renderLogo() {
16847
- if (state$1.promotedFundId == undefined)
16848
- return;
16849
- const logoSource = getLogoSrcByFundId(state$1.promotedFundId);
16850
- if (Option.isSome(logoSource)) {
16851
- 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 })));
16852
- }
15732
+ }
15733
+ const appInsights = new AppInsightsService();
15734
+
15735
+ class SuperCampaignErrorApi {
15736
+ static get Instance() {
15737
+ return this.instance || (this.instance = new this());
16853
15738
  }
16854
- async trackChangeRequestedAsync() {
16855
- const common = {
16856
- promotedFundsShown: superSelectionAppService.promotedFunds,
16857
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16858
- };
16859
- switch (state$1.fundDetails.type) {
16860
- case 'default':
16861
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16862
- DefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16863
- });
16864
- break;
16865
- case 'myOwnFund':
16866
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16867
- MyOwnFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16868
- });
16869
- break;
16870
- case 'smsf':
16871
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16872
- Smsf: Object.assign(Object.assign({}, state$1.fundDetails), common)
16873
- });
16874
- break;
16875
- case 'promoted':
16876
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16877
- PromotedFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16878
- });
16879
- break;
16880
- case 'promotedDefault':
16881
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16882
- PromotedDefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16883
- });
16884
- break;
16885
- case 'promotedDefaultWithJoin':
16886
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16887
- PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state$1.fundDetails), common)
16888
- });
16889
- break;
16890
- case 'null':
16891
- throw 'standardChoiceFormState.fundDetails was not set';
16892
- }
15739
+ async PostError(error) {
15740
+ buildBackendApiClient().url('super-campaign/errors').post(error);
16893
15741
  }
16894
- async handleSubmitForm() {
16895
- this.formState = 'validated';
16896
- if (this.formElement.checkValidity()) {
16897
- await state$1.handleSubmitFn(this.standardChoiceFormSignature.trim());
16898
- superSelectionAppService.markSuperSelectionAsSubmitted();
15742
+ }
15743
+
15744
+ const SuperFundDisclaimerViewedDetail = {
15745
+ create: (superCampaignEnabled) => {
15746
+ let isDefinedBenefitsEligibleString = 'Not set';
15747
+ if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
15748
+ isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
15749
+ ? 'True'
15750
+ : 'False';
16899
15751
  }
15752
+ return {
15753
+ isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
15754
+ superCampaignEnabled: superCampaignEnabled
15755
+ };
16900
15756
  }
16901
15757
  };
16902
15758
 
16903
- const Success = class {
16904
- constructor(hostRef) {
16905
- index.registerInstance(this, hostRef);
16906
- this.ignorePopState = () => window.history.pushState(null, '', null);
16907
- }
16908
- connectedCallback() {
16909
- this.ignorePopState();
16910
- window.addEventListener('popstate', this.ignorePopState);
16911
- }
16912
- disconnectedCallback() {
16913
- window.removeEventListener('popstate', this.ignorePopState);
15759
+ class PromotedFundChoiceApi {
15760
+ async submitChoiceAsync(dto) {
15761
+ return buildBackendApiClient()
15762
+ .url('super-choice/promoted-fund')
15763
+ .post(dto)
15764
+ .badRequest(() => {
15765
+ throw new Error('Failed to process Promoted Fund choice request');
15766
+ })
15767
+ .text();
16914
15768
  }
16915
- render() {
16916
- const CheckIcon = () => {
16917
- 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" })));
16918
- };
16919
- 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"))))));
15769
+ async submitDefaultChoiceAsync(dto) {
15770
+ return buildBackendApiClient()
15771
+ .url('super-choice/promoted-fund/default')
15772
+ .post(dto)
15773
+ .badRequest(() => {
15774
+ throw new Error('Failed to process Promoted Default Fund choice request');
15775
+ })
15776
+ .text();
16920
15777
  }
16921
- handleContinueButtonClick(_event) {
16922
- superSelectionAppService.completeSuperSelectionFlow();
15778
+ async submitDefaultChoiceWithJoinAsync(dto) {
15779
+ return buildBackendApiClient()
15780
+ .url('super-choice/promoted-fund/default-with-join')
15781
+ .post(dto)
15782
+ .badRequest(() => {
15783
+ throw new Error('Failed to process Promoted Default Fund With Join choice request');
15784
+ })
15785
+ .text();
16923
15786
  }
16924
- };
15787
+ }
15788
+ const promotedFundChoiceApi = new PromotedFundChoiceApi();
16925
15789
 
16926
- class SuperCampaignErrorApi {
16927
- static get Instance() {
16928
- return this.instance || (this.instance = new this());
16929
- }
16930
- async PostError(error) {
16931
- buildBackendApiClient().url('super-campaign/errors').post(error);
15790
+ class SlateChoiceApi {
15791
+ async submitSlateChoiceAsync(dto) {
15792
+ return buildBackendApiClient()
15793
+ .url('super-choice/slate')
15794
+ .post(dto)
15795
+ .badRequest(() => {
15796
+ throw new Error('Failed to process Slate join request');
15797
+ })
15798
+ .text();
16932
15799
  }
16933
15800
  }
15801
+ const slateChoiceApi = new SlateChoiceApi();
16934
15802
 
16935
15803
  class MiscService {
16936
15804
  trackClickPromotedTileAsync(payload) {
@@ -17090,9 +15958,6 @@ const SuperCampaignHost = class {
17090
15958
  }
17091
15959
  return Promise.resolve();
17092
15960
  };
17093
- this.getFundName = (fundId) => {
17094
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
17095
- };
17096
15961
  this.stringIsNullOrEmtpty = (s) => {
17097
15962
  return !(typeof s === 'string' && s.trim().length > 0);
17098
15963
  };
@@ -17102,21 +15967,20 @@ const SuperCampaignHost = class {
17102
15967
  return;
17103
15968
  }
17104
15969
  const usi = Usi.clean(data.usi);
17105
- const fundName = this.getFundName(data.fundId);
17106
15970
  const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
17107
15971
  navigationService.navigateInternallyToStandardChoice({
17108
15972
  history: this.history,
17109
- fundName,
15973
+ fundName: data.fundName,
17110
15974
  promotedFundId: data.fundId,
17111
15975
  fundDetails: {
17112
15976
  type: 'promoted',
17113
- fundName,
15977
+ fundName: data.fundName,
17114
15978
  fundUsi: usi,
17115
15979
  memberNumber: data.memberNumber,
17116
15980
  promotedFundId: data.fundId
17117
15981
  },
17118
15982
  handleSubmitFn: async (standardChoiceFormSignature) => {
17119
- if (data.fundId == fund$8.fundId) {
15983
+ if (data.fundId == slate.fundId) {
17120
15984
  await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
17121
15985
  defaultFundUsiSet }, this.PromotedFundsConfig));
17122
15986
  }
@@ -17134,14 +15998,13 @@ const SuperCampaignHost = class {
17134
15998
  return;
17135
15999
  }
17136
16000
  const usi = Usi.clean(data.usi);
17137
- const fundName = this.getFundName(data.fundId);
17138
16001
  navigationService.navigateInternallyToStandardChoice({
17139
16002
  history: this.history,
17140
- fundName,
16003
+ fundName: data.fundName,
17141
16004
  promotedFundId: data.fundId,
17142
16005
  fundDetails: {
17143
16006
  type: 'promotedDefault',
17144
- fundName,
16007
+ fundName: data.fundName,
17145
16008
  fundUsi: usi,
17146
16009
  promotedFundId: data.fundId
17147
16010
  },
@@ -17155,14 +16018,13 @@ const SuperCampaignHost = class {
17155
16018
  return;
17156
16019
  }
17157
16020
  const usi = Usi.clean(data.usi);
17158
- const fundName = this.getFundName(data.fundId);
17159
16021
  navigationService.navigateInternallyToStandardChoice({
17160
16022
  history: this.history,
17161
- fundName,
16023
+ fundName: data.fundName,
17162
16024
  promotedFundId: data.fundId,
17163
16025
  fundDetails: {
17164
16026
  type: 'promotedDefaultWithJoin',
17165
- fundName,
16027
+ fundName: data.fundName,
17166
16028
  fundUsi: usi,
17167
16029
  memberNumber: data.memberNumber,
17168
16030
  promotedFundId: data.fundId
@@ -17195,7 +16057,7 @@ const SuperCampaignHost = class {
17195
16057
  async componentWillLoad() {
17196
16058
  if (superSelectionAppService.state.superCampaignComponentStatus ===
17197
16059
  SuperCampaignComponentStatus.NotWorking) {
17198
- await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
16060
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
17199
16061
  return;
17200
16062
  }
17201
16063
  let superCampaingScriptPath = undefined;
@@ -17269,136 +16131,6 @@ const SuperCampaignHost = class {
17269
16131
  };
17270
16132
  injectHistory(SuperCampaignHost);
17271
16133
 
17272
- const SuperChoiceItemBottom = class {
17273
- constructor(hostRef) {
17274
- index.registerInstance(this, hostRef);
17275
- this.joinFundClicked = index.createEvent(this, "joinFundClicked", 7);
17276
- }
17277
- render() {
17278
- 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))))));
17279
- }
17280
- handleFundClick() {
17281
- return this.joinFundClicked.emit();
17282
- }
17283
- };
17284
-
17285
- const SuperChoiceItemTop = class {
17286
- constructor(hostRef) {
17287
- index.registerInstance(this, hostRef);
17288
- }
17289
- render() {
17290
- 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: {
17291
- 'h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left': true,
17292
- 'lg:block': this.isMultiFund
17293
- }, alt: this.name, src: index.getAssetPath(`assets/${this.logo}`) }), index.h("div", { class: "grid content-center" }, index.h("p", { class: {
17294
- 'text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0': true,
17295
- 'lg:mt-4': this.isMultiFund
17296
- } }, 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)));
17297
- }
17298
- };
17299
-
17300
- const SuperChoicePage = class {
17301
- constructor(hostRef) {
17302
- index.registerInstance(this, hostRef);
17303
- this.promotedFunds = this.getPromotedFunds();
17304
- this.eventTrackingService = EventTrackingService.Instance;
17305
- }
17306
- async componentDidLoad() {
17307
- const promotedFundsShown = this.promotedFunds.map((item) => item.fundId);
17308
- await superSelectionAppService.viewSuperFundPanelAsync(promotedFundsShown);
17309
- }
17310
- render() {
17311
- const mygovLink = 'https://my.gov.au';
17312
- const mygovLinkDisplay = 'www.my.gov.au';
17313
- const superfundsLink = 'https://www.apra.gov.au/register-of-superannuation-institutions';
17314
- const superfundsLinkDisplay = 'www.apra.gov.au';
17315
- const isMultiFund = this.promotedFunds.length > 1;
17316
- 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: {
17317
- 'lg:grid border-l border-t lg:border-b rounded-lg': true,
17318
- 'lg:grid-cols-1 max-w-720': this.promotedFunds.length === 1,
17319
- 'lg:grid-cols-2 max-w-720': this.promotedFunds.length === 2,
17320
- 'lg:grid-cols-3 max-w-960': this.promotedFunds.length === 3
17321
- } }, this.promotedFunds.map((fund, index$1) => (index.h("div", { class: {
17322
- 'border-r': true,
17323
- 'rounded-tr-lg': index$1 === 0,
17324
- 'lg:rounded-tr-none': index$1 === 0 && index$1 !== this.promotedFunds.length - 1,
17325
- 'rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg': index$1 === this.promotedFunds.length - 1
17326
- } }, index.h("div", { class: {
17327
- 'flex border-b lg:border-b-0': true,
17328
- 'rounded-b-lg': index$1 === this.promotedFunds.length - 1
17329
- } }, index.h("div", { class: {
17330
- 'hidden md:flex w-36 justify-center pt-6 pl-6': true,
17331
- 'lg:hidden': isMultiFund
17332
- } }, 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: {
17333
- 'hidden border-r': true,
17334
- 'lg:block': isMultiFund,
17335
- 'rounded-br-lg': index$1 === this.promotedFunds.length - 1
17336
- } }, 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.")))))));
17337
- }
17338
- getPromotedFunds() {
17339
- const fundTiles = [];
17340
- superSelectionAppService.promotedFunds.forEach((fundId) => {
17341
- const fund = allPromotedFunds.find((fund) => fundId === fund.fundId);
17342
- if (fund !== undefined) {
17343
- fundTiles.push(fund);
17344
- }
17345
- });
17346
- return fundTiles;
17347
- }
17348
- async handleJoinSuperClickAsync(fund) {
17349
- const promotedFundsShown = superSelectionAppService.promotedFunds;
17350
- const fundUsi = getFundUsiByFundId(fund.fundId);
17351
- const fundName = getFundNameByFundId(fund.fundId);
17352
- await Promise.all([
17353
- fund.isPromotedDefault == true
17354
- ? this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({
17355
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : '',
17356
- fundName: Option.isSome(fundName) ? fundName.value : '',
17357
- promotedFundId: fund.fundId,
17358
- promotedFundsShown,
17359
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17360
- superCampaignEnabled: false
17361
- })
17362
- : this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({
17363
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : undefined,
17364
- fundName: Option.isSome(fundName) ? fundName.value : '',
17365
- promotedFundId: fund.fundId,
17366
- promotedFundsShown,
17367
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17368
- superCampaignEnabled: false
17369
- }),
17370
- miscService.trackClickPromotedTileAsync(fund.isPromotedDefault
17371
- ? {
17372
- promotedDefault: {
17373
- fundId: fund.fundId
17374
- }
17375
- }
17376
- : {
17377
- promoted: {
17378
- fundId: fund.fundId
17379
- }
17380
- })
17381
- ]);
17382
- state.fund = {
17383
- id: fund.fundId,
17384
- type: fund.isPromotedDefault ? 'PromotedDefault' : 'Promoted'
17385
- };
17386
- return navigationService.navigateInternally(this.history, fund.route);
17387
- }
17388
- static get assetsDirs() { return ["assets"]; }
17389
- };
17390
- injectHistory(SuperChoicePage);
17391
-
17392
- const SuperChoicePageWrapper = class {
17393
- constructor(hostRef) {
17394
- index.registerInstance(this, hostRef);
17395
- }
17396
- render() {
17397
- return superSelectionAppService.state.superCampaignEnabled ? (index.h("sss-super-campaign-host", null)) : (index.h("sss-super-choice-page", null));
17398
- }
17399
- };
17400
- injectHistory(SuperChoicePageWrapper);
17401
-
17402
16134
  const routeCss = "stencil-route.inactive{display:none}";
17403
16135
 
17404
16136
  const Route = class {
@@ -18395,7 +17127,7 @@ const SuperSelectionApp = class {
18395
17127
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
18396
17128
  }
18397
17129
  else {
18398
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
17130
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
18399
17131
  }
18400
17132
  }
18401
17133
  authTokenChanged(newValue) {
@@ -18407,24 +17139,12 @@ const SuperSelectionApp = class {
18407
17139
  render() {
18408
17140
  return (index.h(index.Host, null, index.h("link", { rel: "stylesheet", href: index.getAssetPath('apollo-super-selection.css'), media: "all" }), this.renderAppContent()));
18409
17141
  }
18410
- isFundJoinPage() {
18411
- return (window.location.pathname.includes(SuperSelectionAppRoutes.SlateJoin) ||
18412
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV1) ||
18413
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV2));
18414
- }
18415
- getFooterTextOverride() {
18416
- return getFooterTextOverrideByFundId(state.fund.id);
18417
- }
18418
17142
  routerBaseUrl() {
18419
17143
  var _a;
18420
17144
  return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
18421
17145
  }
18422
17146
  renderAppContent() {
18423
- return (index.h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (index.h("div", { class: {
18424
- 'pt-28': true,
18425
- '-mt-12 pb-6': !this.isFundJoinPage(),
18426
- '-mt-28': this.isFundJoinPage() // -mt value same as pt to negate it in embedded fund join pages
18427
- } }, superSelectionAppStencilRoutes, index.h("sss-footer-section", { textOverride: this.getFooterTextOverride() }))) : (index.h("div", { class: "flex justify-center py-20" }, index.h("sss-loading-indicator", null))))));
17147
+ 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))))));
18428
17148
  }
18429
17149
  static get assetsDirs() { return ["assets"]; }
18430
17150
  static get watchers() { return {
@@ -19037,6 +17757,30 @@ class AuthenticationService {
19037
17757
  }
19038
17758
  const authenticationService = new AuthenticationService();
19039
17759
 
17760
+ class InteropQuery extends datoramaAkita.Query {
17761
+ constructor(store) {
17762
+ super(store);
17763
+ this.store = store;
17764
+ }
17765
+ isReactNativeInteropEnabled() {
17766
+ return isSome(this.getValue().reactNativeInterop);
17767
+ }
17768
+ isIframeInteropEnabled() {
17769
+ return isSome(this.getValue().iframeInterop);
17770
+ }
17771
+ getIframeInteropMode() {
17772
+ const iframeInterop = this.getValue().iframeInterop;
17773
+ if (isNone(iframeInterop)) {
17774
+ throw Error('Failed to get iframe interop information: no data in store');
17775
+ }
17776
+ if (!this.isIframeInteropEnabled()) {
17777
+ throw Error('Failed to get iframe interop information: iframe mode is disabled');
17778
+ }
17779
+ return iframeInterop.value;
17780
+ }
17781
+ }
17782
+ const interopQuery = new InteropQuery(sessionStore);
17783
+
19040
17784
  class IFrameInteropService {
19041
17785
  static completeSuperSelectionStep() {
19042
17786
  const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
@@ -19201,19 +17945,14 @@ const SuperSelectionAppHost = class {
19201
17945
  SuperSelectionAppHost.style = superSelectionAppHostCss;
19202
17946
 
19203
17947
  exports.sss_button = Button;
19204
- exports.sss_consent_page = Consent;
19205
- exports.sss_consent_page_wrapper = ConsentWrapper;
19206
17948
  exports.sss_custom_fund = CustomFund;
19207
17949
  exports.sss_default_fund = DefaultFund;
19208
17950
  exports.sss_dropdown_async = SelectInputAsync;
19209
17951
  exports.sss_existing_choice_page = ExistingChoice;
19210
17952
  exports.sss_footer_section = FooterSection;
19211
17953
  exports.sss_header_section = HeaderSection;
19212
- exports.sss_iframe_host = IFrameHost;
19213
- exports.sss_loading_component = LoadingComponent;
19214
17954
  exports.sss_loading_indicator = LoadingIndicator;
19215
17955
  exports.sss_loading_page = LoadingPage;
19216
- exports.sss_loading_super_indicator = LoadingComponent$1;
19217
17956
  exports.sss_my_own_fund = MyOwnFund;
19218
17957
  exports.sss_my_own_fund_inputs = MyOwnFundInputs;
19219
17958
  exports.sss_name_input = MemberNameInput;
@@ -19225,18 +17964,11 @@ exports.sss_prefill_invalid_smsf = PrefillInvalidSMSF;
19225
17964
  exports.sss_prefill_my_own_fund = PrefillMyOwnFund;
19226
17965
  exports.sss_prefill_smsf = PrefillSMSF;
19227
17966
  exports.sss_prefill_warning_box = PrefillWarningBox;
19228
- exports.sss_promoted_fund_join_v1_page = PromotedFundJoinV1Page;
19229
- exports.sss_promoted_fund_join_v2_page = PromotedFundJoinV2Page;
19230
17967
  exports.sss_self_managed_fund = SelfManagedFund;
19231
17968
  exports.sss_self_managed_fund_inputs = SelfManagedFundInputs;
19232
- exports.sss_slate_join_page = SlateJoinPage;
19233
17969
  exports.sss_standard_choice_form = StandardChoiceFormInputDefaultFund;
19234
17970
  exports.sss_success = Success;
19235
17971
  exports.sss_super_campaign_host = SuperCampaignHost;
19236
- exports.sss_super_choice_item_bottom = SuperChoiceItemBottom;
19237
- exports.sss_super_choice_item_top = SuperChoiceItemTop;
19238
- exports.sss_super_choice_page = SuperChoicePage;
19239
- exports.sss_super_choice_page_wrapper = SuperChoicePageWrapper;
19240
17972
  exports.stencil_route = Route;
19241
17973
  exports.stencil_route_link = RouteLink$1;
19242
17974
  exports.stencil_route_switch = RouteSwitch;