@flarehr/apollo-super-selection 5.84.52699 → 5.86.53344

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/{p-6dfc46fa.entry.js → p-40bfe38f.entry.js} +4 -4
  3. package/dist/lib/apollo-super-selection/{p-4874e7a2.system.entry.js → p-b2de6265.system.entry.js} +11 -11
  4. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
  5. package/dist/lib/cjs/sss-button_32.cjs.entry.js +18 -10
  6. package/dist/lib/collection/components/super-campaign/fund-tile-clicked.handler.js +7 -3
  7. package/dist/lib/collection/components/super-campaign/promoted-fund-joined.handler.js +4 -4
  8. package/dist/lib/collection/components/super-campaign/super-campaign.js +3 -1
  9. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js +3 -1
  10. package/dist/lib/esm/sss-button_32.entry.js +18 -10
  11. package/dist/lib/esm-es5/sss-button_32.entry.js +5 -5
  12. package/dist/lib/types/components/super-campaign/fund-tile-clicked.handler.d.ts +3 -1
  13. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +10 -0
  14. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +4 -0
  15. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +2 -0
  16. package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.d.ts +2 -0
  17. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +2 -0
  18. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import{r as t,h as e,F as n,g as i,H as s,c as r,s as a,a as o,d as u}from"./p-db0bded8.js";import{f as c,m as l,S as h,a as d,i as f,b as m,O as p,c as v,d as w,g,h as y,j as b,k as x,l as C,Q as k}from"./p-29c11183.js";import{n as S,i as F,s as M,a as A,b as _,S as N,c as E,C as B,d as I,O as P,E as L,e as j,f as D,g as T,h as R,j as O,k as U,l as q,m as H,t as V,o as z,p as W,q as $,r as X,u as J,v as G}from"./p-24d6e2b8.js";import{A as Z}from"./p-fdadb647.js";function K(){}function Y(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(Y(((n,i)=>c(t(n,i)).pipe(l(((t,s)=>e(n,t,i,s))))),n)):("number"==typeof e&&(n=e),e=>e.lift(new Q(t,n)))}class Q{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new tt(t,this.project,this.concurrent))}}class tt extends h{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 d(this),n=this.destination;n.add(e);const i=f(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 et(t,e,n,i){return v(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(l((t=>m(t)?i(...t):i(t)))):new p((i=>{nt(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)}))}function nt(t,e,n,i,s){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,s),r=()=>i.removeEventListener(e,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),r=()=>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),r=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let r=0,a=t.length;r<a;r++)nt(t[r],e,n,i,s)}i.add(r)}class it{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new st(t,this.dueTime,this.scheduler))}}class st extends g{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(rt,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 rt(t){t.debouncedNext()}function at(t,e,n){return function(i){return i.lift(new ot(t,e,n))}}class ot{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new ut(t,this.nextOrObserver,this.error,this.complete))}}class ut extends g{constructor(t,e,n,i){super(t),this._tapNext=K,this._tapError=K,this._tapComplete=K,this._tapError=n||K,this._tapComplete=i||K,v(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||K,this._tapError=e.error||K,this._tapComplete=e.complete||K)}_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()}}class ct{constructor(t){this.factory=t,this._value=S}get value(){if(F(this._value))return this._value.value;const t=this.factory();return this._value=M(t),t}}const lt=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),ht=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),dt=t=>t.replace(/([=!:$/()])/g,"\\$1"),ft=t=>t&&t.sensitive?"":"i",mt=(t,e,n)=>{for(var i=(n=n||{}).strict,s=!1!==n.end,r=ht(n.delimiter||"/"),a=n.delimiters||"./",o=[].concat(n.endsWith||[]).map(ht).concat("$").join("|"),u="",c=!1,l=0;l<t.length;l++){var h=t[l];if("string"==typeof h)u+=ht(h),c=l===t.length-1&&a.indexOf(h[h.length-1])>-1;else{var d=ht(h.prefix||""),f=h.repeat?"(?:"+h.pattern+")(?:"+d+"(?:"+h.pattern+"))*":h.pattern;e&&e.push(h),u+=h.optional?h.partial?d+"("+f+")?":"(?:"+d+"("+f+"))?":d+"("+f+")"}}return s?(i||(u+="(?:"+r+")?"),u+="$"===o?"$":"(?="+o+")"):(i||(u+="(?:"+r+"(?="+o+"))?"),c||(u+="(?="+r+"|"+o+")")),new RegExp("^"+u,ft(n))},pt=(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=[],s=0;s<t.length;s++)i.push(pt(t[s],e,n).source);return new RegExp("(?:"+i.join("|")+")",ft(n))})(t,e,n):((t,e,n)=>mt(((t,e)=>{for(var n,i=[],s=0,r=0,a="",o=e&&e.delimiter||"/",u=e&&e.delimiters||"./",c=!1;null!==(n=lt.exec(t));){var l=n[0],h=n[1],d=n.index;if(a+=t.slice(r,d),r=d+l.length,h)a+=h[1],c=!0;else{var f="",m=t[r],p=n[2],v=n[3],w=n[4],g=n[5];if(!c&&a.length){var y=a.length-1;u.indexOf(a[y])>-1&&(f=a[y],a=a.slice(0,y))}a&&(i.push(a),a="",c=!1);var b=f||o,x=v||w;i.push({name:p||s++,prefix:f,delimiter:b,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==f&&void 0!==m&&m!==f,pattern:x?dt(x):"[^"+ht(b)+"]+?"})}}return(a||r<t.length)&&i.push(a+t.substr(r)),i})(t,n),e,n))(t,e,n),vt=(t,e)=>new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t),wt=(t,e)=>vt(t,e)?t.substr(e.length):t,gt=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,yt=t=>"/"===t.charAt(0)?t:"/"+t,bt=t=>"/"===t.charAt(0)?t.substr(1):t,xt=t=>{const{pathname:e,search:n,hash:i}=t;let s=e||"/";return n&&"?"!==n&&(s+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(s+="#"===i.charAt(0)?i:"#"+i),s},Ct=t=>"/"===t.charAt(0),kt=t=>Math.random().toString(36).substr(2,t),St=(t,e)=>{for(let n=e,i=n+1,s=t.length;i<s;n+=1,i+=1)t[n]=t[i];t.pop()},Ft=(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)=>Ft(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 Ft(n,i);const s=Object.keys(t),r=Object.keys(e);return s.length===r.length&&s.every((n=>Ft(t[n],e[n])))}return!1},Mt=(t,e,n,i)=>{let s;"string"==typeof t?(s=(t=>{let e=t||"/",n="",i="";const s=e.indexOf("#");-1!==s&&(i=e.substr(s),e=e.substr(0,s));const r=e.indexOf("?");return-1!==r&&(n=e.substr(r),e=e.substr(0,r)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==e&&(s.state=e)):(s=Object.assign({pathname:""},t),s.search&&"?"!==s.search.charAt(0)&&(s.search="?"+s.search),s.hash&&"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash),void 0!==e&&void 0===s.state&&(s.state=e));try{s.pathname=decodeURI(s.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var r;return s.key=n,i?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=((t,e="")=>{let n,i=e&&e.split("/")||[],s=0;const r=t&&t.split("/")||[],a=t&&Ct(t),o=e&&Ct(e),u=a||o;if(t&&Ct(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!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?St(i,t):".."===e?(St(i,t),s++):s&&(St(i,t),s--)}if(!u)for(;s--;s)i.unshift("..");!u||""===i[0]||i[0]&&Ct(i[0])||i.unshift("");let c=i.join("/");return n&&"/"!==c.substr(-1)&&(c+="/"),c})(s.pathname,i.pathname)):s.pathname=i.pathname:s.pathname||(s.pathname="/"),s.query=(r=s.search||"")?(/^[?#]/.test(r)?r.slice(1):r).split("&").reduce(((t,e)=>{let[n,i]=e.split("=");return t[n]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},s};let At=0;const _t={},Nt=(t,e={})=>{"string"==typeof e&&(e={path:e});const{path:n="/",exact:i=!1,strict:s=!1}=e,{re:r,keys:a}=((t,e)=>{const n=`${e.end}${e.strict}`,i=_t[n]||(_t[n]={}),s=JSON.stringify(t);if(i[s])return i[s];const r=[],a={re:pt(t,r,e),keys:r};return At<1e4&&(i[s]=a,At+=1),a})(n,{end:i,strict:s}),o=r.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 Et;!function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(Et||(Et={}));const Bt=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=Et.Available}render(){return e("button",{"data-testid":this.testid,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===Et.Pending&&e("sss-loading-indicator",{theme:"primary"===this.variant?"light":"primary",size:16}),e("div",{class:{hidden:this.state===Et.Pending}},e("slot",null)))}async clicked(){if(this.promiseFn&&this.state!==Et.Pending)try{this.state=Et.Pending,await this.promiseFn(),this.state=Et.Available}catch(t){throw this.state=Et.Error,t}}},It=class{constructor(e){t(this,e)}async componentWillLoad(){_.navigateInternally(this.history,A.superCampaignCanNotBeActivated?N.MyOwnFund:N.SuperCampaign)}render(){return e(n,null)}};E(It);const Pt={label:B.MyOwnFund,value:N.MyOwnFund},Lt=class{constructor(e){t(this,e),this.currentCustomFund=Pt,this.showFundOptionsSelection=!1}componentWillLoad(){let t=N.MyOwnFund;window.location.pathname.includes(N.MyOwnFund)&&(t=N.MyOwnFund),window.location.pathname.includes(N.DefaultFund)&&(t=N.DefaultFund),window.location.pathname.includes(N.SelfManagedFund)&&(t=N.SelfManagedFund),window.location.pathname.includes(N.FeaturedFunds)&&(t=N.FeaturedFunds),this.fundOptionsList=[Pt,{label:B.SelfManagedFund,value:N.SelfManagedFund}],A.isFeaturedFundsEnabled&&A.isUsingSuperCampaign&&this.fundOptionsList.push({label:B.FeaturedFunds,value:N.FeaturedFunds}),this.fundOptionsList.push({label:B.DefaultFund,value:N.DefaultFund}),this.currentCustomFund=this.fundOptionsList.find((e=>e.value===t))||this.currentCustomFund,_.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 sm: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 hover:text-white",onClick:()=>{this.showFundOptionsSelection=!this.showFundOptionsSelection,_.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)))}};E(Lt);const jt=new class{async searchFundsAsync(t,e){return I.getAustralianFundsAsync({searchString:t,maxRecordCount:e})}async getFundAsync(t,e){const n=await I.getAustralianFundAsync(t,e);return P.some(n)}},Dt=class{constructor(e){t(this,e),this.defaultFundProductName="Loading fund...",this.eventTrackingService=L.Instance}async componentWillLoad(){const t=A.defaultFundUsi;if(P.isNone(t))return;this.isDefaultFundExists=!0;const e=await jt.getFundAsync(t.value,!0);P.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:A.promotedFunds,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi)})}render(){return e(s,null,e("sss-header-section",null),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:i("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",{testid:"continue-button",fillWidth:!0,promiseFn:()=>this.handleSubmitForm()},"Continue")),e("stencil-route-link",{url:N.ChoicePage},e("sss-button",{testid:"back-button",fillWidth:!0,variant:"secondary"},"Back")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||_.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",fundDetails:{type:"default",fundName:this.defaultFundProductName,fundUsi:this.defaultFund.usi},handleSubmitFn:async t=>{await j.submitDefaultFundChoiceAsync(Object.assign({standardChoiceFormSignature:t},A.promotedFundsConfig))}})}},Tt=class{constructor(n){t(this,n),this.valueChanged=r(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=et(this.inputElement,"keyup").pipe(function(t,e=w){return n=>n.lift(new it(t,e))}(500),l((()=>this.inputElement.value)),y(),b(this.shouldExecuteSearch),at(this.onBeginSearch),Y(this._searchFunction),at(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",{"data-testid":this.testId,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}};Tt.style="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";const Rt=new class{async GetExistingFundAsync(){var t;const e=A.superBuyer.superChoice,n=null===(t=A.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!e)return S;if(!n)return S;const i=null==e.dateSubmitted?S:M(new Date(e.dateSubmitted)),s=O(n),r=U(n);switch(n.kind){case"Promoted":{if(D(s))return S;const t=await this.getFundByUsiAsync(s.value);return M({type:"Promoted Fund",id:T(n.promoted),name:F(t)?t.value.productName:s.value,usi:s,valid:"Active",memberNumber:r,lastNominatedAt:i})}case"MyOwnFund":{const t=n.myOwnFund.usi,e=await this.getFundByUsiAsync(t);return M({type:"My Own Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),memberNumber:r,lastNominatedAt:i})}case"SMSF":return M({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 M({type:"Default Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefault":{const t=n.promotedDefault.usi,e=await this.getFundByUsiAsync(t);return M({type:"Promoted Default Fund",id:n.promotedDefault.fundId,name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"DefinedBenefits":{const t=n.definedBenefits.usi,e=await this.getFundByUsiAsync(t);return M({type:"Defined Benefits Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefaultWithJoin":{const t=n.promotedDefaultWithJoin.usi,e=await this.getFundByUsiAsync(t);return M({type:"Promoted Default Fund With Join",id:n.promotedDefaultWithJoin.fundId,name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),memberNumber:r,lastNominatedAt:i})}default:return S}}async submitRetainSuperFundAsync(t){return R().url("super-choice/retain-super-fund").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}getFundByUsiAsync(t){return jt.getFundAsync(t,!0)}toFundValidState(t){return F(t)?t.value.isActive?"Active":"Inactive":"Unknown"}},Ot=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundNominationDetail=t=>{function e(t){return F(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:F(t.lastNominatedAt)?t.lastNominatedAt.value.toISOString():""}}}componentDidLoad(){const t=this.createSuperFundNominationDetail(this.existingFund);return this.eventTrackingService.TrackSuperFundNominationViewedAsync(t)}async componentWillLoad(){const t=await Rt.GetExistingFundAsync();F(t)&&"Inactive"!==t.value.valid?this.existingFund=t.value:_.navigateInternally(this.history,N.ChoicePage)}render(){const t=()=>e("div",{class:"flex justify-center"}),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"})))),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 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"})))),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 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,{name:this.existingFund.name});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(s,null);case"Defined Benefits Fund":return e(r,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",{testid:"continue-with-this-fund-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",{testid:"choose-another-fund-button",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))),null))))}async handleFundNominationAccepted(){const t=this.createSuperFundNominationDetail(this.existingFund);await Rt.submitRetainSuperFundAsync(t),A.markSuperSelectionAsSubmitted()}async handleFundNominationDeclined(){const t=this.createSuperFundNominationDetail(this.existingFund);await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Ut=class{constructor(e){t(this,e),this.footerText=()=>void 0!==this.textOverride?this.textOverride:"Powered by Flare"}render(){return e("div",{class:{"text-center text-gray-500 text-xs w-full max-w-960 mx-auto":!0,"mt-8 sm:mt-20":!A.hideFooterSection}},!A.hideFooterSection&&e("span",null,this.footerText()),e("p",{class:"block text-transparent"},"v","5.84.52699"))}},qt=(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)),Ht=t=>{let n=N.MyOwnFund;return window.location.href.includes(N.SelfManagedFund)?n=N.SelfManagedFund:window.location.href.includes(N.DefaultFund)?n=N.DefaultFund:window.location.href.includes(N.FeaturedFunds)&&(n=N.FeaturedFunds),e(qt,{route:n,isActive:t.isActive},"Choose another fund")},Vt=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(n,null,e("div",{class:"text-gray-600 sm:text-lg leading-7 sm:leading-8"},e(n,null,A.superCampaignCanNotBeActivated?"You can choose any super fund, including your current fund/SMSF or your employer’s default fund.":"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.")),!A.superCampaignCanNotBeActivated&&e("div",{class:"inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal"},e(qt,{route:N.ChoicePage,isActive:!1},"Featured super funds"),e(Ht,{isActive:!0})))))}},zt=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"})))}},Wt=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))}},$t=class{constructor(e){t(this,e),this.stepContinued=async t=>{"byof-engagement"==t.detail.sender&&(await L.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi,t.detail.reason),this.navigateToStandardChoice())},this.subscribeToStepEvents=()=>{for(const t in this.stepEventHandlers)document.addEventListener(t,this.stepEventHandlers[t])},this.unSubscribeFromStepEvents=()=>{for(const t in this.stepEventHandlers)document.removeEventListener(t,this.stepEventHandlers[t])},this.stepEventHandlers={continue:this.stepContinued.bind(this)}}async componentWillLoad(){A.isBringYourOwnFundCustomStepEnabled&&A.isUsingSuperCampaign&&P.isSome(q.myOwnFundForm.fundUsi)&&P.isSome(q.myOwnFundForm.fundName)&&P.isSome(q.myOwnFundForm.memberNumber)&&P.isSome(q.myOwnFundForm.memberFirstName)&&P.isSome(q.myOwnFundForm.memberFamilyName)&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.fundUsi=q.myOwnFundForm.fundUsi.value,this.fundName=q.myOwnFundForm.fundName.value,this.memberNumber=q.myOwnFundForm.memberNumber.value,this.memberFirstName=q.myOwnFundForm.memberFirstName.value,this.memberFamilyName=q.myOwnFundForm.memberFamilyName.value,this.unSubscribeFromStepEvents(),this.subscribeToStepEvents(),A.hideFooterSection=!0,await L.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi)):_.navigateInternally(this.history,N.MyOwnFund)}disconnectedCallback(){this.unSubscribeFromStepEvents(),A.hideFooterSection=!1}render(){return e(s,null,e("apollo-super-byof-engagement",{"backend-url":this.backendUrl,"access-token":this.accessToken,"fund-usi":this.fundUsi}))}navigateToStandardChoice(){_.navigateInternallyToStandardChoice({history:this.history,fundName:this.fundName,fundDetails:{type:"myOwnFund",fundName:this.fundName,fundUsi:this.fundUsi,memberNumber:this.memberNumber},handleSubmitFn:async t=>{const e=Object.assign({fundUsi:this.fundUsi,memberNumber:this.memberNumber,memberFirstName:this.memberFirstName,memberFamilyName:this.memberFamilyName,standardChoiceFormSignature:t},A.promotedFundsConfig);await j.submitCustomFundChoiceAsync(e)}})}};E($t);const Xt=class{constructor(e){t(this,e),this.myInputChange=r(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]||-[A-Za-z]|| [A-Za-z])*\\s*$"}render(){return e(s,null,e("input",{"data-testid":this.testId,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."}},Jt=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=F(A.state.superChoicePrefill)?A.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):(_.navigateInternally(this.history,N.ChoicePage),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})}},Gt=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",{"data-testid":this.field.testId,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))}},Zt=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 Kt(t){return null==t||""===t.trim()}const Yt=(t,n,i)=>e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},t),e("div",{"data-testid":n,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"},i)),Qt=()=>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 te{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 ee="[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";class ne{constructor(t,e,n){this.name=t,this.testId=e,this._value=null!=n?n:"",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 Kt(this._value)}get errorMessage(){return this._errorMessage}}class ie{constructor(t,e,n,i){this.name=t,this.testId=e,this._value=null!=n?n:"",this._isValid=i}get value(){return this._value}get isValid(){return this._isValid}get isEmpty(){return Kt(this._value)}}class se extends ie{constructor(t,e){super("Fund USI","fund-usi",t,e)}}class re extends ie{constructor(t,e){super("Fund name","fund-name",t,e)}}class ae extends ne{constructor(t){super("Fund name","smsf-fund-name",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Fund name is required.":t.length<2?"Enter a valid Fund name.":null}}class oe extends ne{constructor(t){super("Member number","member-number",t)}validateAndReturnErrorMessage(t){return Kt(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 ue extends ne{constructor(t){super("Member last name","member-last-name",t)}validateAndReturnErrorMessage(t){const e=new RegExp(ee);return Kt(t)?"Member last name is required.":e.test(t)?null:"Member last name contains unsupported characters."}}class ce extends ne{constructor(t){super("Member given name(s)","member-given-names",t)}validateAndReturnErrorMessage(t){const e=new RegExp(ee);return Kt(t)?"Member given name(s) is required.":e.test(t)?null:"Member given name(s) contains unsupported characters."}}class le extends ie{constructor(t,e){super("Fund ABN","fund-abn",t,e)}}class he extends ne{constructor(t){super("Fund ESA","fund-esa",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Fund ESA is required.":t.length<2?"Enter a valid Fund ESA.":null}}class de extends ne{constructor(t){super("Address line 1","address-line-one",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Address line 1 is required.":t.length<2?"Enter a valid Address line 1.":null}}class fe extends ne{constructor(t){super("Address line 2","address-line-two",t)}validateAndReturnErrorMessage(t){return null}}class me extends ne{constructor(t){super("City/suburb","city-suburb",t)}validateAndReturnErrorMessage(t){return Kt(t)?"City/suburb is required.":null}}class pe extends ne{constructor(t){super("Postcode","postcode",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Postcode is required.":/^[0-9]{4}$/.test(t)?null:"Enter a valid postcode."}}class ve extends ne{constructor(t){super("State","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 Kt(t)?"State is required.":void 0===this.options.find((e=>e.value=t))?"Enter a valid state.":null}}class we extends ie{constructor(t,e,n,i,s){super("Fund address","fund-address",[t,e,n,i,s].map((t=>t.value)).filter((t=>t)).join(", "),t.isValid&&e.isValid&&n.isValid&&i.isValid&&s.isValid)}}class ge extends ne{constructor(t){super("Account name","account-name",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Account name is required.":t.length<2?"Enter a valid Account name.":null}}class ye extends ie{constructor(t,e){super("Bank name","bank-name",t,e)}}class be extends ne{constructor(t){super("BSB","bsb",t)}validateAndReturnErrorMessage(t){return Kt(t)?"BSB is required.":/^[0-9]{6,7}$/.test(t)?null:"Enter a valid BSB."}}class xe extends ne{constructor(t){super("Account number","account-number",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Account number is required.":/^[0-9]{2,11}$/.test(t)?null:"Enter a valid Account number."}}const Ce=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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 se(this.prefill.fundDetail.fundUsi,!1),this.fundName=new re("",!1),this.memberNumber=new oe(this.prefill.memberNumber),this.memberGivenNames=new ce(this.prefill.memberFirstName),this.memberLastName=new ue(this.prefill.memberFamilyName)):_.navigateInternally(this.history,N.ChoicePage)}render(){return e("div",null,e(Qt,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",{testid:"choose-another-fund-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),_.navigateInternally(this.history,N.ChoicePage)}},ke=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.PrefillInvalidMyOwnFundPage)}render(){return e("div",null,e(Qt,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",{testid:"make-another-nomination-button",class:"self-stretch",fillWidth:!0,variant:"primary",promiseFn:()=>this.handleFundNominationDeclined()},"Make another nomination"))))}initialiseComponent(t){this.fundName=new ae(t.fundName),this.fundAbn=new le(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new he(t.electronicServiceAddress),this.fundAddressLine1=new de(t.addressLine1),this.fundAddressLine2=new fe(t.addressLine2),this.fundAddressCity=new me(t.addressCity),this.fundAddressPostcode=new pe(t.addressPostcode),this.fundAddressState=new ve(t.addressState),this.fundAddress=new we(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new ce(t.memberFirstName),this.memberLastName=new ue(t.memberFamilyName),this.bankAccountName=new ge(t.bankAccountName),this.bankAccountBsb=new be(t.bankAccountBsb),this.bankAccountNumber=new xe(t.bankAccountNumber)}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Se=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.ChoicePage)}render(){const t=[this.memberNumber.errorMessage,this.memberLastName.errorMessage,this.memberGivenNames.errorMessage].filter((t=>null!==t));return e("div",null,e(Qt,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",{testid:"edit-details-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()},Yt(this.fundName.name,this.fundName.testId,this.fundName.value),Yt(this.fundUsi.name,this.fundUsi.testId,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:te.Input("validated"===this.formState),required:!0,pattern:"[A-Za-z0-9]{4,16}","data-testid":this.memberNumber.testId,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:te.Input("validated"===this.formState),required:!0,pattern:ee,"data-testid":this.memberGivenNames.testId,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:te.Input("validated"===this.formState),required:!0,pattern:ee,"data-testid":this.memberLastName.testId,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",{testid:"continue-button",class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{testid:"choose-another-fund-button",class:"self-stretch",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))))}initialiseComponent(t,e){this.fundUsi=new se(e.fundDetail.fundUsi,!0),this.fundName=new re(t,!0),this.memberNumber=new oe(e.memberNumber),this.memberGivenNames=new ce(e.memberFirstName),this.memberLastName=new ue(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 oe(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new ce(t.trimStart())}updateMemberLastName(t){this.memberLastName=new ue(t.trim())}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&_.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},A.promotedFundsConfig);await j.submitCustomFundChoiceAsync(e)}})}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Fe={"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"},Me=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.PrefillInvalidSMSFPage)}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(Qt,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",{testid:"edit-details-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:te.Input("validated"===this.formState),required:!0,"data-testid":this.fundName.testId,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))),Yt(this.fundAbn.name,this.fundAbn.testId,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:te.Input("validated"===this.formState),required:!0,minlength:"2","data-testid":this.fundEsa.testId,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({},te.Input("validated"===this.formState)),{"rounded-none rounded-t-md shadow-none border-b-0":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1","data-testid":this.fundAddressLine1.testId,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({},te.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),"data-testid":this.fundAddressLine2.testId,value:this.fundAddressLine2.value,onInput:t=>this.updateAddressLine2(t.target.value)}),e("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},te.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),required:!0,"data-testid":this.fundAddressCity.testId,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({},te.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","data-testid":this.fundAddressPostcode.testId,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({},te.Input("validated"===this.formState)),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":"validated"!==this.formState}),name:"state",required:!0,"data-testid":this.fundAddressState.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.memberGivenNames.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.memberLastName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountBsb.testId,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&&Yt(this.bankName.name,this.bankName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountNumber.testId,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",{testid:"continue-button",class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{testid:"make-another-nomination-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 ae(t.trim())}updateFundEsa(t){this.fundEsa=new he(t.trim())}updateAddressLine1(t){this.fundAddressLine1=new de(t.trim())}updateAddressLine2(t){this.fundAddressLine2=new fe(t.trim())}updateAddressCity(t){this.fundAddressCity=new me(t.trim())}updateAddressPostcode(t){this.fundAddressPostcode=new pe(t.trim())}updateAddressState(t){this.fundAddressState=new ve(t.trim())}updateBankAccountName(t){this.bankAccountName=new ge(t.trim())}updateBankAccountBsb(t){this.bankAccountBsb=new be(t.trim())}updateBankAccountNumber(t){this.bankAccountNumber=new xe(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new ce(t)}updateMemberLastName(t){this.memberLastName=new ue(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 Fe[n]||Fe[i]||null}updateBankName(t){const e=this.tryGetBankName(t);this.bankName=new ye(e,null!=e)}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&_.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},A.promotedFundsConfig);await j.submitSelfManagedFundChoiceAsync(e)}})}initialiseComponent(t){this.fundName=new ae(t.fundName),this.fundAbn=new le(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new he(t.electronicServiceAddress),this.fundAddressLine1=new de(t.addressLine1),this.fundAddressLine2=new fe(t.addressLine2),this.fundAddressCity=new me(t.addressCity),this.fundAddressPostcode=new pe(t.addressPostcode),this.fundAddressState=new ve(t.addressState),this.fundAddress=new we(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new ce(t.memberFirstName),this.memberLastName=new ue(t.memberFamilyName),this.bankAccountName=new ge(t.bankAccountName);const e=this.tryGetBankName(t.bankAccountBsb);this.bankName=new ye(e,null!=e),this.bankAccountBsb=new be(t.bankAccountBsb),this.bankAccountNumber=new xe(t.bankAccountNumber),this.isSubmitDisabled=this.formHasMissingData()}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Ae=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))))))))}},_e=class{constructor(e){t(this,e),this.allFormFieldsAreFilled=t=>null!=t.fundName&&null!=t.fundAbn&&null!=t.fundEsa&&null!=t.addressLine1&&null!=t.city&&null!=t.state&&null!=t.postcode&&null!=t.bsb&&null!=t.bankAccountName&&null!=t.bankAccountNumber&&null!=t.memberFirstName&&null!=t.memberFamilyName,this.stepContinued=async t=>{"smsf-engagement"==t.detail.sender&&(await L.Instance.TrackSuperSmsfEngagementStepContinued(t.detail.reason),this.navigateToStandardChoice())},this.subscribeToStepEvents=()=>{for(const t in this.stepEventHandlers)document.addEventListener(t,this.stepEventHandlers[t])},this.unSubscribeFromStepEvents=()=>{for(const t in this.stepEventHandlers)document.removeEventListener(t,this.stepEventHandlers[t])},this.stepEventHandlers={continue:this.stepContinued.bind(this)}}async componentWillLoad(){A.isSmsfCustomStepEnabled&&A.isUsingSuperCampaign&&this.allFormFieldsAreFilled(q.selfManagedFundForm)&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.accountId=A.accountIdOrDefault,this.partnerId=A.partnerIdOrDefault,this.initialiseFormState(q.selfManagedFundForm),this.unSubscribeFromStepEvents(),this.subscribeToStepEvents(),A.hideFooterSection=!0,await L.Instance.TrackSuperSmsfEngagementStepActivationSucceeded()):_.navigateInternally(this.history,N.SelfManagedFund)}disconnectedCallback(){this.unSubscribeFromStepEvents(),A.hideFooterSection=!1}render(){return e(s,null,e("apollo-super-smsf-engagement",{"backend-url":this.backendUrl,"access-token":this.accessToken,"account-id":this.accountId,"partner-id":this.partnerId}))}navigateToStandardChoice(){_.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:this.fundName,fundEsa:this.fundEsa},handleSubmitFn:async t=>{const e=Object.assign({smsfChoice:{abn:this.fundAbn,fundName:this.fundName,fundAddress:{addressLine1:this.fundAddress.addressLine1,addressLine2:this.fundAddress.addressLine2,city:this.fundAddress.city,state:this.fundAddress.state,postcode:this.fundAddress.postcode},bsb:this.bsb,bankAccountName:this.bankAccountName,bankAccountNumber:this.bankAccountNumber,electronicServiceAddress:this.fundEsa,memberFirstName:this.memberFirstName,memberFamilyName:this.memberFamilyName},standardChoiceFormSignature:t},A.promotedFundsConfig);await j.submitSelfManagedFundChoiceAsync(e)}})}initialiseFormState(t){this.fundName=t.fundName,this.fundAbn=t.fundAbn,this.fundEsa=t.fundEsa,this.fundAddress={addressLine1:t.addressLine1,addressLine2:t.addressLine2,city:t.city,state:t.state,postcode:t.postcode},this.bsb=t.bsb,this.bankAccountName=t.bankAccountName,this.bankAccountNumber=t.bankAccountNumber,this.memberFirstName=t.memberFirstName,this.memberFamilyName=t.memberFamilyName}};E(_e);const Ne=class{constructor(e){t(this,e),this.standardChoiceFormSignature="",this.isSubmitDisabled=!0,this.eventTrackingService=L.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"},H.fundName)),e("div",{class:"grid content-center ml-4"},e("sss-button",{testid:"change-fund-button",size:"xs",variant:"secondary",promiseFn:async()=>{await this.trackChangeRequestedAsync(),_.navigateInternally(this.history,N.ChoicePage)}},"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:i("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",{"data-testid":"standard-choice-form-signature-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",{testid:"confirm-and-continue-button",fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Confirm and continue")))))))}renderLogo(){}async trackChangeRequestedAsync(){const t={promotedFundsShown:A.promotedFunds,defaultFundUsiSet:V(A.defaultFundUsi)};switch(H.fundDetails.type){case"default":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({DefaultFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"myOwnFund":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({MyOwnFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"smsf":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({Smsf:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promoted":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promotedDefault":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promotedDefaultWithJoin":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFundWithJoin:Object.assign(Object.assign({},H.fundDetails),t)});break;case"null":throw"standardChoiceFormState.fundDetails was not set"}}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await H.handleSubmitFn(this.standardChoiceFormSignature.trim()),A.markSuperSelectionAsSubmitted())}},Ee=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",{testid:"continue-button",size:"xl",fillWidth:!0,onClick:this.handleContinueButtonClick},e("span",null,"Continue")))))}handleContinueButtonClick(t){A.completeSuperSelectionFlow()}},Be=new class{trackClickPromotedTileAsync(t){return I.clickPromotedTileAsync(t)}},Ie=async({sender:t,placementId:e,fundId:n,fundUsi:i,fundName:s,fundType:r})=>{if("super-campaign"===t||"featured-funds"===t){const t=(()=>{if(null!=A.superCampaignState)return A.superCampaignState;throw new Error("Super campaign state has not been initialized")})().PromotedFundIds,a=P.toUndefined(A.defaultFundUsi);await Promise.all(["promoted-default"===r?await L.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({fundUsi:null!=i?i:"",fundName:s,promotedFundId:n,promotedFundsShown:t,defaultFundUsiSet:a,superCampaignEnabled:!0,placementId:e}):await L.Instance.TrackPromotedSuperFundDetailViewedAsync({fundUsi:null!=i?i:void 0,fundName:s,promotedFundId:n,promotedFundsShown:t,defaultFundUsiSet:a,superCampaignEnabled:!0,placementId:e}),Be.trackClickPromotedTileAsync("promoted-default"===r?{promotedDefault:{fundId:n,placementId:e}}:{promoted:{fundId:n,placementId:e}})])}};function Pe(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function Le(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 je,De,Te=function(t,e){return(Te=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)},Re=Pe()||{};De=function(t,e){function n(){this.constructor=t}Te(t,e),t.prototype=null===e?Le(e):(n.prototype=e.prototype,new n)},(je=Re).__assign||(je.__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}),je.__extends||(je.__extends=De),__assign||(__assign=Re.__assign),__extends||(__extends=Re.__extends);var Oe=Pe;function Ue(t){var e=Oe();return e&&e[t]?e[t]:"window"===t&&qe()?window:null}function qe(){return Boolean("object"==typeof window&&window)}function He(){return qe()?window:Ue("window")}function Ve(){return Boolean("object"==typeof document&&document)}function ze(){return Ve()?document:Ue("document")}function We(){return Boolean("object"==typeof navigator&&navigator)?navigator:Ue("navigator")}function $e(){return"object"==typeof location&&location?location:Ue("location")}function Xe(){return Ue("performance")}function Je(){return Boolean("object"==typeof JSON&&JSON||null!==Ue("JSON"))}function Ge(){return Je()?JSON||Ue("JSON"):null}var Ze=null,Ke=!1,Ye=123456789,Qe=987654321;function tn(t){t<0&&(t>>>=0),Ye=123456789+t&4294967295,Qe=987654321-t&4294967295,Ke=!0}function en(){tn(4294967296*Math.random()^(new Date).getTime())}function nn(t,e){return typeof t===e}function sn(t){return nn(t,"undefined")||void 0===t}function rn(t){return sn(t)||null===t}function an(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function on(t){return nn(t,"object")}function un(t){return nn(t,"function")}function cn(t,e,n,i){void 0===i&&(i=!1);var s=!1;if(!rn(t))try{rn(t.addEventListener)?rn(t.attachEvent)||(t.attachEvent("on"+e,n),s=!0):(t.addEventListener(e,n,i),s=!0)}catch(t){}return s}function ln(t,e,n,i){if(void 0===i&&(i=!1),!rn(t))try{rn(t.removeEventListener)?rn(t.detachEvent)||t.detachEvent("on"+e,n):t.removeEventListener(e,n,i)}catch(t){}}function hn(t,e){if(t&&on(t))for(var n in t)an(t,n)&&e.call(t,n,t[n])}var dn,fn=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 nn(t,"string")},t.isNumber=function(t){return nn(t,"number")},t.isBoolean=function(t){return nn(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(mn,(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,s=0;s<i;s++)s in t&&e.call(n||t,t[s],s,t)},t.arrIndexOf=function(t,e,n){for(var i=t.length,s=n||0,r=Math.max(s>=0?s:i-Math.abs(s),0);r<i;r++)if(r in t&&t[r]===e)return r;return-1},t.arrMap=function(t,e,n){for(var i=t.length,s=n||t,r=new Array(i),a=0;a<i;a++)a in t&&(r[a]=e.call(s,t[a],t));return r},t.arrReduce=function(t,e,n){var i,s=t.length,r=0;if(arguments.length>=3)i=arguments[2];else{for(;r<s&&!(r in t);)r++;i=t[r++]}for(;r<s;)r in t&&(i=e(i,t[r],r,t)),r++;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(!(un(t)||on(t)&&null!==t))throw new TypeError("objKeys called on non-object");var n=[];for(var i in t)an(t,i)&&n.push(i);if(e)for(var s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=s.length,a=0;a<r;a++)an(t,s[a])&&n.push(s[a]);return n},t.objDefineAccessors=function(t,e,n,i){var s=Object.defineProperty;if(s)try{var r={enumerable:!0,configurable:!0};return n&&(r.get=n),i&&(r.set=i),s(t,e,r),!0}catch(t){}return!1},t.addEventHandler=function(t,e){var n=!1,i=He();i&&(n=cn(i,t,e),n=cn(i.body,t,e)||n);var s=ze();return s&&(n=pn.Attach(s,t,e)||n),n},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var e=Xe();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,s="";s.length<e;)i++,s+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n),n>>>=6,5===i&&(n=(t.random32()<<2&4294967295|3&n)>>>0,i=0);return s},t.isIE=function(){if(null===Ze){var t=((We()||{}).userAgent||"").toLowerCase();Ze=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return Ze},t.randomValue=function(e){return e>0?Math.floor(t.random32()/4294967295*(e+1))>>>0:0},t.random32=function(e){var n,i=Ue("crypto")||Ue("msCrypto");return i&&i.getRandomValues?n=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(Ke||en(),n=4294967295&t.mwcRandom32()):n=Math.floor(4294967296*Math.random()|0),e||(n>>>=0),n},t.mwcRandomSeed=function(t){t?tn(t):en()},t.mwcRandom32=function(t){var e=((Qe=36969*(65535&Qe)+(Qe>>16)&4294967295)<<16)+(65535&(Ye=18e3*(65535&Ye)+(Ye>>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="",s=0;s<4;s++)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 r=n[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+r+i.substr(16,3)+i.substr(19,12)},t.isTypeof=nn,t.isUndefined=sn,t.isNullOrUndefined=rn,t.hasOwnProperty=an,t.isFunction=un,t.isObject=on,t.objCreate=Le,t}(),mn=/[xy]/g,pn=function(){function t(){}return t.Attach=cn,t.AttachEvent=cn,t.Detach=ln,t.DetachEvent=ln,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(dn||(dn={}));var vn=Object.getPrototypeOf,wn=0;
