@flarehr/apollo-super-selection 4.56.44913 → 4.58.46161
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.
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-26251f49.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-8263f5b7.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
- package/dist/lib/cjs/sss-button_41.cjs.entry.js +165 -26
- package/dist/lib/collection/components/super-campaign/super-campaign-types.js +5 -1
- package/dist/lib/collection/components/super-campaign/super-campaign.js +140 -5
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +8 -15
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +3 -3
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +17 -3
- package/dist/lib/esm/sss-button_41.entry.js +165 -26
- package/dist/lib/esm-es5/sss-button_41.entry.js +4 -4
- package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +40 -2
- package/dist/lib/types/components/super-campaign/super-campaign.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +4 -3
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +8 -4
- package/package.json +1 -1
- package/dist/lib/apollo-super-selection/p-1a253321.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-47600481.system.entry.js +0 -69
- package/readme.md +0 -41
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{r as t,h as e,g as n,f as i,a as r,H as s,c as a,F as o,s as u,d as c,e as l}from"./p-51c6dd08.js";import{f as d,m as h,S as f,a as m,i as p,b as v,O as w,c as g,d as b,g as y,h as x,j as S,k as C,l as F,Q as k}from"./p-29c11183.js";import{A}from"./p-7a89efaf.js";function N(){}function M(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(M(((n,i)=>d(t(n,i)).pipe(h(((t,r)=>e(n,t,i,r))))),n)):("number"==typeof e&&(n=e),e=>e.lift(new P(t,n)))}class P{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new E(t,this.project,this.concurrent))}}class E extends f{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)}_innerSub(t){const e=new m(this),n=this.destination;n.add(e);const i=p(t,e);i!==e&&n.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function D(t,e,n,i){return g(n)&&(i=n,n=void 0),i?D(t,e,n).pipe(h((t=>v(t)?i(...t):i(t)))):new w((i=>{I(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)}))}function I(t,e,n,i,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,r),s=()=>i.removeEventListener(e,n,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),s=()=>i.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(e,n),s=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s<a;s++)I(t[s],e,n,i,r)}i.add(s)}class _{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new B(t,this.dueTime,this.scheduler))}}class B extends y{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(T,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function T(t){t.debouncedNext()}function j(t,e,n){return function(i){return i.lift(new O(t,e,n))}}class O{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new L(t,this.nextOrObserver,this.error,this.complete))}}class L extends y{constructor(t,e,n,i){super(t),this._tapNext=N,this._tapError=N,this._tapComplete=N,this._tapError=n||N,this._tapComplete=i||N,g(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||N,this._tapError=e.error||N,this._tapComplete=e.complete||N)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var R=function(t){return"Some"===t._tag},U=function(t){return"None"===t._tag},q={_tag:"None"},V=function(t){return{_tag:"Some",value:t}};function H(t){return U(t)?void 0:t.value}class z{constructor(t){this.factory=t,this._value=q}get value(){if(R(this._value))return this._value.value;const t=this.factory();return this._value=V(t),t}}function W(t){A.injectProps(t,["history","location"])}const $=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),J=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),G=t=>t.replace(/([=!:$/()])/g,"\\$1"),X=t=>t&&t.sensitive?"":"i",Y=(t,e,n)=>{for(var i=(n=n||{}).strict,r=!1!==n.end,s=J(n.delimiter||"/"),a=n.delimiters||"./",o=[].concat(n.endsWith||[]).map(J).concat("$").join("|"),u="",c=!1,l=0;l<t.length;l++){var d=t[l];if("string"==typeof d)u+=J(d),c=l===t.length-1&&a.indexOf(d[d.length-1])>-1;else{var h=J(d.prefix||""),f=d.repeat?"(?:"+d.pattern+")(?:"+h+"(?:"+d.pattern+"))*":d.pattern;e&&e.push(d),u+=d.optional?d.partial?h+"("+f+")?":"(?:"+h+"("+f+"))?":h+"("+f+")"}}return r?(i||(u+="(?:"+s+")?"),u+="$"===o?"$":"(?="+o+")"):(i||(u+="(?:"+s+"(?="+o+"))?"),c||(u+="(?="+s+"|"+o+")")),new RegExp("^"+u,X(n))},K=(t,e,n)=>t instanceof RegExp?((t,e)=>{if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var i=0;i<n.length;i++)e.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,e):Array.isArray(t)?((t,e,n)=>{for(var i=[],r=0;r<t.length;r++)i.push(K(t[r],e,n).source);return new RegExp("(?:"+i.join("|")+")",X(n))})(t,e,n):((t,e,n)=>Y(((t,e)=>{for(var n,i=[],r=0,s=0,a="",o=e&&e.delimiter||"/",u=e&&e.delimiters||"./",c=!1;null!==(n=$.exec(t));){var l=n[0],d=n[1],h=n.index;if(a+=t.slice(s,h),s=h+l.length,d)a+=d[1],c=!0;else{var f="",m=t[s],p=n[2],v=n[3],w=n[4],g=n[5];if(!c&&a.length){var b=a.length-1;u.indexOf(a[b])>-1&&(f=a[b],a=a.slice(0,b))}a&&(i.push(a),a="",c=!1);var y=f||o,x=v||w;i.push({name:p||r++,prefix:f,delimiter:y,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==f&&void 0!==m&&m!==f,pattern:x?G(x):"[^"+J(y)+"]+?"})}}return(a||s<t.length)&&i.push(a+t.substr(s)),i})(t,n),e,n))(t,e,n),Z=(t,e)=>new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t),Q=(t,e)=>Z(t,e)?t.substr(e.length):t,tt=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,et=t=>"/"===t.charAt(0)?t:"/"+t,nt=t=>"/"===t.charAt(0)?t.substr(1):t,it=t=>{const{pathname:e,search:n,hash:i}=t;let r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},rt=t=>"/"===t.charAt(0),st=t=>Math.random().toString(36).substr(2,t),at=(t,e)=>{for(let n=e,i=n+1,r=t.length;i<r;n+=1,i+=1)t[n]=t[i];t.pop()},ot=(t,e)=>{if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>ot(t,e[n])));const n=typeof t;if(n!==typeof e)return!1;if("object"===n){const n=t.valueOf(),i=e.valueOf();if(n!==t||i!==e)return ot(n,i);const r=Object.keys(t),s=Object.keys(e);return r.length===s.length&&r.every((n=>ot(t[n],e[n])))}return!1},ut=(t,e,n,i)=>{let r;"string"==typeof t?(r=(t=>{let e=t||"/",n="",i="";const r=e.indexOf("#");-1!==r&&(i=e.substr(r),e=e.substr(0,r));const s=e.indexOf("?");return-1!==s&&(n=e.substr(s),e=e.substr(0,s)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==e&&(r.state=e)):(r=Object.assign({pathname:""},t),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var s;return r.key=n,i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=((t,e="")=>{let n,i=e&&e.split("/")||[],r=0;const s=t&&t.split("/")||[],a=t&&rt(t),o=e&&rt(e),u=a||o;if(t&&rt(t)?i=s:s.length&&(i.pop(),i=i.concat(s)),!i.length)return"/";if(i.length){const t=i[i.length-1];n="."===t||".."===t||""===t}else n=!1;for(let t=i.length;t>=0;t--){const e=i[t];"."===e?at(i,t):".."===e?(at(i,t),r++):r&&(at(i,t),r--)}if(!u)for(;r--;r)i.unshift("..");!u||""===i[0]||i[0]&&rt(i[0])||i.unshift("");let c=i.join("/");return n&&"/"!==c.substr(-1)&&(c+="/"),c})(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r.query=(s=r.search||"")?(/^[?#]/.test(s)?s.slice(1):s).split("&").reduce(((t,e)=>{let[n,i]=e.split("=");return t[n]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},r};let ct=0;const lt={},dt=(t,e={})=>{"string"==typeof e&&(e={path:e});const{path:n="/",exact:i=!1,strict:r=!1}=e,{re:s,keys:a}=((t,e)=>{const n=`${e.end}${e.strict}`,i=lt[n]||(lt[n]={}),r=JSON.stringify(t);if(i[r])return i[r];const s=[],a={re:K(t,s,e),keys:s};return ct<1e4&&(i[r]=a,ct+=1),a})(n,{end:i,strict:r}),o=s.exec(t);if(!o)return null;const[u,...c]=o,l=t===u;return i&&!l?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:l,params:a.reduce(((t,e,n)=>(t[e.name]=c[n],t)),{})}};var ht;!function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(ht||(ht={}));const ft=class{constructor(e){t(this,e),this.fillWidth=!1,this.fillWidthOnMobile=!1,this.disabled=!1,this.variant="primary",this.size="base",this.promiseFn=()=>Promise.resolve(),this.state=ht.Available}render(){return e("button",{class:{[{xs:"px-2.5 py-1.5 text-xs",base:"px-4 py-2 text-base",xl:"px-6 py-3 text-base"}[this.size]]:!0,"inline-flex items-center justify-center border font-medium":!0,"rounded-md shadow-sm focus:outline-none focus:ring-2":!0,"focus:ring-offset-2 focus:ring-primary-focus pointer-events-auto":!0,"disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400":!0,"border-transparent text-white bg-primary-base hover:bg-primary-hover":"primary"===this.variant,"border-gray-300 text-gray-700 bg-white hover:bg-gray-50":"secondary"===this.variant,"border-transparent bg-primary-light hover:bg-primary-base text-primary-dark hover:text-white":"light"===this.variant,"w-full":this.fillWidth||this.fillWidthOnMobile,"sm:w-auto":this.fillWidthOnMobile},disabled:this.disabled,onClick:()=>this.clicked()},this.state===ht.Pending&&e("sss-loading-indicator",{theme:"primary"===this.variant?"light":"primary",size:16}),e("div",{class:{hidden:this.state===ht.Pending}},e("slot",null)))}async clicked(){if(this.promiseFn&&this.state!==ht.Pending)try{this.state=ht.Pending,await this.promiseFn(),this.state=ht.Available}catch(t){throw this.state=ht.Error,t}}};function mt(t,e,n){return t(n={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},n.exports),n.exports}var pt=mt((function(t,e){function n(t){return t}function i(t){return function(){return t}}function r(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(e,"__esModule",{value:!0}),e.bindTo_=e.bind_=e.hole=e.pipe=e.untupled=e.tupled=e.absurd=e.decrement=e.increment=e.tuple=e.flow=e.flip=e.constVoid=e.constUndefined=e.constNull=e.constFalse=e.constTrue=e.constant=e.not=e.unsafeCoerce=e.identity=void 0,e.identity=n,e.unsafeCoerce=n,e.not=function(t){return function(e){return!t(e)}},e.constant=i,e.constTrue=i(!0),e.constFalse=i(!1),e.constNull=i(null),e.constUndefined=i(void 0),e.constVoid=e.constUndefined,e.flip=function(t){return function(e,n){return t(n,e)}},e.flow=function(t,e,n,i,r,s,a,o,u){switch(arguments.length){case 1:return t;case 2:return function(){return e(t.apply(this,arguments))};case 3:return function(){return n(e(t.apply(this,arguments)))};case 4:return function(){return i(n(e(t.apply(this,arguments))))};case 5:return function(){return r(i(n(e(t.apply(this,arguments)))))};case 6:return function(){return s(r(i(n(e(t.apply(this,arguments))))))};case 7:return function(){return a(s(r(i(n(e(t.apply(this,arguments)))))))};case 8:return function(){return o(a(s(r(i(n(e(t.apply(this,arguments))))))))};case 9:return function(){return u(o(a(s(r(i(n(e(t.apply(this,arguments)))))))))}}},e.tuple=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t},e.increment=function(t){return t+1},e.decrement=function(t){return t-1},e.absurd=r,e.tupled=function(t){return function(e){return t.apply(void 0,e)}},e.untupled=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(e)}},e.pipe=function(t,e,n,i,r,s,a,o,u,c,l,d,h,f,m,p,v,w,g,b){switch(arguments.length){case 1:return t;case 2:return e(t);case 3:return n(e(t));case 4:return i(n(e(t)));case 5:return r(i(n(e(t))));case 6:return s(r(i(n(e(t)))));case 7:return a(s(r(i(n(e(t))))));case 8:return o(a(s(r(i(n(e(t)))))));case 9:return u(o(a(s(r(i(n(e(t))))))));case 10:return c(u(o(a(s(r(i(n(e(t)))))))));case 11:return l(c(u(o(a(s(r(i(n(e(t))))))))));case 12:return d(l(c(u(o(a(s(r(i(n(e(t)))))))))));case 13:return h(d(l(c(u(o(a(s(r(i(n(e(t))))))))))));case 14:return f(h(d(l(c(u(o(a(s(r(i(n(e(t)))))))))))));case 15:return m(f(h(d(l(c(u(o(a(s(r(i(n(e(t))))))))))))));case 16:return p(m(f(h(d(l(c(u(o(a(s(r(i(n(e(t)))))))))))))));case 17:return v(p(m(f(h(d(l(c(u(o(a(s(r(i(n(e(t))))))))))))))));case 18:return w(v(p(m(f(h(d(l(c(u(o(a(s(r(i(n(e(t)))))))))))))))));case 19:return g(w(v(p(m(f(h(d(l(c(u(o(a(s(r(i(n(e(t))))))))))))))))));case 20:return b(g(w(v(p(m(f(h(d(l(c(u(o(a(s(r(i(n(e(t)))))))))))))))))))}},e.hole=r,e.bind_=function(t,e,n){var i;return Object.assign({},t,((i={})[e]=n,i))},e.bindTo_=function(t){return function(e){var n;return(n={})[t]=e,n}}})),vt=mt((function(t,e){function n(t){return null==t?e.none:e.some(t)}function i(t){return"Right"===t._tag?e.none:e.some(t.left)}function r(t){return"Left"===t._tag?e.none:e.some(t.right)}function s(t){return function(i){return e.isNone(i)?e.none:n(t(i.value))}}Object.defineProperty(e,"__esModule",{value:!0}),e.getApplySemigroup=e.getOrd=e.getEq=e.getShow=e.URI=e.wilt=e.wither=e.sequence=e.traverse=e.partitionMap=e.partition=e.filterMap=e.filter=e.separate=e.compact=e.reduceRight=e.foldMap=e.reduce=e.duplicate=e.extend=e.throwError=e.zero=e.alt=e.altW=e.flatten=e.chainFirst=e.chain=e.of=e.apSecond=e.apFirst=e.ap=e.map=e.chainNullableK=e.mapNullable=e.fromNullableK=e.getOrElse=e.getOrElseW=e.toUndefined=e.toNullable=e.fold=e.fromEither=e.getRight=e.getLeft=e.tryCatch=e.fromPredicate=e.fromNullable=e.some=e.none=e.isNone=e.isSome=void 0,e.sequenceArray=e.traverseArray=e.traverseArrayWithIndex=e.apS=e.bind=e.bindTo=e.Do=e.getRefinement=e.exists=e.elem=e.option=e.MonadThrow=e.Witherable=e.Traversable=e.Filterable=e.Compactable=e.Extend=e.Alternative=e.Alt=e.Foldable=e.Monad=e.Applicative=e.Functor=e.getMonoid=e.getLastMonoid=e.getFirstMonoid=e.getApplyMonoid=void 0,e.isSome=function(t){return"Some"===t._tag},e.isNone=function(t){return"None"===t._tag},e.none={_tag:"None"},e.some=function(t){return{_tag:"Some",value:t}},e.fromNullable=n,e.fromPredicate=function(t){return function(n){return t(n)?e.some(n):e.none}},e.tryCatch=function(t){try{return e.some(t())}catch(t){return e.none}},e.getLeft=i,e.getRight=r,e.fromEither=r,e.fold=function(t,n){return function(i){return e.isNone(i)?t():n(i.value)}},e.toNullable=function(t){return e.isNone(t)?null:t.value},e.toUndefined=function(t){return e.isNone(t)?void 0:t.value},e.getOrElseW=function(t){return function(n){return e.isNone(n)?t():n.value}},e.getOrElse=e.getOrElseW,e.fromNullableK=function(t){return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return n(t.apply(void 0,e))}},e.mapNullable=s,e.chainNullableK=s;var a=function(t,n){return pt.pipe(t,e.map(n))},o=function(t,n){return pt.pipe(t,e.ap(n))},u=function(t,n){return pt.pipe(t,e.chain(n))},c=function(t,n,i){return pt.pipe(t,e.reduce(n,i))},l=function(t){var n=e.foldMap(t);return function(t,e){return pt.pipe(t,n(e))}},d=function(t,n,i){return pt.pipe(t,e.reduceRight(n,i))},h=function(t){var n=e.traverse(t);return function(t,e){return pt.pipe(t,n(e))}},f=function(t,n){return pt.pipe(t,e.alt(n))},m=function(t,n){return pt.pipe(t,e.filter(n))},p=function(t,n){return pt.pipe(t,e.filterMap(n))},v=function(t,n){return pt.pipe(t,e.extend(n))},w=function(t,n){return pt.pipe(t,e.partition(n))},g=function(t,n){return pt.pipe(t,e.partitionMap(n))},b=function(t){var n=e.wither(t);return function(t,e){return pt.pipe(t,n(e))}},y=function(t){var n=e.wilt(t);return function(t,e){return pt.pipe(t,n(e))}};e.map=function(t){return function(n){return e.isNone(n)?e.none:e.some(t(n.value))}},e.ap=function(t){return function(n){return e.isNone(n)||e.isNone(t)?e.none:e.some(n.value(t.value))}},e.apFirst=function(t){return pt.flow(e.map((function(t){return function(){return t}})),e.ap(t))},e.apSecond=function(t){return pt.flow(e.map((function(){return function(t){return t}})),e.ap(t))},e.of=e.some,e.chain=function(t){return function(n){return e.isNone(n)?e.none:t(n.value)}},e.chainFirst=function(t){return e.chain((function(n){return pt.pipe(t(n),e.map((function(){return n})))}))},e.flatten=e.chain(pt.identity),e.altW=function(t){return function(n){return e.isNone(n)?t():n}},e.alt=e.altW,e.zero=function(){return e.none},e.throwError=function(){return e.none},e.extend=function(t){return function(n){return e.isNone(n)?e.none:e.some(t(n))}},e.duplicate=e.extend(pt.identity),e.reduce=function(t,n){return function(i){return e.isNone(i)?t:n(t,i.value)}},e.foldMap=function(t){return function(n){return function(i){return e.isNone(i)?t.empty:n(i.value)}}},e.reduceRight=function(t,n){return function(i){return e.isNone(i)?t:n(i.value,t)}},e.compact=e.flatten;var x={left:e.none,right:e.none};function S(t){return{equals:function(n,i){return n===i||(e.isNone(n)?e.isNone(i):!e.isNone(i)&&t.equals(n.value,i.value))}}}function C(t){return{concat:function(n,i){return e.isSome(n)&&e.isSome(i)?e.some(t.concat(n.value,i.value)):e.none}}}e.separate=function(t){var n=pt.pipe(t,e.map((function(t){return{left:i(t),right:r(t)}})));return e.isNone(n)?x:n.value},e.filter=function(t){return function(n){return e.isNone(n)?e.none:t(n.value)?n:e.none}},e.filterMap=function(t){return function(n){return e.isNone(n)?e.none:t(n.value)}},e.partition=function(t){return function(e){return{left:m(e,(function(e){return!t(e)})),right:m(e,t)}}},e.partitionMap=function(t){return pt.flow(e.map(t),e.separate)},e.traverse=function(t){return function(n){return function(i){return e.isNone(i)?t.of(e.none):t.map(n(i.value),e.some)}}},e.sequence=function(t){return function(n){return e.isNone(n)?t.of(e.none):t.map(n.value,e.some)}},e.wither=function(t){return function(n){return function(i){return e.isNone(i)?t.of(e.none):n(i.value)}}},e.wilt=function(t){return function(n){return function(s){return e.isNone(s)?t.of({left:e.none,right:e.none}):t.map(n(s.value),(function(t){return{left:i(t),right:r(t)}}))}}},e.URI="Option",e.getShow=function(t){return{show:function(n){return e.isNone(n)?"none":"some("+t.show(n.value)+")"}}},e.getEq=S,e.getOrd=function(t){return{equals:S(t).equals,compare:function(n,i){return n===i?0:e.isSome(n)?e.isSome(i)?t.compare(n.value,i.value):1:-1}}},e.getApplySemigroup=C,e.getApplyMonoid=function(t){return{concat:C(t).concat,empty:e.some(t.empty)}},e.getFirstMonoid=function(){return{concat:function(t,n){return e.isNone(t)?n:t},empty:e.none}},e.getLastMonoid=function(){return{concat:function(t,n){return e.isNone(n)?t:n},empty:e.none}},e.getMonoid=function(t){return{concat:function(n,i){return e.isNone(n)?i:e.isNone(i)?n:e.some(t.concat(n.value,i.value))},empty:e.none}},e.Functor={URI:e.URI,map:a},e.Applicative={URI:e.URI,map:a,ap:o,of:e.of},e.Monad={URI:e.URI,map:a,ap:o,of:e.of,chain:u},e.Foldable={URI:e.URI,reduce:c,foldMap:l,reduceRight:d},e.Alt={URI:e.URI,map:a,alt:f},e.Alternative={URI:e.URI,map:a,ap:o,of:e.of,alt:f,zero:e.zero},e.Extend={URI:e.URI,map:a,extend:v},e.Compactable={URI:e.URI,compact:e.compact,separate:e.separate},e.Filterable={URI:e.URI,map:a,compact:e.compact,separate:e.separate,filter:m,filterMap:p,partition:w,partitionMap:g},e.Traversable={URI:e.URI,map:a,reduce:c,foldMap:l,reduceRight:d,traverse:h,sequence:e.sequence},e.Witherable={URI:e.URI,map:a,reduce:c,foldMap:l,reduceRight:d,traverse:h,sequence:e.sequence,compact:e.compact,separate:e.separate,filter:m,filterMap:p,partition:w,partitionMap:g,wither:b,wilt:y},e.MonadThrow={URI:e.URI,map:a,ap:o,of:e.of,chain:u,throwError:e.throwError},e.option={URI:e.URI,map:a,of:e.of,ap:o,chain:u,reduce:c,foldMap:l,reduceRight:d,traverse:h,sequence:e.sequence,zero:e.zero,alt:f,extend:v,compact:e.compact,separate:e.separate,filter:m,filterMap:p,partition:w,partitionMap:g,wither:b,wilt:y,throwError:e.throwError},e.elem=function(t){return function(n,i){return!e.isNone(i)&&t.equals(n,i.value)}},e.exists=function(t){return function(n){return!e.isNone(n)&&t(n.value)}},e.getRefinement=function(t){return function(n){return e.isSome(t(n))}},e.Do=e.of({}),e.bindTo=function(t){return e.map(pt.bindTo_(t))},e.bind=function(t,n){return e.chain((function(i){return pt.pipe(n(i),e.map((function(e){return pt.bind_(i,t,e)})))}))},e.apS=function(t,n){return pt.flow(e.map((function(e){return function(n){return pt.bind_(e,t,n)}})),e.ap(n))},e.traverseArrayWithIndex=function(t){return function(n){for(var i=[],r=0;r<n.length;r++){var s=t(r,n[r]);if(e.isNone(s))return e.none;i.push(s.value)}return e.some(i)}},e.traverseArray=function(t){return e.traverseArrayWithIndex((function(e,n){return t(n)}))},e.sequenceArray=e.traverseArray(pt.identity)}));const wt=t=>!("isConnected"in t)||t.isConnected,gt=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(wt))})(...e)}),2e3)}})(),bt=(t,e)=>{const r=((t,e=((t,e)=>t!==e))=>{let n=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},r=()=>{n=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},s=t=>(i.get.forEach((e=>e(t))),n.get(t)),a=(t,r)=>{const s=n.get(t);e(r,s,t)&&(n.set(t,r),i.set.forEach((e=>e(t,r,s))))},o="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,e)=>s(e),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>n.has(e),set:(t,e,n)=>(a(e,n),!0)}),u=(t,e)=>(i[t].push(e),()=>{((t,e)=>{const n=t.indexOf(e);n>=0&&(t[n]=t[t.length-1],t.length--)})(i[t],e)});return{state:o,get:s,set:a,on:u,onChange:(e,n)=>{const i=u("set",((t,i)=>{t===e&&n(i)})),r=u("reset",(()=>n(t[e])));return()=>{i(),r()}},use:(...t)=>t.forEach((t=>{t.set&&u("set",t.set),t.get&&u("get",t.get),t.reset&&u("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),r()},reset:r}})(t,e);return(({on:t})=>{const e=new Map;"function"==typeof n&&(t("dispose",(()=>{e.clear()})),t("get",(t=>{const i=n();i&&((t,e,n)=>{const i=t.get(e);i?i.includes(n)||i.push(n):t.set(e,[n])})(e,t,i)})),t("set",(t=>{const n=e.get(t);n&&e.set(t,n.filter(i)),gt(e)})),t("reset",(()=>{e.forEach((t=>t.forEach(i))),gt(e)})))})(r),r};function yt(t){this.message=t}(yt.prototype=new Error).name="InvalidCharacterError";var xt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new yt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,s=0,a="";i=e.charAt(s++);~i&&(n=r%4?64*n+i:i,r++%4)?a+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a};function St(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(xt(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return xt(e)}}function Ct(t){this.message=t}(Ct.prototype=new Error).name="InvalidTokenError";var Ft=function(){return(Ft=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},kt=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,r++)i[r]=s[a];return i},At=function(t,e,n){if(void 0===n&&(n=!1),!t||!e||"object"!=typeof t||"object"!=typeof e)return t;var i=Ft({},t);for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]instanceof Array&&t[r]instanceof Array?n?kt(t[r],e[r]):e[r]:"object"==typeof e[r]&&"object"==typeof t[r]?At(t[r],e[r],n):e[r]);return i},Nt=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,r++)i[r]=s[a];return i},Mt={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(t,e){for(var n=void 0===e?{}:e,i=n.doThrow,r=void 0===i||i,s=n.instance,a=void 0!==s&&s,o=[],u=2;u<arguments.length;u++)o[u-2]=arguments[u];var c=this.polyfills[t]||("undefined"!=typeof self?self[t]:null)||("undefined"!=typeof global?global[t]:null);if(r&&!c)throw new Error(t+" is not defined");return a&&c?new(c.bind.apply(c,Nt([void 0],o))):c}},Pt=function(t,e,n,i){if(!t.getEntriesByName)return!1;var r=t.getEntriesByName(e);return!!(r&&r.length>0)&&(n(r.reverse()[0]),i.clearMeasures&&i.clearMeasures(e),Et.callbacks.delete(e),Et.callbacks.size<1&&(Et.observer.disconnect(),i.clearResourceTimings&&i.clearResourceTimings()),!0)},Et={callbacks:new Map,observer:null,observe:function(t,e){if(t&&e){var n=Mt.polyfill("performance",{doThrow:!1});(function(t,e){return!Et.observer&&t&&e&&(Et.observer=new e((function(e){Et.callbacks.forEach((function(n,i){Pt(e,i,n,t)}))})),t.clearResourceTimings&&t.clearResourceTimings()),Et.observer})(n,Mt.polyfill("PerformanceObserver",{doThrow:!1}))&&(Pt(n,t,e,n)||(Et.callbacks.size<1&&Et.observer.observe({entryTypes:["resource","measure"]}),Et.callbacks.set(t,e)))}}},Dt=function(t){this.error=t},It=function(){return(It=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},_t=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,r++)i[r]=s[a];return i},Bt=function(){function t(t,e,n,i,r,s){void 0===n&&(n=new Map),void 0===i&&(i=[]),void 0===r&&(r=[]),void 0===s&&(s=[]),this._url=t,this._options=e,this._catchers=n,this._resolvers=i,this._middlewares=r,this._deferredChain=s}return t.factory=function(e,n){return void 0===e&&(e=""),void 0===n&&(n={}),new t(e,n)},t.prototype.selfFactory=function(e){var n=void 0===e?{}:e,i=n.url,r=n.options,s=n.catchers,a=void 0===s?this._catchers:s,o=n.resolvers,u=void 0===o?this._resolvers:o,c=n.middlewares,l=void 0===c?this._middlewares:c,d=n.deferredChain,h=void 0===d?this._deferredChain:d;return new t(void 0===i?this._url:i,It({},void 0===r?this._options:r),new Map(a),_t(u),_t(l),_t(h))},t.prototype.defaults=function(t,e){return void 0===e&&(e=!1),Mt.defaults=e?At(Mt.defaults,t):t,this},t.prototype.errorType=function(t){return Mt.errorType=t,this},t.prototype.polyfills=function(t){return Mt.polyfills=It(It({},Mt.polyfills),t),this},t.prototype.url=function(t,e){if(void 0===e&&(e=!1),e)return this.selfFactory({url:t});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+t+"?"+n[1]:this._url+t})},t.prototype.options=function(t,e){return void 0===e&&(e=!0),this.selfFactory({options:e?At(this._options,t):t})},t.prototype.query=function(t,e){return void 0===e&&(e=!1),this.selfFactory({url:Tt(this._url,t,e)})},t.prototype.headers=function(t){return this.selfFactory({options:At(this._options,{headers:t||{}})})},t.prototype.accept=function(t){return this.headers({Accept:t})},t.prototype.content=function(t){var e;return this.headers(((e={})["Content-Type"]=t,e))},t.prototype.auth=function(t){return this.headers({Authorization:t})},t.prototype.catcher=function(t,e){var n=new Map(this._catchers);return n.set(t,e),this.selfFactory({catchers:n})},t.prototype.signal=function(t){return this.selfFactory({options:It(It({},this._options),{signal:t.signal})})},t.prototype.resolve=function(t,e){return void 0===e&&(e=!1),this.selfFactory({resolvers:e?[t]:_t(this._resolvers,[t])})},t.prototype.defer=function(t,e){return void 0===e&&(e=!1),this.selfFactory({deferredChain:e?[t]:_t(this._deferredChain,[t])})},t.prototype.middlewares=function(t,e){return void 0===e&&(e=!1),this.selfFactory({middlewares:e?t:_t(this._middlewares,t)})},t.prototype.method=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=null);var i=this._options.headers,r=n?"object"!=typeof n||i&&!Object.entries(i).every((function(t){var e=t[1];return t[0].toLowerCase()!=="Content-Type".toLowerCase()||e.startsWith("application/json")}))?this.body(n):this.json(n):this;return function(t){var e=t._url,n=t._resolvers,i=t._middlewares,r=t._options,s=new Map(t._catchers),a=At(Mt.defaults,r),o=Mt.polyfill("AbortController",{doThrow:!1,instance:!0});!a.signal&&o&&(a.signal=o.signal);var u={ref:null,clear:function(){u.ref&&(clearTimeout(u.ref),u.ref=null)}},c=function(t){return function(e){return 0===t.length?e:1===t.length?t[0](e):t.reduceRight((function(n,i,r){return i(r===t.length-2?n(e):n)}))}}(i)(Mt.polyfill("fetch"))(e,a),l=c.catch((function(t){throw new Dt(t)})).then((function(t){return u.clear(),t.ok?t:t[Mt.errorType||"text"]().then((function(e){var n=new Error(e);throw n[Mt.errorType||"text"]=e,n.status=t.status,n.response=t,n}))})),d=function(e){return function(n){return(e?l.then((function(t){return t&&t[e]()})).then((function(t){return n?n(t):t})):l.then((function(t){return n?n(t):t}))).catch((function(e){u.clear();var n=e instanceof Dt?e.error:e;if(e instanceof Dt&&s.has("__fromFetch"))return s.get("__fromFetch")(n,t);if(s.has(n.status))return s.get(n.status)(n,t);if(s.has(n.name))return s.get(n.name)(n,t);throw n}))}},h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(t){return c.then((function(e){return Et.observe(e.url,t)})),h},setTimeout:function(t,e){return void 0===e&&(e=o),u.clear(),u.ref=setTimeout((function(){return e.abort()}),t),h},controller:function(){return[o,h]},error:function(t,e){return s.set(t,e),h},badRequest:function(t){return h.error(400,t)},unauthorized:function(t){return h.error(401,t)},forbidden:function(t){return h.error(403,t)},notFound:function(t){return h.error(404,t)},timeout:function(t){return h.error(408,t)},internalError:function(t){return h.error(500,t)},fetchError:function(t){return h.error("__fromFetch",t)},onAbort:function(t){return h.error("AbortError",t)}};return n.reduce((function(e,n){return n(e,t)}),h)}((r=r.options(It(It({},e),{method:t})))._deferredChain.reduce((function(t,e){return e(t,t._url,t._options)}),r))},t.prototype.get=function(t){return this.method("GET",t)},t.prototype.delete=function(t){return this.method("DELETE",t)},t.prototype.put=function(t,e){return this.method("PUT",e,t)},t.prototype.post=function(t,e){return this.method("POST",e,t)},t.prototype.patch=function(t,e){return this.method("PATCH",e,t)},t.prototype.head=function(t){return this.method("HEAD",t)},t.prototype.opts=function(t){return this.method("OPTIONS",t)},t.prototype.replay=function(t){return this.method(this._options.method,t)},t.prototype.body=function(t){return this.selfFactory({options:It(It({},this._options),{body:t})})},t.prototype.json=function(t){var e,n=null===(e=Object.entries(this._options.headers||{}).find((function(t){var e=t[1];return t[0].toLowerCase()==="Content-Type".toLowerCase()&&e.startsWith("application/json")})))||void 0===e?void 0:e[1];return this.content(n||"application/json").body(JSON.stringify(t))},t.prototype.formData=function(t,e){return void 0===e&&(e=!1),this.body(jt(t,e))},t.prototype.formUrl=function(t){return this.body("string"==typeof t?t:(e=t,Object.keys(e).map((function(t){var n=e[t];return n instanceof Array?n.map((function(e){return Ot(t,e)})).join("&"):Ot(t,n)})).join("&"))).content("application/x-www-form-urlencoded");var e},t}(),Tt=function(t,e,n){var i;if("string"==typeof e)i=e;else{var r=Mt.polyfill("URLSearchParams",{instance:!0});for(var s in e)if(e[s]instanceof Array)for(var a=0,o=e[s];a<o.length;a++)r.append(s,o[a]);else r.append(s,e[s]);i=r.toString()}var u=t.split("?");return n||u.length<2?u[0]+"?"+i:t+"&"+i};function jt(t,e,n,i){return void 0===e&&(e=!1),void 0===n&&(n=Mt.polyfill("FormData",{instance:!0})),void 0===i&&(i=[]),Object.entries(t).forEach((function(t){var r=t[0],s=t[1],a=i.reduce((function(t,e){return t?t+"["+e+"]":e}),null);if(a=a?a+"["+r+"]":r,s instanceof Array)for(var o=0,u=s;o<u.length;o++)n.append(a+"[]",u[o]);else!e||"object"!=typeof s||e instanceof Array&&e.includes(r)?n.append(a,s):null!==s&&jt(s,e,n,_t(i,[r]))})),n}function Ot(t,e){return encodeURIComponent(t)+"="+encodeURIComponent("object"==typeof e?JSON.stringify(e):""+e)}var Lt=Bt.factory;function Rt(){const t=Ht.jwt,e=Ht.profileId,n=Ht.accountIdOrDefault,i=Ht.partnerIdOrDefault;return Lt(Ht.apiBaseUrl).headers({Authorization:"Bearer "+t,"X-PROFILE-ID":e,"X-PARTNER-ID":i,"X-ACCOUNT-ID":n})}Lt.default=Bt.factory;const Ut=new class{async getAustralianFundsAsync(t,e=!1){return Rt().url("super-choice/australian-funds-v2?"+this.toQueryString(e,t)).get().notFound((()=>{throw new Error("Failed to fetch the list of australian super funds.")})).json()}async getAustralianFundAsync(t,e){const n=e?"?includeInactive=true":"";return Rt().url(`super-choice/australian-funds/${t}${n}`).get().notFound((()=>{throw new Error("Failed to fetch australian super fund.")})).json()}async getAppStateAsync(){var t;const e=await Rt().url("client-app-state").get().notFound((()=>{throw new Error("Failed to fetch application configuration.")})).json();if(null===(t=e.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails)switch("promoted"in(n=e.superBuyer.superChoice.choiceDetails)?n.kind="Promoted":"myOwnFund"in n?n.kind="MyOwnFund":"smsf"in n?n.kind="SMSF":"default"in n?n.kind="Default":"promotedDefault"in n?n.kind="PromotedDefault":"definedBenefits"in n?n.kind="DefinedBenefits":"promotedDefaultWithJoin"in n&&(n.kind="PromotedDefaultWithJoin"),e.superBuyer.superChoice.choiceDetails.kind){case"Promoted":!function(t){"slate"in t?t.kind="slate":"australianRetirementTrust"in t?t.kind="australianRetirementTrust":"aware"in t?t.kind="aware":"active"in t?t.kind="active":"australianEthical"in t?t.kind="australianEthical":"virgin"in t?t.kind="virgin":"spirit"in t?t.kind="spirit":"firstSuper"in t?t.kind="firstSuper":"mercerMyChoice"in t?t.kind="mercerMyChoice":"generic"in t&&(t.kind="generic")}(e.superBuyer.superChoice.choiceDetails.promoted)}var n;return e}async getCampaignConnectAsync(){return Rt().url("campaign-connect").get().notFound((()=>{throw new Error("Failed to fetch campaign connect.")})).json()}async clickPromotedTileAsync(t){return Rt().url("click-promoted-tile").post(t).res()}toSearchFilterQueryString(t){return"search="+t.searchString+(t.maxRecordCount>0?"&maxRecordCount="+t.maxRecordCount:"")}toQueryString(t,e){return[this.toSearchFilterQueryString(e),t?"includeInactive=true":""].filter((t=>t&&t.length)).join("&")}};class qt{constructor(t){this.promotedFundsShown=t}get PromotedFundIds(){return this.promotedFundsShown.map((t=>t.fundId))}get DefaultFundPosition(){this.promotedFundsShown.filter(((t,e)=>{if("promoted-default"==t.fundType)return e}))}}const Vt={apiBaseUrl:vt.none,appBaseUrl:vt.none,profileId:vt.none,jwt:vt.none,superBuyer:vt.none,superChoicePrefill:vt.none,promotedFunds:vt.none,accountConfiguration:vt.none,profileConfiguration:vt.none,hasSuccessPageBeenAcknowledged:!1,hasSuperSelectionBeenSubmitted:!1,campaignConnectEnabled:!1,isDefinedBenefitsEligible:vt.none,campaignConnect:vt.none,superCampaignEnabled:!1,superCampaignState:void 0},Ht=new class{constructor(){const{state:t,onChange:e}=bt(Vt);this._state=t,this._onChange=e,e("jwt",(t=>{this._state.profileId=pt.pipe(t,vt.chain((t=>vt.fromNullable(function(t,e){if("string"!=typeof t)throw new Ct("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(St(t.split(".")[n]))}catch(t){throw new Ct("Invalid token specified: "+t.message)}}(t).sub))))}))}get state(){return this._state}get onChange(){return this._onChange}get superBuyer(){if(vt.isNone(this._state.superBuyer))throw Error("User information is not set");return this._state.superBuyer.value}get apiBaseUrl(){if(vt.isNone(this._state.apiBaseUrl))throw Error("API base URL is not set");return this._state.apiBaseUrl.value}get appBaseUrl(){if(vt.isNone(this._state.appBaseUrl))throw Error("App base URL is not set");return this._state.appBaseUrl.value}get promotedFunds(){if(this._state.campaignConnectEnabled&&vt.isSome(this._state.campaignConnect))return this._state.campaignConnect.value.promotedFunds.map((t=>t.fundId));if(vt.isNone(this._state.promotedFunds))throw Error("Promoted Funds is not set");return this._state.promotedFunds.value}get promotedDefaultFundPosition(){if(this._state.campaignConnectEnabled&&vt.isSome(this._state.campaignConnect)){const t=this._state.campaignConnect.value.promotedFunds.findIndex((t=>t.type="promoted-default"));return vt.fromNullable(-1==t?null:t+1)}return vt.none}get promotedFundsConfig(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:vt.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:vt.isSome(this._state.campaignConnect)?"campaignConnect":"superSelection"}}get definedBenefitsFundId(){if(vt.isSome(this._state.campaignConnect)){const t=this._state.campaignConnect.value.promotedFunds.find((t=>"defined-benefits"==t.type));return vt.fromNullable(null==t?void 0:t.fundId)}return vt.none}get profileId(){if(vt.isNone(this._state.profileId))throw Error("Failed to get Profile ID from JWT");return this._state.profileId.value}get defaultFundUsi(){const t=pt.pipe(this._state.profileConfiguration,vt.map((t=>vt.fromNullable(t.defaultFundUsi))),vt.flatten);return vt.isSome(t)?t:pt.pipe(this._state.accountConfiguration,vt.map((t=>vt.fromNullable(t.defaultFundUsi))),vt.flatten)}get accountIdOrDefault(){return pt.pipe(this._state.accountConfiguration,vt.map((t=>t.accountId)),vt.getOrElse((()=>"")))}get partnerIdOrDefault(){return pt.pipe(this._state.superBuyer,vt.map((t=>t.partnerId)),vt.getOrElse((()=>"")))}get jwt(){if(vt.isNone(this._state.jwt))throw Error("No authentication information was found");return this._state.jwt.value}completeSuperSelectionFlow(){this._state.hasSuccessPageBeenAcknowledged=!0}markSuperSelectionAsSubmitted(){this._state.hasSuperSelectionBeenSubmitted=!0}get campaignConnectEnabled(){return this._state.campaignConnectEnabled}get isDefinedBenefitsEligible(){return this._state.isDefinedBenefitsEligible}async loadAppStateAsync(){const t=await Ut.getAppStateAsync();this._state.accountConfiguration=vt.fromNullable(t.accountConfiguration),this._state.profileConfiguration=vt.fromNullable(t.profileConfiguration),this._state.superBuyer=vt.fromNullable(t.superBuyer),this._state.promotedFunds=vt.fromNullable(t.promotedFunds),this._state.campaignConnectEnabled=t.campaignConnectEnabled,this._state.superCampaignEnabled=t.superCampaignEnabled,this._state.superChoicePrefill=vt.fromNullable(t.prefill),this._state.isDefinedBenefitsEligible=vt.fromNullable(t.isDefinedBenefitsEligible)}async loadCampaignConnectAsync(){if(this._state.campaignConnectEnabled){const t=await Ut.getCampaignConnectAsync();this._state.campaignConnect=vt.fromNullable(t)}}setSuperCampaignPromotedFundsShown(t){this._state.superCampaignState=new qt(t)}get superCampaignState(){return this._state.superCampaignState}},zt=t=>{let e="Not set";return vt.isSome(Ht.isDefinedBenefitsEligible)&&(e=Ht.isDefinedBenefitsEligible.value?"True":"False"),{isDefinedBenefitsEligible:e,superCampaignEnabled:t}},{state:Wt,reset:$t}=bt({fund:{id:"",type:"null"}});class Jt{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(t){return Rt().url("analytics-events").post(t).res()}}class Gt{constructor(){this.eventTrackingApi=Jt.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackSuperFundPdsViewedAsync(t){return this.trackEventAsync({SuperFundPdsViewed:t})}async TrackPromotedSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:t}})}async TrackPromotedDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:t}})}async TrackMyOwnSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:t}})}async TrackSmsfSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{Smsf:t}})}async TrackDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:t}})}async TrackSuperFundPanelViewedAsync(t){return this.trackEventAsync({SuperFundPanelViewed:t})}async TrackSuperFundNominationViewedAsync(t){return this.trackEventAsync({SuperFundNominationViewed:t})}async TrackSuperFundNominationDeclinedAsync(t){return this.trackEventAsync({SuperFundNominationDeclined:t})}async TrackSuperFundDisclaimerViewedAsync(t){return this.trackEventAsync({SuperFundDisclaimerViewed:t})}async TrackSuperFundDisclaimerAcceptedAsync(t){return this.trackEventAsync({SuperFundDisclaimerAccepted:t})}async TrackSuperFundPrefillViewedAsync(t){return this.trackEventAsync({SuperFundPrefillViewed:t})}async TrackSuperFundPrefillDeclinedAsync(t){return this.trackEventAsync({SuperFundPrefillDeclined:t})}async TrackSuperFundDetailChangeRequestedAsync(t){return this.trackEventAsync({SuperFundDetailChangeRequested:t})}async trackEventAsync(t){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:t})}catch(t){return}}}function Xt(t,e){void 0===e&&(e="*"),t.sender="flare",window.parent.postMessage(t,e)}const Yt=function(){Xt({type:"appReady"})},Kt=function(t,e){Xt({type:"contentResized",height:t,width:e})},Zt=function(t){Xt({type:"pageNavigated",url:t})},Qt=function(){Xt({type:"complete"})},te=function(){Xt({type:"submitSuccess"})},{state:ee}=bt({handleSubmitFn:async function(){},fundName:"",fundDetails:{type:"null"},promotedFundId:void 0});var ne;!function(t){t.ConsentPage="/consent",t.ExistingChoicePage="/existing",t.SuperCampaign="/super-campaign",t.ChoicePage="/",t.SlateJoin="/slate/join/",t.PromotedFundJoinV1="/promoted-fund/join/v1",t.PromotedFundJoinV2="/promoted-fund/join/v2",t.MyOwnFund="/super-choice/my-own-fund/",t.Prefill="/super-choice/prefill/",t.PrefillInvalidMyOwnFundPage="/super-choice/sss-prefill-invalid-my-own-fund/",t.PrefillMyOwnFundPage="/super-choice/prefill-my-own-fund/",t.PrefillSMSFPage="/super-choice/prefill-smsf/",t.PrefillInvalidSMSFPage="/super-choice/prefill-invalid-smsf/",t.SelfManagedFund="/super-choice/smsf/",t.DefaultFund="/super-choice/default/",t.StandardChoice="/standard-choice/",t.Success="/success/"}(ne||(ne={}));const ie=[e("stencil-route",{url:ne.ConsentPage,component:"sss-consent-page"}),e("stencil-route",{url:ne.ExistingChoicePage,component:"sss-existing-choice-page"}),e("stencil-route",{url:ne.SuperCampaign,component:"sss-super-campaign-host"}),e("stencil-route",{exact:!0,url:ne.ChoicePage,component:"sss-super-choice-page"}),e("stencil-route",{url:ne.SlateJoin,component:"sss-slate-join-page"}),e("stencil-route",{url:ne.PromotedFundJoinV1,component:"sss-promoted-fund-join-v1-page"}),e("stencil-route",{url:ne.PromotedFundJoinV2,component:"sss-promoted-fund-join-v2-page"}),e("stencil-route",{url:ne.MyOwnFund,component:"sss-my-own-fund"}),e("stencil-route",{url:ne.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),e("stencil-route",{url:ne.Prefill,component:"sss-prefill"}),e("stencil-route",{url:ne.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),e("stencil-route",{url:ne.PrefillSMSFPage,component:"sss-prefill-smsf"}),e("stencil-route",{url:ne.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),e("stencil-route",{url:ne.SelfManagedFund,component:"sss-self-managed-fund"}),e("stencil-route",{url:ne.DefaultFund,component:"sss-default-fund"}),e("stencil-route",{url:ne.StandardChoice,component:"sss-standard-choice-form"}),e("stencil-route",{url:ne.Success,component:"sss-success"})],re=new class{navigateInternally(t,e){const n=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(e)}`;Zt(n),t.push(n)}navigateInternallyToStandardChoice(t){ee.handleSubmitFn=t.handleSubmitFn,ee.fundName=t.fundName,ee.fundDetails=t.fundDetails,ee.promotedFundId=t.promotedFundId,this.navigateInternally(t.history,ne.StandardChoice)}toExternalUrl(t){const e=new URL(t);return e.searchParams.append("_extnav","true"),e.href}get appBaseUrl(){return Ht.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(t){return t.length>0&&"/"===t[0]?t:"/"+t}},se=(t,n)=>e("a",{class:t.className||"font-medium underline underline-offset-2 hover:text-gray-600",target:"_blank",href:re.toExternalUrl(t.href),onClick:t.onClick},n);function ae(t,e){return Gt.Instance.TrackSuperFundPdsViewedAsync({fundUsi:e,fundName:t,pageName:"Panel Fund Page",superCampaignEnabled:!1})}const oe=class{constructor(e){t(this,e),this.campaignConnectRequestInProgress=!1,this.eventTrackingService=Gt.Instance}componentDidLoad(){return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(zt(!1))}render(){return this.campaignConnectRequestInProgress?e("sss-loading-super-indicator",null):e("div",null,e("div",{class:"text-2xl sm:text-3xl font-bold text-center leading-8"},"Important information about super"),e("div",{class:"sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8"},"The choice of superannuation fund is an important personal financial decision. Next, you’ll be asked to nominate a super fund to receive your employer contributions."),e("div",{class:"flex justify-center mt-8 sm:mt-12"},e("div",{class:"border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg"},e("div",{class:"sm:text-lg font-bold leading-6"},"By clicking “Continue” you acknowledge that:"),e("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6"},e("li",null,"Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"),e("li",null,"all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"),e("li",null,"in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"),e("li",null,"Trustees of the featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform;"),e("li",null,"in the event that you choose one of the featured superannuation funds, we may pass on your personal information and TFN to a related party for the purpose of completing your chosen fund's application form."),e("li",null,"Your personal data that is provided to us will be subject to our"," ",e(se,{className:"font-medium text-blue-600 hover:text-blue-800",href:"https://www.flarehr.com/privacy-policy"},"Privacy Policy"),".")),e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSuperFundDisclaimerAccepted()},"Continue"))))}async handleSuperFundDisclaimerAccepted(){if(await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({superCampaignEnabled:!1}),Ht.campaignConnectEnabled&&(this.campaignConnectRequestInProgress=!0,await Ht.loadCampaignConnectAsync(),Ht.isDefinedBenefitsEligible&&vt.isSome(Ht.definedBenefitsFundId)))return Wt.fund={id:Ht.definedBenefitsFundId.value,type:"DefinedBenefits"},void re.navigateInternally(this.history,ne.PromotedFundJoinV2);re.navigateInternally(this.history,ne.ChoicePage)}};var ue;!function(t){t.MyOwnFund="Your current super fund",t.DefaultFund="Your employer's default fund",t.SelfManagedFund="Your self-managed super fund"}(ue||(ue={}));const ce={continueAllowed:!1,nextRoute:"/",myOwnFundForm:{fundUsi:q,fundName:q,memberNumber:q,memberFirstName:q,memberFamilyName:q},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:"",memberFirstName:"",memberFamilyName:""},currentCustomFundType:ue.MyOwnFund,customFunds:[{label:ue.MyOwnFund,value:ne.MyOwnFund},{label:ue.SelfManagedFund,value:ne.SelfManagedFund},{label:ue.DefaultFund,value:ne.DefaultFund}]},{state:le}=bt(ce),de=le.customFunds,he=class{constructor(e){t(this,e),this.currentCustomFund=de[0],this.fundOptionsList=de,this.showFundOptionsSelection=!1}componentWillLoad(){let t="";window.location.pathname.includes(ne.MyOwnFund)&&(t=ne.MyOwnFund),window.location.pathname.includes(ne.DefaultFund)&&(t=ne.DefaultFund),window.location.pathname.includes(ne.SelfManagedFund)&&(t=ne.SelfManagedFund),this.currentCustomFund=de.find((e=>e.value===t))||de[0],re.navigateInternally(this.history,t)}render(){const t=()=>e("svg",{class:"h-5 w-5 fill-primary-base group-hover:fill-white",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"}));return e("div",{class:"max-w-560 relative"},e("label",{class:"font-medium text-gray-700 text-sm"},"Which fund would you like to nominate?"),e("div",{class:"mt-1 mb-4"},e("button",{type:"button",class:"bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-primary-focus focus:border-primary-base text-base sm:text-sm",onClick:()=>this.showFundOptionsSelection=!this.showFundOptionsSelection},e("span",{class:{"block truncate":!0,"text-gray-500":this.showFundOptionsSelection}},this.showFundOptionsSelection?"Select":this.currentCustomFund.label),e("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},e((()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-500",viewBox:"0 0 20 20"},e("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"}))),null))),this.showFundOptionsSelection&&e("ul",{class:"absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none text-base sm:text-sm"},this.fundOptionsList.map((n=>e("li",{class:"text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 group hover:bg-primary-base",onClick:()=>{this.showFundOptionsSelection=!this.showFundOptionsSelection,re.navigateInternally(this.history,n.value)}},e("span",{class:{"block truncate":!0,"font-semibold":this.currentCustomFund===n}},n.label),this.currentCustomFund===n&&e("span",{class:"absolute inset-y-0 right-0 flex items-center pr-4"},e(t,null))))))),e("div",{onClick:()=>this.showFundOptionsSelection=!1},e("slot",null)))}};W(he);const fe=new class{async searchFundsAsync(t,e){return Ut.getAustralianFundsAsync({searchString:t,maxRecordCount:e})}async getFundAsync(t,e){const n=await Ut.getAustralianFundAsync(t,e);return vt.some(n)}},me=new class{async submitDefaultFundChoiceAsync(t){return Rt().url("super-choice/default").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(t){return Rt().url("super-choice/custom-fund").post(t).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(t){return Rt().url("super-choice/smsf").post(t).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}async submitDefinedBenefitsChoiceAsync(t){return Rt().url("super-choice/defined-benefits").post(t).badRequest((()=>{throw new Error("Failed to process Defined Benefits choice request")})).text()}async validateAbnForSMSF(t){return(await Rt().url(`super-choice/smsf/${t}/validate`).get().badRequest((()=>{throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()).result}},pe=class{constructor(e){t(this,e),this.defaultFundProductName="Loading fund...",this.eventTrackingService=Gt.Instance}async componentWillLoad(){const t=Ht.defaultFundUsi;if(vt.isNone(t))return;this.isDefaultFundExists=!0;const e=await fe.getFundAsync(t.value,!0);vt.isNone(e)?this.isInvalidDefaultFund=!0:(this.defaultFund=e.value,this.defaultFundProductName=e.value.productName)}componentDidLoad(){var t,e,n,i;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:null!==(e=null===(t=this.defaultFund)||void 0===t?void 0:t.usi)&&void 0!==e?e:"",fundName:null!==(i=null===(n=this.defaultFund)||void 0===n?void 0:n.productName)&&void 0!==i?i:"",promotedFundsShown:Ht.promotedFunds,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)})}render(){return e(s,null,e("sss-header-section",{currentPage:"own-fund"}),e("div",{class:"flex justify-center mt-11"},e("sss-custom-fund",null,e("div",{class:"p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg"},e("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),(!this.isDefaultFundExists||this.isInvalidDefaultFund)&&e("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},e("div",{class:"flex"},e("div",{class:"flex-shrink-0"},e("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),e("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},e("span",null,"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s default fund.")))),this.isDefaultFundExists&&!this.isInvalidDefaultFund&&e("div",null,e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund Name"),e("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFundProductName)),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),e("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFund.usi)),e("div",{class:"mt-8 mb-8 h-px w-full bg-gray-200"}),e("div",{class:"text-sm text-gray-700"},e("label",{class:"font-semibold text-gray-900"},"By clicking “Continue”, you acknowledge that:"),e("ul",{class:"list-disc list-outside pl-5"},e("li",{class:"mt-2"},"you are choosing to join your employer’s default super fund;"),e("li",{class:"mt-2"},"your employer will open a new account for you with their default super fund; and"),e("li",{class:"mt-2"},"your application to join is subject to Trustee approval."))))),e("div",{class:"flex justify-center mt-8"},e("div",{class:"sm:max-w-320 w-full"},this.isDefaultFundExists&&!this.isInvalidDefaultFund&&e("div",{class:"mb-4"},e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm()},"Continue")),e("stencil-route-link",{url:ne.ChoicePage},e("sss-button",{fillWidth:!0,variant:"secondary"},"Back")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||re.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",fundDetails:{type:"default",fundName:this.defaultFundProductName,fundUsi:this.defaultFund.usi},handleSubmitFn:async t=>{await me.submitDefaultFundChoiceAsync(Object.assign({standardChoiceFormSignature:t},Ht.promotedFundsConfig))}})}},ve=class{constructor(n){t(this,n),this.valueChanged=a(this,"valueChanged",7),this.required=!1,this.disabled=!1,this.minSearchStringLength=3,this.isMouseOver=!1,this.searchState="pristine",this.inputValue="",this.isDropdownVisible=!1,this.filteredOptions=[],this.shouldExecuteSearch=t=>{var e;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(e=this.selectedOption)||void 0===e?void 0:e.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{switch(this.highlightedOptionIndex=void 0,t.kind){case"too-many-results":this.searchState="too many results",this.filteredOptions=[];break;case"success":this.searchState="done",this.filteredOptions=t.value;break;default:this.searchState="done",this.filteredOptions=[]}},this.renderFilteredResults=()=>"pristine"===this.searchState?e("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Start typing to find the results"):"in progress"===this.searchState?e("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Searching..."):"too many results"===this.searchState?e("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Keep typing to narrow down your search."):0===this.filteredOptions.length?e("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"No items match your search"):this.filteredOptions.map(((t,n)=>e("div",{class:{"cursor-pointer text-wrap hover:bg-primary-base py-1.5 pl-4":!0,"bg-primary-base":this.isOptionSelected(t)},onClick:()=>{this.highlightedOptionIndex=n,this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,e;this.inputValue=null!==(e=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==e?e:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightItem("Next"),!0;case"ArrowUp":return this.highlightItem("Prev"),!0;case"Enter":return void 0!==this.highlightedOptionIndex&&(this.toggleDropdown(!1),this.selectOption(this.filteredOptions[this.highlightedOptionIndex])),!0;case"Escape":return this.inputElement.blur(),!0}return!1},this.highlightItem=t=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(Math.max(0,this.highlightedOptionIndex+("Next"===t?1:-1)),this.filteredOptions.length-1),void 0!==this.highlightedOptionIndex&&this.selectOption(this.filteredOptions[this.highlightedOptionIndex]))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var e;return(null===(e=this.selectedOption)||void 0===e?void 0:e.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=D(this.inputElement,"keyup").pipe(function(t,e=b){return n=>n.lift(new _(t,e))}(500),h((()=>this.inputElement.value)),x(),S(this.shouldExecuteSearch),j(this.onBeginSearch),M(this._searchFunction),j(this.onCompleteSearch)).subscribe(),this.resetInput()}disconnectedCallback(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return e(s,null,e("div",{class:"relative"},e("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md":!0,"invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},placeholder:this.placeholder,required:this.required,disabled:this.disabled,value:this.inputValue,ref:t=>this.inputElement=t}),e("div",{class:{"invalid-feedback mt-2 text-sm text-red-600":!0,hidden:!this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),e("div",{class:{"sss-dropdown-menu absolute shadow rounded-md border mt-0.5 w-full overflow-auto bg-white z-50 py-2 text-sm":!0,hidden:!this.isDropdownVisible},onMouseEnter:()=>this.isMouseOver=!0,onMouseLeave:()=>this.isMouseOver=!1},this.renderFilteredResults())))}get _searchFunction(){if(void 0===this.searchFunction)throw new Error("Can't render <sss-dropdown-async/> component with no searchFunction");return this.searchFunction}};ve.style="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";const we={fundId:"active",name:"Active Super",logo:"logo-active.svg",route:ne.PromotedFundJoinV1,features:[e("p",null,"Winner of Canstar's 2023 Outstanding Value – Superannuation Award considering investment performance, fees and product features*"),e("p",null,"Recognised as a leader in responsible investment"),e("p",null,"Calls answered in 20 seconds (average over 5 years)")],featureSubText:e("span",null,"*Based on a comparison of the Active Super Accumulation Scheme held by those aged 20-69 years and balances between $30,000 and $1.5 million."),disclaimer:e("p",null,"Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at"," ",e(se,{onClick:()=>ae("Active Super"),href:"https://www.activesuper.com.au/pds"},"activesuper.com.au")," ","before making a decision."),footnoteTextOverride:vt.some("Powered by Flare FS"),dtoPropName:"active"},ge="Australian Ethical",be="https://www.australianethical.com.au/super/pds-forms/",ye={fundId:"australian-ethical",name:ge,logo:"logo-aus-eth.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Fastest growing super fund in Australia",e("sup",{class:"text-tiny"},"1")),e("p",null,"Nil investments in fossil fuel companies",e("sup",{class:"text-tiny"},"2")),e("p",null,"Competitive returns")],featureSubText:e("ol",{class:"list-decimal list-outside ml-3"},e("li",null,"Source: KPMG Super Insights Report 2022."),e("li",null,"All our options go through positive and negative ethical screening in accordance with the Australian Ethical Charter (in place since 1986).")),disclaimer:e("p",null,"Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the"," ",e(se,{href:"https://www.australianethical.com.au/globalassets/pdf-files/forms--pds/superpension/important-information/ae-financial-services-guide_sec.pdf"},"Financial Services Guide"),", the"," ",e(se,{href:be,onClick:()=>ae(ge)},"Product Disclosure Statement")," ","and"," ",e(se,{href:be,onClick:()=>ae(ge)},"Target Market Determination")," ","available on our"," ",e(se,{href:be,onClick:()=>ae(ge)},"website"),"."),footnoteTextOverride:vt.none,dtoPropName:"australianEthical"},xe="Australian Retirement Trust",Se={fundId:"australian-retirement-trust",name:xe,logo:"logo-art.svg",route:ne.PromotedFundJoinV1,features:[e("p",null,"$200 billion in retirement savings"),e("p",null,"2+ million members"),e("p",null,"A focus on delivering strong, long‑term returns")],featureSubText:e("span",null,"QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option."),disclaimer:e("p",null,"You should consider the"," ",e(se,{href:"https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf",onClick:()=>ae(xe)},"Product Disclosure Statement")," ","and"," ",e(se,{href:"https://www.australianretirementtrust.com.au/tmd"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:xe,abn:"60 905 115 063",footnoteTextOverride:vt.none,dtoPropName:"australianRetirementTrust"},Ce={fundId:"aware",name:"Aware Super",logo:"logo-aware.svg",route:ne.PromotedFundJoinV1,features:[e("p",null,"Awarded Canstar’s Outstanding Value Super^ in 2022 and 2023."),e("p",null,"Over 1 million",e("sup",{class:"text-tiny"},"‡")," Australians trust us with their super."),e("p",null,"Our super helpful app helps you stay in control of your super.")],featureSubText:e("div",{class:"space-y-0.5"},e("p",null,"^ See ",e(se,{href:"https://aware.com.au/awards"},"aware.com.au/awards")," for more information"),e("p",null,e("sup",{class:"text-tiny"},"‡")," Member numbers as of December 2023")),disclaimer:e("p",null,"You should consider the"," ",e(se,{href:"https://aware.com.au/member/campaign/flare-documents?cid=par-aq-no-su-Flare-PDSTMD-Direct-ImpDocs-",onClick:()=>ae("Aware Super")},"Product Disclosure Statement and Target Market Determination")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Aware Super Pty Ltd",abn:"53 226 460 365",footnoteTextOverride:vt.none,dtoPropName:"aware"},Fe={fundId:"first-super",name:"First Super",logo:"logo-first.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Industry SuperFund that offers five investment options and default insurance"),e("p",null,"Strong long-term investment returns and superior customer service - members first"),e("p",null,"Established super fund – anyone can join including KiwiSaver members")],disclaimer:e("div",null,e("p",null,"General advice only which has been prepared without taking into account your objectives, financial situation or needs. Consider whether the advice is appropriate for you and read the Product Disclosure Statement (PDS) before making any investment decisions. PDS and Target Market Determination are available at our"," ",e(se,{onClick:()=>ae("First Super"),href:"https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/"},"website"),". Past performance is not a reliable indicator of future performance."),e("br",null),e("p",null,"Issued by First Super Pty Ltd ABN 42 053 498 472, AFSL 223988 (Trustee) as Trustee of First Super ABN 56 286 625 181.")),footnoteTextOverride:vt.none,dtoPropName:"firstSuper"},ke={fundId:"hesta-default",name:"HESTA",logo:"logo-hesta.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"A top-performing super fund* working for real-world impact"),e("p",null,"1+ million members"),e("p",null,"Expert help whenever you need it to help you face the future with confidence")],featureSubText:void 0,disclaimer:e("div",{class:"space-y-2"},e("p",{class:"italic"},"* SuperRatings 10 Year Platinum Performance 2014-2024 (MySuper). Investment performance contributes to but is not the only factor in determining this product rating. Product ratings and awards are only one factor to be considered. See"," ",e(se,{className:"underline underline-offset-2 hover:text-gray-600",href:"https://www.hesta.com.au/ratings"},"hesta.com.au/ratings")," ","for more information."),e("p",null,"Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at"," ",e(se,{onClick:()=>ae("HESTA"),href:"https://www.hesta.com.au/pds"},"hesta.com.au/pds")," ","In considering your own circumstances about the suitability of HESTA products, you may wish to consult an adviser or use the ATO YourSuper comparison tool. Please also consider the relevant risks."),e("p",null,"Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA")),footnoteTextOverride:vt.none,isPromotedDefault:!0},Ae={fundId:"mercermychoice",name:"Mercer MyChoice",logo:"logo-mercer-mychoice.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Save more super with our low fees"),e("p",null,"Take control with 6 MyChoice investment options"),e("p",null,"Join 850,000 Australians who trust our global expertise")],disclaimer:e("div",null,e("p",null,"You should consider the"," ",e(se,{href:"https://www.mercersuper.com.au/campaign-page/mercer-mychoice",onClick:()=>ae("Mercer MyChoice")},"Product Disclosure Statement")," ","and"," ",e(se,{href:"https://www.mercersuper.com.au/documents/target-market-determinations"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of the fund."),e("br",null),e("p",null,"Issued by Mercer Superannuation (Australia) Limited (‘Mercer Super’) ABN: 79 004 717 533")),footnoteTextOverride:vt.some("Powered by Flare FS"),dtoPropName:"mercerMyChoice",extraBadge:e("span",{class:"text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1"},"Low fees")},Ne={fundId:"reisuper",name:"REI Super",logo:"logo-rei.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Built by and for the real estate industry"),e("p",null,"Consistent long-term performance with competitive fees*"),e("p",null,"All profits to members, not shareholders")],disclaimer:e("div",{class:"space-y-2"},e("p",null,"*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),e("p",null,"You should consider the"," ",e(se,{href:"https://www.reisuper.com.au/docs/default-source/super/rei-super-pds.pdf?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=pds",onClick:()=>ae("REI Super")},"Product Disclosure Statement")," ","and"," ",e(se,{href:"https://www.reisuper.com.au/publications-and-forms/target-market-determination?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=tmd"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of the fund.")),abnInfo:"REI Superannuation Fund Pty Ltd",abn:"68 056 044 770",footnoteTextOverride:vt.none,dtoPropName:"reisuper"},Me={fundId:"slate",name:"Slate Super",logo:"logo-slate.png",route:ne.SlateJoin,features:[e("p",null,"A lifestage investment strategy that evolves with you"),e("p",null,"Advanced mobile app with retirement forecast and smart features"),e("p",null,"Member advocates at Slate to assist with your account")],disclaimer:e("p",{class:"small text-muted"},"You should consider the"," ",e(se,{href:"https://slate.co/pds/?utm_source=flare&utm_medium=superselection",onClick:()=>ae("Slate Super","32367272075001")},"Product Disclosure Statement")," ","and"," ",e(se,{href:"https://slate.co/forms-and-documents/target-market-determination/"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of the fund."),abnInfo:"Diversa Trustees Limited",abn:"49 006 421 638",footnoteTextOverride:vt.none,dtoPropName:"slate"},Pe={fundId:"spirit",name:"Spirit Super",logo:"logo-spirit.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Proud Industry SuperFund - all profits go back to members"),e("p",null,"Best customer experience in super",e("sup",{class:"text-tiny"},"1")," and best for value",e("sup",{class:"text-tiny"},"2")),e("p",null,"Low fees",e("sup",{class:"text-tiny"},"3")," with a focus on strong returns and investing with impact in communities",e("sup",{class:"text-tiny"},"4"))],featureSubText:e("div",{class:"m-4 pt-2"},e("ol",{class:"list-decimal space-y-2"},e("li",null,e("span",null,"CSBA SenseCX Benchmark 2021-22")),e("li",null,e("span",null,"Awarded Best for Value in the WeMoney Superannuation Awards 2022")),e("li",null,e("span",null,"Just $67.60 + 0.15% pa admin fees, capped at $517.60")),e("li",null,e("span",null,"Rainmaker ESG Leader Rating 2022")))),disclaimer:e("p",null,"Past performance isn’t a reliable indicator of future performance. Consider the PDS and TMD at"," ",e(se,{href:"https://www.spiritsuper.com.au/pds",onClick:()=>ae("Spirit Super")},"www.spiritsuper.com.au/pds")," ","before making a decision. Issuer is Motor Trades Association of Australia Superannuation Fund Pty Ltd (AFSL 238 718, ABN 14 008 650 628), the trustee of Spirit Super (ABN 74 559 365 913). Advice is provided by Quadrant First Pty Ltd (ABN 78 102 167 877, AFSL 284443)."),footnoteTextOverride:vt.none,dtoPropName:"spirit"},Ee={fundId:"unisuper-default",name:"Unisuper",logo:"logo-unisuper.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Low fees, better value – Our fees are among the lowest in the industry.^"),e("p",null,"Strong, long-term performance – We regularly exceed industry averages.*"),e("p",null,"Award winning super – Continually recognised as one of Australia’s best-performing funds.",e("sup",{class:"text-tiny"},"#"))],disclaimer:e("div",{class:"space-y-2"},e("p",null,"^Read more about our fees and how we compare"," ",e(se,{href:"https://www.unisuper.com.au/super/products-and-fees"},"here"),"."),e("p",null,"*Past performance is not an indicator of future performance. Read more about our performance and how we compare"," ",e(se,{href:"https://www.unisuper.com.au/campaigns/greater-super"},"here"),"."),e("p",null,e("sup",{class:"text-tiny"},"#"),"See our awards"," ",e(se,{href:"https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings"},"here"),"."),e("p",null,"Remember to consider the"," ",e(se,{href:"https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84",onClick:()=>ae("Unisuper")},"Product Disclosure Statement")," ","and ",e(se,{href:"https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8"},"Target Market Determination")," that is relevant to you."),e("p",null,"Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850")),footnoteTextOverride:vt.none,isPromotedDefault:!0},De="Unisuper",Ie={fundId:"unisuper-default-v2",name:De,logo:"logo-unisuper.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Low fees, better value – Our fees are among the lowest in the industry.^"),e("p",null,"Strong, long-term performance – We regularly exceed industry averages.*"),e("p",null,"Award winning super – Continually recognised as one of Australia’s best-performing funds.",e("sup",{class:"text-tiny"},"#"))],customContent:e("div",{class:"mt-6 flex gap-3"},e("div",null,e("img",{alt:De,src:r("assets/unisuper-default-badge1.svg")})),e("div",null,e("img",{alt:De,src:r("assets/unisuper-default-badge2.svg")})),e("div",null,e("img",{alt:De,src:r("assets/unisuper-default-badge3.svg")}))),disclaimer:e("div",{class:"space-y-2"},e("p",null,"^Read more about our fees and how we compare"," ",e(se,{href:"https://www.unisuper.com.au/super/products-and-fees"},"here"),"."),e("p",null,"*Past performance is not an indicator of future performance. Read more about our performance and how we compare"," ",e(se,{href:"https://www.unisuper.com.au/campaigns/greater-super"},"here"),"."),e("p",null,e("sup",{class:"text-tiny"},"#"),"See our awards"," ",e(se,{href:"https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings"},"here"),"."),e("p",null,"Remember to consider the"," ",e(se,{href:"https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84",onClick:()=>ae(De)},"Product Disclosure Statement")," ","and ",e(se,{href:"https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8"},"Target Market Determination")," that is relevant to you."),e("p",null,"Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850")),footnoteTextOverride:vt.none,isPromotedDefault:!0},_e={fundId:"virgin",name:"Virgin Money Super",logo:"logo-virgin.svg",route:ne.PromotedFundJoinV2,features:[e("p",null,"Returns above industry and retail super fund medians over the past 5 years",e("sup",{class:"text-tiny"},"1")),e("p",null,"One of the lowest fees in the market"),e("p",null,"Virgin Money rewards you with Velocity Points on your contributions",e("sup",{class:"text-tiny"},"2"))],featureSubText:e("div",{class:"m-4 pt-2"},e("ol",{class:"list-decimal space-y-2"},e("li",null,e("span",null,"Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),e("li",null,e("span",null,e(se,{className:"underline underline-offset-2 hover:text-gray-600",href:"https://virginmoney.com.au/superannuation/forms-and-key-information/key-documents"},"Eligibility and T&Cs apply"))))),disclaimer:e("p",null,"Prepared by Virgin Money Financial Services Pty Ltd ABN 51 113 285 395 AFSL 286869 (‘Virgin Money’). Virgin Money Super is a plan in the Mercer Super Trust ABN 19 905 422 981. Virgin Money Super is issued by Mercer Superannuation (Australia) Limited (MSAL) ABN 79 004 717 533 AFSL 235906 as trustee of the Mercer Super Trust. Consider the PDS and TMD at"," ",e(se,{href:"https://virginmoney.com.au/superannuation/",onClick:()=>ae("Virgin Money Super")},"www.virginmoney.com.au")," ","before making a decision"),footnoteTextOverride:vt.some("Powered by Flare FS"),dtoPropName:"virgin",extraBadge:e("span",{class:"text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1"},"Low fees")},Be={[Me.fundId]:Me,[Se.fundId]:Se,[Ce.fundId]:Ce,[we.fundId]:we,[ye.fundId]:ye,[_e.fundId]:_e,[Pe.fundId]:Pe,[Fe.fundId]:Fe,[Ae.fundId]:Ae,[ke.fundId]:ke,[Ee.fundId]:Ee,[Ie.fundId]:Ie,[Ne.fundId]:Ne},Te=Object.values(Be),je=t=>null!=Be[t]?V(Be[t].name):q,Oe=t=>null!=Be[t]?V(r("assets/"+Be[t].logo)):q,Le=new class{async GetExistingFundAsync(){var t;const e=Ht.superBuyer.superChoice,n=null===(t=Ht.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!e)return q;if(!n)return q;const i=null==e.dateSubmitted?q:V(new Date(e.dateSubmitted)),r=function(t){switch(t.kind){case"Promoted":return function(t){switch(t.kind){case"slate":return q;case"australianRetirementTrust":return V(t.australianRetirementTrust.usi);case"aware":return V(t.aware.usi);case"active":return V(t.active.usi);case"australianEthical":return V(t.australianEthical.usi);case"virgin":return V(t.virgin.usi);case"spirit":return V(t.spirit.usi);case"firstSuper":return V(t.firstSuper.usi);case"mercerMyChoice":return V(t.mercerMyChoice.usi);case"generic":return V(t.generic.usi);default:return q}}(t.promoted);case"MyOwnFund":return V(t.myOwnFund.usi);case"SMSF":return q;case"Default":return V(t.default.usi);case"PromotedDefault":return V(t.promotedDefault.usi);case"DefinedBenefits":return V(t.definedBenefits.usi);case"PromotedDefaultWithJoin":return V(t.promotedDefaultWithJoin.usi);default:return q}}(n),s=function(t){switch(t.kind){case"Promoted":return function(t){switch(t.kind){case"slate":return V(t.slate.memberNumber);case"australianRetirementTrust":return V(t.australianRetirementTrust.memberNumber);case"aware":return V(t.aware.memberNumber);case"active":return V(t.active.memberNumber);case"australianEthical":return V(t.australianEthical.memberNumber);case"virgin":return V(t.virgin.memberNumber);case"spirit":return V(t.spirit.memberNumber);case"firstSuper":return V(t.firstSuper.memberNumber);case"mercerMyChoice":return V(t.mercerMyChoice.memberNumber);case"generic":return V(t.generic.memberNumber);default:return q}}(t.promoted);case"MyOwnFund":return V(t.myOwnFund.memberNumber);case"DefinedBenefits":return V(t.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return V(t.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":default:return q}}(n);switch(n.kind){case"Promoted":{const t=n.promoted.generic?(t=>{const e=Te.find((e=>e.fundId==t));return e?V(e):q})(n.promoted.generic.fundId):(t=>{const e=Te.find((e=>e.dtoPropName==t));return e?V(e):q})(Object.keys(n.promoted)[0]);return U(t)?q:V({type:"Promoted Fund",id:t.value.fundId,name:t.value.name,usi:r,valid:"Active",memberNumber:s,lastNominatedAt:i})}case"MyOwnFund":{const t=n.myOwnFund.usi,e=await this.getFundByUsiAsync(t);return V({type:"My Own Fund",name:R(e)?e.value.productName:t,usi:r,valid:this.toFundValidState(e),memberNumber:s,lastNominatedAt:i})}case"SMSF":return V({type:"Self Managed Fund",name:n.smsf.fundName,valid:"Unknown",lastNominatedAt:i});case"Default":{const t=n.default.usi,e=await this.getFundByUsiAsync(t);return V({type:"Default Fund",name:R(e)?e.value.productName:t,usi:r,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefault":{const t=n.promotedDefault.usi,e=await this.getFundByUsiAsync(t);return V({type:"Promoted Default Fund",id:n.promotedDefault.fundId,name:R(e)?e.value.productName:t,usi:r,valid:this.toFundValidState(e),lastNominatedAt:i})}case"DefinedBenefits":{const t=n.definedBenefits.usi,e=await this.getFundByUsiAsync(t);return V({type:"Defined Benefits Fund",name:R(e)?e.value.productName:t,usi:r,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefaultWithJoin":{const t=n.promotedDefaultWithJoin.usi,e=await this.getFundByUsiAsync(t);return V({type:"Promoted Default Fund With Join",id:n.promotedDefaultWithJoin.fundId,name:R(e)?e.value.productName:t,usi:r,valid:this.toFundValidState(e),memberNumber:s,lastNominatedAt:i})}default:return q}}async submitRetainSuperFundAsync(t){return Rt().url("super-choice/retain-super-fund").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}getFundByUsiAsync(t){return fe.getFundAsync(t,!0)}toFundValidState(t){return R(t)?t.value.isActive?"Active":"Inactive":"Unknown"}},Re=class{constructor(e){t(this,e),this.eventTrackingService=Gt.Instance,this.createSuperFundNominationDetail=t=>{function e(t){return R(t)?t.value:void 0}return{fundType:t.type.toString(),fundName:t.name,fundUsi:function(t){return"usi"in t?e(t.usi):void 0}(t),memberNumber:function(t){return"memberNumber"in t?e(t.memberNumber):void 0}(t),fundStatus:t.valid.toString(),lastNominatedAt:R(t.lastNominatedAt)?t.lastNominatedAt.value.toISOString():""}}}componentDidLoad(){const t=this.createSuperFundNominationDetail(this.existingFund);return this.eventTrackingService.TrackSuperFundNominationViewedAsync(t)}async componentWillLoad(){const t=await Le.GetExistingFundAsync();R(t)&&"Inactive"!==t.value.valid?this.existingFund=t.value:re.navigateInternally(this.history,ne.ConsentPage)}render(){const t=t=>{const n=Oe(t.id),i=je(t.id);return e("div",{class:"flex justify-center"},e("img",{class:"h-16 object-contain w-full max-w-140",alt:R(i)?i.value:void 0,src:R(n)?n.value:void 0}))},n=()=>e("div",{class:"flex h-20 justify-center items-center relative"},e("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),e("div",{class:"h-10 w-10 absolute"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},e("path",{d:"M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z"})))),i=()=>e("div",{class:"flex h-20 justify-center items-center relative"},e("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),e("div",{class:"h-10 w-10 absolute"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},e("path",{d:"M248.9 192H272v48C272 248.8 279.2 256 288 256C296.8 256 304 248.8 304 240V192h23.12C411.4 192 480 113 480 16C480 7.164 472.8 0 464 0h-39.13C364.9 0 313 40.13 288 98.13C263 40.13 211.1 0 151.1 0H112C103.2 0 96 7.164 96 16C96 113 164.6 192 248.9 192zM424.9 32h22.38c-6.625 71.88-58 128-120 128h-22.5C311.4 88.13 362.8 32 424.9 32zM151.1 32C213.3 32 264.5 88.13 271.3 160h-22.5c-62 0-113.4-56.13-120-128H151.1zM558.2 333.6c-9.5-8.619-22-13.37-35.12-13.37c-12.5 0-24.88 4.248-34.62 12.12l-61.45 49.21c-1.928 1.545-4.324 2.385-6.795 2.385h-41.62c4.625-9.619 6.5-20.74 4.75-32.23C379.4 323.7 353.7 304 325.6 304H181.2c-20.75 0-40.1 6.746-57.5 19.24l-38.5 28.73H16c-8.801 0-16 7.195-16 15.99S7.198 383.1 15.1 383.1l80.01-.0238l46.86-35.25c11.12-8.244 24.62-12.74 38.37-12.74h146.7c13.25 0 24 10.74 24 23.99s-10.75 23.98-24 23.98H239.1c-8.75 0-16 7.246-16 15.99c0 8.746 7.25 15.99 16 15.99h180.2c9.625 0 19-3.248 26.62-9.246l61.62-49.22c4.25-3.373 9.5-5.248 14.62-5.248c5 0 9.875 1.75 13.75 5.248c10.12 9.119 9.375 24.48-.875 32.61l-100.7 80.58c-7.584 6.064-17.01 9.369-26.72 9.369H16c-8.801 0-15.1 7.189-15.1 15.98S7.198 512 15.1 512h392.5c17 0 33.38-5.871 46.62-16.37l100.9-80.7c12.25-9.744 19.5-24.36 19.1-39.98C576.5 359.3 569.1 344.2 558.2 333.6z"})))),r=()=>e("div",{class:"flex h-20 justify-center items-center relative"},e("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),e("div",{class:"h-10 w-10 absolute"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"fill-primary-base"},e("path",{d:"M448 96h-64V48C384 21.53 362.5 0 336 0h-160C149.5 0 128 21.53 128 48V96H64C28.65 96 0 124.7 0 160v256c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C512 124.7 483.3 96 448 96zM160 48C160 39.17 167.2 32 176 32h160C344.8 32 352 39.17 352 48V96H160V48zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V288h144v64c0 8.844 7.156 16 16 16h128c8.844 0 16-7.156 16-16V288H480V416zM208 336V288h96v48H208zM480 256H32V160c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32V256z"})))),s=()=>e("div",{class:"flex h-20 justify-center items-center relative"},e("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),e("div",{class:"h-10 w-10 absolute"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},e("path",{d:"M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z"}))));return e("div",null,e("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Your super nomination"),"Defined Benefits Fund"==this.existingFund.type?null:e("div",{class:"sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7"},"Continue with your chosen fund or choose another fund below."),e("div",{class:"flex justify-center mt-8 sm:mt-12"},e("div",{class:"max-w-400 w-full"},e("div",{class:"flex-col border shadow-sm p-6 pt-8 rounded-lg text-center"},e("div",{class:"space-y-4"},(()=>{switch(this.existingFund.type){case"Promoted Fund":case"Promoted Default Fund":return e(t,{id:this.existingFund.id});case"Self Managed Fund":return e(i,null);case"My Own Fund":case"Promoted Default Fund With Join":return e(n,null);case"Default Fund":return e(r,null);case"Defined Benefits Fund":return e(s,null);default:return e("div",null)}})(),e("div",{class:"sm:text-lg font-bold leading-6 break-words"},(()=>{switch(this.existingFund.type){case"Default Fund":return"Employer's default fund";case"My Own Fund":case"Promoted Fund":case"Self Managed Fund":case"Promoted Default Fund":case"Defined Benefits Fund":case"Promoted Default Fund With Join":return this.existingFund.name;default:return""}})())),e("div",{class:"mt-6"},e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleFundNominationAccepted()},"Continue with this fund"))),e((()=>"Defined Benefits Fund"==this.existingFund.type?null:e("div",{class:"mt-4"},e("sss-button",{fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))),null))))}async handleFundNominationAccepted(){const t=this.createSuperFundNominationDetail(this.existingFund);await Le.submitRetainSuperFundAsync(t),Ht.markSuperSelectionAsSubmitted()}async handleFundNominationDeclined(){const t=this.createSuperFundNominationDetail(this.existingFund);await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(t),re.navigateInternally(this.history,Ht.state.superCampaignEnabled?ne.SuperCampaign:ne.ConsentPage)}},Ue=class{constructor(e){t(this,e),this.footerText=()=>vt.isSome(this.textOverride)?this.textOverride.value:"Powered by Flare"}render(){return e("div",{class:"text-center text-gray-500 text-xs mt-8 sm:mt-20 w-full max-w-960 mx-auto"},e("span",null,this.footerText()),e("p",{class:"block text-transparent"},"v","4.58.46161"))}},qe=(t,n)=>e("stencil-route-link",{exact:!0,url:t.route},e("div",{class:{"block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full":!0,"bg-white shadow-sm text-primary-base":t.isActive,"hover:bg-primary-hover text-white":!t.isActive}},n)),Ve=t=>{let n=ne.MyOwnFund;return window.location.href.includes(ne.SelfManagedFund)?n=ne.SelfManagedFund:window.location.href.includes(ne.DefaultFund)&&(n=ne.DefaultFund),e(qe,{route:n,isActive:t.isActive},"Choose another fund")},He=class{constructor(e){t(this,e)}render(){return e("div",{class:"flex justify-center"},e("div",{class:"text-center max-w-800"},e("h3",{class:"font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl"},"Nominate a super fund"),e(o,null,e("div",{class:"text-gray-600 sm:text-lg leading-7 sm:leading-8"},"You can choose any super fund, including your current fund/SMSF, your employer’s default fund, or alternatively, you can select from one of the featured funds."),e("div",{class:"inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal"},e(qe,{route:ne.ChoicePage,isActive:"choice"===this.currentPage},"Featured super funds"),e(Ve,{isActive:"own-fund"===this.currentPage})))))}},ze=class{constructor(e){t(this,e)}componentDidLoad(){this.build(this.iframeElement)}render(){return e("div",{class:"w-screen"},e("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:t=>this.iframeElement=t}))}},We=class{constructor(e){t(this,e)}render(){return e("div",{class:"w-full bg-white flex flex-col items-center"},e("sss-loading-indicator",null),e("h5",{class:"mt-4 text-xl font-bold leading-7"},this.header),e("slot",null))}},$e=class{constructor(e){t(this,e),this.theme="primary",this.size=48}render(){return e("div",{class:"inline-block animate-spin"},e("svg",{width:this.size,height:this.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z",fill:"white","fill-opacity":"0.3"}),e("path",{d:"M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z",class:"primary"===this.theme?"fill-primary-base":"fill-white"})))}},Je=class{constructor(e){t(this,e)}render(){return e(s,{class:"flex flex-col justify-center items-center"},e("h5",{class:"text-lg"},"Loading your superannuation step"),e("sss-loading-indicator",null))}},Ge=class{constructor(e){t(this,e)}render(){return e("sss-loading-component",{header:"Loading Super"},e("p",{class:"text-base text-gray-600 mt-4 max-w-560 text-center font-normal leading-7"},"This can take up to 30 seconds.",e("br",null),"Please don’t navigate away or refresh your browser."))}},Xe=class{constructor(e){t(this,e),this.isNotAllInformationProvidedMessageVisible=!1,this.isSubmitDisabled=!0,this.eventTrackingService=Gt.Instance}componentDidLoad(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:Ht.promotedFunds,defaultFundUsiSet:H(Ht.defaultFundUsi)})}render(){return e(s,null,e("sss-header-section",{currentPage:"own-fund"}),e("div",{class:"flex justify-center mt-11"},e("sss-custom-fund",null,e("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=!this.formElement.checkValidity()},e("div",{class:"p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg"},e("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),e("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4"},e("div",{class:"flex"},e("div",{class:"flex-shrink-0"},e("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),e("div",{class:"ml-2"},e("ul",{class:"list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5"},e("li",null,"Make sure you are a current member of the fund before completing this step."),e("li",null,"Please check that the fund USI is correct as some funds have similar names."))))),e("sss-my-own-fund-inputs",{myOwnFundForm:le.myOwnFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{le.myOwnFundForm=Object.assign(Object.assign({},le.myOwnFundForm),t.detail),this.isNotAllInformationProvidedMessageVisible=!1}}),this.isNotAllInformationProvidedMessageVisible&&e("div",{class:"mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700"},"All fields are required to complete submission. Make sure you have selected a fund.")),e("div",{class:"flex justify-center mt-8"},e("div",{class:"sm:max-w-320 w-full"},e("div",{class:"mb-4",onClick:()=>this.formState="validated"},e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),e("stencil-route-link",{url:ne.ChoicePage},e("sss-button",{fillWidth:!0,variant:"secondary"},"Back"))))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(R(le.myOwnFundForm.fundUsi)&&R(le.myOwnFundForm.memberNumber)&&R(le.myOwnFundForm.memberFirstName)&&R(le.myOwnFundForm.memberFamilyName)?re.navigateInternallyToStandardChoice({history:this.history,fundName:this.getOrError(le.myOwnFundForm.fundName),fundDetails:{type:"myOwnFund",fundName:this.getOrError(le.myOwnFundForm.fundName),fundUsi:this.getOrError(le.myOwnFundForm.fundUsi),memberNumber:this.getOrError(le.myOwnFundForm.memberNumber)},handleSubmitFn:async t=>{const e=Object.assign({fundUsi:this.getOrError(le.myOwnFundForm.fundUsi),memberNumber:this.getOrError(le.myOwnFundForm.memberNumber),memberFirstName:this.getOrError(le.myOwnFundForm.memberFirstName),memberFamilyName:this.getOrError(le.myOwnFundForm.memberFamilyName),standardChoiceFormSignature:t},Ht.promotedFundsConfig);await me.submitCustomFundChoiceAsync(e)}}):this.isNotAllInformationProvidedMessageVisible=!0)}getOrError(t){return pt.pipe(t,(e=()=>{throw new Error("Option value is none.")},function(t){return U(t)?e():t.value}));var e}};W(Xe);const Ye=class{constructor(e){t(this,e),this.formChanged=a(this,"formChanged",7),this.MIN_SEARCH_STRING_LENGTH=3,this.MAX_RECORD_COUNT=25,this.searchFundsAsync=async t=>{const e=await fe.searchFundsAsync(t,this.MAX_RECORD_COUNT);switch(e.result){case"TooManyResults":return{kind:"too-many-results"};default:return{kind:"success",value:e.data.sort(((t,e)=>t.productName.localeCompare(e.productName))).map((t=>({label:`${t.productName} (${t.usi})`,value:t.usi})))}}},R(this.myOwnFundForm.fundUsi)&&R(this.myOwnFundForm.fundName)&&(this.selectedOption={label:this.myOwnFundForm.fundName.value,value:this.myOwnFundForm.fundUsi.value})}render(){return e("div",null,e("div",null,e("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),e("div",{class:"mt-1"},e("sss-dropdown-async",{searchFunction:this.searchFundsAsync,minSearchStringLength:this.MIN_SEARCH_STRING_LENGTH,required:!0,requiredValidationMessage:"Select a fund",placeholder:"Type to search by name or USI...",value:this.selectedOption,onValueChanged:t=>{this.selectedOption=t.detail,this.updateFund(t.detail)},showValidationErrors:this.showValidationErrors})),R(this.myOwnFundForm.fundUsi)&&e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),e("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.myOwnFundForm.fundUsi.value))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Member number"),e("div",{class:"mt-1"},e("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md":!0,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},required:!0,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:H(le.myOwnFundForm.memberNumber),onChange:t=>this.updateMemberNumber(t.target.value.trim())}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid member number (only numbers and / or letters)"))),e("div",{class:"flex space-x-4"},e("div",{class:"mt-3 w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},"Given name(s)"),e("div",{class:"mt-1"},e("sss-name-input",{name:"memberFirstName",readableName:"Member given name(s)",showValidationErrors:this.showValidationErrors,value:H(le.myOwnFundForm.memberFirstName),onChange:t=>this.updateMemberFirstName(t.target.value.trim())}))),e("div",{class:"mt-3 w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},"Last name"),e("div",{class:"mt-1"},e("sss-name-input",{name:"memberFamilyName",readableName:"Member last name",showValidationErrors:this.showValidationErrors,value:H(le.myOwnFundForm.memberFamilyName),onChange:t=>this.updateMemberFamilyName(t.target.value.trim())})))))}updateFund(t){this.formChanged.emit({fundUsi:V(t.value),fundName:V(t.label)})}updateMemberNumber(t){this.formChanged.emit({memberNumber:V(t)})}updateMemberFirstName(t){this.formChanged.emit({memberFirstName:V(t)})}updateMemberFamilyName(t){this.formChanged.emit({memberFamilyName:V(t)})}},Ke=class{constructor(e){t(this,e),this.myInputChange=a(this,"myInputChange",7),this.value="",this.name="",this.readableName="",this.showValidationErrors=!1,this.errorMessage="",this.NAME_PATTERN="[A-Za-z]+(( |-)[A-Za-z][A-Za-z']+)*\\s*$"}render(){return e(s,null,e("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md":!0,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},required:!0,pattern:this.NAME_PATTERN,name:this.name,value:this.value,onInput:t=>this.handleInput(t)}),this.errorMessage&&e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},this.errorMessage))}handleInput(t){const e=t.target;e.value=e.value.replace(/\s+/g," "),this.validateInput(e),this.myInputChange.emit(e.value.trim())}validateInput(t){this.errorMessage=t.checkValidity()?"":t.validity.valueMissing?this.readableName+" is required.":t.validity.patternMismatch?t.value.startsWith("-")||t.value.startsWith("'")?this.readableName+" must start with a letter.":t.value.includes("--")?this.readableName+" must not have a double hypen.":this.readableName+" contains unsupported characters.":"Invalid input."}},Ze=class{constructor(e){t(this,e),this.prefill=void 0,this.ignorePopState=()=>window.history.pushState(null,"",null)}connectedCallback(){this.ignorePopState(),window.addEventListener("popstate",this.ignorePopState)}disconnectedCallback(){window.removeEventListener("popstate",this.ignorePopState)}async componentWillLoad(){this.prefill=R(Ht.state.superChoicePrefill)?Ht.state.superChoicePrefill.value:void 0}render(){return this.prefill&&"myOwnFund"===this.prefill.type?"Valid"===this.prefill.data.fundDetail.type?this.renderMyOwnFund(this.prefill.data):this.renderInvalidMyOwnFund(this.prefill.data):this.prefill&&"smsf"===this.prefill.type?this.prefill.data.fundAbn.valid?this.renderSMSF(this.prefill.data):this.renderInvalidSMSF(this.prefill.data):(re.navigateInternally(this.history,ne.ConsentPage),null)}renderMyOwnFund(t){return e("sss-prefill-my-own-fund",{history:this.history,prefill:t})}renderInvalidMyOwnFund(t){return e("sss-prefill-invalid-my-own-fund",{history:this.history,prefill:t})}renderSMSF(t){return e("sss-prefill-smsf",{history:this.history,prefill:t})}renderInvalidSMSF(t){return e("sss-prefill-invalid-smsf",{history:this.history,prefill:t})}},Qe=class{constructor(e){t(this,e)}render(){return e("div",{class:"flex w-full flex-col sm:flex-row sm:min-h-5 justify-center items-start gap-0.5 sm:gap-4 self-stretch"},e("div",{class:{"sm:w-2/5 sm:max-w-40 self-stretch text-gray-500 text-xs sm:text-sm not-italic font-medium leading-4 sm:leading-5":!0,"text-red-600":!this.field.isValid}},this.field.name),e("div",{class:{"sm:w-3/5 max-w-[300px] self-stretch text-gray-900 text-sm not-italic font-normal leading-5 break-words":!0,"h-5 sm:h-auto":this.field.isEmpty,"text-red-600":!this.field.isValid}},this.field.value))}},tn=class{constructor(e){t(this,e),this.withHeader=!1}render(){return e("div",{class:"flex items-start self-stretch rounded-md bg-red-50"},e("div",{class:"w-1 self-stretch bg-red-400"}),e("div",{class:"flex items-start gap-3 flex-[1_0_0] p-4"},e((()=>e("div",{class:"w-5 h-5"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711 7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289 12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071 11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z",fill:"#F87171"})))),null),e("div",{class:"flex-col justify-start items-start gap-2 inline-flex"},this.withHeader&&e("div",{class:"self-stretch text-red-800 text-sm font-medium leading-tight"},"Please correct ",this.notificationList.length," issues with your fund details"),this.withHeader&&this.notificationList.map((t=>e("div",{class:"self-stretch h-5 flex-col justify-start items-start gap-1 flex"},e("div",{class:"self-stretch pl-1.5 justify-start items-start gap-[7px] inline-flex"},e("div",{class:"pt-1.5 justify-center items-center flex"},e("div",{class:"w-1.5 h-1.5 bg-red-700 rounded-full"})),e("div",{class:"grow shrink basis-0 text-red-700 text-sm font-normal leading-tight"},t))))),!this.withHeader&&this.notificationList.map((t=>e("div",{class:"text-sm font-medium leading-tight text-red-800"},t))))))}};function en(t){return null==t||""===t.trim()}const nn=(t,n)=>e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},t),e("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},n)),rn=()=>e("div",null,e("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Your super nomination"),e("div",{class:"sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7"},"Review or update the below super fund nomination details provided by your employer."));class sn{static Input(t){return{"relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10":!0,"invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500":t}}}const an="[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";class on{constructor(t,e){this.name=t,this._value=null!=e?e:"",this._errorMessage=this.validateAndReturnErrorMessage(this._value)}get value(){return this._value}set value(t){this._errorMessage=this.validateAndReturnErrorMessage(t),this._value=t}get isValid(){return null===this._errorMessage}get isEmpty(){return en(this._value)}get errorMessage(){return this._errorMessage}}class un{constructor(t,e,n){this.name=t,this._value=null!=e?e:"",this._isValid=n}get value(){return this._value}get isValid(){return this._isValid}get isEmpty(){return en(this._value)}}class cn extends un{constructor(t,e){super("Fund USI",t,e)}}class ln extends un{constructor(t,e){super("Fund name",t,e)}}class dn extends on{constructor(t){super("Fund name",t)}validateAndReturnErrorMessage(t){return en(t)?"Fund name is required.":t.length<2?"Enter a valid Fund name.":null}}class hn extends on{constructor(t){super("Member number",t)}validateAndReturnErrorMessage(t){return en(t)?"Member number is required.":/^[A-Za-z0-9]{4,16}$/.test(t)?null:"Enter a valid member number (only numbers and / or letters)"}}class fn extends on{constructor(t){super("Member last name",t)}validateAndReturnErrorMessage(t){const e=new RegExp(an);return en(t)?"Member last name is required.":e.test(t)?null:"Member last name contains unsupported characters."}}class mn extends on{constructor(t){super("Member given name(s)",t)}validateAndReturnErrorMessage(t){const e=new RegExp(an);return en(t)?"Member given name(s) is required.":e.test(t)?null:"Member given name(s) contains unsupported characters."}}class pn extends un{constructor(t,e){super("Fund ABN",t,e)}}class vn extends on{constructor(t){super("Fund ESA",t)}validateAndReturnErrorMessage(t){return en(t)?"Fund ESA is required.":t.length<2?"Enter a valid Fund ESA.":null}}class wn extends on{constructor(t){super("Address line 1",t)}validateAndReturnErrorMessage(t){return en(t)?"Address line 1 is required.":t.length<2?"Enter a valid Address line 1.":null}}class gn extends on{constructor(t){super("Address line 2",t)}validateAndReturnErrorMessage(t){return null}}class bn extends on{constructor(t){super("City/suburb",t)}validateAndReturnErrorMessage(t){return en(t)?"City/suburb is required.":null}}class yn extends on{constructor(t){super("Postcode",t)}validateAndReturnErrorMessage(t){return en(t)?"Postcode is required.":/^[0-9]{4}$/.test(t)?null:"Enter a valid postcode."}}class xn extends on{constructor(t){super("State",t)}get options(){return[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}]}validateAndReturnErrorMessage(t){return en(t)?"State is required.":void 0===this.options.find((e=>e.value=t))?"Enter a valid state.":null}}class Sn extends un{constructor(t,e,n,i,r){super("Fund address",[t,e,n,i,r].map((t=>t.value)).filter((t=>t)).join(", "),t.isValid&&e.isValid&&n.isValid&&i.isValid&&r.isValid)}}class Cn extends on{constructor(t){super("Account name",t)}validateAndReturnErrorMessage(t){return en(t)?"Account name is required.":t.length<2?"Enter a valid Account name.":null}}class Fn extends un{constructor(t,e){super("Bank name",t,e)}}class kn extends on{constructor(t){super("BSB",t)}validateAndReturnErrorMessage(t){return en(t)?"BSB is required.":/^[0-9]{6,7}$/.test(t)?null:"Enter a valid BSB."}}class An extends on{constructor(t){super("Account number",t)}validateAndReturnErrorMessage(t){return en(t)?"Account number is required.":/^[0-9]{2,11}$/.test(t)?null:"Enter a valid Account number."}}const Nn=class{constructor(e){t(this,e),this.eventTrackingService=Gt.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!en(t.memberNumber),isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!en(t.memberNumber),isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)})}componentDidLoad(){const t=this.createSuperFundPrefillViewedDetail(this.prefill);return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(t)}async componentWillLoad(){this.prefill&&"Invalid"===this.prefill.fundDetail.type?(this.fundUsi=new cn(this.prefill.fundDetail.fundUsi,!1),this.fundName=new ln("",!1),this.memberNumber=new hn(this.prefill.memberNumber),this.memberGivenNames=new mn(this.prefill.memberFirstName),this.memberLastName=new fn(this.prefill.memberFamilyName)):re.navigateInternally(this.history,ne.ConsentPage)}render(){return e("div",null,e(rn,null),e("div",{class:"flex flex-col items-center gap-8 mt-8 sm:mt-12"},e("div",{class:"flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg"},e("div",{class:"flex flex-col items-start gap-3 self-stretch"},e("div",{class:"self-stretch text-grey-900 text-lg not-italic font-bold leading-7"},"Your fund details"),e("sss-prefill-error-box",{class:"self-stretch",notificationList:["The fund USI is invalid, or no longer in use. You are required to choose another fund to continue with your super nomination."]}),e("div",{class:"flex flex-col gap-3 self-stretch mt-4"},e("sss-prefill-display-field",{field:this.fundUsi}),e("sss-prefill-display-field",{field:this.fundName}),e("sss-prefill-display-field",{field:this.memberNumber}),e("sss-prefill-display-field",{field:this.memberLastName}),e("sss-prefill-display-field",{field:this.memberGivenNames})))),e("div",{class:"flex w-full sm:w-80 max-w-[560px] flex-col items-start gap-4"},e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"primary",promiseFn:()=>this.handleChooseAnotherFund()},"Choose another fund"))))}async handleChooseAnotherFund(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),re.navigateInternally(this.history,ne.ConsentPage)}},Mn=class{constructor(e){t(this,e),this.eventTrackingService=Gt.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)})}componentDidLoad(){const t=this.createSuperFundPrefillViewedDetail(this.prefill);return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(t)}async componentWillLoad(){this.prefill&&!this.prefill.fundAbn.valid?this.initialiseComponent(this.prefill):re.navigateInternally(this.history,ne.PrefillInvalidMyOwnFundPage)}render(){return e("div",null,e(rn,null),e("div",{class:"flex flex-col items-center gap-8 mt-8 sm:mt-12"},e("div",{class:"flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg"},e("div",{class:"flex flex-col items-start gap-3 self-stretch"},e("div",{class:"self-stretch text-grey-900 text-lg not-italic font-bold leading-7"},"Your self-managed super fund (SMSF) details"),e("sss-prefill-error-box",{class:"self-stretch",notificationList:["The fund ABN is invalid. You are required to choose another fund to continue with your super nomination."]}),e("div",{class:"flex flex-col gap-3 self-stretch mt-4"},e("sss-prefill-display-field",{field:this.fundName}),e("sss-prefill-display-field",{field:this.fundAbn}),e("sss-prefill-display-field",{field:this.fundEsa}),e("sss-prefill-display-field",{field:this.fundAddress}),e("sss-prefill-display-field",{field:this.memberLastName}),e("sss-prefill-display-field",{field:this.memberGivenNames}),e("div",{class:"mt-4 mb-2 text-gray-900 text-lg font-bold leading-7"},"Fund bank details"),e("sss-prefill-display-field",{field:this.bankAccountName}),e("sss-prefill-display-field",{field:this.bankAccountBsb}),e("sss-prefill-display-field",{field:this.bankAccountNumber})))),e("div",{class:"flex w-full sm:w-80 max-w-[560px] flex-col items-start gap-4"},e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"primary",promiseFn:()=>this.handleFundNominationDeclined()},"Make another nomination"))))}initialiseComponent(t){this.fundName=new dn(t.fundName),this.fundAbn=new pn(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new vn(t.electronicServiceAddress),this.fundAddressLine1=new wn(t.addressLine1),this.fundAddressLine2=new gn(t.addressLine2),this.fundAddressCity=new bn(t.addressCity),this.fundAddressPostcode=new yn(t.addressPostcode),this.fundAddressState=new xn(t.addressState),this.fundAddress=new Sn(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new mn(t.memberFirstName),this.memberLastName=new fn(t.memberFamilyName),this.bankAccountName=new Cn(t.bankAccountName),this.bankAccountBsb=new kn(t.bankAccountBsb),this.bankAccountNumber=new An(t.bankAccountNumber)}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),re.navigateInternally(this.history,ne.ConsentPage)}},Pn=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=Gt.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!en(t.memberNumber),isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!en(t.memberNumber),isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)})}componentDidLoad(){const t=this.createSuperFundPrefillViewedDetail(this.prefill);return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(t)}async componentWillLoad(){this.prefill&&"Valid"===this.prefill.fundDetail.type?this.initialiseComponent(this.prefill.fundDetail.fundName,this.prefill):re.navigateInternally(this.history,ne.ConsentPage)}render(){const t=[this.memberNumber.errorMessage,this.memberLastName.errorMessage,this.memberGivenNames.errorMessage].filter((t=>null!==t));return e("div",null,e(rn,null),e("div",{class:"flex flex-col items-center gap-8 mt-8 sm:mt-12"},e("div",{class:"flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg"},e("div",{class:"flex flex-col items-start gap-3.5 self-stretch"},e("div",{class:"self-stretch text-grey-900 text-lg not-italic font-bold leading-7"},"Your fund details"),e("sss-prefill-warning-box",{class:"self-stretch",notificationList:["Make sure you are a current member of the fund before completing this step.","Please check that the fund USI is correct as some funds have similar names."]}),"review"===this.mode&&t.length>0&&e("sss-prefill-error-box",{class:"self-stretch",notificationList:t,withHeader:!0}),"review"===this.mode&&e("div",{class:"flex flex-col gap-3 self-stretch mt-4"},e("sss-prefill-display-field",{field:this.fundUsi}),e("sss-prefill-display-field",{field:this.fundName}),e("sss-prefill-display-field",{field:this.memberNumber}),e("sss-prefill-display-field",{field:this.memberLastName}),e("sss-prefill-display-field",{field:this.memberGivenNames})),"review"===this.mode&&e("sss-button",{class:"self-stretch mt-3",fillWidth:!0,variant:"secondary",promiseFn:()=>this.setModeToEdit()},e("div",{class:"flex flex-row gap-2"},e("div",{class:"text-sm not-italic font-medium leading-4"},"Edit details"),e("div",{class:"w-4 h-4 relative"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"currentColor"},e("path",{d:"M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z"}),e("path",{d:"M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z"}))))),"edit"===this.mode&&e("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=this.formHasMissingData()},nn(this.fundName.name,this.fundName.value),nn(this.fundUsi.name,this.fundUsi.value),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.memberNumber.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,pattern:"[A-Za-z0-9]{4,16}",value:this.memberNumber.value,onInput:t=>{this.updateMemberNumber(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.memberNumber.errorMessage))),e("div",{class:"flex mt-3 gap-x-4 flex-col sm:flex-row"},e("div",{class:"w-full sm:w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},this.memberGivenNames.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,pattern:an,value:this.memberGivenNames.value,onInput:t=>{this.updateMemberGivenNames(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.memberGivenNames.errorMessage))),e("div",{class:"w-full sm:w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},this.memberLastName.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,pattern:an,value:this.memberLastName.value,onInput:t=>{this.updateMemberLastName(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.memberLastName.errorMessage))))))),e("div",{class:"flex w-full sm:w-80 max-w-[560px] flex-col items-start gap-4"},e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))))}initialiseComponent(t,e){this.fundUsi=new cn(e.fundDetail.fundUsi,!0),this.fundName=new ln(t,!0),this.memberNumber=new hn(e.memberNumber),this.memberGivenNames=new mn(e.memberFirstName),this.memberLastName=new fn(e.memberFamilyName),this.isSubmitDisabled=this.formHasMissingData()}isFormValid(){return this.fundUsi.isValid&&this.fundName.isValid&&this.memberNumber.isValid&&this.memberGivenNames.isValid&&this.memberLastName.isValid}formHasMissingData(){return this.fundUsi.isEmpty||this.fundName.isEmpty||this.memberNumber.isEmpty||this.memberGivenNames.isEmpty||this.memberLastName.isEmpty}setModeToEdit(){return this.mode="edit",Promise.resolve()}updateMemberNumber(t){this.memberNumber=new hn(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new mn(t.trimStart())}updateMemberLastName(t){this.memberLastName=new fn(t.trim())}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&re.navigateInternallyToStandardChoice({history:this.history,fundName:this.fundName.value,fundDetails:{type:"myOwnFund",fundName:this.fundName.value,fundUsi:this.fundUsi.value,memberNumber:this.memberNumber.value},handleSubmitFn:async t=>{const e=Object.assign({fundUsi:this.fundUsi.value,memberNumber:this.memberNumber.value,memberFirstName:this.memberGivenNames.value,memberFamilyName:this.memberLastName.value,standardChoiceFormSignature:t},Ht.promotedFundsConfig);await me.submitCustomFundChoiceAsync(e)}})}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),re.navigateInternally(this.history,ne.ConsentPage)}},En={"01":"Australia and New Zealand Banking Group","03":"Westpac Banking Corporation",73:"Westpac Banking Corporation","06":"Commonwealth Bank of Australia",76:"Commonwealth Bank of Australia","08":"National Australia Bank",78:"National Australia Bank","09":"Reserve Bank of Australia",10:"BankSA (division of Westpac Bank)",11:"St George Bank (division of Westpac Bank)",33:"St George Bank (division of Westpac Bank)",12:"Bank of Queensland",14:"Rabobank",15:"Town & Country Bank",18:"Macquarie Bank",19:"Bank of Melbourne (division of Westpac Bank)",55:"Bank of Melbourne (division of Westpac Bank)",21:"JP Morgan Chase Bank",22:"BNP Paribas",23:"Bank of America",24:"Citibank & Citibank NA",510:"Citibank & Citibank NA",25:"BNP Paribas Securities",26:"Bankers Trust Australia (division of Westpac Bank)",29:"MUFG Bank",30:"Bankwest (division of Commonwealth Bank)",31:"Bank Australia",325:"Beyond Bank",34:"HSBC Bank Australia",985:"HSBC Bank Australia",35:"Bank of China",980:"Bank of China",40:"Commonwealth Bank of Australia",41:"Deutsche Bank",42:"Commonwealth Bank of Australia",52:"Commonwealth Bank of Australia",45:"OCBC Bank",46:"Advance Bank (division of Westpac Bank)",47:"Challenge Bank (division of Westpac Bank)",48:"Suncorp-Metway",664:"Suncorp-Metway",512:"Community First Credit Union",514:"RACQ Bank",517:"Volt Bank",533:"Bananacoast Community Credit Union",57:"Australian Settlements",61:"Adelaide Bank (division of Bendigo and Adelaide Bank)",611:"Endeavour Mutual Bank",823:"Endeavour Mutual Bank",630:"Greater Bank",637:"Greater Bank",632:"B&E",633:"Bendigo Bank",634:"Uniting Financial Services",638:"Heritage Bank",880:"Heritage Bank",639:"Home Building Society (division of Bank of Queensland)",640:"Hume Bank",641:"IMB",647:"IMB",642:"Australian Military Bank",645:"Auswide Bank",656:"Auswide Bank",646:"Maitland Mutual Building Society",650:"Newcastle Permanent Building Society",653:"Pioneer Permanent Building Society (division of Bank of Queensland)",654:"Queensland Country Credit Union",655:"The Rock",659:"G&C Mutual Bank",676:"Gateway Bank",70:"Indue",721:"Holiday Coast Credit Union",722:"Southern Cross Credit Union",723:"Bank of Heritage Isle",724:"MOVE",728:"Summerland Credit Union",777:"Police & Nurse",80:"Cuscal",670:"Cuscal",812:"Teachers Mutual Bank",813:"Capricornian",814:"Credit Union Australia",815:"Police Bank",817:"Warwick Credit Union",818:"Bank of Communications",819:"Industrial & Commercial Bank of China",824:"Sutherland Credit Union",825:"Big Sky Building Society",833:"Defence Bank",882:"Unity Bank",888:"China Construction Bank",90:"Australia Post",911:"Sumitomo Mitsui Banking Corporation",913:"State Street Bank & Trust Company",917:"Arab Bank Australia",918:"Mizuho Bank",922:"United Overseas Bank",923:"ING Bank",936:"ING Bank",931:"Mega International Commercial Bank",932:"Regional Australia Bank",939:"AMP Bank",941:"Delphi Bank (division of Bendigo and Adelaide Bank)",942:"Bank of Sydney",943:"Taiwan Business Bank",944:"Members Equity Bank",946:"UBS AG",951:"BOQ Specialist",969:"Tyro Payments"},Dn=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=Gt.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!en(t.memberFirstName),isMemberLastNamePresent:!en(t.memberFamilyName)})}componentDidLoad(){const t=this.createSuperFundPrefillViewedDetail(this.prefill);return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(t)}async componentWillLoad(){this.prefill&&this.prefill.fundAbn.valid?this.initialiseComponent(this.prefill):re.navigateInternally(this.history,ne.PrefillInvalidMyOwnFundPage)}render(){const t=[this.fundName.errorMessage,this.fundEsa.errorMessage,this.fundAddressLine1.errorMessage,this.fundAddressLine2.errorMessage,this.fundAddressCity.errorMessage,this.fundAddressPostcode.errorMessage,this.fundAddressState.errorMessage,this.memberLastName.errorMessage,this.memberGivenNames.errorMessage,this.bankAccountName.errorMessage,this.bankAccountBsb.errorMessage,this.bankAccountNumber.errorMessage].filter((t=>null!==t));return e("div",null,e(rn,null),e("div",{class:"flex flex-col items-center gap-8 mt-8 sm:mt-12"},e("div",{class:"flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg"},e("div",{class:"flex flex-col items-start gap-3 self-stretch"},e("div",{class:"self-stretch text-grey-900 text-lg not-italic font-bold leading-7"},"Your self-managed super fund (SMSF) details"),e("sss-prefill-warning-box",{class:"self-stretch",notificationList:["Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."]}),"review"===this.mode&&t.length>0&&e("sss-prefill-error-box",{class:"self-stretch",notificationList:t,withHeader:!0}),"review"===this.mode&&e("div",{class:"flex flex-col gap-3 self-stretch mt-4"},e("sss-prefill-display-field",{field:this.fundName}),e("sss-prefill-display-field",{field:this.fundAbn}),e("sss-prefill-display-field",{field:this.fundEsa}),e("sss-prefill-display-field",{field:this.fundAddress}),e("sss-prefill-display-field",{field:this.memberLastName}),e("sss-prefill-display-field",{field:this.memberGivenNames}),e("div",{class:"mt-4 mb-2 text-gray-900 text-lg font-bold leading-7"},"Fund bank details"),e("sss-prefill-display-field",{field:this.bankAccountName}),e("sss-prefill-display-field",{field:this.bankAccountBsb}),this.bankName.isValid&&e("sss-prefill-display-field",{field:this.bankName}),e("sss-prefill-display-field",{field:this.bankAccountNumber})),"review"===this.mode&&e("sss-button",{class:"self-stretch mt-3",fillWidth:!0,variant:"secondary",promiseFn:()=>this.setModeToEdit()},e("div",{class:"flex flex-row gap-2"},e("div",{class:"text-sm not-italic font-medium leading-4"},"Edit details"),e("div",{class:"w-4 h-4 relative"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"currentColor"},e("path",{d:"M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z"}),e("path",{d:"M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z"}))))),"edit"===this.mode&&e("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"w-full":!0,"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=this.formHasMissingData()},e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.fundName.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.fundName.value,onInput:t=>{this.updateFundName(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.fundName.errorMessage))),nn(this.fundAbn.name,this.fundAbn.value),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.fundEsa.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,minlength:"2",value:this.fundEsa.value,onInput:t=>{this.updateFundEsa(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.fundEsa.errorMessage))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund address"),e("div",{class:"mt-1 rounded-md shadow-sm -space-y-px"},e("input",{placeholder:"Address line 1",type:"text",class:Object.assign(Object.assign({},sn.Input("validated"===this.formState)),{"rounded-none rounded-t-md shadow-none border-b-0":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:this.fundAddressLine1.value,onInput:t=>{this.updateAddressLine1(t.target.value)}}),e("input",{placeholder:"Address line 2 (optional)",type:"text",class:Object.assign(Object.assign({},sn.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),value:this.fundAddressLine2.value,onInput:t=>this.updateAddressLine2(t.target.value)}),e("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},sn.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),required:!0,value:this.fundAddressCity.value,onInput:t=>{this.updateAddressCity(t.target.value)}}),e("div",{class:"flex -space-x-px"},e("div",{class:"w-1/2 flex-1 min-w-0"},e("input",{placeholder:"Postcode",type:"text",required:!0,class:Object.assign(Object.assign({},sn.Input("validated"===this.formState)),{"rounded-none rounded-bl-md shadow-none border-r-0":!0}),name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:this.fundAddressPostcode.value,inputmode:"numeric",onInput:t=>{this.updateAddressPostcode(t.target.value)}})),e("div",{class:"flex-1 min-w-0"},e("select",{class:Object.assign(Object.assign({},sn.Input("validated"===this.formState)),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":"validated"!==this.formState}),name:"state",required:!0,id:"state",onInput:t=>{this.updateAddressState(t.target.value)}},e("option",{disabled:!0,selected:void 0!==this.fundAddressState.value,value:""},"State"),this.fundAddressState.options.map((t=>e("option",{value:t.value,selected:this.fundAddressState.value===t.value},t.label))))))),"validated"===this.formState&&e("div",{class:"mt-2 text-sm text-red-600"},this.fundAddressLine1.errorMessage||this.fundAddressLine1.errorMessage||this.fundAddressCity.errorMessage||this.fundAddressPostcode.errorMessage||this.fundAddressState.errorMessage)),e("div",{class:"flex gap-x-4 flex-col sm:flex-row"},e("div",{class:"mt-3 w-full sm:w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},this.memberGivenNames.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.memberGivenNames.value,onInput:t=>{this.updateMemberGivenNames(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.memberGivenNames.errorMessage))),e("div",{class:"mt-3 w-full sm:w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},this.memberLastName.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.memberLastName.value,onInput:t=>{this.updateMemberLastName(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.memberLastName.errorMessage)))),e("div",{class:"mt-6 text-gray-900 text-lg font-bold leading-7"},"Fund bank details"),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.bankAccountName.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.bankAccountName.value,onInput:t=>{this.updateBankAccountName(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.bankAccountName.errorMessage))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.bankAccountBsb.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.bankAccountBsb.value,onInput:t=>{const e=t.target.value;this.updateBankName(e),this.updateBankAccountBsb(e)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.bankAccountBsb.errorMessage))),this.bankName.isValid&&nn(this.bankName.name,this.bankName.value),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},this.bankAccountNumber.name),e("div",{class:"mt-1"},e("input",{type:"text",class:sn.Input("validated"===this.formState),required:!0,value:this.bankAccountNumber.value,onInput:t=>{this.updateBankAccountNumber(t.target.value)}}),e("div",{class:"mt-2 text-sm text-red-600"},"validated"===this.formState&&this.bankAccountNumber.errorMessage)))))),e("div",{class:"flex w-full sm:w-80 max-w-[560px] flex-col items-start gap-4"},e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{class:"self-stretch",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Make another nomination"))))}isFormValid(){return this.fundName.isValid&&this.fundAbn.isValid&&this.fundEsa.isValid&&this.fundAddressLine1.isValid&&this.fundAddressLine2.isValid&&this.fundAddressCity.isValid&&this.fundAddressPostcode.isValid&&this.fundAddressState.isValid&&this.memberGivenNames.isValid&&this.memberLastName.isValid&&this.bankAccountName.isValid&&this.bankAccountBsb.isValid&&this.bankAccountNumber.isValid}formHasMissingData(){return this.fundName.isEmpty||this.fundAbn.isEmpty||this.fundEsa.isEmpty||this.fundAddressLine1.isEmpty||this.fundAddressCity.isEmpty||this.fundAddressPostcode.isEmpty||this.fundAddressState.isEmpty||this.memberGivenNames.isEmpty||this.memberLastName.isEmpty||this.bankAccountName.isEmpty||this.bankAccountBsb.isEmpty||this.bankAccountNumber.isEmpty}setModeToEdit(){return this.mode="edit",Promise.resolve()}updateFundName(t){this.fundName=new dn(t.trim())}updateFundEsa(t){this.fundEsa=new vn(t.trim())}updateAddressLine1(t){this.fundAddressLine1=new wn(t.trim())}updateAddressLine2(t){this.fundAddressLine2=new gn(t.trim())}updateAddressCity(t){this.fundAddressCity=new bn(t.trim())}updateAddressPostcode(t){this.fundAddressPostcode=new yn(t.trim())}updateAddressState(t){this.fundAddressState=new xn(t.trim())}updateBankAccountName(t){this.bankAccountName=new Cn(t.trim())}updateBankAccountBsb(t){this.bankAccountBsb=new kn(t.trim())}updateBankAccountNumber(t){this.bankAccountNumber=new An(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new mn(t)}updateMemberLastName(t){this.memberLastName=new fn(t.trim())}filterDigits(t){return t.replace(/[^0-9]/g,"")}tryGetBankName(t){if(null==t)return null;const e=this.filterDigits(t),n=e.substring(0,2),i=e.substring(0,3);return En[n]||En[i]||null}updateBankName(t){const e=this.tryGetBankName(t);this.bankName=new Fn(e,null!=e)}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&re.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:this.fundName.value,fundEsa:this.fundEsa.value},handleSubmitFn:async t=>{const e=Object.assign({smsfChoice:{abn:this.fundAbn.value,fundName:this.fundName.value,fundAddress:{addressLine1:this.fundAddressLine1.value,addressLine2:""===this.fundAddressLine2.value.trim()?null:this.fundAddressLine2.value.trim(),city:this.fundAddressCity.value,state:this.fundAddressState.value,postcode:this.fundAddressPostcode.value},bsb:this.bankAccountBsb.value,bankAccountName:this.bankAccountName.value,bankAccountNumber:this.bankAccountNumber.value,electronicServiceAddress:this.fundEsa.value,memberFirstName:this.memberGivenNames.value,memberFamilyName:this.memberLastName.value},standardChoiceFormSignature:t},Ht.promotedFundsConfig);await me.submitSelfManagedFundChoiceAsync(e)}})}initialiseComponent(t){this.fundName=new dn(t.fundName),this.fundAbn=new pn(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new vn(t.electronicServiceAddress),this.fundAddressLine1=new wn(t.addressLine1),this.fundAddressLine2=new gn(t.addressLine2),this.fundAddressCity=new bn(t.addressCity),this.fundAddressPostcode=new yn(t.addressPostcode),this.fundAddressState=new xn(t.addressState),this.fundAddress=new Sn(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new mn(t.memberFirstName),this.memberLastName=new fn(t.memberFamilyName),this.bankAccountName=new Cn(t.bankAccountName);const e=this.tryGetBankName(t.bankAccountBsb);this.bankName=new Fn(e,null!=e),this.bankAccountBsb=new kn(t.bankAccountBsb),this.bankAccountNumber=new An(t.bankAccountNumber),this.isSubmitDisabled=this.formHasMissingData()}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),re.navigateInternally(this.history,ne.ConsentPage)}},In=class{constructor(e){t(this,e)}render(){return e("div",{class:"flex items-start self-stretch rounded-md bg-yellow-50"},e("div",{class:"w-1 self-stretch bg-yellow-400"}),e("div",{class:"flex items-start gap-3 flex-[1_0_0] p-4"},e((()=>e("div",{class:"w-5 h-5"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.25706 3.09882C9.02167 1.73952 10.9788 1.73952 11.7434 3.09882L17.3237 13.0194C18.0736 14.3526 17.1102 15.9999 15.5805 15.9999H4.4199C2.89025 15.9999 1.92682 14.3526 2.67675 13.0194L8.25706 3.09882ZM11.0001 13C11.0001 13.5523 10.5524 14 10.0001 14C9.44784 14 9.00012 13.5523 9.00012 13C9.00012 12.4477 9.44784 12 10.0001 12C10.5524 12 11.0001 12.4477 11.0001 13ZM10.0001 5C9.44784 5 9.00012 5.44772 9.00012 6V9C9.00012 9.55228 9.44784 10 10.0001 10C10.5524 10 11.0001 9.55228 11.0001 9V6C11.0001 5.44772 10.5524 5 10.0001 5Z",fill:"#FBBF24"})))),null),e("div",{class:"flex flex-col items-start gap-2 flex-[1_0_0]"},e("div",{class:"flex flex-col items-start gap-1 self-stretch"},this.notificationList.map((t=>e("div",{class:"flex items-start gap-[7px] self-stretch pl-0"},this.notificationList.length>1&&e("div",{class:"pt-1.5 justify-center items-center flex"},e("div",{class:"w-1.5 h-1.5 bg-yellow-700 rounded-full"})),e("div",{class:"flex-[1_0_0] text-sm not-italic font-normal leading-5 text-yellow-700"},t))))))))}},_n=new class{async submitChoiceAsync(t){return Rt().url("super-choice/promoted-fund").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Fund choice request")})).text()}async submitDefaultChoiceAsync(t){return Rt().url("super-choice/promoted-fund/default").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Default Fund choice request")})).text()}async submitDefaultChoiceWithJoinAsync(t){return Rt().url("super-choice/promoted-fund/default-with-join").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Default Fund With Join choice request")})).text()}},Bn=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.environmentDiscriminator=()=>this.hostIsLocalSuperSelection()?"autodev-partner":window.location.hostname.toLowerCase().split(".")[0],this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`}build(t,e){if(!(null==t?void 0:t.contentDocument))return;const n=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ht.partnerIdOrDefault,accountId:Ht.accountIdOrDefault,fundId:Wt.fund.id,authToken:Ht.jwt}),i=n=>{const{data:r}=n;if(r)if("promoted-fund-redirect"!==r.sender){if("promoted-fund-join"===r.sender)switch(r.type){case"contentResized":t.height=r.height>0?r.height:t.height,t.width=r.width>0?r.width:t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Zt(window.location.href)}}else{switch(window.removeEventListener("message",i),r.type){case"cancel":re.navigateInternally(e,ne.ChoicePage);break;case"success":if(r.memberNumber){const t=Wt.fund.id,n=pt.pipe(je(t),vt.getOrElse((()=>""))),i=r.usi.replace(/ /g,"");re.navigateInternallyToStandardChoice({history:e,fundName:n,fundDetails:{type:"promoted",fundName:n,fundUsi:i,memberNumber:r.memberNumber,promotedFundId:t},handleSubmitFn:e=>_n.submitChoiceAsync(Object.assign({fundId:t,memberNumber:r.memberNumber,memberFirstName:r.memberFirstName,memberFamilyName:r.memberFamilyName,usi:i,standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig)),promotedFundId:t});break}default:re.navigateInternally(e,ne.ChoicePage)}$t()}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let a;for(a in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),n){const t=n[a];if(void 0!==t){const e=document.createElement("input");e.type="hidden",e.name=a,e.value=t,s.append(e)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,e;const n=Ht.superBuyer;return{title:n.userProfile.title,firstName:n.userProfile.firstName,middleName:n.userProfile.middleName,lastName:n.userProfile.lastName,dateOfBirth:n.userProfile.dateOfBirth,gender:n.userProfile.gender,email:n.userProfile.email,mobilePhone:n.userProfile.mobilePhone,taxFileNumber:null!==(t=n.tfn)&&void 0!==t?t:"",addressLine1:n.userProfile.address.addressLine1,addressLine2:null!==(e=n.userProfile.address.addressLine2)&&void 0!==e?e:"",city:n.userProfile.address.city,state:n.userProfile.address.state,postCode:n.userProfile.address.postcode}}},Tn=class{constructor(e){t(this,e)}render(){return e("sss-iframe-host",{build:t=>Bn.build(t,this.history)})}};function jn(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function On(t){var e=Object.create;if(e)return e(t);if(null==t)return{};var n=typeof t;if("object"!==n&&"function"!==n)throw new TypeError("Object prototype may only be an Object:"+t);function i(){}return i.prototype=t,new i}var Ln,Rn,Un=function(t,e){return(Un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},qn=jn()||{};Rn=function(t,e){function n(){this.constructor=t}Un(t,e),t.prototype=null===e?On(e):(n.prototype=e.prototype,new n)},(Ln=qn).__assign||(Ln.__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}),Ln.__extends||(Ln.__extends=Rn),__assign||(__assign=qn.__assign),__extends||(__extends=qn.__extends);var Vn=jn;function Hn(t){var e=Vn();return e&&e[t]?e[t]:"window"===t&&zn()?window:null}function zn(){return Boolean("object"==typeof window&&window)}function Wn(){return zn()?window:Hn("window")}function $n(){return Boolean("object"==typeof document&&document)}function Jn(){return $n()?document:Hn("document")}function Gn(){return Boolean("object"==typeof navigator&&navigator)?navigator:Hn("navigator")}function Xn(){return"object"==typeof location&&location?location:Hn("location")}function Yn(){return Hn("performance")}function Kn(){return Boolean("object"==typeof JSON&&JSON||null!==Hn("JSON"))}function Zn(){return Kn()?JSON||Hn("JSON"):null}var Qn=null,ti=!1,ei=123456789,ni=987654321;function ii(t){t<0&&(t>>>=0),ei=123456789+t&4294967295,ni=987654321-t&4294967295,ti=!0}function ri(){ii(4294967296*Math.random()^(new Date).getTime())}function si(t,e){return typeof t===e}function ai(t){return si(t,"undefined")||void 0===t}function oi(t){return ai(t)||null===t}function ui(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function ci(t){return si(t,"object")}function li(t){return si(t,"function")}function di(t,e,n,i){void 0===i&&(i=!1);var r=!1;if(!oi(t))try{oi(t.addEventListener)?oi(t.attachEvent)||(t.attachEvent("on"+e,n),r=!0):(t.addEventListener(e,n,i),r=!0)}catch(t){}return r}function hi(t,e,n,i){if(void 0===i&&(i=!1),!oi(t))try{oi(t.removeEventListener)?oi(t.detachEvent)||t.detachEvent("on"+e,n):t.removeEventListener(e,n,i)}catch(t){}}function fi(t,e){if(t&&ci(t))for(var n in t)ui(t,n)&&e.call(t,n,t[n])}var mi,pi=function(){function t(){}return t.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},t.isError=function(t){return"[object Error]"===Object.prototype.toString.call(t)},t.isString=function(t){return si(t,"string")},t.isNumber=function(t){return si(t,"number")},t.isBoolean=function(t){return si(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(vi,(function(e){var n=0|t.randomValue(15);return("x"===e?n:3&n|8).toString(16)}))},t.toISOString=function(e){if(t.isDate(e)){var n=function(t){var e=String(t);return 1===e.length&&(e="0"+e),e};return e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate())+"T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":"+n(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},t.arrForEach=function(t,e,n){for(var i=t.length,r=0;r<i;r++)r in t&&e.call(n||t,t[r],r,t)},t.arrIndexOf=function(t,e,n){for(var i=t.length,r=n||0,s=Math.max(r>=0?r:i-Math.abs(r),0);s<i;s++)if(s in t&&t[s]===e)return s;return-1},t.arrMap=function(t,e,n){for(var i=t.length,r=n||t,s=new Array(i),a=0;a<i;a++)a in t&&(s[a]=e.call(r,t[a],t));return s},t.arrReduce=function(t,e,n){var i,r=t.length,s=0;if(arguments.length>=3)i=arguments[2];else{for(;s<r&&!(s in t);)s++;i=t[s++]}for(;s<r;)s in t&&(i=e(i,t[s],s,t)),s++;return i},t.strTrim=function(e){return t.isString(e)?e.replace(/^\s+|\s+$/g,""):e},t.objKeys=function(t){var e=!{toString:null}.propertyIsEnumerable("toString");if(!(li(t)||ci(t)&&null!==t))throw new TypeError("objKeys called on non-object");var n=[];for(var i in t)ui(t,i)&&n.push(i);if(e)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=r.length,a=0;a<s;a++)ui(t,r[a])&&n.push(r[a]);return n},t.objDefineAccessors=function(t,e,n,i){var r=Object.defineProperty;if(r)try{var s={enumerable:!0,configurable:!0};return n&&(s.get=n),i&&(s.set=i),r(t,e,s),!0}catch(t){}return!1},t.addEventHandler=function(t,e){var n=!1,i=Wn();i&&(n=di(i,t,e),n=di(i.body,t,e)||n);var r=Jn();return r&&(n=wi.Attach(r,t,e)||n),n},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var e=Yn();return e&&e.now?e.now():t.dateNow()},t.newId=function(e){void 0===e&&(e=22);for(var n=t.random32()>>>0,i=0,r="";r.length<e;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n),n>>>=6,5===i&&(n=(t.random32()<<2&4294967295|3&n)>>>0,i=0);return r},t.isIE=function(){if(null===Qn){var t=((Gn()||{}).userAgent||"").toLowerCase();Qn=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return Qn},t.randomValue=function(e){return e>0?Math.floor(t.random32()/4294967295*(e+1))>>>0:0},t.random32=function(e){var n,i=Hn("crypto")||Hn("msCrypto");return i&&i.getRandomValues?n=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(ti||ri(),n=4294967295&t.mwcRandom32()):n=Math.floor(4294967296*Math.random()|0),e||(n>>>=0),n},t.mwcRandomSeed=function(t){t?ii(t):ri()},t.mwcRandom32=function(t){var e=((ni=36969*(65535&ni)+(ni>>16)&4294967295)<<16)+(65535&(ei=18e3*(65535&ei)+(ei>>16)&4294967295))>>>0&4294967295|0;return t||(e>>>=0),e},t.generateW3CId=function(){for(var e,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=n[15&(e=t.random32())]+n[e>>4&15]+n[e>>8&15]+n[e>>12&15]+n[e>>16&15]+n[e>>20&15]+n[e>>24&15]+n[e>>28&15];var s=n[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+s+i.substr(16,3)+i.substr(19,12)},t.isTypeof=si,t.isUndefined=ai,t.isNullOrUndefined=oi,t.hasOwnProperty=ui,t.isFunction=li,t.isObject=ci,t.objCreate=On,t}(),vi=/[xy]/g,wi=function(){function t(){}return t.Attach=di,t.AttachEvent=di,t.Detach=hi,t.DetachEvent=hi,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(mi||(mi={}));var gi=Object.getPrototypeOf,bi=0;
|
|
2
|
+
/*!
|
|
3
|
+
* Microsoft Dynamic Proto Utility, 1.1.0
|
|
4
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
5
|
+
*/function yi(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function xi(t){return"function"==typeof t}function Si(t){return t&&(t===Object.prototype||t===Array.prototype)}function Ci(t){return Si(t)||t===Function.prototype}function Fi(t){if(t){if(gi)return gi(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}function ki(t,e,n){return"constructor"!==e&&xi(t[e])&&(n||yi(t,e))}function Ai(t){throw new TypeError("DynamicProto: "+t)}function Ni(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function Mi(t,e,n,i){var r=null;if(t&&yi(n,"_dynClass")){var s=t._dynInstFuncs||{};if((r=(s[n._dynClass]||{})[e])||Ai("Missing ["+e+"] function"),!r._dynInstChk&&!1!==s._dynInstChk){for(var a=!yi(t,e),o=Fi(t),u=[];a&&o&&!Ci(o)&&!Ni(u,o);){var c=o[e];if(c){a=c===i;break}u.push(o),o=Fi(o)}try{a&&(t[e]=r),r._dynInstChk=1}catch(t){s._dynInstChk=!1}}}return r}function Pi(t,e,n){var i=e[t];return i===n&&(i=Fi(e)[t]),xi(i)||Ai("["+t+"] is not a function"),i}function Ei(t,e){return yi(t,"prototype")?t.name||e||"_unknown_":((t||{}).constructor||{}).name||e||"_unknown_"}function Di(t,e,n,i){yi(t,"prototype")||Ai("theClass is an invalid class definition.");var r=t.prototype;(function(t,e){for(var n=Fi(e);n&&!Ci(n);){if(n===t)return!0;n=Fi(n)}return!1})(r,e)||Ai("["+Ei(t)+"] is not in class hierarchy of ["+Ei(e)+"]");var s=null;yi(r,"_dynClass")?s=r._dynClass:(s="_dynCls$"+Ei(t,"_")+"$"+bi,bi++,r._dynClass=s);var a=Di._dfOpts,o=!!a.useBaseInst;o&&i&&void 0!==i.useBaseInst&&(o=!!i.useBaseInst);var u=function(t){var e={};for(var n in t)!e[n]&&ki(t,n,!1)&&(e[n]=t[n]);return e}(e);n(e,function(t,e,n,i){function r(t,e,n){var r=e[a];if(r._isDynProxy&&i){var s=t._dynInstFuncs||{};!1!==s._dynInstChk&&(r=(s[e._dynClass]||{})[n]||r)}return function(){return r.apply(t,arguments)}}var s={};for(var a in n)s[a]=r(e,n,a);for(var o=Fi(t),u=[];o&&!Ci(o)&&!Ni(u,o);){for(var a in o)!s[a]&&ki(o,a,!gi)&&(s[a]=r(e,o,a));u.push(o),o=Fi(o)}return s}(r,e,u,o));var c=!!gi&&!!a.setInstFuncs;c&&i&&(c=!!i.setInstFuncs),function(t,e,n,i,r){function s(t,e){var n=function(){return(Mi(this,e,t,n)||Pi(e,t,n)).apply(this,arguments)};return n._isDynProxy=1,n}if(!Si(t)){var a=n._dynInstFuncs=n._dynInstFuncs||{},o=a[e]=a[e]||{};for(var u in!1!==a._dynInstChk&&(a._dynInstChk=!!r),n)ki(n,u,!1)&&n[u]!==i[u]&&(o[u]=n[u],delete n[u],(!yi(t,u)||t[u]&&!t[u]._isDynProxy)&&(t[u]=s(t,u)))}}(r,s,e,u,!1!==c)}function Ii(t){return t?'"'+t.replace(/\"/g,"")+'"':""}Di._dfOpts={setInstFuncs:!0,useBaseInst:!0};var _i=function(){function t(t,e,n,i){void 0===n&&(n=!1);var r=this;r.messageId=t,r.message=(n?"AI: ":"AI (Internal): ")+t;var s="";Kn()&&(s=Zn().stringify(i));var a=(e?" message:"+Ii(e):"")+(i?" props:"+Ii(s):"");r.message+=a}return t.dataType="MessageData",t}(),Bi=function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,i={};Di(t,this,(function(t){var r=pi.isNullOrUndefined,s=pi.isUndefined,a=pi.isFunction;function o(t,n){var i=e[t];return r(i)?n:i}r(e)&&(e={}),t.consoleLoggingLevel=function(){return o("loggingLevelConsole",0)},t.telemetryLoggingLevel=function(){return o("loggingLevelTelemetry",1)},t.maxInternalMessageLimit=function(){return o("maxMessageLimit",25)},t.enableDebugExceptions=function(){return o("enableDebugExceptions",!1)},t.throwInternal=function(e,n,r,a,o){void 0===o&&(o=!1);var u=new _i(n,r,o,a);if(t.enableDebugExceptions())throw u;if(!s(u)&&u&&!s(u.message)){if(o){var c=+u.messageId;!i[c]&&t.consoleLoggingLevel()>=mi.WARNING&&(t.warnToConsole(u.message),i[c]=!0)}else t.consoleLoggingLevel()>=mi.WARNING&&t.warnToConsole(u.message);t.logInternalMessage(e,u)}},t.warnToConsole=function(t){var e="undefined"!=typeof console?console:Hn("console");if(e){var n="log";e.warn&&(n="warn"),a(e[n])&&e[n](t)}},t.resetInternalMessageCount=function(){n=0,i={}},t.logInternalMessage=function(e,r){if(!(n>=t.maxInternalMessageLimit())){var s=!0,a="AITR_"+r.messageId;if(i[a]?s=!1:i[a]=!0,s&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(r),n++),n===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",u=new _i(23,o,!1);t.queue.push(u),t.warnToConsole(o)}}}}))}return t.prototype.enableDebugExceptions=function(){return!1},t.prototype.consoleLoggingLevel=function(){return 0},t.prototype.telemetryLoggingLevel=function(){return 1},t.prototype.maxInternalMessageLimit=function(){return 25},t.prototype.throwInternal=function(){},t.prototype.warnToConsole=function(){},t.prototype.resetInternalMessageCount=function(){},t.prototype.logInternalMessage=function(){},t}(),Ti=function(){function t(e,n,i){var r,s=this,a=!1;s.start=pi.dateNow(),s.name=e,s.isAsync=i,s.isChildEvt=function(){return!1},pi.isFunction(n)&&(a=pi.objDefineAccessors(s,"payload",(function(){return!r&&pi.isFunction(n)&&(r=n(),n=null),r}))),s.getCtx=function(e){return e?e===t.ParentContextKey||e===t.ChildrenContextKey?s[e]:(s.ctx||{})[e]:null},s.setCtx=function(e,n){e&&(e===t.ParentContextKey?(s[e]||(s.isChildEvt=function(){return!0}),s[e]=n):e===t.ChildrenContextKey?s[e]=n:(s.ctx=s.ctx||{})[e]=n)},s.complete=function(){var e=0,i=s.getCtx(t.ChildrenContextKey);if(pi.isArray(i))for(var r=0;r<i.length;r++){var o=i[r];o&&(e+=o.time)}s.time=pi.dateNow()-s.start,s.exTime=s.time-e,s.complete=function(){},!a&&pi.isFunction(n)&&(s.payload=n())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),ji=function(){function t(e){this.ctx={},Di(t,this,(function(t){t.create=function(t,e,n){return new Ti(t,e,n)},t.fire=function(t){t&&(t.complete(),e&&e.perfEvent(t))},t.setCtx=function(e,n){e&&((t.ctx=t.ctx||{})[e]=n)},t.getCtx=function(e){return(t.ctx||{})[e]}}))}return t.prototype.create=function(){return null},t.prototype.fire=function(){},t.prototype.setCtx=function(){},t.prototype.getCtx=function(){},t}();function Oi(t,e,n,i,r){if(t){var s=t;if(s&&pi.isFunction(s.getPerfMgr)&&(s=s.getPerfMgr()),s){var a=void 0,o=s.getCtx("CoreUtils.doPerf");try{if(a=s.create(e(),i,r)){if(o&&a.setCtx&&(a.setCtx(Ti.ParentContextKey,o),o.getCtx&&o.setCtx)){var u=o.getCtx(Ti.ChildrenContextKey);u||o.setCtx(Ti.ChildrenContextKey,u=[]),u.push(a)}return s.setCtx("CoreUtils.doPerf",a),n(a)}}catch(t){a&&a.setCtx&&a.setCtx("exception",t)}finally{a&&s.fire(a),s.setCtx("CoreUtils.doPerf",o)}}}return n()}var Li=pi.isFunction,Ri=function(t,e){var n=this,i=null,r=Li(t.processTelemetry),s=Li(t.setNextPlugin);n._hasRun=!1,n.getPlugin=function(){return t},n.getNext=function(){return i},n.setNext=function(t){i=t},n.processTelemetry=function(a,o){o||(o=e);var u=t?t.identifier:"TelemetryPluginChain";Oi(o?o.core():null,(function(){return u+":processTelemetry"}),(function(){if(t&&r){n._hasRun=!0;try{o.setNext(i),s&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(a,o)}catch(n){var e=i&&i._hasRun;i&&e||o.diagLog().throwInternal(mi.CRITICAL,73,"Plugin ["+t.identifier+"] failed during processTelemetry - "+n),i&&!e&&i.processTelemetry(a,o)}}else i&&(n._hasRun=!0,i.processTelemetry(a,o))}),(function(){return{item:a}}),!a.sync)}},Ui=pi.isNullOrUndefined;function qi(t,e){var n=[];if(t&&t.length>0)for(var i=null,r=0;r<t.length;r++){var s=t[r];if(s&&pi.isFunction(s.processTelemetry)){var a=new Ri(s,e);n.push(a),i&&i.setNext(a),i=a}}return n.length>0?n[0]:null}var Vi=function t(e,n,i,r){var s=this,a=null;null!==r&&(e&&pi.isFunction(e.getPlugin)?a=function(t,e,n){var i=[],r=!n;if(t)for(;t;){var s=t.getPlugin();(r||s===n)&&(r=!0,i.push(s)),t=t.getNext()}return r||i.push(n),qi(i,e)}(e,s,r||e.getPlugin()):r?a=function(t,e,n){var i=t,r=!1;return n&&t&&(i=[],pi.arrForEach(t,(function(t){(r||t===n)&&(r=!0,i.push(t))}))),n&&!r&&(i||(i=[]),i.push(n)),qi(i,e)}(e,s,r):pi.isUndefined(r)&&(a=qi(e,s))),s.core=function(){return i},s.diagLog=function(){var t=(i||{}).logger;return t||(t=new Bi(n||{})),t},s.getCfg=function(){return n},s.getExtCfg=function(t,e){var i;if(void 0===e&&(e={}),n){var r=n.extensionConfig;r&&t&&(i=r[t])}return i||e},s.getConfig=function(t,e,i){var r;void 0===i&&(i=!1);var a=s.getExtCfg(t,null);return a&&!Ui(a[e])?r=a[e]:n&&!Ui(n[e])&&(r=n[e]),Ui(r)?i:r},s.hasNext=function(){return null!=a},s.getNext=function(){return a},s.setNext=function(t){a=t},s.processNext=function(t){var e=a;e&&(a=e.getNext(),e.processTelemetry(t,s))},s.createNew=function(e,r){return void 0===e&&(e=null),new t(e||a,n,i,r)}},Hi=pi.isFunction,zi=function(){function t(){var t=this,e=!1,n=null,i=null;t.core=null,t.diagLog=function(e){return t._getTelCtx(e).diagLog()},t.isInitialized=function(){return e},t.setInitialized=function(t){e=t},t.setNextPlugin=function(t){i=t},t.processNext=function(t,e){e?e.processNext(t):i&&Hi(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(e){void 0===e&&(e=null);var r=e;r||(r=(n||new Vi(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return r},t._baseTelInit=function(r,s,a,o){r&&(r.extensionConfig=r.extensionConfig||[]),!o&&s&&(o=s.getProcessTelContext().getNext());var u=i;i&&i.getPlugin&&(u=i.getPlugin()),t.core=s,n=new Vi(o,r,s,u),e=!0}}return t.prototype.initialize=function(t,e,n,i){this._baseTelInit(t,e,n,i)},t}(),Wi=pi.isFunction;function $i(t,e){for(var n=[],i=null,r=t.getNext();r;){var s=r.getPlugin();s&&(i&&Wi(i.setNextPlugin)&&Wi(s.processTelemetry)&&i.setNextPlugin(s),Wi(s.isInitialized)&&s.isInitialized()||n.push(s),i=s,r=r.getNext())}pi.arrForEach(n,(function(n){n.initialize(t.getCfg(),t.core(),e,t.getNext())}))}function Ji(t){return t.sort((function(t,e){var n=0,i=Wi(e.processTelemetry);return Wi(t.processTelemetry)?n=i?t.priority-e.priority:1:i&&(n=-1),n}))}var Gi=pi.objDefineAccessors,Xi=function(t){function e(){var n=t.call(this)||this;n.identifier="ChannelControllerPlugin",n.priority=500;var i,r=pi.arrForEach;function s(t){t&&t.length>0&&(function(t){r(t,(function(t){if(t.priority<500)throw Error("Channel has invalid priority"+t.identifier)}))}(t=t.sort((function(t,e){return t.priority-e.priority}))),i.push(t))}return Di(e,n,(function(t,e){t.setNextPlugin=function(){},t.processTelemetry=function(t,e){i&&r(i,(function(i){i.length>0&&n._getTelCtx(e).createNew(i).processNext(t)}))},t.getChannelControls=function(){return i},t.initialize=function(n,a,o){t.isInitialized()||(e.initialize(n,a,o),n.isCookieUseDisabled&&pi.disableCookies(),function(t,e){if(i=[],t&&r(t,(function(t){return s(t)})),e){var n=[];r(e,(function(t){t.priority>500&&n.push(t)})),s(n)}}((n||{}).channels,o),r(i,(function(t){return $i(new Vi(t,n,a),o)})))}})),n}return __extends(e,t),e.prototype.processTelemetry=function(){},e.prototype.getChannelControls=function(){return null},e.prototype.initialize=function(){},e._staticInit=(Gi(e.prototype,"ChannelControls",e.prototype.getChannelControls),void Gi(e.prototype,"channelQueue",e.prototype.getChannelControls)),e}(zi),Yi=pi.arrForEach,Ki=pi.isNullOrUndefined,Zi=function(){function t(){var e,n,i,r,s=!1;Di(t,this,(function(t){t._extensions=new Array,n=new Xi,t.logger=pi.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),e=[],t.isInitialized=function(){return s},t.initialize=function(e,r,a,o){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Ki(e.instrumentationKey))throw Error("Please provide instrumentation key");i=o,t._notificationManager=o,t.config=e||{},e.extensions=Ki(e.extensions)?[]:e.extensions,(e.extensionConfig=Ki(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=o,a&&(t.logger=a);var u=[];u.push.apply(u,r.concat(e.extensions)),u=Ji(u);var c=[],l={};if(Yi(u,(function(t){if(Ki(t)||Ki(t.initialize))throw Error("Extensions must provide callback to initialize");var e=t.priority,i=t.identifier;t&&e&&(Ki(l[e])?l[e]=i:a.warnToConsole("Two extensions have same priority #"+e+" - "+l[e]+", "+i)),(!e||e<n.priority)&&c.push(t)})),u.push(n),c.push(n),u=Ji(u),t._extensions=u,$i(new Vi([n],e,t),u),$i(new Vi(c,e,t),u),t._extensions=c,0===t.getTransmissionControls().length)throw new Error("No channels available");s=!0,t.releaseQueue()},t.getTransmissionControls=function(){return n.getChannelControls()},t.track=function(n){n.iKey||(n.iKey=t.config.instrumentationKey),n.time||(n.time=pi.toISOString(new Date)),Ki(n.ver)&&(n.ver="4.0"),t.isInitialized()?t.getProcessTelContext().processNext(n):e.push(n)},t.getProcessTelContext=function(){var e=t._extensions,i=e;return e&&0!==e.length||(i=[n]),new Vi(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=pi.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return r||t.config&&t.config.enablePerfMgr&&(r=new ji(t.getNotifyMgr())),r},t.setPerfMgr=function(t){r=t},t.eventCnt=function(){return e.length},t.releaseQueue=function(){e.length>0&&(Yi(e,(function(e){t.getProcessTelContext().processNext(e)})),e=[])}}))}return t.prototype.initialize=function(){},t.prototype.getTransmissionControls=function(){return null},t.prototype.track=function(){},t.prototype.getProcessTelContext=function(){return null},t.prototype.getNotifyMgr=function(){return null},t.prototype.getPerfMgr=function(){return null},t.prototype.setPerfMgr=function(){},t.prototype.eventCnt=function(){return 0},t.prototype.releaseQueue=function(){},t}(),Qi=function(){function t(e){this.listeners=[];var n=pi.arrForEach,i=!!(e||{}).perfEvtsSendAll;Di(t,this,(function(t){t.addNotificationListener=function(e){t.listeners.push(e)},t.removeNotificationListener=function(e){for(var n=pi.arrIndexOf(t.listeners,e);n>-1;)t.listeners.splice(n,1),n=pi.arrIndexOf(t.listeners,e)},t.eventsSent=function(e){n(t.listeners,(function(t){t&&t.eventsSent&&setTimeout((function(){return t.eventsSent(e)}),0)}))},t.eventsDiscarded=function(e,i){n(t.listeners,(function(t){t&&t.eventsDiscarded&&setTimeout((function(){return t.eventsDiscarded(e,i)}),0)}))},t.eventsSendRequest=function(e,i){n(t.listeners,(function(t){if(t&&t.eventsSendRequest)if(i)setTimeout((function(){return t.eventsSendRequest(e,i)}),0);else try{t.eventsSendRequest(e,i)}catch(t){}}))},t.perfEvent=function(e){e&&(!i&&e.isChildEvt()||n(t.listeners,(function(t){if(t&&t.perfEvent)if(e.isAsync)setTimeout((function(){return t.perfEvent(e)}),0);else try{t.perfEvent(e)}catch(t){}})))}}))}return t.prototype.addNotificationListener=function(){},t.prototype.removeNotificationListener=function(){},t.prototype.eventsSent=function(){},t.prototype.eventsDiscarded=function(){},t.prototype.eventsSendRequest=function(){},t}(),tr=function(t){function e(){var n=t.call(this)||this;return Di(e,n,(function(t,e){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(t,n,i,r){e.initialize(t,n,i||new Bi(t),r||new Qi(t))},t.track=function(i){Oi(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw n(i),Error("Invalid telemetry item");!function(t){if(pi.isNullOrUndefined(t.name))throw n(t),Error("telemetry name required")}(i),e.track(i)}),(function(){return{item:i}}),!i.sync)},t.addNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.addNotificationListener(e)},t.removeNotificationListener=function(e){var n=t.getNotifyMgr();n&&n.removeNotificationListener(e)},t.pollInternalLogs=function(e){var n=t.config.diagnosticLogInterval;return n&&n>0||(n=1e4),setInterval((function(){var n=t.logger?t.logger.queue:[];pi.arrForEach(n,(function(n){var i={name:e||"InternalMessageId: "+n.messageId,iKey:t.config.instrumentationKey,time:pi.toISOString(new Date),baseType:_i.dataType,baseData:{message:n.message}};t.track(i)})),n.length=0}),n)}})),n}return __extends(e,t),e.prototype.initialize=function(){},e.prototype.track=function(){},e.prototype.addNotificationListener=function(){},e.prototype.removeNotificationListener=function(){},e.prototype.pollInternalLogs=function(){return 0},e}(Zi),er=["req","rsp","hkErr","fnErr"];function nr(t,e){if(t)for(var n=0;n<t.length&&!e(t[n],n);n++);}function ir(t,e,n,i,r){r>=0&&r<=2&&nr(t,(function(t,s){var a=t.cbks,o=a[er[r]];if(o){e.ctx=function(){return i[s]=i[s]||{}};try{o.apply(e.inst,n)}catch(t){var u=e.err;try{var c=a[er[2]];c&&(e.err=t,c.apply(e.inst,n))}catch(t){}finally{e.err=u}}}}))}var rr,sr,ar,or=Object.getPrototypeOf;function ur(t,e,n){var i=null;return t&&(pi.hasOwnProperty(t,e)?i=t:n&&(i=ur(function(t){if(t){if(or)return or(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}(t),e,!1))),i}function cr(t,e,n,i){if(void 0===i&&(i=!0),t&&e&&n){var r=ur(t,e,i);if(r){var s=r[e];if("function"==typeof s){var a=s._aiHooks;if(!a){var o=(c=a={i:0,n:e,f:s,h:[]},function(){var t=this,e=arguments,n=c.h,i={name:c.n,inst:t,ctx:null,set:o},r=[],s=a([i],e);function a(t,e){return nr(e,(function(e){t.push(e)})),t}function o(t,n){(e=a([],e))[t]=n,s=a([i],e)}ir(n,i,s,r,0);var u=c.f;try{i.rslt=u.apply(t,e)}catch(t){throw i.err=t,ir(n,i,s,r,3),t}return ir(n,i,s,r,1),i.rslt});o._aiHooks=a,r[e]=o}var u={id:a.i,cbks:n,rm:function(){var t=this.id;nr(a.h,(function(e,n){if(e.id===t)return a.h.splice(n,1),1}))}};return a.i++,a.h.push(u),u}}}var c;return null}!function(t){t[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage"}(rr||(rr={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(sr||(sr={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(ar||(ar={}));var lr,dr=function(){function t(){}return t.requestContextHeader="Request-Context",t.requestContextTargetKey="appId",t.requestContextAppIdFormat="appId=cid-v1:",t.requestIdHeader="Request-Id",t.traceParentHeader="traceparent",t.sdkContextHeader="Sdk-Context",t.sdkContextHeaderAppIdRequest="appId",t.requestContextHeaderLowerCase="request-context",t}(),hr=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n,i){var r=n.length,s=t.sanitizeKey(e,n);if(s.length!==r){for(var a=0,o=s;void 0!==i[o];)a++,o=s.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);s=o}return s},t.sanitizeKey=function(e,n){var i;return n&&(n=t.trim(n.toString())).length>t.MAX_NAME_LENGTH&&(i=n.substring(0,t.MAX_NAME_LENGTH),e.throwInternal(mi.WARNING,57,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:n},!0)),i||n},t.sanitizeString=function(e,n,i){var r;return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=t.trim(n)).toString().length>i&&(r=n.toString().substring(0,i),e.throwInternal(mi.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),r||n},t.sanitizeUrl=function(e,n){return t.sanitizeInput(e,n,t.MAX_URL_LENGTH,66)},t.sanitizeMessage=function(e,n){var i;return n&&n.length>t.MAX_MESSAGE_LENGTH&&(i=n.substring(0,t.MAX_MESSAGE_LENGTH),e.throwInternal(mi.WARNING,56,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:n},!0)),i||n},t.sanitizeException=function(e,n){var i;return n&&n.length>t.MAX_EXCEPTION_LENGTH&&(i=n.substring(0,t.MAX_EXCEPTION_LENGTH),e.throwInternal(mi.WARNING,52,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},!0)),i||n},t.sanitizeProperties=function(e,n){if(n){var i={};fi(n,(function(n,r){if(pi.isObject(r)&&Kn())try{r=Zn().stringify(r)}catch(t){e.throwInternal(mi.WARNING,49,"custom property is not valid",{exception:t},!0)}r=t.sanitizeString(e,r,t.MAX_PROPERTY_LENGTH),n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=r})),n=i}return n},t.sanitizeMeasurements=function(e,n){if(n){var i={};fi(n,(function(n,r){n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=r})),n=i}return n},t.sanitizeId=function(e,n){return n?t.sanitizeInput(e,n,t.MAX_ID_LENGTH,69).toString():n},t.sanitizeInput=function(e,n,i,r){var s;return n&&(n=t.trim(n)).length>i&&(s=n.substring(0,i),e.throwInternal(mi.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:n},!0)),s||n},t.padNumber=function(t){var e="00"+t;return e.substr(e.length-3)},t.trim=function(t){return pi.isString(t)?t.replace(/^\s+|\s+$/g,""):t},t.MAX_NAME_LENGTH=150,t.MAX_ID_LENGTH=128,t.MAX_PROPERTY_LENGTH=8192,t.MAX_STRING_LENGTH=1024,t.MAX_URL_LENGTH=2048,t.MAX_MESSAGE_LENGTH=32768,t.MAX_EXCEPTION_LENGTH=32768,t}(),fr=Gn(),mr=pi.isString,pr=null,vr=function(){function t(){}return t.createDomEvent=function(t){var e=null;if(pi.isFunction(Event))e=new Event(t);else{var n=Jn();n&&n.createEvent&&(e=n.createEvent("Event")).initEvent(t,!0,!0)}return e},t.disableStorage=function(){t._canUseLocalStorage=!1,t._canUseSessionStorage=!1},t._getLocalStorageObject=function(){return t.canUseLocalStorage()?t._getVerifiedStorageObject(rr.LocalStorage):null},t._getVerifiedStorageObject=function(t){var e,n,i=null;try{if(pi.isNullOrUndefined(Vn()))return null;n=new Date,(i=Hn(t===rr.LocalStorage?"localStorage":"sessionStorage")).setItem(n.toString(),n.toString()),e=i.getItem(n.toString())!==n.toString(),i.removeItem(n.toString()),e&&(i=null)}catch(t){i=null}return i},t.isInternalApplicationInsightsEndpoint=function(e){return-1!==t._internalEndpoints.indexOf(e.toLowerCase())},t.canUseLocalStorage=function(){return void 0===t._canUseLocalStorage&&(t._canUseLocalStorage=!!t._getVerifiedStorageObject(rr.LocalStorage)),t._canUseLocalStorage},t.getStorage=function(e,n){var i=t._getLocalStorageObject();if(null!==i)try{return i.getItem(n)}catch(n){t._canUseLocalStorage=!1,e.throwInternal(mi.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setStorage=function(e,n,i){var r=t._getLocalStorageObject();if(null!==r)try{return r.setItem(n,i),!0}catch(n){t._canUseLocalStorage=!1,e.throwInternal(mi.WARNING,3,"Browser failed write to local storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t.removeStorage=function(e,n){var i=t._getLocalStorageObject();if(null!==i)try{return i.removeItem(n),!0}catch(n){t._canUseLocalStorage=!1,e.throwInternal(mi.WARNING,5,"Browser failed removal of local storage item. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t._getSessionStorageObject=function(){return t.canUseSessionStorage()?t._getVerifiedStorageObject(rr.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(rr.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var e=[];return t.canUseSessionStorage()&&fi(Hn("sessionStorage"),(function(t){e.push(t)})),e},t.getSessionStorage=function(e,n){var i=t._getSessionStorageObject();if(null!==i)try{return i.getItem(n)}catch(n){t._canUseSessionStorage=!1,e.throwInternal(mi.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setSessionStorage=function(e,n,i){var r=t._getSessionStorageObject();if(null!==r)try{return r.setItem(n,i),!0}catch(n){t._canUseSessionStorage=!1,e.throwInternal(mi.WARNING,4,"Browser failed write to session storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t.removeSessionStorage=function(e,n){var i=t._getSessionStorageObject();if(null!==i)try{return i.removeItem(n),!0}catch(n){t._canUseSessionStorage=!1,e.throwInternal(mi.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t.disableCookies=function(){pi.disableCookies()},t.canUseCookies=function(e){if(void 0===pi._canUseCookies){pi._canUseCookies=!1;try{pi._canUseCookies=void 0!==t.document.cookie}catch(n){e.throwInternal(mi.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(n),{exception:t.dump(n)})}}return pi._canUseCookies},t.disallowsSameSiteNone=function(t){return!!mr(t)&&(-1!==t.indexOf("CPU iPhone OS 12")||-1!==t.indexOf("iPad; CPU OS 12")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&-1!==t.indexOf("Version/")&&-1!==t.indexOf("Safari")||-1!==t.indexOf("Macintosh; Intel Mac OS X 10_14")&&"AppleWebKit/605.1.15 (KHTML, like Gecko)"===(e=t).substring((i=(n=e.length)-"AppleWebKit/605.1.15 (KHTML, like Gecko)".length)>=0?i:0,n)||-1!==t.indexOf("Chrome/5")||-1!==t.indexOf("Chrome/6")||-1!==t.indexOf("UnrealEngine")&&-1===t.indexOf("Chrome")||-1!==t.indexOf("UCBrowser/12")||-1!==t.indexOf("UCBrowser/11"));var e,n,i},t.setCookie=function(e,n,i,r){if(t.canUseCookies(e)){var s="",a="";r&&(s=";domain="+r);var o=Xn();o&&"https:"===o.protocol&&(a=";secure",null===pr&&(pr=t.disallowsSameSiteNone((Gn()||{}).userAgent)),pr||(i+=";SameSite=None")),t.document.cookie=n+"="+i+s+";path=/"+a}},t.stringToBoolOrDefault=function(t,e){return void 0===e&&(e=!1),null==t?e:"true"===t.toString().toLowerCase()},t.getCookie=function(e,n){if(t.canUseCookies(e)){var i="";if(n&&n.length)for(var r=n+"=",s=t.document.cookie.split(";"),a=0;a<s.length;a++){var o=s[a];if((o=t.trim(o))&&0===o.indexOf(r)){i=o.substring(r.length,s[a].length);break}}return i}},t.deleteCookie=function(e,n){t.canUseCookies(e)&&(t.document.cookie=n+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},t.random32=function(){return pi.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var e=t?t.toLowerCase():fr?(fr.userAgent||"").toLowerCase():"";if(-1!==e.indexOf("msie"))return parseInt(e.split("msie")[1]);if(e.indexOf("trident/")){var n=parseInt(e.split("trident/")[1]);if(n)return n+4}return null},t.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var e=""+(t=Math.round(t))%1e3,n=""+Math.floor(t/1e3)%60,i=""+Math.floor(t/6e4)%60,r=""+Math.floor(t/36e5)%24,s=Math.floor(t/864e5);return(s>0?s+".":"")+(r=r.length<2?"0"+r:r)+":"+(i=i.length<2?"0"+i:i)+":"+(n=n.length<2?"0"+n:n)+"."+(1===e.length?"00"+e:2===e.length?"0"+e:e)},t.isCrossOriginError=function(t,e,n,i,r){return("Script error."===t||"Script error"===t)&&!r},t.dump=function(t){var e=Object.prototype.toString.call(t),n="";return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":Kn()&&(n=Zn().stringify(t)),e+n},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,e){return wi.Attach(Wn(),t,e)},t.IsBeaconApiSupported=function(){return"sendBeacon"in fr&&fr.sendBeacon},t.getExtension=function(t,e){for(var n=null,i=0;!n&&i<t.length;)t[i]&&t[i].identifier===e&&(n=t[i]),i++;return n},t.document=Jn()||{},t._canUseLocalStorage=void 0,t._canUseSessionStorage=void 0,t._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],t.NotSpecified="not_specified",t.trim=pi.strTrim,t.newId=pi.newId,t.generateW3CId=pi.generateW3CId,t.isArray=pi.isArray,t.isError=pi.isError,t.isDate=pi.isDate,t.toISOStringForIE8=pi.toISOString,t}(),wr=function(){function t(){}return t.parseUrl=function(e){var n=t._htmlAnchorIdx,i=t._htmlAnchorElement,r=i[n];return t.document.createElement?i[n]||(r=i[n]=t.document.createElement("a")):r={host:t.parseHost(e,!0)},r.href=e,++n>=i.length&&(n=0),t._htmlAnchorIdx=n,r},t.getAbsoluteUrl=function(e){var n,i=t.parseUrl(e);return i&&(n=i.href),n},t.getPathName=function(e){var n,i=t.parseUrl(e);return i&&(n=i.pathname),n},t.getCompleteUrl=function(t,e){return t?t.toUpperCase()+" "+e:e},t.parseHost=function(e,n){var i=t.parseFullHost(e,n);if(i){var r=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&mr(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return i},t.parseFullHost=function(t,e){var n=null;if(t){var i=t.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&mr(i[2])&&i[2].length>0&&(n=i[2]||"",e&&i.length>2)){var r=(i[1]||"").toLowerCase(),s=i[3]||"";("http"===r&&":80"===s||"https"===r&&":443"===s)&&(s=""),n+=s}}return n},t.document=Jn()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),gr=function(){function t(){}return t.canIncludeCorrelationHeader=function(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t.correlationHeaderExcludePatterns)for(var i=0;i<t.correlationHeaderExcludePatterns.length;i++)if(t.correlationHeaderExcludePatterns[i].test(e))return!1;var r=wr.parseUrl(e).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(wr.parseFullHost(e,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||r===n))return!1;var s,a=t&&t.correlationHeaderDomains;if(a&&(pi.arrForEach(a,(function(t){var e=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));s=s||e.test(r)})),!s))return!1;var o=t&&t.correlationHeaderExcludedDomains;if(!o||0===o.length)return!0;for(i=0;i<o.length;i++)if(new RegExp(o[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&r.length>0},t.getCorrelationContext=function(e){if(e){var n=t.getCorrelationContextValue(e,dr.requestContextTargetKey);if(n&&n!==t.correlationIdPrefix)return n}},t.getCorrelationContextValue=function(t,e){if(t)for(var n=t.split(","),i=0;i<n.length;++i){var r=n[i].split("=");if(2===r.length&&r[0]===e)return r[1]}},t.correlationIdPrefix="cid-v1:",t}(),br=function(){function t(){}return t.ParseDependencyPath=function(t,e,n,i){var r,s=i,a=i;if(e&&e.length>0){var o=wr.parseUrl(e);if(r=o.host,!s)if(null!=o.pathname){var u=0===o.pathname.length?"/":o.pathname;"/"!==u.charAt(0)&&(u="/"+u),a=o.pathname,s=hr.sanitizeString(t,n?n+" "+u:u)}else s=hr.sanitizeString(t,e)}else r=i,s=i;return{target:r,name:s,data:a}},t}(),yr=function(){function t(){}return t.Now=function(){var t=Yn();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return(new Date).getTime()},t.GetDuration=function(t,e){var n=null;return 0===t||0===e||pi.isNullOrUndefined(t)||pi.isNullOrUndefined(e)||(n=e-t),n},t}(),xr="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Sr=function(){function t(){}return t.parse=function(e){if(!e)return{};var n=e.split(t._FIELDS_SEPARATOR),i=pi.arrReduce(n,(function(e,n){var i=n.split(t._FIELD_KEY_VALUE_SEPARATOR);return 2===i.length&&(e[i[0].toLowerCase()]=i[1]),e}),{});return pi.objKeys(i).length>0&&(i.endpointsuffix&&(i.ingestionendpoint=i.ingestionendpoint||"https://"+(i.location?i.location+".":"")+"dc."+i.endpointsuffix),i.ingestionendpoint=i.ingestionendpoint||"https://dc.services.visualstudio.com"),i},t._FIELDS_SEPARATOR=";",t._FIELD_KEY_VALUE_SEPARATOR="=",t}(),Cr=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}((function(){})),Fr=function(t){function e(e,n,i){var r=t.call(this)||this;return r.name=hr.sanitizeString(e,i)||vr.NotSpecified,r.data=n,r.time=pi.toISOString(new Date),r.aiDataContract={time:sr.Required,iKey:sr.Required,name:sr.Required,sampleRate:function(){return 100===r.sampleRate?sr.Hidden:sr.Required},tags:sr.Required,data:sr.Required},r}return __extends(e,t),e}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),kr=function(){},Ar=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(kr),Nr=function(t){function e(e,n,i,r){var s=t.call(this)||this;return s.aiDataContract={ver:sr.Required,name:sr.Required,properties:sr.Default,measurements:sr.Default},s.name=hr.sanitizeString(e,n)||vr.NotSpecified,s.properties=hr.sanitizeProperties(e,i),s.measurements=hr.sanitizeMeasurements(e,r),s}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Ar),Mr=function(t){function e(e,n,i,r,s,a){var o,u=t.call(this)||this;return u.aiDataContract={ver:sr.Required,exceptions:sr.Required,severityLevel:sr.Default,properties:sr.Default,measurements:sr.Default},"ver"in(o=n)&&"exceptions"in o&&"properties"in o?(u.exceptions=n.exceptions,u.properties=n.properties,u.measurements=n.measurements,n.severityLevel&&(u.severityLevel=n.severityLevel),n.id&&(u.id=n.id),n.problemGroup&&(u.problemGroup=n.problemGroup),u.ver=2,pi.isNullOrUndefined(n.isManual)||(u.isManual=n.isManual)):(u.exceptions=[new Pr(e,n)],u.properties=hr.sanitizeProperties(e,i)||{},u.measurements=hr.sanitizeMeasurements(e,r),s&&(u.severityLevel=s),a&&(u.id=a)),u}return __extends(e,t),e.CreateFromInterface=function(t,n,i,r){var s=n.exceptions&&pi.arrMap(n.exceptions,(function(e){return Pr.CreateFromInterface(t,e)}));return new e(t,__assign({},n,{exceptions:s}),i,r)},e.prototype.toInterface=function(){var t=this,e=t.exceptions,n=t.properties,i=t.measurements,r=t.severityLevel,s=t.problemGroup,a=t.id,o=t.isManual;return{ver:"4.0",exceptions:e instanceof Array&&pi.arrMap(e,(function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:n,measurements:i,problemGroup:s,id:a,isManual:o}},e.CreateSimpleException=function(t,e,n,i,r){return{exceptions:[{hasFullStack:!0,message:t,stack:r,typeName:e}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.exceptions=[],e.properties={},e.measurements={},e}return __extends(e,t),e}(kr)),Pr=function(t){function e(n,i){var r,s=t.call(this)||this;if(s.aiDataContract={id:sr.Default,outerId:sr.Default,typeName:sr.Required,message:sr.Required,hasFullStack:sr.Default,stack:sr.Default,parsedStack:sr.Array},"hasFullStack"in(r=i)&&"typeName"in r)s.typeName=i.typeName,s.message=i.message,s.stack=i.stack,s.parsedStack=i.parsedStack,s.hasFullStack=i.hasFullStack;else{var a=i;vr.isError(a)||(a=a.error||a.evt||a),s.typeName=hr.sanitizeString(n,function(t){var e="";if(t&&!(e=t.typeName||t.name||""))try{var n=/function (.{1,})\(/.exec(t.constructor.toString());e=n&&n.length>1?n[1]:""}catch(t){}return e}(a))||vr.NotSpecified,s.message=hr.sanitizeMessage(n,i.message)||vr.NotSpecified;var o=i.stack;s.parsedStack=e.parseStack(o),s.stack=hr.sanitizeException(n,o),s.hasFullStack=vr.isArray(s.parsedStack)&&s.parsedStack.length>0}return s}return __extends(e,t),e.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&pi.arrMap(this.parsedStack,(function(t){return t.toInterface()}));return{id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:t||void 0}},e.CreateFromInterface=function(t,n){var i=n.parsedStack instanceof Array&&pi.arrMap(n.parsedStack,(function(t){return Er.CreateFromInterface(t)}))||n.parsedStack;return new e(t,__assign({},n,{parsedStack:i}))},e.parseStack=function(t){var e;if(pi.isString(t)){var n=t.split("\n");e=[];for(var i=0,r=0,s=0;s<=n.length;s++)if(Er.regex.test(n[s])){var a=new Er(n[s],i++);r+=a.sizeInBytes,e.push(a)}if(r>32768)for(var o=0,u=e.length-1,c=0,l=o,d=u;o<u;){if((c+=e[o].sizeInBytes+e[u].sizeInBytes)>32768){e.splice(l,d-l+1);break}l=o,d=u,o++,u--}}return e},e}((function(){this.hasFullStack=!0,this.parsedStack=[]})),Er=function(t){function e(n,i){var r=t.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:sr.Required,method:sr.Required,assembly:sr.Default,fileName:sr.Default,line:sr.Default},"string"==typeof n){var s=n;r.level=i,r.method="<no_method>",r.assembly=vr.trim(s),r.fileName="",r.line=0;var a=s.match(e.regex);a&&a.length>=5&&(r.method=vr.trim(a[2])||r.method,r.fileName=vr.trim(a[4]),r.line=parseInt(a[5])||0)}else r.level=n.level,r.method=n.method,r.assembly=n.assembly,r.fileName=n.fileName,r.line=n.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=e.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return __extends(e,t),e.CreateFromInterface=function(t){return new e(t,null)},e.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},e.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,e.baseSize=58,e}((function(){})),Dr=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.metrics=[],e.properties={},e.measurements={},e}return __extends(e,t),e}(kr);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(lr||(lr={}));var Ir,_r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:sr.Required,kind:sr.Default,value:sr.Required,count:sr.Default,min:sr.Default,max:sr.Default,stdDev:sr.Default},e}return __extends(e,t),e}((function(){this.kind=lr.Measurement})),Br=function(t){function e(e,n,i,r,s,a,o,u){var c=t.call(this)||this;c.aiDataContract={ver:sr.Required,metrics:sr.Required,properties:sr.Default};var l=new _r;return l.count=r>0?r:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(s)||null===s?void 0:s,l.name=hr.sanitizeString(e,n)||vr.NotSpecified,l.value=i,c.metrics=[l],c.properties=hr.sanitizeProperties(e,o),c.measurements=hr.sanitizeMeasurements(e,u),c}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Dr),Tr=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(Ar),jr=function(t){function e(e,n,i,r,s,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:sr.Required,name:sr.Default,url:sr.Default,duration:sr.Default,properties:sr.Default,measurements:sr.Default,id:sr.Default},u.id=hr.sanitizeId(e,o),u.url=hr.sanitizeUrl(e,i),u.name=hr.sanitizeString(e,n)||vr.NotSpecified,isNaN(r)||(u.duration=vr.msToTimeSpan(r)),u.properties=hr.sanitizeProperties(e,s),u.measurements=hr.sanitizeMeasurements(e,a),u}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Tr),Or=function(t){function e(e,n,i,r,s,a,o,u,c,l,d,h){void 0===c&&(c="Ajax");var f=t.call(this)||this;f.aiDataContract={id:sr.Required,ver:sr.Required,name:sr.Default,resultCode:sr.Default,duration:sr.Default,success:sr.Default,data:sr.Default,target:sr.Default,type:sr.Default,properties:sr.Default,measurements:sr.Default,kind:sr.Default,value:sr.Default,count:sr.Default,min:sr.Default,max:sr.Default,stdDev:sr.Default,dependencyKind:sr.Default,dependencySource:sr.Default,commandName:sr.Default,dependencyTypeName:sr.Default},f.id=n,f.duration=vr.msToTimeSpan(s),f.success=a,f.resultCode=o+"",f.type=hr.sanitizeString(e,c);var m=br.ParseDependencyPath(e,i,u,r);return f.data=hr.sanitizeUrl(e,r)||m.data,f.target=hr.sanitizeString(e,m.target),l&&(f.target=f.target+" | "+l),f.name=hr.sanitizeString(e,m.name),f.properties=hr.sanitizeProperties(e,d),f.measurements=hr.sanitizeMeasurements(e,h),f}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.success=!0,e.properties={},e.measurements={},e}return __extends(e,t),e}(kr)),Lr=function(t){function e(e,n,i,r,s){var a=t.call(this)||this;return a.aiDataContract={ver:sr.Required,message:sr.Required,severityLevel:sr.Default,properties:sr.Default},a.message=hr.sanitizeMessage(e,n=n||vr.NotSpecified),a.properties=hr.sanitizeProperties(e,r),a.measurements=hr.sanitizeMeasurements(e,s),i&&(a.severityLevel=i),a}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(kr)),Rr=function(t){function e(e,n,i,r,s,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:sr.Required,name:sr.Default,url:sr.Default,duration:sr.Default,perfTotal:sr.Default,networkConnect:sr.Default,sentRequest:sr.Default,receivedResponse:sr.Default,domProcessing:sr.Default,properties:sr.Default,measurements:sr.Default},u.url=hr.sanitizeUrl(e,i),u.name=hr.sanitizeString(e,n)||vr.NotSpecified,u.properties=hr.sanitizeProperties(e,s),u.measurements=hr.sanitizeMeasurements(e,a),o&&(u.domProcessing=o.domProcessing,u.duration=o.duration,u.networkConnect=o.networkConnect,u.perfTotal=o.perfTotal,u.receivedResponse=o.receivedResponse,u.sentRequest=o.sentRequest),u}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",e.dataType="PageviewPerformanceData",e}(function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(Tr)),Ur=function(t){function e(e,n){var i=t.call(this)||this;return i.aiDataContract={baseType:sr.Required,baseData:sr.Required},i.baseType=e,i.baseData=n,i}return __extends(e,t),e}(Cr);!function(t){t[t.Verbose=0]="Verbose",t[t.Information=1]="Information",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Critical=4]="Critical"}(Ir||(Ir={}));var qr=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},Vr=function(){function t(){}return t.create=function(t,e,n,i,r,s){if(n=hr.sanitizeString(i,n)||vr.NotSpecified,pi.isNullOrUndefined(t)||pi.isNullOrUndefined(e)||pi.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:pi.toISOString(new Date),iKey:"",ext:s||{},tags:[],data:{},baseType:e,baseData:t};return pi.isNullOrUndefined(r)||fi(r,(function(t,e){a.data[t]=e})),a},t}(),Hr=function(){function t(){}return t.UserExt="user",t.DeviceExt="device",t.TraceExt="trace",t.WebExt="web",t.AppExt="app",t.OSExt="os",t.SessionExt="ses",t.SDKExt="sdk",t}(),zr=new qr,Wr=function t(e,n,i,r){Di(t,this,(function(t){var s,a=pi.arrForEach,o=pi.isNullOrUndefined,u=null,c=[],l=!1;function d(){i&&a(i.getTransmissionControls(),(function(t){a(t,(function(t){return t.flush(!0)}))}))}i&&(s=i.logger),t.trackPageView=function(t,i){var h=t.name;if(o(h)||"string"!=typeof h){var f=Jn();h=t.name=f&&f.title||""}var m=t.uri;if(o(m)||"string"!=typeof m){var p=Xn();m=t.uri=p&&p.href||""}if(!r.isPerformanceTimingSupported())return e.sendPageViewInternal(t,i),d(),void s.throwInternal(mi.WARNING,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");var v,w,g=!1,b=r.getPerformanceTiming().navigationStart;b>0&&(v=yr.GetDuration(b,+new Date),r.shouldCollectDuration(v)||(v=void 0)),o(i)||o(i.duration)||(w=i.duration),!n&&isNaN(w)||(isNaN(w)&&(i||(i={}),i.duration=v),e.sendPageViewInternal(t,i),d(),g=!0),i||(i={}),c.push((function(){var n=!1;try{if(r.isPerformanceTimingDataReady()){n=!0;var a={name:h,uri:m};r.populatePageViewPerformanceEvent(a),a.isValid||g?(g||(i.duration=a.durationMs,e.sendPageViewInternal(t,i)),l||(e.sendPageViewPerformanceInternal(a,i),l=!0)):(i.duration=v,e.sendPageViewInternal(t,i))}else b>0&&yr.GetDuration(b,+new Date)>6e4&&(n=!0,g||(i.duration=6e4,e.sendPageViewInternal(t,i)))}catch(t){s.throwInternal(mi.CRITICAL,38,"trackPageView failed on page load calculation: "+vr.getExceptionName(t),{exception:vr.dump(t)})}return n})),u||(u=setInterval((function(){var t=c.slice(0),e=!1;c=[],a(t,(function(t){t()?e=!0:c.push(t)})),0===c.length&&(clearInterval(u),u=null),e&&d()}),100))}}))},$r=function(){function t(t,e){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=e,this._logger=t}return t.prototype.trackPreviousPageVisit=function(t,e){try{var n=this.restartPageVisitTimer(t,e);n&&this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+vr.dump(t))}},t.prototype.restartPageVisitTimer=function(t,e){try{var n=this.stopPageVisitTimer();return this.startPageVisitTimer(t,e),n}catch(t){return this._logger.warnToConsole("Call to restart failed: "+vr.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,e){try{if(vr.canUseSessionStorage()){if(null!=vr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new Jr(t,e),i=Zn().stringify(n);vr.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+vr.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(vr.canUseSessionStorage()){var t=pi.dateNow(),e=vr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(e&&Kn()){var n=Zn().parse(e);return n.pageVisitTime=t-n.pageVisitStartTime,vr.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+vr.dump(t)),null}},t}(),Jr=function(t,e){this.pageVisitStartTime=pi.dateNow(),this.pageName=t,this.pageUrl=e},Gr=function(){function t(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}return t.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var e=this.getPerformanceNavigationTiming(),n=this.getPerformanceTiming();if(e||n){if(e)var i=e.duration,r=yr.GetDuration(e.startTime,e.connectEnd),s=yr.GetDuration(e.requestStart,e.responseStart),a=yr.GetDuration(e.responseStart,e.responseEnd),o=yr.GetDuration(e.responseEnd,e.loadEventEnd);else i=yr.GetDuration(n.navigationStart,n.loadEventEnd),r=yr.GetDuration(n.navigationStart,n.connectEnd),s=yr.GetDuration(n.requestStart,n.responseStart),a=yr.GetDuration(n.responseStart,n.responseEnd),o=yr.GetDuration(n.responseEnd,n.loadEventEnd);0===i?this._logger.throwInternal(mi.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:s,response:a,dom:o}):this.shouldCollectDuration(i,r,s,a,o)?i<Math.floor(r)+Math.floor(s)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(mi.WARNING,8,"client performance math error.",{total:i,network:r,request:s,response:a,dom:o}):(t.durationMs=i,t.perfTotal=t.duration=vr.msToTimeSpan(i),t.networkConnect=vr.msToTimeSpan(r),t.sentRequest=vr.msToTimeSpan(s),t.receivedResponse=vr.msToTimeSpan(a),t.domProcessing=vr.msToTimeSpan(o),t.isValid=!0):this._logger.throwInternal(mi.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:s,response:a,dom:o})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?Yn().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?Yn().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=Yn();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=Yn();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=Yn(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e.navigationStart>0&&e.responseStart>0&&e.requestStart>0&&e.loadEventEnd>0&&e.responseEnd>0&&e.connectEnd>0&&e.domLoading>0},t.prototype.shouldCollectDuration=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Gn()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=n.userAgent,s=!1;if(r)for(var a=0;a<i.length;a++)s=s||-1!==r.toLowerCase().indexOf(i[a]);if(s)return!1;for(a=0;a<t.length;a++)if(t[a]<0||t[a]>=this.MAX_DURATION_ALLOWED)return!1;return!0},t}();function Xr(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}var Yr=function(t){function e(){var e=t.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var n=Xn();return e._prevUri=n&&n.href||"",e}return __extends(e,t),e.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=vr.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=vr.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=vr.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=vr.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=vr.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=vr.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=vr.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=vr.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},e.prototype.processTelemetry=function(t,e){var n=this;Oi(this.core,(function(){return n.identifier+":processTelemetry"}),(function(){var i=!1,r=n._telemetryInitializers.length;e=n._getTelCtx(e);for(var s=0;s<r;++s){var a=n._telemetryInitializers[s];if(a)try{if(!1===a.apply(null,[t])){i=!0;break}}catch(t){e.diagLog().throwInternal(mi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+vr.getExceptionName(t),{exception:vr.dump(t)},!0)}}i||n.processNext(t,e)}),(function(){return{item:t}}),!t.sync)},e.prototype.trackEvent=function(t,e){try{var n=Vr.create(t,Nr.dataType,Nr.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(mi.WARNING,39,"trackTrace failed, trace will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.stopTrackEvent=function(t,e){try{this._eventTracking.stop(t,void 0,e)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.trackTrace=function(t,e){try{var n=Vr.create(t,Lr.dataType,Lr.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(mi.WARNING,39,"trackTrace failed, trace will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.trackMetric=function(t,e){try{var n=Vr.create(t,Br.dataType,Br.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,36,"trackMetric failed, metric will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.trackPageView=function(t,e){try{var n=t||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,e)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,37,"trackPageView failed, page view will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.sendPageViewInternal=function(t,e,n){var i=Jn();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var r=Vr.create(t,jr.dataType,jr.envelopeType,this.diagLog(),e,n);this.core.track(r),this._trackAjaxAttempts=0},e.prototype.sendPageViewPerformanceInternal=function(t,e,n){var i=Vr.create(t,Rr.dataType,Rr.envelopeType,this.diagLog(),e,n);this.core.track(i)},e.prototype.trackPageViewPerformance=function(t,e){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,e)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var e=Jn();t=e&&e.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.stopTrackPage=function(t,e,n,i){try{if("string"!=typeof t){var r=Jn();t=r&&r.title||""}if("string"!=typeof e){var s=Xn();e=s&&s.href||""}this._pageTracking.stop(t,e,n,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,e)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype.sendExceptionInternal=function(t,e,n){var i=new Mr(this.diagLog(),t.exception||new Error(vr.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),r=Vr.create(i,Mr.dataType,Mr.envelopeType,this.diagLog(),e,n);this.core.track(r)},e.prototype.trackException=function(t,e){try{this.sendExceptionInternal(t,e)}catch(t){this.diagLog().throwInternal(mi.CRITICAL,35,"trackException failed, exception will not be collected: "+vr.getExceptionName(t),{exception:vr.dump(t)})}},e.prototype._onerror=function(t){try{var e={url:t&&t.url||(Jn()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(vr.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!vr.isError(t.error)){var n="window.onerror@"+e.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=n}this.trackException({exception:t.error,severityLevel:Ir.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(mi.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+vr.getExceptionName(e),{exception:vr.dump(e),errorString:i})}},e.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},e.prototype.initialize=function(n,i,r,s){var a=this;if(!this.isInitialized()){if(pi.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,n,i,r,s),this.setInitialized(!1);var o=this._getTelCtx(),u=this.identifier;this._globalconfig={instrumentationKey:n.instrumentationKey,endpointUrl:n.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=o.getExtCfg(u);var c=e.getDefaultConfig();void 0!==c&&(fi(c,(function(t,e){a.config[t]=o.getConfig(u,t,e)})),this._globalconfig&&fi(c,(function(t,e){void 0===a._globalconfig[t]&&(a._globalconfig[t]=e)}))),this.config.isCookieUseDisabled&&vr.disableCookies(),this.config.isStorageUseDisabled&&vr.disableStorage();var l={instrumentationKey:function(){return n.instrumentationKey},accountId:function(){return a.config.accountId||n.accountId},sessionRenewalMs:function(){return a.config.sessionRenewalMs||n.sessionRenewalMs},sessionExpirationMs:function(){return a.config.sessionExpirationMs||n.sessionExpirationMs},sampleRate:function(){return a.config.samplingPercentage||n.samplingPercentage},cookieDomain:function(){return a.config.cookieDomain||n.cookieDomain},sdkExtension:function(){return a.config.sdkExtension||n.sdkExtension},isBrowserLinkTrackingEnabled:function(){return a.config.isBrowserLinkTrackingEnabled||n.isBrowserLinkTrackingEnabled},appId:function(){return a.config.appId||n.appId}};this._pageViewPerformanceManager=new Gr(this.core),this._pageViewManager=new Wr(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new $r(this.diagLog(),(function(t,e,n){return a.trackPageVisitTime(t,e,n)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Kr(this.diagLog(),"trackEvent"),this._eventTracking.action=function(t,e,n,i){i||(i={}),i.duration=n.toString(),a.trackEvent({name:t,properties:i})},this._pageTracking=new Kr(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,e,n,i,r){pi.isNullOrUndefined(i)&&(i={}),i.duration=n.toString(),a.sendPageViewInternal({name:t,uri:e,properties:i,measurements:r},i)};var d,h=Wn(),f=Boolean("object"==typeof history&&history)?history:Hn("history"),m=Xn(),p=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&h){var v=h.onerror;h.onerror=function(t,e,n,i,r){var s=v&&v(t,e,n,i,r);return!0!==s&&p._onerror({message:t,url:e,lineNumber:n,columnNumber:i,error:r}),s},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&h){var w=h.onunhandledrejection;h.onunhandledrejection=function(t){var e=w&&w.call(h,t);return!0!==e&&p._onerror({message:t.reason.toString(),error:t.reason instanceof Error?t.reason:new Error(t.reason.toString()),url:m?m.href:"",lineNumber:0,columnNumber:0}),e},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&f&&pi.isFunction(f.pushState)&&pi.isFunction(f.replaceState)&&h&&"undefined"!=typeof Event){var g=this;pi.arrForEach(r,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(a._properties=t)})),f.pushState=(d=f.pushState,function(){var t=d.apply(this,arguments);return Xr(h,vr.createDomEvent(g.config.namePrefix+"pushState")),Xr(h,vr.createDomEvent(g.config.namePrefix+"locationchange")),t}),f.replaceState=function(t){return function(){var e=t.apply(this,arguments);return Xr(h,vr.createDomEvent(g.config.namePrefix+"replaceState")),Xr(h,vr.createDomEvent(g.config.namePrefix+"locationchange")),e}}(f.replaceState),h.addEventListener&&(h.addEventListener(g.config.namePrefix+"popstate",(function(){Xr(h,vr.createDomEvent(g.config.namePrefix+"locationchange"))})),h.addEventListener(g.config.namePrefix+"locationchange",(function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=vr.generateW3CId(),g._properties.context.telemetryTrace.name=m&&m.pathname||"_unknown_"),a._currUri?(a._prevUri=a._currUri,a._currUri=m&&m.href||""):a._currUri=m&&m.href||"",setTimeout(function(t){g.trackPageView({refUri:t,properties:{duration:0}})}.bind(a,a._prevUri),g.autoRoutePVDelay)})))}this.setInitialized(!0)}},e.prototype.trackPageVisitTime=function(t,e,n){this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},{PageName:t,PageUrl:e})},e.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var e=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===Or.dataType){var n=t.baseData;if(n)for(var i=0;i<e.length;i++)if(n.target&&n.target.indexOf(e[i])>=0)return!1}return!0}))}},e.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},e.prototype._sendCORSException=function(t){var e=Vr.create({message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:t,lineNumber:0,columnNumber:0,error:void 0},Mr.dataType,Mr.envelopeType,this.diagLog(),{url:t});this.core.track(e)},e.Version="2.5.10",e}(zi),Kr=function(){function t(t,e){this._name=e,this._events={},this._logger=t}return t.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(mi.WARNING,62,"start was called more than once for this event without calling stop.",{name:this._name,key:t},!0),this._events[t]=+new Date},t.prototype.stop=function(t,e,n,i){var r=this._events[t];if(isNaN(r))this._logger.throwInternal(mi.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var s=+new Date,a=yr.GetDuration(r,s);this.action(t,e,a,n,i)}delete this._events[t],this._events[t]=void 0},t}(),Zr=function t(e){var n=[];Di(t,this,(function(t){t.enqueue=function(t){n.push(t)},t.count=function(){return n.length},t.clear=function(){n.length=0},t.getItems=function(){return n.slice(0)},t.batchPayloads=function(t){return t&&t.length>0?e.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},t.markAsSent=function(){t.clear()},t.clearSent=function(){}}))},Qr=function(){function t(e,n){var i,r=!1;Di(t,this,(function(s){var a=c(t.BUFFER_KEY),o=c(t.SENT_BUFFER_KEY);function u(t,e){var n=[];return pi.arrForEach(e,(function(e){pi.isFunction(e)||-1!==pi.arrIndexOf(t,e)||n.push(e)})),n}function c(t){var i=t;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var r=vr.getSessionStorage(e,i);if(r){var s=Zn().parse(r);if(pi.isString(s)&&(s=Zn().parse(s)),s&&vr.isArray(s))return s}}catch(t){e.throwInternal(mi.CRITICAL,42," storage key: "+i+", "+vr.getExceptionName(t),{exception:vr.dump(t)})}return[]}function l(t,i){var r=t;try{r=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+r:r;var s=JSON.stringify(i);vr.setSessionStorage(e,r,s)}catch(t){vr.setSessionStorage(e,r,JSON.stringify([])),e.throwInternal(mi.WARNING,41," storage key: "+r+", "+vr.getExceptionName(t)+". Buffer cleared",{exception:vr.dump(t)})}}(i=a.concat(o)).length>t.MAX_BUFFER_SIZE&&(i.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,[]),l(t.BUFFER_KEY,i),s.enqueue=function(n){i.length>=t.MAX_BUFFER_SIZE?r||(e.throwInternal(mi.WARNING,67,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(n),l(t.BUFFER_KEY,i))},s.count=function(){return i.length},s.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),r=!1},s.getItems=function(){return i.slice(0)},s.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},s.markAsSent=function(n){i=u(n,i),l(t.BUFFER_KEY,i);var r=c(t.SENT_BUFFER_KEY);r instanceof Array&&n instanceof Array&&((r=r.concat(n)).length>t.MAX_BUFFER_SIZE&&(e.throwInternal(mi.CRITICAL,67,"Sent buffer reached its maximum size: "+r.length,!0),r.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,r))},s.clearSent=function(e){var n=c(t.SENT_BUFFER_KEY);n=u(e,n),l(t.SENT_BUFFER_KEY,n)}}))}return t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}(),ts=pi.isNullOrUndefined;function es(t,e,n){return t&&n?(t[e]=n,t[e]):null}var ns=function(){function t(){}return t.extractPropsAndMeasurements=function(t,e,n){ts(t)||fi(t,(function(t,i){pi.isNumber(i)?n[t]=i:pi.isString(i)?e[t]=i:Kn()&&(e[t]=Zn().stringify(i))}))},t.createEnvelope=function(e,n,i,r){var s=new Fr(e,r,n);es(s,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(s.time=pi.toISOString(i.baseData.startTime)),s.iKey=i.iKey;var a=i.iKey.replace(/-/g,"");return s.name=s.name.replace("{0}",a),t.extractPartAExtensions(i,s),i.tags=i.tags||[],s},t.extractPartAExtensions=function(e,n){var i=n.tags=n.tags||{},r=e.ext=e.ext||{},s=e.tags=e.tags||[],a=r.user;a&&(es(i,zr.userAuthUserId,a.authId),es(i,zr.userId,a.id||a.localId));var o=r.app;o&&es(i,zr.sessionId,o.sesId);var u=r.device;u&&(es(i,zr.deviceId,u.id||u.localId),es(i,zr.deviceType,u.deviceClass),es(i,zr.deviceIp,u.ip),es(i,zr.deviceModel,u.model),es(i,zr.deviceType,u.deviceType));var c=e.ext.web;if(c){es(i,zr.deviceLanguage,c.browserLang),es(i,zr.deviceBrowserVersion,c.browserVer),es(i,zr.deviceBrowser,c.browser);var l=n.data=n.data||{},d=l.baseData=l.baseData||{},h=d.properties=d.properties||{};es(h,"domain",c.domain),es(h,"isManual",c.isManual?"true":null),es(h,"screenRes",c.screenRes),es(h,"userConsent",c.userConsent?"true":null)}var f=r.os;f&&es(i,zr.deviceOS,f.name);var m=r.trace;m&&(es(i,zr.operationParentId,m.parentID),es(i,zr.operationName,m.name),es(i,zr.operationId,m.traceID));for(var p={},v=s.length-1;v>=0;v--)fi(s[v],(function(t,e){p[t]=e})),s.splice(v,1);fi(s,(function(t,e){p[t]=e})),n.tags=__assign({},i,p),n.tags[zr.internalSdkVersion]||(n.tags[zr.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,e){this._logger=t,ts(e.baseData)&&this._logger.throwInternal(mi.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),is=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i=n.baseData.measurements||{},r=n.baseData.properties||{};ns.extractPropsAndMeasurements(n.data,r,i);var s=n.baseData;if(ts(s))return e.warnToConsole("Invalid input for dependency data"),null;var a=new Or(e,s.id,s.target,s.name,s.duration,s.success,s.responseCode,s.properties&&s.properties["http.method"]?s.properties["http.method"]:"GET",s.type,s.correlationContext,r,i),o=new Ur(Or.dataType,a);return ns.createEnvelope(e,Or.envelopeType,n,o)},e.DependencyEnvelopeCreator=new e,e}(ns),rs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i={},r={};n.baseType!==Nr.dataType&&(i.baseTypeSource=n.baseType),n.baseType===Nr.dataType?(i=n.baseData.properties||{},r=n.baseData.measurements||{}):n.baseData&&ns.extractPropsAndMeasurements(n.baseData,i,r),ns.extractPropsAndMeasurements(n.data,i,r);var s=new Nr(e,n.baseData.name,i,r),a=new Ur(Nr.dataType,s);return ns.createEnvelope(e,Nr.envelopeType,n,a)},e.EventEnvelopeCreator=new e,e}(ns),ss=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i=n.baseData.measurements||{},r=n.baseData.properties||{};ns.extractPropsAndMeasurements(n.data,r,i);var s=Mr.CreateFromInterface(e,n.baseData,r,i),a=new Ur(Mr.dataType,s);return ns.createEnvelope(e,Mr.envelopeType,n,a)},e.ExceptionEnvelopeCreator=new e,e}(ns),as=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i=n.baseData,r=i.properties||{},s=i.measurements||{};ns.extractPropsAndMeasurements(n.data,r,s);var a=new Br(e,i.name,i.average,i.sampleCount,i.min,i.max,r,s),o=new Ur(Br.dataType,a);return ns.createEnvelope(e,Br.envelopeType,n,o)},e.MetricEnvelopeCreator=new e,e}(ns),os=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i,r=n.baseData;ts(r)||ts(r.properties)||ts(r.properties.duration)?ts(n.data)||ts(n.data.duration)||(i=n.data.duration,delete n.data.duration):(i=r.properties.duration,delete r.properties.duration);var s,a=n.baseData;((n.ext||{}).trace||{}).traceID&&(s=n.ext.trace.traceID);var o=a.id||s,u=a.name,c=a.uri,l=a.properties||{},d=a.measurements||{};ts(a.refUri)||(l.refUri=a.refUri),ts(a.pageType)||(l.pageType=a.pageType),ts(a.isLoggedIn)||(l.isLoggedIn=a.isLoggedIn.toString()),ts(a.properties)||fi(a.properties,(function(t,e){l[t]=e})),ns.extractPropsAndMeasurements(n.data,l,d);var h=new jr(e,u,c,i,l,d,o),f=new Ur(jr.dataType,h);return ns.createEnvelope(e,jr.envelopeType,n,f)},e.PageViewEnvelopeCreator=new e,e}(ns),us=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i=n.baseData,r=i.name,s=i.uri||i.url,a=i.properties||{},o=i.measurements||{};ns.extractPropsAndMeasurements(n.data,a,o);var u=new Rr(e,r,s,void 0,a,o,i),c=new Ur(Rr.dataType,u);return ns.createEnvelope(e,Rr.envelopeType,n,c)},e.PageViewPerformanceEnvelopeCreator=new e,e}(ns),cs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.Create=function(e,n){t.prototype.Init.call(this,e,n);var i=n.baseData.message,r=n.baseData.severityLevel,s=n.baseData.properties||{},a=n.baseData.measurements||{};ns.extractPropsAndMeasurements(n.data,s,a);var o=new Lr(e,i,r,s,a),u=new Ur(Lr.dataType,o);return ns.createEnvelope(e,Lr.envelopeType,n,u)},e.TraceEnvelopeCreator=new e,e}(ns),ls=function t(e){Di(t,this,(function(t){function n(t,s){var a={};if(!t)return e.throwInternal(mi.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:s},!0),a;if(t.__aiCircularRefCheck)return e.throwInternal(mi.WARNING,50,"Circular reference detected while serializing object",{name:s},!0),a;if(!t.aiDataContract){if("measurements"===s)a=r(t,"number",s);else if("properties"===s)a=r(t,"string",s);else if("tags"===s)a=r(t,"string",s);else if(vr.isArray(t))a=i(t,s);else{e.throwInternal(mi.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{Zn().stringify(t),a=t}catch(t){e.throwInternal(mi.CRITICAL,48,t&&pi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return a}return t.__aiCircularRefCheck=!0,fi(t.aiDataContract,(function(r,o){var u=pi.isFunction(o)?o()&sr.Required:o&sr.Required,c=pi.isFunction(o)?o()&sr.Hidden:o&sr.Hidden,l=o&sr.Array,d=void 0!==t[r],h=pi.isObject(t[r])&&null!==t[r];if(!u||d||l){if(!c){var f;void 0!==(f=h?l?i(t[r],r):n(t[r],r):t[r])&&(a[r]=f)}}else e.throwInternal(mi.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:r,name:s})})),delete t.__aiCircularRefCheck,a}function i(t,i){var r;if(t)if(vr.isArray(t)){r=[];for(var s=0;s<t.length;s++){var a=n(t[s],i+"["+s+"]");r.push(a)}}else e.throwInternal(mi.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(t,n,i){var r;return t&&(r={},fi(t,(function(t,s){if("string"===n)r[t]=void 0===s?"undefined":null===s?"null":s.toString?s.toString():"invalid field: toString() is not defined.";else if("number"===n)if(void 0===s)r[t]="undefined";else if(null===s)r[t]="null";else{var a=parseFloat(s);r[t]=isNaN(a)?"NaN":a}else r[t]="invalid field: "+i+" is of unknown type.",e.throwInternal(mi.CRITICAL,r[t],null,!0)}))),r}t.serialize=function(t){var i=n(t,"root");try{return Zn().stringify(i)}catch(t){e.throwInternal(mi.CRITICAL,48,t&&pi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},ds=function(){function t(){var e=Wn(),n=Jn(),i=!1,r=!0;Di(t,this,(function(t){try{if(e&&wi.Attach(e,"online",a)&&(wi.Attach(e,"offline",o),i=!0),n){var s=n.body||n;pi.isUndefined(s.ononline)||(s.ononline=a,s.onoffline=o,i=!0)}}catch(t){i=!1}function a(){r=!0}function o(){r=!1}t.isListening=i,t.isOnline=function(){var t=!0,e=Gn();return i?t=r:e&&!pi.isNullOrUndefined(e.onLine)&&(t=e.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,hs=function(){function t(){}return t.prototype.getHashCodeScore=function(e){return this.getHashCode(e)/t.INT_MAX_VALUE*100},t.prototype.getHashCode=function(e){if(""===e)return 0;for(;e.length<t.MIN_INPUT_LENGTH;)e=e.concat(e);for(var n=5381,i=0;i<e.length;++i)n=(n<<5)+n+e.charCodeAt(i),n&=n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t.MIN_INPUT_LENGTH=8,t}(),fs=function(){function t(){this.hashCodeGeneragor=new hs,this.keys=new qr}return t.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},t}(),ms=function(){function t(t,e){this.INT_MAX_VALUE=2147483647,this._logger=pi.isNullOrUndefined(e)?new Bi:e,(t>100||t<0)&&(this._logger.throwInternal(mi.WARNING,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:t},!0),this.sampleRate=100),this.sampleRate=t,this.samplingScoreGenerator=new fs}return t.prototype.isSampledIn=function(t){var e=this.sampleRate;return null==e||e>=100||t.baseType===Br.dataType||this.samplingScoreGenerator.getSamplingScore(t)<e},t}();
|
|
6
|
+
/*!
|
|
7
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
8
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
function ps(t){try{return t.responseText}catch(t){}return null}var vs=function(t){function e(){var n,i,r,s,a=t.call(this)||this;return a.priority=1001,a.identifier="AppInsightsChannelPlugin",a._XMLHttpRequestSupported=!1,Di(e,a,(function(t,o){function u(){throw new Error("Method not implemented.")}function c(e){var n=t._senderConfig.endpointUrl(),i=t._buffer.batchPayloads(e),r=new Blob([i],{type:"text/plain;charset=UTF-8"});Gn().sendBeacon(n,r)?(t._buffer.markAsSent(e),t._onSuccess(e,e.length)):(l(e,!0),t.diagLog().throwInternal(mi.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(e,n){var i=new XMLHttpRequest,r=t._senderConfig.endpointUrl();try{i[xr]=!0}catch(t){}i.open("POST",r,n),i.setRequestHeader("Content-type","application/json"),vr.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(dr.sdkContextHeader,dr.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,e,e.length)},i.onerror=function(n){return t._onError(e,p(i),n)};var s=t._buffer.batchPayloads(e);i.send(s),t._buffer.markAsSent(e)}function d(e){try{if(e&&""!==e){var n=Zn().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){t.diagLog().throwInternal(mi.CRITICAL,43,"Cannot parse the response. "+vr.getExceptionName(n),{response:e})}return null}function h(e,r){if(void 0===r&&(r=1),e&&0!==e.length){t._buffer.clearSent(e),n++;for(var s=0,a=e;s<a.length;s++)t._buffer.enqueue(a[s]);!function(t){var e;if(n<=1)e=10;else{var r=(Math.pow(2,n)-1)/2,s=Math.floor(Math.random()*r*10)+1;e=Math.max(Math.min(s*=t,3600),10)}var a=pi.dateNow()+1e3*e;i=a}(r),f()}}function f(){if(!r){var e=i?Math.max(0,i-pi.dateNow()):0,n=Math.max(t._senderConfig.maxBatchInterval(),e);r=setTimeout((function(){t.triggerSend(!0,null,1)}),n)}}function m(t){return 408===t||429===t||500===t||503===t}function p(t,e){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+ps(t)||t.response||"":e}function v(e){var n=Wn(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,e)},i.onerror=function(n){return t._onError(e,w(i),n)};var r=n&&n.location&&n.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(r,0))return t.diagLog().throwInternal(mi.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var s=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",s);var a=t._buffer.batchPayloads(e);i.send(a),t._buffer.markAsSent(e)}function w(t,e){return t?"XDomainRequest,Response:"+ps(t)||"":e}t.pause=u,t.resume=u,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(e){t.diagLog().throwInternal(mi.CRITICAL,22,"flush failed, telemetry will not be collected: "+vr.getExceptionName(e),{exception:vr.dump(e)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!vr.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,c,2)}catch(e){t.diagLog().throwInternal(mi.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+vr.getExceptionName(e),{exception:vr.dump(e)})}},t.teardown=u,t.initialize=function(r,a,u,d){o.initialize(r,a,u,d);var h=t._getTelCtx(),f=t.identifier;s=new ls(a.logger),n=0,i=null,t._sender=null;var m=e._getDefaultAppInsightsChannelConfig();if(t._senderConfig=e._getEmptyAppInsightsChannelConfig(),fi(m,(function(e,n){t._senderConfig[e]=function(){return h.getConfig(f,e,n())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&vr.canUseSessionStorage()?new Qr(t.diagLog(),t._senderConfig):new Zr(t._senderConfig),t._sample=new ms(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(pi.isNullOrUndefined(t.disableInstrumentaionKeyValidation)||!t.disableInstrumentaionKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(t.instrumentationKey)}(r)||t.diagLog().throwInternal(mi.CRITICAL,100,"Invalid Instrumentation key "+r.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&vr.IsBeaconApiSupported())t._sender=c;else if(void 0!==typeof XMLHttpRequest){var p=Hn("XMLHttpRequest");p&&("withCredentials"in new p?(t._sender=l,t._XMLHttpRequestSupported=!0):void 0!==typeof XDomainRequest&&(t._sender=v))}},t.processTelemetry=function(n,i){i=t._getTelCtx(i);try{if(t._senderConfig.disableTelemetry())return;if(!n)return void i.diagLog().throwInternal(mi.CRITICAL,7,"Cannot send empty telemetry");if(n.baseData&&!n.baseType)return void i.diagLog().throwInternal(mi.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(n.baseType||(n.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(mi.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(n))return void i.diagLog().throwInternal(mi.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});n.sampleRate=t._sample.sampleRate;var r=e.constructEnvelope(n,t._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(mi.CRITICAL,47,"Unable to create an AppInsights envelope");var a=!1;if(n.tags&&n.tags.ProcessLegacy&&(pi.arrForEach(n.tags.ProcessLegacy,(function(t){try{t&&!1===t(r)&&(a=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(mi.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+vr.getExceptionName(t),{exception:vr.dump(t)},!0)}})),delete n.tags.ProcessLegacy),a)return;var o=s.serialize(r),u=t._buffer.getItems(),c=t._buffer.batchPayloads(u);c&&c.length+o.length>t._senderConfig.maxBatchSizeInBytes()&&t.triggerSend(!0,null,10),t._buffer.enqueue(o),f()}catch(t){i.diagLog().throwInternal(mi.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+vr.getExceptionName(t),{exception:vr.dump(t)})}t.processNext(n,i)},t._xhrReadyStateChange=function(e,i,r){if(4===e.readyState){var s=null;t._appId||(s=d(ps(e)||e.response))&&s.appId&&(t._appId=s.appId),(e.status<200||e.status>=300)&&0!==e.status?!t._senderConfig.isRetryDisabled()&&m(e.status)?(h(i),t.diagLog().throwInternal(mi.WARNING,40,". Response code "+e.status+". Will retry to send "+i.length+" items.")):t._onError(i,p(e)):ds.isOffline()?t._senderConfig.isRetryDisabled()||(h(i,10),t.diagLog().throwInternal(mi.WARNING,40,". Offline - Response Code: "+e.status+". Offline status: "+ds.isOffline()+". Will retry to send "+i.length+" items.")):206===e.status?(s||(s=d(ps(e)||e.response)),s&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,p(e))):(n=0,t._onSuccess(i,r))}},t.triggerSend=function(e,n,s){void 0===e&&(e=!0);try{if(t._senderConfig.disableTelemetry())t._buffer.clear();else if(t._buffer.count()>0){var o=t._buffer.getItems();!function(e,n){var i,r=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(r&&r.eventsSendRequest)try{r.eventsSendRequest(e,n)}catch(e){t.diagLog().throwInternal(mi.CRITICAL,74,"send request notification failed: "+vr.getExceptionName(e),{exception:vr.dump(e)})}}(s||0,e),n?n.call(a,o,e):t._sender(o,e)}clearTimeout(r),r=null,i=null}catch(e){var u=vr.getIEVersion();(!u||u>9)&&t.diagLog().throwInternal(mi.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+vr.getExceptionName(e),{exception:vr.dump(e)})}},t._onError=function(e,n){t.diagLog().throwInternal(mi.WARNING,26,"Failed to send telemetry.",{message:n}),t._buffer.clearSent(e)},t._onPartialSuccess=function(e,n){for(var i=[],r=[],s=0,a=n.errors.reverse();s<a.length;s++){var o=a[s],u=e.splice(o.index,1)[0];m(o.statusCode)?r.push(u):i.push(u)}e.length>0&&t._onSuccess(e,n.itemsAccepted),i.length>0&&t._onError(i,p(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" "))),r.length>0&&(h(r),t.diagLog().throwInternal(mi.WARNING,40,"Partial success. Delivered: "+e.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+n.itemsReceived+" items"))},t._onSuccess=function(e){t._buffer.clearSent(e)},t._xdrOnLoad=function(e,i){var r=ps(e);if(!e||r+""!="200"&&""!==r){var s=d(r);s&&s.itemsReceived&&s.itemsReceived>s.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,w(e))}else n=0,t._onSuccess(i,0)}})),a}return __extends(e,t),e.constructEnvelope=function(t,e,n){var i;switch((i=e===t.iKey||pi.isNullOrUndefined(e)?t:__assign({},t,{iKey:e})).baseType){case Nr.dataType:return rs.EventEnvelopeCreator.Create(n,i);case Lr.dataType:return cs.TraceEnvelopeCreator.Create(n,i);case jr.dataType:return os.PageViewEnvelopeCreator.Create(n,i);case Rr.dataType:return us.PageViewPerformanceEnvelopeCreator.Create(n,i);case Mr.dataType:return ss.ExceptionEnvelopeCreator.Create(n,i);case Br.dataType:return as.MetricEnvelopeCreator.Create(n,i);case Or.dataType:return is.DependencyEnvelopeCreator.Create(n,i);default:return rs.EventEnvelopeCreator.Create(n,i)}},e._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100}}},e._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0}},e}(zi),ws=function(){},gs=function(){function t(e,n){var i=this;this._logger=pi.isNullOrUndefined(n)?new Bi:n,e||(e={}),"function"!=typeof e.sessionExpirationMs&&(e.sessionExpirationMs=function(){return t.acquisitionSpan}),"function"!=typeof e.sessionRenewalMs&&(e.sessionRenewalMs=function(){return t.renewalSpan}),this.config=e,this._storageNamePrefix=function(){return i.config.namePrefix&&i.config.namePrefix()?t.cookieNameConst+i.config.namePrefix():t.cookieNameConst},this.automaticSession=new ws}return t.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var e=(new Date).getTime(),n=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&e-this.automaticSession.renewalDate>this.config.sessionRenewalMs();n||i?this.renew():(!this.cookieUpdatedTimestamp||e-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=e,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate))},t.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)},t.prototype.initializeAutomaticSession=function(){var t=vr.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var e=vr.getStorage(this._logger,this._storageNamePrefix());e&&this.initializeAutomaticSessionWithData(e)}this.automaticSession.id||this.renew()},t.prototype.initializeAutomaticSessionWithData=function(t){var e=t.split("|");e.length>0&&(this.automaticSession.id=e[0]);try{e.length>1&&(this.automaticSession.acquisitionDate=+new Date(+e[1]),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0),e.length>2&&(this.automaticSession.renewalDate=+new Date(+e[2]),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(t){this._logger.throwInternal(mi.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+vr.getExceptionName(t),{exception:vr.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(mi.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=vr.newId(this.config&&this.config.idLength?this.config.idLength():22),this.automaticSession.acquisitionDate=t,this.automaticSession.renewalDate=t,this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate),vr.canUseLocalStorage()||this._logger.throwInternal(mi.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,e,n){var i=e+this.config.sessionExpirationMs(),r=n+this.config.sessionRenewalMs(),s=new Date,a=[t,e,n];s.setTime(i<r?i:r);var o=this.config.cookieDomain?this.config.cookieDomain():null,u=0===this.config.sessionExpirationMs()?"0":s.toUTCString();vr.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+u,o),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,e,n){vr.setStorage(this._logger,this._storageNamePrefix(),[t,e,n].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),bs=function(){},ys=function(){this.id="browser",this.deviceClass="Browser"},xs=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},Ss=function(){function t(e,n){this.isNewUser=!1,this._logger=n;var i=vr.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var r=i.split(t.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=e,!this.id){this.id=pi.newId(e&&e.idLength?e.idLength():22);var s=new Date,a=pi.toISOString(s);this.accountAcquisitionDate=a,this.isNewUser=!0,s.setTime(s.getTime()+31536e6);var o=[this.id,a],u=this.config.cookieDomain?this.config.cookieDomain():void 0;vr.setCookie(this._logger,t.userCookieName,o.join(t.cookieSeparator)+";expires="+s.toUTCString(),u);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";vr.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():void 0;var l=vr.getCookie(this._logger,t.authUserCookieName);if(l){var d=(l=decodeURI(l)).split(t.cookieSeparator);d[0]&&(this.authenticatedId=d[0]),d.length>1&&d[1]&&(this.accountId=d[1])}}return t.prototype.setAuthenticatedUserContext=function(e,n,i){if(void 0===i&&(i=!1),!this.validateUserInput(e)||n&&!this.validateUserInput(n))this._logger.throwInternal(mi.WARNING,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);else{this.authenticatedId=e;var r=this.authenticatedId;n&&(this.accountId=n,r=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&vr.setCookie(this._logger,t.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,vr.deleteCookie(this._logger,t.authUserCookieName)},t.prototype.validateUserInput=function(t){return!("string"!=typeof t||!t||t.match(/,|;|=| |\|/))},t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t}(),Cs=function(){},Fs=function(t,e,n,i){this.traceID=t||vr.generateW3CId(),this.parentID=e,this.name=n;var r=Xn();!n&&r&&r.pathname&&(this.name=r.pathname),this.name=hr.sanitizeString(i,this.name)},ks=function(){function t(t,e){var n=this;n.application=new bs,n.internal=new xs(e),zn()&&(n.sessionManager=new gs(e,t),n.device=new ys,n.location=new Cs,n.user=new Ss(e,t),n.telemetryTrace=new Fs(void 0,void 0,void 0,t),n.session=new ws),n.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var e=this.session,n=this.sessionManager,i=e||n&&n.automaticSession;i&&pi.isString(i.id)&&(t.ext.app.sesId=i.id),e&&(t.ext.app.sesId=pi.isString(e.id)?e.id:n.automaticSession.id)},t.prototype.applyOperatingSystemContxt=function(t){var e=this.os;e&&e.name&&(t.ext.os=e)},t.prototype.applyApplicationContext=function(t){var e=this.application;e&&(pi.isString(e.ver)&&(t.tags[zr.applicationVersion]=e.ver),pi.isString(e.build)&&(t.tags[zr.applicationBuild]=e.build))},t.prototype.applyDeviceContext=function(t){var e=this.device;e&&(pi.isString(e.id)&&(t.ext.device.localId=e.id),pi.isString(e.ip)&&(t.ext.device.ip=e.ip),pi.isString(e.model)&&(t.ext.device.model=e.model),pi.isString(e.deviceClass)&&(t.ext.device.deviceClass=e.deviceClass))},t.prototype.applyInternalContext=function(t){var e=this.internal;e&&(pi.isString(e.agentVersion)&&(t.tags[zr.internalAgentVersion]=e.agentVersion),pi.isString(e.sdkVersion)&&(t.tags[zr.internalSdkVersion]=e.sdkVersion),t.baseType!==_i.dataType&&t.baseType!==jr.dataType||(pi.isString(e.snippetVer)&&(t.tags[zr.internalSnippet]=e.snippetVer),pi.isString(e.sdkSrc)&&(t.tags[zr.internalSdkSrc]=e.sdkSrc)))},t.prototype.applyLocationContext=function(t){var e=this.location;e&&pi.isString(e.ip)&&(t.tags[zr.locationIp]=e.ip)},t.prototype.applyOperationContext=function(t){var e=this.telemetryTrace;if(e){var n=t.ext.trace||{traceID:void 0,parentID:void 0};pi.isString(e.traceID)&&(n.traceID=e.traceID),pi.isString(e.name)&&(n.name=e.name),pi.isString(e.parentID)&&(n.parentID=e.parentID),t.ext.trace=n}},t.prototype.applyWebContext=function(t){var e=this.web;e&&(t.ext.web=t.ext.web||{},t.ext.web=e)},t.prototype.applyUserContext=function(t){var e=this.user;e&&(t.tags||(t.tags=[]),pi.isString(e.accountId)&&(t.tags[zr.userAccountId]=e.accountId),pi.isString(e.id)&&(t.ext.user.id=e.id),pi.isString(e.authenticatedId)&&(t.ext.user.authId=e.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[Hr.DeviceExt]&&0===pi.objKeys(t.ext[Hr.DeviceExt]).length&&delete t.ext[Hr.DeviceExt],t.ext[Hr.UserExt]&&0===pi.objKeys(t.ext[Hr.UserExt]).length&&delete t.ext[Hr.UserExt],t.ext[Hr.WebExt]&&0===pi.objKeys(t.ext[Hr.WebExt]).length&&delete t.ext[Hr.WebExt],t.ext[Hr.OSExt]&&0===pi.objKeys(t.ext[Hr.OSExt]).length&&delete t.ext[Hr.OSExt],t.ext[Hr.AppExt]&&0===pi.objKeys(t.ext[Hr.AppExt]).length&&delete t.ext[Hr.AppExt],t.ext[Hr.TraceExt]&&0===pi.objKeys(t.ext[Hr.TraceExt]).length&&delete t.ext[Hr.TraceExt]},t}(),As=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.priority=110,e.identifier="AppInsightsPropertiesPlugin",e}return __extends(e,t),e.getDefaultConfig=function(){return{instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 18e5},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 864e5},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},idLength:function(){return 22}}},e.prototype.initialize=function(n,i,r,s){var a=this;t.prototype.initialize.call(this,n,i,r,s);var o=this._getTelCtx(),u=this.identifier,c=e.getDefaultConfig();this._extensionConfig=this._extensionConfig||e.getDefaultConfig(),fi(c,(function(t,e){a._extensionConfig[t]=function(){return o.getConfig(u,t,e())}})),this.context=new ks(i.logger,this._extensionConfig),this._breezeChannel=vr.getExtension(r,"AppInsightsChannelPlugin"),this.context.appId=function(){return a._breezeChannel?a._breezeChannel._appId:null}},e.prototype.processTelemetry=function(t,e){if(pi.isNullOrUndefined(t));else{if(e=this._getTelCtx(e),t.name===jr.envelopeType&&e.diagLog().resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t,e),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var n=new _i(72,(Gn()||{}).userAgent||"");e.diagLog().logInternalMessage(mi.CRITICAL,n)}this.processNext(t,e)}},e.prototype._processTelemetryInternal=function(t,e){t.tags||(t.tags=[]),t.ext||(t.ext={});var n=t.ext;n[Hr.DeviceExt]=n[Hr.DeviceExt]||{},n[Hr.WebExt]=n[Hr.WebExt]||{},n[Hr.UserExt]=n[Hr.UserExt]||{},n[Hr.OSExt]=n[Hr.OSExt]||{},n[Hr.AppExt]=n[Hr.AppExt]||{},n[Hr.TraceExt]=n[Hr.TraceExt]||{};var i=this.context;i.applySessionContext(t,e),i.applyApplicationContext(t,e),i.applyDeviceContext(t,e),i.applyOperationContext(t,e),i.applyUserContext(t,e),i.applyOperatingSystemContxt(t,e),i.applyWebContext(t,e),i.applyLocationContext(t,e),i.applyInternalContext(t,e),i.cleanUp(t,e)},e}(zi),Ns=pi.objKeys,Ms=pi.arrForEach;function Ps(t,e,n){var i=0,r=t[e],s=t[n];return r&&s&&(i=yr.GetDuration(r,s)),i}function Es(t,e,n,i,r){var s=0,a=Ps(n,i,r);return a&&(s=Ds(t,e,vr.msToTimeSpan(a))),s}function Ds(t,e,n){var i=0;return t&&e&&n&&((t.ajaxPerf=t.ajaxPerf||{})[e]=n,i=1),i}var Is=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},_s=function t(e,n,i){var r=this,s=i;r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Is,r.clientFailure=0,r.traceID=e,r.spanID=n,Di(t,r,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?wr.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?hr.sanitizeUrl(s,wr.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(e,n,i){if(t.ajaxTotalDuration=Math.round(1e3*yr.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var r,s=((r={id:"|"+t.traceID+"."+t.spanID,target:t.getAbsoluteUrl(),name:t.getPathName(),type:e,duration:t.ajaxTotalDuration,success:+t.status>=200&&+t.status<400,responseCode:+t.status,method:t.method}).properties={HttpMethod:t.method},r);if(function(t,e){var n=t.perfTiming,i=e.properties||{},r=0,s=pi.isString,a="redirect",o="startTime",u="connectEnd",c="requestStart",l="responseEnd",d=a+"Start",h=a="End";if(n){r|=Es(i,a,n,d,h),r|=Es(i,"domainLookup",n,"domainLookupStart","domainLookupEnd"),r|=Es(i,"connect",n,"connectStart",u),r|=Es(i,"request",n,c,"requestEnd"),r|=Es(i,"response",n,"responseStart",l),r|=Es(i,"networkConnect",n,o,u),r|=Es(i,"sentRequest",n,c,l);var f=n.duration;f||(f=Ps(n,o,l)||0),r|=Ds(i,"duration",f),r|=Ds(i,"perfTotal",f);var m=n.serverTiming;if(m){var p={};Ms(m,(function(t,e){var n=function(t){var e=t,n=/([^\w\d_$])/g;return n.test(t)&&(e=t.replace(n,"_")),e}(t.name||""+e),i=p[n]||{};fi(t,(function(t,e){("name"!==t&&s(e)||pi.isNumber(e))&&(i[t]&&(e=i[t]+";"+e),!e&&s(e)||(i[t]=e))})),p[n]=i})),r|=Ds(i,"serverTiming",p)}r|=Ds(i,"transferSize",n.transferSize),r|=Ds(i,"encodedBodySize",n.encodedBodySize),r|=Ds(i,"decodedBodySize",n.decodedBodySize)}else t.perfMark&&(r|=Ds(i,"missing",t.perfAttempts));r&&(e.properties=i)}(t,s),n&&Ns(t.requestHeaders).length>0&&(s.properties=s.properties||{},s.properties.requestHeaders=t.requestHeaders),i){var a=i();if(a){var o=a.correlationContext;if(o&&(s.correlationContext=o),a.headerMap&&Ns(a.headerMap).length>0&&(s.properties=s.properties||{},s.properties.responseHeaders=a.headerMap),t.status>=400){var u=a.type;s.properties=s.properties||{},""!==u&&"text"!==u||(s.properties.responseText=a.responseText?a.statusText+" - "+a.responseText:a.statusText),"json"===u&&(s.properties.responseText=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return s}}))},Bs=function(){function t(e,n){var i=this;i.traceFlag=t.DEFAULT_TRACE_FLAG,i.version=t.DEFAULT_VERSION,i.traceId=e&&t.isValidTraceId(e)?e:vr.generateW3CId(),i.spanId=n&&t.isValidSpanId(n)?n:vr.generateW3CId().substr(0,16)}return t.isValidTraceId=function(t){return t.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==t},t.isValidSpanId=function(t){return t.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==t},t.prototype.toString=function(){var t=this;return t.version+"-"+t.traceId+"-"+t.spanId+"-"+t.traceFlag},t.DEFAULT_TRACE_FLAG="01",t.DEFAULT_VERSION="00",t}(),Ts=pi.isNullOrUndefined,js=pi.arrForEach,Os=0;function Ls(t){var e="";try{Ts(t)||Ts(t.ajaxData)||Ts(t.ajaxData.requestUrl)||(e+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return e}function Rs(t,e,n,i,r){t.diagLog().throwInternal(mi.CRITICAL,e,n,i,r)}function Us(t,e,n,i,r){t.diagLog().throwInternal(mi.WARNING,e,n,i,r)}function qs(t,e,n){return function(i){Rs(t,e,n,{ajaxDiagnosticsMessage:Ls(i.inst),exception:vr.dump(i.err)})}}function Vs(t,e){return t&&e?t.indexOf(e):-1}var Hs,zs=function(t){function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var i,r,s,a,o=Xn(),u=!1,c=!1,l=o&&o.host&&o.host.toLowerCase(),d=e.getEmptyConfig(),h=!1,f=0,m=!1,p=0,v=!1,w=[],g={};return Di(e,n,(function(t,n){function o(t,e,n){w.push(function(t,e,n){return t?cr(t.prototype,e,n,!1):null}(t,e,n))}function b(t,e,n){var i=!1,r=((pi.isString(e)?e:(e||{}).url||"")||"").toLowerCase(),s=Vs(r,"?"),a=Vs(r,"#");return(-1===s||-1!==a&&a<s)&&(s=a),-1!==s&&(r=r.substring(0,s)),Ts(t)?Ts(e)||(i="object"==typeof e&&!0===e[xr]||!!n&&!0===n[xr]):i=!0===t[xr]||!0===r[xr],i?g[r]||(g[r]=1):g[r]&&(i=!0),i}function y(t,e){var n=!0,i=c;return Ts(t)||(n=!0===e||!Ts(t.ajaxData)),i&&n}function x(t){try{var e=t.responseType;if(""===e||"text"===e)return t.responseText}catch(t){}return null}function S(e){try{var n=e.getAllResponseHeaders();if(null!==n&&-1!==Vs(n.toLowerCase(),dr.requestContextHeaderLowerCase)){var i=e.getResponseHeader(dr.requestContextHeader);return gr.getCorrelationContext(i)}}catch(n){Us(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ls(e),exception:vr.dump(n)})}}function C(t,e){if(e.requestUrl&&a&&m){var n=Yn();if(n&&pi.isFunction(n.mark)){Os++;var i=a+t+"#"+Os;n.mark(i);var r=n.getEntriesByName(i);r&&1===r.length&&(e.perfMark=r[0])}}}function F(t,e,n,i){var r=e.perfMark,s=Yn(),a=d.maxAjaxPerfLookupAttempts,o=d.ajaxPerfLookupDelay,u=e.requestUrl,c=0;!function l(){try{if(s&&r){c++;for(var d=null,h=s.getEntries(),f=h.length-1;f>=0;f--){var m=h[f];if(m){if("resource"===m.entryType)m.initiatorType!==t||-1===Vs(m.name,u)&&-1===Vs(u,m.name)||(d=m);else if("mark"===m.entryType&&m.name===r.name){e.perfTiming=d;break}if(m.startTime<r.startTime-1e3)break}}}!r||e.perfTiming||c>=a||!1===e.async?(r&&pi.isFunction(s.clearMarks)&&s.clearMarks(r.name),e.perfAttempts=c,n()):setTimeout(l,o)}catch(t){i(t)}}()}function k(e){var n="";try{Ts(e)||(n+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){Rs(t,15,"Failed to grab failed fetch diagnostics message",{exception:vr.dump(e)})}return n}function A(e,n,i,r,s){function a(e,n,r){var s=r||{};s.fetchDiagnosticsMessage=k(i),n&&(s.exception=vr.dump(n)),Us(t,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",s)}r&&(r.responseFinishedTime=yr.Now(),r.status=n,F("fetch",r,(function(){var e=r.CreateTrackItem("Fetch",h,s);e?t.trackDependencyDataInternal(e):a(14,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(t){a(18,t,null)})))}function N(e){if(e&&e.headers)try{var n=e.headers.get(dr.requestContextHeader);return gr.getCorrelationContext(n)}catch(n){Us(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:k(e),exception:vr.dump(n)})}}t.initialize=function(l,f,g,k){if(!t.isInitialized()){n.initialize(l,f,g,k);var M=t._getTelCtx();fi(e.getDefaultConfig(),(function(t,n){d[t]=M.getConfig(e.identifier,t,n)}));var P=d.distributedTracingMode;if(h=d.enableRequestHeaderTracking,p=d.maxAjaxCallsPerView,v=d.enableResponseHeaderTracking,s=P===ar.AI||P===ar.AI_AND_W3C,r=P===ar.AI_AND_W3C||P===ar.W3C,m=d.enableAjaxPerfTracking){var E=l.instrumentationKey||"unkwn";a=E.length>5?"ai.ajxmn."+E.substring(E.length-5)+".":"ai.ajxmn."+E+"."}if(!1===d.disableAjaxTracking&&function(t){var e=!1;if("undefined"!=typeof XMLHttpRequest&&!Ts(XMLHttpRequest)){var n=XMLHttpRequest.prototype;e=!(Ts(n)||Ts(n.open)||Ts(n.send)||Ts(n.abort))}var i=vr.getIEVersion();if(i&&i<9&&(e=!1),e)try{(new XMLHttpRequest).ajaxData={};var r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=r}catch(n){e=!1,Rs(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:vr.dump(n)})}return e}(t)&&!c&&(o(XMLHttpRequest,"open",{req:function(e,n,r,s){var a=e.inst,o=a.ajaxData;b(a,r)||!y(a,!0)||o&&o.xhrMonitoringState.openDone||function(e,n,r,s){var a=i&&i.telemetryTrace&&i.telemetryTrace.traceID||vr.generateW3CId(),o=vr.generateW3CId().substr(0,16),u=new _s(a,o,t.diagLog());u.method=n,u.requestUrl=r,u.xhrMonitoringState.openDone=!0,u.requestHeaders={},u.async=s,e.ajaxData=u,function(e){e.ajaxData.xhrMonitoringState.stateChangeAttached=wi.Attach(e,"readystatechange",(function(){try{e&&4===e.readyState&&y(e)&&function(e){var n=e.ajaxData;function i(n,i){var r=i||{};r.ajaxDiagnosticsMessage=Ls(e),n&&(r.exception=vr.dump(n)),Us(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}n.responseFinishedTime=yr.Now(),n.status=e.status,F("xmlhttprequest",n,(function(){try{var r=n.CreateTrackItem("Ajax",h,(function(){var t={statusText:e.statusText,headerMap:null,correlationContext:S(e),type:e.responseType,responseText:x(e),response:e.response};if(v){var n=e.getAllResponseHeaders();if(n){var i=pi.strTrim(n).split(/[\r\n]+/),r={};js(i,(function(t){var e=t.split(": "),n=e.shift(),i=e.join(": ");r[n]=i})),t.headerMap=r}}return t}));r?t.trackDependencyDataInternal(r):i(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}finally{try{e.ajaxData=null}catch(t){}}}),(function(t){i(t,null)}))}(e)}catch(i){var n=vr.dump(i);n&&-1!==Vs(n.toLowerCase(),"c00c023f")||Rs(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ls(e),exception:n})}}))}(e)}(a,n,r,s)},hkErr:qs(t,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),o(XMLHttpRequest,"send",{req:function(e){var n=e.inst,i=n.ajaxData;y(n)&&!i.xhrMonitoringState.sendDone&&(C("xhr",i),i.requestSentTime=yr.Now(),n=t.includeCorrelationHeaders(i,void 0,void 0,n),i.xhrMonitoringState.sendDone=!0)},hkErr:qs(t,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),o(XMLHttpRequest,"abort",{req:function(t){var e=t.inst,n=e.ajaxData;y(e)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:qs(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),h&&o(XMLHttpRequest,"setRequestHeader",{req:function(t,e,n){var i=t.inst;y(i)&&(i.ajaxData.requestHeaders[e]=n)},hkErr:qs(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0),function(){var e,n=!(e=Vn())||Ts(e.Request)||Ts(e.Request.prototype)||Ts(e.fetch)?null:e.fetch;if(n){var r=Vn(),s=n.polyfill;!1===d.disableFetchTracking?(w.push(cr(r,"fetch",{req:function(e,n,r){var a;if(u&&!b(null,n,r)&&(!s||!c)){var o=e.ctx();a=function(e,n){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||vr.generateW3CId(),s=vr.generateW3CId().substr(0,16),a=new _s(r,s,t.diagLog());a.requestSentTime=yr.Now(),a.requestUrl=e instanceof Request?e?e.url:"":e;var o="GET";n&&n.method?o=n.method:e&&e instanceof Request&&(o=e.method),a.method=o;var u={};return h&&new Headers((n?n.headers:0)||e instanceof Request&&e.headers||{}).forEach((function(t,e){u[e]=t})),a.requestHeaders=u,C("fetch",a),a}(n,r);var l=t.includeCorrelationHeaders(a,n,r);l!==r&&e.set(1,l),o.data=a}},rsp:function(t,e){var n=t.ctx().data;n&&(t.rslt=t.rslt.then((function(t){return A(0,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:N(t)};if(v){var n={};t.headers.forEach((function(t,e){n[e]=t})),e.headerMap=n}return e})),t})).catch((function(t){throw A(0,0,e,n,null),t})))},hkErr:qs(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),u=!0):s&&w.push(cr(r,"fetch",{req:function(t,e,n){b(null,e,n)}})),s&&(r.fetch.polyfill=s)}}(),g.length>0&&g){for(var D=void 0,I=0;!D&&I<g.length;)g[I]&&"AppInsightsPropertiesPlugin"===g[I].identifier&&(D=g[I]),I++;D&&(i=D.context)}}},t.teardown=function(){js(w,(function(t){t.rm()})),w=[],u=!1,c=!1,t.setInitialized(!1)},t.trackDependencyData=function(e,n){t.trackDependencyDataInternal(e,n)},t.includeCorrelationHeaders=function(e,n,a,o){var u=t._currentWindowHost||l;if(n){if(gr.canIncludeCorrelationHeader(d,e.getAbsoluteUrl(),u)&&(a||(a={}),a.headers=new Headers(a.headers||n instanceof Request&&n.headers||{}),s&&(a.headers.set(dr.requestIdHeader,f="|"+e.traceID+"."+e.spanID),h&&(e.requestHeaders[dr.requestIdHeader]=f)),(m=d.appId||i&&i.appId())&&(a.headers.set(dr.requestContextHeader,dr.requestContextAppIdFormat+m),h&&(e.requestHeaders[dr.requestContextHeader]=dr.requestContextAppIdFormat+m)),r)){var c=new Bs(e.traceID,e.spanID);a.headers.set(dr.traceParentHeader,c.toString()),h&&(e.requestHeaders[dr.traceParentHeader]=c.toString())}return a}if(o){var f,m;if(gr.canIncludeCorrelationHeader(d,e.getAbsoluteUrl(),u))s&&(o.setRequestHeader(dr.requestIdHeader,f="|"+e.traceID+"."+e.spanID),h&&(e.requestHeaders[dr.requestIdHeader]=f)),(m=d.appId||i&&i.appId())&&(o.setRequestHeader(dr.requestContextHeader,dr.requestContextAppIdFormat+m),h&&(e.requestHeaders[dr.requestContextHeader]=dr.requestContextAppIdFormat+m)),r&&(c=new Bs(e.traceID,e.spanID),o.setRequestHeader(dr.traceParentHeader,c.toString()),h&&(e.requestHeaders[dr.traceParentHeader]=c.toString()));return o}},t.trackDependencyDataInternal=function(e,n,i){if(-1===p||f<p){d.distributedTracingMode!==ar.W3C&&d.distributedTracingMode!==ar.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),pi.isNullOrUndefined(e.startTime)&&(e.startTime=new Date);var r=Vr.create(e,Or.dataType,Or.envelopeType,t.diagLog(),n,i);t.core.track(r)}else f===p&&Rs(t,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++f}})),n}return __extends(e,t),e.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:ar.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25}},e.getEmptyConfig=function(){var t=this.getDefaultConfig();return fi(t,(function(e){t[e]=void 0})),t},e.prototype.processTelemetry=function(t,e){this.processNext(t,e)},e.identifier="AjaxDependencyPlugin",e}(zi),Ws=function(){function t(t){var e=this;e._snippetVersion=""+(t.sv||t.version||""),t.queue=t.queue||[],t.version=t.version||2;var n=t.config||{};if(n.connectionString){var i=Sr.parse(n.connectionString),r=i.ingestionendpoint;n.endpointUrl=r?r+"/v2/track":n.endpointUrl,n.instrumentationKey=i.instrumentationkey||n.instrumentationKey}e.appInsights=new Yr,e.properties=new As,e.dependencies=new zs,e.core=new tr,e.snippet=t,e.config=n,e.getSKUDefaults()}return t.prototype.trackEvent=function(t,e){this.appInsights.trackEvent(t,e)},t.prototype.trackPageView=function(t){this.appInsights.trackPageView(t||{})},t.prototype.trackPageViewPerformance=function(t){this.appInsights.trackPageViewPerformance(t||{})},t.prototype.trackException=function(t){!t.exception&&t.error&&(t.exception=t.error),this.appInsights.trackException(t)},t.prototype._onerror=function(t){this.appInsights._onerror(t)},t.prototype.trackTrace=function(t,e){this.appInsights.trackTrace(t,e)},t.prototype.trackMetric=function(t,e){this.appInsights.trackMetric(t,e)},t.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},t.prototype.stopTrackPage=function(t,e,n,i){this.appInsights.stopTrackPage(t,e,n,i)},t.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},t.prototype.stopTrackEvent=function(t,e,n){this.appInsights.stopTrackEvent(t,e,n)},t.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},t.prototype.setAuthenticatedUserContext=function(t,e,n){void 0===n&&(n=!1),this.properties.context.user.setAuthenticatedUserContext(t,e,n)},t.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},t.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},t.prototype.flush=function(t){var e=this;void 0===t&&(t=!0),Oi(this.core,(function(){return"AISKU.flush"}),(function(){pi.arrForEach(e.core.getTransmissionControls(),(function(e){pi.arrForEach(e,(function(e){e.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),pi.arrForEach(this.core.getTransmissionControls(),(function(e){pi.arrForEach(e,(function(e){e.onunloadFlush?e.onunloadFlush():e.flush(t)}))}))},t.prototype.loadAppInsights=function(t,e,n){var i=this;void 0===t&&(t=!1);var r=this;if(t&&r.config.extensions&&r.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return Oi(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var s=[],a=new vs;s.push(a),s.push(r.properties),s.push(r.dependencies),s.push(r.appInsights),r.core.initialize(r.config,s,e,n),r.context=r.properties.context,Hs&&r.context&&(r.context.internal.sdkSrc=Hs),function(e){if(e){var n="";pi.isNullOrUndefined(r._snippetVersion)||(n+=r._snippetVersion),t&&(n+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=n||"-"),fi(r,(function(t,n){pi.isString(t)&&!pi.isFunction(n)&&"_"!==t.substring(0,1)&&(e[t]=n)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},t.prototype.updateSnippetDefinitions=function(t){fi(this,(function(e,n){pi.isString(e)&&(t[e]=n)}))},t.prototype.emptyQueue=function(){var t=this;try{if(vr.isArray(t.snippet.queue)){for(var e=t.snippet.queue.length,n=0;n<e;n++)(0,t.snippet.queue[n])();t.snippet.queue=void 0,delete t.snippet.queue}}catch(t){t&&pi.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(zn()||$n()){var e=function(){t.onunloadFlush(!1);var e=t.appInsights.core._extensions.AppInsightsPropertiesPlugin;e&&e.context&&e.context._sessionManager&&e.context._sessionManager.backup()};if(!t.appInsights.config.disableFlushOnBeforeUnload){var n=pi.addEventHandler("beforeunload",e);(n=pi.addEventHandler("pagehide",e)||n)||(i=Gn())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(mi.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||pi.addEventHandler("pagehide",e)}var i},t.prototype.getSKUDefaults=function(){var t=this;t.config.diagnosticLogInterval=t.config.diagnosticLogInterval&&t.config.diagnosticLogInterval>0?t.config.diagnosticLogInterval:1e4},t}();
|
|
11
|
+
/*!
|
|
12
|
+
* Application Insights JavaScript SDK - Web, 2.5.10
|
|
13
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
14
|
+
*/!function(){var t=null,e=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var n=(document||{}).currentScript;n&&(t=n.src)}catch(t){}if(t)try{var i=t.toLowerCase();if(i)for(var r="",s=0;s<e.length;s++)if(-1!==i.indexOf(e[s])){r="cdn"+(s+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),Hs=r+"";break}}catch(t){}}();var $s;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}($s||($s={}));class Js{}let Gs=class extends F{constructor(){super({authenticationState:$s.Unauthorized,jwt:q,reactNativeInterop:q,iframeInterop:q,appConfiguration:q,ignoreExistingSelection:!1})}};Gs=function(t,e,n,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,n,a):r(e,n))||a);return s>3&&a&&Object.defineProperty(e,n,a),a}([C({name:"sss-session",resettable:!0})],Gs);const Xs=new Gs,Ys=new class extends k{constructor(t){super(t),this.store=t,this.appConfiguration$=this.select((t=>t.appConfiguration))}get configuration(){const t=this.getValue().appConfiguration;if(U(t))throw Error("App configuration is not yet loaded");return t.value}}(Xs),Ks=new class{constructor(){this.appInsights=new z((()=>new Ws({config:{instrumentationKey:Ys.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),u((t=>this.appInsightsErrorHandler(t)))}getAppInsights(){return this.appInsights.value}addCustomProperties(t){this.appInsights.value.addTelemetryInitializer((e=>{e.data=e.data?e.data:{};for(const[n,i]of Object.entries(t))e.data[n]=i}))}trackErrorTrace(t){this.appInsights.value.trackTrace({message:t,severityLevel:Ir.Error})}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:Ir.Error}),(t=>{console.error(t)})(t)}},Zs=new class{constructor(){this.getFundName=t=>pt.pipe(je(t),vt.getOrElse((()=>""))),this.cleanUsi=t=>t.replace(/ /g,""),this.stringIsNullOrEmtpty=t=>!("string"==typeof t&&t.trim().length>0),this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`}build(t,e){if(!(null==t?void 0:t.contentDocument))return;const n=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ht.partnerIdOrDefault,accountId:Ht.accountIdOrDefault,fundId:Wt.fund.id,authToken:Ht.jwt,employerDefault:"PromotedDefault"===Wt.fund.type,definedBenefitsEligibility:vt.toUndefined(Ht.isDefinedBenefitsEligible)}),i=async n=>{const{data:r}=n;if(r)if("promoted-fund-redirect"!==r.sender){if("promoted-fund-join"===r.sender)switch(r.type){case"contentResized":t.height=r.height>0?String(r.height):t.height,t.width=r.width>0?String(r.width):t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Zt(window.location.href)}}else{switch(window.removeEventListener("message",i),r.type){case"cancel":re.navigateInternally(e,"DefinedBenefits"===Wt.fund.type?ne.ConsentPage:ne.ChoicePage);break;case"success":{const t=Wt.fund.id,n=this.getFundName(t),i=this.cleanUsi(r.usi);switch(Wt.fund.type){case"Promoted":if(this.stringIsNullOrEmtpty(r.memberNumber)||this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (Promoted) memberNumber and/or usi"),re.navigateInternally(e,ne.ChoicePage);break}re.navigateInternallyToStandardChoice({history:e,fundName:n,promotedFundId:t,fundDetails:{type:"promoted",fundName:n,fundUsi:i,memberNumber:r.memberNumber,promotedFundId:t},handleSubmitFn:e=>_n.submitChoiceAsync(Object.assign({fundId:t,memberNumber:r.memberNumber,memberFirstName:r.memberFirstName,memberFamilyName:r.memberFamilyName,usi:r.usi.replace(/ /g,""),standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig))});break;case"PromotedDefault":if(this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (PromotedDefault) usi"),re.navigateInternally(e,ne.ChoicePage);break}re.navigateInternallyToStandardChoice({history:e,fundName:n,promotedFundId:t,fundDetails:{type:"promotedDefault",fundName:n,fundUsi:i,promotedFundId:t},handleSubmitFn:e=>_n.submitDefaultChoiceAsync(Object.assign({fundId:t,usi:i,standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig))});break;case"DefinedBenefits":throw Error('DefinedBenefits is not supported in legacy "success" message');case"null":throw Error("PromotedFundState.type was not set.")}break}case"success-promoted":{if(this.stringIsNullOrEmtpty(r.memberNumber)||this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (Promoted) memberNumber and/or usi"),re.navigateInternally(e,ne.ChoicePage);break}const t=this.cleanUsi(r.usi),n=this.getFundName(r.fundId);re.navigateInternallyToStandardChoice({history:e,fundName:n,promotedFundId:r.fundId,fundDetails:{type:"promoted",fundName:n,fundUsi:t,memberNumber:r.memberNumber,promotedFundId:r.fundId},handleSubmitFn:e=>_n.submitChoiceAsync(Object.assign({fundId:r.fundId,memberNumber:r.memberNumber,memberFirstName:r.memberFirstName,memberFamilyName:r.memberFamilyName,usi:t,standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig))});break}case"success-promoted-default":{if(this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (PromotedDefault) usi"),re.navigateInternally(e,ne.ChoicePage);break}const t=this.cleanUsi(r.usi),n=this.getFundName(r.fundId);re.navigateInternallyToStandardChoice({history:e,fundName:n,promotedFundId:r.fundId,fundDetails:{type:"promotedDefault",fundName:n,fundUsi:t,promotedFundId:r.fundId},handleSubmitFn:e=>_n.submitDefaultChoiceAsync(Object.assign({fundId:r.fundId,usi:t,standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig))});break}case"success-promoted-default-with-join":{if(this.stringIsNullOrEmtpty(r.memberNumber)||this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi"),re.navigateInternally(e,ne.ChoicePage);break}const t=this.cleanUsi(r.usi),n=this.getFundName(r.fundId);re.navigateInternallyToStandardChoice({history:e,fundName:n,promotedFundId:r.fundId,fundDetails:{type:"promotedDefaultWithJoin",fundName:n,fundUsi:t,memberNumber:r.memberNumber,promotedFundId:r.fundId},handleSubmitFn:e=>_n.submitDefaultChoiceWithJoinAsync(Object.assign({fundId:r.fundId,memberNumber:r.memberNumber,memberFirstName:r.memberFirstName,memberFamilyName:r.memberFamilyName,usi:t,standardChoiceFormSignature:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig))});break}case"success-defined-benefits":if(this.stringIsNullOrEmtpty(r.memberNumber)||this.stringIsNullOrEmtpty(r.usi)){Ks.trackErrorTrace("PFJ C# did not return (DefinedBenefits) memberNumber and/or usi"),re.navigateInternally(e,ne.ConsentPage);break}await me.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({fundUsi:this.cleanUsi(r.usi)},r),Ht.promotedFundsConfig)),Ht.markSuperSelectionAsSubmitted();break;default:re.navigateInternally(e,ne.ChoicePage)}$t()}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let a;for(a in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),n){const t=n[a];if(void 0!==t){const e=document.createElement("input");e.name=a,e.type="hidden",e.value="boolean"==typeof t?t?"true":"false":t,s.append(e)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,e;const n=Ht.superBuyer;return{title:n.userProfile.title,firstName:n.userProfile.firstName,middleName:n.userProfile.middleName,lastName:n.userProfile.lastName,dateOfBirth:n.userProfile.dateOfBirth,gender:n.userProfile.gender,email:n.userProfile.email,mobilePhone:n.userProfile.mobilePhone,taxFileNumber:null!==(t=n.tfn)&&void 0!==t?t:"",addressLine1:n.userProfile.address.addressLine1,addressLine2:null!==(e=n.userProfile.address.addressLine2)&&void 0!==e?e:"",city:n.userProfile.address.city,state:n.userProfile.address.state,postCode:n.userProfile.address.postcode}}},Qs=class{constructor(e){t(this,e)}render(){return e("sss-iframe-host",{build:t=>Zs.build(t,this.history)})}};function ta(t){const e=t.split("").map(Number),n=e.every((t=>!isNaN(t))),i=[10,1,3,5,7,9,11,13,15,17,19];return!(!n||e.length!==i.length)&&(e[0]--,e.reduce(((t,e,n)=>t+e*i[n]),0)%89==0)}const ea=class{constructor(e){t(this,e),this.isSubmitDisabled=!0,this.isAbnValid=ta(le.selfManagedFundForm.fundAbn),this.eventTrackingService=Gt.Instance,this.success=()=>{re.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:le.selfManagedFundForm.fundName,fundEsa:le.selfManagedFundForm.fundEsa},handleSubmitFn:async t=>{const e=Object.assign({smsfChoice:{abn:le.selfManagedFundForm.fundAbn,fundName:le.selfManagedFundForm.fundName,fundAddress:{addressLine1:le.selfManagedFundForm.addressLine1,addressLine2:le.selfManagedFundForm.addressLine2,city:le.selfManagedFundForm.city,state:le.selfManagedFundForm.state,postcode:le.selfManagedFundForm.postcode},bsb:le.selfManagedFundForm.bsb,bankAccountName:le.selfManagedFundForm.bankAccountName,bankAccountNumber:le.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:le.selfManagedFundForm.fundEsa,memberFirstName:le.selfManagedFundForm.memberFirstName,memberFamilyName:le.selfManagedFundForm.memberFamilyName},standardChoiceFormSignature:t},Ht.promotedFundsConfig);await me.submitSelfManagedFundChoiceAsync(e)}})}}componentDidLoad(){return this.updateIsSubmitDisabled(),this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:Ht.promotedFunds,defaultFundUsiSet:H(Ht.defaultFundUsi)})}render(){return e(s,null,e("sss-header-section",{currentPage:"own-fund"}),e("div",{class:"flex justify-center mt-11"},e("sss-custom-fund",null,e("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.updateIsSubmitDisabled()},e("div",{class:"p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560"},e("p",{class:"sm:text-lg font-bold"},"Fund details"),e("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},e("div",{class:"flex"},e("div",{class:"flex-shrink-0"},e("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),e("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},"Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))),e("sss-self-managed-fund-inputs",{fundForm:le.selfManagedFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{le.selfManagedFundForm=Object.assign(Object.assign({},le.selfManagedFundForm),t.detail),void 0!==t.detail.isAbnValid&&(this.isAbnValid=t.detail.isAbnValid),this.updateIsSubmitDisabled()}})),e("div",{class:"flex justify-center mt-8"},e("div",{class:"sm:max-w-320 w-full"},e("div",{class:"mb-4",onClick:()=>this.formState="validated"},e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),e("stencil-route-link",{url:ne.ChoicePage},e("sss-button",{fillWidth:!0,variant:"secondary"},"Back"))))))))}updateIsSubmitDisabled(){this.isSubmitDisabled=!this.formElement.checkValidity()||!this.isAbnValid}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&this.success()}};W(ea);const na=class{constructor(e){t(this,e),this.formChanged=a(this,"formChanged",7),this.isAbnValid=!1,this.isAbnTouched=!1,this.isAbnUsedForRegulated=!1,this.currentBank=q,this.addressErrorMessage=q,this.stateOptions=[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}],this.bsbRegex=new RegExp(/^[0-9]{3}[0-9]{3}$/),this.bankAccountNumberRegex=new RegExp(/^[0-9]{2,10}$/)}render(){const t={"relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10":!0,"invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors};return e("div",null,e("div",null,e("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),e("div",{class:"mt-1"},e("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundName",id:"fundName",value:le.selfManagedFundForm.fundName,onChange:t=>this.updateFormField("fundName",t.target.value.trim())}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund name"))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund ABN"),e("div",{class:"mt-1"},e("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundAbn",id:"fundAbn",value:le.selfManagedFundForm.fundAbn,inputmode:"numeric",pattern:"[0-9]*",onKeyUp:async t=>{const e=t.target.value;this.updateFormField("fundAbn",e.trim()),this.isAbnValid=ta(e),this.isAbnValid&&(this.isAbnUsedForRegulated=await this.isAbnUsedForRegulatedAsync(e)),this.updateFormField("isAbnValid",this.isAbnValid)},onBlur:()=>this.isAbnTouched=!0}),this.renderAbnValidationError())),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Electronic service address alias (ESA)"),e("div",{class:"mt-1"},e("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundEsa",id:"fundEsa",value:le.selfManagedFundForm.fundEsa,onChange:t=>this.updateFormField("fundEsa",t.target.value.trim())}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund ESA"))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Fund address"),e("div",{class:"mt-1 rounded-md shadow-sm -space-y-px"},e("input",{placeholder:"Address line 1",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none rounded-t-md shadow-none":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:le.selfManagedFundForm.addressLine1,onChange:t=>{this.updateFormField("addressLine1",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.addressLine1Element=t}),e("input",{placeholder:"Address line 2 (optional)",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"addressLine2",id:"addressLine2",value:le.selfManagedFundForm.addressLine2,onChange:t=>this.updateFormField("addressLine2",t.target.value.trim())}),e("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"city",required:!0,id:"city",value:le.selfManagedFundForm.city,onChange:t=>{this.updateFormField("city",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.cityElement=t}),e("div",{class:"flex -space-x-px"},e("div",{class:"w-1/2 flex-1 min-w-0"},e("input",{placeholder:"Postcode",type:"text",required:!0,class:Object.assign(Object.assign({},t),{"rounded-none rounded-bl-md shadow-none":!0}),name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:le.selfManagedFundForm.postcode,inputmode:"numeric",onChange:t=>{this.updateFormField("postcode",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.postcodeElement=t})),e("div",{class:"flex-1 min-w-0"},e("select",{class:Object.assign(Object.assign({},t),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":void 0!==this.fundForm.state}),name:"state",required:!0,id:"state",onChange:t=>{this.updateFormField("state",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.stateElement=t},e("option",{disabled:!0,selected:void 0!==this.fundForm.state,value:""},"State"),this.stateOptions.map((t=>e("option",{value:t.value,selected:this.fundForm.state===t.value},t.label))))))),R(this.addressErrorMessage)&&this.showValidationErrors&&e("div",{class:"mt-2 text-sm text-red-600"},this.addressErrorMessage.value)),e("div",{class:"flex space-x-4"},e("div",{class:"mt-3 w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},"Given name(s)"),e("div",{class:"mt-1"},e("sss-name-input",{name:"memberFirstName",readableName:"Member given name(s)",showValidationErrors:this.showValidationErrors,value:le.selfManagedFundForm.memberFirstName,onChange:t=>this.updateFormField("memberFirstName",t.target.value.trim())}))),e("div",{class:"mt-3 w-1/2"},e("label",{class:"text-sm font-medium text-gray-700"},"Last name"),e("div",{class:"mt-1"},e("sss-name-input",{name:"memberFamilyName",readableName:"Member last name",showValidationErrors:this.showValidationErrors,value:le.selfManagedFundForm.memberFamilyName,onChange:t=>this.updateFormField("memberFamilyName",t.target.value.trim())})))),e("h3",{class:"text-lg font-bold mt-6"},"Fund bank details"),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Account name"),e("div",{class:"mt-1"},e("input",{type:"text",required:!0,class:t,name:"bankAccountName",minlength:"2",id:"bankAccountName",value:le.selfManagedFundForm.bankAccountName,onChange:t=>this.updateFormField("bankAccountName",t.target.value.trim())}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account name"))),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"BSB"),e("div",{class:"mt-1"},e("input",{type:"text",required:!0,class:t,name:"bsb",id:"bsb",minlength:"6",maxlength:"7",inputmode:"numeric",onKeyUp:t=>this.updateCurrentBank(t),pattern:this.bsbRegex.source,value:le.selfManagedFundForm.bsb}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid BSB"))),R(this.currentBank)&&e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Bank name"),e("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.currentBank.value)),e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},"Account number"),e("div",{class:"mt-1"},e("input",{type:"text",required:!0,class:t,name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,inputmode:"numeric",value:le.selfManagedFundForm.bankAccountNumber,onKeyUp:t=>this.updateCurrentBankAccountNumber(t),onChange:t=>this.updateFormField("bankAccountNumber",t.target.value.trim())}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account number"))))}updateFormField(t,e){this.formChanged.emit({[t]:e})}async isAbnUsedForRegulatedAsync(t){return!await me.validateAbnForSMSF(t)}renderAbnValidationError(){if(this.isAbnTouched||this.showValidationErrors){if(!this.isAbnValid)return e("div",{class:"mt-2 text-sm text-red-600"},"Enter a valid fund ABN (digits only)");if(this.isAbnUsedForRegulated)return e("div",{class:"mt-2 text-sm text-red-600"},"The supplied ABN is for a regulated fund")}return[]}filterDigits(t){return t.replace(/[^0-9]/g,"")}updateCurrentBank(t){const e=this.filterDigits(t.target.value),n=e.substring(0,2),i=e.substring(0,3),r=En[n],s=En[i];r&&(this.currentBank=V(r)),s&&(this.currentBank=V(s)),(""===e||e.length>6)&&(this.currentBank=q),this.updateFormField("bsb",e)}updateCurrentBankAccountNumber(t){const e=this.filterDigits(t.target.value);this.updateFormField("bankAccountNumber",e)}updateAddressErrorMessage(){let t=q;U(t)&&!this.addressLine1Element.checkValidity()&&(t=V("Enter a valid address line 1")),U(t)&&!this.cityElement.checkValidity()&&(t=V("Enter a valid city/suburb")),U(t)&&!this.postcodeElement.checkValidity()&&(t=V("Enter a valid post code")),U(t)&&!this.stateElement.checkValidity()&&(t=V("Select a state")),this.addressErrorMessage=t}},ia=new class extends k{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return R(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return R(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(U(t))throw Error("Failed to get iframe interop information: no data in store");if(!this.isIframeInteropEnabled())throw Error("Failed to get iframe interop information: iframe mode is disabled");return t.value}}(Xs),ra=new class{async submitSlateChoiceAsync(t){return Rt().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},sa=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.hostIsDeployed=()=>window.location.origin.endsWith("partner.flarehr.com"),this.skipConsolidation=()=>ia.isReactNativeInteropEnabled()?"true":"false",this.skipInsurance=()=>ia.isReactNativeInteropEnabled()?"true":"false",this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.slateJoinAppUrl=()=>`https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`}build(t,e){if(!(null==t?void 0:t.contentDocument))return;const n=(this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app")+"/slate-redirect.html",i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:n,cancelRedirectUrl:n,skipConsolidation:this.skipConsolidation(),skipInsurance:this.skipInsurance()});this.includeJwt()&&(i.authToken=Ht.jwt);const r=n=>{const{data:i,origin:s}=n;if(i)if("slate-redirect"!==i.sender){if("flare"===i.sender&&s.endsWith("join.slatesuper.com.au"))switch(i.type){case"contentResized":t.height=i.height>0?i.height:t.height,t.width=i.width>0?i.width:t.width}}else{switch(window.removeEventListener("message",r),i.type){case"success":if(i.memberNumber){re.navigateInternallyToStandardChoice({history:e,fundName:Me.name,fundDetails:{type:"promoted",fundName:Me.name,fundUsi:"32367272075001",memberNumber:i.memberNumber,promotedFundId:Me.fundId},handleSubmitFn:t=>ra.submitSlateChoiceAsync(Object.assign({memberNumber:i.memberNumber,memberFirstName:i.memberFirstName,memberFamilyName:i.memberFamilyName,standardChoiceFormSignature:t,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},Ht.promotedFundsConfig)),promotedFundId:Me.fundId});break}default:re.navigateInternally(e,ne.ChoicePage)}$t()}};window.addEventListener("message",r);const s=t.contentDocument;s.open();const a=s.createElement("form");let o;for(o in a.method="POST",a.target="_self",a.action=this.slateJoinAppUrl(),i){const t=i[o];if(void 0!==t){const e=document.createElement("input");e.type="hidden",e.name=o,e.value=t,a.append(e)}}s.appendChild(a),s.close(),a.submit()}getSlateJoinMemberData(){var t,e;const n=Ht.superBuyer;return{firstName:n.userProfile.firstName,middleName:n.userProfile.middleName,lastName:n.userProfile.lastName,dateOfBirth:n.userProfile.dateOfBirth,gender:(t=>{switch(t){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}})(n.userProfile.gender),email:n.userProfile.email,mobilePhone:n.userProfile.mobilePhone,taxFileNumber:null!==(t=n.tfn)&&void 0!==t?t:"",addressLine1:n.userProfile.address.addressLine1,addressLine2:null!==(e=n.userProfile.address.addressLine2)&&void 0!==e?e:"",city:n.userProfile.address.city,state:n.userProfile.address.state,postCode:n.userProfile.address.postcode}}includeJwt(){return!this.slateJoinAppUrl().match(/autodev|sandbox/)}},aa=class{constructor(e){t(this,e)}render(){return e("sss-iframe-host",{build:t=>sa.build(t,this.history)})}},oa=class{constructor(e){t(this,e),this.standardChoiceFormSignature="",this.isSubmitDisabled=!0,this.eventTrackingService=Gt.Instance,this.ignorePopState=()=>window.history.pushState(null,"",null)}connectedCallback(){this.ignorePopState(),window.addEventListener("popstate",this.ignorePopState)}disconnectedCallback(){window.removeEventListener("popstate",this.ignorePopState)}render(){return e(s,null,e("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Confirm your super choice"),e("div",{class:"sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8"},"Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."),e("div",{class:"flex justify-center mt-8 sm:mt-12"},e("div",{class:"max-w-560"},e("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row"},this.renderLogo(),e("div",{class:"flex justify-between w-full"},e("div",null,e("div",{class:"text-xs font-semibold text-gray-500 uppercase"},"Nominated fund"),e("div",{class:"text-sm mt-2"},ee.fundName)),e("div",{class:"grid content-center ml-4"},e("sss-button",{size:"xs",variant:"secondary",promiseFn:async()=>{await this.trackChangeRequestedAsync();const t=vt.isSome(Ht.state.superChoicePrefill)?ne.ConsentPage:ne.ChoicePage;re.navigateInternally(this.history,t)}},"Change")))),e("div",{class:"mt-4 p-4 sm:p-6 border shadow-sm rounded-lg"},e("div",{class:"sm:text-lg font-bold"},"Superannuation Standard Choice Form"),e("div",{class:"bg-blue-50 border-l-4 border-blue-400 p-4 mt-3"},e("div",{class:"flex"},e("div",{class:"flex-shrink-0"},e("img",{class:"h-5 w-5",src:r("assets/icon-information-circle.svg")})),e("div",{class:"ml-2"},e("p",{class:"text-sm text-blue-800 leading-5"},"Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))),e("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"mt-3":!0,"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=!this.formElement.checkValidity()},e("label",{class:"text-sm font-medium text-gray-700"},"Type your full name"),e("input",{type:"text",autocomplete:"off",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1":!0,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":"validated"===this.formState},required:!0,minlength:"2",name:"standardChoiceFormSignature",id:"standardChoiceFormSignature",value:this.standardChoiceFormSignature,onInput:t=>this.standardChoiceFormSignature=t.target.value}),e("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Type your full name"),e("div",{class:"mt-6"},e("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Confirm and continue")))))))}renderLogo(){if(null==ee.promotedFundId)return;const t=Oe(ee.promotedFundId);return vt.isSome(t)?e("div",{class:"pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start"},e("img",{class:"h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain",alt:ee.fundName,src:t.value})):void 0}async trackChangeRequestedAsync(){const t={promotedFundsShown:Ht.promotedFunds,defaultFundUsiSet:H(Ht.defaultFundUsi)};switch(ee.fundDetails.type){case"default":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({DefaultFund:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"myOwnFund":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({MyOwnFund:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"smsf":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({Smsf:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"promoted":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedFund:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"promotedDefault":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFund:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"promotedDefaultWithJoin":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFundWithJoin:Object.assign(Object.assign({},ee.fundDetails),t)});break;case"null":throw"standardChoiceFormState.fundDetails was not set"}}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await ee.handleSubmitFn(this.standardChoiceFormSignature.trim()),Ht.markSuperSelectionAsSubmitted())}},ua=class{constructor(e){t(this,e),this.ignorePopState=()=>window.history.pushState(null,"",null)}connectedCallback(){this.ignorePopState(),window.addEventListener("popstate",this.ignorePopState)}disconnectedCallback(){window.removeEventListener("popstate",this.ignorePopState)}render(){return e(s,{class:"text-center"},e("div",{class:"flex justify-center"},e("div",{class:"relative"},e("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),e("div",{class:"h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2"},e((()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:"fill-primary-base"},e("path",{d:"M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z"}))),null)))),e("h3",{class:"text-2xl leading-8 font-bold mt-4"},"Your super choice has been submitted"),e("p",{class:"mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto"},"Your superannuation details have been updated successfully and will be submitted to your employer."),e("div",{class:"flex justify-center mt-8"},e("div",{class:"max-w-[200px] w-full"},e("sss-button",{size:"xl",fillWidth:!0,onClick:this.handleContinueButtonClick},e("span",null,"Continue")))))}handleContinueButtonClick(t){Ht.completeSuperSelectionFlow()}},ca=new class{trackClickPromotedTileAsync(t){return Ut.clickPromotedTileAsync(t)}},la=t=>t.replace(/ /g,""),da=class{constructor(e){t(this,e),this.componentLoaded=!1,this.getEnvironmentTag=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","").replace("-","");default:return"autodev"}},this.subscribeToSuperCampaignEvents=()=>{for(const t in this.superCampaignEventHandlers)document.addEventListener(t,this.superCampaignEventHandlers[t])},this.unSubscribeFromSuperCampaignEvents=()=>{for(const t in this.superCampaignEventHandlers)document.removeEventListener(t,this.superCampaignEventHandlers[t])},this.chooseAnotherFundRequested=async t=>{"super-campaign"==t.detail.sender&&await re.navigateInternally(this.history,ne.MyOwnFund)},this.fundPanelShown=async t=>{var e;if("super-campaign"==t.detail.sender){console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type));const n=t.detail.shownFunds.map((t=>t.fundId));Ht.setSuperCampaignPromotedFundsShown(t.detail.shownFunds),await Gt.Instance.TrackSuperFundPanelViewedAsync({promotedFundsShown:n,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi),superCampaignEnabled:!0})}},this.fundTileClicked=async t=>{var e,n,i;const r=t.detail;if("super-campaign"==r.sender){console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type));const s=this.SuperCampaignState.PromotedFundIds,a=vt.toUndefined(Ht.defaultFundUsi);await Promise.all(["promoted-default"==r.fundType?await Gt.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({fundUsi:null!==(n=r.fundUsi)&&void 0!==n?n:"",fundName:r.fundName,promotedFundId:r.fundId,promotedFundsShown:s,defaultFundUsiSet:a,superCampaignEnabled:!0}):await Gt.Instance.TrackPromotedSuperFundDetailViewedAsync({fundUsi:null!==(i=r.fundUsi)&&void 0!==i?i:void 0,fundName:r.fundName,promotedFundId:r.fundId,promotedFundsShown:s,defaultFundUsiSet:a,superCampaignEnabled:!0}),ca.trackClickPromotedTileAsync("promoted-default"==r.fundType?{promotedDefault:{fundId:r.fundId}}:{promoted:{fundId:r.fundId}})])}},this.fundPdsViewed=async t=>{var e;"super-campaign"==t.detail.sender&&(console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type)),await Gt.Instance.TrackSuperFundPdsViewedAsync({fundName:t.detail.fundName,fundUsi:t.detail.fundUsi,pageName:t.detail.pageName,superCampaignEnabled:!0}))},this.disclaimerViewed=async t=>{var e;"super-campaign"==t.detail.sender&&(console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type)),await Gt.Instance.TrackSuperFundDisclaimerViewedAsync(zt(!0)))},this.disclaimerAccepted=async t=>{var e;"super-campaign"==t.detail.sender&&(console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type)),await Gt.Instance.TrackSuperFundDisclaimerAcceptedAsync({superCampaignEnabled:!0}))},this.promotedFundJoined=async t=>{var e;if("super-campaign"==t.detail.sender){console.log("$handling super-campaign event: "+(null===(e=t.detail)||void 0===e?void 0:e.type));const n=t.detail.fundJoinInfo;switch(n.fundType){case"Promoted":this.handlePromotedFundJoined(n);break;case"DefinedBenefits":await this.handleDefinedBenefitsJoined(n);break;case"PromotedDefault":this.handlePromotedDefaultFundJoined(n);break;case"PromotedDefaultWithJoin":this.handlePromotedDefaultFundWithJoinWasJoined(n)}}return Promise.resolve()},this.getFundName=t=>pt.pipe(je(t),vt.getOrElse((()=>""))),this.stringIsNullOrEmtpty=t=>!("string"==typeof t&&t.trim().length>0),this.handlePromotedFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return Ks.trackErrorTrace("Super Campaign did not return (Promoted) memberNumber and/or usi"),void re.navigateInternally(this.history,ne.ChoicePage);const e=la(t.usi),n=this.getFundName(t.fundId),i=vt.toUndefined(Ht.defaultFundUsi);re.navigateInternallyToStandardChoice({history:this.history,fundName:n,promotedFundId:t.fundId,fundDetails:{type:"promoted",fundName:n,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:async n=>{t.fundId==Me.fundId?await ra.submitSlateChoiceAsync(Object.assign({memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,standardChoiceFormSignature:n,defaultFundUsiSet:i},this.PromotedFundsConfig)):await _n.submitChoiceAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:i},this.PromotedFundsConfig))}})},this.handlePromotedDefaultFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.usi))return void Ks.trackErrorTrace("Super Campaign did not return (PromotedDefault) usi");const e=la(t.usi),n=this.getFundName(t.fundId);re.navigateInternallyToStandardChoice({history:this.history,fundName:n,promotedFundId:t.fundId,fundDetails:{type:"promotedDefault",fundName:n,fundUsi:e,promotedFundId:t.fundId},handleSubmitFn:n=>_n.submitDefaultChoiceAsync(Object.assign({fundId:t.fundId,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},this.PromotedFundsConfig))})},this.handlePromotedDefaultFundWithJoinWasJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return void Ks.trackErrorTrace("Super Campaign did not return (PromotedDefaultWithJoin) memberNumber and/or usi");const e=la(t.usi),n=this.getFundName(t.fundId);re.navigateInternallyToStandardChoice({history:this.history,fundName:n,promotedFundId:t.fundId,fundDetails:{type:"promotedDefaultWithJoin",fundName:n,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:n=>_n.submitDefaultChoiceWithJoinAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi)},this.PromotedFundsConfig))})},this.handleDefinedBenefitsJoined=async t=>{this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi)?Ks.trackErrorTrace("Super Campaign did not return (DefinedBenefits) memberNumber and/or usi"):(await me.submitDefinedBenefitsChoiceAsync(Object.assign({fundUsi:la(t.usi),fundId:t.fundId,memberNumber:t.memberNumber,memberElectContributionRatePreTax:t.memberElectContributionRatePreTax,memberElectContributionRatePostTax:t.memberElectContributionRatePostTax},this.PromotedFundsConfig)),Ht.markSuperSelectionAsSubmitted())},this.superCampaignEventHandlers={"choose-another-fund-requested":this.chooseAnotherFundRequested.bind(this),"fund-panel-shown":this.fundPanelShown.bind(this),"fund-tile-clicked":this.fundTileClicked.bind(this),"fund-pds-viewed":this.fundPdsViewed.bind(this),"disclaimer-viewed":this.disclaimerViewed.bind(this),"disclaimer-accepted":this.disclaimerAccepted.bind(this),"promoted-fund-joined":this.promotedFundJoined.bind(this)}}async componentWillLoad(){try{if(!vt.isSome(Ht.state.apiBaseUrl)||!vt.isSome(Ht.state.jwt))throw Error("SuperCampaignHost pre-requisites not met.");this.backendUrl=this.getBaseUrl(Ht.state.apiBaseUrl.value),this.accessToken=Ht.state.jwt.value,this.unSubscribeFromSuperCampaignEvents(),await import(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag())),this.subscribeToSuperCampaignEvents(),this.componentLoaded=!0}catch(t){console.error("Error loading component:",t)}}disconnectedCallback(){this.unSubscribeFromSuperCampaignEvents()}render(){return e("div",null,this.componentLoaded?e("apollo-super-campaign",{"backend-url":this.backendUrl,"access-token":this.accessToken}):null)}createApolloSuperCampaignScriptUrl(t){return`https://npm-cdn.flarehr.com/@flarehr/apollo-super-campaign@${t}/dist/apollo-super-campaign.js`}getBaseUrl(t){const e=new URL(t);return`${e.protocol}//${e.hostname}${e.port.length>0?":"+e.port:""}`}get SuperCampaignState(){if(null!=Ht.superCampaignState)return Ht.superCampaignState;throw new Error("Super campaign state has not been initialized")}get PromotedFundsConfig(){return{shownFunds:this.SuperCampaignState.PromotedFundIds,promotedDefaultFundPosition:this.SuperCampaignState.DefaultFundPosition,promotedFundsConfigSource:"superCampaign"}}};W(da);const ha=class{constructor(e){t(this,e),this.joinFundClicked=a(this,"joinFundClicked",7)}render(){return e(s,null,e("div",{class:"py-6 px-4 flex flex-col justify-between h-full"},e("div",null,e("div",{class:{"md:max-w-[240px]":!0,"lg:max-w-full":this.isMultiFund}},e("sss-button",{class:"uuid-button-continue",fillWidth:!0,onClick:()=>this.handleFundClick()},"Choose this fund")),e("div",{class:"text-xs text-gray-500 mt-6 leading-4"},this.disclaimer)),this.abnInfo&&this.abn&&e("div",{class:"text-xs text-gray-500 mt-2"},e("p",null,"Issued by ",this.abnInfo,"."),e("p",null,"ABN: ",this.abn))))}handleFundClick(){return this.joinFundClicked.emit()}},fa=class{constructor(e){t(this,e)}render(){return e(s,null,e("div",{class:"px-4 pt-6"},e("div",{class:"text-right w-100 -mt-5 -mr-2"},this.extraBadge,this.isPromotedDefault&&e("span",{class:"text-xs bg-blue-100 text-blue-800 font-medium rounded-xl py-0.5 px-2.5 mr-1"},"Employer Default"),e("span",{class:"text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5"},"Featured")),e("div",{class:{"flex lg:block mt-2 md:mt-0":!0,"lg:mt-4":this.isMultiFund}},e("img",{class:{"h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left":!0,"lg:block":this.isMultiFund},alt:this.name,src:r("assets/"+this.logo)}),e("div",{class:"grid content-center"},e("p",{class:{"text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0":!0,"lg:mt-4":this.isMultiFund}},this.name))),e("div",{class:"mt-4 sm:mt-2 text-sm space-y-2"},this.features.map((t=>e("div",{class:"flex"},e("div",{class:"h-5 w-5 flex-none mr-1.5"},e("img",{alt:"checked",src:r("assets/icon-check.svg")})),e("div",{class:"leading-5"},t))))),this.featureSubText&&e("p",{class:"text-xs text-gray-500 italic mt-4 leading-4"},this.featureSubText),this.customContent))}},ma=class{constructor(e){t(this,e),this.promotedFunds=this.getPromotedFunds(),this.eventTrackingService=Gt.Instance}async componentDidLoad(){const t=this.promotedFunds.map((t=>t.fundId));return this.eventTrackingService.TrackSuperFundPanelViewedAsync({promotedFundsShown:t,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi),superCampaignEnabled:!1})}render(){const t=this.promotedFunds.length>1;return e(s,null,e("div",null,e("sss-header-section",{currentPage:"choice"}),e("div",{class:"mt-8 text-sm text-center leading-6"},e("p",{class:"leading-6"},"Not ready to join a new fund, or want to nominate another super fund?"),e("stencil-route-link",{url:ne.MyOwnFund},e("span",{class:"inline-block text-primary-base font-medium mt-3"},"Skip Featured Funds ",e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"inline h-5 w-5 fill-primary-base group-hover:fill-white"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3"}))))),e("div",{class:"flex justify-center mt-8"},e("div",{class:{"lg:grid border-l border-t lg:border-b rounded-lg":!0,"lg:grid-cols-1 max-w-720":1===this.promotedFunds.length,"lg:grid-cols-2 max-w-720":2===this.promotedFunds.length,"lg:grid-cols-3 max-w-960":3===this.promotedFunds.length}},this.promotedFunds.map(((n,i)=>e("div",{class:{"border-r":!0,"rounded-tr-lg":0===i,"lg:rounded-tr-none":0===i&&i!==this.promotedFunds.length-1,"rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg":i===this.promotedFunds.length-1}},e("div",{class:{"flex border-b lg:border-b-0":!0,"rounded-b-lg":i===this.promotedFunds.length-1}},e("div",{class:{"hidden md:flex w-36 justify-center pt-6 pl-6":!0,"lg:hidden":t}},e("img",{class:"h-16 object-contain w-full max-w-[96px]",alt:n.name,src:r("assets/"+n.logo)})),e("div",{class:"w-full"},e("sss-super-choice-item-top",{logo:n.logo,name:n.name,features:n.features,featureSubText:n.featureSubText,customContent:n.customContent,isMultiFund:t,isPromotedDefault:n.isPromotedDefault,extraBadge:n.extraBadge}),e("div",{class:{"lg:hidden":t}},e("sss-super-choice-item-bottom",{disclaimer:n.disclaimer,abnInfo:n.abnInfo,abn:n.abn,isMultiFund:t,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(n)}))))))),this.promotedFunds.map(((n,i)=>e("div",{class:{"hidden border-r":!0,"lg:block":t,"rounded-br-lg":i===this.promotedFunds.length-1}},e("sss-super-choice-item-bottom",{disclaimer:n.disclaimer,abnInfo:n.abnInfo,abn:n.abn,isMultiFund:t,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(n)})))))),e("div",{class:"flex justify-center mt-8 sm:mt-12"},e("div",{class:"pb-8 sm:pb-12 max-w-720 border-b"},e("h5",{class:"font-bold sm:text-lg"},"Or, choose another super fund:"),e("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base"},e("li",null,"Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."),e("li",null,"If you are unsure of your current super fund details, you can find out at"," ",e("a",{class:"text-primary-base font-medium hover:text-primary-hover",target:"_blank",href:re.toExternalUrl("https://my.gov.au")},"www.my.gov.au")),e("li",null,"A full list of super funds can be viewed at"," ",e("a",{class:"text-primary-base font-medium hover:text-primary-hover",target:"_blank",href:re.toExternalUrl("https://www.apra.gov.au/register-of-superannuation-institutions")},"www.apra.gov.au"))),e("stencil-route-link",{url:ne.MyOwnFund},e("sss-button",{fillWidthOnMobile:!0},"Choose another super fund")))),e("div",{class:"flex justify-center"},e("div",{class:"pt-8 sm:pt-12 max-w-720"},e("h5",{class:"font-semibold"},"IMPORTANT INFORMATION:"),e("ul",{class:"list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6"},e("li",null,"The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."),e("li",null,"This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."),e("li",null,"Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."),e("li",null,"You should consider the relevant superannuation fund’s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund’s website."),e("li",null,"You should be aware that the trustees of featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform."))))))}getPromotedFunds(){const t=[];return Ht.promotedFunds.forEach((e=>{const n=Te.find((t=>e===t.fundId));void 0!==n&&t.push(n)})),t}async handleJoinSuperClickAsync(t){const e=Ht.promotedFunds,n=t.fundId==Me.fundId?V("32367272075001"):q,i=je(t.fundId);return await Promise.all([1==t.isPromotedDefault?this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({fundUsi:vt.isSome(n)?n.value:"",fundName:vt.isSome(i)?i.value:"",promotedFundId:t.fundId,promotedFundsShown:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi),superCampaignEnabled:!1}):this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:vt.isSome(n)?n.value:void 0,fundName:vt.isSome(i)?i.value:"",promotedFundId:t.fundId,promotedFundsShown:e,defaultFundUsiSet:vt.toUndefined(Ht.defaultFundUsi),superCampaignEnabled:!1}),ca.trackClickPromotedTileAsync(t.isPromotedDefault?{promotedDefault:{fundId:t.fundId}}:{promoted:{fundId:t.fundId}})]),Wt.fund={id:t.fundId,type:t.isPromotedDefault?"PromotedDefault":"Promoted"},re.navigateInternally(this.history,t.route)}static get assetsDirs(){return["assets"]}},pa=class{constructor(e){t(this,e),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const e=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!e)return this.previousMatch=this.match,this.match=dt(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};var e,n;this.history&&this.history.location.hash?t={scrollToId:this.history.location.hash.substr(1)}:this.scrollTopOffset&&(t={scrollTopOffset:this.scrollTopOffset}),"function"==typeof this.componentUpdated?this.componentUpdated(t):!this.match||(n=this.previousMatch,null==(e=this.match)&&null==n||null!=n&&e&&n&&e.path===n.path&&e.url===n.url&&ot(e.params,n.params))||!this.routeViewsUpdated||this.routeViewsUpdated(t)}async componentDidUpdate(){await this.loadCompleted()}async componentDidLoad(){await this.loadCompleted()}render(){if(!this.match||!this.history)return null;const t=Object.assign({},this.componentProps,{history:this.history,match:this.match});return this.routeRender?this.routeRender(Object.assign({},t,{component:this.component})):this.component?e(this.component,Object.assign({},t)):void 0}get el(){return c(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(pa,["location","history","historyType","routeViewsUpdated"]),pa.style="stencil-route.inactive{display:none}";const va=(t,e,n)=>n(t.confirm(e)),wa=(t,e)=>{const n=t[e],i="__storage_test__";try{return n.setItem(i,i),n.removeItem(i),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&0!==n.length}},ga=class{constructor(e){t(this,e),this.unsubscribe=()=>{},this.activeClass="link-active",this.exact=!1,this.strict=!0,this.custom="a",this.match=null}componentWillLoad(){this.computeMatch()}computeMatch(){this.location&&(this.match=dt(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var e;if(!((e=t).metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push(((t,e)=>"/"==t.charAt(0)&&"/"==e.charAt(e.length-1)?e.slice(0,e.length-1)+t:e+t)(this.url,this.root))}render(){let t={class:{[this.activeClass]:null!==this.match},onClick:this.handleClick.bind(this)};return this.anchorClass&&(t.class[this.anchorClass]=!0),"a"===this.custom&&(t=Object.assign({},t,{href:this.url,title:this.anchorTitle,role:this.anchorRole,tabindex:this.anchorTabIndex,"aria-haspopup":this.ariaHaspopup,id:this.anchorId,"aria-posinset":this.ariaPosinset,"aria-setsize":this.ariaSetsize,"aria-label":this.ariaLabel})),e(this.custom,Object.assign({},t),e("slot",null))}get el(){return c(this)}static get watchers(){return{location:["computeMatch"]}}};A.injectProps(ga,["history","location","root"]);const ba=t=>"STENCIL-ROUTE"===t.tagName,ya=class{constructor(e){t(this,e),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=l(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let e=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(ba).map(((n,i)=>{const r=dt(t.pathname,{path:n.url,exact:n.exact,strict:!0});return r&&-1===e&&(e=i),{el:n,match:r}})),-1===e)return;if(this.activeIndex===e)return void(this.subscribers[e].el.match=this.subscribers[e].match);this.activeIndex=e;const n=this.subscribers[this.activeIndex];this.scrollTopOffset&&(n.el.scrollTopOffset=this.scrollTopOffset),n.el.group=this.group,n.el.match=n.match,n.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,e)=>{if(t.el.componentUpdated=void 0,e===this.activeIndex)return t.el.style.display="";this.scrollTopOffset&&(t.el.scrollTopOffset=this.scrollTopOffset),t.el.group=this.group,t.el.match=null,t.el.style.display="none"}))})),this.routeViewsUpdated&&this.routeViewsUpdated(Object.assign({scrollTopOffset:this.scrollTopOffset},t))}}render(){return e("slot",null)}get el(){return c(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};A.injectProps(ya,["location","routeViewsUpdated"]);const xa=(t,...e)=>{t||console.warn(...e)},Sa=()=>{let t,e=[];return{setPrompt:e=>(xa(null==t,"A history supports only one prompt at a time"),t=e,()=>{t===e&&(t=null)}),confirmTransitionTo:(e,n,i,r)=>{if(null!=t){const s="function"==typeof t?t(e,n):t;"string"==typeof s?"function"==typeof i?i(s,r):(xa(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==s)}else r(!0)},appendListener:t=>{let n=!0;const i=(...e)=>{n&&t(...e)};return e.push(i),()=>{n=!1,e=e.filter((t=>t!==i))}},notifyListeners:(...t)=>{e.forEach((e=>e(...t)))}}},Ca=(t,e="scrollPositions")=>{let n=new Map;const i=(e,i)=>{if(n.set(e,i),wa(t,"sessionStorage")){const e=[];n.forEach(((t,n)=>{e.push([n,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(e))}};if(wa(t,"sessionStorage")){const i=t.sessionStorage.getItem(e);n=i?new Map(JSON.parse(i)):n}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:i,get:t=>n.get(t),has:t=>n.has(t),capture:e=>{i(e,[t.scrollX,t.scrollY])}}},Fa={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+nt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:nt,decodePath:et},slash:{encodePath:et,decodePath:et}},ka=(t,e)=>{const n=0==t.pathname.indexOf(e)?"/"+t.pathname.slice(e.length):t.pathname;return Object.assign({},t,{pathname:n})},Aa={browser:(t,e={})=>{let n=!1;const i=t.history,r=t.location,s=t.navigator,a=(t=>{const e=t.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&t.history&&"pushState"in t.history})(t),o=!(-1===s.userAgent.indexOf("Trident")),u=Ca(t),c=null!=e.forceRefresh&&e.forceRefresh,l=null!=e.getUserConfirmation?e.getUserConfirmation:va,d=null!=e.keyLength?e.keyLength:6,h=e.basename?tt(et(e.basename)):"",f=()=>{try{return t.history.state||{}}catch(t){return{}}},m=t=>{t=t||{};const{key:e,state:n}=t,{pathname:i,search:s,hash:a}=r;let o=i+s+a;return xa(!h||Z(o,h),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+o+'" to begin with "'+h+'".'),h&&(o=Q(o,h)),ut(o,n,e||st(d))},p=Sa(),v=t=>{u.capture(M.location.key),Object.assign(M,t),M.location.scrollPosition=u.get(M.location.key),M.length=i.length,p.notifyListeners(M.location,M.action)},w=t=>{((t,e)=>void 0===e.state&&-1===t.userAgent.indexOf("CriOS"))(s,t)||b(m(t.state))},g=()=>{b(m(f()))},b=t=>{if(n)n=!1,v();else{const e="POP";p.confirmTransitionTo(t,e,l,(n=>{n?v({action:e,location:t}):y(t)}))}},y=t=>{let e=S.indexOf(M.location.key),i=S.indexOf(t.key);-1===e&&(e=0),-1===i&&(i=0);const r=e-i;r&&(n=!0,A(r))},x=m(f());let S=[x.key],C=0,F=!1;const k=t=>h+it(t),A=t=>{i.go(t)},N=e=>{C+=e,1===C?(t.addEventListener("popstate",w),o&&t.addEventListener("hashchange",g)):0===C&&(t.removeEventListener("popstate",w),o&&t.removeEventListener("hashchange",g))},M={length:i.length,action:"POP",location:x,createHref:k,push:(t,e)=>{xa(!("object"==typeof t&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");const n="PUSH",s=ut(t,e,st(d),M.location);p.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=k(s),{key:o,state:u}=s;if(a)if(i.pushState({key:o,state:u},"",e),c)r.href=e;else{const t=S.indexOf(M.location.key),e=S.slice(0,-1===t?0:t+1);e.push(s.key),S=e,v({action:n,location:s})}else xa(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),r.href=e}))},replace:(t,e)=>{xa(!("object"==typeof t&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");const n="REPLACE",s=ut(t,e,st(d),M.location);p.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=k(s),{key:o,state:u}=s;if(a)if(i.replaceState({key:o,state:u},"",e),c)r.replace(e);else{const t=S.indexOf(M.location.key);-1!==t&&(S[t]=s.key),v({action:n,location:s})}else xa(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),r.replace(e)}))},go:A,goBack:()=>A(-1),goForward:()=>A(1),block:(t="")=>{const e=p.setPrompt(t);return F||(N(1),F=!0),()=>(F&&(F=!1,N(-1)),e())},listen:t=>{const e=p.appendListener(t);return N(1),()=>{N(-1),e()}},win:t};return M},hash:(t,e={})=>{let n=!1,i=null,r=0,s=!1;const a=t.location,o=t.history,u=-1===t.navigator.userAgent.indexOf("Firefox"),c=null!=e.keyLength?e.keyLength:6,{getUserConfirmation:l=va,hashType:d="slash"}=e,h=e.basename?tt(et(e.basename)):"",{encodePath:f,decodePath:m}=Fa[d],p=()=>{const t=a.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},v=t=>{const e=a.href.indexOf("#");a.replace(a.href.slice(0,e>=0?e:0)+"#"+t)},w=()=>{let t=m(p());return xa(!h||Z(t,h),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+h+'".'),h&&(t=Q(t,h)),ut(t,void 0,st(c))},g=Sa(),b=t=>{Object.assign(P,t),P.length=o.length,g.notifyListeners(P.location,P.action)},y=()=>{const t=p(),e=f(t);if(t!==e)v(e);else{const t=w(),e=P.location;if(!n&&(r=e).pathname===(s=t).pathname&&r.search===s.search&&r.hash===s.hash&&r.key===s.key&&ot(r.state,s.state))return;if(i===it(t))return;i=null,x(t)}var r,s},x=t=>{if(n)n=!1,b();else{const e="POP";g.confirmTransitionTo(t,e,l,(n=>{n?b({action:e,location:t}):S(t)}))}},S=t=>{let e=A.lastIndexOf(it(P.location)),i=A.lastIndexOf(it(t));-1===e&&(e=0),-1===i&&(i=0);const r=e-i;r&&(n=!0,N(r))},C=p(),F=f(C);C!==F&&v(F);const k=w();let A=[it(k)];const N=t=>{xa(u,"Hash history go(n) causes a full page reload in this browser"),o.go(t)},M=(t,e)=>{r+=e,1===r?t.addEventListener("hashchange",y):0===r&&t.removeEventListener("hashchange",y)},P={length:o.length,action:"POP",location:k,createHref:t=>"#"+f(h+it(t)),push:(t,e)=>{xa(void 0===e,"Hash history cannot push state; it is ignored");const n="PUSH",r=ut(t,void 0,st(c),P.location);g.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=it(r),s=f(h+e);if(p()!==s){i=e,(t=>{a.hash=t})(s);const t=A.lastIndexOf(it(P.location)),o=A.slice(0,-1===t?0:t+1);o.push(e),A=o,b({action:n,location:r})}else xa(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),b()}))},replace:(t,e)=>{xa(void 0===e,"Hash history cannot replace state; it is ignored");const n="REPLACE",r=ut(t,void 0,st(c),P.location);g.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=it(r),s=f(h+e);p()!==s&&(i=e,v(s));const a=A.indexOf(it(P.location));-1!==a&&(A[a]=e),b({action:n,location:r})}))},go:N,goBack:()=>N(-1),goForward:()=>N(1),block:(e="")=>{const n=g.setPrompt(e);return s||(M(t,1),s=!0),()=>(s&&(s=!1,M(t,-1)),n())},listen:e=>{const n=g.appendListener(e);return M(t,1),()=>{M(t,-1),n()}},win:t};return P}},Na=class{constructor(e){t(this,e),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const e=this.history.win.document.getElementById(t.scrollToId);if(e)return e.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=l(this,"isServer"),this.queue=l(this,"queue")}componentWillLoad(){this.history=Aa[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=ka(t,this.root),this.location=t})),this.location=ka(this.history.location,this.root)}scrollTo(t){const e=this.history;if(null!=t&&!this.isServer&&e)return"POP"===e.action&&Array.isArray(e.location.scrollPosition)?this.queue.write((()=>{e&&e.location&&Array.isArray(e.location.scrollPosition)&&e.win.scrollTo(e.location.scrollPosition[0],e.location.scrollPosition[1])})):this.queue.write((()=>{e.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return e(A.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},e("slot",null))}get el(){return c(this)}},Ma=class{constructor(e){t(this,e),this.stepSubmitSuccess=a(this,"step-completion",7),this.successPageAcknowledged=a(this,"successPageAcknowledged",5),this.initialised=a(this,"initialised",7),this.isSelfHosted=!1,this.isAppInitialised=!1}async componentWillLoad(){const t=vt.fromNullable(this.accessToken);if(vt.isNone(t))throw Error("jwt property is missing.");Ht.state.jwt=t;const e=vt.fromNullable(this.backendUrl);if(vt.isNone(e))throw Error("apiBaseUrl property is missing.");Ht.state.apiBaseUrl=vt.some(e.value.replace(/\/$/,"")+"/");const n=vt.fromNullable(this.appBaseUrl);if(vt.isNone(n))throw Error("appBaseUrl property is missing.");Ht.state.appBaseUrl=vt.some(n.value.replace(/\/$/,"")),Ht.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),Ht.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),Ht.state.hasSuperSelectionBeenSubmitted=!1,this.isSelfHosted&&re.navigateInternally(this.history,ne.Success))}))}async componentDidLoad(){await Ht.loadAppStateAsync();const t=await Le.GetExistingFundAsync();this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:Ht.accountIdOrDefault,partnerIdOrDefault:Ht.partnerIdOrDefault,profileId:Ht.profileId}),Yt();const e=vt.fromNullable(this.ignoreExistingSelection),n=vt.isSome(t)&&"Defined Benefits Fund"==t.value.type&&(vt.isNone(Ht.isDefinedBenefitsEligible)||!Ht.isDefinedBenefitsEligible.value),i=vt.isSome(e)&&e.value||n;vt.isSome(Ht.state.superChoicePrefill)?re.navigateInternally(this.history,ne.Prefill):vt.isSome(t)&&"Inactive"!==t.value.valid&&!i?re.navigateInternally(this.history,ne.ExistingChoicePage):re.navigateInternally(this.history,Ht.state.superCampaignEnabled?ne.SuperCampaign:ne.ConsentPage)}authTokenChanged(t){Ht.state.jwt=vt.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return e(s,null,e("link",{rel:"stylesheet",href:r("apollo-super-selection.css"),media:"all"}),this.renderAppContent())}isFundJoinPage(){return window.location.pathname.includes(ne.SlateJoin)||window.location.pathname.includes(ne.PromotedFundJoinV1)||window.location.pathname.includes(ne.PromotedFundJoinV2)}getFooterTextOverride(){return null!==(e=null===(t=Be[Wt.fund.id])||void 0===t?void 0:t.footnoteTextOverride)&&void 0!==e?e:q;var t,e}routerBaseUrl(){var t;return(null===(t=this.appBaseUrl)||void 0===t?void 0:t.replace(/\/$/,""))+"/"}renderAppContent(){return e("stencil-router",{root:this.routerBaseUrl(),class:"font-inter"},e("stencil-route-switch",{scrollTopOffset:0},this.isAppInitialised?e("div",{class:{"pt-28":!0,"-mt-12 pb-6":!this.isFundJoinPage(),"-mt-28":this.isFundJoinPage()}},ie,e("sss-footer-section",{textOverride:this.getFooterTextOverride()})):e("div",{class:"flex justify-center py-20"},e("sss-loading-indicator",null))))}static get assetsDirs(){return["assets"]}static get watchers(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}}};W(Ma),Ma.style="html{scroll-behavior:smooth}stencil-route{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-pack:center;justify-content:center}stencil-route:empty{display:none}input+.invalid-feedback{display:none}select+.invalid-feedback{display:none}.was-validated input:invalid+.invalid-feedback{display:block}.was-validated select:invalid+.invalid-feedback{display:block}";var Pa,Ea=[],Da="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Pa||(Pa={}));var Ia,_a=function(t){return Object.freeze(t)},Ba=function(t,e){this.inlineSize=t,this.blockSize=e,_a(this)},Ta=function(){function t(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,_a(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ja=function(t){return t instanceof SVGElement&&"getBBox"in t},Oa=function(t){if(ja(t)){var e=t.getBBox();return!e.width&&!e.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},La=function(t){var e,n,i=null===(n=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},Ra="undefined"!=typeof window?window:{},Ua=new WeakMap,qa=/auto|scroll/,Va=/^tb|vertical/,Ha=/msie|trident/i.test(Ra.navigator&&Ra.navigator.userAgent),za=function(t){return parseFloat(t||"0")},Wa=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new Ba((n?e:t)||0,(n?t:e)||0)},$a=_a({devicePixelContentBoxSize:Wa(),borderBoxSize:Wa(),contentBoxSize:Wa(),contentRect:new Ta(0,0,0,0)}),Ja=function(t,e){if(void 0===e&&(e=!1),Ua.has(t)&&!e)return Ua.get(t);if(Oa(t))return Ua.set(t,$a),$a;var n=getComputedStyle(t),i=ja(t)&&t.ownerSVGElement&&t.getBBox(),r=!Ha&&"border-box"===n.boxSizing,s=Va.test(n.writingMode||""),a=!i&&qa.test(n.overflowY||""),o=!i&&qa.test(n.overflowX||""),u=i?0:za(n.paddingTop),c=i?0:za(n.paddingRight),l=i?0:za(n.paddingBottom),d=i?0:za(n.paddingLeft),h=i?0:za(n.borderTopWidth),f=i?0:za(n.borderRightWidth),m=i?0:za(n.borderBottomWidth),p=d+c,v=u+l,w=(i?0:za(n.borderLeftWidth))+f,g=h+m,b=o?t.offsetHeight-g-t.clientHeight:0,y=a?t.offsetWidth-w-t.clientWidth:0,x=r?p+w:0,S=r?v+g:0,C=i?i.width:za(n.width)-x-y,F=i?i.height:za(n.height)-S-b,k=C+p+y+w,A=F+v+b+g,N=_a({devicePixelContentBoxSize:Wa(Math.round(C*devicePixelRatio),Math.round(F*devicePixelRatio),s),borderBoxSize:Wa(k,A,s),contentBoxSize:Wa(C,F,s),contentRect:new Ta(d,u,C,F)});return Ua.set(t,N),N},Ga=function(t,e,n){var i=Ja(t,n),r=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case Pa.DEVICE_PIXEL_CONTENT_BOX:return a;case Pa.BORDER_BOX:return r;default:return s}},Xa=function(t){var e=Ja(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=_a([e.borderBoxSize]),this.contentBoxSize=_a([e.contentBoxSize]),this.devicePixelContentBoxSize=_a([e.devicePixelContentBoxSize])},Ya=function(t){if(Oa(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Ka=function(){var t=1/0,e=[];Ea.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new Xa(e.target),r=Ya(e.target);i.push(n),e.lastReportedSize=Ga(e.target,e.observedBox),r<t&&(t=r)})),e.push((function(){n.callback.call(n.observer,i,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,i=e;n<i.length;n++)(0,i[n])();return t},Za=function(t){Ea.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(Ya(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},Qa=[],to=0,eo={attributes:!0,characterData:!0,childList:!0,subtree:!0},no=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],io=function(t){return void 0===t&&(t=0),Date.now()+t},ro=!1,so=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!ro){ro=!0;var n,i=io(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(Za(e);Ea.some((function(t){return t.activeTargets.length>0}));)e=Ka(),Za(e);return Ea.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Da}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Da),window.dispatchEvent(t)),e>0}()}finally{if(ro=!1,t=i-io(),!to)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!Ia){var e=0,n=document.createTextNode("");new MutationObserver((function(){return Qa.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),Ia=function(){n.textContent=""+(e?e--:e++)}}Qa.push(t),Ia()}((function(){requestAnimationFrame(n)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,eo)};document.body?e():Ra.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),no.forEach((function(e){return Ra.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),no.forEach((function(e){return Ra.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),ao=function(t){!to&&t>0&&so.start(),!(to+=t)&&so.stop()},oo=function(){function t(t,e){this.target=t,this.observedBox=e||Pa.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=Ga(this.target,this.observedBox,!0);return ja(t=this.target)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),uo=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},co=new WeakMap,lo=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ho=function(){function t(){}return t.connect=function(t,e){var n=new uo(t,e);co.set(t,n)},t.observe=function(t,e,n){var i=co.get(t),r=0===i.observationTargets.length;lo(i.observationTargets,e)<0&&(r&&Ea.push(i),i.observationTargets.push(new oo(e,n&&n.box)),ao(1),so.schedule())},t.unobserve=function(t,e){var n=co.get(t),i=lo(n.observationTargets,e);i>=0&&(1===n.observationTargets.length&&Ea.splice(Ea.indexOf(n),1),n.observationTargets.splice(i,1),ao(-1))},t.disconnect=function(t){var e=this,n=co.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),fo=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ho.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!La(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!La(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.unobserve(this,t)},t.prototype.disconnect=function(){ho.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const mo=new class{constructor(){this._appRootUrl=new z((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await Lt(this.getAppRootUrl()+"config.json").get().json();Xs.update({appConfiguration:vt.fromNullable(t)})}resolveRootUrl(){const t=vt.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(vt.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}},po=new class{constructor(){this.ignoreExistingSelectionQueryParameter="ignoreExistingSelection"}init(t){const e=new URLSearchParams(t),n=vt.fromNullable(e.get(this.ignoreExistingSelectionQueryParameter)),i=vt.fold((()=>!1),(t=>"true"===t))(n);Xs.update({ignoreExistingSelection:i})}},vo=new class extends k{constructor(t){super(t),this.store=t,this.sessionState$=this.select((t=>t.authenticationState)),this.jwt$=this.select((t=>t.jwt))}get sessionState(){return this.getValue().authenticationState}get isUnauthorized(){return this.getValue().authenticationState===$s.Unauthorized||this.getValue().authenticationState===$s.Error}get isAuthorized(){return this.getValue().authenticationState===$s.Authenticated}}(Xs),wo=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const e=this.getAuthorizationCodeFromRoute(t);return vt.isSome(e)}initFromRoute(t){const e=this.getAuthorizationCodeFromRoute(t);if(vt.isNone(e))throw Xs.update({authenticationState:$s.Error}),Error(`"${this.authCodeQueryParameter}" URL query parameter missing`);this.authCodeExchangeAsync(e.value)}async authCodeExchangeAsync(t){const e=new URLSearchParams([["grant_type","authorization_code"],["client_id","apollo-super-selection-app"],["code",t],["redirect_uri",""+mo.getAppHostUrl()]]),n=await Lt(Ys.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(e.toString()).badRequest((()=>{throw Xs.update({authenticationState:$s.Error}),new Error("Failed to authenticate.")})).json();Xs.update({jwt:vt.fromNullable(n.access_token),authenticationState:$s.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",mo.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const e=new URLSearchParams(t);return vt.fromNullable(e.get(this.authCodeQueryParameter))}};class go{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=ia.getIframeInteropMode();vt.isSome(t)?window.top.location.href=t.value:Qt()}static initFromRoute(t){const e=new URLSearchParams(t),n=vt.fromNullable(e.get("success-redirection-url")),i={successRedirectionUrl:vt.none};if(vt.isSome(n))try{const t=new URL(n.value);i.successRedirectionUrl=vt.some(t.toString())}catch(t){throw Error(`"${n.value}" is not a valid URL`)}return i}}class bo{static init(){if(void 0===window.ReactNativeWebView)throw Error("React Native WebView messaging is not enabled. Please, refer to https://github.com/react-native-webview/react-native-webview/blob/master/docs/Guide.md#the-windowreactnativewebviewpostmessage-method-and-onmessage-prop");return new Js}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){bo.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}bo.getRnInterop=()=>window.ReactNativeWebView;const yo=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(ia.isIframeInteropEnabled())go.completeSuperSelectionStep();else{if(!ia.isReactNativeInteropEnabled())throw Error("Unknown interop mode");bo.completeSuperSelectionStep()}}init(t){const e=null==(n=new URLSearchParams(t).get(this.interopModeQueryParameter))?q:V(n);var n;R(e)&&"react-native"===e.value?Xs.update({reactNativeInterop:V(bo.init())}):Xs.update({iframeInterop:V(go.initFromRoute(t))})}};const xo=new class extends k{constructor(t){super(t),this.store=t,this.ignoreExistingSelection$=this.select((t=>t.ignoreExistingSelection))}get ignoreExistingSelection(){return this.getValue().ignoreExistingSelection}}(Xs),So=class{constructor(e){t(this,e)}async componentWillLoad(){await async function(){po.init(window.location.search),await mo.loadConfigurationAsync(),Ks.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(vo.isUnauthorized||wo.authorizationCodeIsPresent(window.location.search))&&(yo.init(window.location.search),wo.initFromRoute(window.location.search))}(),vo.sessionState$.subscribe((t=>this.sessionState=t)),vo.jwt$.subscribe((t=>this.jwt=t)),Ys.appConfiguration$.subscribe((t=>this.appConfiguration=t)),xo.ignoreExistingSelection$.subscribe((t=>this.ignoreExistingSelection=t))}render(){return e(s,null,e("link",{rel:"stylesheet",href:r("apollo-super-selection.css"),media:"all"}),e("div",{ref:t=>this.observeContentResize(t)},vt.isNone(this.appConfiguration)?e("sss-loading-page",{class:"font-inter"}):this.renderAppContent()))}renderAppContent(){return e("stencil-router",{root:mo.getAppRootUrl(),class:"sss-app-container"},e("stencil-route-switch",{scrollTopOffset:0},e("stencil-route",{url:"/",routeRender:this.renderProtectedRoute((t=>e("super-selection-app",Object.assign({accessToken:vt.toUndefined(this.jwt),ignoreExistingSelection:this.ignoreExistingSelection,backendUrl:Ys.configuration.ApiBaseUrl,appBaseUrl:this.getAppBaseUrl(),onSuccessPageAcknowledged:this.handleSuccessPageAcknowledged,"onStep-completion":this.handleStepSubmitSuccess,onInitialised:this.handleAppInitialised,isSelfHosted:!0},t))))})))}getAppBaseUrl(){return window.location.pathname.split("app")[0]+"app/"}handleSuccessPageAcknowledged(){yo.completeSuperSelectionStep()}handleStepSubmitSuccess(){te()}handleAppInitialised(t){Ks.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),Ks.getAppInsights().trackPageView();const e=document.getElementById("sss-external-loading-page-container");e&&document.body.removeChild(e)}observeContentResize(t){new(window.ResizeObserver||fo)((()=>{Kt(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case $s.Authenticated:return t;case $s.Unauthorized:return()=>e("sss-loading-page",null);case $s.Error:default:return()=>e("h1",null,"Authentication Error")}}};So.style="html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#fef3c7;--fl-color-primary-dark:#d97706;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{ft as sss_button,oe as sss_consent_page,he as sss_custom_fund,pe as sss_default_fund,ve as sss_dropdown_async,Re as sss_existing_choice_page,Ue as sss_footer_section,He as sss_header_section,ze as sss_iframe_host,We as sss_loading_component,$e as sss_loading_indicator,Je as sss_loading_page,Ge as sss_loading_super_indicator,Xe as sss_my_own_fund,Ye as sss_my_own_fund_inputs,Ke as sss_name_input,Ze as sss_prefill,Qe as sss_prefill_display_field,tn as sss_prefill_error_box,Nn as sss_prefill_invalid_my_own_fund,Mn as sss_prefill_invalid_smsf,Pn as sss_prefill_my_own_fund,Dn as sss_prefill_smsf,In as sss_prefill_warning_box,Tn as sss_promoted_fund_join_v1_page,Qs as sss_promoted_fund_join_v2_page,ea as sss_self_managed_fund,na as sss_self_managed_fund_inputs,aa as sss_slate_join_page,oa as sss_standard_choice_form,ua as sss_success,da as sss_super_campaign_host,ha as sss_super_choice_item_bottom,fa as sss_super_choice_item_top,ma as sss_super_choice_page,pa as stencil_route,ga as stencil_route_link,ya as stencil_route_switch,Na as stencil_router,Ma as super_selection_app,So as super_selection_app_host}
|