@flarehr/apollo-super-selection 5.56.16984 → 5.58.17315

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 (27) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/p-4ca10ecd.js +1 -0
  3. package/dist/lib/apollo-super-selection/p-5bdb0637.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
  5. package/dist/lib/apollo-super-selection/{p-2590548f.system.js → p-c60c8281.system.js} +1 -1
  6. package/dist/lib/apollo-super-selection/p-cd233076.system.entry.js +69 -0
  7. package/dist/lib/apollo-super-selection/p-dc0abac1.entry.js +1 -0
  8. package/dist/lib/apollo-super-selection/p-e4862f8c.system.entry.js +1 -0
  9. package/dist/lib/cjs/{custom-fund-choice.api-713823d3.js → custom-fund-choice.api-538e59d2.js} +117 -0
  10. package/dist/lib/cjs/sss-button_31.cjs.entry.js +22 -133
  11. package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +6 -1
  12. package/dist/lib/collection/components/super-byof/super-byof.js +7 -1
  13. package/dist/lib/collection/components/super-smsf/super-smsf.js +7 -1
  14. package/dist/lib/esm/{custom-fund-choice.api-45fa478c.js → custom-fund-choice.api-b7f9d60c.js} +117 -1
  15. package/dist/lib/esm/sss-button_31.entry.js +7 -118
  16. package/dist/lib/esm/sss-super-byof-host.entry.js +6 -1
  17. package/dist/lib/esm-es5/{custom-fund-choice.api-45fa478c.js → custom-fund-choice.api-b7f9d60c.js} +1 -1
  18. package/dist/lib/esm-es5/sss-button_31.entry.js +5 -5
  19. package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -1
  20. package/dist/lib/types/components/super-byof/super-byof.d.ts +1 -0
  21. package/dist/lib/types/components/super-smsf/super-smsf.d.ts +1 -0
  22. package/package.json +1 -1
  23. package/dist/lib/apollo-super-selection/p-3e16df95.system.entry.js +0 -69
  24. package/dist/lib/apollo-super-selection/p-40873393.entry.js +0 -14
  25. package/dist/lib/apollo-super-selection/p-645755ee.system.entry.js +0 -1
  26. package/dist/lib/apollo-super-selection/p-6b03f1b2.entry.js +0 -1
  27. package/dist/lib/apollo-super-selection/p-99266549.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, F as Fragment, g as getAssetPath, H as Host, c as createEvent, s as setErrorHandler, a as getElement, d as getContext } from './index-107d7c24.js';
2
2
  import { f as from, m as map, S as SimpleOuterSubscriber, a as SimpleInnerSubscriber, i as innerSubscribe, b as isArray, O as Observable, c as isFunction, d as async, g as Subscriber, h as distinctUntilChanged, j as filter, k as StoreConfig, l as Store, Q as Query } from './datorama-akita-127aea91.js';
3
- import { n as none, i as isSome, s as some, a as superSelectionAppService, b as navigationService, S as SuperSelectionAppRoutes, c as injectHistory, d as createStore, e as superSelectionApi, O as Option, f as buildBackendApiClient, g as customFundChoiceApi, h as isNone, j as getPromotedFundId, k as getSuperChoiceUsi, l as getSuperChoiceMemberNumber, m as state$1, t as toUndefined, o as slate, p as SuperCampaignComponentStatus, q as iframe, r as superSelectionAppStencilRoutes, u as factory, v as fromNullable } from './custom-fund-choice.api-45fa478c.js';
3
+ import { n as none, i as isSome, s as some, a as superSelectionAppService, b as navigationService, S as SuperSelectionAppRoutes, c as injectHistory, d as createStore, e as superSelectionApi, O as Option, E as EventTrackingService, f as customFundChoiceApi, g as isNone, h as getPromotedFundId, j as buildBackendApiClient, k as getSuperChoiceUsi, l as getSuperChoiceMemberNumber, m as state$1, t as toUndefined, o as slate, p as SuperCampaignComponentStatus, q as iframe, r as superSelectionAppStencilRoutes, u as factory, v as fromNullable } from './custom-fund-choice.api-b7f9d60c.js';
4
4
  import { A as ActiveRouter } from './active-router-d18b36fb.js';
5
5
 
6
6
  function noop() { }
@@ -261,7 +261,7 @@ class TapSubscriber extends Subscriber {
261
261
  }
262
262
  }
263
263
 
264
- const AppVersion = '5.56.16984';
264
+ const AppVersion = '5.58.17315';
265
265
 