1
+ import{r as t,h as e,F as n,g as i,H as s,c as r,s as a,a as o,d as u}from"./p-db0bded8.js";import{f as c,m as l,S as h,a as d,i as f,b as m,O as p,c as v,d as w,g,h as y,j as b,k as x,l as C,Q as k}from"./p-29c11183.js";import{n as S,i as F,s as M,a as A,b as _,S as N,c as E,C as B,d as I,O as P,E as L,e as D,f as j,g as T,h as R,j as O,k as U,l as q,m as H,t as V,o as z,p as W,q as J,r as $,u as X,v as G}from"./p-24d6e2b8.js";import{A as Z}from"./p-fdadb647.js";function K(){}function Y(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(Y(((n,i)=>c(t(n,i)).pipe(l(((t,s)=>e(n,t,i,s))))),n)):("number"==typeof e&&(n=e),e=>e.lift(new Q(t,n)))}class Q{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new tt(t,this.project,this.concurrent))}}class tt extends h{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 d(this),n=this.destination;n.add(e);const i=f(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 et(t,e,n,i){return v(n)&&(i=n,n=void 0),i?et(t,e,n).pipe(l((t=>m(t)?i(...t):i(t)))):new p((i=>{nt(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)}))}function nt(t,e,n,i,s){let r;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,s),r=()=>i.removeEventListener(e,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),r=()=>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),r=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let r=0,a=t.length;r<a;r++)nt(t[r],e,n,i,s)}i.add(r)}class it{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new st(t,this.dueTime,this.scheduler))}}class st extends g{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(rt,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 rt(t){t.debouncedNext()}function at(t,e,n){return function(i){return i.lift(new ot(t,e,n))}}class ot{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new ut(t,this.nextOrObserver,this.error,this.complete))}}class ut extends g{constructor(t,e,n,i){super(t),this._tapNext=K,this._tapError=K,this._tapComplete=K,this._tapError=n||K,this._tapComplete=i||K,v(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||K,this._tapError=e.error||K,this._tapComplete=e.complete||K)}_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()}}class ct{constructor(t){this.factory=t,this._value=S}get value(){if(F(this._value))return this._value.value;const t=this.factory();return this._value=M(t),t}}const lt=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),ht=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),dt=t=>t.replace(/([=!:$/()])/g,"\\$1"),ft=t=>t&&t.sensitive?"":"i",mt=(t,e,n)=>{for(var i=(n=n||{}).strict,s=!1!==n.end,r=ht(n.delimiter||"/"),a=n.delimiters||"./",o=[].concat(n.endsWith||[]).map(ht).concat("$").join("|"),u="",c=!1,l=0;l<t.length;l++){var h=t[l];if("string"==typeof h)u+=ht(h),c=l===t.length-1&&a.indexOf(h[h.length-1])>-1;else{var d=ht(h.prefix||""),f=h.repeat?"(?:"+h.pattern+")(?:"+d+"(?:"+h.pattern+"))*":h.pattern;e&&e.push(h),u+=h.optional?h.partial?d+"("+f+")?":"(?:"+d+"("+f+"))?":d+"("+f+")"}}return s?(i||(u+="(?:"+r+")?"),u+="$"===o?"$":"(?="+o+")"):(i||(u+="(?:"+r+"(?="+o+"))?"),c||(u+="(?="+r+"|"+o+")")),new RegExp("^"+u,ft(n))},pt=(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=[],s=0;s<t.length;s++)i.push(pt(t[s],e,n).source);return new RegExp("(?:"+i.join("|")+")",ft(n))})(t,e,n):((t,e,n)=>mt(((t,e)=>{for(var n,i=[],s=0,r=0,a="",o=e&&e.delimiter||"/",u=e&&e.delimiters||"./",c=!1;null!==(n=lt.exec(t));){var l=n[0],h=n[1],d=n.index;if(a+=t.slice(r,d),r=d+l.length,h)a+=h[1],c=!0;else{var f="",m=t[r],p=n[2],v=n[3],w=n[4],g=n[5];if(!c&&a.length){var y=a.length-1;u.indexOf(a[y])>-1&&(f=a[y],a=a.slice(0,y))}a&&(i.push(a),a="",c=!1);var b=f||o,x=v||w;i.push({name:p||s++,prefix:f,delimiter:b,optional:"?"===g||"*"===g,repeat:"+"===g||"*"===g,partial:""!==f&&void 0!==m&&m!==f,pattern:x?dt(x):"[^"+ht(b)+"]+?"})}}return(a||r<t.length)&&i.push(a+t.substr(r)),i})(t,n),e,n))(t,e,n),vt=(t,e)=>new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t),wt=(t,e)=>vt(t,e)?t.substr(e.length):t,gt=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,yt=t=>"/"===t.charAt(0)?t:"/"+t,bt=t=>"/"===t.charAt(0)?t.substr(1):t,xt=t=>{const{pathname:e,search:n,hash:i}=t;let s=e||"/";return n&&"?"!==n&&(s+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(s+="#"===i.charAt(0)?i:"#"+i),s},Ct=t=>"/"===t.charAt(0),kt=t=>Math.random().toString(36).substr(2,t),St=(t,e)=>{for(let n=e,i=n+1,s=t.length;i<s;n+=1,i+=1)t[n]=t[i];t.pop()},Ft=(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)=>Ft(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 Ft(n,i);const s=Object.keys(t),r=Object.keys(e);return s.length===r.length&&s.every((n=>Ft(t[n],e[n])))}return!1},Mt=(t,e,n,i)=>{let s;"string"==typeof t?(s=(t=>{let e=t||"/",n="",i="";const s=e.indexOf("#");-1!==s&&(i=e.substr(s),e=e.substr(0,s));const r=e.indexOf("?");return-1!==r&&(n=e.substr(r),e=e.substr(0,r)),{pathname:e,search:"?"===n?"":n,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==e&&(s.state=e)):(s=Object.assign({pathname:""},t),s.search&&"?"!==s.search.charAt(0)&&(s.search="?"+s.search),s.hash&&"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash),void 0!==e&&void 0===s.state&&(s.state=e));try{s.pathname=decodeURI(s.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var r;return s.key=n,i?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=((t,e="")=>{let n,i=e&&e.split("/")||[],s=0;const r=t&&t.split("/")||[],a=t&&Ct(t),o=e&&Ct(e),u=a||o;if(t&&Ct(t)?i=r:r.length&&(i.pop(),i=i.concat(r)),!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?St(i,t):".."===e?(St(i,t),s++):s&&(St(i,t),s--)}if(!u)for(;s--;s)i.unshift("..");!u||""===i[0]||i[0]&&Ct(i[0])||i.unshift("");let c=i.join("/");return n&&"/"!==c.substr(-1)&&(c+="/"),c})(s.pathname,i.pathname)):s.pathname=i.pathname:s.pathname||(s.pathname="/"),s.query=(r=s.search||"")?(/^[?#]/.test(r)?r.slice(1):r).split("&").reduce(((t,e)=>{let[n,i]=e.split("=");return t[n]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},s};let At=0;const _t={},Nt=(t,e={})=>{"string"==typeof e&&(e={path:e});const{path:n="/",exact:i=!1,strict:s=!1}=e,{re:r,keys:a}=((t,e)=>{const n=`${e.end}${e.strict}`,i=_t[n]||(_t[n]={}),s=JSON.stringify(t);if(i[s])return i[s];const r=[],a={re:pt(t,r,e),keys:r};return At<1e4&&(i[s]=a,At+=1),a})(n,{end:i,strict:s}),o=r.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 Et;!function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(Et||(Et={}));const Bt=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=Et.Available}render(){return e("button",{"data-testid":this.testid,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===Et.Pending&&e("sss-loading-indicator",{theme:"primary"===this.variant?"light":"primary",size:16}),e("div",{class:{hidden:this.state===Et.Pending}},e("slot",null)))}async clicked(){if(this.promiseFn&&this.state!==Et.Pending)try{this.state=Et.Pending,await this.promiseFn(),this.state=Et.Available}catch(t){throw this.state=Et.Error,t}}},It=class{constructor(e){t(this,e)}async componentWillLoad(){_.navigateInternally(this.history,A.superCampaignCanNotBeActivated?N.MyOwnFund:N.SuperCampaign)}render(){return e(n,null)}};E(It);const Pt={label:B.MyOwnFund,value:N.MyOwnFund},Lt=class{constructor(e){t(this,e),this.currentCustomFund=Pt,this.showFundOptionsSelection=!1}componentWillLoad(){let t=N.MyOwnFund;window.location.pathname.includes(N.MyOwnFund)&&(t=N.MyOwnFund),window.location.pathname.includes(N.DefaultFund)&&(t=N.DefaultFund),window.location.pathname.includes(N.SelfManagedFund)&&(t=N.SelfManagedFund),window.location.pathname.includes(N.FeaturedFunds)&&(t=N.FeaturedFunds),this.fundOptionsList=[Pt,{label:B.SelfManagedFund,value:N.SelfManagedFund}],A.isFeaturedFundsEnabled&&A.isUsingSuperCampaign&&this.fundOptionsList.push({label:B.FeaturedFunds,value:N.FeaturedFunds}),this.fundOptionsList.push({label:B.DefaultFund,value:N.DefaultFund}),this.currentCustomFund=this.fundOptionsList.find((e=>e.value===t))||this.currentCustomFund,_.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 sm: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 hover:text-white",onClick:()=>{this.showFundOptionsSelection=!this.showFundOptionsSelection,_.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)))}};E(Lt);const Dt=new class{async searchFundsAsync(t,e){return I.getAustralianFundsAsync({searchString:t,maxRecordCount:e})}async getFundAsync(t,e){const n=await I.getAustralianFundAsync(t,e);return P.some(n)}},jt=class{constructor(e){t(this,e),this.defaultFundProductName="Loading fund...",this.eventTrackingService=L.Instance}async componentWillLoad(){const t=A.defaultFundUsi;if(P.isNone(t))return;this.isDefaultFundExists=!0;const e=await Dt.getFundAsync(t.value,!0);P.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:A.promotedFunds,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi)})}render(){return e(s,null,e("sss-header-section",null),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:i("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",{testid:"continue-button",fillWidth:!0,promiseFn:()=>this.handleSubmitForm()},"Continue")),e("stencil-route-link",{url:N.ChoicePage},e("sss-button",{testid:"back-button",fillWidth:!0,variant:"secondary"},"Back")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||_.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",fundDetails:{type:"default",fundName:this.defaultFundProductName,fundUsi:this.defaultFund.usi},handleSubmitFn:async t=>{await D.submitDefaultFundChoiceAsync(Object.assign({standardChoiceFormSignature:t},A.promotedFundsConfig))}})}},Tt=class{constructor(n){t(this,n),this.valueChanged=r(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=et(this.inputElement,"keyup").pipe(function(t,e=w){return n=>n.lift(new it(t,e))}(500),l((()=>this.inputElement.value)),y(),b(this.shouldExecuteSearch),at(this.onBeginSearch),Y(this._searchFunction),at(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",{"data-testid":this.testId,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}};Tt.style="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";const Rt=new class{async GetExistingFundAsync(){var t;const e=A.superBuyer.superChoice,n=null===(t=A.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!e)return S;if(!n)return S;const i=null==e.dateSubmitted?S:M(new Date(e.dateSubmitted)),s=O(n),r=U(n);switch(n.kind){case"Promoted":{if(j(s))return S;const t=await this.getFundByUsiAsync(s.value);return M({type:"Promoted Fund",id:T(n.promoted),name:F(t)?t.value.productName:s.value,usi:s,valid:"Active",memberNumber:r,lastNominatedAt:i})}case"MyOwnFund":{const t=n.myOwnFund.usi,e=await this.getFundByUsiAsync(t);return M({type:"My Own Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),memberNumber:r,lastNominatedAt:i})}case"SMSF":return M({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 M({type:"Default Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefault":{const t=n.promotedDefault.usi,e=await this.getFundByUsiAsync(t);return M({type:"Promoted Default Fund",id:n.promotedDefault.fundId,name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"DefinedBenefits":{const t=n.definedBenefits.usi,e=await this.getFundByUsiAsync(t);return M({type:"Defined Benefits Fund",name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),lastNominatedAt:i})}case"PromotedDefaultWithJoin":{const t=n.promotedDefaultWithJoin.usi,e=await this.getFundByUsiAsync(t);return M({type:"Promoted Default Fund With Join",id:n.promotedDefaultWithJoin.fundId,name:F(e)?e.value.productName:t,usi:s,valid:this.toFundValidState(e),memberNumber:r,lastNominatedAt:i})}default:return S}}async submitRetainSuperFundAsync(t){return R().url("super-choice/retain-super-fund").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}getFundByUsiAsync(t){return Dt.getFundAsync(t,!0)}toFundValidState(t){return F(t)?t.value.isActive?"Active":"Inactive":"Unknown"}},Ot=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundNominationDetail=t=>{function e(t){return F(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:F(t.lastNominatedAt)?t.lastNominatedAt.value.toISOString():""}}}componentDidLoad(){const t=this.createSuperFundNominationDetail(this.existingFund);return this.eventTrackingService.TrackSuperFundNominationViewedAsync(t)}async componentWillLoad(){const t=await Rt.GetExistingFundAsync();F(t)&&"Inactive"!==t.value.valid?this.existingFund=t.value:_.navigateInternally(this.history,N.ChoicePage)}render(){const t=()=>e("div",{class:"flex justify-center"}),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"})))),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 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"})))),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 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,{name:this.existingFund.name});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(s,null);case"Defined Benefits Fund":return e(r,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",{testid:"continue-with-this-fund-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",{testid:"choose-another-fund-button",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))),null))))}async handleFundNominationAccepted(){const t=this.createSuperFundNominationDetail(this.existingFund);await Rt.submitRetainSuperFundAsync(t),A.markSuperSelectionAsSubmitted()}async handleFundNominationDeclined(){const t=this.createSuperFundNominationDetail(this.existingFund);await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Ut=class{constructor(e){t(this,e),this.footerText=()=>void 0!==this.textOverride?this.textOverride:"Powered by Flare"}render(){return e("div",{class:{"text-center text-gray-500 text-xs w-full max-w-960 mx-auto":!0,"mt-8 sm:mt-20":!A.hideFooterSection}},!A.hideFooterSection&&e("span",null,this.footerText()),e("p",{class:"block text-transparent"},"v","5.86.53344"))}},qt=(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)),Ht=t=>{let n=N.MyOwnFund;return window.location.href.includes(N.SelfManagedFund)?n=N.SelfManagedFund:window.location.href.includes(N.DefaultFund)?n=N.DefaultFund:window.location.href.includes(N.FeaturedFunds)&&(n=N.FeaturedFunds),e(qt,{route:n,isActive:t.isActive},"Choose another fund")},Vt=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(n,null,e("div",{class:"text-gray-600 sm:text-lg leading-7 sm:leading-8"},e(n,null,A.superCampaignCanNotBeActivated?"You can choose any super fund, including your current fund/SMSF or your employer’s default fund.":"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.")),!A.superCampaignCanNotBeActivated&&e("div",{class:"inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal"},e(qt,{route:N.ChoicePage,isActive:!1},"Featured super funds"),e(Ht,{isActive:!0})))))}},zt=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"})))}},Wt=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))}},Jt=class{constructor(e){t(this,e),this.stepContinued=async t=>{"byof-engagement"==t.detail.sender&&(await L.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi,t.detail.reason),this.navigateToStandardChoice())},this.subscribeToStepEvents=()=>{for(const t in this.stepEventHandlers)document.addEventListener(t,this.stepEventHandlers[t])},this.unSubscribeFromStepEvents=()=>{for(const t in this.stepEventHandlers)document.removeEventListener(t,this.stepEventHandlers[t])},this.stepEventHandlers={continue:this.stepContinued.bind(this)}}async componentWillLoad(){A.isBringYourOwnFundCustomStepEnabled&&A.isUsingSuperCampaign&&P.isSome(q.myOwnFundForm.fundUsi)&&P.isSome(q.myOwnFundForm.fundName)&&P.isSome(q.myOwnFundForm.memberNumber)&&P.isSome(q.myOwnFundForm.memberFirstName)&&P.isSome(q.myOwnFundForm.memberFamilyName)&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.fundUsi=q.myOwnFundForm.fundUsi.value,this.fundName=q.myOwnFundForm.fundName.value,this.memberNumber=q.myOwnFundForm.memberNumber.value,this.memberFirstName=q.myOwnFundForm.memberFirstName.value,this.memberFamilyName=q.myOwnFundForm.memberFamilyName.value,this.unSubscribeFromStepEvents(),this.subscribeToStepEvents(),A.hideFooterSection=!0,await L.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi)):_.navigateInternally(this.history,N.MyOwnFund)}disconnectedCallback(){this.unSubscribeFromStepEvents(),A.hideFooterSection=!1}render(){return e(s,null,e("apollo-super-byof-engagement",{"backend-url":this.backendUrl,"access-token":this.accessToken,"fund-usi":this.fundUsi}))}navigateToStandardChoice(){_.navigateInternallyToStandardChoice({history:this.history,fundName:this.fundName,fundDetails:{type:"myOwnFund",fundName:this.fundName,fundUsi:this.fundUsi,memberNumber:this.memberNumber},handleSubmitFn:async t=>{const e=Object.assign({fundUsi:this.fundUsi,memberNumber:this.memberNumber,memberFirstName:this.memberFirstName,memberFamilyName:this.memberFamilyName,standardChoiceFormSignature:t},A.promotedFundsConfig);await D.submitCustomFundChoiceAsync(e)}})}};E(Jt);const $t=class{constructor(e){t(this,e),this.myInputChange=r(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]||-[A-Za-z]|| [A-Za-z])*\\s*$"}render(){return e(s,null,e("input",{"data-testid":this.testId,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."}},Xt=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=F(A.state.superChoicePrefill)?A.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):(_.navigateInternally(this.history,N.ChoicePage),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})}},Gt=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",{"data-testid":this.field.testId,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))}},Zt=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 Kt(t){return null==t||""===t.trim()}const Yt=(t,n,i)=>e("div",{class:"mt-3"},e("label",{class:"text-sm font-medium text-gray-700"},t),e("div",{"data-testid":n,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"},i)),Qt=()=>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 te{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 ee="[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";class ne{constructor(t,e,n){this.name=t,this.testId=e,this._value=null!=n?n:"",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 Kt(this._value)}get errorMessage(){return this._errorMessage}}class ie{constructor(t,e,n,i){this.name=t,this.testId=e,this._value=null!=n?n:"",this._isValid=i}get value(){return this._value}get isValid(){return this._isValid}get isEmpty(){return Kt(this._value)}}class se extends ie{constructor(t,e){super("Fund USI","fund-usi",t,e)}}class re extends ie{constructor(t,e){super("Fund name","fund-name",t,e)}}class ae extends ne{constructor(t){super("Fund name","smsf-fund-name",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Fund name is required.":t.length<2?"Enter a valid Fund name.":null}}class oe extends ne{constructor(t){super("Member number","member-number",t)}validateAndReturnErrorMessage(t){return Kt(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 ue extends ne{constructor(t){super("Member last name","member-last-name",t)}validateAndReturnErrorMessage(t){const e=new RegExp(ee);return Kt(t)?"Member last name is required.":e.test(t)?null:"Member last name contains unsupported characters."}}class ce extends ne{constructor(t){super("Member given name(s)","member-given-names",t)}validateAndReturnErrorMessage(t){const e=new RegExp(ee);return Kt(t)?"Member given name(s) is required.":e.test(t)?null:"Member given name(s) contains unsupported characters."}}class le extends ie{constructor(t,e){super("Fund ABN","fund-abn",t,e)}}class he extends ne{constructor(t){super("Fund ESA","fund-esa",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Fund ESA is required.":t.length<2?"Enter a valid Fund ESA.":null}}class de extends ne{constructor(t){super("Address line 1","address-line-one",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Address line 1 is required.":t.length<2?"Enter a valid Address line 1.":null}}class fe extends ne{constructor(t){super("Address line 2","address-line-two",t)}validateAndReturnErrorMessage(t){return null}}class me extends ne{constructor(t){super("City/suburb","city-suburb",t)}validateAndReturnErrorMessage(t){return Kt(t)?"City/suburb is required.":null}}class pe extends ne{constructor(t){super("Postcode","postcode",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Postcode is required.":/^[0-9]{4}$/.test(t)?null:"Enter a valid postcode."}}class ve extends ne{constructor(t){super("State","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 Kt(t)?"State is required.":void 0===this.options.find((e=>e.value=t))?"Enter a valid state.":null}}class we extends ie{constructor(t,e,n,i,s){super("Fund address","fund-address",[t,e,n,i,s].map((t=>t.value)).filter((t=>t)).join(", "),t.isValid&&e.isValid&&n.isValid&&i.isValid&&s.isValid)}}class ge extends ne{constructor(t){super("Account name","account-name",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Account name is required.":t.length<2?"Enter a valid Account name.":null}}class ye extends ie{constructor(t,e){super("Bank name","bank-name",t,e)}}class be extends ne{constructor(t){super("BSB","bsb",t)}validateAndReturnErrorMessage(t){return Kt(t)?"BSB is required.":/^[0-9]{6,7}$/.test(t)?null:"Enter a valid BSB."}}class xe extends ne{constructor(t){super("Account number","account-number",t)}validateAndReturnErrorMessage(t){return Kt(t)?"Account number is required.":/^[0-9]{2,11}$/.test(t)?null:"Enter a valid Account number."}}const Ce=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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 se(this.prefill.fundDetail.fundUsi,!1),this.fundName=new re("",!1),this.memberNumber=new oe(this.prefill.memberNumber),this.memberGivenNames=new ce(this.prefill.memberFirstName),this.memberLastName=new ue(this.prefill.memberFamilyName)):_.navigateInternally(this.history,N.ChoicePage)}render(){return e("div",null,e(Qt,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",{testid:"choose-another-fund-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),_.navigateInternally(this.history,N.ChoicePage)}},ke=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.PrefillInvalidMyOwnFundPage)}render(){return e("div",null,e(Qt,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",{testid:"make-another-nomination-button",class:"self-stretch",fillWidth:!0,variant:"primary",promiseFn:()=>this.handleFundNominationDeclined()},"Make another nomination"))))}initialiseComponent(t){this.fundName=new ae(t.fundName),this.fundAbn=new le(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new he(t.electronicServiceAddress),this.fundAddressLine1=new de(t.addressLine1),this.fundAddressLine2=new fe(t.addressLine2),this.fundAddressCity=new me(t.addressCity),this.fundAddressPostcode=new pe(t.addressPostcode),this.fundAddressState=new ve(t.addressState),this.fundAddress=new we(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new ce(t.memberFirstName),this.memberLastName=new ue(t.memberFamilyName),this.bankAccountName=new ge(t.bankAccountName),this.bankAccountBsb=new be(t.bankAccountBsb),this.bankAccountNumber=new xe(t.bankAccountNumber)}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Se=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"My Own Fund",isUsiValid:"Valid"===t.fundDetail.type,isMemberNumberPresent:!Kt(t.memberNumber),isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.ChoicePage)}render(){const t=[this.memberNumber.errorMessage,this.memberLastName.errorMessage,this.memberGivenNames.errorMessage].filter((t=>null!==t));return e("div",null,e(Qt,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",{testid:"edit-details-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()},Yt(this.fundName.name,this.fundName.testId,this.fundName.value),Yt(this.fundUsi.name,this.fundUsi.testId,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:te.Input("validated"===this.formState),required:!0,pattern:"[A-Za-z0-9]{4,16}","data-testid":this.memberNumber.testId,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:te.Input("validated"===this.formState),required:!0,pattern:ee,"data-testid":this.memberGivenNames.testId,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:te.Input("validated"===this.formState),required:!0,pattern:ee,"data-testid":this.memberLastName.testId,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",{testid:"continue-button",class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{testid:"choose-another-fund-button",class:"self-stretch",fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund"))))}initialiseComponent(t,e){this.fundUsi=new se(e.fundDetail.fundUsi,!0),this.fundName=new re(t,!0),this.memberNumber=new oe(e.memberNumber),this.memberGivenNames=new ce(e.memberFirstName),this.memberLastName=new ue(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 oe(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new ce(t.trimStart())}updateMemberLastName(t){this.memberLastName=new ue(t.trim())}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&_.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},A.promotedFundsConfig);await D.submitCustomFundChoiceAsync(e)}})}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Fe={"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"},Me=class{constructor(e){t(this,e),this.mode="review",this.formState="pristine",this.isSubmitDisabled=!0,this.eventTrackingService=L.Instance,this.createSuperFundPrefillDeclinedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(t.memberFamilyName)}),this.createSuperFundPrefillViewedDetail=t=>({fundType:"SMSF",isAbnValid:t.fundAbn.valid,isMemberFirstNamePresent:!Kt(t.memberFirstName),isMemberLastNamePresent:!Kt(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):_.navigateInternally(this.history,N.PrefillInvalidSMSFPage)}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(Qt,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",{testid:"edit-details-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:te.Input("validated"===this.formState),required:!0,"data-testid":this.fundName.testId,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))),Yt(this.fundAbn.name,this.fundAbn.testId,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:te.Input("validated"===this.formState),required:!0,minlength:"2","data-testid":this.fundEsa.testId,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({},te.Input("validated"===this.formState)),{"rounded-none rounded-t-md shadow-none border-b-0":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1","data-testid":this.fundAddressLine1.testId,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({},te.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),"data-testid":this.fundAddressLine2.testId,value:this.fundAddressLine2.value,onInput:t=>this.updateAddressLine2(t.target.value)}),e("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},te.Input("validated"===this.formState)),{"rounded-none shadow-none border-b-0":!0}),required:!0,"data-testid":this.fundAddressCity.testId,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({},te.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","data-testid":this.fundAddressPostcode.testId,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({},te.Input("validated"===this.formState)),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":"validated"!==this.formState}),name:"state",required:!0,"data-testid":this.fundAddressState.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.memberGivenNames.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.memberLastName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountBsb.testId,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&&Yt(this.bankName.name,this.bankName.testId,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:te.Input("validated"===this.formState),required:!0,"data-testid":this.bankAccountNumber.testId,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",{testid:"continue-button",class:"self-stretch",fillWidth:!0,variant:"primary",disabled:this.isSubmitDisabled,promiseFn:()=>this.handleSubmitForm()},"Continue"),e("sss-button",{testid:"make-another-nomination-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 ae(t.trim())}updateFundEsa(t){this.fundEsa=new he(t.trim())}updateAddressLine1(t){this.fundAddressLine1=new de(t.trim())}updateAddressLine2(t){this.fundAddressLine2=new fe(t.trim())}updateAddressCity(t){this.fundAddressCity=new me(t.trim())}updateAddressPostcode(t){this.fundAddressPostcode=new pe(t.trim())}updateAddressState(t){this.fundAddressState=new ve(t.trim())}updateBankAccountName(t){this.bankAccountName=new ge(t.trim())}updateBankAccountBsb(t){this.bankAccountBsb=new be(t.trim())}updateBankAccountNumber(t){this.bankAccountNumber=new xe(t.trim())}updateMemberGivenNames(t){this.memberGivenNames=new ce(t)}updateMemberLastName(t){this.memberLastName=new ue(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 Fe[n]||Fe[i]||null}updateBankName(t){const e=this.tryGetBankName(t);this.bankName=new ye(e,null!=e)}async handleSubmitForm(){this.formState="validated",this.isFormValid()&&("edit"!==this.mode||this.formElement.checkValidity())&&_.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},A.promotedFundsConfig);await D.submitSelfManagedFundChoiceAsync(e)}})}initialiseComponent(t){this.fundName=new ae(t.fundName),this.fundAbn=new le(t.fundAbn.value,t.fundAbn.valid),this.fundEsa=new he(t.electronicServiceAddress),this.fundAddressLine1=new de(t.addressLine1),this.fundAddressLine2=new fe(t.addressLine2),this.fundAddressCity=new me(t.addressCity),this.fundAddressPostcode=new pe(t.addressPostcode),this.fundAddressState=new ve(t.addressState),this.fundAddress=new we(this.fundAddressLine1,this.fundAddressLine2,this.fundAddressCity,this.fundAddressState,this.fundAddressPostcode),this.memberGivenNames=new ce(t.memberFirstName),this.memberLastName=new ue(t.memberFamilyName),this.bankAccountName=new ge(t.bankAccountName);const e=this.tryGetBankName(t.bankAccountBsb);this.bankName=new ye(e,null!=e),this.bankAccountBsb=new be(t.bankAccountBsb),this.bankAccountNumber=new xe(t.bankAccountNumber),this.isSubmitDisabled=this.formHasMissingData()}async handleFundNominationDeclined(){const t=this.createSuperFundPrefillDeclinedDetail(this.prefill);return await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(t),_.navigateInternally(this.history,N.ChoicePage)}},Ae=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))))))))}},_e=class{constructor(e){t(this,e),this.allFormFieldsAreFilled=t=>null!=t.fundName&&null!=t.fundAbn&&null!=t.fundEsa&&null!=t.addressLine1&&null!=t.city&&null!=t.state&&null!=t.postcode&&null!=t.bsb&&null!=t.bankAccountName&&null!=t.bankAccountNumber&&null!=t.memberFirstName&&null!=t.memberFamilyName,this.stepContinued=async t=>{"smsf-engagement"==t.detail.sender&&(await L.Instance.TrackSuperSmsfEngagementStepContinued(t.detail.reason),this.navigateToStandardChoice())},this.subscribeToStepEvents=()=>{for(const t in this.stepEventHandlers)document.addEventListener(t,this.stepEventHandlers[t])},this.unSubscribeFromStepEvents=()=>{for(const t in this.stepEventHandlers)document.removeEventListener(t,this.stepEventHandlers[t])},this.stepEventHandlers={continue:this.stepContinued.bind(this)}}async componentWillLoad(){A.isSmsfCustomStepEnabled&&A.isUsingSuperCampaign&&this.allFormFieldsAreFilled(q.selfManagedFundForm)&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.accountId=A.accountIdOrDefault,this.partnerId=A.partnerIdOrDefault,this.initialiseFormState(q.selfManagedFundForm),this.unSubscribeFromStepEvents(),this.subscribeToStepEvents(),A.hideFooterSection=!0,await L.Instance.TrackSuperSmsfEngagementStepActivationSucceeded()):_.navigateInternally(this.history,N.SelfManagedFund)}disconnectedCallback(){this.unSubscribeFromStepEvents(),A.hideFooterSection=!1}render(){return e(s,null,e("apollo-super-smsf-engagement",{"backend-url":this.backendUrl,"access-token":this.accessToken,"account-id":this.accountId,"partner-id":this.partnerId}))}navigateToStandardChoice(){_.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:this.fundName,fundEsa:this.fundEsa},handleSubmitFn:async t=>{const e=Object.assign({smsfChoice:{abn:this.fundAbn,fundName:this.fundName,fundAddress:{addressLine1:this.fundAddress.addressLine1,addressLine2:this.fundAddress.addressLine2,city:this.fundAddress.city,state:this.fundAddress.state,postcode:this.fundAddress.postcode},bsb:this.bsb,bankAccountName:this.bankAccountName,bankAccountNumber:this.bankAccountNumber,electronicServiceAddress:this.fundEsa,memberFirstName:this.memberFirstName,memberFamilyName:this.memberFamilyName},standardChoiceFormSignature:t},A.promotedFundsConfig);await D.submitSelfManagedFundChoiceAsync(e)}})}initialiseFormState(t){this.fundName=t.fundName,this.fundAbn=t.fundAbn,this.fundEsa=t.fundEsa,this.fundAddress={addressLine1:t.addressLine1,addressLine2:t.addressLine2,city:t.city,state:t.state,postcode:t.postcode},this.bsb=t.bsb,this.bankAccountName=t.bankAccountName,this.bankAccountNumber=t.bankAccountNumber,this.memberFirstName=t.memberFirstName,this.memberFamilyName=t.memberFamilyName}};E(_e);const Ne=class{constructor(e){t(this,e),this.standardChoiceFormSignature="",this.isSubmitDisabled=!0,this.eventTrackingService=L.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"},H.fundName)),e("div",{class:"grid content-center ml-4"},e("sss-button",{testid:"change-fund-button",size:"xs",variant:"secondary",promiseFn:async()=>{await this.trackChangeRequestedAsync(),_.navigateInternally(this.history,N.ChoicePage)}},"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:i("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",{"data-testid":"standard-choice-form-signature-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",{testid:"confirm-and-continue-button",fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Confirm and continue")))))))}renderLogo(){}async trackChangeRequestedAsync(){const t={promotedFundsShown:A.promotedFunds,defaultFundUsiSet:V(A.defaultFundUsi)};switch(H.fundDetails.type){case"default":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({DefaultFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"myOwnFund":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({MyOwnFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"smsf":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({Smsf:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promoted":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promotedDefault":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFund:Object.assign(Object.assign({},H.fundDetails),t)});break;case"promotedDefaultWithJoin":await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({PromotedDefaultFundWithJoin:Object.assign(Object.assign({},H.fundDetails),t)});break;case"null":throw"standardChoiceFormState.fundDetails was not set"}}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await H.handleSubmitFn(this.standardChoiceFormSignature.trim()),A.markSuperSelectionAsSubmitted())}},Ee=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",{testid:"continue-button",size:"xl",fillWidth:!0,onClick:this.handleContinueButtonClick},e("span",null,"Continue")))))}handleContinueButtonClick(t){A.completeSuperSelectionFlow()}},Be=new class{trackClickPromotedTileAsync(t){return I.clickPromotedTileAsync(t)}},Ie=async({sender:t,placementId:e,fundId:n,fundUsi:i,fundName:s,fundType:r,sourceOfJoin:a,isDefaultExclusive:o})=>{if("super-campaign"===t||"featured-funds"===t){const t=(()=>{if(null!=A.superCampaignState)return A.superCampaignState;throw new Error("Super campaign state has not been initialized")})().PromotedFundIds,u=P.toUndefined(A.defaultFundUsi);await Promise.all(["promoted-default"===r?await L.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({fundUsi:null!=i?i:"",fundName:s,promotedFundId:n,promotedFundsShown:t,defaultFundUsiSet:u,superCampaignEnabled:!0,placementId:e,sourceOfJoin:a,isDefaultExclusive:o}):await L.Instance.TrackPromotedSuperFundDetailViewedAsync({fundUsi:null!=i?i:void 0,fundName:s,promotedFundId:n,promotedFundsShown:t,defaultFundUsiSet:u,superCampaignEnabled:!0,placementId:e,sourceOfJoin:a,isDefaultExclusive:o}),Be.trackClickPromotedTileAsync("promoted-default"===r?{promotedDefault:{fundId:n,placementId:e}}:{promoted:{fundId:n,placementId:e}})])}};function Pe(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function Le(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 De,je,Te=function(t,e){return(Te=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)},Re=Pe()||{};je=function(t,e){function n(){this.constructor=t}Te(t,e),t.prototype=null===e?Le(e):(n.prototype=e.prototype,new n)},(De=Re).__assign||(De.__assign=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}),De.__extends||(De.__extends=je),__assign||(__assign=Re.__assign),__extends||(__extends=Re.__extends);var Oe=Pe;function Ue(t){var e=Oe();return e&&e[t]?e[t]:"window"===t&&qe()?window:null}function qe(){return Boolean("object"==typeof window&&window)}function He(){return qe()?window:Ue("window")}function Ve(){return Boolean("object"==typeof document&&document)}function ze(){return Ve()?document:Ue("document")}function We(){return Boolean("object"==typeof navigator&&navigator)?navigator:Ue("navigator")}function Je(){return"object"==typeof location&&location?location:Ue("location")}function $e(){return Ue("performance")}function Xe(){return Boolean("object"==typeof JSON&&JSON||null!==Ue("JSON"))}function Ge(){return Xe()?JSON||Ue("JSON"):null}var Ze=null,Ke=!1,Ye=123456789,Qe=987654321;function tn(t){t<0&&(t>>>=0),Ye=123456789+t&4294967295,Qe=987654321-t&4294967295,Ke=!0}function en(){tn(4294967296*Math.random()^(new Date).getTime())}function nn(t,e){return typeof t===e}function sn(t){return nn(t,"undefined")||void 0===t}function rn(t){return sn(t)||null===t}function an(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function on(t){return nn(t,"object")}function un(t){return nn(t,"function")}function cn(t,e,n,i){void 0===i&&(i=!1);var s=!1;if(!rn(t))try{rn(t.addEventListener)?rn(t.attachEvent)||(t.attachEvent("on"+e,n),s=!0):(t.addEventListener(e,n,i),s=!0)}catch(t){}return s}function ln(t,e,n,i){if(void 0===i&&(i=!1),!rn(t))try{rn(t.removeEventListener)?rn(t.detachEvent)||t.detachEvent("on"+e,n):t.removeEventListener(e,n,i)}catch(t){}}function hn(t,e){if(t&&on(t))for(var n in t)an(t,n)&&e.call(t,n,t[n])}var dn,fn=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 nn(t,"string")},t.isNumber=function(t){return nn(t,"number")},t.isBoolean=function(t){return nn(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(mn,(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,s=0;s<i;s++)s in t&&e.call(n||t,t[s],s,t)},t.arrIndexOf=function(t,e,n){for(var i=t.length,s=n||0,r=Math.max(s>=0?s:i-Math.abs(s),0);r<i;r++)if(r in t&&t[r]===e)return r;return-1},t.arrMap=function(t,e,n){for(var i=t.length,s=n||t,r=new Array(i),a=0;a<i;a++)a in t&&(r[a]=e.call(s,t[a],t));return r},t.arrReduce=function(t,e,n){var i,s=t.length,r=0;if(arguments.length>=3)i=arguments[2];else{for(;r<s&&!(r in t);)r++;i=t[r++]}for(;r<s;)r in t&&(i=e(i,t[r],r,t)),r++;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(!(un(t)||on(t)&&null!==t))throw new TypeError("objKeys called on non-object");var n=[];for(var i in t)an(t,i)&&n.push(i);if(e)for(var s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=s.length,a=0;a<r;a++)an(t,s[a])&&n.push(s[a]);return n},t.objDefineAccessors=function(t,e,n,i){var s=Object.defineProperty;if(s)try{var r={enumerable:!0,configurable:!0};return n&&(r.get=n),i&&(r.set=i),s(t,e,r),!0}catch(t){}return!1},t.addEventHandler=function(t,e){var n=!1,i=He();i&&(n=cn(i,t,e),n=cn(i.body,t,e)||n);var s=ze();return s&&(n=pn.Attach(s,t,e)||n),n},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var e=$e();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,s="";s.length<e;)i++,s+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&n),n>>>=6,5===i&&(n=(t.random32()<<2&4294967295|3&n)>>>0,i=0);return s},t.isIE=function(){if(null===Ze){var t=((We()||{}).userAgent||"").toLowerCase();Ze=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return Ze},t.randomValue=function(e){return e>0?Math.floor(t.random32()/4294967295*(e+1))>>>0:0},t.random32=function(e){var n,i=Ue("crypto")||Ue("msCrypto");return i&&i.getRandomValues?n=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(Ke||en(),n=4294967295&t.mwcRandom32()):n=Math.floor(4294967296*Math.random()|0),e||(n>>>=0),n},t.mwcRandomSeed=function(t){t?tn(t):en()},t.mwcRandom32=function(t){var e=((Qe=36969*(65535&Qe)+(Qe>>16)&4294967295)<<16)+(65535&(Ye=18e3*(65535&Ye)+(Ye>>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="",s=0;s<4;s++)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 r=n[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+r+i.substr(16,3)+i.substr(19,12)},t.isTypeof=nn,t.isUndefined=sn,t.isNullOrUndefined=rn,t.hasOwnProperty=an,t.isFunction=un,t.isObject=on,t.objCreate=Le,t}(),mn=/[xy]/g,pn=function(){function t(){}return t.Attach=cn,t.AttachEvent=cn,t.Detach=ln,t.DetachEvent=ln,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(dn||(dn={}));var vn=Object.getPrototypeOf,wn=0;
2
2
  /*!
3
3
  * Microsoft Dynamic Proto Utility, 1.1.0
4
4
  * Copyright (c) Microsoft and contributors. All rights reserved.
5
- */function gn(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function yn(t){return"function"==typeof t}function bn(t){return t&&(t===Object.prototype||t===Array.prototype)}function xn(t){return bn(t)||t===Function.prototype}function Cn(t){if(t){if(vn)return vn(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}function kn(t,e,n){return"constructor"!==e&&yn(t[e])&&(n||gn(t,e))}function Sn(t){throw new TypeError("DynamicProto: "+t)}function Fn(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function Mn(t,e,n,i){var s=null;if(t&&gn(n,"_dynClass")){var r=t._dynInstFuncs||{};if((s=(r[n._dynClass]||{})[e])||Sn("Missing ["+e+"] function"),!s._dynInstChk&&!1!==r._dynInstChk){for(var a=!gn(t,e),o=Cn(t),u=[];a&&o&&!xn(o)&&!Fn(u,o);){var c=o[e];if(c){a=c===i;break}u.push(o),o=Cn(o)}try{a&&(t[e]=s),s._dynInstChk=1}catch(t){r._dynInstChk=!1}}}return s}function An(t,e,n){var i=e[t];return i===n&&(i=Cn(e)[t]),yn(i)||Sn("["+t+"] is not a function"),i}function _n(t,e){return gn(t,"prototype")?t.name||e||"_unknown_":((t||{}).constructor||{}).name||e||"_unknown_"}function Nn(t,e,n,i){gn(t,"prototype")||Sn("theClass is an invalid class definition.");var s=t.prototype;(function(t,e){for(var n=Cn(e);n&&!xn(n);){if(n===t)return!0;n=Cn(n)}return!1})(s,e)||Sn("["+_n(t)+"] is not in class hierarchy of ["+_n(e)+"]");var r=null;gn(s,"_dynClass")?r=s._dynClass:(r="_dynCls$"+_n(t,"_")+"$"+wn,wn++,s._dynClass=r);var a=Nn._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]&&kn(t,n,!1)&&(e[n]=t[n]);return e}(e);n(e,function(t,e,n,i){function s(t,e,n){var s=e[a];if(s._isDynProxy&&i){var r=t._dynInstFuncs||{};!1!==r._dynInstChk&&(s=(r[e._dynClass]||{})[n]||s)}return function(){return s.apply(t,arguments)}}var r={};for(var a in n)r[a]=s(e,n,a);for(var o=Cn(t),u=[];o&&!xn(o)&&!Fn(u,o);){for(var a in o)!r[a]&&kn(o,a,!vn)&&(r[a]=s(e,o,a));u.push(o),o=Cn(o)}return r}(s,e,u,o));var c=!!vn&&!!a.setInstFuncs;c&&i&&(c=!!i.setInstFuncs),function(t,e,n,i,s){function r(t,e){var n=function(){return(Mn(this,e,t,n)||An(e,t,n)).apply(this,arguments)};return n._isDynProxy=1,n}if(!bn(t)){var a=n._dynInstFuncs=n._dynInstFuncs||{},o=a[e]=a[e]||{};for(var u in!1!==a._dynInstChk&&(a._dynInstChk=!!s),n)kn(n,u,!1)&&n[u]!==i[u]&&(o[u]=n[u],delete n[u],(!gn(t,u)||t[u]&&!t[u]._isDynProxy)&&(t[u]=r(t,u)))}}(s,r,e,u,!1!==c)}function En(t){return t?'"'+t.replace(/\"/g,"")+'"':""}Nn._dfOpts={setInstFuncs:!0,useBaseInst:!0};var Bn=function(){function t(t,e,n,i){void 0===n&&(n=!1);var s=this;s.messageId=t,s.message=(n?"AI: ":"AI (Internal): ")+t;var r="";Je()&&(r=Ge().stringify(i));var a=(e?" message:"+En(e):"")+(i?" props:"+En(r):"");s.message+=a}return t.dataType="MessageData",t}(),In=function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,i={};Nn(t,this,(function(t){var s=fn.isNullOrUndefined,r=fn.isUndefined,a=fn.isFunction;function o(t,n){var i=e[t];return s(i)?n:i}s(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,s,a,o){void 0===o&&(o=!1);var u=new Bn(n,s,o,a);if(t.enableDebugExceptions())throw u;if(!r(u)&&u&&!r(u.message)){if(o){var c=+u.messageId;!i[c]&&t.consoleLoggingLevel()>=dn.WARNING&&(t.warnToConsole(u.message),i[c]=!0)}else t.consoleLoggingLevel()>=dn.WARNING&&t.warnToConsole(u.message);t.logInternalMessage(e,u)}},t.warnToConsole=function(t){var e="undefined"!=typeof console?console:Ue("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,s){if(!(n>=t.maxInternalMessageLimit())){var r=!0,a="AITR_"+s.messageId;if(i[a]?r=!1:i[a]=!0,r&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(s),n++),n===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",u=new Bn(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}(),Pn=function(){function t(e,n,i){var s,r=this,a=!1;r.start=fn.dateNow(),r.name=e,r.isAsync=i,r.isChildEvt=function(){return!1},fn.isFunction(n)&&(a=fn.objDefineAccessors(r,"payload",(function(){return!s&&fn.isFunction(n)&&(s=n(),n=null),s}))),r.getCtx=function(e){return e?e===t.ParentContextKey||e===t.ChildrenContextKey?r[e]:(r.ctx||{})[e]:null},r.setCtx=function(e,n){e&&(e===t.ParentContextKey?(r[e]||(r.isChildEvt=function(){return!0}),r[e]=n):e===t.ChildrenContextKey?r[e]=n:(r.ctx=r.ctx||{})[e]=n)},r.complete=function(){var e=0,i=r.getCtx(t.ChildrenContextKey);if(fn.isArray(i))for(var s=0;s<i.length;s++){var o=i[s];o&&(e+=o.time)}r.time=fn.dateNow()-r.start,r.exTime=r.time-e,r.complete=function(){},!a&&fn.isFunction(n)&&(r.payload=n())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),Ln=function(){function t(e){this.ctx={},Nn(t,this,(function(t){t.create=function(t,e,n){return new Pn(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 jn(t,e,n,i,s){if(t){var r=t;if(r&&fn.isFunction(r.getPerfMgr)&&(r=r.getPerfMgr()),r){var a=void 0,o=r.getCtx("CoreUtils.doPerf");try{if(a=r.create(e(),i,s)){if(o&&a.setCtx&&(a.setCtx(Pn.ParentContextKey,o),o.getCtx&&o.setCtx)){var u=o.getCtx(Pn.ChildrenContextKey);u||o.setCtx(Pn.ChildrenContextKey,u=[]),u.push(a)}return r.setCtx("CoreUtils.doPerf",a),n(a)}}catch(t){a&&a.setCtx&&a.setCtx("exception",t)}finally{a&&r.fire(a),r.setCtx("CoreUtils.doPerf",o)}}}return n()}var Dn=fn.isFunction,Tn=function(t,e){var n=this,i=null,s=Dn(t.processTelemetry),r=Dn(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";jn(o?o.core():null,(function(){return u+":processTelemetry"}),(function(){if(t&&s){n._hasRun=!0;try{o.setNext(i),r&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(a,o)}catch(n){var e=i&&i._hasRun;i&&e||o.diagLog().throwInternal(dn.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)}},Rn=fn.isNullOrUndefined;function On(t,e){var n=[];if(t&&t.length>0)for(var i=null,s=0;s<t.length;s++){var r=t[s];if(r&&fn.isFunction(r.processTelemetry)){var a=new Tn(r,e);n.push(a),i&&i.setNext(a),i=a}}return n.length>0?n[0]:null}var Un=function t(e,n,i,s){var r=this,a=null;null!==s&&(e&&fn.isFunction(e.getPlugin)?a=function(t,e,n){var i=[],s=!n;if(t)for(;t;){var r=t.getPlugin();(s||r===n)&&(s=!0,i.push(r)),t=t.getNext()}return s||i.push(n),On(i,e)}(e,r,s||e.getPlugin()):s?a=function(t,e,n){var i=t,s=!1;return n&&t&&(i=[],fn.arrForEach(t,(function(t){(s||t===n)&&(s=!0,i.push(t))}))),n&&!s&&(i||(i=[]),i.push(n)),On(i,e)}(e,r,s):fn.isUndefined(s)&&(a=On(e,r))),r.core=function(){return i},r.diagLog=function(){var t=(i||{}).logger;return t||(t=new In(n||{})),t},r.getCfg=function(){return n},r.getExtCfg=function(t,e){var i;if(void 0===e&&(e={}),n){var s=n.extensionConfig;s&&t&&(i=s[t])}return i||e},r.getConfig=function(t,e,i){var s;void 0===i&&(i=!1);var a=r.getExtCfg(t,null);return a&&!Rn(a[e])?s=a[e]:n&&!Rn(n[e])&&(s=n[e]),Rn(s)?i:s},r.hasNext=function(){return null!=a},r.getNext=function(){return a},r.setNext=function(t){a=t},r.processNext=function(t){var e=a;e&&(a=e.getNext(),e.processTelemetry(t,r))},r.createNew=function(e,s){return void 0===e&&(e=null),new t(e||a,n,i,s)}},qn=fn.isFunction,Hn=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&&qn(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(e){void 0===e&&(e=null);var s=e;s||(s=(n||new Un(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return s},t._baseTelInit=function(s,r,a,o){s&&(s.extensionConfig=s.extensionConfig||[]),!o&&r&&(o=r.getProcessTelContext().getNext());var u=i;i&&i.getPlugin&&(u=i.getPlugin()),t.core=r,n=new Un(o,s,r,u),e=!0}}return t.prototype.initialize=function(t,e,n,i){this._baseTelInit(t,e,n,i)},t}(),Vn=fn.isFunction;function zn(t,e){for(var n=[],i=null,s=t.getNext();s;){var r=s.getPlugin();r&&(i&&Vn(i.setNextPlugin)&&Vn(r.processTelemetry)&&i.setNextPlugin(r),Vn(r.isInitialized)&&r.isInitialized()||n.push(r),i=r,s=s.getNext())}fn.arrForEach(n,(function(n){n.initialize(t.getCfg(),t.core(),e,t.getNext())}))}function Wn(t){return t.sort((function(t,e){var n=0,i=Vn(e.processTelemetry);return Vn(t.processTelemetry)?n=i?t.priority-e.priority:1:i&&(n=-1),n}))}var $n=fn.objDefineAccessors,Xn=function(t){function e(){var n=t.call(this)||this;n.identifier="ChannelControllerPlugin",n.priority=500;var i,s=fn.arrForEach;function r(t){t&&t.length>0&&(function(t){s(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 Nn(e,n,(function(t,e){t.setNextPlugin=function(){},t.processTelemetry=function(t,e){i&&s(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&&fn.disableCookies(),function(t,e){if(i=[],t&&s(t,(function(t){return r(t)})),e){var n=[];s(e,(function(t){t.priority>500&&n.push(t)})),r(n)}}((n||{}).channels,o),s(i,(function(t){return zn(new Un(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=($n(e.prototype,"ChannelControls",e.prototype.getChannelControls),void $n(e.prototype,"channelQueue",e.prototype.getChannelControls)),e}(Hn),Jn=fn.arrForEach,Gn=fn.isNullOrUndefined,Zn=function(){function t(){var e,n,i,s,r=!1;Nn(t,this,(function(t){t._extensions=new Array,n=new Xn,t.logger=fn.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),e=[],t.isInitialized=function(){return r},t.initialize=function(e,s,a,o){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Gn(e.instrumentationKey))throw Error("Please provide instrumentation key");i=o,t._notificationManager=o,t.config=e||{},e.extensions=Gn(e.extensions)?[]:e.extensions,(e.extensionConfig=Gn(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=o,a&&(t.logger=a);var u=[];u.push.apply(u,s.concat(e.extensions)),u=Wn(u);var c=[],l={};if(Jn(u,(function(t){if(Gn(t)||Gn(t.initialize))throw Error("Extensions must provide callback to initialize");var e=t.priority,i=t.identifier;t&&e&&(Gn(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=Wn(u),t._extensions=u,zn(new Un([n],e,t),u),zn(new Un(c,e,t),u),t._extensions=c,0===t.getTransmissionControls().length)throw new Error("No channels available");r=!0,t.releaseQueue()},t.getTransmissionControls=function(){return n.getChannelControls()},t.track=function(n){n.iKey||(n.iKey=t.config.instrumentationKey),n.time||(n.time=fn.toISOString(new Date)),Gn(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 Un(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=fn.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return s||t.config&&t.config.enablePerfMgr&&(s=new Ln(t.getNotifyMgr())),s},t.setPerfMgr=function(t){s=t},t.eventCnt=function(){return e.length},t.releaseQueue=function(){e.length>0&&(Jn(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}(),Kn=function(){function t(e){this.listeners=[];var n=fn.arrForEach,i=!!(e||{}).perfEvtsSendAll;Nn(t,this,(function(t){t.addNotificationListener=function(e){t.listeners.push(e)},t.removeNotificationListener=function(e){for(var n=fn.arrIndexOf(t.listeners,e);n>-1;)t.listeners.splice(n,1),n=fn.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}(),Yn=function(t){function e(){var n=t.call(this)||this;return Nn(e,n,(function(t,e){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(t,n,i,s){e.initialize(t,n,i||new In(t),s||new Kn(t))},t.track=function(i){jn(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw n(i),Error("Invalid telemetry item");!function(t){if(fn.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:[];fn.arrForEach(n,(function(n){var i={name:e||"InternalMessageId: "+n.messageId,iKey:t.config.instrumentationKey,time:fn.toISOString(new Date),baseType:Bn.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}(Zn),Qn=["req","rsp","hkErr","fnErr"];function ti(t,e){if(t)for(var n=0;n<t.length&&!e(t[n],n);n++);}function ei(t,e,n,i,s){s>=0&&s<=2&&ti(t,(function(t,r){var a=t.cbks,o=a[Qn[s]];if(o){e.ctx=function(){return i[r]=i[r]||{}};try{o.apply(e.inst,n)}catch(t){var u=e.err;try{var c=a[Qn[2]];c&&(e.err=t,c.apply(e.inst,n))}catch(t){}finally{e.err=u}}}}))}var ni,ii,si,ri=Object.getPrototypeOf;function ai(t,e,n){var i=null;return t&&(fn.hasOwnProperty(t,e)?i=t:n&&(i=ai(function(t){if(t){if(ri)return ri(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}(t),e,!1))),i}function oi(t,e,n,i){if(void 0===i&&(i=!0),t&&e&&n){var s=ai(t,e,i);if(s){var r=s[e];if("function"==typeof r){var a=r._aiHooks;if(!a){var o=(c=a={i:0,n:e,f:r,h:[]},function(){var t=this,e=arguments,n=c.h,i={name:c.n,inst:t,ctx:null,set:o},s=[],r=a([i],e);function a(t,e){return ti(e,(function(e){t.push(e)})),t}function o(t,n){(e=a([],e))[t]=n,r=a([i],e)}ei(n,i,r,s,0);var u=c.f;try{i.rslt=u.apply(t,e)}catch(t){throw i.err=t,ei(n,i,r,s,3),t}return ei(n,i,r,s,1),i.rslt});o._aiHooks=a,s[e]=o}var u={id:a.i,cbks:n,rm:function(){var t=this.id;ti(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"}(ni||(ni={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(ii||(ii={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(si||(si={}));var ui,ci=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}(),li=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n,i){var s=n.length,r=t.sanitizeKey(e,n);if(r.length!==s){for(var a=0,o=r;void 0!==i[o];)a++,o=r.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);r=o}return r},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(dn.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 s;return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=t.trim(n)).toString().length>i&&(s=n.toString().substring(0,i),e.throwInternal(dn.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),s||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(dn.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(dn.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={};hn(n,(function(n,s){if(fn.isObject(s)&&Je())try{s=Ge().stringify(s)}catch(t){e.throwInternal(dn.WARNING,49,"custom property is not valid",{exception:t},!0)}s=t.sanitizeString(e,s,t.MAX_PROPERTY_LENGTH),n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=s})),n=i}return n},t.sanitizeMeasurements=function(e,n){if(n){var i={};hn(n,(function(n,s){n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=s})),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,s){var r;return n&&(n=t.trim(n)).length>i&&(r=n.substring(0,i),e.throwInternal(dn.WARNING,s,"input is too long, it has been truncated to "+i+" characters.",{data:n},!0)),r||n},t.padNumber=function(t){var e="00"+t;return e.substr(e.length-3)},t.trim=function(t){return fn.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}(),hi=We(),di=fn.isString,fi=null,mi=function(){function t(){}return t.createDomEvent=function(t){var e=null;if(fn.isFunction(Event))e=new Event(t);else{var n=ze();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(ni.LocalStorage):null},t._getVerifiedStorageObject=function(t){var e,n,i=null;try{if(fn.isNullOrUndefined(Oe()))return null;n=new Date,(i=Ue(t===ni.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(ni.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(dn.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setStorage=function(e,n,i){var s=t._getLocalStorageObject();if(null!==s)try{return s.setItem(n,i),!0}catch(n){t._canUseLocalStorage=!1,e.throwInternal(dn.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(dn.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(ni.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(ni.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var e=[];return t.canUseSessionStorage()&&hn(Ue("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(dn.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setSessionStorage=function(e,n,i){var s=t._getSessionStorageObject();if(null!==s)try{return s.setItem(n,i),!0}catch(n){t._canUseSessionStorage=!1,e.throwInternal(dn.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(dn.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t.disableCookies=function(){fn.disableCookies()},t.canUseCookies=function(e){if(void 0===fn._canUseCookies){fn._canUseCookies=!1;try{fn._canUseCookies=void 0!==t.document.cookie}catch(n){e.throwInternal(dn.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(n),{exception:t.dump(n)})}}return fn._canUseCookies},t.disallowsSameSiteNone=function(t){return!!di(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,s){if(t.canUseCookies(e)){var r="",a="";s&&(r=";domain="+s);var o=$e();o&&"https:"===o.protocol&&(a=";secure",null===fi&&(fi=t.disallowsSameSiteNone((We()||{}).userAgent)),fi||(i+=";SameSite=None")),t.document.cookie=n+"="+i+r+";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 s=n+"=",r=t.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=t.trim(o))&&0===o.indexOf(s)){i=o.substring(s.length,r[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 fn.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var e=t?t.toLowerCase():hi?(hi.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,s=""+Math.floor(t/36e5)%24,r=Math.floor(t/864e5);return(r>0?r+".":"")+(s=s.length<2?"0"+s:s)+":"+(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,s){return("Script error."===t||"Script error"===t)&&!s},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+"'":Je()&&(n=Ge().stringify(t)),e+n},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,e){return pn.Attach(He(),t,e)},t.IsBeaconApiSupported=function(){return"sendBeacon"in hi&&hi.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=ze()||{},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=fn.strTrim,t.newId=fn.newId,t.generateW3CId=fn.generateW3CId,t.isArray=fn.isArray,t.isError=fn.isError,t.isDate=fn.isDate,t.toISOStringForIE8=fn.toISOString,t}(),pi=function(){function t(){}return t.parseUrl=function(e){var n=t._htmlAnchorIdx,i=t._htmlAnchorElement,s=i[n];return t.document.createElement?i[n]||(s=i[n]=t.document.createElement("a")):s={host:t.parseHost(e,!0)},s.href=e,++n>=i.length&&(n=0),t._htmlAnchorIdx=n,s},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 s=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=s&&s.length>3&&di(s[2])&&s[2].length>0)return s[2]+(s[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&&di(i[2])&&i[2].length>0&&(n=i[2]||"",e&&i.length>2)){var s=(i[1]||"").toLowerCase(),r=i[3]||"";("http"===s&&":80"===r||"https"===s&&":443"===r)&&(r=""),n+=r}}return n},t.document=ze()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),vi=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 s=pi.parseUrl(e).host.toLowerCase();if(!s||-1===s.indexOf(":443")&&-1===s.indexOf(":80")||(s=(pi.parseFullHost(e,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||s===n))return!1;var r,a=t&&t.correlationHeaderDomains;if(a&&(fn.arrForEach(a,(function(t){var e=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));r=r||e.test(s)})),!r))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(s))return!1;return s&&s.length>0},t.getCorrelationContext=function(e){if(e){var n=t.getCorrelationContextValue(e,ci.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 s=n[i].split("=");if(2===s.length&&s[0]===e)return s[1]}},t.correlationIdPrefix="cid-v1:",t}(),wi=function(){function t(){}return t.ParseDependencyPath=function(t,e,n,i){var s,r=i,a=i;if(e&&e.length>0){var o=pi.parseUrl(e);if(s=o.host,!r)if(null!=o.pathname){var u=0===o.pathname.length?"/":o.pathname;"/"!==u.charAt(0)&&(u="/"+u),a=o.pathname,r=li.sanitizeString(t,n?n+" "+u:u)}else r=li.sanitizeString(t,e)}else s=i,r=i;return{target:s,name:r,data:a}},t}(),gi=function(){function t(){}return t.Now=function(){var t=Xe();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||fn.isNullOrUndefined(t)||fn.isNullOrUndefined(e)||(n=e-t),n},t}(),yi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",bi=function(){function t(){}return t.parse=function(e){if(!e)return{};var n=e.split(t._FIELDS_SEPARATOR),i=fn.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 fn.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}(),xi=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}((function(){})),Ci=function(t){function e(e,n,i){var s=t.call(this)||this;return s.name=li.sanitizeString(e,i)||mi.NotSpecified,s.data=n,s.time=fn.toISOString(new Date),s.aiDataContract={time:ii.Required,iKey:ii.Required,name:ii.Required,sampleRate:function(){return 100===s.sampleRate?ii.Hidden:ii.Required},tags:ii.Required,data:ii.Required},s}return __extends(e,t),e}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),ki=function(){},Si=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(ki),Fi=function(t){function e(e,n,i,s){var r=t.call(this)||this;return r.aiDataContract={ver:ii.Required,name:ii.Required,properties:ii.Default,measurements:ii.Default},r.name=li.sanitizeString(e,n)||mi.NotSpecified,r.properties=li.sanitizeProperties(e,i),r.measurements=li.sanitizeMeasurements(e,s),r}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Si),Mi=function(t){function e(e,n,i,s,r,a){var o,u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,exceptions:ii.Required,severityLevel:ii.Default,properties:ii.Default,measurements:ii.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,fn.isNullOrUndefined(n.isManual)||(u.isManual=n.isManual)):(u.exceptions=[new Ai(e,n)],u.properties=li.sanitizeProperties(e,i)||{},u.measurements=li.sanitizeMeasurements(e,s),r&&(u.severityLevel=r),a&&(u.id=a)),u}return __extends(e,t),e.CreateFromInterface=function(t,n,i,s){var r=n.exceptions&&fn.arrMap(n.exceptions,(function(e){return Ai.CreateFromInterface(t,e)}));return new e(t,__assign({},n,{exceptions:r}),i,s)},e.prototype.toInterface=function(){var t=this,e=t.exceptions,n=t.properties,i=t.measurements,s=t.severityLevel,r=t.problemGroup,a=t.id,o=t.isManual;return{ver:"4.0",exceptions:e instanceof Array&&fn.arrMap(e,(function(t){return t.toInterface()}))||void 0,severityLevel:s,properties:n,measurements:i,problemGroup:r,id:a,isManual:o}},e.CreateSimpleException=function(t,e,n,i,s){return{exceptions:[{hasFullStack:!0,message:t,stack:s,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}(ki)),Ai=function(t){function e(n,i){var s,r=t.call(this)||this;if(r.aiDataContract={id:ii.Default,outerId:ii.Default,typeName:ii.Required,message:ii.Required,hasFullStack:ii.Default,stack:ii.Default,parsedStack:ii.Array},"hasFullStack"in(s=i)&&"typeName"in s)r.typeName=i.typeName,r.message=i.message,r.stack=i.stack,r.parsedStack=i.parsedStack,r.hasFullStack=i.hasFullStack;else{var a=i;mi.isError(a)||(a=a.error||a.evt||a),r.typeName=li.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))||mi.NotSpecified,r.message=li.sanitizeMessage(n,i.message)||mi.NotSpecified;var o=i.stack;r.parsedStack=e.parseStack(o),r.stack=li.sanitizeException(n,o),r.hasFullStack=mi.isArray(r.parsedStack)&&r.parsedStack.length>0}return r}return __extends(e,t),e.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&fn.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&&fn.arrMap(n.parsedStack,(function(t){return _i.CreateFromInterface(t)}))||n.parsedStack;return new e(t,__assign({},n,{parsedStack:i}))},e.parseStack=function(t){var e;if(fn.isString(t)){var n=t.split("\n");e=[];for(var i=0,s=0,r=0;r<=n.length;r++)if(_i.regex.test(n[r])){var a=new _i(n[r],i++);s+=a.sizeInBytes,e.push(a)}if(s>32768)for(var o=0,u=e.length-1,c=0,l=o,h=u;o<u;){if((c+=e[o].sizeInBytes+e[u].sizeInBytes)>32768){e.splice(l,h-l+1);break}l=o,h=u,o++,u--}}return e},e}((function(){this.hasFullStack=!0,this.parsedStack=[]})),_i=function(t){function e(n,i){var s=t.call(this)||this;if(s.sizeInBytes=0,s.aiDataContract={level:ii.Required,method:ii.Required,assembly:ii.Default,fileName:ii.Default,line:ii.Default},"string"==typeof n){var r=n;s.level=i,s.method="<no_method>",s.assembly=mi.trim(r),s.fileName="",s.line=0;var a=r.match(e.regex);a&&a.length>=5&&(s.method=mi.trim(a[2])||s.method,s.fileName=mi.trim(a[4]),s.line=parseInt(a[5])||0)}else s.level=n.level,s.method=n.method,s.assembly=n.assembly,s.fileName=n.fileName,s.line=n.line,s.sizeInBytes=0;return s.sizeInBytes+=s.method.length,s.sizeInBytes+=s.fileName.length,s.sizeInBytes+=s.assembly.length,s.sizeInBytes+=e.baseSize,s.sizeInBytes+=s.level.toString().length,s.sizeInBytes+=s.line.toString().length,s}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(){})),Ni=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}(ki);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(ui||(ui={}));var Ei,Bi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:ii.Required,kind:ii.Default,value:ii.Required,count:ii.Default,min:ii.Default,max:ii.Default,stdDev:ii.Default},e}return __extends(e,t),e}((function(){this.kind=ui.Measurement})),Ii=function(t){function e(e,n,i,s,r,a,o,u){var c=t.call(this)||this;c.aiDataContract={ver:ii.Required,metrics:ii.Required,properties:ii.Default};var l=new Bi;return l.count=s>0?s:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(r)||null===r?void 0:r,l.name=li.sanitizeString(e,n)||mi.NotSpecified,l.value=i,c.metrics=[l],c.properties=li.sanitizeProperties(e,o),c.measurements=li.sanitizeMeasurements(e,u),c}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Ni),Pi=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(Si),Li=function(t){function e(e,n,i,s,r,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,name:ii.Default,url:ii.Default,duration:ii.Default,properties:ii.Default,measurements:ii.Default,id:ii.Default},u.id=li.sanitizeId(e,o),u.url=li.sanitizeUrl(e,i),u.name=li.sanitizeString(e,n)||mi.NotSpecified,isNaN(s)||(u.duration=mi.msToTimeSpan(s)),u.properties=li.sanitizeProperties(e,r),u.measurements=li.sanitizeMeasurements(e,a),u}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Pi),ji=function(t){function e(e,n,i,s,r,a,o,u,c,l,h,d){void 0===c&&(c="Ajax");var f=t.call(this)||this;f.aiDataContract={id:ii.Required,ver:ii.Required,name:ii.Default,resultCode:ii.Default,duration:ii.Default,success:ii.Default,data:ii.Default,target:ii.Default,type:ii.Default,properties:ii.Default,measurements:ii.Default,kind:ii.Default,value:ii.Default,count:ii.Default,min:ii.Default,max:ii.Default,stdDev:ii.Default,dependencyKind:ii.Default,dependencySource:ii.Default,commandName:ii.Default,dependencyTypeName:ii.Default},f.id=n,f.duration=mi.msToTimeSpan(r),f.success=a,f.resultCode=o+"",f.type=li.sanitizeString(e,c);var m=wi.ParseDependencyPath(e,i,u,s);return f.data=li.sanitizeUrl(e,s)||m.data,f.target=li.sanitizeString(e,m.target),l&&(f.target=f.target+" | "+l),f.name=li.sanitizeString(e,m.name),f.properties=li.sanitizeProperties(e,h),f.measurements=li.sanitizeMeasurements(e,d),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}(ki)),Di=function(t){function e(e,n,i,s,r){var a=t.call(this)||this;return a.aiDataContract={ver:ii.Required,message:ii.Required,severityLevel:ii.Default,properties:ii.Default},a.message=li.sanitizeMessage(e,n=n||mi.NotSpecified),a.properties=li.sanitizeProperties(e,s),a.measurements=li.sanitizeMeasurements(e,r),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}(ki)),Ti=function(t){function e(e,n,i,s,r,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,name:ii.Default,url:ii.Default,duration:ii.Default,perfTotal:ii.Default,networkConnect:ii.Default,sentRequest:ii.Default,receivedResponse:ii.Default,domProcessing:ii.Default,properties:ii.Default,measurements:ii.Default},u.url=li.sanitizeUrl(e,i),u.name=li.sanitizeString(e,n)||mi.NotSpecified,u.properties=li.sanitizeProperties(e,r),u.measurements=li.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}(Pi)),Ri=function(t){function e(e,n){var i=t.call(this)||this;return i.aiDataContract={baseType:ii.Required,baseData:ii.Required},i.baseType=e,i.baseData=n,i}return __extends(e,t),e}(xi);!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"}(Ei||(Ei={}));var Oi=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"},Ui=function(){function t(){}return t.create=function(t,e,n,i,s,r){if(n=li.sanitizeString(i,n)||mi.NotSpecified,fn.isNullOrUndefined(t)||fn.isNullOrUndefined(e)||fn.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:fn.toISOString(new Date),iKey:"",ext:r||{},tags:[],data:{},baseType:e,baseData:t};return fn.isNullOrUndefined(s)||hn(s,(function(t,e){a.data[t]=e})),a},t}(),qi=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}(),Hi=new Oi,Vi=function t(e,n,i,s){Nn(t,this,(function(t){var r,a=fn.arrForEach,o=fn.isNullOrUndefined,u=null,c=[],l=!1;function h(){i&&a(i.getTransmissionControls(),(function(t){a(t,(function(t){return t.flush(!0)}))}))}i&&(r=i.logger),t.trackPageView=function(t,i){var d=t.name;if(o(d)||"string"!=typeof d){var f=ze();d=t.name=f&&f.title||""}var m=t.uri;if(o(m)||"string"!=typeof m){var p=$e();m=t.uri=p&&p.href||""}if(!s.isPerformanceTimingSupported())return e.sendPageViewInternal(t,i),h(),void r.throwInternal(dn.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,y=s.getPerformanceTiming().navigationStart;y>0&&(v=gi.GetDuration(y,+new Date),s.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),h(),g=!0),i||(i={}),c.push((function(){var n=!1;try{if(s.isPerformanceTimingDataReady()){n=!0;var a={name:d,uri:m};s.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 y>0&&gi.GetDuration(y,+new Date)>6e4&&(n=!0,g||(i.duration=6e4,e.sendPageViewInternal(t,i)))}catch(t){r.throwInternal(dn.CRITICAL,38,"trackPageView failed on page load calculation: "+mi.getExceptionName(t),{exception:mi.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&&h()}),100))}}))},zi=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: "+mi.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: "+mi.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,e){try{if(mi.canUseSessionStorage()){if(null!=mi.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new Wi(t,e),i=Ge().stringify(n);mi.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+mi.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(mi.canUseSessionStorage()){var t=fn.dateNow(),e=mi.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(e&&Je()){var n=Ge().parse(e);return n.pageVisitTime=t-n.pageVisitStartTime,mi.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+mi.dump(t)),null}},t}(),Wi=function(t,e){this.pageVisitStartTime=fn.dateNow(),this.pageName=t,this.pageUrl=e},$i=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,s=gi.GetDuration(e.startTime,e.connectEnd),r=gi.GetDuration(e.requestStart,e.responseStart),a=gi.GetDuration(e.responseStart,e.responseEnd),o=gi.GetDuration(e.responseEnd,e.loadEventEnd);else i=gi.GetDuration(n.navigationStart,n.loadEventEnd),s=gi.GetDuration(n.navigationStart,n.connectEnd),r=gi.GetDuration(n.requestStart,n.responseStart),a=gi.GetDuration(n.responseStart,n.responseEnd),o=gi.GetDuration(n.responseEnd,n.loadEventEnd);0===i?this._logger.throwInternal(dn.WARNING,10,"error calculating page view performance.",{total:i,network:s,request:r,response:a,dom:o}):this.shouldCollectDuration(i,s,r,a,o)?i<Math.floor(s)+Math.floor(r)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(dn.WARNING,8,"client performance math error.",{total:i,network:s,request:r,response:a,dom:o}):(t.durationMs=i,t.perfTotal=t.duration=mi.msToTimeSpan(i),t.networkConnect=mi.msToTimeSpan(s),t.sentRequest=mi.msToTimeSpan(r),t.receivedResponse=mi.msToTimeSpan(a),t.domProcessing=mi.msToTimeSpan(o),t.isValid=!0):this._logger.throwInternal(dn.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:s,request:r,response:a,dom:o})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?Xe().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?Xe().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=Xe();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=Xe();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=Xe(),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=We()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],s=n.userAgent,r=!1;if(s)for(var a=0;a<i.length;a++)r=r||-1!==s.toLowerCase().indexOf(i[a]);if(r)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 Xi(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}var Ji=function(t){function e(){var e=t.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var n=$e();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=mi.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=mi.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=mi.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=mi.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=mi.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=mi.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=mi.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=mi.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},e.prototype.processTelemetry=function(t,e){var n=this;jn(this.core,(function(){return n.identifier+":processTelemetry"}),(function(){var i=!1,s=n._telemetryInitializers.length;e=n._getTelCtx(e);for(var r=0;r<s;++r){var a=n._telemetryInitializers[r];if(a)try{if(!1===a.apply(null,[t])){i=!0;break}}catch(t){e.diagLog().throwInternal(dn.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+mi.getExceptionName(t),{exception:mi.dump(t)},!0)}}i||n.processNext(t,e)}),(function(){return{item:t}}),!t.sync)},e.prototype.trackEvent=function(t,e){try{var n=Ui.create(t,Fi.dataType,Fi.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.WARNING,39,"trackTrace failed, trace will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.stopTrackEvent=function(t,e){try{this._eventTracking.stop(t,void 0,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.trackTrace=function(t,e){try{var n=Ui.create(t,Di.dataType,Di.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.WARNING,39,"trackTrace failed, trace will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.trackMetric=function(t,e){try{var n=Ui.create(t,Ii.dataType,Ii.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,36,"trackMetric failed, metric will not be collected: "+mi.getExceptionName(t),{exception:mi.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(dn.CRITICAL,37,"trackPageView failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.sendPageViewInternal=function(t,e,n){var i=ze();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var s=Ui.create(t,Li.dataType,Li.envelopeType,this.diagLog(),e,n);this.core.track(s),this._trackAjaxAttempts=0},e.prototype.sendPageViewPerformanceInternal=function(t,e,n){var i=Ui.create(t,Ti.dataType,Ti.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(dn.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var e=ze();t=e&&e.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.stopTrackPage=function(t,e,n,i){try{if("string"!=typeof t){var s=ze();t=s&&s.title||""}if("string"!=typeof e){var r=$e();e=r&&r.href||""}this._pageTracking.stop(t,e,n,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.sendExceptionInternal=function(t,e,n){var i=new Mi(this.diagLog(),t.exception||new Error(mi.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),s=Ui.create(i,Mi.dataType,Mi.envelopeType,this.diagLog(),e,n);this.core.track(s)},e.prototype.trackException=function(t,e){try{this.sendExceptionInternal(t,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,35,"trackException failed, exception will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype._onerror=function(t){try{var e={url:t&&t.url||(ze()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(mi.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!mi.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:Ei.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(dn.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e),errorString:i})}},e.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},e.prototype.initialize=function(n,i,s,r){var a=this;if(!this.isInitialized()){if(fn.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,n,i,s,r),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&&(hn(c,(function(t,e){a.config[t]=o.getConfig(u,t,e)})),this._globalconfig&&hn(c,(function(t,e){void 0===a._globalconfig[t]&&(a._globalconfig[t]=e)}))),this.config.isCookieUseDisabled&&mi.disableCookies(),this.config.isStorageUseDisabled&&mi.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 $i(this.core),this._pageViewManager=new Vi(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new zi(this.diagLog(),(function(t,e,n){return a.trackPageVisitTime(t,e,n)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Gi(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 Gi(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,e,n,i,s){fn.isNullOrUndefined(i)&&(i={}),i.duration=n.toString(),a.sendPageViewInternal({name:t,uri:e,properties:i,measurements:s},i)};var h,d=He(),f=Boolean("object"==typeof history&&history)?history:Ue("history"),m=$e(),p=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&d){var v=d.onerror;d.onerror=function(t,e,n,i,s){var r=v&&v(t,e,n,i,s);return!0!==r&&p._onerror({message:t,url:e,lineNumber:n,columnNumber:i,error:s}),r},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&d){var w=d.onunhandledrejection;d.onunhandledrejection=function(t){var e=w&&w.call(d,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&&fn.isFunction(f.pushState)&&fn.isFunction(f.replaceState)&&d&&"undefined"!=typeof Event){var g=this;fn.arrForEach(s,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(a._properties=t)})),f.pushState=(h=f.pushState,function(){var t=h.apply(this,arguments);return Xi(d,mi.createDomEvent(g.config.namePrefix+"pushState")),Xi(d,mi.createDomEvent(g.config.namePrefix+"locationchange")),t}),f.replaceState=function(t){return function(){var e=t.apply(this,arguments);return Xi(d,mi.createDomEvent(g.config.namePrefix+"replaceState")),Xi(d,mi.createDomEvent(g.config.namePrefix+"locationchange")),e}}(f.replaceState),d.addEventListener&&(d.addEventListener(g.config.namePrefix+"popstate",(function(){Xi(d,mi.createDomEvent(g.config.namePrefix+"locationchange"))})),d.addEventListener(g.config.namePrefix+"locationchange",(function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=mi.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===ji.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=Ui.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},Mi.dataType,Mi.envelopeType,this.diagLog(),{url:t});this.core.track(e)},e.Version="2.5.10",e}(Hn),Gi=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(dn.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 s=this._events[t];if(isNaN(s))this._logger.throwInternal(dn.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var r=+new Date,a=gi.GetDuration(s,r);this.action(t,e,a,n,i)}delete this._events[t],this._events[t]=void 0},t}(),Zi=function t(e){var n=[];Nn(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(){}}))},Ki=function(){function t(e,n){var i,s=!1;Nn(t,this,(function(r){var a=c(t.BUFFER_KEY),o=c(t.SENT_BUFFER_KEY);function u(t,e){var n=[];return fn.arrForEach(e,(function(e){fn.isFunction(e)||-1!==fn.arrIndexOf(t,e)||n.push(e)})),n}function c(t){var i=t;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var s=mi.getSessionStorage(e,i);if(s){var r=Ge().parse(s);if(fn.isString(r)&&(r=Ge().parse(r)),r&&mi.isArray(r))return r}}catch(t){e.throwInternal(dn.CRITICAL,42," storage key: "+i+", "+mi.getExceptionName(t),{exception:mi.dump(t)})}return[]}function l(t,i){var s=t;try{s=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+s:s;var r=JSON.stringify(i);mi.setSessionStorage(e,s,r)}catch(t){mi.setSessionStorage(e,s,JSON.stringify([])),e.throwInternal(dn.WARNING,41," storage key: "+s+", "+mi.getExceptionName(t)+". Buffer cleared",{exception:mi.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),r.enqueue=function(n){i.length>=t.MAX_BUFFER_SIZE?s||(e.throwInternal(dn.WARNING,67,"Maximum buffer size reached: "+i.length,!0),s=!0):(i.push(n),l(t.BUFFER_KEY,i))},r.count=function(){return i.length},r.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),s=!1},r.getItems=function(){return i.slice(0)},r.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},r.markAsSent=function(n){i=u(n,i),l(t.BUFFER_KEY,i);var s=c(t.SENT_BUFFER_KEY);s instanceof Array&&n instanceof Array&&((s=s.concat(n)).length>t.MAX_BUFFER_SIZE&&(e.throwInternal(dn.CRITICAL,67,"Sent buffer reached its maximum size: "+s.length,!0),s.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,s))},r.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}(),Yi=fn.isNullOrUndefined;function Qi(t,e,n){return t&&n?(t[e]=n,t[e]):null}var ts=function(){function t(){}return t.extractPropsAndMeasurements=function(t,e,n){Yi(t)||hn(t,(function(t,i){fn.isNumber(i)?n[t]=i:fn.isString(i)?e[t]=i:Je()&&(e[t]=Ge().stringify(i))}))},t.createEnvelope=function(e,n,i,s){var r=new Ci(e,s,n);Qi(r,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(r.time=fn.toISOString(i.baseData.startTime)),r.iKey=i.iKey;var a=i.iKey.replace(/-/g,"");return r.name=r.name.replace("{0}",a),t.extractPartAExtensions(i,r),i.tags=i.tags||[],r},t.extractPartAExtensions=function(e,n){var i=n.tags=n.tags||{},s=e.ext=e.ext||{},r=e.tags=e.tags||[],a=s.user;a&&(Qi(i,Hi.userAuthUserId,a.authId),Qi(i,Hi.userId,a.id||a.localId));var o=s.app;o&&Qi(i,Hi.sessionId,o.sesId);var u=s.device;u&&(Qi(i,Hi.deviceId,u.id||u.localId),Qi(i,Hi.deviceType,u.deviceClass),Qi(i,Hi.deviceIp,u.ip),Qi(i,Hi.deviceModel,u.model),Qi(i,Hi.deviceType,u.deviceType));var c=e.ext.web;if(c){Qi(i,Hi.deviceLanguage,c.browserLang),Qi(i,Hi.deviceBrowserVersion,c.browserVer),Qi(i,Hi.deviceBrowser,c.browser);var l=n.data=n.data||{},h=l.baseData=l.baseData||{},d=h.properties=h.properties||{};Qi(d,"domain",c.domain),Qi(d,"isManual",c.isManual?"true":null),Qi(d,"screenRes",c.screenRes),Qi(d,"userConsent",c.userConsent?"true":null)}var f=s.os;f&&Qi(i,Hi.deviceOS,f.name);var m=s.trace;m&&(Qi(i,Hi.operationParentId,m.parentID),Qi(i,Hi.operationName,m.name),Qi(i,Hi.operationId,m.traceID));for(var p={},v=r.length-1;v>=0;v--)hn(r[v],(function(t,e){p[t]=e})),r.splice(v,1);hn(r,(function(t,e){p[t]=e})),n.tags=__assign({},i,p),n.tags[Hi.internalSdkVersion]||(n.tags[Hi.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,e){this._logger=t,Yi(e.baseData)&&this._logger.throwInternal(dn.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),es=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||{},s=n.baseData.properties||{};ts.extractPropsAndMeasurements(n.data,s,i);var r=n.baseData;if(Yi(r))return e.warnToConsole("Invalid input for dependency data"),null;var a=new ji(e,r.id,r.target,r.name,r.duration,r.success,r.responseCode,r.properties&&r.properties["http.method"]?r.properties["http.method"]:"GET",r.type,r.correlationContext,s,i),o=new Ri(ji.dataType,a);return ts.createEnvelope(e,ji.envelopeType,n,o)},e.DependencyEnvelopeCreator=new e,e}(ts),ns=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={},s={};n.baseType!==Fi.dataType&&(i.baseTypeSource=n.baseType),n.baseType===Fi.dataType?(i=n.baseData.properties||{},s=n.baseData.measurements||{}):n.baseData&&ts.extractPropsAndMeasurements(n.baseData,i,s),ts.extractPropsAndMeasurements(n.data,i,s);var r=new Fi(e,n.baseData.name,i,s),a=new Ri(Fi.dataType,r);return ts.createEnvelope(e,Fi.envelopeType,n,a)},e.EventEnvelopeCreator=new e,e}(ts),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||{},s=n.baseData.properties||{};ts.extractPropsAndMeasurements(n.data,s,i);var r=Mi.CreateFromInterface(e,n.baseData,s,i),a=new Ri(Mi.dataType,r);return ts.createEnvelope(e,Mi.envelopeType,n,a)},e.ExceptionEnvelopeCreator=new e,e}(ts),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,s=i.properties||{},r=i.measurements||{};ts.extractPropsAndMeasurements(n.data,s,r);var a=new Ii(e,i.name,i.average,i.sampleCount,i.min,i.max,s,r),o=new Ri(Ii.dataType,a);return ts.createEnvelope(e,Ii.envelopeType,n,o)},e.MetricEnvelopeCreator=new e,e}(ts),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,s=n.baseData;Yi(s)||Yi(s.properties)||Yi(s.properties.duration)?Yi(n.data)||Yi(n.data.duration)||(i=n.data.duration,delete n.data.duration):(i=s.properties.duration,delete s.properties.duration);var r,a=n.baseData;((n.ext||{}).trace||{}).traceID&&(r=n.ext.trace.traceID);var o=a.id||r,u=a.name,c=a.uri,l=a.properties||{},h=a.measurements||{};Yi(a.refUri)||(l.refUri=a.refUri),Yi(a.pageType)||(l.pageType=a.pageType),Yi(a.isLoggedIn)||(l.isLoggedIn=a.isLoggedIn.toString()),Yi(a.properties)||hn(a.properties,(function(t,e){l[t]=e})),ts.extractPropsAndMeasurements(n.data,l,h);var d=new Li(e,u,c,i,l,h,o),f=new Ri(Li.dataType,d);return ts.createEnvelope(e,Li.envelopeType,n,f)},e.PageViewEnvelopeCreator=new e,e}(ts),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,s=i.name,r=i.uri||i.url,a=i.properties||{},o=i.measurements||{};ts.extractPropsAndMeasurements(n.data,a,o);var u=new Ti(e,s,r,void 0,a,o,i),c=new Ri(Ti.dataType,u);return ts.createEnvelope(e,Ti.envelopeType,n,c)},e.PageViewPerformanceEnvelopeCreator=new e,e}(ts),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=n.baseData.message,s=n.baseData.severityLevel,r=n.baseData.properties||{},a=n.baseData.measurements||{};ts.extractPropsAndMeasurements(n.data,r,a);var o=new Di(e,i,s,r,a),u=new Ri(Di.dataType,o);return ts.createEnvelope(e,Di.envelopeType,n,u)},e.TraceEnvelopeCreator=new e,e}(ts),us=function t(e){Nn(t,this,(function(t){function n(t,r){var a={};if(!t)return e.throwInternal(dn.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:r},!0),a;if(t.__aiCircularRefCheck)return e.throwInternal(dn.WARNING,50,"Circular reference detected while serializing object",{name:r},!0),a;if(!t.aiDataContract){if("measurements"===r)a=s(t,"number",r);else if("properties"===r)a=s(t,"string",r);else if("tags"===r)a=s(t,"string",r);else if(mi.isArray(t))a=i(t,r);else{e.throwInternal(dn.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:r},!0);try{Ge().stringify(t),a=t}catch(t){e.throwInternal(dn.CRITICAL,48,t&&fn.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return a}return t.__aiCircularRefCheck=!0,hn(t.aiDataContract,(function(s,o){var u=fn.isFunction(o)?o()&ii.Required:o&ii.Required,c=fn.isFunction(o)?o()&ii.Hidden:o&ii.Hidden,l=o&ii.Array,h=void 0!==t[s],d=fn.isObject(t[s])&&null!==t[s];if(!u||h||l){if(!c){var f;void 0!==(f=d?l?i(t[s],s):n(t[s],s):t[s])&&(a[s]=f)}}else e.throwInternal(dn.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:s,name:r})})),delete t.__aiCircularRefCheck,a}function i(t,i){var s;if(t)if(mi.isArray(t)){s=[];for(var r=0;r<t.length;r++){var a=n(t[r],i+"["+r+"]");s.push(a)}}else e.throwInternal(dn.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 s}function s(t,n,i){var s;return t&&(s={},hn(t,(function(t,r){if("string"===n)s[t]=void 0===r?"undefined":null===r?"null":r.toString?r.toString():"invalid field: toString() is not defined.";else if("number"===n)if(void 0===r)s[t]="undefined";else if(null===r)s[t]="null";else{var a=parseFloat(r);s[t]=isNaN(a)?"NaN":a}else s[t]="invalid field: "+i+" is of unknown type.",e.throwInternal(dn.CRITICAL,s[t],null,!0)}))),s}t.serialize=function(t){var i=n(t,"root");try{return Ge().stringify(i)}catch(t){e.throwInternal(dn.CRITICAL,48,t&&fn.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},cs=function(){function t(){var e=He(),n=ze(),i=!1,s=!0;Nn(t,this,(function(t){try{if(e&&pn.Attach(e,"online",a)&&(pn.Attach(e,"offline",o),i=!0),n){var r=n.body||n;fn.isUndefined(r.ononline)||(r.ononline=a,r.onoffline=o,i=!0)}}catch(t){i=!1}function a(){s=!0}function o(){s=!1}t.isListening=i,t.isOnline=function(){var t=!0,e=We();return i?t=s:e&&!fn.isNullOrUndefined(e.onLine)&&(t=e.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,ls=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}(),hs=function(){function t(){this.hashCodeGeneragor=new ls,this.keys=new Oi}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}(),ds=function(){function t(t,e){this.INT_MAX_VALUE=2147483647,this._logger=fn.isNullOrUndefined(e)?new In:e,(t>100||t<0)&&(this._logger.throwInternal(dn.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 hs}return t.prototype.isSampledIn=function(t){var e=this.sampleRate;return null==e||e>=100||t.baseType===Ii.dataType||this.samplingScoreGenerator.getSamplingScore(t)<e},t}();
5
+ */function gn(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}function yn(t){return"function"==typeof t}function bn(t){return t&&(t===Object.prototype||t===Array.prototype)}function xn(t){return bn(t)||t===Function.prototype}function Cn(t){if(t){if(vn)return vn(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}function kn(t,e,n){return"constructor"!==e&&yn(t[e])&&(n||gn(t,e))}function Sn(t){throw new TypeError("DynamicProto: "+t)}function Fn(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function Mn(t,e,n,i){var s=null;if(t&&gn(n,"_dynClass")){var r=t._dynInstFuncs||{};if((s=(r[n._dynClass]||{})[e])||Sn("Missing ["+e+"] function"),!s._dynInstChk&&!1!==r._dynInstChk){for(var a=!gn(t,e),o=Cn(t),u=[];a&&o&&!xn(o)&&!Fn(u,o);){var c=o[e];if(c){a=c===i;break}u.push(o),o=Cn(o)}try{a&&(t[e]=s),s._dynInstChk=1}catch(t){r._dynInstChk=!1}}}return s}function An(t,e,n){var i=e[t];return i===n&&(i=Cn(e)[t]),yn(i)||Sn("["+t+"] is not a function"),i}function _n(t,e){return gn(t,"prototype")?t.name||e||"_unknown_":((t||{}).constructor||{}).name||e||"_unknown_"}function Nn(t,e,n,i){gn(t,"prototype")||Sn("theClass is an invalid class definition.");var s=t.prototype;(function(t,e){for(var n=Cn(e);n&&!xn(n);){if(n===t)return!0;n=Cn(n)}return!1})(s,e)||Sn("["+_n(t)+"] is not in class hierarchy of ["+_n(e)+"]");var r=null;gn(s,"_dynClass")?r=s._dynClass:(r="_dynCls$"+_n(t,"_")+"$"+wn,wn++,s._dynClass=r);var a=Nn._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]&&kn(t,n,!1)&&(e[n]=t[n]);return e}(e);n(e,function(t,e,n,i){function s(t,e,n){var s=e[a];if(s._isDynProxy&&i){var r=t._dynInstFuncs||{};!1!==r._dynInstChk&&(s=(r[e._dynClass]||{})[n]||s)}return function(){return s.apply(t,arguments)}}var r={};for(var a in n)r[a]=s(e,n,a);for(var o=Cn(t),u=[];o&&!xn(o)&&!Fn(u,o);){for(var a in o)!r[a]&&kn(o,a,!vn)&&(r[a]=s(e,o,a));u.push(o),o=Cn(o)}return r}(s,e,u,o));var c=!!vn&&!!a.setInstFuncs;c&&i&&(c=!!i.setInstFuncs),function(t,e,n,i,s){function r(t,e){var n=function(){return(Mn(this,e,t,n)||An(e,t,n)).apply(this,arguments)};return n._isDynProxy=1,n}if(!bn(t)){var a=n._dynInstFuncs=n._dynInstFuncs||{},o=a[e]=a[e]||{};for(var u in!1!==a._dynInstChk&&(a._dynInstChk=!!s),n)kn(n,u,!1)&&n[u]!==i[u]&&(o[u]=n[u],delete n[u],(!gn(t,u)||t[u]&&!t[u]._isDynProxy)&&(t[u]=r(t,u)))}}(s,r,e,u,!1!==c)}function En(t){return t?'"'+t.replace(/\"/g,"")+'"':""}Nn._dfOpts={setInstFuncs:!0,useBaseInst:!0};var Bn=function(){function t(t,e,n,i){void 0===n&&(n=!1);var s=this;s.messageId=t,s.message=(n?"AI: ":"AI (Internal): ")+t;var r="";Xe()&&(r=Ge().stringify(i));var a=(e?" message:"+En(e):"")+(i?" props:"+En(r):"");s.message+=a}return t.dataType="MessageData",t}(),In=function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,i={};Nn(t,this,(function(t){var s=fn.isNullOrUndefined,r=fn.isUndefined,a=fn.isFunction;function o(t,n){var i=e[t];return s(i)?n:i}s(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,s,a,o){void 0===o&&(o=!1);var u=new Bn(n,s,o,a);if(t.enableDebugExceptions())throw u;if(!r(u)&&u&&!r(u.message)){if(o){var c=+u.messageId;!i[c]&&t.consoleLoggingLevel()>=dn.WARNING&&(t.warnToConsole(u.message),i[c]=!0)}else t.consoleLoggingLevel()>=dn.WARNING&&t.warnToConsole(u.message);t.logInternalMessage(e,u)}},t.warnToConsole=function(t){var e="undefined"!=typeof console?console:Ue("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,s){if(!(n>=t.maxInternalMessageLimit())){var r=!0,a="AITR_"+s.messageId;if(i[a]?r=!1:i[a]=!0,r&&(e<=t.telemetryLoggingLevel()&&(t.queue.push(s),n++),n===t.maxInternalMessageLimit())){var o="Internal events throttle limit per PageView reached for this app.",u=new Bn(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}(),Pn=function(){function t(e,n,i){var s,r=this,a=!1;r.start=fn.dateNow(),r.name=e,r.isAsync=i,r.isChildEvt=function(){return!1},fn.isFunction(n)&&(a=fn.objDefineAccessors(r,"payload",(function(){return!s&&fn.isFunction(n)&&(s=n(),n=null),s}))),r.getCtx=function(e){return e?e===t.ParentContextKey||e===t.ChildrenContextKey?r[e]:(r.ctx||{})[e]:null},r.setCtx=function(e,n){e&&(e===t.ParentContextKey?(r[e]||(r.isChildEvt=function(){return!0}),r[e]=n):e===t.ChildrenContextKey?r[e]=n:(r.ctx=r.ctx||{})[e]=n)},r.complete=function(){var e=0,i=r.getCtx(t.ChildrenContextKey);if(fn.isArray(i))for(var s=0;s<i.length;s++){var o=i[s];o&&(e+=o.time)}r.time=fn.dateNow()-r.start,r.exTime=r.time-e,r.complete=function(){},!a&&fn.isFunction(n)&&(r.payload=n())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),Ln=function(){function t(e){this.ctx={},Nn(t,this,(function(t){t.create=function(t,e,n){return new Pn(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 Dn(t,e,n,i,s){if(t){var r=t;if(r&&fn.isFunction(r.getPerfMgr)&&(r=r.getPerfMgr()),r){var a=void 0,o=r.getCtx("CoreUtils.doPerf");try{if(a=r.create(e(),i,s)){if(o&&a.setCtx&&(a.setCtx(Pn.ParentContextKey,o),o.getCtx&&o.setCtx)){var u=o.getCtx(Pn.ChildrenContextKey);u||o.setCtx(Pn.ChildrenContextKey,u=[]),u.push(a)}return r.setCtx("CoreUtils.doPerf",a),n(a)}}catch(t){a&&a.setCtx&&a.setCtx("exception",t)}finally{a&&r.fire(a),r.setCtx("CoreUtils.doPerf",o)}}}return n()}var jn=fn.isFunction,Tn=function(t,e){var n=this,i=null,s=jn(t.processTelemetry),r=jn(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";Dn(o?o.core():null,(function(){return u+":processTelemetry"}),(function(){if(t&&s){n._hasRun=!0;try{o.setNext(i),r&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(a,o)}catch(n){var e=i&&i._hasRun;i&&e||o.diagLog().throwInternal(dn.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)}},Rn=fn.isNullOrUndefined;function On(t,e){var n=[];if(t&&t.length>0)for(var i=null,s=0;s<t.length;s++){var r=t[s];if(r&&fn.isFunction(r.processTelemetry)){var a=new Tn(r,e);n.push(a),i&&i.setNext(a),i=a}}return n.length>0?n[0]:null}var Un=function t(e,n,i,s){var r=this,a=null;null!==s&&(e&&fn.isFunction(e.getPlugin)?a=function(t,e,n){var i=[],s=!n;if(t)for(;t;){var r=t.getPlugin();(s||r===n)&&(s=!0,i.push(r)),t=t.getNext()}return s||i.push(n),On(i,e)}(e,r,s||e.getPlugin()):s?a=function(t,e,n){var i=t,s=!1;return n&&t&&(i=[],fn.arrForEach(t,(function(t){(s||t===n)&&(s=!0,i.push(t))}))),n&&!s&&(i||(i=[]),i.push(n)),On(i,e)}(e,r,s):fn.isUndefined(s)&&(a=On(e,r))),r.core=function(){return i},r.diagLog=function(){var t=(i||{}).logger;return t||(t=new In(n||{})),t},r.getCfg=function(){return n},r.getExtCfg=function(t,e){var i;if(void 0===e&&(e={}),n){var s=n.extensionConfig;s&&t&&(i=s[t])}return i||e},r.getConfig=function(t,e,i){var s;void 0===i&&(i=!1);var a=r.getExtCfg(t,null);return a&&!Rn(a[e])?s=a[e]:n&&!Rn(n[e])&&(s=n[e]),Rn(s)?i:s},r.hasNext=function(){return null!=a},r.getNext=function(){return a},r.setNext=function(t){a=t},r.processNext=function(t){var e=a;e&&(a=e.getNext(),e.processTelemetry(t,r))},r.createNew=function(e,s){return void 0===e&&(e=null),new t(e||a,n,i,s)}},qn=fn.isFunction,Hn=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&&qn(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(e){void 0===e&&(e=null);var s=e;s||(s=(n||new Un(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return s},t._baseTelInit=function(s,r,a,o){s&&(s.extensionConfig=s.extensionConfig||[]),!o&&r&&(o=r.getProcessTelContext().getNext());var u=i;i&&i.getPlugin&&(u=i.getPlugin()),t.core=r,n=new Un(o,s,r,u),e=!0}}return t.prototype.initialize=function(t,e,n,i){this._baseTelInit(t,e,n,i)},t}(),Vn=fn.isFunction;function zn(t,e){for(var n=[],i=null,s=t.getNext();s;){var r=s.getPlugin();r&&(i&&Vn(i.setNextPlugin)&&Vn(r.processTelemetry)&&i.setNextPlugin(r),Vn(r.isInitialized)&&r.isInitialized()||n.push(r),i=r,s=s.getNext())}fn.arrForEach(n,(function(n){n.initialize(t.getCfg(),t.core(),e,t.getNext())}))}function Wn(t){return t.sort((function(t,e){var n=0,i=Vn(e.processTelemetry);return Vn(t.processTelemetry)?n=i?t.priority-e.priority:1:i&&(n=-1),n}))}var Jn=fn.objDefineAccessors,$n=function(t){function e(){var n=t.call(this)||this;n.identifier="ChannelControllerPlugin",n.priority=500;var i,s=fn.arrForEach;function r(t){t&&t.length>0&&(function(t){s(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 Nn(e,n,(function(t,e){t.setNextPlugin=function(){},t.processTelemetry=function(t,e){i&&s(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&&fn.disableCookies(),function(t,e){if(i=[],t&&s(t,(function(t){return r(t)})),e){var n=[];s(e,(function(t){t.priority>500&&n.push(t)})),r(n)}}((n||{}).channels,o),s(i,(function(t){return zn(new Un(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=(Jn(e.prototype,"ChannelControls",e.prototype.getChannelControls),void Jn(e.prototype,"channelQueue",e.prototype.getChannelControls)),e}(Hn),Xn=fn.arrForEach,Gn=fn.isNullOrUndefined,Zn=function(){function t(){var e,n,i,s,r=!1;Nn(t,this,(function(t){t._extensions=new Array,n=new $n,t.logger=fn.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),e=[],t.isInitialized=function(){return r},t.initialize=function(e,s,a,o){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!e||Gn(e.instrumentationKey))throw Error("Please provide instrumentation key");i=o,t._notificationManager=o,t.config=e||{},e.extensions=Gn(e.extensions)?[]:e.extensions,(e.extensionConfig=Gn(e.extensionConfig)?{}:e.extensionConfig).NotificationManager=o,a&&(t.logger=a);var u=[];u.push.apply(u,s.concat(e.extensions)),u=Wn(u);var c=[],l={};if(Xn(u,(function(t){if(Gn(t)||Gn(t.initialize))throw Error("Extensions must provide callback to initialize");var e=t.priority,i=t.identifier;t&&e&&(Gn(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=Wn(u),t._extensions=u,zn(new Un([n],e,t),u),zn(new Un(c,e,t),u),t._extensions=c,0===t.getTransmissionControls().length)throw new Error("No channels available");r=!0,t.releaseQueue()},t.getTransmissionControls=function(){return n.getChannelControls()},t.track=function(n){n.iKey||(n.iKey=t.config.instrumentationKey),n.time||(n.time=fn.toISOString(new Date)),Gn(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 Un(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=fn.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return s||t.config&&t.config.enablePerfMgr&&(s=new Ln(t.getNotifyMgr())),s},t.setPerfMgr=function(t){s=t},t.eventCnt=function(){return e.length},t.releaseQueue=function(){e.length>0&&(Xn(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}(),Kn=function(){function t(e){this.listeners=[];var n=fn.arrForEach,i=!!(e||{}).perfEvtsSendAll;Nn(t,this,(function(t){t.addNotificationListener=function(e){t.listeners.push(e)},t.removeNotificationListener=function(e){for(var n=fn.arrIndexOf(t.listeners,e);n>-1;)t.listeners.splice(n,1),n=fn.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}(),Yn=function(t){function e(){var n=t.call(this)||this;return Nn(e,n,(function(t,e){function n(e){var n=t.getNotifyMgr();n&&n.eventsDiscarded([e],2)}t.initialize=function(t,n,i,s){e.initialize(t,n,i||new In(t),s||new Kn(t))},t.track=function(i){Dn(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw n(i),Error("Invalid telemetry item");!function(t){if(fn.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:[];fn.arrForEach(n,(function(n){var i={name:e||"InternalMessageId: "+n.messageId,iKey:t.config.instrumentationKey,time:fn.toISOString(new Date),baseType:Bn.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}(Zn),Qn=["req","rsp","hkErr","fnErr"];function ti(t,e){if(t)for(var n=0;n<t.length&&!e(t[n],n);n++);}function ei(t,e,n,i,s){s>=0&&s<=2&&ti(t,(function(t,r){var a=t.cbks,o=a[Qn[s]];if(o){e.ctx=function(){return i[r]=i[r]||{}};try{o.apply(e.inst,n)}catch(t){var u=e.err;try{var c=a[Qn[2]];c&&(e.err=t,c.apply(e.inst,n))}catch(t){}finally{e.err=u}}}}))}var ni,ii,si,ri=Object.getPrototypeOf;function ai(t,e,n){var i=null;return t&&(fn.hasOwnProperty(t,e)?i=t:n&&(i=ai(function(t){if(t){if(ri)return ri(t);var e=t.__proto__||t.prototype||t.constructor;if(e)return e}return null}(t),e,!1))),i}function oi(t,e,n,i){if(void 0===i&&(i=!0),t&&e&&n){var s=ai(t,e,i);if(s){var r=s[e];if("function"==typeof r){var a=r._aiHooks;if(!a){var o=(c=a={i:0,n:e,f:r,h:[]},function(){var t=this,e=arguments,n=c.h,i={name:c.n,inst:t,ctx:null,set:o},s=[],r=a([i],e);function a(t,e){return ti(e,(function(e){t.push(e)})),t}function o(t,n){(e=a([],e))[t]=n,r=a([i],e)}ei(n,i,r,s,0);var u=c.f;try{i.rslt=u.apply(t,e)}catch(t){throw i.err=t,ei(n,i,r,s,3),t}return ei(n,i,r,s,1),i.rslt});o._aiHooks=a,s[e]=o}var u={id:a.i,cbks:n,rm:function(){var t=this.id;ti(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"}(ni||(ni={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(ii||(ii={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(si||(si={}));var ui,ci=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}(),li=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(e,n,i){var s=n.length,r=t.sanitizeKey(e,n);if(r.length!==s){for(var a=0,o=r;void 0!==i[o];)a++,o=r.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(a);r=o}return r},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(dn.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 s;return void 0===i&&(i=t.MAX_STRING_LENGTH),n&&(i=i||t.MAX_STRING_LENGTH,(n=t.trim(n)).toString().length>i&&(s=n.toString().substring(0,i),e.throwInternal(dn.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:n},!0))),s||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(dn.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(dn.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={};hn(n,(function(n,s){if(fn.isObject(s)&&Xe())try{s=Ge().stringify(s)}catch(t){e.throwInternal(dn.WARNING,49,"custom property is not valid",{exception:t},!0)}s=t.sanitizeString(e,s,t.MAX_PROPERTY_LENGTH),n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=s})),n=i}return n},t.sanitizeMeasurements=function(e,n){if(n){var i={};hn(n,(function(n,s){n=t.sanitizeKeyAndAddUniqueness(e,n,i),i[n]=s})),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,s){var r;return n&&(n=t.trim(n)).length>i&&(r=n.substring(0,i),e.throwInternal(dn.WARNING,s,"input is too long, it has been truncated to "+i+" characters.",{data:n},!0)),r||n},t.padNumber=function(t){var e="00"+t;return e.substr(e.length-3)},t.trim=function(t){return fn.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}(),hi=We(),di=fn.isString,fi=null,mi=function(){function t(){}return t.createDomEvent=function(t){var e=null;if(fn.isFunction(Event))e=new Event(t);else{var n=ze();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(ni.LocalStorage):null},t._getVerifiedStorageObject=function(t){var e,n,i=null;try{if(fn.isNullOrUndefined(Oe()))return null;n=new Date,(i=Ue(t===ni.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(ni.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(dn.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setStorage=function(e,n,i){var s=t._getLocalStorageObject();if(null!==s)try{return s.setItem(n,i),!0}catch(n){t._canUseLocalStorage=!1,e.throwInternal(dn.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(dn.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(ni.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(ni.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var e=[];return t.canUseSessionStorage()&&hn(Ue("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(dn.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(n),{exception:t.dump(n)})}return null},t.setSessionStorage=function(e,n,i){var s=t._getSessionStorageObject();if(null!==s)try{return s.setItem(n,i),!0}catch(n){t._canUseSessionStorage=!1,e.throwInternal(dn.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(dn.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(n),{exception:t.dump(n)})}return!1},t.disableCookies=function(){fn.disableCookies()},t.canUseCookies=function(e){if(void 0===fn._canUseCookies){fn._canUseCookies=!1;try{fn._canUseCookies=void 0!==t.document.cookie}catch(n){e.throwInternal(dn.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(n),{exception:t.dump(n)})}}return fn._canUseCookies},t.disallowsSameSiteNone=function(t){return!!di(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,s){if(t.canUseCookies(e)){var r="",a="";s&&(r=";domain="+s);var o=Je();o&&"https:"===o.protocol&&(a=";secure",null===fi&&(fi=t.disallowsSameSiteNone((We()||{}).userAgent)),fi||(i+=";SameSite=None")),t.document.cookie=n+"="+i+r+";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 s=n+"=",r=t.document.cookie.split(";"),a=0;a<r.length;a++){var o=r[a];if((o=t.trim(o))&&0===o.indexOf(s)){i=o.substring(s.length,r[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 fn.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var e=t?t.toLowerCase():hi?(hi.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,s=""+Math.floor(t/36e5)%24,r=Math.floor(t/864e5);return(r>0?r+".":"")+(s=s.length<2?"0"+s:s)+":"+(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,s){return("Script error."===t||"Script error"===t)&&!s},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+"'":Xe()&&(n=Ge().stringify(t)),e+n},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,e){return pn.Attach(He(),t,e)},t.IsBeaconApiSupported=function(){return"sendBeacon"in hi&&hi.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=ze()||{},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=fn.strTrim,t.newId=fn.newId,t.generateW3CId=fn.generateW3CId,t.isArray=fn.isArray,t.isError=fn.isError,t.isDate=fn.isDate,t.toISOStringForIE8=fn.toISOString,t}(),pi=function(){function t(){}return t.parseUrl=function(e){var n=t._htmlAnchorIdx,i=t._htmlAnchorElement,s=i[n];return t.document.createElement?i[n]||(s=i[n]=t.document.createElement("a")):s={host:t.parseHost(e,!0)},s.href=e,++n>=i.length&&(n=0),t._htmlAnchorIdx=n,s},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 s=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=s&&s.length>3&&di(s[2])&&s[2].length>0)return s[2]+(s[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&&di(i[2])&&i[2].length>0&&(n=i[2]||"",e&&i.length>2)){var s=(i[1]||"").toLowerCase(),r=i[3]||"";("http"===s&&":80"===r||"https"===s&&":443"===r)&&(r=""),n+=r}}return n},t.document=ze()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),vi=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 s=pi.parseUrl(e).host.toLowerCase();if(!s||-1===s.indexOf(":443")&&-1===s.indexOf(":80")||(s=(pi.parseFullHost(e,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||s===n))return!1;var r,a=t&&t.correlationHeaderDomains;if(a&&(fn.arrForEach(a,(function(t){var e=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));r=r||e.test(s)})),!r))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(s))return!1;return s&&s.length>0},t.getCorrelationContext=function(e){if(e){var n=t.getCorrelationContextValue(e,ci.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 s=n[i].split("=");if(2===s.length&&s[0]===e)return s[1]}},t.correlationIdPrefix="cid-v1:",t}(),wi=function(){function t(){}return t.ParseDependencyPath=function(t,e,n,i){var s,r=i,a=i;if(e&&e.length>0){var o=pi.parseUrl(e);if(s=o.host,!r)if(null!=o.pathname){var u=0===o.pathname.length?"/":o.pathname;"/"!==u.charAt(0)&&(u="/"+u),a=o.pathname,r=li.sanitizeString(t,n?n+" "+u:u)}else r=li.sanitizeString(t,e)}else s=i,r=i;return{target:s,name:r,data:a}},t}(),gi=function(){function t(){}return t.Now=function(){var t=$e();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||fn.isNullOrUndefined(t)||fn.isNullOrUndefined(e)||(n=e-t),n},t}(),yi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",bi=function(){function t(){}return t.parse=function(e){if(!e)return{};var n=e.split(t._FIELDS_SEPARATOR),i=fn.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 fn.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}(),xi=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}((function(){})),Ci=function(t){function e(e,n,i){var s=t.call(this)||this;return s.name=li.sanitizeString(e,i)||mi.NotSpecified,s.data=n,s.time=fn.toISOString(new Date),s.aiDataContract={time:ii.Required,iKey:ii.Required,name:ii.Required,sampleRate:function(){return 100===s.sampleRate?ii.Hidden:ii.Required},tags:ii.Required,data:ii.Required},s}return __extends(e,t),e}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),ki=function(){},Si=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(ki),Fi=function(t){function e(e,n,i,s){var r=t.call(this)||this;return r.aiDataContract={ver:ii.Required,name:ii.Required,properties:ii.Default,measurements:ii.Default},r.name=li.sanitizeString(e,n)||mi.NotSpecified,r.properties=li.sanitizeProperties(e,i),r.measurements=li.sanitizeMeasurements(e,s),r}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Si),Mi=function(t){function e(e,n,i,s,r,a){var o,u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,exceptions:ii.Required,severityLevel:ii.Default,properties:ii.Default,measurements:ii.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,fn.isNullOrUndefined(n.isManual)||(u.isManual=n.isManual)):(u.exceptions=[new Ai(e,n)],u.properties=li.sanitizeProperties(e,i)||{},u.measurements=li.sanitizeMeasurements(e,s),r&&(u.severityLevel=r),a&&(u.id=a)),u}return __extends(e,t),e.CreateFromInterface=function(t,n,i,s){var r=n.exceptions&&fn.arrMap(n.exceptions,(function(e){return Ai.CreateFromInterface(t,e)}));return new e(t,__assign({},n,{exceptions:r}),i,s)},e.prototype.toInterface=function(){var t=this,e=t.exceptions,n=t.properties,i=t.measurements,s=t.severityLevel,r=t.problemGroup,a=t.id,o=t.isManual;return{ver:"4.0",exceptions:e instanceof Array&&fn.arrMap(e,(function(t){return t.toInterface()}))||void 0,severityLevel:s,properties:n,measurements:i,problemGroup:r,id:a,isManual:o}},e.CreateSimpleException=function(t,e,n,i,s){return{exceptions:[{hasFullStack:!0,message:t,stack:s,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}(ki)),Ai=function(t){function e(n,i){var s,r=t.call(this)||this;if(r.aiDataContract={id:ii.Default,outerId:ii.Default,typeName:ii.Required,message:ii.Required,hasFullStack:ii.Default,stack:ii.Default,parsedStack:ii.Array},"hasFullStack"in(s=i)&&"typeName"in s)r.typeName=i.typeName,r.message=i.message,r.stack=i.stack,r.parsedStack=i.parsedStack,r.hasFullStack=i.hasFullStack;else{var a=i;mi.isError(a)||(a=a.error||a.evt||a),r.typeName=li.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))||mi.NotSpecified,r.message=li.sanitizeMessage(n,i.message)||mi.NotSpecified;var o=i.stack;r.parsedStack=e.parseStack(o),r.stack=li.sanitizeException(n,o),r.hasFullStack=mi.isArray(r.parsedStack)&&r.parsedStack.length>0}return r}return __extends(e,t),e.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&fn.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&&fn.arrMap(n.parsedStack,(function(t){return _i.CreateFromInterface(t)}))||n.parsedStack;return new e(t,__assign({},n,{parsedStack:i}))},e.parseStack=function(t){var e;if(fn.isString(t)){var n=t.split("\n");e=[];for(var i=0,s=0,r=0;r<=n.length;r++)if(_i.regex.test(n[r])){var a=new _i(n[r],i++);s+=a.sizeInBytes,e.push(a)}if(s>32768)for(var o=0,u=e.length-1,c=0,l=o,h=u;o<u;){if((c+=e[o].sizeInBytes+e[u].sizeInBytes)>32768){e.splice(l,h-l+1);break}l=o,h=u,o++,u--}}return e},e}((function(){this.hasFullStack=!0,this.parsedStack=[]})),_i=function(t){function e(n,i){var s=t.call(this)||this;if(s.sizeInBytes=0,s.aiDataContract={level:ii.Required,method:ii.Required,assembly:ii.Default,fileName:ii.Default,line:ii.Default},"string"==typeof n){var r=n;s.level=i,s.method="<no_method>",s.assembly=mi.trim(r),s.fileName="",s.line=0;var a=r.match(e.regex);a&&a.length>=5&&(s.method=mi.trim(a[2])||s.method,s.fileName=mi.trim(a[4]),s.line=parseInt(a[5])||0)}else s.level=n.level,s.method=n.method,s.assembly=n.assembly,s.fileName=n.fileName,s.line=n.line,s.sizeInBytes=0;return s.sizeInBytes+=s.method.length,s.sizeInBytes+=s.fileName.length,s.sizeInBytes+=s.assembly.length,s.sizeInBytes+=e.baseSize,s.sizeInBytes+=s.level.toString().length,s.sizeInBytes+=s.line.toString().length,s}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(){})),Ni=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}(ki);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(ui||(ui={}));var Ei,Bi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.aiDataContract={name:ii.Required,kind:ii.Default,value:ii.Required,count:ii.Default,min:ii.Default,max:ii.Default,stdDev:ii.Default},e}return __extends(e,t),e}((function(){this.kind=ui.Measurement})),Ii=function(t){function e(e,n,i,s,r,a,o,u){var c=t.call(this)||this;c.aiDataContract={ver:ii.Required,metrics:ii.Required,properties:ii.Default};var l=new Bi;return l.count=s>0?s:void 0,l.max=isNaN(a)||null===a?void 0:a,l.min=isNaN(r)||null===r?void 0:r,l.name=li.sanitizeString(e,n)||mi.NotSpecified,l.value=i,c.metrics=[l],c.properties=li.sanitizeProperties(e,o),c.measurements=li.sanitizeMeasurements(e,u),c}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Ni),Pi=function(t){function e(){var e=t.call(this)||this;return e.ver=2,e.properties={},e.measurements={},e}return __extends(e,t),e}(Si),Li=function(t){function e(e,n,i,s,r,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,name:ii.Default,url:ii.Default,duration:ii.Default,properties:ii.Default,measurements:ii.Default,id:ii.Default},u.id=li.sanitizeId(e,o),u.url=li.sanitizeUrl(e,i),u.name=li.sanitizeString(e,n)||mi.NotSpecified,isNaN(s)||(u.duration=mi.msToTimeSpan(s)),u.properties=li.sanitizeProperties(e,r),u.measurements=li.sanitizeMeasurements(e,a),u}return __extends(e,t),e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Pi),Di=function(t){function e(e,n,i,s,r,a,o,u,c,l,h,d){void 0===c&&(c="Ajax");var f=t.call(this)||this;f.aiDataContract={id:ii.Required,ver:ii.Required,name:ii.Default,resultCode:ii.Default,duration:ii.Default,success:ii.Default,data:ii.Default,target:ii.Default,type:ii.Default,properties:ii.Default,measurements:ii.Default,kind:ii.Default,value:ii.Default,count:ii.Default,min:ii.Default,max:ii.Default,stdDev:ii.Default,dependencyKind:ii.Default,dependencySource:ii.Default,commandName:ii.Default,dependencyTypeName:ii.Default},f.id=n,f.duration=mi.msToTimeSpan(r),f.success=a,f.resultCode=o+"",f.type=li.sanitizeString(e,c);var m=wi.ParseDependencyPath(e,i,u,s);return f.data=li.sanitizeUrl(e,s)||m.data,f.target=li.sanitizeString(e,m.target),l&&(f.target=f.target+" | "+l),f.name=li.sanitizeString(e,m.name),f.properties=li.sanitizeProperties(e,h),f.measurements=li.sanitizeMeasurements(e,d),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}(ki)),ji=function(t){function e(e,n,i,s,r){var a=t.call(this)||this;return a.aiDataContract={ver:ii.Required,message:ii.Required,severityLevel:ii.Default,properties:ii.Default},a.message=li.sanitizeMessage(e,n=n||mi.NotSpecified),a.properties=li.sanitizeProperties(e,s),a.measurements=li.sanitizeMeasurements(e,r),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}(ki)),Ti=function(t){function e(e,n,i,s,r,a,o){var u=t.call(this)||this;return u.aiDataContract={ver:ii.Required,name:ii.Default,url:ii.Default,duration:ii.Default,perfTotal:ii.Default,networkConnect:ii.Default,sentRequest:ii.Default,receivedResponse:ii.Default,domProcessing:ii.Default,properties:ii.Default,measurements:ii.Default},u.url=li.sanitizeUrl(e,i),u.name=li.sanitizeString(e,n)||mi.NotSpecified,u.properties=li.sanitizeProperties(e,r),u.measurements=li.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}(Pi)),Ri=function(t){function e(e,n){var i=t.call(this)||this;return i.aiDataContract={baseType:ii.Required,baseData:ii.Required},i.baseType=e,i.baseData=n,i}return __extends(e,t),e}(xi);!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"}(Ei||(Ei={}));var Oi=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"},Ui=function(){function t(){}return t.create=function(t,e,n,i,s,r){if(n=li.sanitizeString(i,n)||mi.NotSpecified,fn.isNullOrUndefined(t)||fn.isNullOrUndefined(e)||fn.isNullOrUndefined(n))throw Error("Input doesn't contain all required fields");var a={name:n,time:fn.toISOString(new Date),iKey:"",ext:r||{},tags:[],data:{},baseType:e,baseData:t};return fn.isNullOrUndefined(s)||hn(s,(function(t,e){a.data[t]=e})),a},t}(),qi=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}(),Hi=new Oi,Vi=function t(e,n,i,s){Nn(t,this,(function(t){var r,a=fn.arrForEach,o=fn.isNullOrUndefined,u=null,c=[],l=!1;function h(){i&&a(i.getTransmissionControls(),(function(t){a(t,(function(t){return t.flush(!0)}))}))}i&&(r=i.logger),t.trackPageView=function(t,i){var d=t.name;if(o(d)||"string"!=typeof d){var f=ze();d=t.name=f&&f.title||""}var m=t.uri;if(o(m)||"string"!=typeof m){var p=Je();m=t.uri=p&&p.href||""}if(!s.isPerformanceTimingSupported())return e.sendPageViewInternal(t,i),h(),void r.throwInternal(dn.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,y=s.getPerformanceTiming().navigationStart;y>0&&(v=gi.GetDuration(y,+new Date),s.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),h(),g=!0),i||(i={}),c.push((function(){var n=!1;try{if(s.isPerformanceTimingDataReady()){n=!0;var a={name:d,uri:m};s.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 y>0&&gi.GetDuration(y,+new Date)>6e4&&(n=!0,g||(i.duration=6e4,e.sendPageViewInternal(t,i)))}catch(t){r.throwInternal(dn.CRITICAL,38,"trackPageView failed on page load calculation: "+mi.getExceptionName(t),{exception:mi.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&&h()}),100))}}))},zi=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: "+mi.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: "+mi.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,e){try{if(mi.canUseSessionStorage()){if(null!=mi.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var n=new Wi(t,e),i=Ge().stringify(n);mi.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+mi.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(mi.canUseSessionStorage()){var t=fn.dateNow(),e=mi.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(e&&Xe()){var n=Ge().parse(e);return n.pageVisitTime=t-n.pageVisitStartTime,mi.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),n}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+mi.dump(t)),null}},t}(),Wi=function(t,e){this.pageVisitStartTime=fn.dateNow(),this.pageName=t,this.pageUrl=e},Ji=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,s=gi.GetDuration(e.startTime,e.connectEnd),r=gi.GetDuration(e.requestStart,e.responseStart),a=gi.GetDuration(e.responseStart,e.responseEnd),o=gi.GetDuration(e.responseEnd,e.loadEventEnd);else i=gi.GetDuration(n.navigationStart,n.loadEventEnd),s=gi.GetDuration(n.navigationStart,n.connectEnd),r=gi.GetDuration(n.requestStart,n.responseStart),a=gi.GetDuration(n.responseStart,n.responseEnd),o=gi.GetDuration(n.responseEnd,n.loadEventEnd);0===i?this._logger.throwInternal(dn.WARNING,10,"error calculating page view performance.",{total:i,network:s,request:r,response:a,dom:o}):this.shouldCollectDuration(i,s,r,a,o)?i<Math.floor(s)+Math.floor(r)+Math.floor(a)+Math.floor(o)?this._logger.throwInternal(dn.WARNING,8,"client performance math error.",{total:i,network:s,request:r,response:a,dom:o}):(t.durationMs=i,t.perfTotal=t.duration=mi.msToTimeSpan(i),t.networkConnect=mi.msToTimeSpan(s),t.sentRequest=mi.msToTimeSpan(r),t.receivedResponse=mi.msToTimeSpan(a),t.domProcessing=mi.msToTimeSpan(o),t.isValid=!0):this._logger.throwInternal(dn.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:s,request:r,response:a,dom:o})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?$e().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?$e().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=$e();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=$e();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=$e(),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=We()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],s=n.userAgent,r=!1;if(s)for(var a=0;a<i.length;a++)r=r||-1!==s.toLowerCase().indexOf(i[a]);if(r)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 $i(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}var Xi=function(t){function e(){var e=t.call(this)||this;e.identifier="ApplicationInsightsAnalytics",e.priority=180,e.autoRoutePVDelay=500,e._trackAjaxAttempts=0;var n=Je();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=mi.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=mi.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=mi.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=mi.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=mi.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=mi.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=mi.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=mi.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},e.prototype.processTelemetry=function(t,e){var n=this;Dn(this.core,(function(){return n.identifier+":processTelemetry"}),(function(){var i=!1,s=n._telemetryInitializers.length;e=n._getTelCtx(e);for(var r=0;r<s;++r){var a=n._telemetryInitializers[r];if(a)try{if(!1===a.apply(null,[t])){i=!0;break}}catch(t){e.diagLog().throwInternal(dn.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+mi.getExceptionName(t),{exception:mi.dump(t)},!0)}}i||n.processNext(t,e)}),(function(){return{item:t}}),!t.sync)},e.prototype.trackEvent=function(t,e){try{var n=Ui.create(t,Fi.dataType,Fi.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.WARNING,39,"trackTrace failed, trace will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.stopTrackEvent=function(t,e){try{this._eventTracking.stop(t,void 0,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.trackTrace=function(t,e){try{var n=Ui.create(t,ji.dataType,ji.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.WARNING,39,"trackTrace failed, trace will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.trackMetric=function(t,e){try{var n=Ui.create(t,Ii.dataType,Ii.envelopeType,this.diagLog(),e);this.core.track(n)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,36,"trackMetric failed, metric will not be collected: "+mi.getExceptionName(t),{exception:mi.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(dn.CRITICAL,37,"trackPageView failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.sendPageViewInternal=function(t,e,n){var i=ze();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var s=Ui.create(t,Li.dataType,Li.envelopeType,this.diagLog(),e,n);this.core.track(s),this._trackAjaxAttempts=0},e.prototype.sendPageViewPerformanceInternal=function(t,e,n){var i=Ui.create(t,Ti.dataType,Ti.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(dn.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var e=ze();t=e&&e.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.stopTrackPage=function(t,e,n,i){try{if("string"!=typeof t){var s=ze();t=s&&s.title||""}if("string"!=typeof e){var r=Je();e=r&&r.href||""}this._pageTracking.stop(t,e,n,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype.sendExceptionInternal=function(t,e,n){var i=new Mi(this.diagLog(),t.exception||new Error(mi.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),s=Ui.create(i,Mi.dataType,Mi.envelopeType,this.diagLog(),e,n);this.core.track(s)},e.prototype.trackException=function(t,e){try{this.sendExceptionInternal(t,e)}catch(t){this.diagLog().throwInternal(dn.CRITICAL,35,"trackException failed, exception will not be collected: "+mi.getExceptionName(t),{exception:mi.dump(t)})}},e.prototype._onerror=function(t){try{var e={url:t&&t.url||(ze()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(mi.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(e.url);else{if(!mi.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:Ei.Error},e)}}catch(e){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(dn.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e),errorString:i})}},e.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},e.prototype.initialize=function(n,i,s,r){var a=this;if(!this.isInitialized()){if(fn.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,n,i,s,r),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&&(hn(c,(function(t,e){a.config[t]=o.getConfig(u,t,e)})),this._globalconfig&&hn(c,(function(t,e){void 0===a._globalconfig[t]&&(a._globalconfig[t]=e)}))),this.config.isCookieUseDisabled&&mi.disableCookies(),this.config.isStorageUseDisabled&&mi.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 Ji(this.core),this._pageViewManager=new Vi(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new zi(this.diagLog(),(function(t,e,n){return a.trackPageVisitTime(t,e,n)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new Gi(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 Gi(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,e,n,i,s){fn.isNullOrUndefined(i)&&(i={}),i.duration=n.toString(),a.sendPageViewInternal({name:t,uri:e,properties:i,measurements:s},i)};var h,d=He(),f=Boolean("object"==typeof history&&history)?history:Ue("history"),m=Je(),p=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&d){var v=d.onerror;d.onerror=function(t,e,n,i,s){var r=v&&v(t,e,n,i,s);return!0!==r&&p._onerror({message:t,url:e,lineNumber:n,columnNumber:i,error:s}),r},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&d){var w=d.onunhandledrejection;d.onunhandledrejection=function(t){var e=w&&w.call(d,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&&fn.isFunction(f.pushState)&&fn.isFunction(f.replaceState)&&d&&"undefined"!=typeof Event){var g=this;fn.arrForEach(s,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(a._properties=t)})),f.pushState=(h=f.pushState,function(){var t=h.apply(this,arguments);return $i(d,mi.createDomEvent(g.config.namePrefix+"pushState")),$i(d,mi.createDomEvent(g.config.namePrefix+"locationchange")),t}),f.replaceState=function(t){return function(){var e=t.apply(this,arguments);return $i(d,mi.createDomEvent(g.config.namePrefix+"replaceState")),$i(d,mi.createDomEvent(g.config.namePrefix+"locationchange")),e}}(f.replaceState),d.addEventListener&&(d.addEventListener(g.config.namePrefix+"popstate",(function(){$i(d,mi.createDomEvent(g.config.namePrefix+"locationchange"))})),d.addEventListener(g.config.namePrefix+"locationchange",(function(){g._properties&&g._properties.context&&g._properties.context.telemetryTrace&&(g._properties.context.telemetryTrace.traceID=mi.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===Di.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=Ui.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},Mi.dataType,Mi.envelopeType,this.diagLog(),{url:t});this.core.track(e)},e.Version="2.5.10",e}(Hn),Gi=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(dn.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 s=this._events[t];if(isNaN(s))this._logger.throwInternal(dn.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var r=+new Date,a=gi.GetDuration(s,r);this.action(t,e,a,n,i)}delete this._events[t],this._events[t]=void 0},t}(),Zi=function t(e){var n=[];Nn(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(){}}))},Ki=function(){function t(e,n){var i,s=!1;Nn(t,this,(function(r){var a=c(t.BUFFER_KEY),o=c(t.SENT_BUFFER_KEY);function u(t,e){var n=[];return fn.arrForEach(e,(function(e){fn.isFunction(e)||-1!==fn.arrIndexOf(t,e)||n.push(e)})),n}function c(t){var i=t;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var s=mi.getSessionStorage(e,i);if(s){var r=Ge().parse(s);if(fn.isString(r)&&(r=Ge().parse(r)),r&&mi.isArray(r))return r}}catch(t){e.throwInternal(dn.CRITICAL,42," storage key: "+i+", "+mi.getExceptionName(t),{exception:mi.dump(t)})}return[]}function l(t,i){var s=t;try{s=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+s:s;var r=JSON.stringify(i);mi.setSessionStorage(e,s,r)}catch(t){mi.setSessionStorage(e,s,JSON.stringify([])),e.throwInternal(dn.WARNING,41," storage key: "+s+", "+mi.getExceptionName(t)+". Buffer cleared",{exception:mi.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),r.enqueue=function(n){i.length>=t.MAX_BUFFER_SIZE?s||(e.throwInternal(dn.WARNING,67,"Maximum buffer size reached: "+i.length,!0),s=!0):(i.push(n),l(t.BUFFER_KEY,i))},r.count=function(){return i.length},r.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),s=!1},r.getItems=function(){return i.slice(0)},r.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},r.markAsSent=function(n){i=u(n,i),l(t.BUFFER_KEY,i);var s=c(t.SENT_BUFFER_KEY);s instanceof Array&&n instanceof Array&&((s=s.concat(n)).length>t.MAX_BUFFER_SIZE&&(e.throwInternal(dn.CRITICAL,67,"Sent buffer reached its maximum size: "+s.length,!0),s.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,s))},r.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}(),Yi=fn.isNullOrUndefined;function Qi(t,e,n){return t&&n?(t[e]=n,t[e]):null}var ts=function(){function t(){}return t.extractPropsAndMeasurements=function(t,e,n){Yi(t)||hn(t,(function(t,i){fn.isNumber(i)?n[t]=i:fn.isString(i)?e[t]=i:Xe()&&(e[t]=Ge().stringify(i))}))},t.createEnvelope=function(e,n,i,s){var r=new Ci(e,s,n);Qi(r,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(r.time=fn.toISOString(i.baseData.startTime)),r.iKey=i.iKey;var a=i.iKey.replace(/-/g,"");return r.name=r.name.replace("{0}",a),t.extractPartAExtensions(i,r),i.tags=i.tags||[],r},t.extractPartAExtensions=function(e,n){var i=n.tags=n.tags||{},s=e.ext=e.ext||{},r=e.tags=e.tags||[],a=s.user;a&&(Qi(i,Hi.userAuthUserId,a.authId),Qi(i,Hi.userId,a.id||a.localId));var o=s.app;o&&Qi(i,Hi.sessionId,o.sesId);var u=s.device;u&&(Qi(i,Hi.deviceId,u.id||u.localId),Qi(i,Hi.deviceType,u.deviceClass),Qi(i,Hi.deviceIp,u.ip),Qi(i,Hi.deviceModel,u.model),Qi(i,Hi.deviceType,u.deviceType));var c=e.ext.web;if(c){Qi(i,Hi.deviceLanguage,c.browserLang),Qi(i,Hi.deviceBrowserVersion,c.browserVer),Qi(i,Hi.deviceBrowser,c.browser);var l=n.data=n.data||{},h=l.baseData=l.baseData||{},d=h.properties=h.properties||{};Qi(d,"domain",c.domain),Qi(d,"isManual",c.isManual?"true":null),Qi(d,"screenRes",c.screenRes),Qi(d,"userConsent",c.userConsent?"true":null)}var f=s.os;f&&Qi(i,Hi.deviceOS,f.name);var m=s.trace;m&&(Qi(i,Hi.operationParentId,m.parentID),Qi(i,Hi.operationName,m.name),Qi(i,Hi.operationId,m.traceID));for(var p={},v=r.length-1;v>=0;v--)hn(r[v],(function(t,e){p[t]=e})),r.splice(v,1);hn(r,(function(t,e){p[t]=e})),n.tags=__assign({},i,p),n.tags[Hi.internalSdkVersion]||(n.tags[Hi.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,e){this._logger=t,Yi(e.baseData)&&this._logger.throwInternal(dn.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),es=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||{},s=n.baseData.properties||{};ts.extractPropsAndMeasurements(n.data,s,i);var r=n.baseData;if(Yi(r))return e.warnToConsole("Invalid input for dependency data"),null;var a=new Di(e,r.id,r.target,r.name,r.duration,r.success,r.responseCode,r.properties&&r.properties["http.method"]?r.properties["http.method"]:"GET",r.type,r.correlationContext,s,i),o=new Ri(Di.dataType,a);return ts.createEnvelope(e,Di.envelopeType,n,o)},e.DependencyEnvelopeCreator=new e,e}(ts),ns=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={},s={};n.baseType!==Fi.dataType&&(i.baseTypeSource=n.baseType),n.baseType===Fi.dataType?(i=n.baseData.properties||{},s=n.baseData.measurements||{}):n.baseData&&ts.extractPropsAndMeasurements(n.baseData,i,s),ts.extractPropsAndMeasurements(n.data,i,s);var r=new Fi(e,n.baseData.name,i,s),a=new Ri(Fi.dataType,r);return ts.createEnvelope(e,Fi.envelopeType,n,a)},e.EventEnvelopeCreator=new e,e}(ts),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||{},s=n.baseData.properties||{};ts.extractPropsAndMeasurements(n.data,s,i);var r=Mi.CreateFromInterface(e,n.baseData,s,i),a=new Ri(Mi.dataType,r);return ts.createEnvelope(e,Mi.envelopeType,n,a)},e.ExceptionEnvelopeCreator=new e,e}(ts),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,s=i.properties||{},r=i.measurements||{};ts.extractPropsAndMeasurements(n.data,s,r);var a=new Ii(e,i.name,i.average,i.sampleCount,i.min,i.max,s,r),o=new Ri(Ii.dataType,a);return ts.createEnvelope(e,Ii.envelopeType,n,o)},e.MetricEnvelopeCreator=new e,e}(ts),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,s=n.baseData;Yi(s)||Yi(s.properties)||Yi(s.properties.duration)?Yi(n.data)||Yi(n.data.duration)||(i=n.data.duration,delete n.data.duration):(i=s.properties.duration,delete s.properties.duration);var r,a=n.baseData;((n.ext||{}).trace||{}).traceID&&(r=n.ext.trace.traceID);var o=a.id||r,u=a.name,c=a.uri,l=a.properties||{},h=a.measurements||{};Yi(a.refUri)||(l.refUri=a.refUri),Yi(a.pageType)||(l.pageType=a.pageType),Yi(a.isLoggedIn)||(l.isLoggedIn=a.isLoggedIn.toString()),Yi(a.properties)||hn(a.properties,(function(t,e){l[t]=e})),ts.extractPropsAndMeasurements(n.data,l,h);var d=new Li(e,u,c,i,l,h,o),f=new Ri(Li.dataType,d);return ts.createEnvelope(e,Li.envelopeType,n,f)},e.PageViewEnvelopeCreator=new e,e}(ts),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,s=i.name,r=i.uri||i.url,a=i.properties||{},o=i.measurements||{};ts.extractPropsAndMeasurements(n.data,a,o);var u=new Ti(e,s,r,void 0,a,o,i),c=new Ri(Ti.dataType,u);return ts.createEnvelope(e,Ti.envelopeType,n,c)},e.PageViewPerformanceEnvelopeCreator=new e,e}(ts),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=n.baseData.message,s=n.baseData.severityLevel,r=n.baseData.properties||{},a=n.baseData.measurements||{};ts.extractPropsAndMeasurements(n.data,r,a);var o=new ji(e,i,s,r,a),u=new Ri(ji.dataType,o);return ts.createEnvelope(e,ji.envelopeType,n,u)},e.TraceEnvelopeCreator=new e,e}(ts),us=function t(e){Nn(t,this,(function(t){function n(t,r){var a={};if(!t)return e.throwInternal(dn.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:r},!0),a;if(t.__aiCircularRefCheck)return e.throwInternal(dn.WARNING,50,"Circular reference detected while serializing object",{name:r},!0),a;if(!t.aiDataContract){if("measurements"===r)a=s(t,"number",r);else if("properties"===r)a=s(t,"string",r);else if("tags"===r)a=s(t,"string",r);else if(mi.isArray(t))a=i(t,r);else{e.throwInternal(dn.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:r},!0);try{Ge().stringify(t),a=t}catch(t){e.throwInternal(dn.CRITICAL,48,t&&fn.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return a}return t.__aiCircularRefCheck=!0,hn(t.aiDataContract,(function(s,o){var u=fn.isFunction(o)?o()&ii.Required:o&ii.Required,c=fn.isFunction(o)?o()&ii.Hidden:o&ii.Hidden,l=o&ii.Array,h=void 0!==t[s],d=fn.isObject(t[s])&&null!==t[s];if(!u||h||l){if(!c){var f;void 0!==(f=d?l?i(t[s],s):n(t[s],s):t[s])&&(a[s]=f)}}else e.throwInternal(dn.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:s,name:r})})),delete t.__aiCircularRefCheck,a}function i(t,i){var s;if(t)if(mi.isArray(t)){s=[];for(var r=0;r<t.length;r++){var a=n(t[r],i+"["+r+"]");s.push(a)}}else e.throwInternal(dn.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 s}function s(t,n,i){var s;return t&&(s={},hn(t,(function(t,r){if("string"===n)s[t]=void 0===r?"undefined":null===r?"null":r.toString?r.toString():"invalid field: toString() is not defined.";else if("number"===n)if(void 0===r)s[t]="undefined";else if(null===r)s[t]="null";else{var a=parseFloat(r);s[t]=isNaN(a)?"NaN":a}else s[t]="invalid field: "+i+" is of unknown type.",e.throwInternal(dn.CRITICAL,s[t],null,!0)}))),s}t.serialize=function(t){var i=n(t,"root");try{return Ge().stringify(i)}catch(t){e.throwInternal(dn.CRITICAL,48,t&&fn.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},cs=function(){function t(){var e=He(),n=ze(),i=!1,s=!0;Nn(t,this,(function(t){try{if(e&&pn.Attach(e,"online",a)&&(pn.Attach(e,"offline",o),i=!0),n){var r=n.body||n;fn.isUndefined(r.ononline)||(r.ononline=a,r.onoffline=o,i=!0)}}catch(t){i=!1}function a(){s=!0}function o(){s=!1}t.isListening=i,t.isOnline=function(){var t=!0,e=We();return i?t=s:e&&!fn.isNullOrUndefined(e.onLine)&&(t=e.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,ls=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}(),hs=function(){function t(){this.hashCodeGeneragor=new ls,this.keys=new Oi}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}(),ds=function(){function t(t,e){this.INT_MAX_VALUE=2147483647,this._logger=fn.isNullOrUndefined(e)?new In:e,(t>100||t<0)&&(this._logger.throwInternal(dn.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 hs}return t.prototype.isSampledIn=function(t){var e=this.sampleRate;return null==e||e>=100||t.baseType===Ii.dataType||this.samplingScoreGenerator.getSamplingScore(t)<e},t}();
6
6
  /*!
7
7
  * Application Insights JavaScript SDK - Channel, 2.5.10
8
8
  * Copyright (c) Microsoft and contributors. All rights reserved.
9
9
  */
10
- function fs(t){try{return t.responseText}catch(t){}return null}var ms=function(t){function e(){var n,i,s,r,a=t.call(this)||this;return a.priority=1001,a.identifier="AppInsightsChannelPlugin",a._XMLHttpRequestSupported=!1,Nn(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),s=new Blob([i],{type:"text/plain;charset=UTF-8"});We().sendBeacon(n,s)?(t._buffer.markAsSent(e),t._onSuccess(e,e.length)):(l(e,!0),t.diagLog().throwInternal(dn.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(e,n){var i=new XMLHttpRequest,s=t._senderConfig.endpointUrl();try{i[yi]=!0}catch(t){}i.open("POST",s,n),i.setRequestHeader("Content-type","application/json"),mi.isInternalApplicationInsightsEndpoint(s)&&i.setRequestHeader(ci.sdkContextHeader,ci.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,e,e.length)},i.onerror=function(n){return t._onError(e,p(i),n)};var r=t._buffer.batchPayloads(e);i.send(r),t._buffer.markAsSent(e)}function h(e){try{if(e&&""!==e){var n=Ge().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){t.diagLog().throwInternal(dn.CRITICAL,43,"Cannot parse the response. "+mi.getExceptionName(n),{response:e})}return null}function d(e,s){if(void 0===s&&(s=1),e&&0!==e.length){t._buffer.clearSent(e),n++;for(var r=0,a=e;r<a.length;r++)t._buffer.enqueue(a[r]);!function(t){var e;if(n<=1)e=10;else{var s=(Math.pow(2,n)-1)/2,r=Math.floor(Math.random()*s*10)+1;e=Math.max(Math.min(r*=t,3600),10)}var a=fn.dateNow()+1e3*e;i=a}(s),f()}}function f(){if(!s){var e=i?Math.max(0,i-fn.dateNow()):0,n=Math.max(t._senderConfig.maxBatchInterval(),e);s=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:"+fs(t)||t.response||"":e}function v(e){var n=He(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,e)},i.onerror=function(n){return t._onError(e,w(i),n)};var s=n&&n.location&&n.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(s,0))return t.diagLog().throwInternal(dn.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var r=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",r);var a=t._buffer.batchPayloads(e);i.send(a),t._buffer.markAsSent(e)}function w(t,e){return t?"XDomainRequest,Response:"+fs(t)||"":e}t.pause=u,t.resume=u,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,22,"flush failed, telemetry will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!mi.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,c,2)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t.teardown=u,t.initialize=function(s,a,u,h){o.initialize(s,a,u,h);var d=t._getTelCtx(),f=t.identifier;r=new us(a.logger),n=0,i=null,t._sender=null;var m=e._getDefaultAppInsightsChannelConfig();if(t._senderConfig=e._getEmptyAppInsightsChannelConfig(),hn(m,(function(e,n){t._senderConfig[e]=function(){return d.getConfig(f,e,n())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&mi.canUseSessionStorage()?new Ki(t.diagLog(),t._senderConfig):new Zi(t._senderConfig),t._sample=new ds(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(fn.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)}(s)||t.diagLog().throwInternal(dn.CRITICAL,100,"Invalid Instrumentation key "+s.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&mi.IsBeaconApiSupported())t._sender=c;else if(void 0!==typeof XMLHttpRequest){var p=Ue("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(dn.CRITICAL,7,"Cannot send empty telemetry");if(n.baseData&&!n.baseType)return void i.diagLog().throwInternal(dn.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(n.baseType||(n.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(dn.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(n))return void i.diagLog().throwInternal(dn.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});n.sampleRate=t._sample.sampleRate;var s=e.constructEnvelope(n,t._senderConfig.instrumentationKey(),i.diagLog());if(!s)return void i.diagLog().throwInternal(dn.CRITICAL,47,"Unable to create an AppInsights envelope");var a=!1;if(n.tags&&n.tags.ProcessLegacy&&(fn.arrForEach(n.tags.ProcessLegacy,(function(t){try{t&&!1===t(s)&&(a=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(dn.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+mi.getExceptionName(t),{exception:mi.dump(t)},!0)}})),delete n.tags.ProcessLegacy),a)return;var o=r.serialize(s),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(dn.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+mi.getExceptionName(t),{exception:mi.dump(t)})}t.processNext(n,i)},t._xhrReadyStateChange=function(e,i,s){if(4===e.readyState){var r=null;t._appId||(r=h(fs(e)||e.response))&&r.appId&&(t._appId=r.appId),(e.status<200||e.status>=300)&&0!==e.status?!t._senderConfig.isRetryDisabled()&&m(e.status)?(d(i),t.diagLog().throwInternal(dn.WARNING,40,". Response code "+e.status+". Will retry to send "+i.length+" items.")):t._onError(i,p(e)):cs.isOffline()?t._senderConfig.isRetryDisabled()||(d(i,10),t.diagLog().throwInternal(dn.WARNING,40,". Offline - Response Code: "+e.status+". Offline status: "+cs.isOffline()+". Will retry to send "+i.length+" items.")):206===e.status?(r||(r=h(fs(e)||e.response)),r&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,r):t._onError(i,p(e))):(n=0,t._onSuccess(i,s))}},t.triggerSend=function(e,n,r){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,s=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(s&&s.eventsSendRequest)try{s.eventsSendRequest(e,n)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,74,"send request notification failed: "+mi.getExceptionName(e),{exception:mi.dump(e)})}}(r||0,e),n?n.call(a,o,e):t._sender(o,e)}clearTimeout(s),s=null,i=null}catch(e){var u=mi.getIEVersion();(!u||u>9)&&t.diagLog().throwInternal(dn.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t._onError=function(e,n){t.diagLog().throwInternal(dn.WARNING,26,"Failed to send telemetry.",{message:n}),t._buffer.clearSent(e)},t._onPartialSuccess=function(e,n){for(var i=[],s=[],r=0,a=n.errors.reverse();r<a.length;r++){var o=a[r],u=e.splice(o.index,1)[0];m(o.statusCode)?s.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(" "))),s.length>0&&(d(s),t.diagLog().throwInternal(dn.WARNING,40,"Partial success. Delivered: "+e.length+", Failed: "+i.length+". Will retry to send "+s.length+" our of "+n.itemsReceived+" items"))},t._onSuccess=function(e){t._buffer.clearSent(e)},t._xdrOnLoad=function(e,i){var s=fs(e);if(!e||s+""!="200"&&""!==s){var r=h(s);r&&r.itemsReceived&&r.itemsReceived>r.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,r):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||fn.isNullOrUndefined(e)?t:__assign({},t,{iKey:e})).baseType){case Fi.dataType:return ns.EventEnvelopeCreator.Create(n,i);case Di.dataType:return os.TraceEnvelopeCreator.Create(n,i);case Li.dataType:return rs.PageViewEnvelopeCreator.Create(n,i);case Ti.dataType:return as.PageViewPerformanceEnvelopeCreator.Create(n,i);case Mi.dataType:return is.ExceptionEnvelopeCreator.Create(n,i);case Ii.dataType:return ss.MetricEnvelopeCreator.Create(n,i);case ji.dataType:return es.DependencyEnvelopeCreator.Create(n,i);default:return ns.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}(Hn),ps=function(){},vs=function(){function t(e,n){var i=this;this._logger=fn.isNullOrUndefined(n)?new In: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 ps}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=mi.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var e=mi.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(dn.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+mi.getExceptionName(t),{exception:mi.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(dn.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=mi.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),mi.canUseLocalStorage()||this._logger.throwInternal(dn.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(),s=n+this.config.sessionRenewalMs(),r=new Date,a=[t,e,n];r.setTime(i<s?i:s);var o=this.config.cookieDomain?this.config.cookieDomain():null,u=0===this.config.sessionExpirationMs()?"0":r.toUTCString();mi.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+u,o),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,e,n){mi.setStorage(this._logger,this._storageNamePrefix(),[t,e,n].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),ws=function(){},gs=function(){this.id="browser",this.deviceClass="Browser"},ys=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},bs=function(){function t(e,n){this.isNewUser=!1,this._logger=n;var i=mi.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var s=i.split(t.cookieSeparator);s.length>0&&(this.id=s[0])}if(this.config=e,!this.id){this.id=fn.newId(e&&e.idLength?e.idLength():22);var r=new Date,a=fn.toISOString(r);this.accountAcquisitionDate=a,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var o=[this.id,a],u=this.config.cookieDomain?this.config.cookieDomain():void 0;mi.setCookie(this._logger,t.userCookieName,o.join(t.cookieSeparator)+";expires="+r.toUTCString(),u);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";mi.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():void 0;var l=mi.getCookie(this._logger,t.authUserCookieName);if(l){var h=(l=decodeURI(l)).split(t.cookieSeparator);h[0]&&(this.authenticatedId=h[0]),h.length>1&&h[1]&&(this.accountId=h[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(dn.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 s=this.authenticatedId;n&&(this.accountId=n,s=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&mi.setCookie(this._logger,t.authUserCookieName,encodeURI(s),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,mi.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}(),xs=function(){},Cs=function(t,e,n,i){this.traceID=t||mi.generateW3CId(),this.parentID=e,this.name=n;var s=$e();!n&&s&&s.pathname&&(this.name=s.pathname),this.name=li.sanitizeString(i,this.name)},ks=function(){function t(t,e){var n=this;n.application=new ws,n.internal=new ys(e),qe()&&(n.sessionManager=new vs(e,t),n.device=new gs,n.location=new xs,n.user=new bs(e,t),n.telemetryTrace=new Cs(void 0,void 0,void 0,t),n.session=new ps),n.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var e=this.session,n=this.sessionManager,i=e||n&&n.automaticSession;i&&fn.isString(i.id)&&(t.ext.app.sesId=i.id),e&&(t.ext.app.sesId=fn.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&&(fn.isString(e.ver)&&(t.tags[Hi.applicationVersion]=e.ver),fn.isString(e.build)&&(t.tags[Hi.applicationBuild]=e.build))},t.prototype.applyDeviceContext=function(t){var e=this.device;e&&(fn.isString(e.id)&&(t.ext.device.localId=e.id),fn.isString(e.ip)&&(t.ext.device.ip=e.ip),fn.isString(e.model)&&(t.ext.device.model=e.model),fn.isString(e.deviceClass)&&(t.ext.device.deviceClass=e.deviceClass))},t.prototype.applyInternalContext=function(t){var e=this.internal;e&&(fn.isString(e.agentVersion)&&(t.tags[Hi.internalAgentVersion]=e.agentVersion),fn.isString(e.sdkVersion)&&(t.tags[Hi.internalSdkVersion]=e.sdkVersion),t.baseType!==Bn.dataType&&t.baseType!==Li.dataType||(fn.isString(e.snippetVer)&&(t.tags[Hi.internalSnippet]=e.snippetVer),fn.isString(e.sdkSrc)&&(t.tags[Hi.internalSdkSrc]=e.sdkSrc)))},t.prototype.applyLocationContext=function(t){var e=this.location;e&&fn.isString(e.ip)&&(t.tags[Hi.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};fn.isString(e.traceID)&&(n.traceID=e.traceID),fn.isString(e.name)&&(n.name=e.name),fn.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=[]),fn.isString(e.accountId)&&(t.tags[Hi.userAccountId]=e.accountId),fn.isString(e.id)&&(t.ext.user.id=e.id),fn.isString(e.authenticatedId)&&(t.ext.user.authId=e.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[qi.DeviceExt]&&0===fn.objKeys(t.ext[qi.DeviceExt]).length&&delete t.ext[qi.DeviceExt],t.ext[qi.UserExt]&&0===fn.objKeys(t.ext[qi.UserExt]).length&&delete t.ext[qi.UserExt],t.ext[qi.WebExt]&&0===fn.objKeys(t.ext[qi.WebExt]).length&&delete t.ext[qi.WebExt],t.ext[qi.OSExt]&&0===fn.objKeys(t.ext[qi.OSExt]).length&&delete t.ext[qi.OSExt],t.ext[qi.AppExt]&&0===fn.objKeys(t.ext[qi.AppExt]).length&&delete t.ext[qi.AppExt],t.ext[qi.TraceExt]&&0===fn.objKeys(t.ext[qi.TraceExt]).length&&delete t.ext[qi.TraceExt]},t}(),Ss=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,s,r){var a=this;t.prototype.initialize.call(this,n,i,s,r);var o=this._getTelCtx(),u=this.identifier,c=e.getDefaultConfig();this._extensionConfig=this._extensionConfig||e.getDefaultConfig(),hn(c,(function(t,e){a._extensionConfig[t]=function(){return o.getConfig(u,t,e())}})),this.context=new ks(i.logger,this._extensionConfig),this._breezeChannel=mi.getExtension(s,"AppInsightsChannelPlugin"),this.context.appId=function(){return a._breezeChannel?a._breezeChannel._appId:null}},e.prototype.processTelemetry=function(t,e){if(fn.isNullOrUndefined(t));else{if(e=this._getTelCtx(e),t.name===Li.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 Bn(72,(We()||{}).userAgent||"");e.diagLog().logInternalMessage(dn.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[qi.DeviceExt]=n[qi.DeviceExt]||{},n[qi.WebExt]=n[qi.WebExt]||{},n[qi.UserExt]=n[qi.UserExt]||{},n[qi.OSExt]=n[qi.OSExt]||{},n[qi.AppExt]=n[qi.AppExt]||{},n[qi.TraceExt]=n[qi.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}(Hn),Fs=fn.objKeys,Ms=fn.arrForEach;function As(t,e,n){var i=0,s=t[e],r=t[n];return s&&r&&(i=gi.GetDuration(s,r)),i}function _s(t,e,n,i,s){var r=0,a=As(n,i,s);return a&&(r=Ns(t,e,mi.msToTimeSpan(a))),r}function Ns(t,e,n){var i=0;return t&&e&&n&&((t.ajaxPerf=t.ajaxPerf||{})[e]=n,i=1),i}var Es=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},Bs=function t(e,n,i){var s=this,r=i;s.perfMark=null,s.completed=!1,s.requestHeadersSize=null,s.requestHeaders=null,s.responseReceivingDuration=null,s.callbackDuration=null,s.ajaxTotalDuration=null,s.aborted=0,s.pageUrl=null,s.requestUrl=null,s.requestSize=0,s.method=null,s.status=null,s.requestSentTime=null,s.responseStartedTime=null,s.responseFinishedTime=null,s.callbackFinishedTime=null,s.endTime=null,s.xhrMonitoringState=new Es,s.clientFailure=0,s.traceID=e,s.spanID=n,Nn(t,s,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?pi.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?li.sanitizeUrl(r,pi.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(e,n,i){if(t.ajaxTotalDuration=Math.round(1e3*gi.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var s,r=((s={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},s);if(function(t,e){var n=t.perfTiming,i=e.properties||{},s=0,r=fn.isString,a="redirect",o="startTime",u="connectEnd",c="requestStart",l="responseEnd",h=a+"Start",d=a="End";if(n){s|=_s(i,a,n,h,d),s|=_s(i,"domainLookup",n,"domainLookupStart","domainLookupEnd"),s|=_s(i,"connect",n,"connectStart",u),s|=_s(i,"request",n,c,"requestEnd"),s|=_s(i,"response",n,"responseStart",l),s|=_s(i,"networkConnect",n,o,u),s|=_s(i,"sentRequest",n,c,l);var f=n.duration;f||(f=As(n,o,l)||0),s|=Ns(i,"duration",f),s|=Ns(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]||{};hn(t,(function(t,e){("name"!==t&&r(e)||fn.isNumber(e))&&(i[t]&&(e=i[t]+";"+e),!e&&r(e)||(i[t]=e))})),p[n]=i})),s|=Ns(i,"serverTiming",p)}s|=Ns(i,"transferSize",n.transferSize),s|=Ns(i,"encodedBodySize",n.encodedBodySize),s|=Ns(i,"decodedBodySize",n.decodedBodySize)}else t.perfMark&&(s|=Ns(i,"missing",t.perfAttempts));s&&(e.properties=i)}(t,r),n&&Fs(t.requestHeaders).length>0&&(r.properties=r.properties||{},r.properties.requestHeaders=t.requestHeaders),i){var a=i();if(a){var o=a.correlationContext;if(o&&(r.correlationContext=o),a.headerMap&&Fs(a.headerMap).length>0&&(r.properties=r.properties||{},r.properties.responseHeaders=a.headerMap),t.status>=400){var u=a.type;r.properties=r.properties||{},""!==u&&"text"!==u||(r.properties.responseText=a.responseText?a.statusText+" - "+a.responseText:a.statusText),"json"===u&&(r.properties.responseText=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return r}}))},Is=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:mi.generateW3CId(),i.spanId=n&&t.isValidSpanId(n)?n:mi.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}(),Ps=fn.isNullOrUndefined,Ls=fn.arrForEach,js=0;function Ds(t){var e="";try{Ps(t)||Ps(t.ajaxData)||Ps(t.ajaxData.requestUrl)||(e+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return e}function Ts(t,e,n,i,s){t.diagLog().throwInternal(dn.CRITICAL,e,n,i,s)}function Rs(t,e,n,i,s){t.diagLog().throwInternal(dn.WARNING,e,n,i,s)}function Os(t,e,n){return function(i){Ts(t,e,n,{ajaxDiagnosticsMessage:Ds(i.inst),exception:mi.dump(i.err)})}}function Us(t,e){return t&&e?t.indexOf(e):-1}var qs,Hs=function(t){function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var i,s,r,a,o=$e(),u=!1,c=!1,l=o&&o.host&&o.host.toLowerCase(),h=e.getEmptyConfig(),d=!1,f=0,m=!1,p=0,v=!1,w=[],g={};return Nn(e,n,(function(t,n){function o(t,e,n){w.push(function(t,e,n){return t?oi(t.prototype,e,n,!1):null}(t,e,n))}function y(t,e,n){var i=!1,s=((fn.isString(e)?e:(e||{}).url||"")||"").toLowerCase(),r=Us(s,"?"),a=Us(s,"#");return(-1===r||-1!==a&&a<r)&&(r=a),-1!==r&&(s=s.substring(0,r)),Ps(t)?Ps(e)||(i="object"==typeof e&&!0===e[yi]||!!n&&!0===n[yi]):i=!0===t[yi]||!0===s[yi],i?g[s]||(g[s]=1):g[s]&&(i=!0),i}function b(t,e){var n=!0,i=c;return Ps(t)||(n=!0===e||!Ps(t.ajaxData)),i&&n}function x(t){try{var e=t.responseType;if(""===e||"text"===e)return t.responseText}catch(t){}return null}function C(e){try{var n=e.getAllResponseHeaders();if(null!==n&&-1!==Us(n.toLowerCase(),ci.requestContextHeaderLowerCase)){var i=e.getResponseHeader(ci.requestContextHeader);return vi.getCorrelationContext(i)}}catch(n){Rs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ds(e),exception:mi.dump(n)})}}function k(t,e){if(e.requestUrl&&a&&m){var n=Xe();if(n&&fn.isFunction(n.mark)){js++;var i=a+t+"#"+js;n.mark(i);var s=n.getEntriesByName(i);s&&1===s.length&&(e.perfMark=s[0])}}}function S(t,e,n,i){var s=e.perfMark,r=Xe(),a=h.maxAjaxPerfLookupAttempts,o=h.ajaxPerfLookupDelay,u=e.requestUrl,c=0;!function l(){try{if(r&&s){c++;for(var h=null,d=r.getEntries(),f=d.length-1;f>=0;f--){var m=d[f];if(m){if("resource"===m.entryType)m.initiatorType!==t||-1===Us(m.name,u)&&-1===Us(u,m.name)||(h=m);else if("mark"===m.entryType&&m.name===s.name){e.perfTiming=h;break}if(m.startTime<s.startTime-1e3)break}}}!s||e.perfTiming||c>=a||!1===e.async?(s&&fn.isFunction(r.clearMarks)&&r.clearMarks(s.name),e.perfAttempts=c,n()):setTimeout(l,o)}catch(t){i(t)}}()}function F(e){var n="";try{Ps(e)||(n+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){Ts(t,15,"Failed to grab failed fetch diagnostics message",{exception:mi.dump(e)})}return n}function M(e,n,i,s,r){function a(e,n,s){var r=s||{};r.fetchDiagnosticsMessage=F(i),n&&(r.exception=mi.dump(n)),Rs(t,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}s&&(s.responseFinishedTime=gi.Now(),s.status=n,S("fetch",s,(function(){var e=s.CreateTrackItem("Fetch",d,r);e?t.trackDependencyDataInternal(e):a(14,null,{requestSentTime:s.requestSentTime,responseFinishedTime:s.responseFinishedTime})}),(function(t){a(18,t,null)})))}function A(e){if(e&&e.headers)try{var n=e.headers.get(ci.requestContextHeader);return vi.getCorrelationContext(n)}catch(n){Rs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:F(e),exception:mi.dump(n)})}}t.initialize=function(l,f,g,F){if(!t.isInitialized()){n.initialize(l,f,g,F);var _=t._getTelCtx();hn(e.getDefaultConfig(),(function(t,n){h[t]=_.getConfig(e.identifier,t,n)}));var N=h.distributedTracingMode;if(d=h.enableRequestHeaderTracking,p=h.maxAjaxCallsPerView,v=h.enableResponseHeaderTracking,r=N===si.AI||N===si.AI_AND_W3C,s=N===si.AI_AND_W3C||N===si.W3C,m=h.enableAjaxPerfTracking){var E=l.instrumentationKey||"unkwn";a=E.length>5?"ai.ajxmn."+E.substring(E.length-5)+".":"ai.ajxmn."+E+"."}if(!1===h.disableAjaxTracking&&function(t){var e=!1;if("undefined"!=typeof XMLHttpRequest&&!Ps(XMLHttpRequest)){var n=XMLHttpRequest.prototype;e=!(Ps(n)||Ps(n.open)||Ps(n.send)||Ps(n.abort))}var i=mi.getIEVersion();if(i&&i<9&&(e=!1),e)try{(new XMLHttpRequest).ajaxData={};var s=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=s}catch(n){e=!1,Ts(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:mi.dump(n)})}return e}(t)&&!c&&(o(XMLHttpRequest,"open",{req:function(e,n,s,r){var a=e.inst,o=a.ajaxData;y(a,s)||!b(a,!0)||o&&o.xhrMonitoringState.openDone||function(e,n,s,r){var a=i&&i.telemetryTrace&&i.telemetryTrace.traceID||mi.generateW3CId(),o=mi.generateW3CId().substr(0,16),u=new Bs(a,o,t.diagLog());u.method=n,u.requestUrl=s,u.xhrMonitoringState.openDone=!0,u.requestHeaders={},u.async=r,e.ajaxData=u,function(e){e.ajaxData.xhrMonitoringState.stateChangeAttached=pn.Attach(e,"readystatechange",(function(){try{e&&4===e.readyState&&b(e)&&function(e){var n=e.ajaxData;function i(n,i){var s=i||{};s.ajaxDiagnosticsMessage=Ds(e),n&&(s.exception=mi.dump(n)),Rs(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",s)}n.responseFinishedTime=gi.Now(),n.status=e.status,S("xmlhttprequest",n,(function(){try{var s=n.CreateTrackItem("Ajax",d,(function(){var t={statusText:e.statusText,headerMap:null,correlationContext:C(e),type:e.responseType,responseText:x(e),response:e.response};if(v){var n=e.getAllResponseHeaders();if(n){var i=fn.strTrim(n).split(/[\r\n]+/),s={};Ls(i,(function(t){var e=t.split(": "),n=e.shift(),i=e.join(": ");s[n]=i})),t.headerMap=s}}return t}));s?t.trackDependencyDataInternal(s):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=mi.dump(i);n&&-1!==Us(n.toLowerCase(),"c00c023f")||Ts(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ds(e),exception:n})}}))}(e)}(a,n,s,r)},hkErr:Os(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;b(n)&&!i.xhrMonitoringState.sendDone&&(k("xhr",i),i.requestSentTime=gi.Now(),n=t.includeCorrelationHeaders(i,void 0,void 0,n),i.xhrMonitoringState.sendDone=!0)},hkErr:Os(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;b(e)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Os(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),d&&o(XMLHttpRequest,"setRequestHeader",{req:function(t,e,n){var i=t.inst;b(i)&&(i.ajaxData.requestHeaders[e]=n)},hkErr:Os(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0),function(){var e,n=!(e=Oe())||Ps(e.Request)||Ps(e.Request.prototype)||Ps(e.fetch)?null:e.fetch;if(n){var s=Oe(),r=n.polyfill;!1===h.disableFetchTracking?(w.push(oi(s,"fetch",{req:function(e,n,s){var a;if(u&&!y(null,n,s)&&(!r||!c)){var o=e.ctx();a=function(e,n){var s=i&&i.telemetryTrace&&i.telemetryTrace.traceID||mi.generateW3CId(),r=mi.generateW3CId().substr(0,16),a=new Bs(s,r,t.diagLog());a.requestSentTime=gi.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 d&&new Headers((n?n.headers:0)||e instanceof Request&&e.headers||{}).forEach((function(t,e){u[e]=t})),a.requestHeaders=u,k("fetch",a),a}(n,s);var l=t.includeCorrelationHeaders(a,n,s);l!==s&&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 M(0,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:A(t)};if(v){var n={};t.headers.forEach((function(t,e){n[e]=t})),e.headerMap=n}return e})),t})).catch((function(t){throw M(0,0,e,n,null),t})))},hkErr:Os(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),u=!0):r&&w.push(oi(s,"fetch",{req:function(t,e,n){y(null,e,n)}})),r&&(s.fetch.polyfill=r)}}(),g.length>0&&g){for(var B=void 0,I=0;!B&&I<g.length;)g[I]&&"AppInsightsPropertiesPlugin"===g[I].identifier&&(B=g[I]),I++;B&&(i=B.context)}}},t.teardown=function(){Ls(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(vi.canIncludeCorrelationHeader(h,e.getAbsoluteUrl(),u)&&(a||(a={}),a.headers=new Headers(a.headers||n instanceof Request&&n.headers||{}),r&&(a.headers.set(ci.requestIdHeader,f="|"+e.traceID+"."+e.spanID),d&&(e.requestHeaders[ci.requestIdHeader]=f)),(m=h.appId||i&&i.appId())&&(a.headers.set(ci.requestContextHeader,ci.requestContextAppIdFormat+m),d&&(e.requestHeaders[ci.requestContextHeader]=ci.requestContextAppIdFormat+m)),s)){var c=new Is(e.traceID,e.spanID);a.headers.set(ci.traceParentHeader,c.toString()),d&&(e.requestHeaders[ci.traceParentHeader]=c.toString())}return a}if(o){var f,m;if(vi.canIncludeCorrelationHeader(h,e.getAbsoluteUrl(),u))r&&(o.setRequestHeader(ci.requestIdHeader,f="|"+e.traceID+"."+e.spanID),d&&(e.requestHeaders[ci.requestIdHeader]=f)),(m=h.appId||i&&i.appId())&&(o.setRequestHeader(ci.requestContextHeader,ci.requestContextAppIdFormat+m),d&&(e.requestHeaders[ci.requestContextHeader]=ci.requestContextAppIdFormat+m)),s&&(c=new Is(e.traceID,e.spanID),o.setRequestHeader(ci.traceParentHeader,c.toString()),d&&(e.requestHeaders[ci.traceParentHeader]=c.toString()));return o}},t.trackDependencyDataInternal=function(e,n,i){if(-1===p||f<p){h.distributedTracingMode!==si.W3C&&h.distributedTracingMode!==si.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),fn.isNullOrUndefined(e.startTime)&&(e.startTime=new Date);var s=Ui.create(e,ji.dataType,ji.envelopeType,t.diagLog(),n,i);t.core.track(s)}else f===p&&Ts(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:si.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 hn(t,(function(e){t[e]=void 0})),t},e.prototype.processTelemetry=function(t,e){this.processNext(t,e)},e.identifier="AjaxDependencyPlugin",e}(Hn),Vs=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=bi.parse(n.connectionString),s=i.ingestionendpoint;n.endpointUrl=s?s+"/v2/track":n.endpointUrl,n.instrumentationKey=i.instrumentationkey||n.instrumentationKey}e.appInsights=new Ji,e.properties=new Ss,e.dependencies=new Hs,e.core=new Yn,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),jn(this.core,(function(){return"AISKU.flush"}),(function(){fn.arrForEach(e.core.getTransmissionControls(),(function(e){fn.arrForEach(e,(function(e){e.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),fn.arrForEach(this.core.getTransmissionControls(),(function(e){fn.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 s=this;if(t&&s.config.extensions&&s.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return jn(s.core,(function(){return"AISKU.loadAppInsights"}),(function(){var r=[],a=new ms;r.push(a),r.push(s.properties),r.push(s.dependencies),r.push(s.appInsights),s.core.initialize(s.config,r,e,n),s.context=s.properties.context,qs&&s.context&&(s.context.internal.sdkSrc=qs),function(e){if(e){var n="";fn.isNullOrUndefined(s._snippetVersion)||(n+=s._snippetVersion),t&&(n+=".lg"),s.context&&s.context.internal&&(s.context.internal.snippetVer=n||"-"),hn(s,(function(t,n){fn.isString(t)&&!fn.isFunction(n)&&"_"!==t.substring(0,1)&&(e[t]=n)}))}}(s.snippet),s.emptyQueue(),s.pollInternalLogs(),s.addHousekeepingBeforeUnload(i)})),s},t.prototype.updateSnippetDefinitions=function(t){hn(this,(function(e,n){fn.isString(e)&&(t[e]=n)}))},t.prototype.emptyQueue=function(){var t=this;try{if(mi.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&&fn.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(qe()||Ve()){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=fn.addEventHandler("beforeunload",e);(n=fn.addEventHandler("pagehide",e)||n)||(i=We())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(dn.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||fn.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}();
10
+ function fs(t){try{return t.responseText}catch(t){}return null}var ms=function(t){function e(){var n,i,s,r,a=t.call(this)||this;return a.priority=1001,a.identifier="AppInsightsChannelPlugin",a._XMLHttpRequestSupported=!1,Nn(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),s=new Blob([i],{type:"text/plain;charset=UTF-8"});We().sendBeacon(n,s)?(t._buffer.markAsSent(e),t._onSuccess(e,e.length)):(l(e,!0),t.diagLog().throwInternal(dn.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(e,n){var i=new XMLHttpRequest,s=t._senderConfig.endpointUrl();try{i[yi]=!0}catch(t){}i.open("POST",s,n),i.setRequestHeader("Content-type","application/json"),mi.isInternalApplicationInsightsEndpoint(s)&&i.setRequestHeader(ci.sdkContextHeader,ci.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,e,e.length)},i.onerror=function(n){return t._onError(e,p(i),n)};var r=t._buffer.batchPayloads(e);i.send(r),t._buffer.markAsSent(e)}function h(e){try{if(e&&""!==e){var n=Ge().parse(e);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length)return n}}catch(n){t.diagLog().throwInternal(dn.CRITICAL,43,"Cannot parse the response. "+mi.getExceptionName(n),{response:e})}return null}function d(e,s){if(void 0===s&&(s=1),e&&0!==e.length){t._buffer.clearSent(e),n++;for(var r=0,a=e;r<a.length;r++)t._buffer.enqueue(a[r]);!function(t){var e;if(n<=1)e=10;else{var s=(Math.pow(2,n)-1)/2,r=Math.floor(Math.random()*s*10)+1;e=Math.max(Math.min(r*=t,3600),10)}var a=fn.dateNow()+1e3*e;i=a}(s),f()}}function f(){if(!s){var e=i?Math.max(0,i-fn.dateNow()):0,n=Math.max(t._senderConfig.maxBatchInterval(),e);s=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:"+fs(t)||t.response||"":e}function v(e){var n=He(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,e)},i.onerror=function(n){return t._onError(e,w(i),n)};var s=n&&n.location&&n.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(s,0))return t.diagLog().throwInternal(dn.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var r=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",r);var a=t._buffer.batchPayloads(e);i.send(a),t._buffer.markAsSent(e)}function w(t,e){return t?"XDomainRequest,Response:"+fs(t)||"":e}t.pause=u,t.resume=u,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,22,"flush failed, telemetry will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!mi.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,c,2)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t.teardown=u,t.initialize=function(s,a,u,h){o.initialize(s,a,u,h);var d=t._getTelCtx(),f=t.identifier;r=new us(a.logger),n=0,i=null,t._sender=null;var m=e._getDefaultAppInsightsChannelConfig();if(t._senderConfig=e._getEmptyAppInsightsChannelConfig(),hn(m,(function(e,n){t._senderConfig[e]=function(){return d.getConfig(f,e,n())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&mi.canUseSessionStorage()?new Ki(t.diagLog(),t._senderConfig):new Zi(t._senderConfig),t._sample=new ds(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(fn.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)}(s)||t.diagLog().throwInternal(dn.CRITICAL,100,"Invalid Instrumentation key "+s.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&mi.IsBeaconApiSupported())t._sender=c;else if(void 0!==typeof XMLHttpRequest){var p=Ue("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(dn.CRITICAL,7,"Cannot send empty telemetry");if(n.baseData&&!n.baseType)return void i.diagLog().throwInternal(dn.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(n.baseType||(n.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(dn.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(n))return void i.diagLog().throwInternal(dn.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});n.sampleRate=t._sample.sampleRate;var s=e.constructEnvelope(n,t._senderConfig.instrumentationKey(),i.diagLog());if(!s)return void i.diagLog().throwInternal(dn.CRITICAL,47,"Unable to create an AppInsights envelope");var a=!1;if(n.tags&&n.tags.ProcessLegacy&&(fn.arrForEach(n.tags.ProcessLegacy,(function(t){try{t&&!1===t(s)&&(a=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(dn.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+mi.getExceptionName(t),{exception:mi.dump(t)},!0)}})),delete n.tags.ProcessLegacy),a)return;var o=r.serialize(s),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(dn.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+mi.getExceptionName(t),{exception:mi.dump(t)})}t.processNext(n,i)},t._xhrReadyStateChange=function(e,i,s){if(4===e.readyState){var r=null;t._appId||(r=h(fs(e)||e.response))&&r.appId&&(t._appId=r.appId),(e.status<200||e.status>=300)&&0!==e.status?!t._senderConfig.isRetryDisabled()&&m(e.status)?(d(i),t.diagLog().throwInternal(dn.WARNING,40,". Response code "+e.status+". Will retry to send "+i.length+" items.")):t._onError(i,p(e)):cs.isOffline()?t._senderConfig.isRetryDisabled()||(d(i,10),t.diagLog().throwInternal(dn.WARNING,40,". Offline - Response Code: "+e.status+". Offline status: "+cs.isOffline()+". Will retry to send "+i.length+" items.")):206===e.status?(r||(r=h(fs(e)||e.response)),r&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,r):t._onError(i,p(e))):(n=0,t._onSuccess(i,s))}},t.triggerSend=function(e,n,r){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,s=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(s&&s.eventsSendRequest)try{s.eventsSendRequest(e,n)}catch(e){t.diagLog().throwInternal(dn.CRITICAL,74,"send request notification failed: "+mi.getExceptionName(e),{exception:mi.dump(e)})}}(r||0,e),n?n.call(a,o,e):t._sender(o,e)}clearTimeout(s),s=null,i=null}catch(e){var u=mi.getIEVersion();(!u||u>9)&&t.diagLog().throwInternal(dn.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+mi.getExceptionName(e),{exception:mi.dump(e)})}},t._onError=function(e,n){t.diagLog().throwInternal(dn.WARNING,26,"Failed to send telemetry.",{message:n}),t._buffer.clearSent(e)},t._onPartialSuccess=function(e,n){for(var i=[],s=[],r=0,a=n.errors.reverse();r<a.length;r++){var o=a[r],u=e.splice(o.index,1)[0];m(o.statusCode)?s.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(" "))),s.length>0&&(d(s),t.diagLog().throwInternal(dn.WARNING,40,"Partial success. Delivered: "+e.length+", Failed: "+i.length+". Will retry to send "+s.length+" our of "+n.itemsReceived+" items"))},t._onSuccess=function(e){t._buffer.clearSent(e)},t._xdrOnLoad=function(e,i){var s=fs(e);if(!e||s+""!="200"&&""!==s){var r=h(s);r&&r.itemsReceived&&r.itemsReceived>r.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,r):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||fn.isNullOrUndefined(e)?t:__assign({},t,{iKey:e})).baseType){case Fi.dataType:return ns.EventEnvelopeCreator.Create(n,i);case ji.dataType:return os.TraceEnvelopeCreator.Create(n,i);case Li.dataType:return rs.PageViewEnvelopeCreator.Create(n,i);case Ti.dataType:return as.PageViewPerformanceEnvelopeCreator.Create(n,i);case Mi.dataType:return is.ExceptionEnvelopeCreator.Create(n,i);case Ii.dataType:return ss.MetricEnvelopeCreator.Create(n,i);case Di.dataType:return es.DependencyEnvelopeCreator.Create(n,i);default:return ns.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}(Hn),ps=function(){},vs=function(){function t(e,n){var i=this;this._logger=fn.isNullOrUndefined(n)?new In: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 ps}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=mi.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var e=mi.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(dn.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+mi.getExceptionName(t),{exception:mi.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(dn.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=mi.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),mi.canUseLocalStorage()||this._logger.throwInternal(dn.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(),s=n+this.config.sessionRenewalMs(),r=new Date,a=[t,e,n];r.setTime(i<s?i:s);var o=this.config.cookieDomain?this.config.cookieDomain():null,u=0===this.config.sessionExpirationMs()?"0":r.toUTCString();mi.setCookie(this._logger,this._storageNamePrefix(),a.join("|")+";expires="+u,o),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,e,n){mi.setStorage(this._logger,this._storageNamePrefix(),[t,e,n].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),ws=function(){},gs=function(){this.id="browser",this.deviceClass="Browser"},ys=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},bs=function(){function t(e,n){this.isNewUser=!1,this._logger=n;var i=mi.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var s=i.split(t.cookieSeparator);s.length>0&&(this.id=s[0])}if(this.config=e,!this.id){this.id=fn.newId(e&&e.idLength?e.idLength():22);var r=new Date,a=fn.toISOString(r);this.accountAcquisitionDate=a,this.isNewUser=!0,r.setTime(r.getTime()+31536e6);var o=[this.id,a],u=this.config.cookieDomain?this.config.cookieDomain():void 0;mi.setCookie(this._logger,t.userCookieName,o.join(t.cookieSeparator)+";expires="+r.toUTCString(),u);var c=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";mi.removeStorage(this._logger,c)}this.accountId=e.accountId?e.accountId():void 0;var l=mi.getCookie(this._logger,t.authUserCookieName);if(l){var h=(l=decodeURI(l)).split(t.cookieSeparator);h[0]&&(this.authenticatedId=h[0]),h.length>1&&h[1]&&(this.accountId=h[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(dn.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 s=this.authenticatedId;n&&(this.accountId=n,s=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&mi.setCookie(this._logger,t.authUserCookieName,encodeURI(s),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,mi.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}(),xs=function(){},Cs=function(t,e,n,i){this.traceID=t||mi.generateW3CId(),this.parentID=e,this.name=n;var s=Je();!n&&s&&s.pathname&&(this.name=s.pathname),this.name=li.sanitizeString(i,this.name)},ks=function(){function t(t,e){var n=this;n.application=new ws,n.internal=new ys(e),qe()&&(n.sessionManager=new vs(e,t),n.device=new gs,n.location=new xs,n.user=new bs(e,t),n.telemetryTrace=new Cs(void 0,void 0,void 0,t),n.session=new ps),n.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var e=this.session,n=this.sessionManager,i=e||n&&n.automaticSession;i&&fn.isString(i.id)&&(t.ext.app.sesId=i.id),e&&(t.ext.app.sesId=fn.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&&(fn.isString(e.ver)&&(t.tags[Hi.applicationVersion]=e.ver),fn.isString(e.build)&&(t.tags[Hi.applicationBuild]=e.build))},t.prototype.applyDeviceContext=function(t){var e=this.device;e&&(fn.isString(e.id)&&(t.ext.device.localId=e.id),fn.isString(e.ip)&&(t.ext.device.ip=e.ip),fn.isString(e.model)&&(t.ext.device.model=e.model),fn.isString(e.deviceClass)&&(t.ext.device.deviceClass=e.deviceClass))},t.prototype.applyInternalContext=function(t){var e=this.internal;e&&(fn.isString(e.agentVersion)&&(t.tags[Hi.internalAgentVersion]=e.agentVersion),fn.isString(e.sdkVersion)&&(t.tags[Hi.internalSdkVersion]=e.sdkVersion),t.baseType!==Bn.dataType&&t.baseType!==Li.dataType||(fn.isString(e.snippetVer)&&(t.tags[Hi.internalSnippet]=e.snippetVer),fn.isString(e.sdkSrc)&&(t.tags[Hi.internalSdkSrc]=e.sdkSrc)))},t.prototype.applyLocationContext=function(t){var e=this.location;e&&fn.isString(e.ip)&&(t.tags[Hi.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};fn.isString(e.traceID)&&(n.traceID=e.traceID),fn.isString(e.name)&&(n.name=e.name),fn.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=[]),fn.isString(e.accountId)&&(t.tags[Hi.userAccountId]=e.accountId),fn.isString(e.id)&&(t.ext.user.id=e.id),fn.isString(e.authenticatedId)&&(t.ext.user.authId=e.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[qi.DeviceExt]&&0===fn.objKeys(t.ext[qi.DeviceExt]).length&&delete t.ext[qi.DeviceExt],t.ext[qi.UserExt]&&0===fn.objKeys(t.ext[qi.UserExt]).length&&delete t.ext[qi.UserExt],t.ext[qi.WebExt]&&0===fn.objKeys(t.ext[qi.WebExt]).length&&delete t.ext[qi.WebExt],t.ext[qi.OSExt]&&0===fn.objKeys(t.ext[qi.OSExt]).length&&delete t.ext[qi.OSExt],t.ext[qi.AppExt]&&0===fn.objKeys(t.ext[qi.AppExt]).length&&delete t.ext[qi.AppExt],t.ext[qi.TraceExt]&&0===fn.objKeys(t.ext[qi.TraceExt]).length&&delete t.ext[qi.TraceExt]},t}(),Ss=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,s,r){var a=this;t.prototype.initialize.call(this,n,i,s,r);var o=this._getTelCtx(),u=this.identifier,c=e.getDefaultConfig();this._extensionConfig=this._extensionConfig||e.getDefaultConfig(),hn(c,(function(t,e){a._extensionConfig[t]=function(){return o.getConfig(u,t,e())}})),this.context=new ks(i.logger,this._extensionConfig),this._breezeChannel=mi.getExtension(s,"AppInsightsChannelPlugin"),this.context.appId=function(){return a._breezeChannel?a._breezeChannel._appId:null}},e.prototype.processTelemetry=function(t,e){if(fn.isNullOrUndefined(t));else{if(e=this._getTelCtx(e),t.name===Li.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 Bn(72,(We()||{}).userAgent||"");e.diagLog().logInternalMessage(dn.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[qi.DeviceExt]=n[qi.DeviceExt]||{},n[qi.WebExt]=n[qi.WebExt]||{},n[qi.UserExt]=n[qi.UserExt]||{},n[qi.OSExt]=n[qi.OSExt]||{},n[qi.AppExt]=n[qi.AppExt]||{},n[qi.TraceExt]=n[qi.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}(Hn),Fs=fn.objKeys,Ms=fn.arrForEach;function As(t,e,n){var i=0,s=t[e],r=t[n];return s&&r&&(i=gi.GetDuration(s,r)),i}function _s(t,e,n,i,s){var r=0,a=As(n,i,s);return a&&(r=Ns(t,e,mi.msToTimeSpan(a))),r}function Ns(t,e,n){var i=0;return t&&e&&n&&((t.ajaxPerf=t.ajaxPerf||{})[e]=n,i=1),i}var Es=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},Bs=function t(e,n,i){var s=this,r=i;s.perfMark=null,s.completed=!1,s.requestHeadersSize=null,s.requestHeaders=null,s.responseReceivingDuration=null,s.callbackDuration=null,s.ajaxTotalDuration=null,s.aborted=0,s.pageUrl=null,s.requestUrl=null,s.requestSize=0,s.method=null,s.status=null,s.requestSentTime=null,s.responseStartedTime=null,s.responseFinishedTime=null,s.callbackFinishedTime=null,s.endTime=null,s.xhrMonitoringState=new Es,s.clientFailure=0,s.traceID=e,s.spanID=n,Nn(t,s,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?pi.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?li.sanitizeUrl(r,pi.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(e,n,i){if(t.ajaxTotalDuration=Math.round(1e3*gi.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var s,r=((s={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},s);if(function(t,e){var n=t.perfTiming,i=e.properties||{},s=0,r=fn.isString,a="redirect",o="startTime",u="connectEnd",c="requestStart",l="responseEnd",h=a+"Start",d=a="End";if(n){s|=_s(i,a,n,h,d),s|=_s(i,"domainLookup",n,"domainLookupStart","domainLookupEnd"),s|=_s(i,"connect",n,"connectStart",u),s|=_s(i,"request",n,c,"requestEnd"),s|=_s(i,"response",n,"responseStart",l),s|=_s(i,"networkConnect",n,o,u),s|=_s(i,"sentRequest",n,c,l);var f=n.duration;f||(f=As(n,o,l)||0),s|=Ns(i,"duration",f),s|=Ns(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]||{};hn(t,(function(t,e){("name"!==t&&r(e)||fn.isNumber(e))&&(i[t]&&(e=i[t]+";"+e),!e&&r(e)||(i[t]=e))})),p[n]=i})),s|=Ns(i,"serverTiming",p)}s|=Ns(i,"transferSize",n.transferSize),s|=Ns(i,"encodedBodySize",n.encodedBodySize),s|=Ns(i,"decodedBodySize",n.decodedBodySize)}else t.perfMark&&(s|=Ns(i,"missing",t.perfAttempts));s&&(e.properties=i)}(t,r),n&&Fs(t.requestHeaders).length>0&&(r.properties=r.properties||{},r.properties.requestHeaders=t.requestHeaders),i){var a=i();if(a){var o=a.correlationContext;if(o&&(r.correlationContext=o),a.headerMap&&Fs(a.headerMap).length>0&&(r.properties=r.properties||{},r.properties.responseHeaders=a.headerMap),t.status>=400){var u=a.type;r.properties=r.properties||{},""!==u&&"text"!==u||(r.properties.responseText=a.responseText?a.statusText+" - "+a.responseText:a.statusText),"json"===u&&(r.properties.responseText=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText)}}}return r}}))},Is=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:mi.generateW3CId(),i.spanId=n&&t.isValidSpanId(n)?n:mi.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}(),Ps=fn.isNullOrUndefined,Ls=fn.arrForEach,Ds=0;function js(t){var e="";try{Ps(t)||Ps(t.ajaxData)||Ps(t.ajaxData.requestUrl)||(e+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return e}function Ts(t,e,n,i,s){t.diagLog().throwInternal(dn.CRITICAL,e,n,i,s)}function Rs(t,e,n,i,s){t.diagLog().throwInternal(dn.WARNING,e,n,i,s)}function Os(t,e,n){return function(i){Ts(t,e,n,{ajaxDiagnosticsMessage:js(i.inst),exception:mi.dump(i.err)})}}function Us(t,e){return t&&e?t.indexOf(e):-1}var qs,Hs=function(t){function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var i,s,r,a,o=Je(),u=!1,c=!1,l=o&&o.host&&o.host.toLowerCase(),h=e.getEmptyConfig(),d=!1,f=0,m=!1,p=0,v=!1,w=[],g={};return Nn(e,n,(function(t,n){function o(t,e,n){w.push(function(t,e,n){return t?oi(t.prototype,e,n,!1):null}(t,e,n))}function y(t,e,n){var i=!1,s=((fn.isString(e)?e:(e||{}).url||"")||"").toLowerCase(),r=Us(s,"?"),a=Us(s,"#");return(-1===r||-1!==a&&a<r)&&(r=a),-1!==r&&(s=s.substring(0,r)),Ps(t)?Ps(e)||(i="object"==typeof e&&!0===e[yi]||!!n&&!0===n[yi]):i=!0===t[yi]||!0===s[yi],i?g[s]||(g[s]=1):g[s]&&(i=!0),i}function b(t,e){var n=!0,i=c;return Ps(t)||(n=!0===e||!Ps(t.ajaxData)),i&&n}function x(t){try{var e=t.responseType;if(""===e||"text"===e)return t.responseText}catch(t){}return null}function C(e){try{var n=e.getAllResponseHeaders();if(null!==n&&-1!==Us(n.toLowerCase(),ci.requestContextHeaderLowerCase)){var i=e.getResponseHeader(ci.requestContextHeader);return vi.getCorrelationContext(i)}}catch(n){Rs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:js(e),exception:mi.dump(n)})}}function k(t,e){if(e.requestUrl&&a&&m){var n=$e();if(n&&fn.isFunction(n.mark)){Ds++;var i=a+t+"#"+Ds;n.mark(i);var s=n.getEntriesByName(i);s&&1===s.length&&(e.perfMark=s[0])}}}function S(t,e,n,i){var s=e.perfMark,r=$e(),a=h.maxAjaxPerfLookupAttempts,o=h.ajaxPerfLookupDelay,u=e.requestUrl,c=0;!function l(){try{if(r&&s){c++;for(var h=null,d=r.getEntries(),f=d.length-1;f>=0;f--){var m=d[f];if(m){if("resource"===m.entryType)m.initiatorType!==t||-1===Us(m.name,u)&&-1===Us(u,m.name)||(h=m);else if("mark"===m.entryType&&m.name===s.name){e.perfTiming=h;break}if(m.startTime<s.startTime-1e3)break}}}!s||e.perfTiming||c>=a||!1===e.async?(s&&fn.isFunction(r.clearMarks)&&r.clearMarks(s.name),e.perfAttempts=c,n()):setTimeout(l,o)}catch(t){i(t)}}()}function F(e){var n="";try{Ps(e)||(n+="string"==typeof e?"(url: '"+e+"')":"(url: '"+e.url+"')")}catch(e){Ts(t,15,"Failed to grab failed fetch diagnostics message",{exception:mi.dump(e)})}return n}function M(e,n,i,s,r){function a(e,n,s){var r=s||{};r.fetchDiagnosticsMessage=F(i),n&&(r.exception=mi.dump(n)),Rs(t,e,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",r)}s&&(s.responseFinishedTime=gi.Now(),s.status=n,S("fetch",s,(function(){var e=s.CreateTrackItem("Fetch",d,r);e?t.trackDependencyDataInternal(e):a(14,null,{requestSentTime:s.requestSentTime,responseFinishedTime:s.responseFinishedTime})}),(function(t){a(18,t,null)})))}function A(e){if(e&&e.headers)try{var n=e.headers.get(ci.requestContextHeader);return vi.getCorrelationContext(n)}catch(n){Rs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:F(e),exception:mi.dump(n)})}}t.initialize=function(l,f,g,F){if(!t.isInitialized()){n.initialize(l,f,g,F);var _=t._getTelCtx();hn(e.getDefaultConfig(),(function(t,n){h[t]=_.getConfig(e.identifier,t,n)}));var N=h.distributedTracingMode;if(d=h.enableRequestHeaderTracking,p=h.maxAjaxCallsPerView,v=h.enableResponseHeaderTracking,r=N===si.AI||N===si.AI_AND_W3C,s=N===si.AI_AND_W3C||N===si.W3C,m=h.enableAjaxPerfTracking){var E=l.instrumentationKey||"unkwn";a=E.length>5?"ai.ajxmn."+E.substring(E.length-5)+".":"ai.ajxmn."+E+"."}if(!1===h.disableAjaxTracking&&function(t){var e=!1;if("undefined"!=typeof XMLHttpRequest&&!Ps(XMLHttpRequest)){var n=XMLHttpRequest.prototype;e=!(Ps(n)||Ps(n.open)||Ps(n.send)||Ps(n.abort))}var i=mi.getIEVersion();if(i&&i<9&&(e=!1),e)try{(new XMLHttpRequest).ajaxData={};var s=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=s}catch(n){e=!1,Ts(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:mi.dump(n)})}return e}(t)&&!c&&(o(XMLHttpRequest,"open",{req:function(e,n,s,r){var a=e.inst,o=a.ajaxData;y(a,s)||!b(a,!0)||o&&o.xhrMonitoringState.openDone||function(e,n,s,r){var a=i&&i.telemetryTrace&&i.telemetryTrace.traceID||mi.generateW3CId(),o=mi.generateW3CId().substr(0,16),u=new Bs(a,o,t.diagLog());u.method=n,u.requestUrl=s,u.xhrMonitoringState.openDone=!0,u.requestHeaders={},u.async=r,e.ajaxData=u,function(e){e.ajaxData.xhrMonitoringState.stateChangeAttached=pn.Attach(e,"readystatechange",(function(){try{e&&4===e.readyState&&b(e)&&function(e){var n=e.ajaxData;function i(n,i){var s=i||{};s.ajaxDiagnosticsMessage=js(e),n&&(s.exception=mi.dump(n)),Rs(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",s)}n.responseFinishedTime=gi.Now(),n.status=e.status,S("xmlhttprequest",n,(function(){try{var s=n.CreateTrackItem("Ajax",d,(function(){var t={statusText:e.statusText,headerMap:null,correlationContext:C(e),type:e.responseType,responseText:x(e),response:e.response};if(v){var n=e.getAllResponseHeaders();if(n){var i=fn.strTrim(n).split(/[\r\n]+/),s={};Ls(i,(function(t){var e=t.split(": "),n=e.shift(),i=e.join(": ");s[n]=i})),t.headerMap=s}}return t}));s?t.trackDependencyDataInternal(s):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=mi.dump(i);n&&-1!==Us(n.toLowerCase(),"c00c023f")||Ts(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:js(e),exception:n})}}))}(e)}(a,n,s,r)},hkErr:Os(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;b(n)&&!i.xhrMonitoringState.sendDone&&(k("xhr",i),i.requestSentTime=gi.Now(),n=t.includeCorrelationHeaders(i,void 0,void 0,n),i.xhrMonitoringState.sendDone=!0)},hkErr:Os(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;b(e)&&!n.xhrMonitoringState.abortDone&&(n.aborted=1,n.xhrMonitoringState.abortDone=!0)},hkErr:Os(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),d&&o(XMLHttpRequest,"setRequestHeader",{req:function(t,e,n){var i=t.inst;b(i)&&(i.ajaxData.requestHeaders[e]=n)},hkErr:Os(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0),function(){var e,n=!(e=Oe())||Ps(e.Request)||Ps(e.Request.prototype)||Ps(e.fetch)?null:e.fetch;if(n){var s=Oe(),r=n.polyfill;!1===h.disableFetchTracking?(w.push(oi(s,"fetch",{req:function(e,n,s){var a;if(u&&!y(null,n,s)&&(!r||!c)){var o=e.ctx();a=function(e,n){var s=i&&i.telemetryTrace&&i.telemetryTrace.traceID||mi.generateW3CId(),r=mi.generateW3CId().substr(0,16),a=new Bs(s,r,t.diagLog());a.requestSentTime=gi.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 d&&new Headers((n?n.headers:0)||e instanceof Request&&e.headers||{}).forEach((function(t,e){u[e]=t})),a.requestHeaders=u,k("fetch",a),a}(n,s);var l=t.includeCorrelationHeaders(a,n,s);l!==s&&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 M(0,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:A(t)};if(v){var n={};t.headers.forEach((function(t,e){n[e]=t})),e.headerMap=n}return e})),t})).catch((function(t){throw M(0,0,e,n,null),t})))},hkErr:Os(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),u=!0):r&&w.push(oi(s,"fetch",{req:function(t,e,n){y(null,e,n)}})),r&&(s.fetch.polyfill=r)}}(),g.length>0&&g){for(var B=void 0,I=0;!B&&I<g.length;)g[I]&&"AppInsightsPropertiesPlugin"===g[I].identifier&&(B=g[I]),I++;B&&(i=B.context)}}},t.teardown=function(){Ls(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(vi.canIncludeCorrelationHeader(h,e.getAbsoluteUrl(),u)&&(a||(a={}),a.headers=new Headers(a.headers||n instanceof Request&&n.headers||{}),r&&(a.headers.set(ci.requestIdHeader,f="|"+e.traceID+"."+e.spanID),d&&(e.requestHeaders[ci.requestIdHeader]=f)),(m=h.appId||i&&i.appId())&&(a.headers.set(ci.requestContextHeader,ci.requestContextAppIdFormat+m),d&&(e.requestHeaders[ci.requestContextHeader]=ci.requestContextAppIdFormat+m)),s)){var c=new Is(e.traceID,e.spanID);a.headers.set(ci.traceParentHeader,c.toString()),d&&(e.requestHeaders[ci.traceParentHeader]=c.toString())}return a}if(o){var f,m;if(vi.canIncludeCorrelationHeader(h,e.getAbsoluteUrl(),u))r&&(o.setRequestHeader(ci.requestIdHeader,f="|"+e.traceID+"."+e.spanID),d&&(e.requestHeaders[ci.requestIdHeader]=f)),(m=h.appId||i&&i.appId())&&(o.setRequestHeader(ci.requestContextHeader,ci.requestContextAppIdFormat+m),d&&(e.requestHeaders[ci.requestContextHeader]=ci.requestContextAppIdFormat+m)),s&&(c=new Is(e.traceID,e.spanID),o.setRequestHeader(ci.traceParentHeader,c.toString()),d&&(e.requestHeaders[ci.traceParentHeader]=c.toString()));return o}},t.trackDependencyDataInternal=function(e,n,i){if(-1===p||f<p){h.distributedTracingMode!==si.W3C&&h.distributedTracingMode!==si.AI_AND_W3C||"string"!=typeof e.id||"."===e.id[e.id.length-1]||(e.id+="."),fn.isNullOrUndefined(e.startTime)&&(e.startTime=new Date);var s=Ui.create(e,Di.dataType,Di.envelopeType,t.diagLog(),n,i);t.core.track(s)}else f===p&&Ts(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:si.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 hn(t,(function(e){t[e]=void 0})),t},e.prototype.processTelemetry=function(t,e){this.processNext(t,e)},e.identifier="AjaxDependencyPlugin",e}(Hn),Vs=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=bi.parse(n.connectionString),s=i.ingestionendpoint;n.endpointUrl=s?s+"/v2/track":n.endpointUrl,n.instrumentationKey=i.instrumentationkey||n.instrumentationKey}e.appInsights=new Xi,e.properties=new Ss,e.dependencies=new Hs,e.core=new Yn,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),Dn(this.core,(function(){return"AISKU.flush"}),(function(){fn.arrForEach(e.core.getTransmissionControls(),(function(e){fn.arrForEach(e,(function(e){e.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),fn.arrForEach(this.core.getTransmissionControls(),(function(e){fn.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 s=this;if(t&&s.config.extensions&&s.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return Dn(s.core,(function(){return"AISKU.loadAppInsights"}),(function(){var r=[],a=new ms;r.push(a),r.push(s.properties),r.push(s.dependencies),r.push(s.appInsights),s.core.initialize(s.config,r,e,n),s.context=s.properties.context,qs&&s.context&&(s.context.internal.sdkSrc=qs),function(e){if(e){var n="";fn.isNullOrUndefined(s._snippetVersion)||(n+=s._snippetVersion),t&&(n+=".lg"),s.context&&s.context.internal&&(s.context.internal.snippetVer=n||"-"),hn(s,(function(t,n){fn.isString(t)&&!fn.isFunction(n)&&"_"!==t.substring(0,1)&&(e[t]=n)}))}}(s.snippet),s.emptyQueue(),s.pollInternalLogs(),s.addHousekeepingBeforeUnload(i)})),s},t.prototype.updateSnippetDefinitions=function(t){hn(this,(function(e,n){fn.isString(e)&&(t[e]=n)}))},t.prototype.emptyQueue=function(){var t=this;try{if(mi.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&&fn.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(qe()||Ve()){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=fn.addEventHandler("beforeunload",e);(n=fn.addEventHandler("pagehide",e)||n)||(i=We())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(dn.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||fn.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
11
  /*!
12
12
  * Application Insights JavaScript SDK - Web, 2.5.10
13
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 s="",r=0;r<e.length;r++)if(-1!==i.indexOf(e[r])){s="cdn"+(r+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?s+="-next":-1!==i.indexOf("/beta/")&&(s+="-beta")),qs=s+"";break}}catch(t){}}();var zs;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(zs||(zs={}));class Ws{}let $s=class extends C{constructor(){super({authenticationState:zs.Unauthorized,jwt:S,reactNativeInterop:S,iframeInterop:S,appConfiguration:S,ignoreExistingSelection:!1})}};$s=function(t,e,n,i){var s,r=arguments.length,a=r<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--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}([x({name:"sss-session",resettable:!0})],$s);const Xs=new $s,Js=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(D(t))throw Error("App configuration is not yet loaded");return t.value}}(Xs),Gs=new class{constructor(){this.appInsights=new ct((()=>new Vs({config:{instrumentationKey:Js.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),a((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:Ei.Error})}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:Ei.Error}),(t=>{console.error(t)})(t)}},Zs=new class{async submitChoiceAsync(t){return R().url("super-choice/promoted-fund").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Fund choice request")})).text()}async submitDefaultChoiceAsync(t){return R().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 R().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()}},Ks=new class{async submitSlateChoiceAsync(t){return R().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},Ys=t=>t.replace(/ /g,"");class Qs{constructor(t,e){this.handle=async t=>{if("super-campaign"===t.detail.sender||"featured-funds"===t.detail.sender){const e=t.detail.fundJoinInfo;switch(e.fundType){case"Promoted":this.handlePromotedFundJoined(e);break;case"DefinedBenefits":await this.handleDefinedBenefitsJoined(e);break;case"PromotedDefault":this.handlePromotedDefaultFundJoined(e);break;case"PromotedDefaultWithJoin":this.handlePromotedDefaultFundWithJoinWasJoined(e)}}return Promise.resolve()},this.stringIsNullOrEmtpty=t=>!("string"==typeof t&&t.trim().length>0),this.handlePromotedFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (Promoted) memberNumber and/or usi");const e=Ys(t.usi),n=P.toUndefined(A.defaultFundUsi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promoted",fundName:t.fundName,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:async i=>{t.fundId===z.fundId?await Ks.submitSlateChoiceAsync(Object.assign({memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,standardChoiceFormSignature:i,defaultFundUsiSet:n,placementId:this.placementId},this.PromotedFundsConfig)):await Zs.submitChoiceAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:i,defaultFundUsiSet:n,placementId:this.placementId},this.PromotedFundsConfig))}})},this.handlePromotedDefaultFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (PromotedDefault) usi");const e=Ys(t.usi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promotedDefault",fundName:t.fundName,fundUsi:e,promotedFundId:t.fundId},handleSubmitFn:n=>Zs.submitDefaultChoiceAsync(Object.assign({fundId:t.fundId,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi),placementId:this.placementId},this.PromotedFundsConfig))})},this.handlePromotedDefaultFundWithJoinWasJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (PromotedDefaultWithJoin) memberNumber and/or usi");const e=Ys(t.usi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promotedDefaultWithJoin",fundName:t.fundName,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:n=>Zs.submitDefaultChoiceWithJoinAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi),placementId:this.placementId},this.PromotedFundsConfig))})},this.handleDefinedBenefitsJoined=async t=>{this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi)?Gs.trackErrorTrace("Super Campaign did not return (DefinedBenefits) memberNumber and/or usi"):(await j.submitDefinedBenefitsChoiceAsync(Object.assign({fundUsi:Ys(t.usi),fundId:t.fundId,memberNumber:t.memberNumber,memberElectContributionRatePreTax:t.memberElectContributionRatePreTax,memberElectContributionRatePostTax:t.memberElectContributionRatePostTax},this.PromotedFundsConfig)),A.markSuperSelectionAsSubmitted())},this.history=e,this.placementId=t}get PromotedFundsConfig(){return A.promotedFundsConfig}}const tr=class{constructor(e){t(this,e),this.currentView="featured-funds",this.subscribeToEvents=()=>{for(const t in this.eventHandlers)document.addEventListener(t,this.eventHandlers[t])},this.unsubscribeFromEvents=()=>{for(const t in this.eventHandlers)document.removeEventListener(t,this.eventHandlers[t])},this.backClicked=()=>(_.navigateInternally(this.history,N.ChoicePage),Promise.resolve()),this.cancelClicked=()=>(this.currentView="featured-funds",Promise.resolve()),this.continueClicked=async t=>{this.currentView="fund-join",await Ie({sender:t.detail.sender,placementId:"byof",fundId:t.detail.fundId,fundUsi:t.detail.fundUsi,fundName:t.detail.fundName,fundType:t.detail.fundType})},this.fundPanelShown=async t=>{if("featured-funds"===t.detail.sender){const e=t.detail.shownFunds.map((t=>t.fundId));await A.viewSuperFundPanelAsync("byof",e)}},this.eventHandlers={"back-clicked":this.backClicked.bind(this),"continue-clicked":this.continueClicked.bind(this),"cancel-clicked":this.cancelClicked.bind(this),"featured-fund-panel-shown":this.fundPanelShown.bind(this),"promoted-fund-joined":new Qs("byof",this.history).handle}}componentWillLoad(){A.isFeaturedFundsEnabled&&A.isUsingSuperCampaign&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.unsubscribeFromEvents(),this.subscribeToEvents(),A.hideFooterSection=!0):_.navigateInternally(this.history,N.MyOwnFund)}disconnectedCallback(){this.unsubscribeFromEvents(),A.hideFooterSection=!1}render(){return e(s,null,"featured-funds"===this.currentView&&e("sss-header-section",null),e("div",{class:{"flex flex-col w-full justify-center items-center mt-11 mx-auto":"featured-funds"===this.currentView,"-mt-20":"fund-join"===this.currentView}},"featured-funds"===this.currentView&&e("sss-custom-fund",null),e("apollo-super-campaign-featured-funds",{"backend-url":this.backendUrl,"access-token":this.accessToken})))}};E(tr);const er=class{constructor(e){t(this,e),this.scriptImported=!1,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.superCampaignLoaded=async t=>("super-campaign"===t.detail.sender&&(A.superCampaignComponentStatus=W.Loaded,clearTimeout(this.loadingTimeoutRef),await L.Instance.TrackSuperCampaignActivationSucceededAsync({})),Promise.resolve()),this.superCampaignLoadFailed=async t=>{"super-campaign"===t.detail.sender&&await this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:t.detail.reason||"Unknown"})},this.superCampaignFailed=async t=>{"super-campaign"===t.detail.sender&&await this.activateFallbackMechanism({type:"SuperCampaignOperationFailed",reason:t.detail.reason||"Unknown"})},this.chooseAnotherFundRequested=async t=>{"super-campaign"===t.detail.sender&&await _.navigateInternally(this.history,N.MyOwnFund)},this.fundPanelShown=async t=>{"super-campaign"===t.detail.sender&&(A.setSuperCampaignPromotedFundsShown(t.detail.shownFunds),await A.viewSuperFundPanelAsync("panel"))},this.fundTileClicked=async t=>{await Ie({sender:t.detail.sender,placementId:"panel",fundId:t.detail.fundId,fundUsi:t.detail.fundUsi,fundName:t.detail.fundName,fundType:t.detail.fundType})},this.fundPdsViewed=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundPdsViewedAsync({fundName:t.detail.fundName,fundUsi:t.detail.fundUsi,pageName:t.detail.pageName,superCampaignEnabled:!0})},this.disclaimerViewed=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundDisclaimerViewedAsync((t=>{let e="Not set";return P.isSome(A.isDefinedBenefitsEligible)&&(e=A.isDefinedBenefitsEligible.value?"True":"False"),{isDefinedBenefitsEligible:e,superCampaignEnabled:t}})(!0))},this.disclaimerAccepted=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundDisclaimerAcceptedAsync({superCampaignEnabled:!0})},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":new Qs("panel",this.history).handle,"super-campaign-loaded":this.superCampaignLoaded.bind(this),"super-campaign-load-failed":this.superCampaignLoadFailed.bind(this),"super-campaign-failed":this.superCampaignFailed.bind(this)}}async componentWillLoad(){if(A.state.superCampaignComponentStatus===W.NotWorking)return void _.navigateInternally(this.history,N.MyOwnFund);let t=void 0;try{if(!P.isSome(A.backendUrl)||!P.isSome(A.state.jwt))throw Error("SuperCampaignHost pre-requisites not met.");this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.unSubscribeFromSuperCampaignEvents(),A.state.superCampaignComponentStatus===W.NotLoaded&&(t=this.createApolloSuperCampaignScriptUrl(),await import(t),this.loadingTimeoutRef=setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this),3e4)),this.subscribeToSuperCampaignEvents(),this.scriptImported=!0,A.hideFooterSection=!0}catch(e){this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:`Problem in loading SuperCampaing script from:${t} Error: ${e}`})}}disconnectedCallback(){clearTimeout(this.loadingTimeoutRef),this.unSubscribeFromSuperCampaignEvents(),A.hideFooterSection=!1}render(){return e("div",null,this.scriptImported?e("apollo-super-campaign",{"backend-url":this.backendUrl,"access-token":this.accessToken}):null)}async activateFallbackMechanism(t){A.superCampaignComponentStatus!==W.NotWorking&&(A.superCampaignComponentStatus=W.NotWorking,await class{static get Instance(){return this.instance||(this.instance=new this)}async PostError(t){R().url("super-campaign/errors").post(t)}}.Instance.PostError(t),await _.navigateInternally(this.history,N.MyOwnFund))}async superCampaignLoadingTimeoutTriggered(){A.superCampaignComponentStatus!==W.Loaded&&this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:"Activation timeout was triggered after:30 seconds"})}createApolloSuperCampaignScriptUrl(){return`https://${(()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"test-partner":case"partner":case"sandbox-partner":case"autodev-partner":return t;default:return"autodev-partner"}})()}.flarehr.com/super-campaign/cdn/app/apollo-super-campaign.js`}};var nr;E(er),function(t){t[t.NotLoaded=1]="NotLoaded",t[t.Loaded=2]="Loaded"}(nr||(nr={}));let ir=nr.NotLoaded;const sr=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.subscribeToSuperSmsfEvents=()=>{for(const t in this.smsfEventHandlers)document.addEventListener(t,this.smsfEventHandlers[t])},this.unSubscribeFromSuperSmsfEvents=()=>{for(const t in this.smsfEventHandlers)document.removeEventListener(t,this.smsfEventHandlers[t])},this.smsfLoaded=async t=>("super-smsf"===t.detail.sender&&(ir=nr.Loaded,clearTimeout(this.loadingTimeoutRef),await this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:A.promotedFunds,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi)})),Promise.resolve()),this.smsfCompleted=async t=>{if("super-smsf"===t.detail.sender){if(this.updateCustomFundStateStore(t.detail),A.isSmsfCustomStepEnabled&&A.isUsingSuperCampaign)return void _.navigateInternally(this.history,N.SmsfEngagementStep);_.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:t.detail.fundName,fundEsa:t.detail.fundEsa},handleSubmitFn:async e=>{const n=Object.assign({smsfChoice:{abn:t.detail.fundAbn,fundName:t.detail.fundName,fundAddress:{addressLine1:t.detail.fundAddressLine1,addressLine2:t.detail.fundAddressLine2,city:t.detail.fundCity,state:t.detail.fundState,postcode:t.detail.fundPostcode},bsb:t.detail.bankBsb,bankAccountName:t.detail.bankAccountName,bankAccountNumber:t.detail.bankAccountNumber,electronicServiceAddress:t.detail.fundEsa,memberFirstName:t.detail.memberFirstName,memberFamilyName:t.detail.memberLastName},standardChoiceFormSignature:e},A.promotedFundsConfig);await j.submitSelfManagedFundChoiceAsync(n)}})}},this.smsfCancelled=async t=>{"super-smsf"===t.detail.sender&&_.navigateInternally(this.history,N.ChoicePage)},this.smsfEventHandlers={"smsf-loaded":this.smsfLoaded.bind(this),"smsf-completed":this.smsfCompleted.bind(this),"smsf-cancelled":this.smsfCancelled.bind(this)}}async componentWillLoad(){if(!P.isSome(A.backendUrl)||!P.isSome(A.state.jwt))throw Error("SuperSmsfHost pre-requisites not met.");this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,ir===nr.NotLoaded&&(this.loadingTimeoutRef=setTimeout(this.smsfLoadingTimeoutTriggered.bind(this),3e4)),this.subscribeToSuperSmsfEvents()}disconnectedCallback(){clearTimeout(this.loadingTimeoutRef),this.unSubscribeFromSuperSmsfEvents()}render(){return e(s,null,e("sss-header-section",null),e("div",{class:"flex justify-center mt-11"},e("sss-custom-fund",null,e("div",null,e("apollo-super-smsf",{"backend-url":this.backendUrl,"access-token":this.accessToken})))))}updateCustomFundStateStore(t){q.selfManagedFundForm={fundAbn:t.fundAbn,fundName:t.fundName,addressLine1:t.fundAddressLine1,addressLine2:t.fundAddressLine2,city:t.fundCity,state:t.fundState,postcode:t.fundPostcode,bsb:t.bankBsb,bankAccountName:t.bankAccountName,bankAccountNumber:t.bankAccountNumber,fundEsa:t.fundEsa,memberFirstName:t.memberFirstName,memberFamilyName:t.memberLastName}}async smsfLoadingTimeoutTriggered(){if(ir!==nr.Loaded)throw Error("SMSF component failed to load.")}};E(sr);const rr=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=Nt(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&&Ft(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 o(this)}static get watchers(){return{location:["computeMatch"]}}};Z.injectProps(rr,["location","history","historyType","routeViewsUpdated"]),rr.style="stencil-route.inactive{display:none}";const ar=(t,e,n)=>n(t.confirm(e)),or=(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}},ur=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=Nt(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 o(this)}static get watchers(){return{location:["computeMatch"]}}};Z.injectProps(ur,["history","location","root"]);const cr=t=>"STENCIL-ROUTE"===t.tagName,lr=class{constructor(e){t(this,e),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=u(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(cr).map(((n,i)=>{const s=Nt(t.pathname,{path:n.url,exact:n.exact,strict:!0});return s&&-1===e&&(e=i),{el:n,match:s}})),-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 o(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};Z.injectProps(lr,["location","routeViewsUpdated"]);const hr=(t,...e)=>{t||console.warn(...e)},dr=()=>{let t,e=[];return{setPrompt:e=>(hr(null==t,"A history supports only one prompt at a time"),t=e,()=>{t===e&&(t=null)}),confirmTransitionTo:(e,n,i,s)=>{if(null!=t){const r="function"==typeof t?t(e,n):t;"string"==typeof r?"function"==typeof i?i(r,s):(hr(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),s(!0)):s(!1!==r)}else s(!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)))}}},fr=(t,e="scrollPositions")=>{let n=new Map;const i=(e,i)=>{if(n.set(e,i),or(t,"sessionStorage")){const e=[];n.forEach(((t,n)=>{e.push([n,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(e))}};if(or(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])}}},mr={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+bt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:bt,decodePath:yt},slash:{encodePath:yt,decodePath:yt}},pr=(t,e)=>{const n=0==t.pathname.indexOf(e)?"/"+t.pathname.slice(e.length):t.pathname;return Object.assign({},t,{pathname:n})},vr={browser:(t,e={})=>{let n=!1;const i=t.history,s=t.location,r=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===r.userAgent.indexOf("Trident")),u=fr(t),c=null!=e.forceRefresh&&e.forceRefresh,l=null!=e.getUserConfirmation?e.getUserConfirmation:ar,h=null!=e.keyLength?e.keyLength:6,d=e.basename?gt(yt(e.basename)):"",f=()=>{try{return t.history.state||{}}catch(t){return{}}},m=t=>{t=t||{};const{key:e,state:n}=t,{pathname:i,search:r,hash:a}=s;let o=i+r+a;return hr(!d||vt(o,d),'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 "'+d+'".'),d&&(o=wt(o,d)),Mt(o,n,e||kt(h))},p=dr(),v=t=>{u.capture(_.location.key),Object.assign(_,t),_.location.scrollPosition=u.get(_.location.key),_.length=i.length,p.notifyListeners(_.location,_.action)},w=t=>{((t,e)=>void 0===e.state&&-1===t.userAgent.indexOf("CriOS"))(r,t)||y(m(t.state))},g=()=>{y(m(f()))},y=t=>{if(n)n=!1,v();else{const e="POP";p.confirmTransitionTo(t,e,l,(n=>{n?v({action:e,location:t}):b(t)}))}},b=t=>{let e=C.indexOf(_.location.key),i=C.indexOf(t.key);-1===e&&(e=0),-1===i&&(i=0);const s=e-i;s&&(n=!0,M(s))},x=m(f());let C=[x.key],k=0,S=!1;const F=t=>d+xt(t),M=t=>{i.go(t)},A=e=>{k+=e,1===k?(t.addEventListener("popstate",w),o&&t.addEventListener("hashchange",g)):0===k&&(t.removeEventListener("popstate",w),o&&t.removeEventListener("hashchange",g))},_={length:i.length,action:"POP",location:x,createHref:F,push:(t,e)=>{hr(!("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",r=Mt(t,e,kt(h),_.location);p.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=F(r),{key:o,state:u}=r;if(a)if(i.pushState({key:o,state:u},"",e),c)s.href=e;else{const t=C.indexOf(_.location.key),e=C.slice(0,-1===t?0:t+1);e.push(r.key),C=e,v({action:n,location:r})}else hr(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),s.href=e}))},replace:(t,e)=>{hr(!("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",r=Mt(t,e,kt(h),_.location);p.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=F(r),{key:o,state:u}=r;if(a)if(i.replaceState({key:o,state:u},"",e),c)s.replace(e);else{const t=C.indexOf(_.location.key);-1!==t&&(C[t]=r.key),v({action:n,location:r})}else hr(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),s.replace(e)}))},go:M,goBack:()=>M(-1),goForward:()=>M(1),block:(t="")=>{const e=p.setPrompt(t);return S||(A(1),S=!0),()=>(S&&(S=!1,A(-1)),e())},listen:t=>{const e=p.appendListener(t);return A(1),()=>{A(-1),e()}},win:t};return _},hash:(t,e={})=>{let n=!1,i=null,s=0,r=!1;const a=t.location,o=t.history,u=-1===t.navigator.userAgent.indexOf("Firefox"),c=null!=e.keyLength?e.keyLength:6,{getUserConfirmation:l=ar,hashType:h="slash"}=e,d=e.basename?gt(yt(e.basename)):"",{encodePath:f,decodePath:m}=mr[h],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 hr(!d||vt(t,d),'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 "'+d+'".'),d&&(t=wt(t,d)),Mt(t,void 0,kt(c))},g=dr(),y=t=>{Object.assign(N,t),N.length=o.length,g.notifyListeners(N.location,N.action)},b=()=>{const t=p(),e=f(t);if(t!==e)v(e);else{const t=w(),e=N.location;if(!n&&(s=e).pathname===(r=t).pathname&&s.search===r.search&&s.hash===r.hash&&s.key===r.key&&Ft(s.state,r.state))return;if(i===xt(t))return;i=null,x(t)}var s,r},x=t=>{if(n)n=!1,y();else{const e="POP";g.confirmTransitionTo(t,e,l,(n=>{n?y({action:e,location:t}):C(t)}))}},C=t=>{let e=M.lastIndexOf(xt(N.location)),i=M.lastIndexOf(xt(t));-1===e&&(e=0),-1===i&&(i=0);const s=e-i;s&&(n=!0,A(s))},k=p(),S=f(k);k!==S&&v(S);const F=w();let M=[xt(F)];const A=t=>{hr(u,"Hash history go(n) causes a full page reload in this browser"),o.go(t)},_=(t,e)=>{s+=e,1===s?t.addEventListener("hashchange",b):0===s&&t.removeEventListener("hashchange",b)},N={length:o.length,action:"POP",location:F,createHref:t=>"#"+f(d+xt(t)),push:(t,e)=>{hr(void 0===e,"Hash history cannot push state; it is ignored");const n="PUSH",s=Mt(t,void 0,kt(c),N.location);g.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=xt(s),r=f(d+e);if(p()!==r){i=e,(t=>{a.hash=t})(r);const t=M.lastIndexOf(xt(N.location)),o=M.slice(0,-1===t?0:t+1);o.push(e),M=o,y({action:n,location:s})}else hr(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),y()}))},replace:(t,e)=>{hr(void 0===e,"Hash history cannot replace state; it is ignored");const n="REPLACE",s=Mt(t,void 0,kt(c),N.location);g.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=xt(s),r=f(d+e);p()!==r&&(i=e,v(r));const a=M.indexOf(xt(N.location));-1!==a&&(M[a]=e),y({action:n,location:s})}))},go:A,goBack:()=>A(-1),goForward:()=>A(1),block:(e="")=>{const n=g.setPrompt(e);return r||(_(t,1),r=!0),()=>(r&&(r=!1,_(t,-1)),n())},listen:e=>{const n=g.appendListener(e);return _(t,1),()=>{_(t,-1),n()}},win:t};return N}},wr=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=u(this,"isServer"),this.queue=u(this,"queue")}componentWillLoad(){this.history=vr[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=pr(t,this.root),this.location=t})),this.location=pr(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(Z.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 o(this)}},gr=class{constructor(e){t(this,e),this.stepSubmitSuccess=r(this,"step-completion",7),this.successPageAcknowledged=r(this,"successPageAcknowledged",5),this.initialised=r(this,"initialised",7),this.isSelfHosted=!1,this.isAppInitialised=!1}async componentWillLoad(){const t=P.fromNullable(this.accessToken);if(P.isNone(t))throw Error("jwt property is missing.");A.state.jwt=t;const e=P.fromNullable(this.backendUrl);if(P.isNone(e))throw Error("apiBaseUrl property is missing.");A.state.apiBaseUrl=P.some(e.value.replace(/\/$/,"")+"/");const n=P.fromNullable(this.appBaseUrl);if(P.isNone(n))throw Error("appBaseUrl property is missing.");A.state.appBaseUrl=P.some(n.value.replace(/\/$/,"")),A.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),A.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),A.state.hasSuperSelectionBeenSubmitted=!1,this.isSelfHosted&&_.navigateInternally(this.history,N.Success))}))}async componentDidLoad(){await A.loadAppStateAsync();const t=await Rt.GetExistingFundAsync();this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:A.accountIdOrDefault,partnerIdOrDefault:A.partnerIdOrDefault,profileId:A.profileId}),$.appReady();const e=P.fromNullable(this.ignoreExistingSelection),n=P.isSome(t)&&"Defined Benefits Fund"==t.value.type&&(P.isNone(A.isDefinedBenefitsEligible)||!A.isDefinedBenefitsEligible.value),i=P.isSome(e)&&e.value||n;P.isSome(A.state.superChoicePrefill)?_.navigateInternally(this.history,N.Prefill):P.isSome(t)&&"Inactive"!==t.value.valid&&!i?_.navigateInternally(this.history,N.ExistingChoicePage):_.navigateInternally(this.history,N.ChoicePage)}authTokenChanged(t){A.state.jwt=P.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return e(s,null,e("link",{rel:"stylesheet",href:i("apollo-super-selection.css"),media:"all"}),this.renderAppContent())}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 -mt-12 pb-6"},X,e("sss-footer-section",null)):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"]}}};E(gr),gr.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 yr,br=[],xr="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"}(yr||(yr={}));var Cr,kr=function(t){return Object.freeze(t)},Sr=function(t,e){this.inlineSize=t,this.blockSize=e,kr(this)},Fr=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,kr(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}(),Mr=function(t){return t instanceof SVGElement&&"getBBox"in t},Ar=function(t){if(Mr(t)){var e=t.getBBox();return!e.width&&!e.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_r=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)},Nr="undefined"!=typeof window?window:{},Er=new WeakMap,Br=/auto|scroll/,Ir=/^tb|vertical/,Pr=/msie|trident/i.test(Nr.navigator&&Nr.navigator.userAgent),Lr=function(t){return parseFloat(t||"0")},jr=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new Sr((n?e:t)||0,(n?t:e)||0)},Dr=kr({devicePixelContentBoxSize:jr(),borderBoxSize:jr(),contentBoxSize:jr(),contentRect:new Fr(0,0,0,0)}),Tr=function(t,e){if(void 0===e&&(e=!1),Er.has(t)&&!e)return Er.get(t);if(Ar(t))return Er.set(t,Dr),Dr;var n=getComputedStyle(t),i=Mr(t)&&t.ownerSVGElement&&t.getBBox(),s=!Pr&&"border-box"===n.boxSizing,r=Ir.test(n.writingMode||""),a=!i&&Br.test(n.overflowY||""),o=!i&&Br.test(n.overflowX||""),u=i?0:Lr(n.paddingTop),c=i?0:Lr(n.paddingRight),l=i?0:Lr(n.paddingBottom),h=i?0:Lr(n.paddingLeft),d=i?0:Lr(n.borderTopWidth),f=i?0:Lr(n.borderRightWidth),m=i?0:Lr(n.borderBottomWidth),p=h+c,v=u+l,w=(i?0:Lr(n.borderLeftWidth))+f,g=d+m,y=o?t.offsetHeight-g-t.clientHeight:0,b=a?t.offsetWidth-w-t.clientWidth:0,x=s?p+w:0,C=s?v+g:0,k=i?i.width:Lr(n.width)-x-b,S=i?i.height:Lr(n.height)-C-y,F=k+p+b+w,M=S+v+y+g,A=kr({devicePixelContentBoxSize:jr(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),r),borderBoxSize:jr(F,M,r),contentBoxSize:jr(k,S,r),contentRect:new Fr(h,u,k,S)});return Er.set(t,A),A},Rr=function(t,e,n){var i=Tr(t,n),s=i.borderBoxSize,r=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case yr.DEVICE_PIXEL_CONTENT_BOX:return a;case yr.BORDER_BOX:return s;default:return r}},Or=function(t){var e=Tr(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=kr([e.borderBoxSize]),this.contentBoxSize=kr([e.contentBoxSize]),this.devicePixelContentBoxSize=kr([e.devicePixelContentBoxSize])},Ur=function(t){if(Ar(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},qr=function(){var t=1/0,e=[];br.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new Or(e.target),s=Ur(e.target);i.push(n),e.lastReportedSize=Rr(e.target,e.observedBox),s<t&&(t=s)})),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},Hr=function(t){br.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(Ur(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},Vr=[],zr=0,Wr={attributes:!0,characterData:!0,childList:!0,subtree:!0},$r=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Xr=function(t){return void 0===t&&(t=0),Date.now()+t},Jr=!1,Gr=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),!Jr){Jr=!0;var n,i=Xr(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(Hr(e);br.some((function(t){return t.activeTargets.length>0}));)e=qr(),Hr(e);return br.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:xr}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=xr),window.dispatchEvent(t)),e>0}()}finally{if(Jr=!1,t=i-Xr(),!zr)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!Cr){var e=0,n=document.createTextNode("");new MutationObserver((function(){return Vr.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),Cr=function(){n.textContent=""+(e?e--:e++)}}Vr.push(t),Cr()}((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,Wr)};document.body?e():Nr.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),$r.forEach((function(e){return Nr.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),$r.forEach((function(e){return Nr.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),Zr=function(t){!zr&&t>0&&Gr.start(),!(zr+=t)&&Gr.stop()},Kr=function(){function t(t,e){this.target=t,this.observedBox=e||yr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=Rr(this.target,this.observedBox,!0);return Mr(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}(),Yr=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Qr=new WeakMap,ta=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ea=function(){function t(){}return t.connect=function(t,e){var n=new Yr(t,e);Qr.set(t,n)},t.observe=function(t,e,n){var i=Qr.get(t),s=0===i.observationTargets.length;ta(i.observationTargets,e)<0&&(s&&br.push(i),i.observationTargets.push(new Kr(e,n&&n.box)),Zr(1),Gr.schedule())},t.unobserve=function(t,e){var n=Qr.get(t),i=ta(n.observationTargets,e);i>=0&&(1===n.observationTargets.length&&br.splice(br.indexOf(n),1),n.observationTargets.splice(i,1),Zr(-1))},t.disconnect=function(t){var e=this,n=Qr.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),na=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.");ea.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(!_r(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ea.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(!_r(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ea.unobserve(this,t)},t.prototype.disconnect=function(){ea.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const ia=new class{constructor(){this._appRootUrl=new ct((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await J(this.getAppRootUrl()+"config.json").get().json();Xs.update({appConfiguration:P.fromNullable(t)})}resolveRootUrl(){const t=P.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(P.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}},sa=new class{constructor(){this.ignoreExistingSelectionQueryParameter="ignoreExistingSelection"}init(t){const e=new URLSearchParams(t),n=P.fromNullable(e.get(this.ignoreExistingSelectionQueryParameter)),i=P.fold((()=>!1),(t=>"true"===t))(n);Xs.update({ignoreExistingSelection:i})}},ra=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===zs.Unauthorized||this.getValue().authenticationState===zs.Error}get isAuthorized(){return this.getValue().authenticationState===zs.Authenticated}}(Xs),aa=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const e=this.getAuthorizationCodeFromRoute(t);return P.isSome(e)}initFromRoute(t){const e=this.getAuthorizationCodeFromRoute(t);if(P.isNone(e))throw Xs.update({authenticationState:zs.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",""+ia.getAppHostUrl()]]),n=await J(Js.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(e.toString()).badRequest((()=>{throw Xs.update({authenticationState:zs.Error}),new Error("Failed to authenticate.")})).json();Xs.update({jwt:P.fromNullable(n.access_token),authenticationState:zs.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",ia.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const e=new URLSearchParams(t);return P.fromNullable(e.get(this.authCodeQueryParameter))}},oa=new class extends k{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return F(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return F(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(D(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);class ua{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=oa.getIframeInteropMode();P.isSome(t)?window.top.location.href=t.value:$.complete()}static initFromRoute(t){const e=new URLSearchParams(t),n=P.fromNullable(e.get("success-redirection-url")),i={successRedirectionUrl:P.none};if(P.isSome(n))try{const t=new URL(n.value);i.successRedirectionUrl=P.some(t.toString())}catch(t){throw Error(`"${n.value}" is not a valid URL`)}return i}}class ca{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 Ws}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){ca.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}ca.getRnInterop=()=>window.ReactNativeWebView;const la=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(oa.isIframeInteropEnabled())ua.completeSuperSelectionStep();else{if(!oa.isReactNativeInteropEnabled())throw Error("Unknown interop mode");ca.completeSuperSelectionStep()}}init(t){const e=new URLSearchParams(t),n=G(e.get(this.interopModeQueryParameter));F(n)&&"react-native"===n.value?Xs.update({reactNativeInterop:M(ca.init())}):Xs.update({iframeInterop:M(ua.initFromRoute(t))})}};const ha=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),da=class{constructor(e){t(this,e)}async componentWillLoad(){await async function(){sa.init(window.location.search),await ia.loadConfigurationAsync(),Gs.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(ra.isUnauthorized||aa.authorizationCodeIsPresent(window.location.search))&&(la.init(window.location.search),aa.initFromRoute(window.location.search))}(),ra.sessionState$.subscribe((t=>this.sessionState=t)),ra.jwt$.subscribe((t=>this.jwt=t)),Js.appConfiguration$.subscribe((t=>this.appConfiguration=t)),ha.ignoreExistingSelection$.subscribe((t=>this.ignoreExistingSelection=t))}render(){return e(s,null,e("link",{rel:"stylesheet",href:i("apollo-super-selection.css"),media:"all"}),e("div",{ref:t=>this.observeContentResize(t)},P.isNone(this.appConfiguration)?e("sss-loading-page",{class:"font-inter"}):this.renderAppContent()))}renderAppContent(){return e("stencil-router",{root:ia.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:P.toUndefined(this.jwt),ignoreExistingSelection:this.ignoreExistingSelection,backendUrl:Js.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(){la.completeSuperSelectionStep()}handleStepSubmitSuccess(){$.submitSuccess()}handleAppInitialised(t){Gs.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),Gs.getAppInsights().trackPageView();const e=document.getElementById("sss-external-loading-page-container");e&&document.body.removeChild(e)}observeContentResize(t){new(window.ResizeObserver||na)((()=>{$.resize(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case zs.Authenticated:return t;case zs.Unauthorized:return()=>e("sss-loading-page",null);case zs.Error:default:return()=>e("h1",null,"Authentication Error")}}};da.style="html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#2E66F7;--fl-color-primary-light:#EAF0FE;--fl-color-primary-dark:#031495;--fl-color-primary-disabled:#88ABFA;--fl-color-primary-hover:#5786F8;--fl-color-primary-focus:#1033C6;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{Bt as sss_button,It as sss_choice_router,Lt as sss_custom_fund,Dt as sss_default_fund,Tt as sss_dropdown_async,Ot as sss_existing_choice_page,Ut as sss_footer_section,Vt as sss_header_section,zt as sss_loading_indicator,Wt as sss_loading_page,$t as sss_my_own_fund_engagement_step_host,Xt as sss_name_input,Jt as sss_prefill,Gt as sss_prefill_display_field,Zt as sss_prefill_error_box,Ce as sss_prefill_invalid_my_own_fund,ke as sss_prefill_invalid_smsf,Se as sss_prefill_my_own_fund,Me as sss_prefill_smsf,Ae as sss_prefill_warning_box,_e as sss_smsf_engagement_step_host,Ne as sss_standard_choice_form,Ee as sss_success,tr as sss_super_campaign_featured_funds,er as sss_super_campaign_host,sr as sss_super_smsf_host,rr as stencil_route,ur as stencil_route_link,lr as stencil_route_switch,wr as stencil_router,gr as super_selection_app,da as super_selection_app_host}
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 s="",r=0;r<e.length;r++)if(-1!==i.indexOf(e[r])){s="cdn"+(r+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?s+="-next":-1!==i.indexOf("/beta/")&&(s+="-beta")),qs=s+"";break}}catch(t){}}();var zs;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(zs||(zs={}));class Ws{}let Js=class extends C{constructor(){super({authenticationState:zs.Unauthorized,jwt:S,reactNativeInterop:S,iframeInterop:S,appConfiguration:S,ignoreExistingSelection:!1})}};Js=function(t,e,n,i){var s,r=arguments.length,a=r<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--)(s=t[o])&&(a=(r<3?s(a):r>3?s(e,n,a):s(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}([x({name:"sss-session",resettable:!0})],Js);const $s=new Js,Xs=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(j(t))throw Error("App configuration is not yet loaded");return t.value}}($s),Gs=new class{constructor(){this.appInsights=new ct((()=>new Vs({config:{instrumentationKey:Xs.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),a((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:Ei.Error})}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:Ei.Error}),(t=>{console.error(t)})(t)}},Zs=new class{async submitChoiceAsync(t){return R().url("super-choice/promoted-fund").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Fund choice request")})).text()}async submitDefaultChoiceAsync(t){return R().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 R().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()}},Ks=new class{async submitSlateChoiceAsync(t){return R().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},Ys=t=>t.replace(/ /g,"");class Qs{constructor(t,e){this.handle=async t=>{if("super-campaign"===t.detail.sender||"featured-funds"===t.detail.sender){const e=t.detail.fundJoinInfo;switch(e.fundType){case"Promoted":this.handlePromotedFundJoined(e);break;case"DefinedBenefits":await this.handleDefinedBenefitsJoined(e);break;case"PromotedDefault":this.handlePromotedDefaultFundJoined(e);break;case"PromotedDefaultWithJoin":this.handlePromotedDefaultFundWithJoinWasJoined(e)}}return Promise.resolve()},this.stringIsNullOrEmtpty=t=>!("string"==typeof t&&t.trim().length>0),this.handlePromotedFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (Promoted) memberNumber and/or usi");const e=Ys(t.usi),n=P.toUndefined(A.defaultFundUsi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promoted",fundName:t.fundName,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:async i=>{t.fundId===z.fundId?await Ks.submitSlateChoiceAsync(Object.assign({memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,standardChoiceFormSignature:i,defaultFundUsiSet:n,placementId:this.placementId},this.PromotedFundsConfig)):await Zs.submitChoiceAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:i,defaultFundUsiSet:n,placementId:this.placementId,sourceOfJoin:t.sourceOfJoin,isDefaultExclusive:t.isDefaultExclusive},this.PromotedFundsConfig))}})},this.handlePromotedDefaultFundJoined=t=>{if(this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (PromotedDefault) usi");const e=Ys(t.usi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promotedDefault",fundName:t.fundName,fundUsi:e,promotedFundId:t.fundId},handleSubmitFn:n=>Zs.submitDefaultChoiceAsync(Object.assign({fundId:t.fundId,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi),placementId:this.placementId,sourceOfJoin:t.sourceOfJoin,isDefaultExclusive:t.isDefaultExclusive},this.PromotedFundsConfig))})},this.handlePromotedDefaultFundWithJoinWasJoined=t=>{if(this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi))return void Gs.trackErrorTrace("Super Campaign did not return (PromotedDefaultWithJoin) memberNumber and/or usi");const e=Ys(t.usi);_.navigateInternallyToStandardChoice({history:this.history,fundName:t.fundName,promotedFundId:t.fundId,fundDetails:{type:"promotedDefaultWithJoin",fundName:t.fundName,fundUsi:e,memberNumber:t.memberNumber,promotedFundId:t.fundId},handleSubmitFn:n=>Zs.submitDefaultChoiceWithJoinAsync(Object.assign({fundId:t.fundId,memberNumber:t.memberNumber,memberFirstName:t.memberFirstName,memberFamilyName:t.memberFamilyName,usi:e,standardChoiceFormSignature:n,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi),placementId:this.placementId,sourceOfJoin:t.sourceOfJoin,isDefaultExclusive:t.isDefaultExclusive},this.PromotedFundsConfig))})},this.handleDefinedBenefitsJoined=async t=>{this.stringIsNullOrEmtpty(t.memberNumber)||this.stringIsNullOrEmtpty(t.usi)?Gs.trackErrorTrace("Super Campaign did not return (DefinedBenefits) memberNumber and/or usi"):(await D.submitDefinedBenefitsChoiceAsync(Object.assign({fundUsi:Ys(t.usi),fundId:t.fundId,memberNumber:t.memberNumber,memberElectContributionRatePreTax:t.memberElectContributionRatePreTax,memberElectContributionRatePostTax:t.memberElectContributionRatePostTax,sourceOfJoin:t.sourceOfJoin,isDefaultExclusive:t.isDefaultExclusive},this.PromotedFundsConfig)),A.markSuperSelectionAsSubmitted())},this.history=e,this.placementId=t}get PromotedFundsConfig(){return A.promotedFundsConfig}}const tr=class{constructor(e){t(this,e),this.currentView="featured-funds",this.subscribeToEvents=()=>{for(const t in this.eventHandlers)document.addEventListener(t,this.eventHandlers[t])},this.unsubscribeFromEvents=()=>{for(const t in this.eventHandlers)document.removeEventListener(t,this.eventHandlers[t])},this.backClicked=()=>(_.navigateInternally(this.history,N.ChoicePage),Promise.resolve()),this.cancelClicked=()=>(this.currentView="featured-funds",Promise.resolve()),this.continueClicked=async t=>{this.currentView="fund-join",await Ie({sender:t.detail.sender,placementId:"byof",fundId:t.detail.fundId,fundUsi:t.detail.fundUsi,fundName:t.detail.fundName,fundType:t.detail.fundType,sourceOfJoin:t.detail.sourceOfJoin,isDefaultExclusive:t.detail.isDefaultExclusive})},this.fundPanelShown=async t=>{if("featured-funds"===t.detail.sender){const e=t.detail.shownFunds.map((t=>t.fundId));await A.viewSuperFundPanelAsync("byof",e)}},this.eventHandlers={"back-clicked":this.backClicked.bind(this),"continue-clicked":this.continueClicked.bind(this),"cancel-clicked":this.cancelClicked.bind(this),"featured-fund-panel-shown":this.fundPanelShown.bind(this),"promoted-fund-joined":new Qs("byof",this.history).handle}}componentWillLoad(){A.isFeaturedFundsEnabled&&A.isUsingSuperCampaign&&P.isSome(A.backendUrl)&&P.isSome(A.state.jwt)?(this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.unsubscribeFromEvents(),this.subscribeToEvents(),A.hideFooterSection=!0):_.navigateInternally(this.history,N.MyOwnFund)}disconnectedCallback(){this.unsubscribeFromEvents(),A.hideFooterSection=!1}render(){return e(s,null,"featured-funds"===this.currentView&&e("sss-header-section",null),e("div",{class:{"flex flex-col w-full justify-center items-center mt-11 mx-auto":"featured-funds"===this.currentView,"-mt-20":"fund-join"===this.currentView}},"featured-funds"===this.currentView&&e("sss-custom-fund",null),e("apollo-super-campaign-featured-funds",{"backend-url":this.backendUrl,"access-token":this.accessToken})))}};E(tr);const er=class{constructor(e){t(this,e),this.scriptImported=!1,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.superCampaignLoaded=async t=>("super-campaign"===t.detail.sender&&(A.superCampaignComponentStatus=W.Loaded,clearTimeout(this.loadingTimeoutRef),await L.Instance.TrackSuperCampaignActivationSucceededAsync({})),Promise.resolve()),this.superCampaignLoadFailed=async t=>{"super-campaign"===t.detail.sender&&await this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:t.detail.reason||"Unknown"})},this.superCampaignFailed=async t=>{"super-campaign"===t.detail.sender&&await this.activateFallbackMechanism({type:"SuperCampaignOperationFailed",reason:t.detail.reason||"Unknown"})},this.chooseAnotherFundRequested=async t=>{"super-campaign"===t.detail.sender&&await _.navigateInternally(this.history,N.MyOwnFund)},this.fundPanelShown=async t=>{"super-campaign"===t.detail.sender&&(A.setSuperCampaignPromotedFundsShown(t.detail.shownFunds),await A.viewSuperFundPanelAsync("panel"))},this.fundTileClicked=async t=>{await Ie({sender:t.detail.sender,placementId:"panel",fundId:t.detail.fundId,fundUsi:t.detail.fundUsi,fundName:t.detail.fundName,fundType:t.detail.fundType,sourceOfJoin:t.detail.sourceOfJoin,isDefaultExclusive:t.detail.isDefaultExclusive})},this.fundPdsViewed=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundPdsViewedAsync({fundName:t.detail.fundName,fundUsi:t.detail.fundUsi,pageName:t.detail.pageName,superCampaignEnabled:!0})},this.disclaimerViewed=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundDisclaimerViewedAsync((t=>{let e="Not set";return P.isSome(A.isDefinedBenefitsEligible)&&(e=A.isDefinedBenefitsEligible.value?"True":"False"),{isDefinedBenefitsEligible:e,superCampaignEnabled:t}})(!0))},this.disclaimerAccepted=async t=>{"super-campaign"===t.detail.sender&&await L.Instance.TrackSuperFundDisclaimerAcceptedAsync({superCampaignEnabled:!0})},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":new Qs("panel",this.history).handle,"super-campaign-loaded":this.superCampaignLoaded.bind(this),"super-campaign-load-failed":this.superCampaignLoadFailed.bind(this),"super-campaign-failed":this.superCampaignFailed.bind(this)}}async componentWillLoad(){if(A.state.superCampaignComponentStatus===W.NotWorking)return void _.navigateInternally(this.history,N.MyOwnFund);let t=void 0;try{if(!P.isSome(A.backendUrl)||!P.isSome(A.state.jwt))throw Error("SuperCampaignHost pre-requisites not met.");this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,this.unSubscribeFromSuperCampaignEvents(),A.state.superCampaignComponentStatus===W.NotLoaded&&(t=this.createApolloSuperCampaignScriptUrl(),await import(t),this.loadingTimeoutRef=setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this),3e4)),this.subscribeToSuperCampaignEvents(),this.scriptImported=!0,A.hideFooterSection=!0}catch(e){this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:`Problem in loading SuperCampaing script from:${t} Error: ${e}`})}}disconnectedCallback(){clearTimeout(this.loadingTimeoutRef),this.unSubscribeFromSuperCampaignEvents(),A.hideFooterSection=!1}render(){return e("div",null,this.scriptImported?e("apollo-super-campaign",{"backend-url":this.backendUrl,"access-token":this.accessToken}):null)}async activateFallbackMechanism(t){A.superCampaignComponentStatus!==W.NotWorking&&(A.superCampaignComponentStatus=W.NotWorking,await class{static get Instance(){return this.instance||(this.instance=new this)}async PostError(t){R().url("super-campaign/errors").post(t)}}.Instance.PostError(t),await _.navigateInternally(this.history,N.MyOwnFund))}async superCampaignLoadingTimeoutTriggered(){A.superCampaignComponentStatus!==W.Loaded&&this.activateFallbackMechanism({type:"SuperCampaignActivationFailed",reason:"Activation timeout was triggered after:30 seconds"})}createApolloSuperCampaignScriptUrl(){return`https://${(()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"test-partner":case"partner":case"sandbox-partner":case"autodev-partner":return t;default:return"autodev-partner"}})()}.flarehr.com/super-campaign/cdn/app/apollo-super-campaign.js`}};var nr;E(er),function(t){t[t.NotLoaded=1]="NotLoaded",t[t.Loaded=2]="Loaded"}(nr||(nr={}));let ir=nr.NotLoaded;const sr=class{constructor(e){t(this,e),this.eventTrackingService=L.Instance,this.subscribeToSuperSmsfEvents=()=>{for(const t in this.smsfEventHandlers)document.addEventListener(t,this.smsfEventHandlers[t])},this.unSubscribeFromSuperSmsfEvents=()=>{for(const t in this.smsfEventHandlers)document.removeEventListener(t,this.smsfEventHandlers[t])},this.smsfLoaded=async t=>("super-smsf"===t.detail.sender&&(ir=nr.Loaded,clearTimeout(this.loadingTimeoutRef),await this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:A.promotedFunds,defaultFundUsiSet:P.toUndefined(A.defaultFundUsi)})),Promise.resolve()),this.smsfCompleted=async t=>{if("super-smsf"===t.detail.sender){if(this.updateCustomFundStateStore(t.detail),A.isSmsfCustomStepEnabled&&A.isUsingSuperCampaign)return void _.navigateInternally(this.history,N.SmsfEngagementStep);_.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",fundDetails:{type:"smsf",fundName:t.detail.fundName,fundEsa:t.detail.fundEsa},handleSubmitFn:async e=>{const n=Object.assign({smsfChoice:{abn:t.detail.fundAbn,fundName:t.detail.fundName,fundAddress:{addressLine1:t.detail.fundAddressLine1,addressLine2:t.detail.fundAddressLine2,city:t.detail.fundCity,state:t.detail.fundState,postcode:t.detail.fundPostcode},bsb:t.detail.bankBsb,bankAccountName:t.detail.bankAccountName,bankAccountNumber:t.detail.bankAccountNumber,electronicServiceAddress:t.detail.fundEsa,memberFirstName:t.detail.memberFirstName,memberFamilyName:t.detail.memberLastName},standardChoiceFormSignature:e},A.promotedFundsConfig);await D.submitSelfManagedFundChoiceAsync(n)}})}},this.smsfCancelled=async t=>{"super-smsf"===t.detail.sender&&_.navigateInternally(this.history,N.ChoicePage)},this.smsfEventHandlers={"smsf-loaded":this.smsfLoaded.bind(this),"smsf-completed":this.smsfCompleted.bind(this),"smsf-cancelled":this.smsfCancelled.bind(this)}}async componentWillLoad(){if(!P.isSome(A.backendUrl)||!P.isSome(A.state.jwt))throw Error("SuperSmsfHost pre-requisites not met.");this.backendUrl=A.backendUrl.value,this.accessToken=A.state.jwt.value,ir===nr.NotLoaded&&(this.loadingTimeoutRef=setTimeout(this.smsfLoadingTimeoutTriggered.bind(this),3e4)),this.subscribeToSuperSmsfEvents()}disconnectedCallback(){clearTimeout(this.loadingTimeoutRef),this.unSubscribeFromSuperSmsfEvents()}render(){return e(s,null,e("sss-header-section",null),e("div",{class:"flex justify-center mt-11"},e("sss-custom-fund",null,e("div",null,e("apollo-super-smsf",{"backend-url":this.backendUrl,"access-token":this.accessToken})))))}updateCustomFundStateStore(t){q.selfManagedFundForm={fundAbn:t.fundAbn,fundName:t.fundName,addressLine1:t.fundAddressLine1,addressLine2:t.fundAddressLine2,city:t.fundCity,state:t.fundState,postcode:t.fundPostcode,bsb:t.bankBsb,bankAccountName:t.bankAccountName,bankAccountNumber:t.bankAccountNumber,fundEsa:t.fundEsa,memberFirstName:t.memberFirstName,memberFamilyName:t.memberLastName}}async smsfLoadingTimeoutTriggered(){if(ir!==nr.Loaded)throw Error("SMSF component failed to load.")}};E(sr);const rr=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=Nt(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&&Ft(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 o(this)}static get watchers(){return{location:["computeMatch"]}}};Z.injectProps(rr,["location","history","historyType","routeViewsUpdated"]),rr.style="stencil-route.inactive{display:none}";const ar=(t,e,n)=>n(t.confirm(e)),or=(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}},ur=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=Nt(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 o(this)}static get watchers(){return{location:["computeMatch"]}}};Z.injectProps(ur,["history","location","root"]);const cr=t=>"STENCIL-ROUTE"===t.tagName,lr=class{constructor(e){t(this,e),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=u(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(cr).map(((n,i)=>{const s=Nt(t.pathname,{path:n.url,exact:n.exact,strict:!0});return s&&-1===e&&(e=i),{el:n,match:s}})),-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 o(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};Z.injectProps(lr,["location","routeViewsUpdated"]);const hr=(t,...e)=>{t||console.warn(...e)},dr=()=>{let t,e=[];return{setPrompt:e=>(hr(null==t,"A history supports only one prompt at a time"),t=e,()=>{t===e&&(t=null)}),confirmTransitionTo:(e,n,i,s)=>{if(null!=t){const r="function"==typeof t?t(e,n):t;"string"==typeof r?"function"==typeof i?i(r,s):(hr(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),s(!0)):s(!1!==r)}else s(!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)))}}},fr=(t,e="scrollPositions")=>{let n=new Map;const i=(e,i)=>{if(n.set(e,i),or(t,"sessionStorage")){const e=[];n.forEach(((t,n)=>{e.push([n,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(e))}};if(or(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])}}},mr={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+bt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:bt,decodePath:yt},slash:{encodePath:yt,decodePath:yt}},pr=(t,e)=>{const n=0==t.pathname.indexOf(e)?"/"+t.pathname.slice(e.length):t.pathname;return Object.assign({},t,{pathname:n})},vr={browser:(t,e={})=>{let n=!1;const i=t.history,s=t.location,r=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===r.userAgent.indexOf("Trident")),u=fr(t),c=null!=e.forceRefresh&&e.forceRefresh,l=null!=e.getUserConfirmation?e.getUserConfirmation:ar,h=null!=e.keyLength?e.keyLength:6,d=e.basename?gt(yt(e.basename)):"",f=()=>{try{return t.history.state||{}}catch(t){return{}}},m=t=>{t=t||{};const{key:e,state:n}=t,{pathname:i,search:r,hash:a}=s;let o=i+r+a;return hr(!d||vt(o,d),'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 "'+d+'".'),d&&(o=wt(o,d)),Mt(o,n,e||kt(h))},p=dr(),v=t=>{u.capture(_.location.key),Object.assign(_,t),_.location.scrollPosition=u.get(_.location.key),_.length=i.length,p.notifyListeners(_.location,_.action)},w=t=>{((t,e)=>void 0===e.state&&-1===t.userAgent.indexOf("CriOS"))(r,t)||y(m(t.state))},g=()=>{y(m(f()))},y=t=>{if(n)n=!1,v();else{const e="POP";p.confirmTransitionTo(t,e,l,(n=>{n?v({action:e,location:t}):b(t)}))}},b=t=>{let e=C.indexOf(_.location.key),i=C.indexOf(t.key);-1===e&&(e=0),-1===i&&(i=0);const s=e-i;s&&(n=!0,M(s))},x=m(f());let C=[x.key],k=0,S=!1;const F=t=>d+xt(t),M=t=>{i.go(t)},A=e=>{k+=e,1===k?(t.addEventListener("popstate",w),o&&t.addEventListener("hashchange",g)):0===k&&(t.removeEventListener("popstate",w),o&&t.removeEventListener("hashchange",g))},_={length:i.length,action:"POP",location:x,createHref:F,push:(t,e)=>{hr(!("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",r=Mt(t,e,kt(h),_.location);p.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=F(r),{key:o,state:u}=r;if(a)if(i.pushState({key:o,state:u},"",e),c)s.href=e;else{const t=C.indexOf(_.location.key),e=C.slice(0,-1===t?0:t+1);e.push(r.key),C=e,v({action:n,location:r})}else hr(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),s.href=e}))},replace:(t,e)=>{hr(!("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",r=Mt(t,e,kt(h),_.location);p.confirmTransitionTo(r,n,l,(t=>{if(!t)return;const e=F(r),{key:o,state:u}=r;if(a)if(i.replaceState({key:o,state:u},"",e),c)s.replace(e);else{const t=C.indexOf(_.location.key);-1!==t&&(C[t]=r.key),v({action:n,location:r})}else hr(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),s.replace(e)}))},go:M,goBack:()=>M(-1),goForward:()=>M(1),block:(t="")=>{const e=p.setPrompt(t);return S||(A(1),S=!0),()=>(S&&(S=!1,A(-1)),e())},listen:t=>{const e=p.appendListener(t);return A(1),()=>{A(-1),e()}},win:t};return _},hash:(t,e={})=>{let n=!1,i=null,s=0,r=!1;const a=t.location,o=t.history,u=-1===t.navigator.userAgent.indexOf("Firefox"),c=null!=e.keyLength?e.keyLength:6,{getUserConfirmation:l=ar,hashType:h="slash"}=e,d=e.basename?gt(yt(e.basename)):"",{encodePath:f,decodePath:m}=mr[h],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 hr(!d||vt(t,d),'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 "'+d+'".'),d&&(t=wt(t,d)),Mt(t,void 0,kt(c))},g=dr(),y=t=>{Object.assign(N,t),N.length=o.length,g.notifyListeners(N.location,N.action)},b=()=>{const t=p(),e=f(t);if(t!==e)v(e);else{const t=w(),e=N.location;if(!n&&(s=e).pathname===(r=t).pathname&&s.search===r.search&&s.hash===r.hash&&s.key===r.key&&Ft(s.state,r.state))return;if(i===xt(t))return;i=null,x(t)}var s,r},x=t=>{if(n)n=!1,y();else{const e="POP";g.confirmTransitionTo(t,e,l,(n=>{n?y({action:e,location:t}):C(t)}))}},C=t=>{let e=M.lastIndexOf(xt(N.location)),i=M.lastIndexOf(xt(t));-1===e&&(e=0),-1===i&&(i=0);const s=e-i;s&&(n=!0,A(s))},k=p(),S=f(k);k!==S&&v(S);const F=w();let M=[xt(F)];const A=t=>{hr(u,"Hash history go(n) causes a full page reload in this browser"),o.go(t)},_=(t,e)=>{s+=e,1===s?t.addEventListener("hashchange",b):0===s&&t.removeEventListener("hashchange",b)},N={length:o.length,action:"POP",location:F,createHref:t=>"#"+f(d+xt(t)),push:(t,e)=>{hr(void 0===e,"Hash history cannot push state; it is ignored");const n="PUSH",s=Mt(t,void 0,kt(c),N.location);g.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=xt(s),r=f(d+e);if(p()!==r){i=e,(t=>{a.hash=t})(r);const t=M.lastIndexOf(xt(N.location)),o=M.slice(0,-1===t?0:t+1);o.push(e),M=o,y({action:n,location:s})}else hr(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),y()}))},replace:(t,e)=>{hr(void 0===e,"Hash history cannot replace state; it is ignored");const n="REPLACE",s=Mt(t,void 0,kt(c),N.location);g.confirmTransitionTo(s,n,l,(t=>{if(!t)return;const e=xt(s),r=f(d+e);p()!==r&&(i=e,v(r));const a=M.indexOf(xt(N.location));-1!==a&&(M[a]=e),y({action:n,location:s})}))},go:A,goBack:()=>A(-1),goForward:()=>A(1),block:(e="")=>{const n=g.setPrompt(e);return r||(_(t,1),r=!0),()=>(r&&(r=!1,_(t,-1)),n())},listen:e=>{const n=g.appendListener(e);return _(t,1),()=>{_(t,-1),n()}},win:t};return N}},wr=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=u(this,"isServer"),this.queue=u(this,"queue")}componentWillLoad(){this.history=vr[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=pr(t,this.root),this.location=t})),this.location=pr(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(Z.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 o(this)}},gr=class{constructor(e){t(this,e),this.stepSubmitSuccess=r(this,"step-completion",7),this.successPageAcknowledged=r(this,"successPageAcknowledged",5),this.initialised=r(this,"initialised",7),this.isSelfHosted=!1,this.isAppInitialised=!1}async componentWillLoad(){const t=P.fromNullable(this.accessToken);if(P.isNone(t))throw Error("jwt property is missing.");A.state.jwt=t;const e=P.fromNullable(this.backendUrl);if(P.isNone(e))throw Error("apiBaseUrl property is missing.");A.state.apiBaseUrl=P.some(e.value.replace(/\/$/,"")+"/");const n=P.fromNullable(this.appBaseUrl);if(P.isNone(n))throw Error("appBaseUrl property is missing.");A.state.appBaseUrl=P.some(n.value.replace(/\/$/,"")),A.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),A.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),A.state.hasSuperSelectionBeenSubmitted=!1,this.isSelfHosted&&_.navigateInternally(this.history,N.Success))}))}async componentDidLoad(){await A.loadAppStateAsync();const t=await Rt.GetExistingFundAsync();this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:A.accountIdOrDefault,partnerIdOrDefault:A.partnerIdOrDefault,profileId:A.profileId}),J.appReady();const e=P.fromNullable(this.ignoreExistingSelection),n=P.isSome(t)&&"Defined Benefits Fund"==t.value.type&&(P.isNone(A.isDefinedBenefitsEligible)||!A.isDefinedBenefitsEligible.value),i=P.isSome(e)&&e.value||n;P.isSome(A.state.superChoicePrefill)?_.navigateInternally(this.history,N.Prefill):P.isSome(t)&&"Inactive"!==t.value.valid&&!i?_.navigateInternally(this.history,N.ExistingChoicePage):_.navigateInternally(this.history,N.ChoicePage)}authTokenChanged(t){A.state.jwt=P.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return e(s,null,e("link",{rel:"stylesheet",href:i("apollo-super-selection.css"),media:"all"}),this.renderAppContent())}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 -mt-12 pb-6"},$,e("sss-footer-section",null)):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"]}}};E(gr),gr.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 yr,br=[],xr="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"}(yr||(yr={}));var Cr,kr=function(t){return Object.freeze(t)},Sr=function(t,e){this.inlineSize=t,this.blockSize=e,kr(this)},Fr=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,kr(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}(),Mr=function(t){return t instanceof SVGElement&&"getBBox"in t},Ar=function(t){if(Mr(t)){var e=t.getBBox();return!e.width&&!e.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_r=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)},Nr="undefined"!=typeof window?window:{},Er=new WeakMap,Br=/auto|scroll/,Ir=/^tb|vertical/,Pr=/msie|trident/i.test(Nr.navigator&&Nr.navigator.userAgent),Lr=function(t){return parseFloat(t||"0")},Dr=function(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=!1),new Sr((n?e:t)||0,(n?t:e)||0)},jr=kr({devicePixelContentBoxSize:Dr(),borderBoxSize:Dr(),contentBoxSize:Dr(),contentRect:new Fr(0,0,0,0)}),Tr=function(t,e){if(void 0===e&&(e=!1),Er.has(t)&&!e)return Er.get(t);if(Ar(t))return Er.set(t,jr),jr;var n=getComputedStyle(t),i=Mr(t)&&t.ownerSVGElement&&t.getBBox(),s=!Pr&&"border-box"===n.boxSizing,r=Ir.test(n.writingMode||""),a=!i&&Br.test(n.overflowY||""),o=!i&&Br.test(n.overflowX||""),u=i?0:Lr(n.paddingTop),c=i?0:Lr(n.paddingRight),l=i?0:Lr(n.paddingBottom),h=i?0:Lr(n.paddingLeft),d=i?0:Lr(n.borderTopWidth),f=i?0:Lr(n.borderRightWidth),m=i?0:Lr(n.borderBottomWidth),p=h+c,v=u+l,w=(i?0:Lr(n.borderLeftWidth))+f,g=d+m,y=o?t.offsetHeight-g-t.clientHeight:0,b=a?t.offsetWidth-w-t.clientWidth:0,x=s?p+w:0,C=s?v+g:0,k=i?i.width:Lr(n.width)-x-b,S=i?i.height:Lr(n.height)-C-y,F=k+p+b+w,M=S+v+y+g,A=kr({devicePixelContentBoxSize:Dr(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),r),borderBoxSize:Dr(F,M,r),contentBoxSize:Dr(k,S,r),contentRect:new Fr(h,u,k,S)});return Er.set(t,A),A},Rr=function(t,e,n){var i=Tr(t,n),s=i.borderBoxSize,r=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case yr.DEVICE_PIXEL_CONTENT_BOX:return a;case yr.BORDER_BOX:return s;default:return r}},Or=function(t){var e=Tr(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=kr([e.borderBoxSize]),this.contentBoxSize=kr([e.contentBoxSize]),this.devicePixelContentBoxSize=kr([e.devicePixelContentBoxSize])},Ur=function(t){if(Ar(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},qr=function(){var t=1/0,e=[];br.forEach((function(n){if(0!==n.activeTargets.length){var i=[];n.activeTargets.forEach((function(e){var n=new Or(e.target),s=Ur(e.target);i.push(n),e.lastReportedSize=Rr(e.target,e.observedBox),s<t&&(t=s)})),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},Hr=function(t){br.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(n){n.isActive()&&(Ur(n.target)>t?e.activeTargets.push(n):e.skippedTargets.push(n))}))}))},Vr=[],zr=0,Wr={attributes:!0,characterData:!0,childList:!0,subtree:!0},Jr=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],$r=function(t){return void 0===t&&(t=0),Date.now()+t},Xr=!1,Gr=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),!Xr){Xr=!0;var n,i=$r(t);n=function(){var n=!1;try{n=function(){var t,e=0;for(Hr(e);br.some((function(t){return t.activeTargets.length>0}));)e=qr(),Hr(e);return br.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:xr}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=xr),window.dispatchEvent(t)),e>0}()}finally{if(Xr=!1,t=i-$r(),!zr)return;n?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!Cr){var e=0,n=document.createTextNode("");new MutationObserver((function(){return Vr.splice(0).forEach((function(t){return t()}))})).observe(n,{characterData:!0}),Cr=function(){n.textContent=""+(e?e--:e++)}}Vr.push(t),Cr()}((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,Wr)};document.body?e():Nr.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Jr.forEach((function(e){return Nr.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Jr.forEach((function(e){return Nr.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),Zr=function(t){!zr&&t>0&&Gr.start(),!(zr+=t)&&Gr.stop()},Kr=function(){function t(t,e){this.target=t,this.observedBox=e||yr.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=Rr(this.target,this.observedBox,!0);return Mr(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}(),Yr=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Qr=new WeakMap,ta=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},ea=function(){function t(){}return t.connect=function(t,e){var n=new Yr(t,e);Qr.set(t,n)},t.observe=function(t,e,n){var i=Qr.get(t),s=0===i.observationTargets.length;ta(i.observationTargets,e)<0&&(s&&br.push(i),i.observationTargets.push(new Kr(e,n&&n.box)),Zr(1),Gr.schedule())},t.unobserve=function(t,e){var n=Qr.get(t),i=ta(n.observationTargets,e);i>=0&&(1===n.observationTargets.length&&br.splice(br.indexOf(n),1),n.observationTargets.splice(i,1),Zr(-1))},t.disconnect=function(t){var e=this,n=Qr.get(t);n.observationTargets.slice().forEach((function(n){return e.unobserve(t,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},t}(),na=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.");ea.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(!_r(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ea.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(!_r(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ea.unobserve(this,t)},t.prototype.disconnect=function(){ea.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const ia=new class{constructor(){this._appRootUrl=new ct((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await X(this.getAppRootUrl()+"config.json").get().json();$s.update({appConfiguration:P.fromNullable(t)})}resolveRootUrl(){const t=P.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(P.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}},sa=new class{constructor(){this.ignoreExistingSelectionQueryParameter="ignoreExistingSelection"}init(t){const e=new URLSearchParams(t),n=P.fromNullable(e.get(this.ignoreExistingSelectionQueryParameter)),i=P.fold((()=>!1),(t=>"true"===t))(n);$s.update({ignoreExistingSelection:i})}},ra=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===zs.Unauthorized||this.getValue().authenticationState===zs.Error}get isAuthorized(){return this.getValue().authenticationState===zs.Authenticated}}($s),aa=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const e=this.getAuthorizationCodeFromRoute(t);return P.isSome(e)}initFromRoute(t){const e=this.getAuthorizationCodeFromRoute(t);if(P.isNone(e))throw $s.update({authenticationState:zs.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",""+ia.getAppHostUrl()]]),n=await X(Xs.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(e.toString()).badRequest((()=>{throw $s.update({authenticationState:zs.Error}),new Error("Failed to authenticate.")})).json();$s.update({jwt:P.fromNullable(n.access_token),authenticationState:zs.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",ia.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const e=new URLSearchParams(t);return P.fromNullable(e.get(this.authCodeQueryParameter))}},oa=new class extends k{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return F(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return F(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(j(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}}($s);class ua{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=oa.getIframeInteropMode();P.isSome(t)?window.top.location.href=t.value:J.complete()}static initFromRoute(t){const e=new URLSearchParams(t),n=P.fromNullable(e.get("success-redirection-url")),i={successRedirectionUrl:P.none};if(P.isSome(n))try{const t=new URL(n.value);i.successRedirectionUrl=P.some(t.toString())}catch(t){throw Error(`"${n.value}" is not a valid URL`)}return i}}class ca{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 Ws}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){ca.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}ca.getRnInterop=()=>window.ReactNativeWebView;const la=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(oa.isIframeInteropEnabled())ua.completeSuperSelectionStep();else{if(!oa.isReactNativeInteropEnabled())throw Error("Unknown interop mode");ca.completeSuperSelectionStep()}}init(t){const e=new URLSearchParams(t),n=G(e.get(this.interopModeQueryParameter));F(n)&&"react-native"===n.value?$s.update({reactNativeInterop:M(ca.init())}):$s.update({iframeInterop:M(ua.initFromRoute(t))})}};const ha=new class extends k{constructor(t){super(t),this.store=t,this.ignoreExistingSelection$=this.select((t=>t.ignoreExistingSelection))}get ignoreExistingSelection(){return this.getValue().ignoreExistingSelection}}($s),da=class{constructor(e){t(this,e)}async componentWillLoad(){await async function(){sa.init(window.location.search),await ia.loadConfigurationAsync(),Gs.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(ra.isUnauthorized||aa.authorizationCodeIsPresent(window.location.search))&&(la.init(window.location.search),aa.initFromRoute(window.location.search))}(),ra.sessionState$.subscribe((t=>this.sessionState=t)),ra.jwt$.subscribe((t=>this.jwt=t)),Xs.appConfiguration$.subscribe((t=>this.appConfiguration=t)),ha.ignoreExistingSelection$.subscribe((t=>this.ignoreExistingSelection=t))}render(){return e(s,null,e("link",{rel:"stylesheet",href:i("apollo-super-selection.css"),media:"all"}),e("div",{ref:t=>this.observeContentResize(t)},P.isNone(this.appConfiguration)?e("sss-loading-page",{class:"font-inter"}):this.renderAppContent()))}renderAppContent(){return e("stencil-router",{root:ia.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:P.toUndefined(this.jwt),ignoreExistingSelection:this.ignoreExistingSelection,backendUrl:Xs.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(){la.completeSuperSelectionStep()}handleStepSubmitSuccess(){J.submitSuccess()}handleAppInitialised(t){Gs.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),Gs.getAppInsights().trackPageView();const e=document.getElementById("sss-external-loading-page-container");e&&document.body.removeChild(e)}observeContentResize(t){new(window.ResizeObserver||na)((()=>{J.resize(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case zs.Authenticated:return t;case zs.Unauthorized:return()=>e("sss-loading-page",null);case zs.Error:default:return()=>e("h1",null,"Authentication Error")}}};da.style="html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#2E66F7;--fl-color-primary-light:#EAF0FE;--fl-color-primary-dark:#031495;--fl-color-primary-disabled:#88ABFA;--fl-color-primary-hover:#5786F8;--fl-color-primary-focus:#1033C6;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{Bt as sss_button,It as sss_choice_router,Lt as sss_custom_fund,jt as sss_default_fund,Tt as sss_dropdown_async,Ot as sss_existing_choice_page,Ut as sss_footer_section,Vt as sss_header_section,zt as sss_loading_indicator,Wt as sss_loading_page,Jt as sss_my_own_fund_engagement_step_host,$t as sss_name_input,Xt as sss_prefill,Gt as sss_prefill_display_field,Zt as sss_prefill_error_box,Ce as sss_prefill_invalid_my_own_fund,ke as sss_prefill_invalid_smsf,Se as sss_prefill_my_own_fund,Me as sss_prefill_smsf,Ae as sss_prefill_warning_box,_e as sss_smsf_engagement_step_host,Ne as sss_standard_choice_form,Ee as sss_success,tr as sss_super_campaign_featured_funds,er as sss_super_campaign_host,sr as sss_super_smsf_host,rr as stencil_route,ur as stencil_route_link,lr as stencil_route_switch,wr as stencil_router,gr as super_selection_app,da as super_selection_app_host}