266
266
  class Lazy {
267
267
  constructor(factory) {
@@ -963,122 +963,6 @@ class AustralianFundLookupService {
963
963
  }
964
964
  const australianFundLookupService = new AustralianFundLookupService();
965
965
 
966
- class EventTrackingApi {
967
- static get Instance() {
968
- return this.instance || (this.instance = new this());
969
- }
970
- async PostAnalyticsEventAsync(event) {
971
- return buildBackendApiClient().url('analytics-events').post(event).res();
972
- }
973
- }
974
-
975
- class EventTrackingService {
976
- constructor() {
977
- this.eventTrackingApi = EventTrackingApi.Instance;
978
- }
979
- static get Instance() {
980
- return this.instance || (this.instance = new this());
981
- }
982
- async TrackSuperFundPdsViewedAsync(detail) {
983
- return this.trackEventAsync({
984
- SuperFundPdsViewed: detail
985
- });
986
- }
987
- async TrackPromotedSuperFundDetailViewedAsync(detail) {
988
- return this.trackEventAsync({
989
- SuperFundDetailViewed: {
990
- PromotedFund: detail
991
- }
992
- });
993
- }
994
- async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
995
- return this.trackEventAsync({
996
- SuperFundDetailViewed: {
997
- PromotedDefaultFund: detail
998
- }
999
- });
1000
- }
1001
- async TrackMyOwnSuperFundDetailViewedAsync(detail) {
1002
- return this.trackEventAsync({
1003
- SuperFundDetailViewed: {
1004
- MyOwnFund: detail
1005
- }
1006
- });
1007
- }
1008
- async TrackSmsfSuperFundDetailViewedAsync(detail) {
1009
- return this.trackEventAsync({
1010
- SuperFundDetailViewed: {
1011
- Smsf: detail
1012
- }
1013
- });
1014
- }
1015
- async TrackDefaultSuperFundDetailViewedAsync(detail) {
1016
- return this.trackEventAsync({
1017
- SuperFundDetailViewed: {
1018
- DefaultFund: detail
1019
- }
1020
- });
1021
- }
1022
- async TrackSuperFundNominationViewedAsync(detail) {
1023
- return this.trackEventAsync({
1024
- SuperFundNominationViewed: detail
1025
- });
1026
- }
1027
- async TrackSuperFundNominationDeclinedAsync(detail) {
1028
- return this.trackEventAsync({
1029
- SuperFundNominationDeclined: detail
1030
- });
1031
- }
1032
- async TrackSuperFundDisclaimerViewedAsync(detail) {
1033
- return this.trackEventAsync({
1034
- SuperFundDisclaimerViewed: detail
1035
- });
1036
- }
1037
- async TrackSuperFundDisclaimerAcceptedAsync(detail) {
1038
- return this.trackEventAsync({
1039
- SuperFundDisclaimerAccepted: detail
1040
- });
1041
- }
1042
- async TrackSuperFundPrefillViewedAsync(detail) {
1043
- return this.trackEventAsync({
1044
- SuperFundPrefillViewed: detail
1045
- });
1046
- }
1047
- async TrackSuperFundPrefillDeclinedAsync(detail) {
1048
- return this.trackEventAsync({
1049
- SuperFundPrefillDeclined: detail
1050
- });
1051
- }
1052
- async TrackSuperFundDetailChangeRequestedAsync(detail) {
1053
- return this.trackEventAsync({
1054
- SuperFundDetailChangeRequested: detail
1055
- });
1056
- }
1057
- async TrackSuperCampaignActivationSucceededAsync(detail) {
1058
- return this.trackEventAsync({
1059
- SuperCampaignActivationSucceeded: detail
1060
- });
1061
- }
1062
- async TrackSuperMyOwnFundEngagementStepActivationSucceeded(fundUsi) {
1063
- return this.trackEventAsync({
1064
- SuperMyOwnFundEngagementStepActivationSucceeded: { fundUsi }
1065
- });
1066
- }
1067
- async TrackSuperMyOwnFundEngagementStepContinued(fundUsi, reason) {
1068
- return this.trackEventAsync({
1069
- SuperMyOwnFundEngagementStepContinued: { fundUsi, reason }
1070
- });
1071
- }
1072
- async trackEventAsync(event) {
1073
- try {
1074
- await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
1075
- }
1076
- catch (_a) {
1077
- return;
1078
- }
1079
- }
1080
- }
1081
-
1082
966
  const DefaultFund = class {
1083
967
  constructor(hostRef) {
1084
968
  registerInstance(this, hostRef);
@@ -12983,6 +12867,7 @@ let superSmsfComponentStatus = SuperSmsfComponentStatus.NotLoaded;
12983
12867
  const SuperSmsfHost = class {
12984
12868
  constructor(hostRef) {
12985
12869
  registerInstance(this, hostRef);
12870
+ this.eventTrackingService = EventTrackingService.Instance;
12986
12871
  this.subscribeToSuperSmsfEvents = () => {
12987
12872
  for (const eventName in this.smsfEventHandlers) {
12988
12873
  document.addEventListener(eventName, this.smsfEventHandlers[eventName]);
@@ -12997,6 +12882,10 @@ const SuperSmsfHost = class {
12997
12882
  if (event.detail.sender === 'super-smsf') {
12998
12883
  superSmsfComponentStatus = SuperSmsfComponentStatus.Loaded;
12999
12884
  clearTimeout(this.loadingTimeoutRef);
12885
+ this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
12886
+ promotedFundsShown: superSelectionAppService.promotedFunds,
12887
+ defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
12888
+ });
13000
12889
  }
13001
12890
  return Promise.resolve();
13002
12891
  };
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-107d7c24.js';
2
- import { b as navigationService, a as superSelectionAppService, g as customFundChoiceApi, S as SuperSelectionAppRoutes, O as Option, c as injectHistory } from './custom-fund-choice.api-45fa478c.js';
2
+ import { E as EventTrackingService, a as superSelectionAppService, O as Option, b as navigationService, f as customFundChoiceApi, S as SuperSelectionAppRoutes, c as injectHistory } from './custom-fund-choice.api-b7f9d60c.js';
3
3
  import './active-router-d18b36fb.js';
4
4
 
5
5
  const LoadWaitingTimeout = 30000;
@@ -13,6 +13,7 @@ let superByofComponentStatus = SuperByofComponentStatus.NotLoaded;
13
13
  const SuperByofHost = class {
14
14
  constructor(hostRef) {
15
15
  registerInstance(this, hostRef);
16
+ this.eventTrackingService = EventTrackingService.Instance;
16
17
  this.subscribeToSuperByofEvents = () => {
17
18
  for (const eventName in this.byofEventHandlers) {
18
19
  document.addEventListener(eventName, this.byofEventHandlers[eventName]);
@@ -27,6 +28,10 @@ const SuperByofHost = class {
27
28
  if (event.detail.sender === 'super-byof') {
28
29
  superByofComponentStatus = SuperByofComponentStatus.Loaded;
29
30
  clearTimeout(this.loadingTimeoutRef);
31
+ this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({
32
+ promotedFundsShown: superSelectionAppService.promotedFunds,
33
+ defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
34
+ });
30
35
  }
31
36
  return Promise.resolve();
32
37
  };
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?n(e.value):o(e.value).then(u,a)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(t){return s([e,t])}}function s(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;o=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1];i=u;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(u);break}if(i[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{e as getRenderingRef,f as forceUpdate,h}from"./index-107d7c24.js";import{A as ActiveRouter}from"./active-router-d18b36fb.js";var isSome=function(e){return e._tag==="Some"};var isNone=function(e){return e._tag==="None"};var none={_tag:"None"};var some=function(e){return{_tag:"Some",value:e}};function fromNullable(e){return e==null?none:some(e)}function toUndefined(e){return isNone(e)?undefined:e.value}function injectHistory(e){ActiveRouter.injectProps(e,["history","location"])}function appReady(){postMessage({type:"appReady"})}function postMessage(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function resize(e,t){postMessage({type:"contentResized",height:e,width:t})}function navigation(e){postMessage({type:"pageNavigated",url:e})}function complete(){postMessage({type:"complete"})}function submitSuccess(){postMessage({type:"submitSuccess"})}var iframe={appReady:appReady,resize:resize,navigation:navigation,complete:complete,submitSuccess:submitSuccess};var appendToMap=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var debounce=function(e,t){var n;return function(){var r=[];for(var o=0;o<arguments.length;o++){r[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(isConnected))}}),2e3);var stencilSubscription=function(e){var t=e.on;var n=new Map;if(typeof getRenderingRef==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=getRenderingRef();if(t){appendToMap(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(forceUpdate))}cleanupElements(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(n)}))}};var createObservableMap=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var o=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var i=function(){r.dispose.forEach((function(e){return e()}));o()};var u=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var a=function(e,o){var i=n.get(e);if(t(o,i,e)){n.set(e,o);r.set.forEach((function(t){return t(e,o,i)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return u(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){a(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){removeFromArray(r[e],t)}};var f=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var o=c("reset",(function(){return n(e[t])}));return function(){r();o()}};var p=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:s,get:u,set:a,on:c,onChange:f,use:p,dispose:i,reset:o}};var removeFromArray=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var createStore=function(e,t){var n=createObservableMap(e,t);stencilSubscription(n);return n};var initial={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",fundDetails:{type:"null"},promotedFundId:undefined};var state=createStore(initial).state;var SuperSelectionAppRoutes;(function(e){e["ExistingChoicePage"]="/existing";e["SuperCampaign"]="/super-campaign";e["ChoicePage"]="/";e["MyOwnFund"]="/super-choice/my-own-fund/";e["MyOwnFundEngagementStep"]="/super-choice/my-own-fund-engagement/";e["Prefill"]="/super-choice/prefill/";e["PrefillInvalidMyOwnFundPage"]="/super-choice/sss-prefill-invalid-my-own-fund/";e["PrefillMyOwnFundPage"]="/super-choice/prefill-my-own-fund/";e["PrefillSMSFPage"]="/super-choice/prefill-smsf/";e["PrefillInvalidSMSFPage"]="/super-choice/prefill-invalid-smsf/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["FeaturedFunds"]="/super-choice/featured-funds/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(SuperSelectionAppRoutes||(SuperSelectionAppRoutes={}));var superSelectionAppStencilRoutes=[h("stencil-route",{url:SuperSelectionAppRoutes.ExistingChoicePage,component:"sss-existing-choice-page"}),h("stencil-route",{url:SuperSelectionAppRoutes.SuperCampaign,component:"sss-super-campaign-host"}),h("stencil-route",{exact:true,url:SuperSelectionAppRoutes.ChoicePage,component:"sss-choice-router"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFund,component:"sss-super-byof-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.Prefill,component:"sss-prefill"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillSMSFPage,component:"sss-prefill-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.SelfManagedFund,component:"sss-super-smsf-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.DefaultFund,component:"sss-default-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),h("stencil-route",{url:SuperSelectionAppRoutes.StandardChoice,component:"sss-standard-choice-form"}),h("stencil-route",{url:SuperSelectionAppRoutes.Success,component:"sss-success"})];function createCommonjsModule(e,t,n){return n={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var _function=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function o(e){return function(){return e}}t.constant=o;t.constTrue=o(true);t.constFalse=o(false);t.constNull=o(null);t.constUndefined=o(undefined);t.constVoid=t.constUndefined;function i(e){return function(t,n){return e(n,t)}}t.flip=i;function u(e,t,n,r,o,i,u,a,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return o(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return i(o(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return u(i(o(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return a(u(i(o(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(a(u(i(o(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=u;function a(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=a;function s(e){return e+1}t.increment=s;function c(e){return e-1}t.decrement=c;function f(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=f;function p(e){return function(t){return e.apply(void 0,t)}}t.tupled=p;function l(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=l;function d(e,t,n,r,o,i,u,a,s,c,f,p,l,d,h,m,v,g,y,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return o(r(n(t(e))));case 6:return i(o(r(n(t(e)))));case 7:return u(i(o(r(n(t(e))))));case 8:return a(u(i(o(r(n(t(e)))))));case 9:return s(a(u(i(o(r(n(t(e))))))));case 10:return c(s(a(u(i(o(r(n(t(e)))))))));case 11:return f(c(s(a(u(i(o(r(n(t(e))))))))));case 12:return p(f(c(s(a(u(i(o(r(n(t(e)))))))))));case 13:return l(p(f(c(s(a(u(i(o(r(n(t(e))))))))))));case 14:return d(l(p(f(c(s(a(u(i(o(r(n(t(e)))))))))))));case 15:return h(d(l(p(f(c(s(a(u(i(o(r(n(t(e))))))))))))));case 16:return m(h(d(l(p(f(c(s(a(u(i(o(r(n(t(e)))))))))))))));case 17:return v(m(h(d(l(p(f(c(s(a(u(i(o(r(n(t(e))))))))))))))));case 18:return g(v(m(h(d(l(p(f(c(s(a(u(i(o(r(n(t(e)))))))))))))))));case 19:return y(g(v(m(h(d(l(p(f(c(s(a(u(i(o(r(n(t(e))))))))))))))))));case 20:return b(y(g(v(m(h(d(l(p(f(c(s(a(u(i(o(r(n(t(e)))))))))))))))))))}return}t.pipe=d;t.hole=f;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var m=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=m}));var Option=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var o=function(e){return{_tag:"Some",value:e}};t.some=o;function i(e){return e==null?t.none:t.some(e)}t.fromNullable=i;function u(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=u;function a(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=a;function s(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=s;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function f(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=f;function p(e){return t.isNone(e)?null:e.value}t.toNullable=p;function l(e){return t.isNone(e)?undefined:e.value}t.toUndefined=l;var d=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=d;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return i(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=m;function m(e){return function(n){return t.isNone(n)?t.none:i(e(n.value))}}t.chainNullableK=m;var v=function(e,n){return _function.pipe(e,t.map(n))};var g=function(e,n){return _function.pipe(e,t.ap(n))};var y=function(e,n){return _function.pipe(e,t.chain(n))};var b=function(e,n,r){return _function.pipe(e,t.reduce(n,r))};var _=function(e){var n=t.foldMap(e);return function(e,t){return _function.pipe(e,n(t))}};var S=function(e,n,r){return _function.pipe(e,t.reduceRight(n,r))};var w=function(e){var n=t.traverse(e);return function(e,t){return _function.pipe(e,n(t))}};var C=function(e,n){return _function.pipe(e,t.alt(n))};var F=function(e,n){return _function.pipe(e,t.filter(n))};var O=function(e,n){return _function.pipe(e,t.filterMap(n))};var A=function(e,n){return _function.pipe(e,t.extend(n))};var E=function(e,n){return _function.pipe(e,t.partition(n))};var N=function(e,n){return _function.pipe(e,t.partitionMap(n))};var R=function(e){var n=t.wither(e);return function(e,t){return _function.pipe(e,n(t))}};var P=function(e){var n=t.wilt(e);return function(e,t){return _function.pipe(e,n(t))}};var M=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=M;var I=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=I;var U=function(e){return _function.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=U;var j=function(e){return _function.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=j;t.of=t.some;var D=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=D;var T=function(e){return t.chain((function(n){return _function.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=T;t.flatten=t.chain(_function.identity);var k=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=k;t.alt=t.altW;var B=function(){return t.none};t.zero=B;var x=function(){return t.none};t.throwError=x;var W=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=W;t.duplicate=t.extend(_function.identity);var q=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=q;var L=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=L;var $=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=$;t.compact=t.flatten;var z={left:t.none,right:t.none};var J=function(e){var n=_function.pipe(e,t.map((function(e){return{left:s(e),right:c(e)}})));return t.isNone(n)?z:n.value};t.separate=J;var H=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=H;var K=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=K;var Q=function(e){return function(t){return{left:F(t,(function(t){return!e(t)})),right:F(t,e)}}};t.partition=Q;var Y=function(e){return _function.flow(t.map(e),t.separate)};t.partitionMap=Y;var V=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=V;var X=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=X;var G=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=G;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:s(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function oe(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=oe;function ie(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=ie;function ue(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=ue;function ae(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=ae;t.Functor={URI:t.URI,map:v};t.Applicative={URI:t.URI,map:v,ap:g,of:t.of};t.Monad={URI:t.URI,map:v,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:b,foldMap:_,reduceRight:S};t.Alt={URI:t.URI,map:v,alt:C};t.Alternative={URI:t.URI,map:v,ap:g,of:t.of,alt:C,zero:t.zero};t.Extend={URI:t.URI,map:v,extend:A};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:v,compact:t.compact,separate:t.separate,filter:F,filterMap:O,partition:E,partitionMap:N};t.Traversable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:S,traverse:w,sequence:t.sequence};t.Witherable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:S,traverse:w,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:F,filterMap:O,partition:E,partitionMap:N,wither:R,wilt:P};t.MonadThrow={URI:t.URI,map:v,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:v,of:t.of,ap:g,chain:y,reduce:b,foldMap:_,reduceRight:S,traverse:w,sequence:t.sequence,zero:t.zero,alt:C,extend:A,compact:t.compact,separate:t.separate,filter:F,filterMap:O,partition:E,partitionMap:N,wither:R,wilt:P,throwError:t.throwError};function se(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=se;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function fe(e){return function(n){return t.isSome(e(n))}}t.getRefinement=fe;t.Do=t.of({});var pe=function(e){return t.map(_function.bindTo_(e))};t.bindTo=pe;var le=function(e,n){return t.chain((function(r){return _function.pipe(n(r),t.map((function(t){return _function.bind_(r,e,t)})))}))};t.bind=le;var de=function(e,n){return _function.flow(t.map((function(t){return function(n){return _function.bind_(t,e,n)}})),t.ap(n))};t.apS=de;var he=function(e){return function(n){var r=[];for(var o=0;o<n.length;o++){var i=e(o,n[o]);if(t.isNone(i)){return t.none}r.push(i.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var me=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=me;t.sequenceArray=t.traverseArray(_function.identity)}));function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,u=0,a="";o=n.charAt(u++);~o&&(r=i%4?64*r+o:o,i++%4)?a+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return a};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var 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";var __assign=undefined&&undefined.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __spreadArrays=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};var mix=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=__assign({},e);for(var o in t){if(t.hasOwnProperty(o)){if(t[o]instanceof Array&&e[o]instanceof Array){r[o]=n?__spreadArrays(e[o],t[o]):t[o]}else if(typeof t[o]==="object"&&typeof e[o]==="object"){r[o]=mix(e[o],t[o],n)}else{r[o]=t[o]}}}return r};var __spreadArrays$1=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};var config={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,o=r===void 0?true:r,i=n.instance,u=i===void 0?false:i;var a=[];for(var s=2;s<arguments.length;s++){a[s-2]=arguments[s]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(o&&!c)throw new Error(e+" is not defined");return u&&c?new(c.bind.apply(c,__spreadArrays$1([void 0],a))):c}};var onMatch=function(e,t,n,r){if(!e.getEntriesByName)return false;var o=e.getEntriesByName(t);if(o&&o.length>0){n(o.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);perfs.callbacks.delete(t);if(perfs.callbacks.size<1){perfs.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var lazyObserver=function(e,t){if(!perfs.observer&&e&&t){perfs.observer=new t((function(t){perfs.callbacks.forEach((function(n,r){onMatch(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return perfs.observer};var perfs={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=config.polyfill("performance",{doThrow:false});var r=config.polyfill("PerformanceObserver",{doThrow:false});if(!lazyObserver(n,r))return;if(!onMatch(n,e,t,n)){if(perfs.callbacks.size<1)perfs.observer.observe({entryTypes:["resource","measure"]});perfs.callbacks.set(e,t)}}};var middlewareHelper=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,o){return o===e.length-2?r(n(t)):r(n)}))}};var WretchErrorWrapper=function(){function e(e){this.error=e}return e}();var resolver=function(e){var t=e._url,n=e._catchers,r=e._resolvers,o=e._middlewares,i=e._options;var u=new Map(n);var a=mix(config.defaults,i);var s=config.polyfill("AbortController",{doThrow:false,instance:true});if(!a["signal"]&&s){a["signal"]=s.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var f=middlewareHelper(o)(config.polyfill("fetch"))(t,a);var p=f.catch((function(e){throw new WretchErrorWrapper(e)})).then((function(e){c.clear();if(!e.ok){return e[config.errorType||"text"]().then((function(t){var n=new Error(t);n[config.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var l=function(t){return t.catch((function(t){c.clear();var n=t instanceof WretchErrorWrapper?t.error:t;if(t instanceof WretchErrorWrapper&&u.has("__fromFetch"))return u.get("__fromFetch")(n,e);else if(u.has(n.status))return u.get(n.status)(n,e);else if(u.has(n.name))return u.get(n.name)(n,e);else throw n}))};var d=function(e){return function(t){return e?l(p.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):l(p.then((function(e){return t?t(e):e})))}};var h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(e){f.then((function(t){return perfs.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=s}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[s,h]},error:function(e,t){u.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var __assign$1=undefined&&undefined.__assign||function(){__assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign$1.apply(this,arguments)};var __spreadArrays$2=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r};var JSON_MIME="application/json";var CONTENT_TYPE_HEADER="Content-Type";var Wretcher=function(){function e(e,t,n,r,o,i){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(o===void 0){o=[]}if(i===void 0){i=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=o;this._deferredChain=i}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,o=r===void 0?this._url:r,i=n.options,u=i===void 0?this._options:i,a=n.catchers,s=a===void 0?this._catchers:a,c=n.resolvers,f=c===void 0?this._resolvers:c,p=n.middlewares,l=p===void 0?this._middlewares:p,d=n.deferredChain,h=d===void 0?this._deferredChain:d;return new e(o,__assign$1({},u),new Map(s),__spreadArrays$2(f),__spreadArrays$2(l),__spreadArrays$2(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}config.defaults=t?mix(config.defaults,e):e;return this};e.prototype.errorType=function(e){config.errorType=e;return this};e.prototype.polyfills=function(e){config.polyfills=__assign$1(__assign$1({},config.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?mix(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:appendQueryParams(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:mix(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[CONTENT_TYPE_HEADER]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:__spreadArrays$2(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:__spreadArrays$2(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:__spreadArrays$2(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var o=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==CONTENT_TYPE_HEADER.toLowerCase()||n.startsWith(JSON_MIME)})))?this.json(n):this.body(n);o=o.options(__assign$1(__assign$1({},t),{method:e}));var i=o._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),o);return resolver(i)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===CONTENT_TYPE_HEADER.toLowerCase()&&n.startsWith(JSON_MIME)})))===null||t===void 0?void 0:t[1];return this.content(n||JSON_MIME).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(convertFormData(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:convertFormUrl(e)).content("application/x-www-form-urlencoded")};return e}();var appendQueryParams=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var o=config.polyfill("URLSearchParams",{instance:true});for(var i in t){if(t[i]instanceof Array){for(var u=0,a=t[i];u<a.length;u++){var s=a[u];o.append(i,s)}}else{o.append(i,t[i])}}r=o.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function convertFormData(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=config.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var o=e[0],i=e[1];var u=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);u=u?u+"["+o+"]":o;if(i instanceof Array){for(var a=0,s=i;a<s.length;a++){var c=s[a];n.append(u+"[]",c)}}else if(t&&typeof i==="object"&&(!(t instanceof Array)||!t.includes(o))){if(i!==null){convertFormData(i,t,n,__spreadArrays$2(r,[o]))}}else{n.append(u,i)}}));return n}function encodeQueryValue(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function convertFormUrl(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return encodeQueryValue(t,e)})).join("&")}return encodeQueryValue(t,n)})).join("&")}var factory=Wretcher.factory;factory["default"]=Wretcher.factory;function buildBackendApiClient(){var e=superSelectionAppService.jwt;var t=superSelectionAppService.profileId;var n=superSelectionAppService.accountIdOrDefault;var r=superSelectionAppService.partnerIdOrDefault;return factory(superSelectionAppService.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var slate={fundId:"slate",usi:"32367272075001"};function hydratePromotedFundChoiceDtoKind(e){if("slate"in e){e.kind="slate"}else if("australianRetirementTrust"in e){e.kind="australianRetirementTrust"}else if("aware"in e){e.kind="aware"}else if("active"in e){e.kind="active"}else if("australianEthical"in e){e.kind="australianEthical"}else if("virgin"in e){e.kind="virgin"}else if("spirit"in e){e.kind="spirit"}else if("firstSuper"in e){e.kind="firstSuper"}else if("mercerMyChoice"in e){e.kind="mercerMyChoice"}else if("generic"in e){e.kind="generic"}}function getPromotedFundUsi(e){switch(e.kind){case"slate":return slate.usi;case"australianRetirementTrust":return e.australianRetirementTrust.usi;case"aware":return e.aware.usi;case"active":return e.active.usi;case"australianEthical":return e.australianEthical.usi;case"virgin":return e.virgin.usi;case"spirit":return e.spirit.usi;case"firstSuper":return e.firstSuper.usi;case"mercerMyChoice":return e.mercerMyChoice.usi;case"generic":return e.generic.usi;default:return""}}function getPromotedFundId(e){switch(e.kind){case"slate":return slate.fundId;case"australianRetirementTrust":return"australian-retirement-trust";case"aware":return"aware";case"active":return"active";case"australianEthical":return"australian-ethical";case"virgin":return"virgin";case"spirit":return"spirit";case"firstSuper":return"first-super";case"mercerMyChoice":return"mercermychoice";case"generic":return e.generic.fundId;default:return""}}function getSuperChoiceUsi(e){switch(e.kind){case"Promoted":return some(getPromotedFundUsi(e.promoted));case"MyOwnFund":return some(e.myOwnFund.usi);case"SMSF":return none;case"Default":return some(e.default.usi);case"PromotedDefault":return some(e.promotedDefault.usi);case"DefinedBenefits":return some(e.definedBenefits.usi);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.usi);default:return none}}function getPromotedFundMemberNumber(e){switch(e.kind){case"slate":return e.slate.memberNumber;case"australianRetirementTrust":return e.australianRetirementTrust.memberNumber;case"aware":return e.aware.memberNumber;case"active":return e.active.memberNumber;case"australianEthical":return e.australianEthical.memberNumber;case"virgin":return e.virgin.memberNumber;case"spirit":return e.spirit.memberNumber;case"firstSuper":return e.firstSuper.memberNumber;case"mercerMyChoice":return e.mercerMyChoice.memberNumber;case"generic":return e.generic.memberNumber;default:return""}}function getSuperChoiceMemberNumber(e){switch(e.kind){case"Promoted":return some(getPromotedFundMemberNumber(e.promoted));case"MyOwnFund":return some(e.myOwnFund.memberNumber);case"DefinedBenefits":return some(e.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":return none;default:return none}}function hydrateSuperChoiceDetailsDtoKind(e){if("promoted"in e){e.kind="Promoted"}else if("myOwnFund"in e){e.kind="MyOwnFund"}else if("smsf"in e){e.kind="SMSF"}else if("default"in e){e.kind="Default"}else if("promotedDefault"in e){e.kind="PromotedDefault"}else if("definedBenefits"in e){e.kind="DefinedBenefits"}else if("promotedDefaultWithJoin"in e){e.kind="PromotedDefaultWithJoin"}}var SuperSelectionApi=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,buildBackendApiClient().url("super-choice/australian-funds-v2?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAustralianFundAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=t?"?includeInactive=true":"";return[2,buildBackendApiClient().url("super-choice/australian-funds/"+e+n).get().notFound((function(){throw new Error("Failed to fetch australian super fund.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()];case 1:t=n.sent();if((e=t.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails){hydrateSuperChoiceDetailsDtoKind(t.superBuyer.superChoice.choiceDetails);switch(t.superBuyer.superChoice.choiceDetails.kind){case"Promoted":hydratePromotedFundChoiceDtoKind(t.superBuyer.superChoice.choiceDetails.promoted);break}}return[2,t]}}))}))};e.prototype.clickPromotedTileAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("click-promoted-tile").post(e).res()]}))}))};e.prototype.viewSuperFundPanelAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("view-super-fund-panel").post(e).res()]}))}))};e.prototype.toSearchFilterQueryString=function(e){return"search="+e.searchString+(e.maxRecordCount>0?"&maxRecordCount="+e.maxRecordCount:"")};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var o=function(e){return e&&e.length};return[n,r].filter(o).join("&")};return e}();var superSelectionApi=new SuperSelectionApi;var SuperCampaignComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded";e[e["NotWorking"]=3]="NotWorking"})(SuperCampaignComponentStatus||(SuperCampaignComponentStatus={}));var SuperCampaignState=function(){function e(){this._promotedFundsShown=[]}Object.defineProperty(e.prototype,"PromotedFundIds",{get:function(){return this._promotedFundsShown.map((function(e){return e.fundId}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsShown",{set:function(e){this._promotedFundsShown=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"DefaultFundPosition",{get:function(){var e=this._promotedFundsShown.findIndex((function(e){return e.fundType==="promoted-default"}));if(e===-1)return undefined;return e+1},enumerable:false,configurable:true});return e}();var initialState={apiBaseUrl:Option.none,appBaseUrl:Option.none,profileId:Option.none,jwt:Option.none,superBuyer:Option.none,superChoicePrefill:Option.none,promotedFunds:Option.none,accountConfiguration:Option.none,profileConfiguration:Option.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false,isDefinedBenefitsEligible:Option.none,superCampaignEnabled:true,superCampaignState:undefined,superCampaignComponentStatus:SuperCampaignComponentStatus.NotLoaded,hideFooterSection:false,bringYourOwnFundCustomStepEnabled:false,featuredFundsEnabled:false};var SuperSelectionAppService=function(){function e(){var e=this;var t=createStore(initialState),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=_function.pipe(t,Option.chain((function(e){return Option.fromNullable(o(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(Option.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(Option.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(Option.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return this.superCampaignState.PromotedFundIds}if(Option.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedDefaultFundPosition",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return Option.fromNullable(this.superCampaignState.DefaultFundPosition)}return Option.none},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsConfig",{get:function(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:Option.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:this.isUsingSuperCampaign?"superCampaign":"superSelection"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(Option.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){var e=_function.pipe(this._state.profileConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten);if(Option.isSome(e)){return e}return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return e.accountId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return _function.pipe(this._state.superBuyer,Option.map((function(e){return e.partnerId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(Option.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};Object.defineProperty(e.prototype,"isDefinedBenefitsEligible",{get:function(){return this._state.isDefinedBenefitsEligible},enumerable:false,configurable:true});e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,superSelectionApi.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=Option.fromNullable(e.accountConfiguration);this._state.profileConfiguration=Option.fromNullable(e.profileConfiguration);this._state.superBuyer=Option.fromNullable(e.superBuyer);this._state.promotedFunds=Option.fromNullable(e.promotedFunds);this._state.bringYourOwnFundCustomStepEnabled=e.bringYourOwnFundCustomStepEnabled;this._state.featuredFundsEnabled=e.featuredFundsEnabled;this._state.superChoicePrefill=Option.fromNullable(e.prefill);this._state.isDefinedBenefitsEligible=Option.fromNullable(e.isDefinedBenefitsEligible);if(Option.isSome(this._state.accountConfiguration)){if(this._state.accountConfiguration.value.featureSet.type==="basic"){this._state.superCampaignEnabled=false}}return[2]}}))}))};e.prototype.setSuperCampaignPromotedFundsShown=function(e){if(this._state.superCampaignState!==undefined)this._state.superCampaignState.promotedFundsShown=e;else throw new Error("Cannot set shown funds for SuperCampaing state because it is undefined")};e.prototype.viewSuperFundPanelAsync=function(e,t){return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({},this.promotedFundsConfig),{shownFunds:t?t:this.promotedFundsConfig.shownFunds,placementId:e}))};Object.defineProperty(e.prototype,"superCampaignState",{get:function(){return this._state.superCampaignState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignComponentStatus",{get:function(){return this._state.superCampaignComponentStatus},set:function(e){if(e===SuperCampaignComponentStatus.Loaded){this._state.superCampaignComponentStatus=SuperCampaignComponentStatus.Loaded;this._state.superCampaignState=new SuperCampaignState}else{this._state.superCampaignComponentStatus=e;this._state.superCampaignState=undefined}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUsingSuperCampaign",{get:function(){return this.state.superCampaignEnabled&&this.superCampaignState!==undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBringYourOwnFundCustomStepEnabled",{get:function(){return this.state.bringYourOwnFundCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFeaturedFundsEnabled",{get:function(){return this.state.featuredFundsEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignCanNotBeActivated",{get:function(){return!this.state.superCampaignEnabled||this.superCampaignComponentStatus===SuperCampaignComponentStatus.NotWorking},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hideFooterSection",{get:function(){return this._state.hideFooterSection},set:function(e){this._state.hideFooterSection=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"backendUrl",{get:function(){return Option.map(this.getBaseUrl)(this.state.apiBaseUrl)},enumerable:false,configurable:true});e.prototype.getBaseUrl=function(e){var t=new URL(e);return t.protocol+"//"+t.hostname+(t.port.length>0?":"+t.port:"")};return e}();var superSelectionAppService=new SuperSelectionAppService;var NavigationService=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);iframe.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){state.handleSubmitFn=e.handleSubmitFn;state.fundName=e.fundName;state.fundDetails=e.fundDetails;state.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,SuperSelectionAppRoutes.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=superSelectionAppService.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var navigationService=new NavigationService;var CustomFundChoiceApi=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};e.prototype.submitDefinedBenefitsChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/defined-benefits").post(e).badRequest((function(){throw new Error("Failed to process Defined Benefits choice request")})).text()]}))}))};e.prototype.validateAbnForSMSF=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("super-choice/smsf/"+e+"/validate").get().badRequest((function(){throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()];case 1:t=n.sent();return[2,t.result]}}))}))};return e}();var customFundChoiceApi=new CustomFundChoiceApi;export{Option as O,SuperSelectionAppRoutes as S,superSelectionAppService as a,navigationService as b,injectHistory as c,createStore as d,superSelectionApi as e,buildBackendApiClient as f,customFundChoiceApi as g,isNone as h,isSome as i,getPromotedFundId as j,getSuperChoiceUsi as k,getSuperChoiceMemberNumber as l,state as m,none as n,slate as o,SuperCampaignComponentStatus as p,iframe as q,superSelectionAppStencilRoutes as r,some as s,toUndefined as t,factory as u,fromNullable as v};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function u(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r["throw"](e))}catch(e){o(e)}}function s(e){e.done?n(e.value):i(e.value).then(u,a)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(e){return function(t){return s([e,t])}}function s(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{e as getRenderingRef,f as forceUpdate,h}from"./index-107d7c24.js";import{A as ActiveRouter}from"./active-router-d18b36fb.js";var isSome=function(e){return e._tag==="Some"};var isNone=function(e){return e._tag==="None"};var none={_tag:"None"};var some=function(e){return{_tag:"Some",value:e}};function fromNullable(e){return e==null?none:some(e)}function toUndefined(e){return isNone(e)?undefined:e.value}function injectHistory(e){ActiveRouter.injectProps(e,["history","location"])}function appReady(){postMessage({type:"appReady"})}function postMessage(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function resize(e,t){postMessage({type:"contentResized",height:e,width:t})}function navigation(e){postMessage({type:"pageNavigated",url:e})}function complete(){postMessage({type:"complete"})}function submitSuccess(){postMessage({type:"submitSuccess"})}var iframe={appReady:appReady,resize:resize,navigation:navigation,complete:complete,submitSuccess:submitSuccess};var appendToMap=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var debounce=function(e,t){var n;return function(){var r=[];for(var i=0;i<arguments.length;i++){r[i]=arguments[i]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(isConnected))}}),2e3);var stencilSubscription=function(e){var t=e.on;var n=new Map;if(typeof getRenderingRef==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=getRenderingRef();if(t){appendToMap(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(forceUpdate))}cleanupElements(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(n)}))}};var createObservableMap=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var i=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var o=function(){r.dispose.forEach((function(e){return e()}));i()};var u=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var a=function(e,i){var o=n.get(e);if(t(i,o,e)){n.set(e,i);r.set.forEach((function(t){return t(e,i,o)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return u(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){a(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){removeFromArray(r[e],t)}};var f=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var i=c("reset",(function(){return n(e[t])}));return function(){r();i()}};var p=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:s,get:u,set:a,on:c,onChange:f,use:p,dispose:o,reset:i}};var removeFromArray=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var createStore=function(e,t){var n=createObservableMap(e,t);stencilSubscription(n);return n};var initial={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",fundDetails:{type:"null"},promotedFundId:undefined};var state=createStore(initial).state;var SuperSelectionAppRoutes;(function(e){e["ExistingChoicePage"]="/existing";e["SuperCampaign"]="/super-campaign";e["ChoicePage"]="/";e["MyOwnFund"]="/super-choice/my-own-fund/";e["MyOwnFundEngagementStep"]="/super-choice/my-own-fund-engagement/";e["Prefill"]="/super-choice/prefill/";e["PrefillInvalidMyOwnFundPage"]="/super-choice/sss-prefill-invalid-my-own-fund/";e["PrefillMyOwnFundPage"]="/super-choice/prefill-my-own-fund/";e["PrefillSMSFPage"]="/super-choice/prefill-smsf/";e["PrefillInvalidSMSFPage"]="/super-choice/prefill-invalid-smsf/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["FeaturedFunds"]="/super-choice/featured-funds/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(SuperSelectionAppRoutes||(SuperSelectionAppRoutes={}));var superSelectionAppStencilRoutes=[h("stencil-route",{url:SuperSelectionAppRoutes.ExistingChoicePage,component:"sss-existing-choice-page"}),h("stencil-route",{url:SuperSelectionAppRoutes.SuperCampaign,component:"sss-super-campaign-host"}),h("stencil-route",{exact:true,url:SuperSelectionAppRoutes.ChoicePage,component:"sss-choice-router"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFund,component:"sss-super-byof-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.Prefill,component:"sss-prefill"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillSMSFPage,component:"sss-prefill-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.SelfManagedFund,component:"sss-super-smsf-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.DefaultFund,component:"sss-default-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),h("stencil-route",{url:SuperSelectionAppRoutes.StandardChoice,component:"sss-standard-choice-form"}),h("stencil-route",{url:SuperSelectionAppRoutes.Success,component:"sss-success"})];function createCommonjsModule(e,t,n){return n={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var _function=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function i(e){return function(){return e}}t.constant=i;t.constTrue=i(true);t.constFalse=i(false);t.constNull=i(null);t.constUndefined=i(undefined);t.constVoid=t.constUndefined;function o(e){return function(t,n){return e(n,t)}}t.flip=o;function u(e,t,n,r,i,o,u,a,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return o(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return u(o(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return a(u(o(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(a(u(o(i(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=u;function a(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=a;function s(e){return e+1}t.increment=s;function c(e){return e-1}t.decrement=c;function f(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=f;function p(e){return function(t){return e.apply(void 0,t)}}t.tupled=p;function l(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=l;function d(e,t,n,r,i,o,u,a,s,c,f,p,l,d,h,m,v,g,y,_){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return o(i(r(n(t(e)))));case 7:return u(o(i(r(n(t(e))))));case 8:return a(u(o(i(r(n(t(e)))))));case 9:return s(a(u(o(i(r(n(t(e))))))));case 10:return c(s(a(u(o(i(r(n(t(e)))))))));case 11:return f(c(s(a(u(o(i(r(n(t(e))))))))));case 12:return p(f(c(s(a(u(o(i(r(n(t(e)))))))))));case 13:return l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))));case 14:return d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))));case 15:return h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))));case 16:return m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))));case 17:return v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))))));case 18:return g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))))));case 19:return y(g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e))))))))))))))))));case 20:return _(y(g(v(m(h(d(l(p(f(c(s(a(u(o(i(r(n(t(e)))))))))))))))))))}return}t.pipe=d;t.hole=f;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var m=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=m}));var Option=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var i=function(e){return{_tag:"Some",value:e}};t.some=i;function o(e){return e==null?t.none:t.some(e)}t.fromNullable=o;function u(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=u;function a(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=a;function s(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=s;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function f(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=f;function p(e){return t.isNone(e)?null:e.value}t.toNullable=p;function l(e){return t.isNone(e)?undefined:e.value}t.toUndefined=l;var d=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=d;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return o(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=m;function m(e){return function(n){return t.isNone(n)?t.none:o(e(n.value))}}t.chainNullableK=m;var v=function(e,n){return _function.pipe(e,t.map(n))};var g=function(e,n){return _function.pipe(e,t.ap(n))};var y=function(e,n){return _function.pipe(e,t.chain(n))};var _=function(e,n,r){return _function.pipe(e,t.reduce(n,r))};var b=function(e){var n=t.foldMap(e);return function(e,t){return _function.pipe(e,n(t))}};var S=function(e,n,r){return _function.pipe(e,t.reduceRight(n,r))};var w=function(e){var n=t.traverse(e);return function(e,t){return _function.pipe(e,n(t))}};var F=function(e,n){return _function.pipe(e,t.alt(n))};var A=function(e,n){return _function.pipe(e,t.filter(n))};var C=function(e,n){return _function.pipe(e,t.filterMap(n))};var O=function(e,n){return _function.pipe(e,t.extend(n))};var E=function(e,n){return _function.pipe(e,t.partition(n))};var P=function(e,n){return _function.pipe(e,t.partitionMap(n))};var N=function(e){var n=t.wither(e);return function(e,t){return _function.pipe(e,n(t))}};var R=function(e){var n=t.wilt(e);return function(e,t){return _function.pipe(e,n(t))}};var M=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=M;var k=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=k;var D=function(e){return _function.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=D;var T=function(e){return _function.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=T;t.of=t.some;var I=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=I;var U=function(e){return t.chain((function(n){return _function.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=U;t.flatten=t.chain(_function.identity);var j=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=j;t.alt=t.altW;var B=function(){return t.none};t.zero=B;var x=function(){return t.none};t.throwError=x;var W=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=W;t.duplicate=t.extend(_function.identity);var q=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=q;var L=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=L;var V=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=V;t.compact=t.flatten;var $={left:t.none,right:t.none};var z=function(e){var n=_function.pipe(e,t.map((function(e){return{left:s(e),right:c(e)}})));return t.isNone(n)?$:n.value};t.separate=z;var J=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=J;var H=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=H;var K=function(e){return function(t){return{left:A(t,(function(t){return!e(t)})),right:A(t,e)}}};t.partition=K;var Q=function(e){return _function.flow(t.map(e),t.separate)};t.partitionMap=Q;var Y=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=Y;var X=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=X;var G=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=G;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:s(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function ie(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=ie;function oe(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=oe;function ue(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=ue;function ae(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=ae;t.Functor={URI:t.URI,map:v};t.Applicative={URI:t.URI,map:v,ap:g,of:t.of};t.Monad={URI:t.URI,map:v,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:_,foldMap:b,reduceRight:S};t.Alt={URI:t.URI,map:v,alt:F};t.Alternative={URI:t.URI,map:v,ap:g,of:t.of,alt:F,zero:t.zero};t.Extend={URI:t.URI,map:v,extend:O};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:v,compact:t.compact,separate:t.separate,filter:A,filterMap:C,partition:E,partitionMap:P};t.Traversable={URI:t.URI,map:v,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence};t.Witherable={URI:t.URI,map:v,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:A,filterMap:C,partition:E,partitionMap:P,wither:N,wilt:R};t.MonadThrow={URI:t.URI,map:v,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:v,of:t.of,ap:g,chain:y,reduce:_,foldMap:b,reduceRight:S,traverse:w,sequence:t.sequence,zero:t.zero,alt:F,extend:O,compact:t.compact,separate:t.separate,filter:A,filterMap:C,partition:E,partitionMap:P,wither:N,wilt:R,throwError:t.throwError};function se(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=se;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function fe(e){return function(n){return t.isSome(e(n))}}t.getRefinement=fe;t.Do=t.of({});var pe=function(e){return t.map(_function.bindTo_(e))};t.bindTo=pe;var le=function(e,n){return t.chain((function(r){return _function.pipe(n(r),t.map((function(t){return _function.bind_(r,e,t)})))}))};t.bind=le;var de=function(e,n){return _function.flow(t.map((function(t){return function(n){return _function.bind_(t,e,n)}})),t.ap(n))};t.apS=de;var he=function(e){return function(n){var r=[];for(var i=0;i<n.length;i++){var o=e(i,n[i]);if(t.isNone(o)){return t.none}r.push(o.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var me=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=me;t.sequenceArray=t.traverseArray(_function.identity)}));function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,u=0,a="";i=n.charAt(u++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var i=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[i]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";var __assign=undefined&&undefined.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArrays=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var mix=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=__assign({},e);for(var i in t){if(t.hasOwnProperty(i)){if(t[i]instanceof Array&&e[i]instanceof Array){r[i]=n?__spreadArrays(e[i],t[i]):t[i]}else if(typeof t[i]==="object"&&typeof e[i]==="object"){r[i]=mix(e[i],t[i],n)}else{r[i]=t[i]}}}return r};var __spreadArrays$1=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var config={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,i=r===void 0?true:r,o=n.instance,u=o===void 0?false:o;var a=[];for(var s=2;s<arguments.length;s++){a[s-2]=arguments[s]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(i&&!c)throw new Error(e+" is not defined");return u&&c?new(c.bind.apply(c,__spreadArrays$1([void 0],a))):c}};var onMatch=function(e,t,n,r){if(!e.getEntriesByName)return false;var i=e.getEntriesByName(t);if(i&&i.length>0){n(i.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);perfs.callbacks.delete(t);if(perfs.callbacks.size<1){perfs.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var lazyObserver=function(e,t){if(!perfs.observer&&e&&t){perfs.observer=new t((function(t){perfs.callbacks.forEach((function(n,r){onMatch(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return perfs.observer};var perfs={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=config.polyfill("performance",{doThrow:false});var r=config.polyfill("PerformanceObserver",{doThrow:false});if(!lazyObserver(n,r))return;if(!onMatch(n,e,t,n)){if(perfs.callbacks.size<1)perfs.observer.observe({entryTypes:["resource","measure"]});perfs.callbacks.set(e,t)}}};var middlewareHelper=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,i){return i===e.length-2?r(n(t)):r(n)}))}};var WretchErrorWrapper=function(){function e(e){this.error=e}return e}();var resolver=function(e){var t=e._url,n=e._catchers,r=e._resolvers,i=e._middlewares,o=e._options;var u=new Map(n);var a=mix(config.defaults,o);var s=config.polyfill("AbortController",{doThrow:false,instance:true});if(!a["signal"]&&s){a["signal"]=s.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var f=middlewareHelper(i)(config.polyfill("fetch"))(t,a);var p=f.catch((function(e){throw new WretchErrorWrapper(e)})).then((function(e){c.clear();if(!e.ok){return e[config.errorType||"text"]().then((function(t){var n=new Error(t);n[config.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var l=function(t){return t.catch((function(t){c.clear();var n=t instanceof WretchErrorWrapper?t.error:t;if(t instanceof WretchErrorWrapper&&u.has("__fromFetch"))return u.get("__fromFetch")(n,e);else if(u.has(n.status))return u.get(n.status)(n,e);else if(u.has(n.name))return u.get(n.name)(n,e);else throw n}))};var d=function(e){return function(t){return e?l(p.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):l(p.then((function(e){return t?t(e):e})))}};var h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(e){f.then((function(t){return perfs.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=s}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[s,h]},error:function(e,t){u.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var __assign$1=undefined&&undefined.__assign||function(){__assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign$1.apply(this,arguments)};var __spreadArrays$2=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)r[i]=o[u];return r};var JSON_MIME="application/json";var CONTENT_TYPE_HEADER="Content-Type";var Wretcher=function(){function e(e,t,n,r,i,o){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(i===void 0){i=[]}if(o===void 0){o=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=i;this._deferredChain=o}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,i=r===void 0?this._url:r,o=n.options,u=o===void 0?this._options:o,a=n.catchers,s=a===void 0?this._catchers:a,c=n.resolvers,f=c===void 0?this._resolvers:c,p=n.middlewares,l=p===void 0?this._middlewares:p,d=n.deferredChain,h=d===void 0?this._deferredChain:d;return new e(i,__assign$1({},u),new Map(s),__spreadArrays$2(f),__spreadArrays$2(l),__spreadArrays$2(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}config.defaults=t?mix(config.defaults,e):e;return this};e.prototype.errorType=function(e){config.errorType=e;return this};e.prototype.polyfills=function(e){config.polyfills=__assign$1(__assign$1({},config.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?mix(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:appendQueryParams(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:mix(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[CONTENT_TYPE_HEADER]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:__spreadArrays$2(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:__spreadArrays$2(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:__spreadArrays$2(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var i=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==CONTENT_TYPE_HEADER.toLowerCase()||n.startsWith(JSON_MIME)})))?this.json(n):this.body(n);i=i.options(__assign$1(__assign$1({},t),{method:e}));var o=i._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),i);return resolver(o)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===CONTENT_TYPE_HEADER.toLowerCase()&&n.startsWith(JSON_MIME)})))===null||t===void 0?void 0:t[1];return this.content(n||JSON_MIME).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(convertFormData(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:convertFormUrl(e)).content("application/x-www-form-urlencoded")};return e}();var appendQueryParams=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var i=config.polyfill("URLSearchParams",{instance:true});for(var o in t){if(t[o]instanceof Array){for(var u=0,a=t[o];u<a.length;u++){var s=a[u];i.append(o,s)}}else{i.append(o,t[o])}}r=i.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function convertFormData(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=config.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var i=e[0],o=e[1];var u=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);u=u?u+"["+i+"]":i;if(o instanceof Array){for(var a=0,s=o;a<s.length;a++){var c=s[a];n.append(u+"[]",c)}}else if(t&&typeof o==="object"&&(!(t instanceof Array)||!t.includes(i))){if(o!==null){convertFormData(o,t,n,__spreadArrays$2(r,[i]))}}else{n.append(u,o)}}));return n}function encodeQueryValue(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function convertFormUrl(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return encodeQueryValue(t,e)})).join("&")}return encodeQueryValue(t,n)})).join("&")}var factory=Wretcher.factory;factory["default"]=Wretcher.factory;function buildBackendApiClient(){var e=superSelectionAppService.jwt;var t=superSelectionAppService.profileId;var n=superSelectionAppService.accountIdOrDefault;var r=superSelectionAppService.partnerIdOrDefault;return factory(superSelectionAppService.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var slate={fundId:"slate",usi:"32367272075001"};function hydratePromotedFundChoiceDtoKind(e){if("slate"in e){e.kind="slate"}else if("australianRetirementTrust"in e){e.kind="australianRetirementTrust"}else if("aware"in e){e.kind="aware"}else if("active"in e){e.kind="active"}else if("australianEthical"in e){e.kind="australianEthical"}else if("virgin"in e){e.kind="virgin"}else if("spirit"in e){e.kind="spirit"}else if("firstSuper"in e){e.kind="firstSuper"}else if("mercerMyChoice"in e){e.kind="mercerMyChoice"}else if("generic"in e){e.kind="generic"}}function getPromotedFundUsi(e){switch(e.kind){case"slate":return slate.usi;case"australianRetirementTrust":return e.australianRetirementTrust.usi;case"aware":return e.aware.usi;case"active":return e.active.usi;case"australianEthical":return e.australianEthical.usi;case"virgin":return e.virgin.usi;case"spirit":return e.spirit.usi;case"firstSuper":return e.firstSuper.usi;case"mercerMyChoice":return e.mercerMyChoice.usi;case"generic":return e.generic.usi;default:return""}}function getPromotedFundId(e){switch(e.kind){case"slate":return slate.fundId;case"australianRetirementTrust":return"australian-retirement-trust";case"aware":return"aware";case"active":return"active";case"australianEthical":return"australian-ethical";case"virgin":return"virgin";case"spirit":return"spirit";case"firstSuper":return"first-super";case"mercerMyChoice":return"mercermychoice";case"generic":return e.generic.fundId;default:return""}}function getSuperChoiceUsi(e){switch(e.kind){case"Promoted":return some(getPromotedFundUsi(e.promoted));case"MyOwnFund":return some(e.myOwnFund.usi);case"SMSF":return none;case"Default":return some(e.default.usi);case"PromotedDefault":return some(e.promotedDefault.usi);case"DefinedBenefits":return some(e.definedBenefits.usi);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.usi);default:return none}}function getPromotedFundMemberNumber(e){switch(e.kind){case"slate":return e.slate.memberNumber;case"australianRetirementTrust":return e.australianRetirementTrust.memberNumber;case"aware":return e.aware.memberNumber;case"active":return e.active.memberNumber;case"australianEthical":return e.australianEthical.memberNumber;case"virgin":return e.virgin.memberNumber;case"spirit":return e.spirit.memberNumber;case"firstSuper":return e.firstSuper.memberNumber;case"mercerMyChoice":return e.mercerMyChoice.memberNumber;case"generic":return e.generic.memberNumber;default:return""}}function getSuperChoiceMemberNumber(e){switch(e.kind){case"Promoted":return some(getPromotedFundMemberNumber(e.promoted));case"MyOwnFund":return some(e.myOwnFund.memberNumber);case"DefinedBenefits":return some(e.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":return none;default:return none}}function hydrateSuperChoiceDetailsDtoKind(e){if("promoted"in e){e.kind="Promoted"}else if("myOwnFund"in e){e.kind="MyOwnFund"}else if("smsf"in e){e.kind="SMSF"}else if("default"in e){e.kind="Default"}else if("promotedDefault"in e){e.kind="PromotedDefault"}else if("definedBenefits"in e){e.kind="DefinedBenefits"}else if("promotedDefaultWithJoin"in e){e.kind="PromotedDefaultWithJoin"}}var SuperSelectionApi=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,buildBackendApiClient().url("super-choice/australian-funds-v2?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAustralianFundAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=t?"?includeInactive=true":"";return[2,buildBackendApiClient().url("super-choice/australian-funds/"+e+n).get().notFound((function(){throw new Error("Failed to fetch australian super fund.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()];case 1:t=n.sent();if((e=t.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails){hydrateSuperChoiceDetailsDtoKind(t.superBuyer.superChoice.choiceDetails);switch(t.superBuyer.superChoice.choiceDetails.kind){case"Promoted":hydratePromotedFundChoiceDtoKind(t.superBuyer.superChoice.choiceDetails.promoted);break}}return[2,t]}}))}))};e.prototype.clickPromotedTileAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("click-promoted-tile").post(e).res()]}))}))};e.prototype.viewSuperFundPanelAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("view-super-fund-panel").post(e).res()]}))}))};e.prototype.toSearchFilterQueryString=function(e){return"search="+e.searchString+(e.maxRecordCount>0?"&maxRecordCount="+e.maxRecordCount:"")};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var i=function(e){return e&&e.length};return[n,r].filter(i).join("&")};return e}();var superSelectionApi=new SuperSelectionApi;var SuperCampaignComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded";e[e["NotWorking"]=3]="NotWorking"})(SuperCampaignComponentStatus||(SuperCampaignComponentStatus={}));var SuperCampaignState=function(){function e(){this._promotedFundsShown=[]}Object.defineProperty(e.prototype,"PromotedFundIds",{get:function(){return this._promotedFundsShown.map((function(e){return e.fundId}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsShown",{set:function(e){this._promotedFundsShown=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"DefaultFundPosition",{get:function(){var e=this._promotedFundsShown.findIndex((function(e){return e.fundType==="promoted-default"}));if(e===-1)return undefined;return e+1},enumerable:false,configurable:true});return e}();var initialState={apiBaseUrl:Option.none,appBaseUrl:Option.none,profileId:Option.none,jwt:Option.none,superBuyer:Option.none,superChoicePrefill:Option.none,promotedFunds:Option.none,accountConfiguration:Option.none,profileConfiguration:Option.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false,isDefinedBenefitsEligible:Option.none,superCampaignEnabled:true,superCampaignState:undefined,superCampaignComponentStatus:SuperCampaignComponentStatus.NotLoaded,hideFooterSection:false,bringYourOwnFundCustomStepEnabled:false,featuredFundsEnabled:false};var SuperSelectionAppService=function(){function e(){var e=this;var t=createStore(initialState),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=_function.pipe(t,Option.chain((function(e){return Option.fromNullable(o(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(Option.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(Option.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(Option.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return this.superCampaignState.PromotedFundIds}if(Option.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedDefaultFundPosition",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return Option.fromNullable(this.superCampaignState.DefaultFundPosition)}return Option.none},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsConfig",{get:function(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:Option.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:this.isUsingSuperCampaign?"superCampaign":"superSelection"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(Option.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){var e=_function.pipe(this._state.profileConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten);if(Option.isSome(e)){return e}return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return e.accountId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return _function.pipe(this._state.superBuyer,Option.map((function(e){return e.partnerId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(Option.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};Object.defineProperty(e.prototype,"isDefinedBenefitsEligible",{get:function(){return this._state.isDefinedBenefitsEligible},enumerable:false,configurable:true});e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,superSelectionApi.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=Option.fromNullable(e.accountConfiguration);this._state.profileConfiguration=Option.fromNullable(e.profileConfiguration);this._state.superBuyer=Option.fromNullable(e.superBuyer);this._state.promotedFunds=Option.fromNullable(e.promotedFunds);this._state.bringYourOwnFundCustomStepEnabled=e.bringYourOwnFundCustomStepEnabled;this._state.featuredFundsEnabled=e.featuredFundsEnabled;this._state.superChoicePrefill=Option.fromNullable(e.prefill);this._state.isDefinedBenefitsEligible=Option.fromNullable(e.isDefinedBenefitsEligible);if(Option.isSome(this._state.accountConfiguration)){if(this._state.accountConfiguration.value.featureSet.type==="basic"){this._state.superCampaignEnabled=false}}return[2]}}))}))};e.prototype.setSuperCampaignPromotedFundsShown=function(e){if(this._state.superCampaignState!==undefined)this._state.superCampaignState.promotedFundsShown=e;else throw new Error("Cannot set shown funds for SuperCampaing state because it is undefined")};e.prototype.viewSuperFundPanelAsync=function(e,t){return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({},this.promotedFundsConfig),{shownFunds:t?t:this.promotedFundsConfig.shownFunds,placementId:e}))};Object.defineProperty(e.prototype,"superCampaignState",{get:function(){return this._state.superCampaignState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignComponentStatus",{get:function(){return this._state.superCampaignComponentStatus},set:function(e){if(e===SuperCampaignComponentStatus.Loaded){this._state.superCampaignComponentStatus=SuperCampaignComponentStatus.Loaded;this._state.superCampaignState=new SuperCampaignState}else{this._state.superCampaignComponentStatus=e;this._state.superCampaignState=undefined}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUsingSuperCampaign",{get:function(){return this.state.superCampaignEnabled&&this.superCampaignState!==undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBringYourOwnFundCustomStepEnabled",{get:function(){return this.state.bringYourOwnFundCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFeaturedFundsEnabled",{get:function(){return this.state.featuredFundsEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignCanNotBeActivated",{get:function(){return!this.state.superCampaignEnabled||this.superCampaignComponentStatus===SuperCampaignComponentStatus.NotWorking},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hideFooterSection",{get:function(){return this._state.hideFooterSection},set:function(e){this._state.hideFooterSection=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"backendUrl",{get:function(){return Option.map(this.getBaseUrl)(this.state.apiBaseUrl)},enumerable:false,configurable:true});e.prototype.getBaseUrl=function(e){var t=new URL(e);return t.protocol+"//"+t.hostname+(t.port.length>0?":"+t.port:"")};return e}();var superSelectionAppService=new SuperSelectionAppService;var NavigationService=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);iframe.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){state.handleSubmitFn=e.handleSubmitFn;state.fundName=e.fundName;state.fundDetails=e.fundDetails;state.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,SuperSelectionAppRoutes.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=superSelectionAppService.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var navigationService=new NavigationService;var EventTrackingApi=function(){function e(){}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.PostAnalyticsEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("analytics-events").post(e).res()]}))}))};return e}();var EventTrackingService=function(){function e(){this.eventTrackingApi=EventTrackingApi.Instance}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.TrackSuperFundPdsViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPdsViewed:e})]}))}))};e.prototype.TrackPromotedSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})]}))}))};e.prototype.TrackPromotedDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:e}})]}))}))};e.prototype.TrackMyOwnSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})]}))}))};e.prototype.TrackSmsfSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})]}))}))};e.prototype.TrackDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})]}))}))};e.prototype.TrackSuperFundNominationViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationViewed:e})]}))}))};e.prototype.TrackSuperFundNominationDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationDeclined:e})]}))}))};e.prototype.TrackSuperFundDisclaimerViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerViewed:e})]}))}))};e.prototype.TrackSuperFundDisclaimerAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerAccepted:e})]}))}))};e.prototype.TrackSuperFundPrefillViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillViewed:e})]}))}))};e.prototype.TrackSuperFundPrefillDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillDeclined:e})]}))}))};e.prototype.TrackSuperFundDetailChangeRequestedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailChangeRequested:e})]}))}))};e.prototype.TrackSuperCampaignActivationSucceededAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperCampaignActivationSucceeded:e})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepActivationSucceeded=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepActivationSucceeded:{fundUsi:e}})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepContinued=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepContinued:{fundUsi:e,reason:t}})]}))}))};e.prototype.trackEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,this.eventTrackingApi.PostAnalyticsEventAsync({event:e})];case 1:n.sent();return[3,3];case 2:t=n.sent();return[2];case 3:return[2]}}))}))};return e}();var CustomFundChoiceApi=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};e.prototype.submitDefinedBenefitsChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/defined-benefits").post(e).badRequest((function(){throw new Error("Failed to process Defined Benefits choice request")})).text()]}))}))};e.prototype.validateAbnForSMSF=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("super-choice/smsf/"+e+"/validate").get().badRequest((function(){throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()];case 1:t=n.sent();return[2,t.result]}}))}))};return e}();var customFundChoiceApi=new CustomFundChoiceApi;export{EventTrackingService as E,Option as O,SuperSelectionAppRoutes as S,superSelectionAppService as a,navigationService as b,injectHistory as c,createStore as d,superSelectionApi as e,customFundChoiceApi as f,isNone as g,getPromotedFundId as h,isSome as i,buildBackendApiClient as j,getSuperChoiceUsi as k,getSuperChoiceMemberNumber as l,state as m,none as n,slate as o,SuperCampaignComponentStatus as p,iframe as q,superSelectionAppStencilRoutes as r,some as s,toUndefined as t,factory as u,fromNullable as v};