@flarehr/apollo-super-selection 3.61.64036 → 3.64.64582
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-0f723eb4.system.js +1 -1
- package/dist/lib/apollo-super-selection/{p-11954377.entry.js → p-1c2481c7.entry.js} +4 -4
- package/dist/lib/apollo-super-selection/{p-4b744211.system.entry.js → p-5139d22d.system.entry.js} +18 -18
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/sss-button_30.cjs.entry.js +34 -6
- package/dist/lib/collection/collection-manifest.json +1 -1
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.js +11 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +18 -10
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +13 -2
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/sss-button_30.entry.js +34 -6
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_30.entry.js +1 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +6 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +2 -0
- package/dist/lib/types/components.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{r as t,h as n,g as e,f as i,a as r,H as s,c as o,F as a,d as u,e as c,s as l}from"./p-683b6e23.js";import{f as d,m as f,S as h,a as p,i as m,b as v,O as w,c as y,d as g,g as b,h as x,j as k,k as S,l as C,Q as A}from"./p-29c11183.js";import{A as _}from"./p-40e504c4.js";function F(){}function M(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(M(((e,i)=>d(t(e,i)).pipe(f(((t,r)=>n(e,t,i,r))))),e)):("number"==typeof n&&(e=n),n=>n.lift(new I(t,e)))}class I{constructor(t,n=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=n}call(t,n){return n.subscribe(new T(t,this.project,this.concurrent))}}class T extends h{constructor(t,n,e=Number.POSITIVE_INFINITY){super(t),this.project=n,this.concurrent=e,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 n;const e=this.index++;try{n=this.project(t,e)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(n)}_innerSub(t){const n=new p(this),e=this.destination;e.add(n);const i=m(t,n);i!==n&&e.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 E(t,n,e,i){return y(e)&&(i=e,e=void 0),i?E(t,n,e).pipe(f((t=>v(t)?i(...t):i(t)))):new w((i=>{j(t,n,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,e)}))}function j(t,n,e,i,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(n,e,r),s=()=>i.removeEventListener(n,e,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(n,e),s=()=>i.off(n,e)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(n,e),s=()=>i.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;s<o;s++)j(t[s],n,e,i,r)}i.add(s)}class B{constructor(t,n){this.dueTime=t,this.scheduler=n}call(t,n){return n.subscribe(new N(t,this.dueTime,this.scheduler))}}class N extends b{constructor(t,n,e){super(t),this.dueTime=n,this.scheduler=e,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(P,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 P(t){t.debouncedNext()}function R(t,n,e){return function(i){return i.lift(new O(t,n,e))}}class O{constructor(t,n,e){this.nextOrObserver=t,this.error=n,this.complete=e}call(t,n){return n.subscribe(new D(t,this.nextOrObserver,this.error,this.complete))}}class D extends b{constructor(t,n,e,i){super(t),this._tapNext=F,this._tapError=F,this._tapComplete=F,this._tapError=e||F,this._tapComplete=i||F,y(n)?(this._context=this,this._tapNext=n):n&&(this._context=n,this._tapNext=n.next||F,this._tapError=n.error||F,this._tapComplete=n.complete||F)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var L=function(t){return"Some"===t._tag},U=function(t){return"None"===t._tag},q={_tag:"None"},z=function(t){return{_tag:"Some",value:t}};class V{constructor(t){this.factory=t,this._value=q}get value(){if(L(this._value))return this._value.value;const t=this.factory();return this._value=z(t),t}}function H(t){_.injectProps(t,["history","location"])}const W=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),$=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),X=t=>t.replace(/([=!:$/()])/g,"\\$1"),J=t=>t&&t.sensitive?"":"i",Y=(t,n,e)=>{for(var i=(e=e||{}).strict,r=!1!==e.end,s=$(e.delimiter||"/"),o=e.delimiters||"./",a=[].concat(e.endsWith||[]).map($).concat("$").join("|"),u="",c=!1,l=0;l<t.length;l++){var d=t[l];if("string"==typeof d)u+=$(d),c=l===t.length-1&&o.indexOf(d[d.length-1])>-1;else{var f=$(d.prefix||""),h=d.repeat?"(?:"+d.pattern+")(?:"+f+"(?:"+d.pattern+"))*":d.pattern;n&&n.push(d),u+=d.optional?d.partial?f+"("+h+")?":"(?:"+f+"("+h+"))?":f+"("+h+")"}}return r?(i||(u+="(?:"+s+")?"),u+="$"===a?"$":"(?="+a+")"):(i||(u+="(?:"+s+"(?="+a+"))?"),c||(u+="(?="+s+"|"+a+")")),new RegExp("^"+u,J(e))},G=(t,n,e)=>t instanceof RegExp?((t,n)=>{if(!n)return t;var e=t.source.match(/\((?!\?)/g);if(e)for(var i=0;i<e.length;i++)n.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,n):Array.isArray(t)?((t,n,e)=>{for(var i=[],r=0;r<t.length;r++)i.push(G(t[r],n,e).source);return new RegExp("(?:"+i.join("|")+")",J(e))})(t,n,e):((t,n,e)=>Y(((t,n)=>{for(var e,i=[],r=0,s=0,o="",a=n&&n.delimiter||"/",u=n&&n.delimiters||"./",c=!1;null!==(e=W.exec(t));){var l=e[0],d=e[1],f=e.index;if(o+=t.slice(s,f),s=f+l.length,d)o+=d[1],c=!0;else{var h="",p=t[s],m=e[2],v=e[3],w=e[4],y=e[5];if(!c&&o.length){var g=o.length-1;u.indexOf(o[g])>-1&&(h=o[g],o=o.slice(0,g))}o&&(i.push(o),o="",c=!1);var b=h||a,x=v||w;i.push({name:m||r++,prefix:h,delimiter:b,optional:"?"===y||"*"===y,repeat:"+"===y||"*"===y,partial:""!==h&&void 0!==p&&p!==h,pattern:x?X(x):"[^"+$(b)+"]+?"})}}return(o||s<t.length)&&i.push(o+t.substr(s)),i})(t,e),n,e))(t,n,e),K=(t,n)=>new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(t),Q=(t,n)=>K(t,n)?t.substr(n.length):t,Z=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,tt=t=>"/"===t.charAt(0)?t:"/"+t,nt=t=>"/"===t.charAt(0)?t.substr(1):t,et=t=>{const{pathname:n,search:e,hash:i}=t;let r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},it=t=>"/"===t.charAt(0),rt=t=>Math.random().toString(36).substr(2,t),st=(t,n)=>{for(let e=n,i=e+1,r=t.length;i<r;e+=1,i+=1)t[e]=t[i];t.pop()},ot=(t,n)=>{if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(((t,e)=>ot(t,n[e])));const e=typeof t;if(e!==typeof n)return!1;if("object"===e){const e=t.valueOf(),i=n.valueOf();if(e!==t||i!==n)return ot(e,i);const r=Object.keys(t),s=Object.keys(n);return r.length===s.length&&r.every((e=>ot(t[e],n[e])))}return!1},at=(t,n,e,i)=>{let r;"string"==typeof t?(r=(t=>{let n=t||"/",e="",i="";const r=n.indexOf("#");-1!==r&&(i=n.substr(r),n=n.substr(0,r));const s=n.indexOf("?");return-1!==s&&(e=n.substr(s),n=n.substr(0,s)),{pathname:n,search:"?"===e?"":e,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==n&&(r.state=n)):(r=Object.assign({pathname:""},t),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==n&&void 0===r.state&&(r.state=n));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var s;return r.key=e,i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=((t,n="")=>{let e,i=n&&n.split("/")||[],r=0;const s=t&&t.split("/")||[],o=t&&it(t),a=n&&it(n),u=o||a;if(t&&it(t)?i=s:s.length&&(i.pop(),i=i.concat(s)),!i.length)return"/";if(i.length){const t=i[i.length-1];e="."===t||".."===t||""===t}else e=!1;for(let t=i.length;t>=0;t--){const n=i[t];"."===n?st(i,t):".."===n?(st(i,t),r++):r&&(st(i,t),r--)}if(!u)for(;r--;r)i.unshift("..");!u||""===i[0]||i[0]&&it(i[0])||i.unshift("");let c=i.join("/");return e&&"/"!==c.substr(-1)&&(c+="/"),c})(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r.query=(s=r.search||"")?(/^[?#]/.test(s)?s.slice(1):s).split("&").reduce(((t,n)=>{let[e,i]=n.split("=");return t[e]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},r};let ut=0;const ct={},lt=(t,n={})=>{"string"==typeof n&&(n={path:n});const{path:e="/",exact:i=!1,strict:r=!1}=n,{re:s,keys:o}=((t,n)=>{const e=`${n.end}${n.strict}`,i=ct[e]||(ct[e]={}),r=JSON.stringify(t);if(i[r])return i[r];const s=[],o={re:G(t,s,n),keys:s};return ut<1e4&&(i[r]=o,ut+=1),o})(e,{end:i,strict:r}),a=s.exec(t);if(!a)return null;const[u,...c]=a,l=t===u;return i&&!l?null:{path:e,url:"/"===e&&""===u?"/":u,isExact:l,params:o.reduce(((t,n,e)=>(t[n.name]=c[e],t)),{})}};var dt;!function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(dt||(dt={}));const ft=class{constructor(n){t(this,n),this.fillWidth=!1,this.fillWidthOnMobile=!1,this.disabled=!1,this.variant="primary",this.promiseFn=()=>Promise.resolve(),this.state=dt.Available}render(){return n("button",{class:{"inline-flex items-center justify-center px-4 py-2 border text-base font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 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,"w-full":this.fillWidth||this.fillWidthOnMobile,"sm:w-auto":this.fillWidthOnMobile},disabled:this.disabled,onClick:()=>this.clicked()},this.state===dt.Pending&&n("sss-loading-indicator",{theme:"primary"===this.variant?"light":"primary",size:16}),n("div",{class:{hidden:this.state===dt.Pending}},n("slot",null)))}async clicked(){if(this.promiseFn&&this.state!==dt.Pending)try{this.state=dt.Pending,await this.promiseFn(),this.state=dt.Available}catch(t){throw this.state=dt.Error,t}}};var ht=function(){return(ht=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},pt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},mt=function(t,n,e){if(void 0===e&&(e=!1),!t||!n||"object"!=typeof t||"object"!=typeof n)return t;var i=ht({},t);for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]instanceof Array&&t[r]instanceof Array?e?pt(t[r],n[r]):n[r]:"object"==typeof n[r]&&"object"==typeof t[r]?mt(t[r],n[r],e):n[r]);return i},vt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},wt={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(t,n){for(var e=void 0===n?{}:n,i=e.doThrow,r=void 0===i||i,s=e.instance,o=void 0!==s&&s,a=[],u=2;u<arguments.length;u++)a[u-2]=arguments[u];var c=this.polyfills[t]||("undefined"!=typeof self?self[t]:null)||("undefined"!=typeof global?global[t]:null);if(r&&!c)throw new Error(t+" is not defined");return o&&c?new(c.bind.apply(c,vt([void 0],a))):c}},yt=function(t,n,e,i){if(!t.getEntriesByName)return!1;var r=t.getEntriesByName(n);return!!(r&&r.length>0)&&(e(r.reverse()[0]),i.clearMeasures&&i.clearMeasures(n),gt.callbacks.delete(n),gt.callbacks.size<1&&(gt.observer.disconnect(),i.clearResourceTimings&&i.clearResourceTimings()),!0)},gt={callbacks:new Map,observer:null,observe:function(t,n){if(t&&n){var e=wt.polyfill("performance",{doThrow:!1});(function(t,n){return!gt.observer&&t&&n&&(gt.observer=new n((function(n){gt.callbacks.forEach((function(e,i){yt(n,i,e,t)}))})),t.clearResourceTimings&&t.clearResourceTimings()),gt.observer})(e,wt.polyfill("PerformanceObserver",{doThrow:!1}))&&(yt(e,t,n,e)||(gt.callbacks.size<1&>.observer.observe({entryTypes:["resource","measure"]}),gt.callbacks.set(t,n)))}}},bt=function(t){this.error=t},xt=function(){return(xt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},kt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},St=function(){function t(t,n,e,i,r,s){void 0===e&&(e=new Map),void 0===i&&(i=[]),void 0===r&&(r=[]),void 0===s&&(s=[]),this._url=t,this._options=n,this._catchers=e,this._resolvers=i,this._middlewares=r,this._deferredChain=s}return t.factory=function(n,e){return void 0===n&&(n=""),void 0===e&&(e={}),new t(n,e)},t.prototype.selfFactory=function(n){var e=void 0===n?{}:n,i=e.url,r=e.options,s=e.catchers,o=void 0===s?this._catchers:s,a=e.resolvers,u=void 0===a?this._resolvers:a,c=e.middlewares,l=void 0===c?this._middlewares:c,d=e.deferredChain,f=void 0===d?this._deferredChain:d;return new t(void 0===i?this._url:i,xt({},void 0===r?this._options:r),new Map(o),kt(u),kt(l),kt(f))},t.prototype.defaults=function(t,n){return void 0===n&&(n=!1),wt.defaults=n?mt(wt.defaults,t):t,this},t.prototype.errorType=function(t){return wt.errorType=t,this},t.prototype.polyfills=function(t){return wt.polyfills=xt(xt({},wt.polyfills),t),this},t.prototype.url=function(t,n){if(void 0===n&&(n=!1),n)return this.selfFactory({url:t});var e=this._url.split("?");return this.selfFactory({url:e.length>1?e[0]+t+"?"+e[1]:this._url+t})},t.prototype.options=function(t,n){return void 0===n&&(n=!0),this.selfFactory({options:n?mt(this._options,t):t})},t.prototype.query=function(t,n){return void 0===n&&(n=!1),this.selfFactory({url:Ct(this._url,t,n)})},t.prototype.headers=function(t){return this.selfFactory({options:mt(this._options,{headers:t||{}})})},t.prototype.accept=function(t){return this.headers({Accept:t})},t.prototype.content=function(t){var n;return this.headers(((n={})["Content-Type"]=t,n))},t.prototype.auth=function(t){return this.headers({Authorization:t})},t.prototype.catcher=function(t,n){var e=new Map(this._catchers);return e.set(t,n),this.selfFactory({catchers:e})},t.prototype.signal=function(t){return this.selfFactory({options:xt(xt({},this._options),{signal:t.signal})})},t.prototype.resolve=function(t,n){return void 0===n&&(n=!1),this.selfFactory({resolvers:n?[t]:kt(this._resolvers,[t])})},t.prototype.defer=function(t,n){return void 0===n&&(n=!1),this.selfFactory({deferredChain:n?[t]:kt(this._deferredChain,[t])})},t.prototype.middlewares=function(t,n){return void 0===n&&(n=!1),this.selfFactory({middlewares:n?t:kt(this._middlewares,t)})},t.prototype.method=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=null);var i=this._options.headers,r=e?"object"!=typeof e||i&&!Object.entries(i).every((function(t){var n=t[1];return t[0].toLowerCase()!=="Content-Type".toLowerCase()||n.startsWith("application/json")}))?this.body(e):this.json(e):this;return function(t){var n=t._url,e=t._resolvers,i=t._middlewares,r=t._options,s=new Map(t._catchers),o=mt(wt.defaults,r),a=wt.polyfill("AbortController",{doThrow:!1,instance:!0});!o.signal&&a&&(o.signal=a.signal);var u={ref:null,clear:function(){u.ref&&(clearTimeout(u.ref),u.ref=null)}},c=function(t){return function(n){return 0===t.length?n:1===t.length?t[0](n):t.reduceRight((function(e,i,r){return i(r===t.length-2?e(n):e)}))}}(i)(wt.polyfill("fetch"))(n,o),l=c.catch((function(t){throw new bt(t)})).then((function(t){return u.clear(),t.ok?t:t[wt.errorType||"text"]().then((function(n){var e=new Error(n);throw e[wt.errorType||"text"]=n,e.status=t.status,e.response=t,e}))})),d=function(n){return function(e){return(n?l.then((function(t){return t&&t[n]()})).then((function(t){return e?e(t):t})):l.then((function(t){return e?e(t):t}))).catch((function(n){u.clear();var e=n instanceof bt?n.error:n;if(n instanceof bt&&s.has("__fromFetch"))return s.get("__fromFetch")(e,t);if(s.has(e.status))return s.get(e.status)(e,t);if(s.has(e.name))return s.get(e.name)(e,t);throw e}))}},f={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(t){return c.then((function(n){return gt.observe(n.url,t)})),f},setTimeout:function(t,n){return void 0===n&&(n=a),u.clear(),u.ref=setTimeout((function(){return n.abort()}),t),f},controller:function(){return[a,f]},error:function(t,n){return s.set(t,n),f},badRequest:function(t){return f.error(400,t)},unauthorized:function(t){return f.error(401,t)},forbidden:function(t){return f.error(403,t)},notFound:function(t){return f.error(404,t)},timeout:function(t){return f.error(408,t)},internalError:function(t){return f.error(500,t)},fetchError:function(t){return f.error("__fromFetch",t)},onAbort:function(t){return f.error("AbortError",t)}};return e.reduce((function(n,e){return e(n,t)}),f)}((r=r.options(xt(xt({},n),{method:t})))._deferredChain.reduce((function(t,n){return n(t,t._url,t._options)}),r))},t.prototype.get=function(t){return this.method("GET",t)},t.prototype.delete=function(t){return this.method("DELETE",t)},t.prototype.put=function(t,n){return this.method("PUT",n,t)},t.prototype.post=function(t,n){return this.method("POST",n,t)},t.prototype.patch=function(t,n){return this.method("PATCH",n,t)},t.prototype.head=function(t){return this.method("HEAD",t)},t.prototype.opts=function(t){return this.method("OPTIONS",t)},t.prototype.replay=function(t){return this.method(this._options.method,t)},t.prototype.body=function(t){return this.selfFactory({options:xt(xt({},this._options),{body:t})})},t.prototype.json=function(t){var n,e=null===(n=Object.entries(this._options.headers||{}).find((function(t){var n=t[1];return t[0].toLowerCase()==="Content-Type".toLowerCase()&&n.startsWith("application/json")})))||void 0===n?void 0:n[1];return this.content(e||"application/json").body(JSON.stringify(t))},t.prototype.formData=function(t,n){return void 0===n&&(n=!1),this.body(At(t,n))},t.prototype.formUrl=function(t){return this.body("string"==typeof t?t:(n=t,Object.keys(n).map((function(t){var e=n[t];return e instanceof Array?e.map((function(n){return _t(t,n)})).join("&"):_t(t,e)})).join("&"))).content("application/x-www-form-urlencoded");var n},t}(),Ct=function(t,n,e){var i;if("string"==typeof n)i=n;else{var r=wt.polyfill("URLSearchParams",{instance:!0});for(var s in n)if(n[s]instanceof Array)for(var o=0,a=n[s];o<a.length;o++)r.append(s,a[o]);else r.append(s,n[s]);i=r.toString()}var u=t.split("?");return e||u.length<2?u[0]+"?"+i:t+"&"+i};function At(t,n,e,i){return void 0===n&&(n=!1),void 0===e&&(e=wt.polyfill("FormData",{instance:!0})),void 0===i&&(i=[]),Object.entries(t).forEach((function(t){var r=t[0],s=t[1],o=i.reduce((function(t,n){return t?t+"["+n+"]":n}),null);if(o=o?o+"["+r+"]":r,s instanceof Array)for(var a=0,u=s;a<u.length;a++)e.append(o+"[]",u[a]);else!n||"object"!=typeof s||n instanceof Array&&n.includes(r)?e.append(o,s):null!==s&&At(s,n,e,kt(i,[r]))})),e}function _t(t,n){return encodeURIComponent(t)+"="+encodeURIComponent("object"==typeof n?JSON.stringify(n):""+n)}var Ft=St.factory;Ft.default=St.factory;const Mt=t=>!("isConnected"in t)||t.isConnected,It=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(Mt))})(...n)}),2e3)}})(),Tt=(t,n)=>{const r=((t,n=((t,n)=>t!==n))=>{let e=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},r=()=>{e=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},s=t=>(i.get.forEach((n=>n(t))),e.get(t)),o=(t,r)=>{const s=e.get(t);n(r,s,t)&&(e.set(t,r),i.set.forEach((n=>n(t,r,s))))},a="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,n)=>s(n),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>e.has(n),set:(t,n,e)=>(o(n,e),!0)}),u=(t,n)=>(i[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(i[t],n)});return{state:a,get:s,set:o,on:u,onChange:(n,e)=>{const i=u("set",((t,i)=>{t===n&&e(i)})),r=u("reset",(()=>e(t[n])));return()=>{i(),r()}},use:(...t)=>t.forEach((t=>{t.set&&u("set",t.set),t.get&&u("get",t.get),t.reset&&u("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),r()},reset:r}})(t,n);return(({on:t})=>{const n=new Map;"function"==typeof e&&(t("dispose",(()=>{n.clear()})),t("get",(t=>{const i=e();i&&((t,n,e)=>{const i=t.get(n);i?i.includes(e)||i.push(e):t.set(n,[e])})(n,t,i)})),t("set",(t=>{const e=n.get(t);e&&n.set(t,e.filter(i)),It(n)})),t("reset",(()=>{n.forEach((t=>t.forEach(i))),It(n)})))})(r),r};function Et(t,n,e){return t(e={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var jt=Et((function(t,n){function e(t){return t}function i(t){return function(){return t}}function r(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.bindTo_=n.bind_=n.hole=n.pipe=n.untupled=n.tupled=n.absurd=n.decrement=n.increment=n.tuple=n.flow=n.flip=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.constant=n.not=n.unsafeCoerce=n.identity=void 0,n.identity=e,n.unsafeCoerce=e,n.not=function(t){return function(n){return!t(n)}},n.constant=i,n.constTrue=i(!0),n.constFalse=i(!1),n.constNull=i(null),n.constUndefined=i(void 0),n.constVoid=n.constUndefined,n.flip=function(t){return function(n,e){return t(e,n)}},n.flow=function(t,n,e,i,r,s,o,a,u){switch(arguments.length){case 1:return t;case 2:return function(){return n(t.apply(this,arguments))};case 3:return function(){return e(n(t.apply(this,arguments)))};case 4:return function(){return i(e(n(t.apply(this,arguments))))};case 5:return function(){return r(i(e(n(t.apply(this,arguments)))))};case 6:return function(){return s(r(i(e(n(t.apply(this,arguments))))))};case 7:return function(){return o(s(r(i(e(n(t.apply(this,arguments)))))))};case 8:return function(){return a(o(s(r(i(e(n(t.apply(this,arguments))))))))};case 9:return function(){return u(a(o(s(r(i(e(n(t.apply(this,arguments)))))))))}}},n.tuple=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t},n.increment=function(t){return t+1},n.decrement=function(t){return t-1},n.absurd=r,n.tupled=function(t){return function(n){return t.apply(void 0,n)}},n.untupled=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(n)}},n.pipe=function(t,n,e,i,r,s,o,a,u,c,l,d,f,h,p,m,v,w,y,g){switch(arguments.length){case 1:return t;case 2:return n(t);case 3:return e(n(t));case 4:return i(e(n(t)));case 5:return r(i(e(n(t))));case 6:return s(r(i(e(n(t)))));case 7:return o(s(r(i(e(n(t))))));case 8:return a(o(s(r(i(e(n(t)))))));case 9:return u(a(o(s(r(i(e(n(t))))))));case 10:return c(u(a(o(s(r(i(e(n(t)))))))));case 11:return l(c(u(a(o(s(r(i(e(n(t))))))))));case 12:return d(l(c(u(a(o(s(r(i(e(n(t)))))))))));case 13:return f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))));case 14:return h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))));case 15:return p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))));case 16:return m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))));case 17:return v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))))));case 18:return w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))))));case 19:return y(w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))))))));case 20:return g(y(w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))))))))}},n.hole=r,n.bind_=function(t,n,e){var i;return Object.assign({},t,((i={})[n]=e,i))},n.bindTo_=function(t){return function(n){var e;return(e={})[t]=n,e}}})),Bt=Et((function(t,n){function e(t){return null==t?n.none:n.some(t)}function i(t){return"Right"===t._tag?n.none:n.some(t.left)}function r(t){return"Left"===t._tag?n.none:n.some(t.right)}function s(t){return function(i){return n.isNone(i)?n.none:e(t(i.value))}}Object.defineProperty(n,"__esModule",{value:!0}),n.getApplySemigroup=n.getOrd=n.getEq=n.getShow=n.URI=n.wilt=n.wither=n.sequence=n.traverse=n.partitionMap=n.partition=n.filterMap=n.filter=n.separate=n.compact=n.reduceRight=n.foldMap=n.reduce=n.duplicate=n.extend=n.throwError=n.zero=n.alt=n.altW=n.flatten=n.chainFirst=n.chain=n.of=n.apSecond=n.apFirst=n.ap=n.map=n.chainNullableK=n.mapNullable=n.fromNullableK=n.getOrElse=n.getOrElseW=n.toUndefined=n.toNullable=n.fold=n.fromEither=n.getRight=n.getLeft=n.tryCatch=n.fromPredicate=n.fromNullable=n.some=n.none=n.isNone=n.isSome=void 0,n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.apS=n.bind=n.bindTo=n.Do=n.getRefinement=n.exists=n.elem=n.option=n.MonadThrow=n.Witherable=n.Traversable=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.Alt=n.Foldable=n.Monad=n.Applicative=n.Functor=n.getMonoid=n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=void 0,n.isSome=function(t){return"Some"===t._tag},n.isNone=function(t){return"None"===t._tag},n.none={_tag:"None"},n.some=function(t){return{_tag:"Some",value:t}},n.fromNullable=e,n.fromPredicate=function(t){return function(e){return t(e)?n.some(e):n.none}},n.tryCatch=function(t){try{return n.some(t())}catch(t){return n.none}},n.getLeft=i,n.getRight=r,n.fromEither=r,n.fold=function(t,e){return function(i){return n.isNone(i)?t():e(i.value)}},n.toNullable=function(t){return n.isNone(t)?null:t.value},n.toUndefined=function(t){return n.isNone(t)?void 0:t.value},n.getOrElseW=function(t){return function(e){return n.isNone(e)?t():e.value}},n.getOrElse=n.getOrElseW,n.fromNullableK=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t.apply(void 0,n))}},n.mapNullable=s,n.chainNullableK=s;var o=function(t,e){return jt.pipe(t,n.map(e))},a=function(t,e){return jt.pipe(t,n.ap(e))},u=function(t,e){return jt.pipe(t,n.chain(e))},c=function(t,e,i){return jt.pipe(t,n.reduce(e,i))},l=function(t){var e=n.foldMap(t);return function(t,n){return jt.pipe(t,e(n))}},d=function(t,e,i){return jt.pipe(t,n.reduceRight(e,i))},f=function(t){var e=n.traverse(t);return function(t,n){return jt.pipe(t,e(n))}},h=function(t,e){return jt.pipe(t,n.alt(e))},p=function(t,e){return jt.pipe(t,n.filter(e))},m=function(t,e){return jt.pipe(t,n.filterMap(e))},v=function(t,e){return jt.pipe(t,n.extend(e))},w=function(t,e){return jt.pipe(t,n.partition(e))},y=function(t,e){return jt.pipe(t,n.partitionMap(e))},g=function(t){var e=n.wither(t);return function(t,n){return jt.pipe(t,e(n))}},b=function(t){var e=n.wilt(t);return function(t,n){return jt.pipe(t,e(n))}};n.map=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e.value))}},n.ap=function(t){return function(e){return n.isNone(e)||n.isNone(t)?n.none:n.some(e.value(t.value))}},n.apFirst=function(t){return jt.flow(n.map((function(t){return function(){return t}})),n.ap(t))},n.apSecond=function(t){return jt.flow(n.map((function(){return function(t){return t}})),n.ap(t))},n.of=n.some,n.chain=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.chainFirst=function(t){return n.chain((function(e){return jt.pipe(t(e),n.map((function(){return e})))}))},n.flatten=n.chain(jt.identity),n.altW=function(t){return function(e){return n.isNone(e)?t():e}},n.alt=n.altW,n.zero=function(){return n.none},n.throwError=function(){return n.none},n.extend=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e))}},n.duplicate=n.extend(jt.identity),n.reduce=function(t,e){return function(i){return n.isNone(i)?t:e(t,i.value)}},n.foldMap=function(t){return function(e){return function(i){return n.isNone(i)?t.empty:e(i.value)}}},n.reduceRight=function(t,e){return function(i){return n.isNone(i)?t:e(i.value,t)}},n.compact=n.flatten;var x={left:n.none,right:n.none};function k(t){return{equals:function(e,i){return e===i||(n.isNone(e)?n.isNone(i):!n.isNone(i)&&t.equals(e.value,i.value))}}}function S(t){return{concat:function(e,i){return n.isSome(e)&&n.isSome(i)?n.some(t.concat(e.value,i.value)):n.none}}}n.separate=function(t){var e=jt.pipe(t,n.map((function(t){return{left:i(t),right:r(t)}})));return n.isNone(e)?x:e.value},n.filter=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)?e:n.none}},n.filterMap=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.partition=function(t){return function(n){return{left:p(n,(function(n){return!t(n)})),right:p(n,t)}}},n.partitionMap=function(t){return jt.flow(n.map(t),n.separate)},n.traverse=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):t.map(e(i.value),n.some)}}},n.sequence=function(t){return function(e){return n.isNone(e)?t.of(n.none):t.map(e.value,n.some)}},n.wither=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):e(i.value)}}},n.wilt=function(t){return function(e){return function(s){return n.isNone(s)?t.of({left:n.none,right:n.none}):t.map(e(s.value),(function(t){return{left:i(t),right:r(t)}}))}}},n.URI="Option",n.getShow=function(t){return{show:function(e){return n.isNone(e)?"none":"some("+t.show(e.value)+")"}}},n.getEq=k,n.getOrd=function(t){return{equals:k(t).equals,compare:function(e,i){return e===i?0:n.isSome(e)?n.isSome(i)?t.compare(e.value,i.value):1:-1}}},n.getApplySemigroup=S,n.getApplyMonoid=function(t){return{concat:S(t).concat,empty:n.some(t.empty)}},n.getFirstMonoid=function(){return{concat:function(t,e){return n.isNone(t)?e:t},empty:n.none}},n.getLastMonoid=function(){return{concat:function(t,e){return n.isNone(e)?t:e},empty:n.none}},n.getMonoid=function(t){return{concat:function(e,i){return n.isNone(e)?i:n.isNone(i)?e:n.some(t.concat(e.value,i.value))},empty:n.none}},n.Functor={URI:n.URI,map:o},n.Applicative={URI:n.URI,map:o,ap:a,of:n.of},n.Monad={URI:n.URI,map:o,ap:a,of:n.of,chain:u},n.Foldable={URI:n.URI,reduce:c,foldMap:l,reduceRight:d},n.Alt={URI:n.URI,map:o,alt:h},n.Alternative={URI:n.URI,map:o,ap:a,of:n.of,alt:h,zero:n.zero},n.Extend={URI:n.URI,map:o,extend:v},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:o,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y},n.Traversable={URI:n.URI,map:o,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence},n.Witherable={URI:n.URI,map:o,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y,wither:g,wilt:b},n.MonadThrow={URI:n.URI,map:o,ap:a,of:n.of,chain:u,throwError:n.throwError},n.option={URI:n.URI,map:o,of:n.of,ap:a,chain:u,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence,zero:n.zero,alt:h,extend:v,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y,wither:g,wilt:b,throwError:n.throwError},n.elem=function(t){return function(e,i){return!n.isNone(i)&&t.equals(e,i.value)}},n.exists=function(t){return function(e){return!n.isNone(e)&&t(e.value)}},n.getRefinement=function(t){return function(e){return n.isSome(t(e))}},n.Do=n.of({}),n.bindTo=function(t){return n.map(jt.bindTo_(t))},n.bind=function(t,e){return n.chain((function(i){return jt.pipe(e(i),n.map((function(n){return jt.bind_(i,t,n)})))}))},n.apS=function(t,e){return jt.flow(n.map((function(n){return function(e){return jt.bind_(n,t,e)}})),n.ap(e))},n.traverseArrayWithIndex=function(t){return function(e){for(var i=[],r=0;r<e.length;r++){var s=t(r,e[r]);if(n.isNone(s))return n.none;i.push(s.value)}return n.some(i)}},n.traverseArray=function(t){return n.traverseArrayWithIndex((function(n,e){return t(e)}))},n.sequenceArray=n.traverseArray(jt.identity)}));function Nt(t){this.message=t}(Nt.prototype=new Error).name="InvalidCharacterError";var Pt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new Nt("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,s=0,o="";i=n.charAt(s++);~i&&(e=r%4?64*e+i:i,r++%4)?o+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function Rt(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(Pt(t).replace(/(.)/g,(function(t,n){var e=n.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(n)}catch(t){return Pt(n)}}function Ot(t){this.message=t}(Ot.prototype=new Error).name="InvalidTokenError";const Dt=new class{async getAustralianFundsAsync(t,n=!1){return qt().url("super-choice/australian-funds?"+this.toQueryString(n,t)).get().notFound((()=>{throw new Error("Failed to fetch the list of australian super funds.")})).json()}async getAppStateAsync(){return qt().url("client-app-state").get().notFound((()=>{throw new Error("Failed to fetch application configuration.")})).json()}toSearchFilterQueryString(t){switch(t.type){case"partialMatch":return`search=${t.searchString}&maxRecordCount=${t.maxRecordCount}`;case"usiMatch":return"usi="+t.usi}}toQueryString(t,n){return[this.toSearchFilterQueryString(n),t?"includeInactive=true":""].filter((t=>t&&t.length)).join("&")}},Lt={apiBaseUrl:Bt.none,appBaseUrl:Bt.none,profileId:Bt.none,jwt:Bt.none,superBuyer:Bt.none,promotedFunds:Bt.none,accountConfiguration:Bt.none,hasSuccessPageBeenAcknowledged:!1,hasSuperSelectionBeenSubmitted:!1},Ut=new class{constructor(){const{state:t,onChange:n}=Tt(Lt);this._state=t,this._onChange=n,n("jwt",(t=>{this._state.profileId=jt.pipe(t,Bt.chain((t=>Bt.fromNullable(function(t,n){if("string"!=typeof t)throw new Ot("Invalid token specified");var e=!0===(n=n||{}).header?0:1;try{return JSON.parse(Rt(t.split(".")[e]))}catch(t){throw new Ot("Invalid token specified: "+t.message)}}(t).sub))))}))}get state(){return this._state}get onChange(){return this._onChange}get superBuyer(){if(Bt.isNone(this._state.superBuyer))throw Error("User information is not set");return this._state.superBuyer.value}get apiBaseUrl(){if(Bt.isNone(this._state.apiBaseUrl))throw Error("API base URL is not set");return this._state.apiBaseUrl.value}get appBaseUrl(){if(Bt.isNone(this._state.appBaseUrl))throw Error("App base URL is not set");return this._state.appBaseUrl.value}get promotedFunds(){if(Bt.isNone(this._state.promotedFunds))throw Error("Promoted Funds is not set");return this._state.promotedFunds.value}get profileId(){if(Bt.isNone(this._state.profileId))throw Error("Failed to get Profile ID from JWT");return this._state.profileId.value}get defaultFundUsi(){return jt.pipe(this._state.accountConfiguration,Bt.map((t=>Bt.fromNullable(t.defaultFundUsi))),Bt.flatten)}get accountIdOrDefault(){return jt.pipe(this._state.accountConfiguration,Bt.map((t=>t.accountId)),Bt.getOrElse((()=>"")))}get partnerIdOrDefault(){return jt.pipe(this._state.superBuyer,Bt.map((t=>t.partnerId)),Bt.getOrElse((()=>"")))}get jwt(){if(Bt.isNone(this._state.jwt))throw Error("No authentication information was found");return this._state.jwt.value}get showSmsfNotSupported(){return jt.pipe(this._state.superBuyer,Bt.map((t=>t.showSmsfNotSupported)),Bt.getOrElse((()=>!1)))}completeSuperSelectionFlow(){this._state.hasSuccessPageBeenAcknowledged=!0}markSuperSelectionAsSubmitted(){this._state.hasSuperSelectionBeenSubmitted=!0}async loadAppStateAsync(){const t=await Dt.getAppStateAsync();this._state.accountConfiguration=Bt.fromNullable(t.accountConfiguration),this._state.superBuyer=Bt.fromNullable(t.superBuyer),this._state.promotedFunds=Bt.fromNullable(t.promotedFunds)}};function qt(){const t=Ut.jwt,n=Ut.profileId,e=Ut.accountIdOrDefault,i=Ut.partnerIdOrDefault;return Ft(Ut.apiBaseUrl).headers({Authorization:"Bearer "+t,"X-PROFILE-ID":n,"X-PARTNER-ID":i,"X-ACCOUNT-ID":e})}class zt{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(t){return qt().url("analytics-events").post(t).res()}}class Vt{constructor(){this.eventTrackingApi=zt.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackFinancialProductViewedAsync(t){return this.trackEventAsync({FinancialProductViewed:t})}async TrackSuperFundPdsViewedAsync(t){return this.trackEventAsync({SuperFundPdsViewed:t})}async TrackFinancialProductAcceptedAsync(t){return this.trackEventAsync({FinancialProductAccepted:t})}async TrackFinancialProductRejectedAsync(t){return this.trackEventAsync({FinancialProductRejected:t})}async TrackSuperFundPrivacyConfirmationAcceptedAsync(t){return this.trackEventAsync({SuperFundPrivacyConfirmationAccepted:t})}async TrackPromotedSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:t}})}async TrackMyOwnSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:t}})}async TrackSmsfSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{Smsf:t}})}async TrackDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:t}})}async TrackSuperFundPanelViewedAsync(t){return this.trackEventAsync({SuperFundPanelViewed:t})}async TrackSuperFundNominationViewedAsync(t){return this.trackEventAsync({SuperFundNominationViewed:t})}async TrackSuperFundNominationDeclinedAsync(t){return this.trackEventAsync({SuperFundNominationDeclined:t})}async TrackSuperFundDisclaimerViewedAsync(t){return this.trackEventAsync({SuperFundDisclaimerViewed:t})}async TrackSuperFundDisclaimerAcceptedAsync(t){return this.trackEventAsync({SuperFundDisclaimerAccepted:t})}async trackEventAsync(t){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:t})}catch(t){return}}}function Ht(t,n){void 0===n&&(n="*"),t.sender="flare",window.parent.postMessage(t,n)}const Wt=function(){Ht({type:"appReady"})},$t=function(t,n){Ht({type:"contentResized",height:t,width:n})},Xt=function(t){Ht({type:"pageNavigated",url:t})},Jt=function(){Ht({type:"complete"})},Yt=function(){Ht({type:"submitSuccess"})},{state:Gt}=Tt({handleSubmitFn:async function(){},fundName:"",promotedFundId:void 0});var Kt;!function(t){t.ConsentPage="/consent",t.ExistingChoicePage="/existing",t.ChoicePage="/",t.SlateJoin="/slate/join/",t.PromotedFundJoinV1="/promoted-fund/join/v1",t.PromotedFundJoinV2="/promoted-fund/join/v2",t.MyOwnFund="/super-choice/my-own-fund/",t.SelfManagedFund="/super-choice/smsf/",t.DefaultFund="/super-choice/default/",t.StandardChoice="/standard-choice/",t.Success="/success/"}(Kt||(Kt={}));const Qt=[n("stencil-route",{url:Kt.ConsentPage,component:"sss-consent-page"}),n("stencil-route",{url:Kt.ExistingChoicePage,component:"sss-existing-choice-page"}),n("stencil-route",{exact:!0,url:Kt.ChoicePage,component:"sss-super-choice-page"}),n("stencil-route",{url:Kt.SlateJoin,component:"sss-slate-join-page"}),n("stencil-route",{url:Kt.PromotedFundJoinV1,component:"sss-promoted-fund-join-v1-page"}),n("stencil-route",{url:Kt.PromotedFundJoinV2,component:"sss-promoted-fund-join-v2-page"}),n("stencil-route",{url:Kt.MyOwnFund,component:"sss-my-own-fund"}),n("stencil-route",{url:Kt.SelfManagedFund,component:"sss-self-managed-fund"}),n("stencil-route",{url:Kt.DefaultFund,component:"sss-default-fund"}),n("stencil-route",{url:Kt.StandardChoice,component:"sss-standard-choice-form"}),n("stencil-route",{url:Kt.Success,component:"sss-success"})],Zt=new class{navigateInternally(t,n){const e=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(n)}`;Xt(e),t.push(e)}navigateInternallyToStandardChoice(t){Gt.handleSubmitFn=t.handleSubmitFn,Gt.fundName=t.fundName,Gt.promotedFundId=t.promotedFundId,this.navigateInternally(t.history,Kt.StandardChoice)}toExternalUrl(t){const n=new URL(t);return n.searchParams.append("_extnav","true"),n.href}get appBaseUrl(){return Ut.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(t){return t.length>0&&"/"===t[0]?t:"/"+t}},tn=class{constructor(n){t(this,n),this.promotedFunds=Ut.promotedFunds,this.eventTrackingService=Vt.Instance}componentDidLoad(){return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync({promotedFundsShown:this.promotedFunds})}render(){return n("div",null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center leading-8"},"Important information about super"),n("div",{class:"sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8"},"The choice of superannuation fund is an important personal financial decision. Next, you’ll be asked to nominate a super fund to receive your employer contributions."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg"},n("div",{class:"sm:text-lg font-bold leading-6"},"By clicking “Continue” you acknowledge that:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6"},n("li",null,"Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"),n("li",null,"all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"),n("li",null,"in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"),n("li",null,"if you do choose one of the featured superannuation funds, we and our associates will normally receive a fee for you doing so.")),n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSuperFundDisclaimerAccepted()},"Continue"))))}async handleSuperFundDisclaimerAccepted(){const t={promotedFundsShown:this.promotedFunds};await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync(t),Zt.navigateInternally(this.history,Kt.ChoicePage)}};var nn;!function(t){t.MyOwnFund="Your current super fund",t.DefaultFund="Your employer's default fund",t.SelfManagedFund="Your self-managed super fund"}(nn||(nn={}));const en={continueAllowed:!1,nextRoute:"/",myOwnFundForm:{fundUsi:q,fundName:q,memberNumber:q},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:""},currentCustomFundType:nn.MyOwnFund,customFunds:[{label:nn.MyOwnFund,value:Kt.MyOwnFund},{label:nn.SelfManagedFund,value:Kt.SelfManagedFund},{label:nn.DefaultFund,value:Kt.DefaultFund}]},{state:rn}=Tt(en),sn=rn.customFunds,on=class{constructor(n){t(this,n),this.currentCustomFund=sn[0],this.fundOptionsList=sn,this.showFundOptionsSelection=!1}componentWillLoad(){let t="";window.location.pathname.includes(Kt.MyOwnFund)&&(t=Kt.MyOwnFund),window.location.pathname.includes(Kt.DefaultFund)&&(t=Kt.DefaultFund),window.location.pathname.includes(Kt.SelfManagedFund)&&(t=Kt.SelfManagedFund),this.currentCustomFund=sn.find((n=>n.value===t))||sn[0],Zt.navigateInternally(this.history,t)}render(){const t=()=>n("svg",{class:"h-5 w-5 fill-primary-base",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},n("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 n("div",{class:"max-w-560 relative"},n("label",{class:"font-medium text-gray-700 text-sm"},"Which fund would you like to nominate?"),n("div",{class:"mt-1 mb-4"},n("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-sm",onClick:()=>this.showFundOptionsSelection=!this.showFundOptionsSelection},n("span",{class:{"block truncate":!0,"text-gray-500":this.showFundOptionsSelection}},this.showFundOptionsSelection?"Select":this.currentCustomFund.label),n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},n((()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-500",viewBox:"0 0 20 20"},n("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&&n("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-sm"},this.fundOptionsList.map((e=>n("li",{class:"text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 hover:bg-primary-hover",onClick:()=>{this.showFundOptionsSelection=!this.showFundOptionsSelection,Zt.navigateInternally(this.history,e.value)}},n("span",{class:{"block truncate":!0,"font-semibold":this.currentCustomFund===e}},e.label),this.currentCustomFund===e&&n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-4"},n(t,null))))))),n("div",{onClick:()=>this.showFundOptionsSelection=!1},n("slot",null)))}};H(on);const an=new class{searchFundsAsync(t,n){return Dt.getAustralianFundsAsync({type:"partialMatch",searchString:t,maxRecordCount:n})}async getActiveFundByUsiAsync(t){const n=await Dt.getAustralianFundsAsync({type:"usiMatch",usi:t});return 1===n.length?Bt.some(n[0]):Bt.none}async getFundByUsiAsync(t){const n=await Dt.getAustralianFundsAsync({type:"usiMatch",usi:t},!0);return 1===n.length?Bt.some(n[0]):Bt.none}},un=new class{async submitDefaultFundChoiceAsync(t){return qt().url("super-choice/default").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(t){return qt().url("super-choice/custom-fund").post(t).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(t){return qt().url("super-choice/smsf").post(t).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}},cn=class{constructor(n){t(this,n),this.defaultFundProductName="Loading fund...",this.eventTrackingService=Vt.Instance}async componentWillLoad(){const t=Ut.defaultFundUsi;if(Bt.isNone(t))return;this.isDefaultFundExists=!0;const n=await an.getActiveFundByUsiAsync(t.value);Bt.isNone(n)?this.isInvalidDefaultFund=!0:(this.defaultFund=n.value,this.defaultFundProductName=n.value.productName)}componentDidLoad(){var t,n,e,i;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:null!==(n=null===(t=this.defaultFund)||void 0===t?void 0:t.usi)&&void 0!==n?n:"",fundName:null!==(i=null===(e=this.defaultFund)||void 0===e?void 0:e.productName)&&void 0!==i?i:"",promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg"},n("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},n("span",null,this.isDefaultFundExists&&!this.isInvalidDefaultFund?"By choosing to join your employer’s default super fund, you acknowledge that your application to join is subject to Trustee approval.":"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s defaut fund.")))),this.isDefaultFundExists&&!this.isInvalidDefaultFund&&n("div",null,n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund Name"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.defaultFundProductName)),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.defaultFund.usi)))),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},this.isDefaultFundExists&&!this.isInvalidDefaultFund&&n("div",{class:"mb-4"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm()},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||Zt.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",handleSubmitFn:async t=>{await un.submitDefaultFundChoiceAsync({standardChoiceFormSignature:t})}})}},ln=class{constructor(e){t(this,e),this.valueChanged=o(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 n;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(n=this.selectedOption)||void 0===n?void 0:n.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{this.filteredOptions=t,this.highlightedOptionIndex=void 0,this.searchState="done"},this.renderFilteredResults=()=>"pristine"===this.searchState?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Start typing to find the results"):"in progress"===this.searchState?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Searching..."):0===this.filteredOptions.length?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"No items match your search"):this.filteredOptions.map((t=>n("div",{class:{"cursor-pointer text-wrap hover:bg-primary-hover py-1.5 pl-4":!0,"bg-primary-base":this.isOptionSelected(t)},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!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.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=E(this.inputElement,"keyup").pipe(function(t,n=g){return e=>e.lift(new B(t,n))}(500),f((()=>this.inputElement.value)),x(),k(this.shouldExecuteSearch),R(this.onBeginSearch),M(this._searchFunction),R(this.onCompleteSearch)).subscribe()}disconnectedCallback(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.highlightedOptionIndex=void 0,this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return n(s,null,n("div",{class:"relative"},n("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full 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}),n("div",{class:{"invalid-feedback mt-2 text-sm text-red-600":!0,hidden:!this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("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}};ln.style="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";const dn=[{dtoPropName:"slate",id:"slate"},{dtoPropName:"australianRetirementTrust",id:"australian-retirement-trust"},{dtoPropName:"aware",id:"aware"},{dtoPropName:"active",id:"active"},{dtoPropName:"australianEthical",id:"australian-ethical"},{dtoPropName:"virgin",id:"virgin"}],fn=t=>{switch(t){case"slate":return"Slate Super";case"australian-retirement-trust":return"Australian Retirement Trust";case"aware":return"Aware Super";case"active":return"Active Super";case"australian-ethical":return"Australian Ethical";case"virgin":return"Virgin Money Super";default:return}},hn=t=>{switch(t){case"slate":return"32367272075001";default:return}},pn=t=>{let n="";switch(t){case"slate":n="logo-slate.png";break;case"australian-retirement-trust":n="logo-art.svg";break;case"aware":n="logo-aware.svg";break;case"active":n="logo-active.svg";break;case"australian-ethical":case"virgin":n="logo-slate.png";break;default:return}if(""!==n)return r("assets/"+n)};const mn=new class{async GetExistingFundAsync(){var t,n;const e=Ut.superBuyer.superChoice,i=null===(t=Ut.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!e)return q;if(!i)return q;const r=null==e.dateSubmitted?q:z(new Date(e.dateSubmitted)),s="promoted"in(a=i)?function(t){return"slate"in t?q:"australianRetirementTrust"in t?z(t.australianRetirementTrust.usi):"aware"in t?z(t.aware.usi):"active"in t?z(t.active.usi):"australianEthical"in t?z(t.australianEthical.usi):"virgin"in t?z(t.virgin.usi):q}(a.promoted):"myOwnFund"in a?z(a.myOwnFund.usi):"smsf"in a?q:"default"in a?z(a.default.usi):q,o=function(t){return"promoted"in t?function(t){return"slate"in t?z(t.slate.memberNumber):"australianRetirementTrust"in t?z(t.australianRetirementTrust.memberNumber):"aware"in t?z(t.aware.memberNumber):"active"in t?z(t.active.memberNumber):"australianEthical"in t?z(t.australianEthical.memberNumber):"virgin"in t?z(t.virgin.memberNumber):q}(t.promoted):"myOwnFund"in t?z(t.myOwnFund.memberNumber):q}(i);var a;if("promoted"in i){const t=dn.find((t=>t.dtoPropName in i.promoted));return null==(null==t?void 0:t.id)?q:z({type:"Promoted Fund",id:t.id,name:null!==(n=fn(t.id))&&void 0!==n?n:"",usi:s,valid:"Active",memberNumber:o,lastNominatedAt:r})}if("smsf"in i)return z({type:"Self Managed Fund",name:i.smsf.fundName,valid:"Unknown",lastNominatedAt:r});if("myOwnFund"in i){const t=i.myOwnFund.usi,n=await this.getFundByUsiAsync(t);return z({type:"My Own Fund",name:L(n)?n.value.productName:t,usi:s,valid:this.toFundValidState(n),memberNumber:o,lastNominatedAt:r})}if("default"in i){const t=i.default.usi,n=await this.getFundByUsiAsync(t);return z({type:"Default Fund",name:L(n)?n.value.productName:t,usi:s,valid:this.toFundValidState(n),lastNominatedAt:r})}return q}async submitRetainSuperFundAsync(t){return qt().url("super-choice/retain-super-fund").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}getFundByUsiAsync(t){return an.getFundByUsiAsync(t)}toFundValidState(t){return L(t)?t.value.isActive?"Active":"Inactive":"Unknown"}};class vn{static isNewComplianceEnabled(){return["PARTNER-TEST-FLARE","962e142f-df98-460e-92ed-2c4e24149c91","8ad88c67-d446-4c30-8321-f896e1b7643b","d1bfe1c5-0cf4-46e3-9ecb-69a0aec86256","973c7953-a607-48b6-9bf9-9266ffd9c25c","cf602138-c843-4c4a-a407-635ba0bf9612","4257a264-863e-4e03-8b07-b9c0328c0557","df9b837f-7f38-41ff-9073-9265106eb231","d6855e49-0412-4600-9b66-c61f0dfc25df"].includes(Ut.partnerIdOrDefault)}}const wn=class{constructor(n){t(this,n),this.eventTrackingService=Vt.Instance,this.createSuperFundNominationDetail=t=>{function n(t){return L(t)?t.value:void 0}return{fundType:t.type.toString(),fundName:t.name,fundUsi:function(t){return"usi"in t?n(t.usi):void 0}(t),memberNumber:function(t){return"memberNumber"in t?n(t.memberNumber):void 0}(t),fundStatus:t.valid.toString(),lastNominatedAt:L(t.lastNominatedAt)?t.lastNominatedAt.value.toISOString():""}}}componentDidLoad(){const t=this.createSuperFundNominationDetail(this.existingFund);return this.eventTrackingService.TrackSuperFundNominationViewedAsync(t)}async componentWillLoad(){const t=await mn.GetExistingFundAsync();L(t)&&"Inactive"!==t.value.valid?this.existingFund=t.value:Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}render(){const t=t=>n("div",{class:"flex justify-center mt-6"},n("img",{class:"h-16 w-auto",alt:fn(t.id),src:pn(t.id)})),e=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},n("path",{d:"M196.6 97.83C184.1 93.41 177.6 79.7 182 67.2C195.8 28.08 233.1 0 277.1 0C320.1 0 358.3 28.08 372.1 67.2C376.5 79.7 369.1 93.41 357.5 97.83C344.1 102.2 331.3 95.7 326.9 83.2C319.6 62.66 300 48 277.1 48C254.1 48 234.5 62.66 227.3 83.2C222.8 95.7 209.1 102.2 196.6 97.83H196.6zM400 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 264zM224 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.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 384H512C499.1 401.2 482.7 415.8 464 426.6V464C464 490.5 442.5 512 416 512H368C341.5 512 320 490.5 320 464V448H272V464C272 490.5 250.5 512 224 512H176C149.5 512 128 490.5 128 464V416C90.98 388.2 66.42 344.7 64.17 295.4C27.99 290.9 0 259.1 0 222.6C0 194.7 15.72 169.3 40.6 156.9L45.27 154.5C57.12 148.6 71.54 153.4 77.47 165.3C83.39 177.1 78.59 191.5 66.73 197.5L62.06 199.8C53.44 204.1 48 212.9 48 222.6C48 235.1 57.13 245.6 69.13 247.6C87.02 178.8 149.6 128 224 128V128zM224 176C162.1 176 112 226.1 112 288C112 324.6 129.5 357.1 156.8 377.6C168.9 386.7 176 400.9 176 416V464H224V448C224 421.5 245.5 400 272 400H320C346.5 400 368 421.5 368 448V464H416V426.6C416 409.5 425.1 393.6 439.1 385C453.1 377.5 464.6 367.3 473.6 355.2C482.7 343.1 496.9 336 512 336H528V271.9C510 270.9 493.1 259.9 486.7 243.2C478.9 225.4 466.6 209.1 451.2 198.4C435.7 186.8 428.8 167.1 433.4 148.3L434 146.1C425.5 148.6 418 153.5 412.2 160C403.1 170.2 390.1 176 376.4 176H224z"})))),i=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},n("path",{d:"M250.8 192h13.25v40C264 245.2 274.8 256 288 256s24.02-10.8 24.02-23.1V192h13.25c85.39 0 154.8-75.38 154.8-168c0-13.25-10.75-24-24-24H418.8c-55.26 0-103.4 31.75-130.8 79C260.7 31.75 212.5 0 157.3 0H120C106.8 0 96.01 10.75 96.01 23.1C96.01 116.6 165.4 192 250.8 192zM418.8 48h11.13c-9.876 54.75-53.01 96-104.5 96h-11.13C324.2 89.25 367.3 48 418.8 48zM157.3 48c51.51 0 94.64 41.25 104.5 96H250.7c-51.51 0-94.64-41.25-104.5-96H157.3zM551.1 312c-31.13-26.38-69.26-16.12-88.39-1.75l-60.38 45.5h-3.375c-.1251-38-30.5-67.88-69.13-67.88H186.7c-28.38 0-56.38 9.375-78.51 26.37L79.76 336H24C10.8 336 0 346.8 0 359.1S10.8 384 24 384l72-.0244l41.26-31.48C151.3 341.8 168.8 336 186.8 336h144c27.88 0 29 40.25-1.125 40.25h-59.88c-7.501 0-13.75 6.125-13.75 13.75c0 7.625 6.251 13.87 13.75 13.87h134.6c9.711 0 19.16-3.159 26.92-9l61.26-46.12c8.251-6.125 20.5-6.625 28.38 0c10.13 8.5 9.376 23.12-.8751 30.75l-100.6 75.5C411.7 460.8 402.3 464 392.6 464H24C10.8 464 0 474.8 0 487.1S10.8 512 24 512h368.8c20 0 39.38-6.5 55.26-18.5l100.8-75.88c16.63-12.5 26.5-31.5 27.13-52C576.7 345.1 567.8 325.5 551.1 312z"})))),r=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"fill-primary-base"},n("path",{d:"M448 96h-64V64c0-35.35-28.65-64-64-64H192C156.7 0 128 28.65 128 64v32H64C28.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 96zM192 48h128c8.837 0 16 7.163 16 16v32h-160V64C176 55.16 183.2 48 192 48zM64 144h384c8.8 0 16 7.2 16 16v96h-416V160C48 151.2 55.2 144 64 144zM448 432H64c-8.8 0-16-7.2-16-16V304H192V320c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V304h144V416C464 424.8 456.8 432 448 432z"}))));return n("div",null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Your super choice"),n("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."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"max-w-400 w-full"},n("div",{class:"flex-col border shadow-sm p-6 rounded-lg text-center space-y-4"},(()=>{switch(this.existingFund.type){case"Promoted Fund":return n(t,{id:this.existingFund.id});case"Self Managed Fund":return n(i,null);case"My Own Fund":return n(e,null);case"Default Fund":return n(r,null)}})(),n("div",{class:"sm:text-lg font-bold leading-6"},this.existingFund.name),n("div",{class:"mt-8"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleFundNominationAccepted()},"Continue with this fund"))),n("div",{class:"mt-4"},n("sss-button",{fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund")))))}async handleFundNominationAccepted(){const t=this.createSuperFundNominationDetail(this.existingFund);await mn.submitRetainSuperFundAsync(t),Ut.markSuperSelectionAsSubmitted()}async handleFundNominationDeclined(){const t=this.createSuperFundNominationDetail(this.existingFund);await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(t),Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}},yn=class{constructor(n){t(this,n)}render(){return n("div",{class:"text-center text-gray-500 text-xs mt-8 sm:mt-20 w-full max-w-960 mx-auto"},n("span",null,"Powered by Flare"),n("p",{class:"block text-transparent"},"v","3.61.64036"),!vn.isNewComplianceEnabled()&&n("p",{class:"mt-4"},"This page contains factual information only and does not take into account your particular objectives, financial circumstances or needs. If you have questions or need help making a decision about your super fund, you should speak to a licensed financial advice provider. You should consider the relevant super fund's PDS and TMD (if applicable) in deciding whether to apply to join the super fund. Each of the advertised fund's PDS and TMD (if applicable) can be found in their advertisements above. If you are considering joining another fund you can find the PDS and TMD on the fund's website. Your employer and Flare do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the advertised superannuation funds. Flare do not endorse or accept responsibility for any of their content shown about any of the advertised superannuation funds as they are merely passing on the content as provided without any changes. Flare do not express any opinion or make any recommendation about any of the advertised funds."))}},gn=class{constructor(n){t(this,n)}render(){return n("div",{class:"flex justify-center"},n("div",{class:"text-center max-w-800"},n("h3",{class:"font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl"},"Nominate a super fund"),vn.isNewComplianceEnabled()&&n(a,null,n("div",{class:"text-gray-600 sm:text-lg leading-7 sm:leading-8"},"You can choose any super fund, including your current fund/SMSF, your employer’s default fund, or alternatively, you can select from one of the featured funds."),n("div",{class:"inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal"},n("stencil-route-link",{url:Kt.ChoicePage},n("button",{type:"button",class:{"py-2 text-sm font-medium w-auto px-3 sm:px-8 rounded-md h-full":!0,"bg-white border-gray-200 text-gray-900 shadow-sm":"choice"===this.currentPage,"border border-transparent text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-focus focus:z-10 hover:bg-primary-hover":"choice"!==this.currentPage}},"Featured super funds")),n("stencil-route-link",{url:Kt.MyOwnFund},n("button",{type:"button",class:{"ml-0.5 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full":!0,"bg-white border-gray-200 text-gray-900 shadow-sm":"own-fund"===this.currentPage,"border border-transparent text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-focus focus:z-10 hover:bg-primary-hover":"own-fund"!==this.currentPage}},"Choose another fund"))))))}},bn=class{constructor(n){t(this,n)}componentDidLoad(){this.build(this.iframeElement)}render(){return n("div",{class:"w-screen"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:t=>this.iframeElement=t}))}},xn=class{constructor(n){t(this,n),this.theme="primary",this.size=48}render(){return n("div",{class:"inline-block animate-spin"},n("svg",{width:this.size,height:this.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("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"}),n("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"})))}},kn=class{constructor(n){t(this,n)}render(){return n(s,{class:"flex flex-col justify-center items-center"},n("h5",{class:"text-lg"},"Loading your superannuation step"),n("sss-loading-indicator",null))}},Sn=class{constructor(n){t(this,n),this.isNotAllInformationProvidedMessageVisible=!1,this.isSubmitDisabled=!0,this.eventTrackingService=Vt.Instance}componentDidLoad(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=!this.formElement.checkValidity()},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg"},n("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-2"},n("ul",{class:"list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5"},n("li",null,"Make sure you are a current member of the fund before completing this step."),n("li",null,"Please check that the fund USI is correct as some funds have similar names."))))),n("sss-my-own-fund-inputs",{myOwnFundForm:rn.myOwnFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{rn.myOwnFundForm=Object.assign(Object.assign({},rn.myOwnFundForm),t.detail),this.isNotAllInformationProvidedMessageVisible=!1}}),this.isNotAllInformationProvidedMessageVisible&&n("div",{class:"mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700"},"All fields are required to complete submission. Make sure you have selected a fund.")),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},n("div",{class:"mb-4"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back"))))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(L(rn.myOwnFundForm.fundUsi)&&L(rn.myOwnFundForm.memberNumber)?Zt.navigateInternallyToStandardChoice({history:this.history,fundName:this.getOrError(rn.myOwnFundForm.fundName),handleSubmitFn:async t=>{const n={fundUsi:this.getOrError(rn.myOwnFundForm.fundUsi),memberNumber:this.getOrError(rn.myOwnFundForm.memberNumber),standardChoiceFormSignature:t};await un.submitCustomFundChoiceAsync(n)}}):this.isNotAllInformationProvidedMessageVisible=!0)}getOrError(t){return jt.pipe(t,(n=()=>{throw new Error("Option value is none.")},function(t){return U(t)?n():t.value}));var n}};H(Sn);const Cn=class{constructor(n){t(this,n),this.formChanged=o(this,"formChanged",7),this.MIN_SEARCH_STRING_LENGTH=3,this.MAX_RECORD_COUNT=10,this.searchFundsAsync=async t=>(await an.searchFundsAsync(t,this.MAX_RECORD_COUNT)).sort(((t,n)=>t.productName.localeCompare(n.productName))).map((t=>({label:`${t.productName} (${t.usi})`,value:t.usi})))}render(){return n("div",null,n("div",null,n("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),n("div",{class:"mt-1"},n("sss-dropdown-async",{searchFunction:this.searchFundsAsync,minSearchStringLength:this.MIN_SEARCH_STRING_LENGTH,required:!0,requiredValidationMessage:"Select a fund",placeholder:"Type to search by name or USI...",value:this.selectedOption,onValueChanged:t=>{this.selectedOption=t.detail,this.updateFund(t.detail)},showValidationErrors:this.showValidationErrors})),L(this.myOwnFundForm.fundUsi)&&n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.myOwnFundForm.fundUsi.value))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Member number"),n("div",{class:"mt-1"},n("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md":!0,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},required:!0,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:(t=rn.myOwnFundForm.memberNumber,U(t)?void 0:t.value),onChange:t=>this.updateMemberNumber(t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid member number (only numbers and / or letters)"))));var t}updateFund(t){this.formChanged.emit({fundUsi:z(t.value),fundName:z(t.label)})}updateMemberNumber(t){this.formChanged.emit({memberNumber:z(t)})}},An=new class{async submitChoiceAsync(t){return qt().url("super-choice/promoted-fund").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Fund choice request")})).text()}},{state:_n}=Tt({fundId:""}),Fn=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.environmentDiscriminator=()=>this.hostIsLocalSuperSelection()?"autodev-partner":window.location.hostname.toLowerCase().split(".")[0],this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ut.partnerIdOrDefault,accountId:Ut.accountIdOrDefault,fundId:_n.fundId,authToken:Ut.jwt}),i=e=>{var r;const{data:s}=e;if(s)if("promoted-fund-redirect"!==s.sender){if("promoted-fund-join"===s.sender)switch(s.type){case"contentResized":t.height=s.height>0?s.height:t.height,t.width=s.width>0?s.width:t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Xt(window.location.href)}}else switch(window.removeEventListener("message",i),s.type){case"cancel":Zt.navigateInternally(n,Kt.ChoicePage);break;case"success":if(s.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:null!==(r=fn(_n.fundId))&&void 0!==r?r:"",handleSubmitFn:t=>An.submitChoiceAsync(Object.assign(Object.assign({},_n),{memberNumber:s.memberNumber,usi:s.usi.replace(/ /g,""),standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds})),promotedFundId:_n.fundId});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let o;for(o in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),e){const t=e[o];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=o,n.value=t,s.append(n)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,n;const e=Ut.superBuyer;return{title:e.userProfile.title,firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:e.userProfile.gender,email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}},Mn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>Fn.build(t,this.history)})}},In=new class{constructor(){this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ut.partnerIdOrDefault,accountId:Ut.accountIdOrDefault,fundId:_n.fundId,authToken:Ut.jwt}),i=e=>{var r;const{data:s}=e;if(s)if("promoted-fund-redirect"!==s.sender){if("promoted-fund-join"===s.sender)switch(s.type){case"contentResized":t.height=s.height>0?s.height:t.height,t.width=s.width>0?s.width:t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Xt(window.location.href)}}else switch(window.removeEventListener("message",i),s.type){case"cancel":Zt.navigateInternally(n,Kt.ChoicePage);break;case"success":if(s.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:null!==(r=fn(_n.fundId))&&void 0!==r?r:"",handleSubmitFn:t=>An.submitChoiceAsync(Object.assign(Object.assign({},_n),{memberNumber:s.memberNumber,usi:s.usi.replace(/ /g,""),standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds})),promotedFundId:_n.fundId});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let o;for(o in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),e){const t=e[o];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=o,n.value=t,s.append(n)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,n;const e=Ut.superBuyer;return{title:e.userProfile.title,firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:e.userProfile.gender,email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}},Tn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>In.build(t,this.history)})}},En=class{constructor(n){t(this,n),this.showSmsfNotSupported=!1,this.isSubmitDisabled=!0,this.eventTrackingService=Vt.Instance,this.success=()=>{Zt.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",handleSubmitFn:async t=>{const n={smsfChoice:{abn:rn.selfManagedFundForm.fundAbn,fundName:rn.selfManagedFundForm.fundName,fundAddress:{addressLine1:rn.selfManagedFundForm.addressLine1,addressLine2:rn.selfManagedFundForm.addressLine2,city:rn.selfManagedFundForm.city,state:rn.selfManagedFundForm.state,postcode:rn.selfManagedFundForm.postcode},bsb:rn.selfManagedFundForm.bsb,bankAccountName:rn.selfManagedFundForm.bankAccountName,bankAccountNumber:rn.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:rn.selfManagedFundForm.fundEsa},standardChoiceFormSignature:t};await un.submitSelfManagedFundChoiceAsync(n)}})}}componentDidLoad(){return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=!this.formElement.checkValidity()},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg max-w-560"},n("p",{class:"sm:text-lg font-bold"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},"Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))),n("sss-self-managed-fund-inputs",{fundForm:rn.selfManagedFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{rn.selfManagedFundForm=Object.assign(Object.assign({},rn.selfManagedFundForm),t.detail)}})),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},n("div",{class:"mb-4"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back")))),this.showSmsfNotSupported&&n("sss-smsf-not-supported-dialog",{ref:t=>this.notSupportedDialog=t,onContinue:this.success})))))}componentDidRender(){var t;this.showSmsfNotSupported&&(null===(t=this.notSupportedDialog)||void 0===t||t.scrollIntoView())}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(Ut.showSmsfNotSupported?this.showSmsfNotSupported=!0:this.success())}};H(En);const jn={"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"},Bn=class{constructor(n){t(this,n),this.formChanged=o(this,"formChanged",7),this.currentBank=q,this.addressErrorMessage=q,this.stateOptions=[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}],this.bsbRegex=new RegExp(/^[0-9]{3}[0-9]{3}$/),this.bankAccountNumberRegex=new RegExp(/^[0-9]{2,10}$/)}render(){const t={"relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md focus:z-10":!0,"invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors};return n("div",null,n("div",null,n("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundName",id:"fundName",value:rn.selfManagedFundForm.fundName,onChange:t=>this.updateFormField("fundName",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund name"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund ABN"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundAbn",id:"fundAbn",value:rn.selfManagedFundForm.fundAbn,onChange:t=>this.updateFormField("fundAbn",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund ABN"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Electronic service address alias (ESA)"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundEsa",id:"fundEsa",value:rn.selfManagedFundForm.fundEsa,onChange:t=>this.updateFormField("fundEsa",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund ESA"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund address"),n("div",{class:"mt-1 rounded-md shadow-sm -space-y-px"},n("input",{placeholder:"Address line 1",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none rounded-t-md shadow-none":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:rn.selfManagedFundForm.addressLine1,onChange:t=>{this.updateFormField("addressLine1",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.addressLine1Element=t}),n("input",{placeholder:"Address line 2 (optional)",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"addressLine2",id:"addressLine2",value:rn.selfManagedFundForm.addressLine2,onChange:t=>this.updateFormField("addressLine2",t.target.value.trim())}),n("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"city",required:!0,id:"city",value:rn.selfManagedFundForm.city,onChange:t=>{this.updateFormField("city",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.cityElement=t}),n("div",{class:"flex -space-x-px"},n("div",{class:"w-1/2 flex-1 min-w-0"},n("input",{placeholder:"Postcode",type:"text",required:!0,class:Object.assign(Object.assign({},t),{"rounded-none rounded-bl-md shadow-none":!0}),name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:rn.selfManagedFundForm.postcode,onChange:t=>{this.updateFormField("postcode",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.postcodeElement=t})),n("div",{class:"flex-1 min-w-0"},n("select",{class:Object.assign(Object.assign({},t),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":void 0!==this.fundForm.state}),name:"state",required:!0,id:"state",onChange:t=>{this.updateFormField("state",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.stateElement=t},n("option",{disabled:!0,selected:void 0!==this.fundForm.state,value:""},"State"),this.stateOptions.map((t=>n("option",{value:t.value,selected:this.fundForm.state===t.value},t.label))))))),L(this.addressErrorMessage)&&this.showValidationErrors&&n("div",{class:"mt-2 text-sm text-red-600"},this.addressErrorMessage.value)),n("h3",{class:"text-lg font-bold mt-6"},"Fund bank details"),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Account name"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bankAccountName",minlength:"2",id:"bankAccountName",value:rn.selfManagedFundForm.bankAccountName,onChange:t=>this.updateFormField("bankAccountName",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account name"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"BSB"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bsb",id:"bsb",minlength:"6",maxlength:"7",onKeyUp:t=>this.updateCurrentBank(t),pattern:this.bsbRegex.source,value:rn.selfManagedFundForm.bsb}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid BSB"))),L(this.currentBank)&&n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Bank name"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.currentBank.value)),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Account number"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,value:rn.selfManagedFundForm.bankAccountNumber,onKeyUp:t=>this.updateCurrentBankAccountNumber(t),onChange:t=>this.updateFormField("bankAccountNumber",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account number"))))}updateFormField(t,n){this.formChanged.emit({[t]:n})}filterDigits(t){return t.replace(/[^0-9]/g,"")}updateCurrentBank(t){const n=this.filterDigits(t.target.value),e=n.substring(0,2),i=n.substring(0,3),r=jn[e],s=jn[i];r&&(this.currentBank=z(r)),s&&(this.currentBank=z(s)),(""===n||n.length>6)&&(this.currentBank=q),this.updateFormField("bsb",n)}updateCurrentBankAccountNumber(t){const n=this.filterDigits(t.target.value);this.updateFormField("bankAccountNumber",n)}updateAddressErrorMessage(){let t=q;U(t)&&!this.addressLine1Element.checkValidity()&&(t=z("Enter a valid address line 1")),U(t)&&!this.cityElement.checkValidity()&&(t=z("Enter a valid city/suburb")),U(t)&&!this.postcodeElement.checkValidity()&&(t=z("Enter a valid post code")),U(t)&&!this.stateElement.checkValidity()&&(t=z("Select a state")),this.addressErrorMessage=t}};var Nn;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(Nn||(Nn={}));class Pn{}let Rn=class extends C{constructor(){super({authenticationState:Nn.Unauthorized,jwt:q,reactNativeInterop:q,iframeInterop:q,appConfiguration:q})}};Rn=function(t,n,e,i){var r,s=arguments.length,o=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(n,e,o):r(n,e))||o);return s>3&&o&&Object.defineProperty(n,e,o),o}([S({name:"sss-session",resettable:!0})],Rn);const On=new Rn,Dn=new class extends A{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return L(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return L(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(U(t))throw Error("Failed to get iframe interop information: no data in store");if(!this.isIframeInteropEnabled())throw Error("Failed to get iframe interop information: iframe mode is disabled");return t.value}}(On),Ln=new class{async submitSlateChoiceAsync(t){return qt().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},Un=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.hostIsDeployed=()=>window.location.origin.endsWith("partner.flarehr.com"),this.skipConsolidation=()=>Dn.isReactNativeInteropEnabled()?"true":"false",this.skipInsurance=()=>Dn.isReactNativeInteropEnabled()?"true":"false",this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.slateJoinAppUrl=()=>`https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=(this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app")+"/slate-redirect.html",i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:e,cancelRedirectUrl:e,skipConsolidation:this.skipConsolidation(),skipInsurance:this.skipInsurance()});this.includeJwt()&&(i.authToken=Ut.jwt);const r=e=>{const{data:i,origin:s}=e;if(i)if("slate-redirect"!==i.sender){if("flare"===i.sender&&s.endsWith("join.slatesuper.com.au"))switch(i.type){case"contentResized":t.height=i.height>0?i.height:t.height,t.width=i.width>0?i.width:t.width}}else switch(window.removeEventListener("message",r),i.type){case"success":if(i.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:"Slate Super",handleSubmitFn:t=>Ln.submitSlateChoiceAsync({memberNumber:i.memberNumber,standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds}),promotedFundId:"slate"});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",r);const s=t.contentDocument;s.open();const o=s.createElement("form");let a;for(a in o.method="POST",o.target="_self",o.action=this.slateJoinAppUrl(),i){const t=i[a];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=a,n.value=t,o.append(n)}}s.appendChild(o),s.close(),o.submit()}getSlateJoinMemberData(){var t,n;const e=Ut.superBuyer;return{firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:(t=>{switch(t){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}})(e.userProfile.gender),email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}includeJwt(){return!this.slateJoinAppUrl().match(/autodev|sandbox/)}},qn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>Un.build(t,this.history)})}},zn=class{constructor(n){t(this,n),this.continue=o(this,"continue",7),this.standardChoiceFormUrl="/super-selection/embed/v1.0/app/assets/Superannuation_Standard_Choice_Form.pdf",this.handleContinue=()=>{this.continue.emit()}}render(){return n(s,null,n("div",{class:"fixed z-40 top-0 left-0 bg-white opacity-70 w-full h-full"}),n("div",{class:"fixed z-50 top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2"},n("div",{class:"p-6 shadow-sm border rounded-lg bg-white text-center max-w-560"},n("div",{class:"flex justify-center"},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"orange",viewBox:"0 0 16 16"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"}))),n("p",{class:"my-4"},"You’ve selected a self-managed super fund (SMSF). Currently, SMSF information can’t be sent via this form. You’ll need to provide your employer with a"," ",n("a",{target:"_blank",href:this.standardChoiceFormUrl},"standard choice form")," ","for your SMSF details."),n("sss-button",{onClick:this.handleContinue,fillWidth:!0},"Continue"))))}},Vn=class{constructor(n){t(this,n),this.standardChoiceFormSignature="",this.isSubmitDisabled=!0}render(){return n(s,null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Confirm your super choice"),n("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."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"max-w-560"},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row"},Gt.promotedFundId&&pn(Gt.promotedFundId)&&n("div",{class:"pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start"},n("img",{class:"h-16 w-auto",alt:Gt.fundName,src:pn(Gt.promotedFundId)})),n("div",{class:"flex justify-between w-full"},n("div",null,n("div",{class:"text-xs font-semibold text-gray-500 sm:uppercase"},"Nominated fund"),n("div",{class:"text-sm mt-2"},Gt.fundName)),n("div",{class:"grid content-center ml-4"},n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{variant:"secondary"},"Change"))))),n("div",{class:"mt-4 p-4 sm:p-6 border shadow-sm rounded-lg"},n("div",{class:"sm:text-lg font-bold"},"Superannuation Standard Choice Form"),n("div",{class:"bg-blue-50 border-l-4 border-blue-400 p-4 mt-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-information-circle.svg")})),n("div",{class:"ml-2"},n("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.")))),n("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()},n("label",{class:"text-sm font-medium text-gray-700"},"Type your full name"),n("input",{type:"text",autocomplete:"off",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full 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}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Type your full name"),n("div",{class:"mt-6"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Confirm and continue")))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await Gt.handleSubmitFn(this.standardChoiceFormSignature.trim()),Ut.markSuperSelectionAsSubmitted())}},Hn=class{constructor(n){t(this,n)}render(){return n(s,{class:"text-center"},n("div",{class:"flex justify-center"},n("div",{class:"relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2"},n((()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:"fill-primary-base"},n("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)))),n("h3",{class:"text-2xl leading-8 font-bold mt-4"},"Your super choice has been submitted"),n("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."),n("div",{class:"flex justify-center mt-8"},n("div",{class:"max-w-[200px] w-full"},n("sss-button",{fillWidth:!0,onClick:this.handleContinueButtonClick},n("span",null,"Continue")))))}handleContinueButtonClick(t){Ut.completeSuperSelectionFlow()}},Wn=class{constructor(n){t(this,n),this.joinFundClicked=o(this,"joinFundClicked",7)}render(){return n(s,null,n("div",{class:"py-6 px-4 lg:px-6 flex flex-col justify-between h-full"},n("div",null,n("div",{class:"md:max-w-[240px] lg:max-w-full"},n("sss-button",{class:"uuid-button-continue",fillWidth:!0,onClick:()=>this.handleFundClick()},"Choose this fund")),n("div",{class:"text-xs text-gray-500 mt-6 leading-4"},this.disclaimer)),this.abnInfo&&this.abn&&n("div",{class:"text-xs text-gray-500 mt-2"},n("p",null,`${vn.isNewComplianceEnabled()?"Issued by ":""}${this.abnInfo}.`),n("p",null,"ABN: ",this.abn))))}handleFundClick(){return this.joinFundClicked.emit()}},$n=class{constructor(n){t(this,n)}render(){return n(s,null,n("div",{class:"px-4 lg:px-6 pt-6"},n("div",{class:"text-right w-100 -mt-5 -mr-3.5 lg:-mr-5"},n("span",{class:"text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5"},vn.isNewComplianceEnabled()?"Featured":"Advertised")),n("div",{class:"flex lg:block mt-2 md:mt-0 lg:mt-2"},n("img",{class:"h-16 object-contain w-auto max-w-[80px] md:hidden lg:block lg:max-w-none",alt:this.name,src:r("assets/"+this.logo)}),n("div",{class:"grid content-center"},n("p",{class:"text-lg font-bold ml-4 mb-2 md:ml-0 md:mb-0 lg:mt-4"},this.name))),n("div",{class:"mt-4 text-sm space-y-2"},JSON.parse(this.features).map((t=>n("div",{class:"flex"},n("div",{class:"h-5 w-5 flex-none mr-1.5"},n("img",{src:r("assets/icon-check.svg")})),n("p",{class:"leading-5"},t.value))))),this.featureSubText&&n("p",{class:"text-xs text-gray-500 italic mt-4 leading-4"},this.featureSubText)))}},Xn=class{constructor(n){t(this,n),this.promotedFunds=this.getPromotedFunds(),this.eventTrackingService=Vt.Instance}componentDidLoad(){const t=this.promotedFunds.map((t=>t.fundId));return this.eventTrackingService.TrackSuperFundPanelViewedAsync({promotedFundsShown:t})}render(){return n(s,null,n("div",null,n("sss-header-section",{currentPage:"choice"}),vn.isNewComplianceEnabled()&&n("div",{class:"mt-8 text-sm text-center leading-6"},"Not looking to join a new fund? You can skip the featured super funds and"," ",n("stencil-route-link",{url:Kt.MyOwnFund},n("span",{class:"text-primary-base font-medium"},"choose another super fund")),"."),!vn.isNewComplianceEnabled()&&n("div",{class:"flex justify-center pb-4"},n("div",{class:"text-center space-y-4 max-w-960 text-sm leading-6"},n("p",{class:"text-lg leading-8 text-gray-600"},"The choice of superannuation fund is an important personal financial decision. It is open to you to continue with your existing fund, or alternatively, you can select from one of the funds below or choose another fund."),n("p",null,"Flare is not licensed to advise you in relation to this decision and you may wish to return to this page at a later stage."),n("p",null,"The content on this page and on the following pages relating to each super fund is provided by the trustee or promoter of the super fund. The super funds presented have not been selected by your employer and neither your employer or Flare are making any recommendation or opinion."),n("p",null,"There are many super funds out there and you should consider the relevant product disclosure statement and choose one that is right for you. If you are unsure, obtain your own advice. You can choose your super fund later, if you need time to obtain advice."),n("p",null,"You should be aware that, if you do choose one of these advertised funds, Flare and its associated entities will normally receive a fee for you doing so."))),n("div",{class:"flex justify-center mt-8"},n("div",{class:{"lg:grid border-l border-t lg:border-b rounded-lg":!0,"lg:grid-cols-1 max-w-400":1===this.promotedFunds.length,"lg:grid-cols-2 max-w-720":2===this.promotedFunds.length,"lg:grid-cols-3 max-w-960":3===this.promotedFunds.length}},this.promotedFunds.map(((t,e)=>n("div",{class:{"border-r":!0,"rounded-tr-lg":0===e,"lg:rounded-tr-none":0===e&&e!==this.promotedFunds.length-1,"rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg":e===this.promotedFunds.length-1}},n("div",{class:{"flex border-b lg:border-b-0":!0,"rounded-b-lg":e===this.promotedFunds.length-1}},n("div",{class:"hidden md:flex lg:hidden w-36 justify-center pt-6 pl-6"},n("img",{class:"h-16 object-contain w-full max-w-[96px]",alt:t.name,src:r("assets/"+t.logo)})),n("div",{class:"w-full"},n("sss-super-choice-item-top",{logo:t.logo,name:t.name,features:JSON.stringify(t.features),featureSubText:t.featureSubText}),n("div",{class:"lg:hidden"},n("sss-super-choice-item-bottom",{disclaimer:t.disclaimer,abnInfo:t.abnInfo,abn:t.abn,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)}))))))),this.promotedFunds.map(((t,e)=>n("div",{class:{"hidden lg:block border-r":!0,"rounded-br-lg":e===this.promotedFunds.length-1}},n("sss-super-choice-item-bottom",{disclaimer:t.disclaimer,abnInfo:t.abnInfo,abn:t.abn,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)})))))),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"pb-8 sm:pb-12 max-w-720 border-b"},n("h5",{class:"font-bold sm:text-lg"},"Or, choose another super fund:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base"},n("li",null,"Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."),n("li",null,"If you are unsure of your current super fund details, you can find out at"," ",n("a",{class:"text-primary-base font-medium",target:"_blank",href:Zt.toExternalUrl("https://my.gov.au")},"www.my.gov.au")),n("li",null,"A full list of super funds can be viewed at"," ",n("a",{class:"text-primary-base font-medium",target:"_blank",href:Zt.toExternalUrl("https://www.apra.gov.au/register-of-superannuation-institutions")},"www.apra.gov.au"))),n("stencil-route-link",{url:Kt.MyOwnFund},n("sss-button",{fillWidthOnMobile:!0},"Choose another super fund")))),vn.isNewComplianceEnabled()&&n("div",{class:"flex justify-center"},n("div",{class:"pt-8 sm:pt-12 max-w-720"},n("h5",{class:"font-semibold"},"IMPORTANT INFORMATION:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6"},n("li",null,"The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."),n("li",null,"This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."),n("li",null,"Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."),n("li",null,"You should consider the relevant superannuation fund’s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund’s website."),n("li",null,"You should be aware that, if you do choose one of the featured superannuation funds, Flare and it’s associates will normally receive a fee for you doing so (this includes Simple Financial Choices Pty Ltd, a wholly owned subsidiary of Flare, which is a sub-promoter of Slate Super)."))))))}allFunds(){const t=(t,e)=>n("a",{class:"font-medium underline",target:"_blank",href:Zt.toExternalUrl(t.href),onClick:t.onClick},e);return[{fundId:"slate",name:"Slate Super",logo:"logo-slate.png",route:Kt.SlateJoin,features:[{order:1,value:"A lifestage investment strategy that evolves with you"},{order:2,value:"Advanced mobile app with retirement forecast and smart features"},{order:3,value:"Member advocates at Slate to assist with your account"}],disclaimer:n("p",{class:"small text-muted"},"You should consider the"," ",n(t,{href:"https://slate.co/pds/?utm_source=flare&utm_medium=superselection",onClick:()=>this.pdsViewedAsync("Slate Super","32367272075001")},"Product Disclosure Statement")," ","and"," ",n(t,{href:"https://slate.co/forms-and-documents/target-market-determination/"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of the fund."),abnInfo:"Diversa Trustees Limited",abn:"49 006 421 638"},{fundId:"australian-retirement-trust",name:"Australian Retirement Trust",logo:"logo-art.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"$200 billion in retirement savings"},{order:2,value:"2+ million members"},{order:3,value:"A focus on delivering strong, long‑term returns"}],featureSubText:"QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option.",disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf",onClick:()=>this.pdsViewedAsync("Australian Retirement Trust")},"Product Disclosure Statement")," ","and"," ",n(t,{href:"https://www.australianretirementtrust.com.au/tmd"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Australian Retirement Trust",abn:"60 905 115 063"},{fundId:"aware",name:"Aware Super",logo:"logo-aware.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"Acting on climate change"},{order:2,value:"All profits go to members"},{order:3,value:"One of Australia’s largest funds"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://aware.com.au/member/forms-and-resources/pds/FSS",onClick:()=>this.pdsViewedAsync("Aware Super")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Aware Super Pty Ltd",abn:"53 226 460 365"},{fundId:"active",name:"Active Super",logo:"logo-active.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"One of Canstar's top-performing funds*"},{order:2,value:"Recognised as a leader in responsible investment"},{order:3,value:"Calls answered in 20 seconds (average over 5 years)"}],featureSubText:"*Past performance is not a reliable indicator of future performance. As at 22 April 2022, Active Super is ranked among Canstar’s top five funds for 18-49 year-olds with a balance up to $250,000 based on returns over 5 years in the Accumulation Scheme.",disclaimer:n("p",null,"Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at"," ",n(t,{onClick:()=>this.pdsViewedAsync("Active Super"),href:"https://www.activesuper.com.au/pds"},"activesuper.com.au")," ","before making a decision.")},{fundId:"australian-ethical",name:"Australian Ethical",logo:"logo-slate.png",route:Kt.PromotedFundJoinV2,features:[{order:1,value:"TODO #1"},{order:2,value:"TODO #2"},{order:3,value:"TODO #3"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://www.australianethical.com.au/TODO",onClick:()=>this.pdsViewedAsync("Australian Ethical")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund.")},{fundId:"virgin",name:"Virgin Money Super",logo:"logo-slate.png",route:Kt.PromotedFundJoinV2,features:[{order:1,value:"TODO #1"},{order:2,value:"TODO #2"},{order:3,value:"TODO #3"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://virginmoney.com.au/superannuation/TODO",onClick:()=>this.pdsViewedAsync("Virgin Money Super")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund.")}]}getPromotedFunds(){const t=[];return Ut.promotedFunds.forEach((n=>{const e=this.allFunds().find((t=>n===t.fundId));void 0!==e&&t.push(e)})),t}async handleJoinSuperClickAsync(t){var n;const e=Ut.promotedFunds;return await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:hn(t.fundId),fundName:null!==(n=fn(t.fundId))&&void 0!==n?n:"",promotedFundId:t.fundId,promotedFundsShown:e}),_n.fundId=t.fundId,Zt.navigateInternally(this.history,t.route)}pdsViewedAsync(t,n){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:n,fundName:t,pageName:"Panel Fund Page"})}static get assetsDirs(){return["assets"]}},Jn=class{constructor(n){t(this,n),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const n=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!n)return this.previousMatch=this.match,this.match=lt(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};var n,e;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||(e=this.previousMatch,null==(n=this.match)&&null==e||null!=e&&n&&e&&n.path===e.path&&n.url===e.url&&ot(n.params,e.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?n(this.component,Object.assign({},t)):void 0}get el(){return u(this)}static get watchers(){return{location:["computeMatch"]}}};_.injectProps(Jn,["location","history","historyType","routeViewsUpdated"]),Jn.style="stencil-route.inactive{display:none}";const Yn=(t,n,e)=>e(t.confirm(n)),Gn=(t,n)=>{const e=t[n],i="__storage_test__";try{return e.setItem(i,i),e.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!==e.length}},Kn=class{constructor(n){t(this,n),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=lt(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var n,e,i;if(!((n=t).metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push((i=this.root,"/"==(e=this.url).charAt(0)&&"/"==i.charAt(i.length-1)?i.slice(0,i.length-1)+e:i+e))}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})),n(this.custom,Object.assign({},t),n("slot",null))}get el(){return u(this)}static get watchers(){return{location:["computeMatch"]}}};_.injectProps(Kn,["history","location","root"]);const Qn=t=>"STENCIL-ROUTE"===t.tagName,Zn=class{constructor(n){t(this,n),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=c(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let n=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(Qn).map(((e,i)=>{const r=lt(t.pathname,{path:e.url,exact:e.exact,strict:!0});return r&&-1===n&&(n=i),{el:e,match:r}})),-1===n)return;if(this.activeIndex===n)return void(this.subscribers[n].el.match=this.subscribers[n].match);this.activeIndex=n;const e=this.subscribers[this.activeIndex];this.scrollTopOffset&&(e.el.scrollTopOffset=this.scrollTopOffset),e.el.group=this.group,e.el.match=e.match,e.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,n)=>{if(t.el.componentUpdated=void 0,n===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 n("slot",null)}get el(){return u(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};_.injectProps(Zn,["location","routeViewsUpdated"]);const te=(t,...n)=>{t||console.warn(...n)},ne=()=>{let t,n=[];return{setPrompt:n=>(te(null==t,"A history supports only one prompt at a time"),t=n,()=>{t===n&&(t=null)}),confirmTransitionTo:(n,e,i,r)=>{if(null!=t){const s="function"==typeof t?t(n,e):t;"string"==typeof s?"function"==typeof i?i(s,r):(te(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==s)}else r(!0)},appendListener:t=>{let e=!0;const i=(...n)=>{e&&t(...n)};return n.push(i),()=>{e=!1,n=n.filter((t=>t!==i))}},notifyListeners:(...t)=>{n.forEach((n=>n(...t)))}}},ee=(t,n="scrollPositions")=>{let e=new Map;const i=(n,i)=>{if(e.set(n,i),Gn(t,"sessionStorage")){const n=[];e.forEach(((t,e)=>{n.push([e,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(n))}};if(Gn(t,"sessionStorage")){const i=t.sessionStorage.getItem(n);e=i?new Map(JSON.parse(i)):e}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:i,get:t=>e.get(t),has:t=>e.has(t),capture:n=>{i(n,[t.scrollX,t.scrollY])}}},ie={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+nt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:nt,decodePath:tt},slash:{encodePath:tt,decodePath:tt}},re=(t,n)=>{const e=0==t.pathname.indexOf(n)?"/"+t.pathname.slice(n.length):t.pathname;return Object.assign({},t,{pathname:e})},se={browser:(t,n={})=>{let e=!1;const i=t.history,r=t.location,s=t.navigator,o=(t=>{const n=t.navigator.userAgent;return(-1===n.indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&t.history&&"pushState"in t.history})(t),a=!(-1===s.userAgent.indexOf("Trident")),u=ee(t),c=null!=n.forceRefresh&&n.forceRefresh,l=null!=n.getUserConfirmation?n.getUserConfirmation:Yn,d=null!=n.keyLength?n.keyLength:6,f=n.basename?Z(tt(n.basename)):"",h=()=>{try{return t.history.state||{}}catch(t){return{}}},p=t=>{t=t||{};const{key:n,state:e}=t,{pathname:i,search:s,hash:o}=r;let a=i+s+o;return te(!f||K(a,f),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+f+'".'),f&&(a=Q(a,f)),at(a,e,n||rt(d))},m=ne(),v=t=>{u.capture(M.location.key),Object.assign(M,t),M.location.scrollPosition=u.get(M.location.key),M.length=i.length,m.notifyListeners(M.location,M.action)},w=t=>{((t,n)=>void 0===n.state&&-1===t.userAgent.indexOf("CriOS"))(s,t)||g(p(t.state))},y=()=>{g(p(h()))},g=t=>{if(e)e=!1,v();else{const n="POP";m.confirmTransitionTo(t,n,l,(e=>{e?v({action:n,location:t}):b(t)}))}},b=t=>{let n=k.indexOf(M.location.key),i=k.indexOf(t.key);-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,_(r))},x=p(h());let k=[x.key],S=0,C=!1;const A=t=>f+et(t),_=t=>{i.go(t)},F=n=>{S+=n,1===S?(t.addEventListener("popstate",w),a&&t.addEventListener("hashchange",y)):0===S&&(t.removeEventListener("popstate",w),a&&t.removeEventListener("hashchange",y))},M={length:i.length,action:"POP",location:x,createHref:A,push:(t,n)=>{te(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"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 e="PUSH",s=at(t,n,rt(d),M.location);m.confirmTransitionTo(s,e,l,(t=>{if(!t)return;const n=A(s),{key:a,state:u}=s;if(o)if(i.pushState({key:a,state:u},"",n),c)r.href=n;else{const t=k.indexOf(M.location.key),n=k.slice(0,-1===t?0:t+1);n.push(s.key),k=n,v({action:e,location:s})}else te(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),r.href=n}))},replace:(t,n)=>{te(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"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 e="REPLACE",s=at(t,n,rt(d),M.location);m.confirmTransitionTo(s,e,l,(t=>{if(!t)return;const n=A(s),{key:a,state:u}=s;if(o)if(i.replaceState({key:a,state:u},"",n),c)r.replace(n);else{const t=k.indexOf(M.location.key);-1!==t&&(k[t]=s.key),v({action:e,location:s})}else te(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),r.replace(n)}))},go:_,goBack:()=>_(-1),goForward:()=>_(1),block:(t="")=>{const n=m.setPrompt(t);return C||(F(1),C=!0),()=>(C&&(C=!1,F(-1)),n())},listen:t=>{const n=m.appendListener(t);return F(1),()=>{F(-1),n()}},win:t};return M},hash:(t,n={})=>{let e=!1,i=null,r=0,s=!1;const o=t.location,a=t.history,u=-1===t.navigator.userAgent.indexOf("Firefox"),c=null!=n.keyLength?n.keyLength:6,{getUserConfirmation:l=Yn,hashType:d="slash"}=n,f=n.basename?Z(tt(n.basename)):"",{encodePath:h,decodePath:p}=ie[d],m=()=>{const t=o.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)},v=t=>{const n=o.href.indexOf("#");o.replace(o.href.slice(0,n>=0?n:0)+"#"+t)},w=()=>{let t=p(m());return te(!f||K(t,f),'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 "'+f+'".'),f&&(t=Q(t,f)),at(t,void 0,rt(c))},y=ne(),g=t=>{Object.assign(I,t),I.length=a.length,y.notifyListeners(I.location,I.action)},b=()=>{const t=m(),n=h(t);if(t!==n)v(n);else{const t=w(),n=I.location;if(!e&&(r=n).pathname===(s=t).pathname&&r.search===s.search&&r.hash===s.hash&&r.key===s.key&&ot(r.state,s.state))return;if(i===et(t))return;i=null,x(t)}var r,s},x=t=>{if(e)e=!1,g();else{const n="POP";y.confirmTransitionTo(t,n,l,(e=>{e?g({action:n,location:t}):k(t)}))}},k=t=>{let n=_.lastIndexOf(et(I.location)),i=_.lastIndexOf(et(t));-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,F(r))},S=m(),C=h(S);S!==C&&v(C);const A=w();let _=[et(A)];const F=t=>{te(u,"Hash history go(n) causes a full page reload in this browser"),a.go(t)},M=(t,n)=>{r+=n,1===r?t.addEventListener("hashchange",b):0===r&&t.removeEventListener("hashchange",b)},I={length:a.length,action:"POP",location:A,createHref:t=>"#"+h(f+et(t)),push:(t,n)=>{te(void 0===n,"Hash history cannot push state; it is ignored");const e="PUSH",r=at(t,void 0,rt(c),I.location);y.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),s=h(f+n);if(m()!==s){i=n,(t=>{o.hash=t})(s);const t=_.lastIndexOf(et(I.location)),a=_.slice(0,-1===t?0:t+1);a.push(n),_=a,g({action:e,location:r})}else te(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),g()}))},replace:(t,n)=>{te(void 0===n,"Hash history cannot replace state; it is ignored");const e="REPLACE",r=at(t,void 0,rt(c),I.location);y.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),s=h(f+n);m()!==s&&(i=n,v(s));const o=_.indexOf(et(I.location));-1!==o&&(_[o]=n),g({action:e,location:r})}))},go:F,goBack:()=>F(-1),goForward:()=>F(1),block:(n="")=>{const e=y.setPrompt(n);return s||(M(t,1),s=!0),()=>(s&&(s=!1,M(t,-1)),e())},listen:n=>{const e=y.appendListener(n);return M(t,1),()=>{M(t,-1),e()}},win:t};return I}},oe=class{constructor(n){t(this,n),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const n=this.history.win.document.getElementById(t.scrollToId);if(n)return n.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=c(this,"isServer"),this.queue=c(this,"queue")}componentWillLoad(){this.history=se[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=re(t,this.root),this.location=t})),this.location=re(this.history.location,this.root)}scrollTo(t){const n=this.history;if(null!=t&&!this.isServer&&n)return"POP"===n.action&&Array.isArray(n.location.scrollPosition)?this.queue.write((()=>{n&&n.location&&Array.isArray(n.location.scrollPosition)&&n.win.scrollTo(n.location.scrollPosition[0],n.location.scrollPosition[1])})):this.queue.write((()=>{n.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return n(_.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},n("slot",null))}get el(){return u(this)}},ae=class{constructor(n){t(this,n),this.stepSubmitSuccess=o(this,"step-completion",7),this.successPageAcknowledged=o(this,"successPageAcknowledged",5),this.initialised=o(this,"initialised",7),this.isSelfHosted=!1,this.isAppInitialised=!1}async componentWillLoad(){const t=Bt.fromNullable(this.accessToken);if(Bt.isNone(t))throw Error("jwt property is missing.");Ut.state.jwt=t;const n=Bt.fromNullable(this.backendUrl);if(Bt.isNone(n))throw Error("apiBaseUrl property is missing.");Ut.state.apiBaseUrl=Bt.some(n.value.replace(/\/$/,"")+"/");const e=Bt.fromNullable(this.appBaseUrl);if(Bt.isNone(e))throw Error("appBaseUrl property is missing.");Ut.state.appBaseUrl=Bt.some(e.value.replace(/\/$/,"")),Ut.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),Ut.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),Ut.state.hasSuperSelectionBeenSubmitted=!1,this.isSelfHosted&&Zt.navigateInternally(this.history,Kt.Success))}))}async componentDidLoad(){await Ut.loadAppStateAsync();const t=await mn.GetExistingFundAsync();this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:Ut.accountIdOrDefault,partnerIdOrDefault:Ut.partnerIdOrDefault,profileId:Ut.profileId}),Wt(),Bt.isSome(t)&&"Inactive"!==t.value.valid?Zt.navigateInternally(this.history,Kt.ExistingChoicePage):Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}authTokenChanged(t){Ut.state.jwt=Bt.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return n(s,null,n("link",{rel:"stylesheet",href:r("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 n("stencil-router",{root:this.routerBaseUrl(),class:"font-inter"},n("stencil-route-switch",{scrollTopOffset:0},this.isAppInitialised?n("div",{class:{"pt-28":!0,"-mt-12 pb-6":!this.isFundJoinPage(),"-mt-28":this.isFundJoinPage()}},Qt,n("sss-footer-section",null)):n("div",{class:"flex justify-center py-20"},n("sss-loading-indicator",null))))}isFundJoinPage(){return window.location.pathname.includes(Kt.SlateJoin)||window.location.pathname.includes(Kt.PromotedFundJoinV1)||window.location.pathname.includes(Kt.PromotedFundJoinV2)}static get assetsDirs(){return["assets"]}static get watchers(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}}};H(ae),ae.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 ue,ce=[],le="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"}(ue||(ue={}));var de,fe=function(t){return Object.freeze(t)},he=function(t,n){this.inlineSize=t,this.blockSize=n,fe(this)},pe=function(){function t(t,n,e,i){return this.x=t,this.y=n,this.width=e,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fe(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(n){return new t(n.x,n.y,n.width,n.height)},t}(),me=function(t){return t instanceof SVGElement&&"getBBox"in t},ve=function(t){if(me(t)){var n=t.getBBox();return!n.width&&!n.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},we=function(t){var n,e,i=null===(e=null===(n=t)||void 0===n?void 0:n.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(i&&t instanceof i.Element)},ye="undefined"!=typeof window?window:{},ge=new WeakMap,be=/auto|scroll/,xe=/^tb|vertical/,ke=/msie|trident/i.test(ye.navigator&&ye.navigator.userAgent),Se=function(t){return parseFloat(t||"0")},Ce=function(t,n,e){return void 0===t&&(t=0),void 0===n&&(n=0),void 0===e&&(e=!1),new he((e?n:t)||0,(e?t:n)||0)},Ae=fe({devicePixelContentBoxSize:Ce(),borderBoxSize:Ce(),contentBoxSize:Ce(),contentRect:new pe(0,0,0,0)}),_e=function(t,n){if(void 0===n&&(n=!1),ge.has(t)&&!n)return ge.get(t);if(ve(t))return ge.set(t,Ae),Ae;var e=getComputedStyle(t),i=me(t)&&t.ownerSVGElement&&t.getBBox(),r=!ke&&"border-box"===e.boxSizing,s=xe.test(e.writingMode||""),o=!i&&be.test(e.overflowY||""),a=!i&&be.test(e.overflowX||""),u=i?0:Se(e.paddingTop),c=i?0:Se(e.paddingRight),l=i?0:Se(e.paddingBottom),d=i?0:Se(e.paddingLeft),f=i?0:Se(e.borderTopWidth),h=i?0:Se(e.borderRightWidth),p=i?0:Se(e.borderBottomWidth),m=d+c,v=u+l,w=(i?0:Se(e.borderLeftWidth))+h,y=f+p,g=a?t.offsetHeight-y-t.clientHeight:0,b=o?t.offsetWidth-w-t.clientWidth:0,x=r?m+w:0,k=r?v+y:0,S=i?i.width:Se(e.width)-x-b,C=i?i.height:Se(e.height)-k-g,A=S+m+b+w,_=C+v+g+y,F=fe({devicePixelContentBoxSize:Ce(Math.round(S*devicePixelRatio),Math.round(C*devicePixelRatio),s),borderBoxSize:Ce(A,_,s),contentBoxSize:Ce(S,C,s),contentRect:new pe(d,u,S,C)});return ge.set(t,F),F},Fe=function(t,n,e){var i=_e(t,e),r=i.borderBoxSize,s=i.contentBoxSize,o=i.devicePixelContentBoxSize;switch(n){case ue.DEVICE_PIXEL_CONTENT_BOX:return o;case ue.BORDER_BOX:return r;default:return s}},Me=function(t){var n=_e(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=fe([n.borderBoxSize]),this.contentBoxSize=fe([n.contentBoxSize]),this.devicePixelContentBoxSize=fe([n.devicePixelContentBoxSize])},Ie=function(t){if(ve(t))return 1/0;for(var n=0,e=t.parentNode;e;)n+=1,e=e.parentNode;return n},Te=function(){var t=1/0,n=[];ce.forEach((function(e){if(0!==e.activeTargets.length){var i=[];e.activeTargets.forEach((function(n){var e=new Me(n.target),r=Ie(n.target);i.push(e),n.lastReportedSize=Fe(n.target,n.observedBox),r<t&&(t=r)})),n.push((function(){e.callback.call(e.observer,i,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,i=n;e<i.length;e++)(0,i[e])();return t},Ee=function(t){ce.forEach((function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach((function(e){e.isActive()&&(Ie(e.target)>t?n.activeTargets.push(e):n.skippedTargets.push(e))}))}))},je=[],Be=0,Ne={attributes:!0,characterData:!0,childList:!0,subtree:!0},Pe=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Re=function(t){return void 0===t&&(t=0),Date.now()+t},Oe=!1,De=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var n=this;if(void 0===t&&(t=250),!Oe){Oe=!0;var e,i=Re(t);e=function(){var e=!1;try{e=function(){var t,n=0;for(Ee(n);ce.some((function(t){return t.activeTargets.length>0}));)n=Te(),Ee(n);return ce.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:le}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=le),window.dispatchEvent(t)),n>0}()}finally{if(Oe=!1,t=i-Re(),!Be)return;e?n.run(1e3):t>0?n.run(t):n.start()}},function(t){if(!de){var n=0,e=document.createTextNode("");new MutationObserver((function(){return je.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),de=function(){e.textContent=""+(n?n--:n++)}}je.push(t),de()}((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ne)};document.body?n():ye.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Pe.forEach((function(n){return ye.addEventListener(n,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Pe.forEach((function(n){return ye.removeEventListener(n,t.listener,!0)})),this.stopped=!0)},t}()),Le=function(t){!Be&&t>0&&De.start(),!(Be+=t)&&De.stop()},Ue=function(){function t(t,n){this.target=t,this.observedBox=n||ue.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,n=Fe(this.target,this.observedBox,!0);return me(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=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},t}(),qe=function(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n},ze=new WeakMap,Ve=function(t,n){for(var e=0;e<t.length;e+=1)if(t[e].target===n)return e;return-1},He=function(){function t(){}return t.connect=function(t,n){var e=new qe(t,n);ze.set(t,e)},t.observe=function(t,n,e){var i=ze.get(t),r=0===i.observationTargets.length;Ve(i.observationTargets,n)<0&&(r&&ce.push(i),i.observationTargets.push(new Ue(n,e&&e.box)),Le(1),De.schedule())},t.unobserve=function(t,n){var e=ze.get(t),i=Ve(e.observationTargets,n);i>=0&&(1===e.observationTargets.length&&ce.splice(ce.indexOf(e),1),e.observationTargets.splice(i,1),Le(-1))},t.disconnect=function(t){var n=this,e=ze.get(t);e.observationTargets.slice().forEach((function(e){return n.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),We=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.");He.connect(this,t)}return t.prototype.observe=function(t,n){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!we(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");He.observe(this,t,n)},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(!we(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");He.unobserve(this,t)},t.prototype.disconnect=function(){He.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const $e=new class{constructor(){this._appRootUrl=new V((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await Ft(this.getAppRootUrl()+"config.json").get().json();On.update({appConfiguration:Bt.fromNullable(t)})}resolveRootUrl(){const t=Bt.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(Bt.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}};function Xe(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function Je(t){var n=Object.create;if(n)return n(t);if(null==t)return{};var e=typeof t;if("object"!==e&&"function"!==e)throw new TypeError("Object prototype may only be an Object:"+t);function i(){}return i.prototype=t,new i}var Ye,Ge,Ke=function(t,n){return(Ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},Qe=Xe()||{};Ge=function(t,n){function e(){this.constructor=t}Ke(t,n),t.prototype=null===n?Je(n):(e.prototype=n.prototype,new e)},(Ye=Qe).__assign||(Ye.__assign=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}),Ye.__extends||(Ye.__extends=Ge),__assign||(__assign=Qe.__assign),__extends||(__extends=Qe.__extends);var Ze=Xe;function ti(t){var n=Ze();return n&&n[t]?n[t]:"window"===t&&ni()?window:null}function ni(){return Boolean("object"==typeof window&&window)}function ei(){return ni()?window:ti("window")}function ii(){return Boolean("object"==typeof document&&document)}function ri(){return ii()?document:ti("document")}function si(){return Boolean("object"==typeof navigator&&navigator)?navigator:ti("navigator")}function oi(){return"object"==typeof location&&location?location:ti("location")}function ai(){return ti("performance")}function ui(){return Boolean("object"==typeof JSON&&JSON||null!==ti("JSON"))}function ci(){return ui()?JSON||ti("JSON"):null}var li=null,di=!1,fi=123456789,hi=987654321;function pi(t){t<0&&(t>>>=0),fi=123456789+t&4294967295,hi=987654321-t&4294967295,di=!0}function mi(){pi(4294967296*Math.random()^(new Date).getTime())}function vi(t,n){return typeof t===n}function wi(t){return vi(t,"undefined")||void 0===t}function yi(t){return wi(t)||null===t}function gi(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function bi(t){return vi(t,"object")}function xi(t){return vi(t,"function")}function ki(t,n,e,i){void 0===i&&(i=!1);var r=!1;if(!yi(t))try{yi(t.addEventListener)?yi(t.attachEvent)||(t.attachEvent("on"+n,e),r=!0):(t.addEventListener(n,e,i),r=!0)}catch(t){}return r}function Si(t,n,e,i){if(void 0===i&&(i=!1),!yi(t))try{yi(t.removeEventListener)?yi(t.detachEvent)||t.detachEvent("on"+n,e):t.removeEventListener(n,e,i)}catch(t){}}function Ci(t,n){if(t&&bi(t))for(var e in t)gi(t,e)&&n.call(t,e,t[e])}var Ai,_i=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 vi(t,"string")},t.isNumber=function(t){return vi(t,"number")},t.isBoolean=function(t){return vi(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Fi,(function(n){var e=0|t.randomValue(15);return("x"===n?e:3&e|8).toString(16)}))},t.toISOString=function(n){if(t.isDate(n)){var e=function(t){var n=String(t);return 1===n.length&&(n="0"+n),n};return n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},t.arrForEach=function(t,n,e){for(var i=t.length,r=0;r<i;r++)r in t&&n.call(e||t,t[r],r,t)},t.arrIndexOf=function(t,n,e){for(var i=t.length,r=e||0,s=Math.max(r>=0?r:i-Math.abs(r),0);s<i;s++)if(s in t&&t[s]===n)return s;return-1},t.arrMap=function(t,n,e){for(var i=t.length,r=e||t,s=new Array(i),o=0;o<i;o++)o in t&&(s[o]=n.call(r,t[o],t));return s},t.arrReduce=function(t,n,e){var i,r=t.length,s=0;if(arguments.length>=3)i=arguments[2];else{for(;s<r&&!(s in t);)s++;i=t[s++]}for(;s<r;)s in t&&(i=n(i,t[s],s,t)),s++;return i},t.strTrim=function(n){return t.isString(n)?n.replace(/^\s+|\s+$/g,""):n},t.objKeys=function(t){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(xi(t)||bi(t)&&null!==t))throw new TypeError("objKeys called on non-object");var e=[];for(var i in t)gi(t,i)&&e.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=r.length,o=0;o<s;o++)gi(t,r[o])&&e.push(r[o]);return e},t.objDefineAccessors=function(t,n,e,i){var r=Object.defineProperty;if(r)try{var s={enumerable:!0,configurable:!0};return e&&(s.get=e),i&&(s.set=i),r(t,n,s),!0}catch(t){}return!1},t.addEventHandler=function(t,n){var e=!1,i=ei();i&&(e=ki(i,t,n),e=ki(i.body,t,n)||e);var r=ri();return r&&(e=Mi.Attach(r,t,n)||e),e},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var n=ai();return n&&n.now?n.now():t.dateNow()},t.newId=function(n){void 0===n&&(n=22);for(var e=t.random32()>>>0,i=0,r="";r.length<n;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&e),e>>>=6,5===i&&(e=(t.random32()<<2&4294967295|3&e)>>>0,i=0);return r},t.isIE=function(){if(null===li){var t=((si()||{}).userAgent||"").toLowerCase();li=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return li},t.randomValue=function(n){return n>0?Math.floor(t.random32()/4294967295*(n+1))>>>0:0},t.random32=function(n){var e,i=ti("crypto")||ti("msCrypto");return i&&i.getRandomValues?e=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(di||mi(),e=4294967295&t.mwcRandom32()):e=Math.floor(4294967296*Math.random()|0),n||(e>>>=0),e},t.mwcRandomSeed=function(t){t?pi(t):mi()},t.mwcRandom32=function(t){var n=((hi=36969*(65535&hi)+(hi>>16)&4294967295)<<16)+(65535&(fi=18e3*(65535&fi)+(fi>>16)&4294967295))>>>0&4294967295|0;return t||(n>>>=0),n},t.generateW3CId=function(){for(var n,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(n=t.random32())]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var s=e[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+s+i.substr(16,3)+i.substr(19,12)},t.isTypeof=vi,t.isUndefined=wi,t.isNullOrUndefined=yi,t.hasOwnProperty=gi,t.isFunction=xi,t.isObject=bi,t.objCreate=Je,t}(),Fi=/[xy]/g,Mi=function(){function t(){}return t.Attach=ki,t.AttachEvent=ki,t.Detach=Si,t.DetachEvent=Si,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(Ai||(Ai={}));var Ii=Object.getPrototypeOf,Ti=0;
|
|
1
|
+
import{r as t,h as n,g as e,f as i,a as r,H as s,c as o,F as a,d as u,e as c,s as l}from"./p-683b6e23.js";import{f as d,m as f,S as h,a as p,i as m,b as v,O as w,c as y,d as g,g as b,h as x,j as k,k as S,l as C,Q as A}from"./p-29c11183.js";import{A as _}from"./p-40e504c4.js";function F(){}function M(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(M(((e,i)=>d(t(e,i)).pipe(f(((t,r)=>n(e,t,i,r))))),e)):("number"==typeof n&&(e=n),n=>n.lift(new I(t,e)))}class I{constructor(t,n=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=n}call(t,n){return n.subscribe(new T(t,this.project,this.concurrent))}}class T extends h{constructor(t,n,e=Number.POSITIVE_INFINITY){super(t),this.project=n,this.concurrent=e,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 n;const e=this.index++;try{n=this.project(t,e)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(n)}_innerSub(t){const n=new p(this),e=this.destination;e.add(n);const i=m(t,n);i!==n&&e.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 E(t,n,e,i){return y(e)&&(i=e,e=void 0),i?E(t,n,e).pipe(f((t=>v(t)?i(...t):i(t)))):new w((i=>{j(t,n,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,e)}))}function j(t,n,e,i,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(n,e,r),s=()=>i.removeEventListener(n,e,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(n,e),s=()=>i.off(n,e)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(n,e),s=()=>i.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;s<o;s++)j(t[s],n,e,i,r)}i.add(s)}class B{constructor(t,n){this.dueTime=t,this.scheduler=n}call(t,n){return n.subscribe(new N(t,this.dueTime,this.scheduler))}}class N extends b{constructor(t,n,e){super(t),this.dueTime=n,this.scheduler=e,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(P,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 P(t){t.debouncedNext()}function R(t,n,e){return function(i){return i.lift(new O(t,n,e))}}class O{constructor(t,n,e){this.nextOrObserver=t,this.error=n,this.complete=e}call(t,n){return n.subscribe(new D(t,this.nextOrObserver,this.error,this.complete))}}class D extends b{constructor(t,n,e,i){super(t),this._tapNext=F,this._tapError=F,this._tapComplete=F,this._tapError=e||F,this._tapComplete=i||F,y(n)?(this._context=this,this._tapNext=n):n&&(this._context=n,this._tapNext=n.next||F,this._tapError=n.error||F,this._tapComplete=n.complete||F)}_next(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}var L=function(t){return"Some"===t._tag},U=function(t){return"None"===t._tag},q={_tag:"None"},V=function(t){return{_tag:"Some",value:t}};class z{constructor(t){this.factory=t,this._value=q}get value(){if(L(this._value))return this._value.value;const t=this.factory();return this._value=V(t),t}}function H(t){_.injectProps(t,["history","location"])}const W=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),$=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),X=t=>t.replace(/([=!:$/()])/g,"\\$1"),J=t=>t&&t.sensitive?"":"i",Y=(t,n,e)=>{for(var i=(e=e||{}).strict,r=!1!==e.end,s=$(e.delimiter||"/"),o=e.delimiters||"./",a=[].concat(e.endsWith||[]).map($).concat("$").join("|"),u="",c=!1,l=0;l<t.length;l++){var d=t[l];if("string"==typeof d)u+=$(d),c=l===t.length-1&&o.indexOf(d[d.length-1])>-1;else{var f=$(d.prefix||""),h=d.repeat?"(?:"+d.pattern+")(?:"+f+"(?:"+d.pattern+"))*":d.pattern;n&&n.push(d),u+=d.optional?d.partial?f+"("+h+")?":"(?:"+f+"("+h+"))?":f+"("+h+")"}}return r?(i||(u+="(?:"+s+")?"),u+="$"===a?"$":"(?="+a+")"):(i||(u+="(?:"+s+"(?="+a+"))?"),c||(u+="(?="+s+"|"+a+")")),new RegExp("^"+u,J(e))},G=(t,n,e)=>t instanceof RegExp?((t,n)=>{if(!n)return t;var e=t.source.match(/\((?!\?)/g);if(e)for(var i=0;i<e.length;i++)n.push({name:i,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,pattern:null});return t})(t,n):Array.isArray(t)?((t,n,e)=>{for(var i=[],r=0;r<t.length;r++)i.push(G(t[r],n,e).source);return new RegExp("(?:"+i.join("|")+")",J(e))})(t,n,e):((t,n,e)=>Y(((t,n)=>{for(var e,i=[],r=0,s=0,o="",a=n&&n.delimiter||"/",u=n&&n.delimiters||"./",c=!1;null!==(e=W.exec(t));){var l=e[0],d=e[1],f=e.index;if(o+=t.slice(s,f),s=f+l.length,d)o+=d[1],c=!0;else{var h="",p=t[s],m=e[2],v=e[3],w=e[4],y=e[5];if(!c&&o.length){var g=o.length-1;u.indexOf(o[g])>-1&&(h=o[g],o=o.slice(0,g))}o&&(i.push(o),o="",c=!1);var b=h||a,x=v||w;i.push({name:m||r++,prefix:h,delimiter:b,optional:"?"===y||"*"===y,repeat:"+"===y||"*"===y,partial:""!==h&&void 0!==p&&p!==h,pattern:x?X(x):"[^"+$(b)+"]+?"})}}return(o||s<t.length)&&i.push(o+t.substr(s)),i})(t,e),n,e))(t,n,e),K=(t,n)=>new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(t),Q=(t,n)=>K(t,n)?t.substr(n.length):t,Z=t=>"/"===t.charAt(t.length-1)?t.slice(0,-1):t,tt=t=>"/"===t.charAt(0)?t:"/"+t,nt=t=>"/"===t.charAt(0)?t.substr(1):t,et=t=>{const{pathname:n,search:e,hash:i}=t;let r=n||"/";return e&&"?"!==e&&(r+="?"===e.charAt(0)?e:"?"+e),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},it=t=>"/"===t.charAt(0),rt=t=>Math.random().toString(36).substr(2,t),st=(t,n)=>{for(let e=n,i=e+1,r=t.length;i<r;e+=1,i+=1)t[e]=t[i];t.pop()},ot=(t,n)=>{if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(((t,e)=>ot(t,n[e])));const e=typeof t;if(e!==typeof n)return!1;if("object"===e){const e=t.valueOf(),i=n.valueOf();if(e!==t||i!==n)return ot(e,i);const r=Object.keys(t),s=Object.keys(n);return r.length===s.length&&r.every((e=>ot(t[e],n[e])))}return!1},at=(t,n,e,i)=>{let r;"string"==typeof t?(r=(t=>{let n=t||"/",e="",i="";const r=n.indexOf("#");-1!==r&&(i=n.substr(r),n=n.substr(0,r));const s=n.indexOf("?");return-1!==s&&(e=n.substr(s),n=n.substr(0,s)),{pathname:n,search:"?"===e?"":e,hash:"#"===i?"":i,query:{},key:""}})(t),void 0!==n&&(r.state=n)):(r=Object.assign({pathname:""},t),r.search&&"?"!==r.search.charAt(0)&&(r.search="?"+r.search),r.hash&&"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash),void 0!==n&&void 0===r.state&&(r.state=n));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}var s;return r.key=e,i?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=((t,n="")=>{let e,i=n&&n.split("/")||[],r=0;const s=t&&t.split("/")||[],o=t&&it(t),a=n&&it(n),u=o||a;if(t&&it(t)?i=s:s.length&&(i.pop(),i=i.concat(s)),!i.length)return"/";if(i.length){const t=i[i.length-1];e="."===t||".."===t||""===t}else e=!1;for(let t=i.length;t>=0;t--){const n=i[t];"."===n?st(i,t):".."===n?(st(i,t),r++):r&&(st(i,t),r--)}if(!u)for(;r--;r)i.unshift("..");!u||""===i[0]||i[0]&&it(i[0])||i.unshift("");let c=i.join("/");return e&&"/"!==c.substr(-1)&&(c+="/"),c})(r.pathname,i.pathname)):r.pathname=i.pathname:r.pathname||(r.pathname="/"),r.query=(s=r.search||"")?(/^[?#]/.test(s)?s.slice(1):s).split("&").reduce(((t,n)=>{let[e,i]=n.split("=");return t[e]=i?decodeURIComponent(i.replace(/\+/g," ")):"",t}),{}):{},r};let ut=0;const ct={},lt=(t,n={})=>{"string"==typeof n&&(n={path:n});const{path:e="/",exact:i=!1,strict:r=!1}=n,{re:s,keys:o}=((t,n)=>{const e=`${n.end}${n.strict}`,i=ct[e]||(ct[e]={}),r=JSON.stringify(t);if(i[r])return i[r];const s=[],o={re:G(t,s,n),keys:s};return ut<1e4&&(i[r]=o,ut+=1),o})(e,{end:i,strict:r}),a=s.exec(t);if(!a)return null;const[u,...c]=a,l=t===u;return i&&!l?null:{path:e,url:"/"===e&&""===u?"/":u,isExact:l,params:o.reduce(((t,n,e)=>(t[n.name]=c[e],t)),{})}};var dt;!function(t){t[t.Available=0]="Available",t[t.Pending=1]="Pending",t[t.Error=2]="Error"}(dt||(dt={}));const ft=class{constructor(n){t(this,n),this.fillWidth=!1,this.fillWidthOnMobile=!1,this.disabled=!1,this.variant="primary",this.promiseFn=()=>Promise.resolve(),this.state=dt.Available}render(){return n("button",{class:{"inline-flex items-center justify-center px-4 py-2 border text-base font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 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,"w-full":this.fillWidth||this.fillWidthOnMobile,"sm:w-auto":this.fillWidthOnMobile},disabled:this.disabled,onClick:()=>this.clicked()},this.state===dt.Pending&&n("sss-loading-indicator",{theme:"primary"===this.variant?"light":"primary",size:16}),n("div",{class:{hidden:this.state===dt.Pending}},n("slot",null)))}async clicked(){if(this.promiseFn&&this.state!==dt.Pending)try{this.state=dt.Pending,await this.promiseFn(),this.state=dt.Available}catch(t){throw this.state=dt.Error,t}}};var ht=function(){return(ht=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},pt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},mt=function(t,n,e){if(void 0===e&&(e=!1),!t||!n||"object"!=typeof t||"object"!=typeof n)return t;var i=ht({},t);for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]instanceof Array&&t[r]instanceof Array?e?pt(t[r],n[r]):n[r]:"object"==typeof n[r]&&"object"==typeof t[r]?mt(t[r],n[r],e):n[r]);return i},vt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},wt={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(t,n){for(var e=void 0===n?{}:n,i=e.doThrow,r=void 0===i||i,s=e.instance,o=void 0!==s&&s,a=[],u=2;u<arguments.length;u++)a[u-2]=arguments[u];var c=this.polyfills[t]||("undefined"!=typeof self?self[t]:null)||("undefined"!=typeof global?global[t]:null);if(r&&!c)throw new Error(t+" is not defined");return o&&c?new(c.bind.apply(c,vt([void 0],a))):c}},yt=function(t,n,e,i){if(!t.getEntriesByName)return!1;var r=t.getEntriesByName(n);return!!(r&&r.length>0)&&(e(r.reverse()[0]),i.clearMeasures&&i.clearMeasures(n),gt.callbacks.delete(n),gt.callbacks.size<1&&(gt.observer.disconnect(),i.clearResourceTimings&&i.clearResourceTimings()),!0)},gt={callbacks:new Map,observer:null,observe:function(t,n){if(t&&n){var e=wt.polyfill("performance",{doThrow:!1});(function(t,n){return!gt.observer&&t&&n&&(gt.observer=new n((function(n){gt.callbacks.forEach((function(e,i){yt(n,i,e,t)}))})),t.clearResourceTimings&&t.clearResourceTimings()),gt.observer})(e,wt.polyfill("PerformanceObserver",{doThrow:!1}))&&(yt(e,t,n,e)||(gt.callbacks.size<1&>.observer.observe({entryTypes:["resource","measure"]}),gt.callbacks.set(t,n)))}}},bt=function(t){this.error=t},xt=function(){return(xt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},kt=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var i=Array(t),r=0;for(n=0;n<e;n++)for(var s=arguments[n],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i},St=function(){function t(t,n,e,i,r,s){void 0===e&&(e=new Map),void 0===i&&(i=[]),void 0===r&&(r=[]),void 0===s&&(s=[]),this._url=t,this._options=n,this._catchers=e,this._resolvers=i,this._middlewares=r,this._deferredChain=s}return t.factory=function(n,e){return void 0===n&&(n=""),void 0===e&&(e={}),new t(n,e)},t.prototype.selfFactory=function(n){var e=void 0===n?{}:n,i=e.url,r=e.options,s=e.catchers,o=void 0===s?this._catchers:s,a=e.resolvers,u=void 0===a?this._resolvers:a,c=e.middlewares,l=void 0===c?this._middlewares:c,d=e.deferredChain,f=void 0===d?this._deferredChain:d;return new t(void 0===i?this._url:i,xt({},void 0===r?this._options:r),new Map(o),kt(u),kt(l),kt(f))},t.prototype.defaults=function(t,n){return void 0===n&&(n=!1),wt.defaults=n?mt(wt.defaults,t):t,this},t.prototype.errorType=function(t){return wt.errorType=t,this},t.prototype.polyfills=function(t){return wt.polyfills=xt(xt({},wt.polyfills),t),this},t.prototype.url=function(t,n){if(void 0===n&&(n=!1),n)return this.selfFactory({url:t});var e=this._url.split("?");return this.selfFactory({url:e.length>1?e[0]+t+"?"+e[1]:this._url+t})},t.prototype.options=function(t,n){return void 0===n&&(n=!0),this.selfFactory({options:n?mt(this._options,t):t})},t.prototype.query=function(t,n){return void 0===n&&(n=!1),this.selfFactory({url:Ct(this._url,t,n)})},t.prototype.headers=function(t){return this.selfFactory({options:mt(this._options,{headers:t||{}})})},t.prototype.accept=function(t){return this.headers({Accept:t})},t.prototype.content=function(t){var n;return this.headers(((n={})["Content-Type"]=t,n))},t.prototype.auth=function(t){return this.headers({Authorization:t})},t.prototype.catcher=function(t,n){var e=new Map(this._catchers);return e.set(t,n),this.selfFactory({catchers:e})},t.prototype.signal=function(t){return this.selfFactory({options:xt(xt({},this._options),{signal:t.signal})})},t.prototype.resolve=function(t,n){return void 0===n&&(n=!1),this.selfFactory({resolvers:n?[t]:kt(this._resolvers,[t])})},t.prototype.defer=function(t,n){return void 0===n&&(n=!1),this.selfFactory({deferredChain:n?[t]:kt(this._deferredChain,[t])})},t.prototype.middlewares=function(t,n){return void 0===n&&(n=!1),this.selfFactory({middlewares:n?t:kt(this._middlewares,t)})},t.prototype.method=function(t,n,e){void 0===n&&(n={}),void 0===e&&(e=null);var i=this._options.headers,r=e?"object"!=typeof e||i&&!Object.entries(i).every((function(t){var n=t[1];return t[0].toLowerCase()!=="Content-Type".toLowerCase()||n.startsWith("application/json")}))?this.body(e):this.json(e):this;return function(t){var n=t._url,e=t._resolvers,i=t._middlewares,r=t._options,s=new Map(t._catchers),o=mt(wt.defaults,r),a=wt.polyfill("AbortController",{doThrow:!1,instance:!0});!o.signal&&a&&(o.signal=a.signal);var u={ref:null,clear:function(){u.ref&&(clearTimeout(u.ref),u.ref=null)}},c=function(t){return function(n){return 0===t.length?n:1===t.length?t[0](n):t.reduceRight((function(e,i,r){return i(r===t.length-2?e(n):e)}))}}(i)(wt.polyfill("fetch"))(n,o),l=c.catch((function(t){throw new bt(t)})).then((function(t){return u.clear(),t.ok?t:t[wt.errorType||"text"]().then((function(n){var e=new Error(n);throw e[wt.errorType||"text"]=n,e.status=t.status,e.response=t,e}))})),d=function(n){return function(e){return(n?l.then((function(t){return t&&t[n]()})).then((function(t){return e?e(t):t})):l.then((function(t){return e?e(t):t}))).catch((function(n){u.clear();var e=n instanceof bt?n.error:n;if(n instanceof bt&&s.has("__fromFetch"))return s.get("__fromFetch")(e,t);if(s.has(e.status))return s.get(e.status)(e,t);if(s.has(e.name))return s.get(e.name)(e,t);throw e}))}},f={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(t){return c.then((function(n){return gt.observe(n.url,t)})),f},setTimeout:function(t,n){return void 0===n&&(n=a),u.clear(),u.ref=setTimeout((function(){return n.abort()}),t),f},controller:function(){return[a,f]},error:function(t,n){return s.set(t,n),f},badRequest:function(t){return f.error(400,t)},unauthorized:function(t){return f.error(401,t)},forbidden:function(t){return f.error(403,t)},notFound:function(t){return f.error(404,t)},timeout:function(t){return f.error(408,t)},internalError:function(t){return f.error(500,t)},fetchError:function(t){return f.error("__fromFetch",t)},onAbort:function(t){return f.error("AbortError",t)}};return e.reduce((function(n,e){return e(n,t)}),f)}((r=r.options(xt(xt({},n),{method:t})))._deferredChain.reduce((function(t,n){return n(t,t._url,t._options)}),r))},t.prototype.get=function(t){return this.method("GET",t)},t.prototype.delete=function(t){return this.method("DELETE",t)},t.prototype.put=function(t,n){return this.method("PUT",n,t)},t.prototype.post=function(t,n){return this.method("POST",n,t)},t.prototype.patch=function(t,n){return this.method("PATCH",n,t)},t.prototype.head=function(t){return this.method("HEAD",t)},t.prototype.opts=function(t){return this.method("OPTIONS",t)},t.prototype.replay=function(t){return this.method(this._options.method,t)},t.prototype.body=function(t){return this.selfFactory({options:xt(xt({},this._options),{body:t})})},t.prototype.json=function(t){var n,e=null===(n=Object.entries(this._options.headers||{}).find((function(t){var n=t[1];return t[0].toLowerCase()==="Content-Type".toLowerCase()&&n.startsWith("application/json")})))||void 0===n?void 0:n[1];return this.content(e||"application/json").body(JSON.stringify(t))},t.prototype.formData=function(t,n){return void 0===n&&(n=!1),this.body(At(t,n))},t.prototype.formUrl=function(t){return this.body("string"==typeof t?t:(n=t,Object.keys(n).map((function(t){var e=n[t];return e instanceof Array?e.map((function(n){return _t(t,n)})).join("&"):_t(t,e)})).join("&"))).content("application/x-www-form-urlencoded");var n},t}(),Ct=function(t,n,e){var i;if("string"==typeof n)i=n;else{var r=wt.polyfill("URLSearchParams",{instance:!0});for(var s in n)if(n[s]instanceof Array)for(var o=0,a=n[s];o<a.length;o++)r.append(s,a[o]);else r.append(s,n[s]);i=r.toString()}var u=t.split("?");return e||u.length<2?u[0]+"?"+i:t+"&"+i};function At(t,n,e,i){return void 0===n&&(n=!1),void 0===e&&(e=wt.polyfill("FormData",{instance:!0})),void 0===i&&(i=[]),Object.entries(t).forEach((function(t){var r=t[0],s=t[1],o=i.reduce((function(t,n){return t?t+"["+n+"]":n}),null);if(o=o?o+"["+r+"]":r,s instanceof Array)for(var a=0,u=s;a<u.length;a++)e.append(o+"[]",u[a]);else!n||"object"!=typeof s||n instanceof Array&&n.includes(r)?e.append(o,s):null!==s&&At(s,n,e,kt(i,[r]))})),e}function _t(t,n){return encodeURIComponent(t)+"="+encodeURIComponent("object"==typeof n?JSON.stringify(n):""+n)}var Ft=St.factory;Ft.default=St.factory;const Mt=t=>!("isConnected"in t)||t.isConnected,It=(()=>{let t;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let n of t.keys())t.set(n,t.get(n).filter(Mt))})(...n)}),2e3)}})(),Tt=(t,n)=>{const r=((t,n=((t,n)=>t!==n))=>{let e=new Map(Object.entries(null!=t?t:{}));const i={dispose:[],get:[],set:[],reset:[]},r=()=>{e=new Map(Object.entries(null!=t?t:{})),i.reset.forEach((t=>t()))},s=t=>(i.get.forEach((n=>n(t))),e.get(t)),o=(t,r)=>{const s=e.get(t);n(r,s,t)&&(e.set(t,r),i.set.forEach((n=>n(t,r,s))))},a="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,n)=>s(n),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,n)=>e.has(n),set:(t,n,e)=>(o(n,e),!0)}),u=(t,n)=>(i[t].push(n),()=>{((t,n)=>{const e=t.indexOf(n);e>=0&&(t[e]=t[t.length-1],t.length--)})(i[t],n)});return{state:a,get:s,set:o,on:u,onChange:(n,e)=>{const i=u("set",((t,i)=>{t===n&&e(i)})),r=u("reset",(()=>e(t[n])));return()=>{i(),r()}},use:(...t)=>t.forEach((t=>{t.set&&u("set",t.set),t.get&&u("get",t.get),t.reset&&u("reset",t.reset)})),dispose:()=>{i.dispose.forEach((t=>t())),r()},reset:r}})(t,n);return(({on:t})=>{const n=new Map;"function"==typeof e&&(t("dispose",(()=>{n.clear()})),t("get",(t=>{const i=e();i&&((t,n,e)=>{const i=t.get(n);i?i.includes(e)||i.push(e):t.set(n,[e])})(n,t,i)})),t("set",(t=>{const e=n.get(t);e&&n.set(t,e.filter(i)),It(n)})),t("reset",(()=>{n.forEach((t=>t.forEach(i))),It(n)})))})(r),r};function Et(t,n,e){return t(e={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var jt=Et((function(t,n){function e(t){return t}function i(t){return function(){return t}}function r(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.bindTo_=n.bind_=n.hole=n.pipe=n.untupled=n.tupled=n.absurd=n.decrement=n.increment=n.tuple=n.flow=n.flip=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.constant=n.not=n.unsafeCoerce=n.identity=void 0,n.identity=e,n.unsafeCoerce=e,n.not=function(t){return function(n){return!t(n)}},n.constant=i,n.constTrue=i(!0),n.constFalse=i(!1),n.constNull=i(null),n.constUndefined=i(void 0),n.constVoid=n.constUndefined,n.flip=function(t){return function(n,e){return t(e,n)}},n.flow=function(t,n,e,i,r,s,o,a,u){switch(arguments.length){case 1:return t;case 2:return function(){return n(t.apply(this,arguments))};case 3:return function(){return e(n(t.apply(this,arguments)))};case 4:return function(){return i(e(n(t.apply(this,arguments))))};case 5:return function(){return r(i(e(n(t.apply(this,arguments)))))};case 6:return function(){return s(r(i(e(n(t.apply(this,arguments))))))};case 7:return function(){return o(s(r(i(e(n(t.apply(this,arguments)))))))};case 8:return function(){return a(o(s(r(i(e(n(t.apply(this,arguments))))))))};case 9:return function(){return u(a(o(s(r(i(e(n(t.apply(this,arguments)))))))))}}},n.tuple=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t},n.increment=function(t){return t+1},n.decrement=function(t){return t-1},n.absurd=r,n.tupled=function(t){return function(n){return t.apply(void 0,n)}},n.untupled=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(n)}},n.pipe=function(t,n,e,i,r,s,o,a,u,c,l,d,f,h,p,m,v,w,y,g){switch(arguments.length){case 1:return t;case 2:return n(t);case 3:return e(n(t));case 4:return i(e(n(t)));case 5:return r(i(e(n(t))));case 6:return s(r(i(e(n(t)))));case 7:return o(s(r(i(e(n(t))))));case 8:return a(o(s(r(i(e(n(t)))))));case 9:return u(a(o(s(r(i(e(n(t))))))));case 10:return c(u(a(o(s(r(i(e(n(t)))))))));case 11:return l(c(u(a(o(s(r(i(e(n(t))))))))));case 12:return d(l(c(u(a(o(s(r(i(e(n(t)))))))))));case 13:return f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))));case 14:return h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))));case 15:return p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))));case 16:return m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))));case 17:return v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))))));case 18:return w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))))));case 19:return y(w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t))))))))))))))))));case 20:return g(y(w(v(m(p(h(f(d(l(c(u(a(o(s(r(i(e(n(t)))))))))))))))))))}},n.hole=r,n.bind_=function(t,n,e){var i;return Object.assign({},t,((i={})[n]=e,i))},n.bindTo_=function(t){return function(n){var e;return(e={})[t]=n,e}}})),Bt=Et((function(t,n){function e(t){return null==t?n.none:n.some(t)}function i(t){return"Right"===t._tag?n.none:n.some(t.left)}function r(t){return"Left"===t._tag?n.none:n.some(t.right)}function s(t){return function(i){return n.isNone(i)?n.none:e(t(i.value))}}Object.defineProperty(n,"__esModule",{value:!0}),n.getApplySemigroup=n.getOrd=n.getEq=n.getShow=n.URI=n.wilt=n.wither=n.sequence=n.traverse=n.partitionMap=n.partition=n.filterMap=n.filter=n.separate=n.compact=n.reduceRight=n.foldMap=n.reduce=n.duplicate=n.extend=n.throwError=n.zero=n.alt=n.altW=n.flatten=n.chainFirst=n.chain=n.of=n.apSecond=n.apFirst=n.ap=n.map=n.chainNullableK=n.mapNullable=n.fromNullableK=n.getOrElse=n.getOrElseW=n.toUndefined=n.toNullable=n.fold=n.fromEither=n.getRight=n.getLeft=n.tryCatch=n.fromPredicate=n.fromNullable=n.some=n.none=n.isNone=n.isSome=void 0,n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.apS=n.bind=n.bindTo=n.Do=n.getRefinement=n.exists=n.elem=n.option=n.MonadThrow=n.Witherable=n.Traversable=n.Filterable=n.Compactable=n.Extend=n.Alternative=n.Alt=n.Foldable=n.Monad=n.Applicative=n.Functor=n.getMonoid=n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=void 0,n.isSome=function(t){return"Some"===t._tag},n.isNone=function(t){return"None"===t._tag},n.none={_tag:"None"},n.some=function(t){return{_tag:"Some",value:t}},n.fromNullable=e,n.fromPredicate=function(t){return function(e){return t(e)?n.some(e):n.none}},n.tryCatch=function(t){try{return n.some(t())}catch(t){return n.none}},n.getLeft=i,n.getRight=r,n.fromEither=r,n.fold=function(t,e){return function(i){return n.isNone(i)?t():e(i.value)}},n.toNullable=function(t){return n.isNone(t)?null:t.value},n.toUndefined=function(t){return n.isNone(t)?void 0:t.value},n.getOrElseW=function(t){return function(e){return n.isNone(e)?t():e.value}},n.getOrElse=n.getOrElseW,n.fromNullableK=function(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t.apply(void 0,n))}},n.mapNullable=s,n.chainNullableK=s;var o=function(t,e){return jt.pipe(t,n.map(e))},a=function(t,e){return jt.pipe(t,n.ap(e))},u=function(t,e){return jt.pipe(t,n.chain(e))},c=function(t,e,i){return jt.pipe(t,n.reduce(e,i))},l=function(t){var e=n.foldMap(t);return function(t,n){return jt.pipe(t,e(n))}},d=function(t,e,i){return jt.pipe(t,n.reduceRight(e,i))},f=function(t){var e=n.traverse(t);return function(t,n){return jt.pipe(t,e(n))}},h=function(t,e){return jt.pipe(t,n.alt(e))},p=function(t,e){return jt.pipe(t,n.filter(e))},m=function(t,e){return jt.pipe(t,n.filterMap(e))},v=function(t,e){return jt.pipe(t,n.extend(e))},w=function(t,e){return jt.pipe(t,n.partition(e))},y=function(t,e){return jt.pipe(t,n.partitionMap(e))},g=function(t){var e=n.wither(t);return function(t,n){return jt.pipe(t,e(n))}},b=function(t){var e=n.wilt(t);return function(t,n){return jt.pipe(t,e(n))}};n.map=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e.value))}},n.ap=function(t){return function(e){return n.isNone(e)||n.isNone(t)?n.none:n.some(e.value(t.value))}},n.apFirst=function(t){return jt.flow(n.map((function(t){return function(){return t}})),n.ap(t))},n.apSecond=function(t){return jt.flow(n.map((function(){return function(t){return t}})),n.ap(t))},n.of=n.some,n.chain=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.chainFirst=function(t){return n.chain((function(e){return jt.pipe(t(e),n.map((function(){return e})))}))},n.flatten=n.chain(jt.identity),n.altW=function(t){return function(e){return n.isNone(e)?t():e}},n.alt=n.altW,n.zero=function(){return n.none},n.throwError=function(){return n.none},n.extend=function(t){return function(e){return n.isNone(e)?n.none:n.some(t(e))}},n.duplicate=n.extend(jt.identity),n.reduce=function(t,e){return function(i){return n.isNone(i)?t:e(t,i.value)}},n.foldMap=function(t){return function(e){return function(i){return n.isNone(i)?t.empty:e(i.value)}}},n.reduceRight=function(t,e){return function(i){return n.isNone(i)?t:e(i.value,t)}},n.compact=n.flatten;var x={left:n.none,right:n.none};function k(t){return{equals:function(e,i){return e===i||(n.isNone(e)?n.isNone(i):!n.isNone(i)&&t.equals(e.value,i.value))}}}function S(t){return{concat:function(e,i){return n.isSome(e)&&n.isSome(i)?n.some(t.concat(e.value,i.value)):n.none}}}n.separate=function(t){var e=jt.pipe(t,n.map((function(t){return{left:i(t),right:r(t)}})));return n.isNone(e)?x:e.value},n.filter=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)?e:n.none}},n.filterMap=function(t){return function(e){return n.isNone(e)?n.none:t(e.value)}},n.partition=function(t){return function(n){return{left:p(n,(function(n){return!t(n)})),right:p(n,t)}}},n.partitionMap=function(t){return jt.flow(n.map(t),n.separate)},n.traverse=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):t.map(e(i.value),n.some)}}},n.sequence=function(t){return function(e){return n.isNone(e)?t.of(n.none):t.map(e.value,n.some)}},n.wither=function(t){return function(e){return function(i){return n.isNone(i)?t.of(n.none):e(i.value)}}},n.wilt=function(t){return function(e){return function(s){return n.isNone(s)?t.of({left:n.none,right:n.none}):t.map(e(s.value),(function(t){return{left:i(t),right:r(t)}}))}}},n.URI="Option",n.getShow=function(t){return{show:function(e){return n.isNone(e)?"none":"some("+t.show(e.value)+")"}}},n.getEq=k,n.getOrd=function(t){return{equals:k(t).equals,compare:function(e,i){return e===i?0:n.isSome(e)?n.isSome(i)?t.compare(e.value,i.value):1:-1}}},n.getApplySemigroup=S,n.getApplyMonoid=function(t){return{concat:S(t).concat,empty:n.some(t.empty)}},n.getFirstMonoid=function(){return{concat:function(t,e){return n.isNone(t)?e:t},empty:n.none}},n.getLastMonoid=function(){return{concat:function(t,e){return n.isNone(e)?t:e},empty:n.none}},n.getMonoid=function(t){return{concat:function(e,i){return n.isNone(e)?i:n.isNone(i)?e:n.some(t.concat(e.value,i.value))},empty:n.none}},n.Functor={URI:n.URI,map:o},n.Applicative={URI:n.URI,map:o,ap:a,of:n.of},n.Monad={URI:n.URI,map:o,ap:a,of:n.of,chain:u},n.Foldable={URI:n.URI,reduce:c,foldMap:l,reduceRight:d},n.Alt={URI:n.URI,map:o,alt:h},n.Alternative={URI:n.URI,map:o,ap:a,of:n.of,alt:h,zero:n.zero},n.Extend={URI:n.URI,map:o,extend:v},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.Filterable={URI:n.URI,map:o,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y},n.Traversable={URI:n.URI,map:o,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence},n.Witherable={URI:n.URI,map:o,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y,wither:g,wilt:b},n.MonadThrow={URI:n.URI,map:o,ap:a,of:n.of,chain:u,throwError:n.throwError},n.option={URI:n.URI,map:o,of:n.of,ap:a,chain:u,reduce:c,foldMap:l,reduceRight:d,traverse:f,sequence:n.sequence,zero:n.zero,alt:h,extend:v,compact:n.compact,separate:n.separate,filter:p,filterMap:m,partition:w,partitionMap:y,wither:g,wilt:b,throwError:n.throwError},n.elem=function(t){return function(e,i){return!n.isNone(i)&&t.equals(e,i.value)}},n.exists=function(t){return function(e){return!n.isNone(e)&&t(e.value)}},n.getRefinement=function(t){return function(e){return n.isSome(t(e))}},n.Do=n.of({}),n.bindTo=function(t){return n.map(jt.bindTo_(t))},n.bind=function(t,e){return n.chain((function(i){return jt.pipe(e(i),n.map((function(n){return jt.bind_(i,t,n)})))}))},n.apS=function(t,e){return jt.flow(n.map((function(n){return function(e){return jt.bind_(n,t,e)}})),n.ap(e))},n.traverseArrayWithIndex=function(t){return function(e){for(var i=[],r=0;r<e.length;r++){var s=t(r,e[r]);if(n.isNone(s))return n.none;i.push(s.value)}return n.some(i)}},n.traverseArray=function(t){return n.traverseArrayWithIndex((function(n,e){return t(e)}))},n.sequenceArray=n.traverseArray(jt.identity)}));function Nt(t){this.message=t}(Nt.prototype=new Error).name="InvalidCharacterError";var Pt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new Nt("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,s=0,o="";i=n.charAt(s++);~i&&(e=r%4?64*e+i:i,r++%4)?o+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function Rt(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(Pt(t).replace(/(.)/g,(function(t,n){var e=n.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(n)}catch(t){return Pt(n)}}function Ot(t){this.message=t}(Ot.prototype=new Error).name="InvalidTokenError";const Dt=new class{async getAustralianFundsAsync(t,n=!1){return qt().url("super-choice/australian-funds?"+this.toQueryString(n,t)).get().notFound((()=>{throw new Error("Failed to fetch the list of australian super funds.")})).json()}async getAppStateAsync(){return qt().url("client-app-state").get().notFound((()=>{throw new Error("Failed to fetch application configuration.")})).json()}toSearchFilterQueryString(t){switch(t.type){case"partialMatch":return`search=${t.searchString}&maxRecordCount=${t.maxRecordCount}`;case"usiMatch":return"usi="+t.usi}}toQueryString(t,n){return[this.toSearchFilterQueryString(n),t?"includeInactive=true":""].filter((t=>t&&t.length)).join("&")}},Lt={apiBaseUrl:Bt.none,appBaseUrl:Bt.none,profileId:Bt.none,jwt:Bt.none,superBuyer:Bt.none,promotedFunds:Bt.none,accountConfiguration:Bt.none,hasSuccessPageBeenAcknowledged:!1,hasSuperSelectionBeenSubmitted:!1},Ut=new class{constructor(){const{state:t,onChange:n}=Tt(Lt);this._state=t,this._onChange=n,n("jwt",(t=>{this._state.profileId=jt.pipe(t,Bt.chain((t=>Bt.fromNullable(function(t,n){if("string"!=typeof t)throw new Ot("Invalid token specified");var e=!0===(n=n||{}).header?0:1;try{return JSON.parse(Rt(t.split(".")[e]))}catch(t){throw new Ot("Invalid token specified: "+t.message)}}(t).sub))))}))}get state(){return this._state}get onChange(){return this._onChange}get superBuyer(){if(Bt.isNone(this._state.superBuyer))throw Error("User information is not set");return this._state.superBuyer.value}get apiBaseUrl(){if(Bt.isNone(this._state.apiBaseUrl))throw Error("API base URL is not set");return this._state.apiBaseUrl.value}get appBaseUrl(){if(Bt.isNone(this._state.appBaseUrl))throw Error("App base URL is not set");return this._state.appBaseUrl.value}get promotedFunds(){if(Bt.isNone(this._state.promotedFunds))throw Error("Promoted Funds is not set");return this._state.promotedFunds.value}get profileId(){if(Bt.isNone(this._state.profileId))throw Error("Failed to get Profile ID from JWT");return this._state.profileId.value}get defaultFundUsi(){return jt.pipe(this._state.accountConfiguration,Bt.map((t=>Bt.fromNullable(t.defaultFundUsi))),Bt.flatten)}get accountIdOrDefault(){return jt.pipe(this._state.accountConfiguration,Bt.map((t=>t.accountId)),Bt.getOrElse((()=>"")))}get partnerIdOrDefault(){return jt.pipe(this._state.superBuyer,Bt.map((t=>t.partnerId)),Bt.getOrElse((()=>"")))}get jwt(){if(Bt.isNone(this._state.jwt))throw Error("No authentication information was found");return this._state.jwt.value}get showSmsfNotSupported(){return jt.pipe(this._state.superBuyer,Bt.map((t=>t.showSmsfNotSupported)),Bt.getOrElse((()=>!1)))}completeSuperSelectionFlow(){this._state.hasSuccessPageBeenAcknowledged=!0}markSuperSelectionAsSubmitted(){this._state.hasSuperSelectionBeenSubmitted=!0}async loadAppStateAsync(){const t=await Dt.getAppStateAsync();this._state.accountConfiguration=Bt.fromNullable(t.accountConfiguration),this._state.superBuyer=Bt.fromNullable(t.superBuyer),this._state.promotedFunds=Bt.fromNullable(t.promotedFunds)}};function qt(){const t=Ut.jwt,n=Ut.profileId,e=Ut.accountIdOrDefault,i=Ut.partnerIdOrDefault;return Ft(Ut.apiBaseUrl).headers({Authorization:"Bearer "+t,"X-PROFILE-ID":n,"X-PARTNER-ID":i,"X-ACCOUNT-ID":e})}class Vt{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(t){return qt().url("analytics-events").post(t).res()}}class zt{constructor(){this.eventTrackingApi=Vt.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackFinancialProductViewedAsync(t){return this.trackEventAsync({FinancialProductViewed:t})}async TrackSuperFundPdsViewedAsync(t){return this.trackEventAsync({SuperFundPdsViewed:t})}async TrackFinancialProductAcceptedAsync(t){return this.trackEventAsync({FinancialProductAccepted:t})}async TrackFinancialProductRejectedAsync(t){return this.trackEventAsync({FinancialProductRejected:t})}async TrackSuperFundPrivacyConfirmationAcceptedAsync(t){return this.trackEventAsync({SuperFundPrivacyConfirmationAccepted:t})}async TrackPromotedSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:t}})}async TrackMyOwnSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:t}})}async TrackSmsfSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{Smsf:t}})}async TrackDefaultSuperFundDetailViewedAsync(t){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:t}})}async TrackSuperFundPanelViewedAsync(t){return this.trackEventAsync({SuperFundPanelViewed:t})}async TrackSuperFundNominationViewedAsync(t){return this.trackEventAsync({SuperFundNominationViewed:t})}async TrackSuperFundNominationDeclinedAsync(t){return this.trackEventAsync({SuperFundNominationDeclined:t})}async TrackSuperFundDisclaimerViewedAsync(t){return this.trackEventAsync({SuperFundDisclaimerViewed:t})}async TrackSuperFundDisclaimerAcceptedAsync(t){return this.trackEventAsync({SuperFundDisclaimerAccepted:t})}async trackEventAsync(t){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:t})}catch(t){return}}}function Ht(t,n){void 0===n&&(n="*"),t.sender="flare",window.parent.postMessage(t,n)}const Wt=function(){Ht({type:"appReady"})},$t=function(t,n){Ht({type:"contentResized",height:t,width:n})},Xt=function(t){Ht({type:"pageNavigated",url:t})},Jt=function(){Ht({type:"complete"})},Yt=function(){Ht({type:"submitSuccess"})},{state:Gt}=Tt({handleSubmitFn:async function(){},fundName:"",promotedFundId:void 0});var Kt;!function(t){t.ConsentPage="/consent",t.ExistingChoicePage="/existing",t.ChoicePage="/",t.SlateJoin="/slate/join/",t.PromotedFundJoinV1="/promoted-fund/join/v1",t.PromotedFundJoinV2="/promoted-fund/join/v2",t.MyOwnFund="/super-choice/my-own-fund/",t.SelfManagedFund="/super-choice/smsf/",t.DefaultFund="/super-choice/default/",t.StandardChoice="/standard-choice/",t.Success="/success/"}(Kt||(Kt={}));const Qt=[n("stencil-route",{url:Kt.ConsentPage,component:"sss-consent-page"}),n("stencil-route",{url:Kt.ExistingChoicePage,component:"sss-existing-choice-page"}),n("stencil-route",{exact:!0,url:Kt.ChoicePage,component:"sss-super-choice-page"}),n("stencil-route",{url:Kt.SlateJoin,component:"sss-slate-join-page"}),n("stencil-route",{url:Kt.PromotedFundJoinV1,component:"sss-promoted-fund-join-v1-page"}),n("stencil-route",{url:Kt.PromotedFundJoinV2,component:"sss-promoted-fund-join-v2-page"}),n("stencil-route",{url:Kt.MyOwnFund,component:"sss-my-own-fund"}),n("stencil-route",{url:Kt.SelfManagedFund,component:"sss-self-managed-fund"}),n("stencil-route",{url:Kt.DefaultFund,component:"sss-default-fund"}),n("stencil-route",{url:Kt.StandardChoice,component:"sss-standard-choice-form"}),n("stencil-route",{url:Kt.Success,component:"sss-success"})],Zt=new class{navigateInternally(t,n){const e=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(n)}`;Xt(e),t.push(e)}navigateInternallyToStandardChoice(t){Gt.handleSubmitFn=t.handleSubmitFn,Gt.fundName=t.fundName,Gt.promotedFundId=t.promotedFundId,this.navigateInternally(t.history,Kt.StandardChoice)}toExternalUrl(t){const n=new URL(t);return n.searchParams.append("_extnav","true"),n.href}get appBaseUrl(){return Ut.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(t){return t.length>0&&"/"===t[0]?t:"/"+t}},tn=class{constructor(n){t(this,n),this.promotedFunds=Ut.promotedFunds,this.eventTrackingService=zt.Instance}componentDidLoad(){return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync({promotedFundsShown:this.promotedFunds})}render(){return n("div",null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center leading-8"},"Important information about super"),n("div",{class:"sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8"},"The choice of superannuation fund is an important personal financial decision. Next, you’ll be asked to nominate a super fund to receive your employer contributions."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg"},n("div",{class:"sm:text-lg font-bold leading-6"},"By clicking “Continue” you acknowledge that:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6"},n("li",null,"Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"),n("li",null,"all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"),n("li",null,"in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"),n("li",null,"if you do choose one of the featured superannuation funds, we and our associates will normally receive a fee for you doing so.")),n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSuperFundDisclaimerAccepted()},"Continue"))))}async handleSuperFundDisclaimerAccepted(){const t={promotedFundsShown:this.promotedFunds};await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync(t),Zt.navigateInternally(this.history,Kt.ChoicePage)}};var nn;!function(t){t.MyOwnFund="Your current super fund",t.DefaultFund="Your employer's default fund",t.SelfManagedFund="Your self-managed super fund"}(nn||(nn={}));const en={continueAllowed:!1,nextRoute:"/",myOwnFundForm:{fundUsi:q,fundName:q,memberNumber:q},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:""},currentCustomFundType:nn.MyOwnFund,customFunds:[{label:nn.MyOwnFund,value:Kt.MyOwnFund},{label:nn.SelfManagedFund,value:Kt.SelfManagedFund},{label:nn.DefaultFund,value:Kt.DefaultFund}]},{state:rn}=Tt(en),sn=rn.customFunds,on=class{constructor(n){t(this,n),this.currentCustomFund=sn[0],this.fundOptionsList=sn,this.showFundOptionsSelection=!1}componentWillLoad(){let t="";window.location.pathname.includes(Kt.MyOwnFund)&&(t=Kt.MyOwnFund),window.location.pathname.includes(Kt.DefaultFund)&&(t=Kt.DefaultFund),window.location.pathname.includes(Kt.SelfManagedFund)&&(t=Kt.SelfManagedFund),this.currentCustomFund=sn.find((n=>n.value===t))||sn[0],Zt.navigateInternally(this.history,t)}render(){const t=()=>n("svg",{class:"h-5 w-5 fill-primary-base",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},n("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 n("div",{class:"max-w-560 relative"},n("label",{class:"font-medium text-gray-700 text-sm"},"Which fund would you like to nominate?"),n("div",{class:"mt-1 mb-4"},n("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-sm",onClick:()=>this.showFundOptionsSelection=!this.showFundOptionsSelection},n("span",{class:{"block truncate":!0,"text-gray-500":this.showFundOptionsSelection}},this.showFundOptionsSelection?"Select":this.currentCustomFund.label),n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},n((()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-500",viewBox:"0 0 20 20"},n("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&&n("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-sm"},this.fundOptionsList.map((e=>n("li",{class:"text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 hover:bg-primary-hover",onClick:()=>{this.showFundOptionsSelection=!this.showFundOptionsSelection,Zt.navigateInternally(this.history,e.value)}},n("span",{class:{"block truncate":!0,"font-semibold":this.currentCustomFund===e}},e.label),this.currentCustomFund===e&&n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-4"},n(t,null))))))),n("div",{onClick:()=>this.showFundOptionsSelection=!1},n("slot",null)))}};H(on);const an=new class{searchFundsAsync(t,n){return Dt.getAustralianFundsAsync({type:"partialMatch",searchString:t,maxRecordCount:n})}async getActiveFundByUsiAsync(t){const n=await Dt.getAustralianFundsAsync({type:"usiMatch",usi:t});return 1===n.length?Bt.some(n[0]):Bt.none}async getFundByUsiAsync(t){const n=await Dt.getAustralianFundsAsync({type:"usiMatch",usi:t},!0);return 1===n.length?Bt.some(n[0]):Bt.none}},un=new class{async submitDefaultFundChoiceAsync(t){return qt().url("super-choice/default").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(t){return qt().url("super-choice/custom-fund").post(t).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(t){return qt().url("super-choice/smsf").post(t).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}},cn=class{constructor(n){t(this,n),this.defaultFundProductName="Loading fund...",this.eventTrackingService=zt.Instance}async componentWillLoad(){const t=Ut.defaultFundUsi;if(Bt.isNone(t))return;this.isDefaultFundExists=!0;const n=await an.getActiveFundByUsiAsync(t.value);Bt.isNone(n)?this.isInvalidDefaultFund=!0:(this.defaultFund=n.value,this.defaultFundProductName=n.value.productName)}componentDidLoad(){var t,n,e,i;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:null!==(n=null===(t=this.defaultFund)||void 0===t?void 0:t.usi)&&void 0!==n?n:"",fundName:null!==(i=null===(e=this.defaultFund)||void 0===e?void 0:e.productName)&&void 0!==i?i:"",promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg"},n("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},n("span",null,this.isDefaultFundExists&&!this.isInvalidDefaultFund?"By choosing to join your employer’s default super fund, you acknowledge that your application to join is subject to Trustee approval.":"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s defaut fund.")))),this.isDefaultFundExists&&!this.isInvalidDefaultFund&&n("div",null,n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund Name"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.defaultFundProductName)),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.defaultFund.usi)))),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},this.isDefaultFundExists&&!this.isInvalidDefaultFund&&n("div",{class:"mb-4"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm()},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back")))))))}async handleSubmitForm(){this.isInvalidDefaultFund||Zt.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",handleSubmitFn:async t=>{await un.submitDefaultFundChoiceAsync({standardChoiceFormSignature:t})}})}},ln=class{constructor(e){t(this,e),this.valueChanged=o(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 n;return this.isDropdownVisible&&(null==t?void 0:t.length)>=this.minSearchStringLength&&(null===(n=this.selectedOption)||void 0===n?void 0:n.label)!==t},this.onBeginSearch=t=>{this.inputValue=t,this.searchState="in progress"},this.onCompleteSearch=t=>{this.filteredOptions=t,this.highlightedOptionIndex=void 0,this.searchState="done"},this.renderFilteredResults=()=>"pristine"===this.searchState?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Start typing to find the results"):"in progress"===this.searchState?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Searching..."):0===this.filteredOptions.length?n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"No items match your search"):this.filteredOptions.map((t=>n("div",{class:{"cursor-pointer text-wrap hover:bg-primary-hover py-1.5 pl-4":!0,"bg-primary-base":this.isOptionSelected(t)},onClick:()=>{this.toggleDropdown(!1),this.selectOption(t)}},t.label))),this.resetInput=()=>{var t,n;this.inputValue=null!==(n=null===(t=this.selectedOption)||void 0===t?void 0:t.label)&&void 0!==n?n:""},this.toggleDropdown=t=>{this.isDropdownVisible=t},this.processKeyboardNavigation=t=>{switch(t.key){case"ArrowDown":return this.toggleDropdown(!0),this.highlightNextItem(),!0;case"ArrowUp":return this.highlightPreviousItem(),!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.highlightPreviousItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.max(this.highlightedOptionIndex-1,0))},this.highlightNextItem=()=>{0!==this.filteredOptions.length&&(this.highlightedOptionIndex=void 0===this.highlightedOptionIndex?0:Math.min(this.highlightedOptionIndex+1,this.filteredOptions.length-1))},this.selectOption=t=>{this.selectedOption=t,this.inputValue=t.label,this.valueChanged.emit(t)},this.isOptionSelected=t=>{var n;return(null===(n=this.selectedOption)||void 0===n?void 0:n.label)===t.label}}componentWillLoad(){this.selectedOption=this.value}componentDidLoad(){this.searchResultsSubscription=E(this.inputElement,"keyup").pipe(function(t,n=g){return e=>e.lift(new B(t,n))}(500),f((()=>this.inputElement.value)),x(),k(this.shouldExecuteSearch),R(this.onBeginSearch),M(this._searchFunction),R(this.onCompleteSearch)).subscribe()}disconnectedCallback(){this.searchResultsSubscription.unsubscribe()}handleFocus(){this.toggleDropdown(!0)}handleBlur(){this.isMouseOver||(this.toggleDropdown(!1),this.highlightedOptionIndex=void 0,this.resetInput())}handleKeyDown(t){this.processKeyboardNavigation(t)&&t.preventDefault()}render(){var t;return n(s,null,n("div",{class:"relative"},n("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full 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}),n("div",{class:{"invalid-feedback mt-2 text-sm text-red-600":!0,hidden:!this.isDropdownVisible}},null!==(t=this.requiredValidationMessage)&&void 0!==t?t:"Required."),n("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}};ln.style="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";const dn=[{dtoPropName:"slate",id:"slate"},{dtoPropName:"australianRetirementTrust",id:"australian-retirement-trust"},{dtoPropName:"aware",id:"aware"},{dtoPropName:"active",id:"active"},{dtoPropName:"australianEthical",id:"australian-ethical"},{dtoPropName:"virgin",id:"virgin"}],fn=t=>{switch(t){case"slate":return"Slate Super";case"australian-retirement-trust":return"Australian Retirement Trust";case"aware":return"Aware Super";case"active":return"Active Super";case"australian-ethical":return"Australian Ethical";case"virgin":return"Virgin Money Super";default:return}},hn=t=>{switch(t){case"slate":return"32367272075001";default:return}},pn=t=>{let n="";switch(t){case"slate":n="logo-slate.png";break;case"australian-retirement-trust":n="logo-art.svg";break;case"aware":n="logo-aware.svg";break;case"active":n="logo-active.svg";break;case"australian-ethical":case"virgin":n="logo-slate.png";break;default:return}if(""!==n)return r("assets/"+n)};const mn=new class{async GetExistingFundAsync(){var t,n;const e=Ut.superBuyer.superChoice,i=null===(t=Ut.superBuyer.superChoice)||void 0===t?void 0:t.choiceDetails;if(!e)return q;if(!i)return q;const r=null==e.dateSubmitted?q:V(new Date(e.dateSubmitted)),s="promoted"in(a=i)?function(t){return"slate"in t?q:"australianRetirementTrust"in t?V(t.australianRetirementTrust.usi):"aware"in t?V(t.aware.usi):"active"in t?V(t.active.usi):"australianEthical"in t?V(t.australianEthical.usi):"virgin"in t?V(t.virgin.usi):q}(a.promoted):"myOwnFund"in a?V(a.myOwnFund.usi):"smsf"in a?q:"default"in a?V(a.default.usi):q,o=function(t){return"promoted"in t?function(t){return"slate"in t?V(t.slate.memberNumber):"australianRetirementTrust"in t?V(t.australianRetirementTrust.memberNumber):"aware"in t?V(t.aware.memberNumber):"active"in t?V(t.active.memberNumber):"australianEthical"in t?V(t.australianEthical.memberNumber):"virgin"in t?V(t.virgin.memberNumber):q}(t.promoted):"myOwnFund"in t?V(t.myOwnFund.memberNumber):q}(i);var a;if("promoted"in i){const t=dn.find((t=>t.dtoPropName in i.promoted));return null==(null==t?void 0:t.id)?q:V({type:"Promoted Fund",id:t.id,name:null!==(n=fn(t.id))&&void 0!==n?n:"",usi:s,valid:"Active",memberNumber:o,lastNominatedAt:r})}if("smsf"in i)return V({type:"Self Managed Fund",name:i.smsf.fundName,valid:"Unknown",lastNominatedAt:r});if("myOwnFund"in i){const t=i.myOwnFund.usi,n=await this.getFundByUsiAsync(t);return V({type:"My Own Fund",name:L(n)?n.value.productName:t,usi:s,valid:this.toFundValidState(n),memberNumber:o,lastNominatedAt:r})}if("default"in i){const t=i.default.usi,n=await this.getFundByUsiAsync(t);return V({type:"Default Fund",name:L(n)?n.value.productName:t,usi:s,valid:this.toFundValidState(n),lastNominatedAt:r})}return q}async submitRetainSuperFundAsync(t){return qt().url("super-choice/retain-super-fund").post(t).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}getFundByUsiAsync(t){return an.getFundByUsiAsync(t)}toFundValidState(t){return L(t)?t.value.isActive?"Active":"Inactive":"Unknown"}};class vn{static isNewComplianceEnabled(){return["PARTNER-TEST-FLARE","962e142f-df98-460e-92ed-2c4e24149c91","8ad88c67-d446-4c30-8321-f896e1b7643b","d1bfe1c5-0cf4-46e3-9ecb-69a0aec86256","973c7953-a607-48b6-9bf9-9266ffd9c25c","cf602138-c843-4c4a-a407-635ba0bf9612","4257a264-863e-4e03-8b07-b9c0328c0557","df9b837f-7f38-41ff-9073-9265106eb231","d6855e49-0412-4600-9b66-c61f0dfc25df"].includes(Ut.partnerIdOrDefault)}}const wn=class{constructor(n){t(this,n),this.eventTrackingService=zt.Instance,this.createSuperFundNominationDetail=t=>{function n(t){return L(t)?t.value:void 0}return{fundType:t.type.toString(),fundName:t.name,fundUsi:function(t){return"usi"in t?n(t.usi):void 0}(t),memberNumber:function(t){return"memberNumber"in t?n(t.memberNumber):void 0}(t),fundStatus:t.valid.toString(),lastNominatedAt:L(t.lastNominatedAt)?t.lastNominatedAt.value.toISOString():""}}}componentDidLoad(){const t=this.createSuperFundNominationDetail(this.existingFund);return this.eventTrackingService.TrackSuperFundNominationViewedAsync(t)}async componentWillLoad(){const t=await mn.GetExistingFundAsync();L(t)&&"Inactive"!==t.value.valid?this.existingFund=t.value:Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}render(){const t=t=>n("div",{class:"flex justify-center mt-6"},n("img",{class:"h-16 w-auto",alt:fn(t.id),src:pn(t.id)})),e=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},n("path",{d:"M196.6 97.83C184.1 93.41 177.6 79.7 182 67.2C195.8 28.08 233.1 0 277.1 0C320.1 0 358.3 28.08 372.1 67.2C376.5 79.7 369.1 93.41 357.5 97.83C344.1 102.2 331.3 95.7 326.9 83.2C319.6 62.66 300 48 277.1 48C254.1 48 234.5 62.66 227.3 83.2C222.8 95.7 209.1 102.2 196.6 97.83H196.6zM400 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 264zM224 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.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 384H512C499.1 401.2 482.7 415.8 464 426.6V464C464 490.5 442.5 512 416 512H368C341.5 512 320 490.5 320 464V448H272V464C272 490.5 250.5 512 224 512H176C149.5 512 128 490.5 128 464V416C90.98 388.2 66.42 344.7 64.17 295.4C27.99 290.9 0 259.1 0 222.6C0 194.7 15.72 169.3 40.6 156.9L45.27 154.5C57.12 148.6 71.54 153.4 77.47 165.3C83.39 177.1 78.59 191.5 66.73 197.5L62.06 199.8C53.44 204.1 48 212.9 48 222.6C48 235.1 57.13 245.6 69.13 247.6C87.02 178.8 149.6 128 224 128V128zM224 176C162.1 176 112 226.1 112 288C112 324.6 129.5 357.1 156.8 377.6C168.9 386.7 176 400.9 176 416V464H224V448C224 421.5 245.5 400 272 400H320C346.5 400 368 421.5 368 448V464H416V426.6C416 409.5 425.1 393.6 439.1 385C453.1 377.5 464.6 367.3 473.6 355.2C482.7 343.1 496.9 336 512 336H528V271.9C510 270.9 493.1 259.9 486.7 243.2C478.9 225.4 466.6 209.1 451.2 198.4C435.7 186.8 428.8 167.1 433.4 148.3L434 146.1C425.5 148.6 418 153.5 412.2 160C403.1 170.2 390.1 176 376.4 176H224z"})))),i=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",class:"fill-primary-base"},n("path",{d:"M250.8 192h13.25v40C264 245.2 274.8 256 288 256s24.02-10.8 24.02-23.1V192h13.25c85.39 0 154.8-75.38 154.8-168c0-13.25-10.75-24-24-24H418.8c-55.26 0-103.4 31.75-130.8 79C260.7 31.75 212.5 0 157.3 0H120C106.8 0 96.01 10.75 96.01 23.1C96.01 116.6 165.4 192 250.8 192zM418.8 48h11.13c-9.876 54.75-53.01 96-104.5 96h-11.13C324.2 89.25 367.3 48 418.8 48zM157.3 48c51.51 0 94.64 41.25 104.5 96H250.7c-51.51 0-94.64-41.25-104.5-96H157.3zM551.1 312c-31.13-26.38-69.26-16.12-88.39-1.75l-60.38 45.5h-3.375c-.1251-38-30.5-67.88-69.13-67.88H186.7c-28.38 0-56.38 9.375-78.51 26.37L79.76 336H24C10.8 336 0 346.8 0 359.1S10.8 384 24 384l72-.0244l41.26-31.48C151.3 341.8 168.8 336 186.8 336h144c27.88 0 29 40.25-1.125 40.25h-59.88c-7.501 0-13.75 6.125-13.75 13.75c0 7.625 6.251 13.87 13.75 13.87h134.6c9.711 0 19.16-3.159 26.92-9l61.26-46.12c8.251-6.125 20.5-6.625 28.38 0c10.13 8.5 9.376 23.12-.8751 30.75l-100.6 75.5C411.7 460.8 402.3 464 392.6 464H24C10.8 464 0 474.8 0 487.1S10.8 512 24 512h368.8c20 0 39.38-6.5 55.26-18.5l100.8-75.88c16.63-12.5 26.5-31.5 27.13-52C576.7 345.1 567.8 325.5 551.1 312z"})))),r=()=>n("div",{class:"flex h-20 justify-center items-center relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute "},n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",class:"fill-primary-base"},n("path",{d:"M448 96h-64V64c0-35.35-28.65-64-64-64H192C156.7 0 128 28.65 128 64v32H64C28.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 96zM192 48h128c8.837 0 16 7.163 16 16v32h-160V64C176 55.16 183.2 48 192 48zM64 144h384c8.8 0 16 7.2 16 16v96h-416V160C48 151.2 55.2 144 64 144zM448 432H64c-8.8 0-16-7.2-16-16V304H192V320c0 17.67 14.33 32 32 32h64c17.67 0 32-14.33 32-32V304h144V416C464 424.8 456.8 432 448 432z"}))));return n("div",null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Your super choice"),n("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."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"max-w-400 w-full"},n("div",{class:"flex-col border shadow-sm p-6 rounded-lg text-center space-y-4"},(()=>{switch(this.existingFund.type){case"Promoted Fund":return n(t,{id:this.existingFund.id});case"Self Managed Fund":return n(i,null);case"My Own Fund":return n(e,null);case"Default Fund":return n(r,null)}})(),n("div",{class:"sm:text-lg font-bold leading-6"},this.existingFund.name),n("div",{class:"mt-8"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleFundNominationAccepted()},"Continue with this fund"))),n("div",{class:"mt-4"},n("sss-button",{fillWidth:!0,variant:"secondary",promiseFn:()=>this.handleFundNominationDeclined()},"Choose another fund")))))}async handleFundNominationAccepted(){const t=this.createSuperFundNominationDetail(this.existingFund);await mn.submitRetainSuperFundAsync(t),Ut.markSuperSelectionAsSubmitted()}async handleFundNominationDeclined(){const t=this.createSuperFundNominationDetail(this.existingFund);await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(t),Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}},yn=class{constructor(n){t(this,n)}render(){return n("div",{class:"text-center text-gray-500 text-xs mt-8 sm:mt-20 w-full max-w-960 mx-auto"},n("span",null,"Powered by Flare"),n("p",{class:"block text-transparent"},"v","3.64.64582"),!vn.isNewComplianceEnabled()&&n("p",{class:"mt-4"},"This page contains factual information only and does not take into account your particular objectives, financial circumstances or needs. If you have questions or need help making a decision about your super fund, you should speak to a licensed financial advice provider. You should consider the relevant super fund's PDS and TMD (if applicable) in deciding whether to apply to join the super fund. Each of the advertised fund's PDS and TMD (if applicable) can be found in their advertisements above. If you are considering joining another fund you can find the PDS and TMD on the fund's website. Your employer and Flare do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the advertised superannuation funds. Flare do not endorse or accept responsibility for any of their content shown about any of the advertised superannuation funds as they are merely passing on the content as provided without any changes. Flare do not express any opinion or make any recommendation about any of the advertised funds."))}},gn=class{constructor(n){t(this,n)}render(){return n("div",{class:"flex justify-center"},n("div",{class:"text-center max-w-800"},n("h3",{class:"font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl"},"Nominate a super fund"),vn.isNewComplianceEnabled()&&n(a,null,n("div",{class:"text-gray-600 sm:text-lg leading-7 sm:leading-8"},"You can choose any super fund, including your current fund/SMSF, your employer’s default fund, or alternatively, you can select from one of the featured funds."),n("div",{class:"inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal"},n("stencil-route-link",{url:Kt.ChoicePage},n("button",{type:"button",class:{"py-2 text-sm font-medium w-auto px-3 sm:px-8 rounded-md h-full":!0,"bg-white border-gray-200 text-gray-900 shadow-sm":"choice"===this.currentPage,"border border-transparent text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-focus focus:z-10 hover:bg-primary-hover":"choice"!==this.currentPage}},"Featured super funds")),n("stencil-route-link",{url:Kt.MyOwnFund},n("button",{type:"button",class:{"ml-0.5 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full":!0,"bg-white border-gray-200 text-gray-900 shadow-sm":"own-fund"===this.currentPage,"border border-transparent text-gray-700 focus:outline-none focus:ring-2 focus:ring-primary-focus focus:z-10 hover:bg-primary-hover":"own-fund"!==this.currentPage}},"Choose another fund"))))))}},bn=class{constructor(n){t(this,n)}componentDidLoad(){this.build(this.iframeElement)}render(){return n("div",{class:"w-screen"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:t=>this.iframeElement=t}))}},xn=class{constructor(n){t(this,n),this.theme="primary",this.size=48}render(){return n("div",{class:"inline-block animate-spin"},n("svg",{width:this.size,height:this.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n("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"}),n("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"})))}},kn=class{constructor(n){t(this,n)}render(){return n(s,{class:"flex flex-col justify-center items-center"},n("h5",{class:"text-lg"},"Loading your superannuation step"),n("sss-loading-indicator",null))}},Sn=class{constructor(n){t(this,n),this.isNotAllInformationProvidedMessageVisible=!1,this.isSubmitDisabled=!0,this.eventTrackingService=zt.Instance}componentDidLoad(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t,onInput:()=>this.isSubmitDisabled=!this.formElement.checkValidity()},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg"},n("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-2"},n("ul",{class:"list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5"},n("li",null,"Make sure you are a current member of the fund before completing this step."),n("li",null,"Please check that the fund USI is correct as some funds have similar names."))))),n("sss-my-own-fund-inputs",{myOwnFundForm:rn.myOwnFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{rn.myOwnFundForm=Object.assign(Object.assign({},rn.myOwnFundForm),t.detail),this.isNotAllInformationProvidedMessageVisible=!1}}),this.isNotAllInformationProvidedMessageVisible&&n("div",{class:"mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700"},"All fields are required to complete submission. Make sure you have selected a fund.")),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},n("div",{class:"mb-4"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back"))))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(L(rn.myOwnFundForm.fundUsi)&&L(rn.myOwnFundForm.memberNumber)?Zt.navigateInternallyToStandardChoice({history:this.history,fundName:this.getOrError(rn.myOwnFundForm.fundName),handleSubmitFn:async t=>{const n={fundUsi:this.getOrError(rn.myOwnFundForm.fundUsi),memberNumber:this.getOrError(rn.myOwnFundForm.memberNumber),standardChoiceFormSignature:t};await un.submitCustomFundChoiceAsync(n)}}):this.isNotAllInformationProvidedMessageVisible=!0)}getOrError(t){return jt.pipe(t,(n=()=>{throw new Error("Option value is none.")},function(t){return U(t)?n():t.value}));var n}};H(Sn);const Cn=class{constructor(n){t(this,n),this.formChanged=o(this,"formChanged",7),this.MIN_SEARCH_STRING_LENGTH=3,this.MAX_RECORD_COUNT=10,this.searchFundsAsync=async t=>(await an.searchFundsAsync(t,this.MAX_RECORD_COUNT)).sort(((t,n)=>t.productName.localeCompare(n.productName))).map((t=>({label:`${t.productName} (${t.usi})`,value:t.usi})))}render(){return n("div",null,n("div",null,n("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),n("div",{class:"mt-1"},n("sss-dropdown-async",{searchFunction:this.searchFundsAsync,minSearchStringLength:this.MIN_SEARCH_STRING_LENGTH,required:!0,requiredValidationMessage:"Select a fund",placeholder:"Type to search by name or USI...",value:this.selectedOption,onValueChanged:t=>{this.selectedOption=t.detail,this.updateFund(t.detail)},showValidationErrors:this.showValidationErrors})),L(this.myOwnFundForm.fundUsi)&&n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.myOwnFundForm.fundUsi.value))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Member number"),n("div",{class:"mt-1"},n("input",{type:"text",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md":!0,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},required:!0,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:(t=rn.myOwnFundForm.memberNumber,U(t)?void 0:t.value),onChange:t=>this.updateMemberNumber(t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid member number (only numbers and / or letters)"))));var t}updateFund(t){this.formChanged.emit({fundUsi:V(t.value),fundName:V(t.label)})}updateMemberNumber(t){this.formChanged.emit({memberNumber:V(t)})}},An=new class{async submitChoiceAsync(t){return qt().url("super-choice/promoted-fund").post(t).badRequest((()=>{throw new Error("Failed to process Promoted Fund choice request")})).text()}},{state:_n}=Tt({fundId:""}),Fn=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.environmentDiscriminator=()=>this.hostIsLocalSuperSelection()?"autodev-partner":window.location.hostname.toLowerCase().split(".")[0],this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ut.partnerIdOrDefault,accountId:Ut.accountIdOrDefault,fundId:_n.fundId,authToken:Ut.jwt}),i=e=>{var r;const{data:s}=e;if(s)if("promoted-fund-redirect"!==s.sender){if("promoted-fund-join"===s.sender)switch(s.type){case"contentResized":t.height=s.height>0?s.height:t.height,t.width=s.width>0?s.width:t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Xt(window.location.href)}}else switch(window.removeEventListener("message",i),s.type){case"cancel":Zt.navigateInternally(n,Kt.ChoicePage);break;case"success":if(s.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:null!==(r=fn(_n.fundId))&&void 0!==r?r:"",handleSubmitFn:t=>An.submitChoiceAsync(Object.assign(Object.assign({},_n),{memberNumber:s.memberNumber,usi:s.usi.replace(/ /g,""),standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds})),promotedFundId:_n.fundId});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let o;for(o in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),e){const t=e[o];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=o,n.value=t,s.append(n)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,n;const e=Ut.superBuyer;return{title:e.userProfile.title,firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:e.userProfile.gender,email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}},Mn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>Fn.build(t,this.history)})}},In=new class{constructor(){this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.promotedFundJoinAppUrl=()=>`https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=Object.assign(Object.assign({},this.getMemberData()),{partnerId:Ut.partnerIdOrDefault,accountId:Ut.accountIdOrDefault,fundId:_n.fundId,authToken:Ut.jwt}),i=e=>{var r;const{data:s}=e;if(s)if("promoted-fund-redirect"!==s.sender){if("promoted-fund-join"===s.sender)switch(s.type){case"contentResized":t.height=s.height>0?s.height:t.height,t.width=s.width>0?s.width:t.width;break;case"pageNavigated":window.scroll(t.offsetLeft,t.offsetTop),Xt(window.location.href)}}else switch(window.removeEventListener("message",i),s.type){case"cancel":Zt.navigateInternally(n,Kt.ChoicePage);break;case"success":if(s.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:null!==(r=fn(_n.fundId))&&void 0!==r?r:"",handleSubmitFn:t=>An.submitChoiceAsync(Object.assign(Object.assign({},_n),{memberNumber:s.memberNumber,usi:s.usi.replace(/ /g,""),standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds})),promotedFundId:_n.fundId});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",i);const r=t.contentDocument;r.open();const s=r.createElement("form");let o;for(o in s.method="POST",s.target="_self",s.action=this.promotedFundJoinAppUrl(),e){const t=e[o];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=o,n.value=t,s.append(n)}}r.appendChild(s),r.close(),s.submit()}getMemberData(){var t,n;const e=Ut.superBuyer;return{title:e.userProfile.title,firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:e.userProfile.gender,email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}},Tn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>In.build(t,this.history)})}};function En(t){const n=t.split("").map(Number),e=n.every((t=>!isNaN(t))),i=[10,1,3,5,7,9,11,13,15,17,19];return!(!e||n.length!==i.length)&&(n[0]--,n.reduce(((t,n,e)=>t+n*i[e]),0)%89==0)}const jn=class{constructor(n){t(this,n),this.showSmsfNotSupported=!1,this.isSubmitDisabled=!0,this.isAbnValid=En(rn.selfManagedFundForm.fundAbn),this.eventTrackingService=zt.Instance,this.success=()=>{Zt.navigateInternallyToStandardChoice({history:this.history,fundName:"Self-managed super fund",handleSubmitFn:async t=>{const n={smsfChoice:{abn:rn.selfManagedFundForm.fundAbn,fundName:rn.selfManagedFundForm.fundName,fundAddress:{addressLine1:rn.selfManagedFundForm.addressLine1,addressLine2:rn.selfManagedFundForm.addressLine2,city:rn.selfManagedFundForm.city,state:rn.selfManagedFundForm.state,postcode:rn.selfManagedFundForm.postcode},bsb:rn.selfManagedFundForm.bsb,bankAccountName:rn.selfManagedFundForm.bankAccountName,bankAccountNumber:rn.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:rn.selfManagedFundForm.fundEsa},standardChoiceFormSignature:t};await un.submitSelfManagedFundChoiceAsync(n)}})}}componentDidLoad(){return this.updateIsSubmitDisabled(),this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:Ut.promotedFunds})}render(){return n(s,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:!0,onSubmit:t=>t.preventDefault(),class:{"was-validated":"validated"===this.formState},ref:t=>this.formElement=t},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg max-w-560"},n("p",{class:"sm:text-lg font-bold"},"Fund details"),n("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-exclamation.svg")})),n("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},"Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))),n("sss-self-managed-fund-inputs",{fundForm:rn.selfManagedFundForm,showValidationErrors:"validated"===this.formState,onFormChanged:t=>{rn.selfManagedFundForm=Object.assign(Object.assign({},rn.selfManagedFundForm),t.detail),void 0!==t.detail.isAbnValid&&(this.isAbnValid=t.detail.isAbnValid),this.updateIsSubmitDisabled()}})),n("div",{class:"flex justify-center mt-8"},n("div",{class:"sm:max-w-320 w-full"},n("div",{class:"mb-4",onClick:()=>this.formState="validated"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{fillWidth:!0,variant:"secondary"},"Back")))),this.showSmsfNotSupported&&n("sss-smsf-not-supported-dialog",{ref:t=>this.notSupportedDialog=t,onContinue:this.success})))))}componentDidRender(){var t;this.showSmsfNotSupported&&(null===(t=this.notSupportedDialog)||void 0===t||t.scrollIntoView())}updateIsSubmitDisabled(){this.isSubmitDisabled=!this.formElement.checkValidity()||!this.isAbnValid}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(Ut.showSmsfNotSupported?this.showSmsfNotSupported=!0:this.success())}};H(jn);const Bn={"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"},Nn=class{constructor(n){t(this,n),this.formChanged=o(this,"formChanged",7),this.isAbnValid=!1,this.isAbnTouched=!1,this.currentBank=q,this.addressErrorMessage=q,this.stateOptions=[{value:"NSW",label:"NSW"},{value:"QLD",label:"QLD"},{value:"ACT",label:"ACT"},{value:"VIC",label:"VIC"},{value:"TAS",label:"TAS"},{value:"WA",label:"WA"},{value:"SA",label:"SA"},{value:"NT",label:"NT"}],this.bsbRegex=new RegExp(/^[0-9]{3}[0-9]{3}$/),this.bankAccountNumberRegex=new RegExp(/^[0-9]{2,10}$/)}render(){const t={"relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md focus:z-10":!0,"invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors};return n("div",null,n("div",null,n("label",{class:"text-sm font-medium text-gray-700"},"Fund name"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundName",id:"fundName",value:rn.selfManagedFundForm.fundName,onChange:t=>this.updateFormField("fundName",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund name"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund ABN"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundAbn",id:"fundAbn",value:rn.selfManagedFundForm.fundAbn,inputmode:"numeric",pattern:"[0-9]*",onKeyUp:t=>{this.updateFormField("fundAbn",t.target.value.trim()),this.isAbnValid=En(t.target.value),this.updateFormField("isAbnValid",this.isAbnValid)},onBlur:()=>this.isAbnTouched=!0}),(this.isAbnTouched||this.showValidationErrors)&&!this.isAbnValid&&n("div",{class:"mt-2 text-sm text-red-600"},"Enter a valid fund ABN (digits only)"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Electronic service address alias (ESA)"),n("div",{class:"mt-1"},n("input",{type:"text",class:t,required:!0,minlength:"2",name:"fundEsa",id:"fundEsa",value:rn.selfManagedFundForm.fundEsa,onChange:t=>this.updateFormField("fundEsa",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid fund ESA"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Fund address"),n("div",{class:"mt-1 rounded-md shadow-sm -space-y-px"},n("input",{placeholder:"Address line 1",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none rounded-t-md shadow-none":!0}),required:!0,minlength:"2",name:"addressLine1",id:"addressLine1",value:rn.selfManagedFundForm.addressLine1,onChange:t=>{this.updateFormField("addressLine1",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.addressLine1Element=t}),n("input",{placeholder:"Address line 2 (optional)",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"addressLine2",id:"addressLine2",value:rn.selfManagedFundForm.addressLine2,onChange:t=>this.updateFormField("addressLine2",t.target.value.trim())}),n("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":!0}),name:"city",required:!0,id:"city",value:rn.selfManagedFundForm.city,onChange:t=>{this.updateFormField("city",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.cityElement=t}),n("div",{class:"flex -space-x-px"},n("div",{class:"w-1/2 flex-1 min-w-0"},n("input",{placeholder:"Postcode",type:"text",required:!0,class:Object.assign(Object.assign({},t),{"rounded-none rounded-bl-md shadow-none":!0}),name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:rn.selfManagedFundForm.postcode,inputmode:"numeric",onChange:t=>{this.updateFormField("postcode",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.postcodeElement=t})),n("div",{class:"flex-1 min-w-0"},n("select",{class:Object.assign(Object.assign({},t),{"rounded-none rounded-br-md shadow-none":!0,"text-gray-500":void 0!==this.fundForm.state}),name:"state",required:!0,id:"state",onChange:t=>{this.updateFormField("state",t.target.value.trim()),this.updateAddressErrorMessage()},ref:t=>this.stateElement=t},n("option",{disabled:!0,selected:void 0!==this.fundForm.state,value:""},"State"),this.stateOptions.map((t=>n("option",{value:t.value,selected:this.fundForm.state===t.value},t.label))))))),L(this.addressErrorMessage)&&this.showValidationErrors&&n("div",{class:"mt-2 text-sm text-red-600"},this.addressErrorMessage.value)),n("h3",{class:"text-lg font-bold mt-6"},"Fund bank details"),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Account name"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bankAccountName",minlength:"2",id:"bankAccountName",value:rn.selfManagedFundForm.bankAccountName,onChange:t=>this.updateFormField("bankAccountName",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account name"))),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"BSB"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bsb",id:"bsb",minlength:"6",maxlength:"7",inputmode:"numeric",onKeyUp:t=>this.updateCurrentBank(t),pattern:this.bsbRegex.source,value:rn.selfManagedFundForm.bsb}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid BSB"))),L(this.currentBank)&&n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Bank name"),n("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm"},this.currentBank.value)),n("div",{class:"mt-3"},n("label",{class:"text-sm font-medium text-gray-700"},"Account number"),n("div",{class:"mt-1"},n("input",{type:"text",required:!0,class:t,name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,inputmode:"numeric",value:rn.selfManagedFundForm.bankAccountNumber,onKeyUp:t=>this.updateCurrentBankAccountNumber(t),onChange:t=>this.updateFormField("bankAccountNumber",t.target.value.trim())}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account number"))))}updateFormField(t,n){this.formChanged.emit({[t]:n})}filterDigits(t){return t.replace(/[^0-9]/g,"")}updateCurrentBank(t){const n=this.filterDigits(t.target.value),e=n.substring(0,2),i=n.substring(0,3),r=Bn[e],s=Bn[i];r&&(this.currentBank=V(r)),s&&(this.currentBank=V(s)),(""===n||n.length>6)&&(this.currentBank=q),this.updateFormField("bsb",n)}updateCurrentBankAccountNumber(t){const n=this.filterDigits(t.target.value);this.updateFormField("bankAccountNumber",n)}updateAddressErrorMessage(){let t=q;U(t)&&!this.addressLine1Element.checkValidity()&&(t=V("Enter a valid address line 1")),U(t)&&!this.cityElement.checkValidity()&&(t=V("Enter a valid city/suburb")),U(t)&&!this.postcodeElement.checkValidity()&&(t=V("Enter a valid post code")),U(t)&&!this.stateElement.checkValidity()&&(t=V("Select a state")),this.addressErrorMessage=t}};var Pn;!function(t){t[t.Unauthorized=0]="Unauthorized",t[t.Authenticated=1]="Authenticated",t[t.Error=2]="Error"}(Pn||(Pn={}));class Rn{}let On=class extends C{constructor(){super({authenticationState:Pn.Unauthorized,jwt:q,reactNativeInterop:q,iframeInterop:q,appConfiguration:q})}};On=function(t,n,e,i){var r,s=arguments.length,o=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(n,e,o):r(n,e))||o);return s>3&&o&&Object.defineProperty(n,e,o),o}([S({name:"sss-session",resettable:!0})],On);const Dn=new On,Ln=new class extends A{constructor(t){super(t),this.store=t}isReactNativeInteropEnabled(){return L(this.getValue().reactNativeInterop)}isIframeInteropEnabled(){return L(this.getValue().iframeInterop)}getIframeInteropMode(){const t=this.getValue().iframeInterop;if(U(t))throw Error("Failed to get iframe interop information: no data in store");if(!this.isIframeInteropEnabled())throw Error("Failed to get iframe interop information: iframe mode is disabled");return t.value}}(Dn),Un=new class{async submitSlateChoiceAsync(t){return qt().url("super-choice/slate").post(t).badRequest((()=>{throw new Error("Failed to process Slate join request")})).text()}},qn=new class{constructor(){this.hostIsLocalSuperSelection=()=>"http://localhost:7100"===window.location.origin,this.hostIsDeployed=()=>window.location.origin.endsWith("partner.flarehr.com"),this.skipConsolidation=()=>Ln.isReactNativeInteropEnabled()?"true":"false",this.skipInsurance=()=>Ln.isReactNativeInteropEnabled()?"true":"false",this.environmentDiscriminator=()=>{const t=window.location.hostname.toLowerCase().split(".")[0];switch(t){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return t.replace("partner","");default:return"autodev-"}},this.slateJoinAppUrl=()=>`https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`}build(t,n){if(!(null==t?void 0:t.contentDocument))return;const e=(this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app")+"/slate-redirect.html",i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:e,cancelRedirectUrl:e,skipConsolidation:this.skipConsolidation(),skipInsurance:this.skipInsurance()});this.includeJwt()&&(i.authToken=Ut.jwt);const r=e=>{const{data:i,origin:s}=e;if(i)if("slate-redirect"!==i.sender){if("flare"===i.sender&&s.endsWith("join.slatesuper.com.au"))switch(i.type){case"contentResized":t.height=i.height>0?i.height:t.height,t.width=i.width>0?i.width:t.width}}else switch(window.removeEventListener("message",r),i.type){case"success":if(i.memberNumber){Zt.navigateInternallyToStandardChoice({history:n,fundName:"Slate Super",handleSubmitFn:t=>Un.submitSlateChoiceAsync({memberNumber:i.memberNumber,standardChoiceFormSignature:t,shownFunds:Ut.promotedFunds}),promotedFundId:"slate"});break}default:Zt.navigateInternally(n,Kt.ChoicePage)}};window.addEventListener("message",r);const s=t.contentDocument;s.open();const o=s.createElement("form");let a;for(a in o.method="POST",o.target="_self",o.action=this.slateJoinAppUrl(),i){const t=i[a];if(void 0!==t){const n=document.createElement("input");n.type="hidden",n.name=a,n.value=t,o.append(n)}}s.appendChild(o),s.close(),o.submit()}getSlateJoinMemberData(){var t,n;const e=Ut.superBuyer;return{firstName:e.userProfile.firstName,middleName:e.userProfile.middleName,lastName:e.userProfile.lastName,dateOfBirth:e.userProfile.dateOfBirth,gender:(t=>{switch(t){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}})(e.userProfile.gender),email:e.userProfile.email,mobilePhone:e.userProfile.mobilePhone,taxFileNumber:null!==(t=e.tfn)&&void 0!==t?t:"",addressLine1:e.userProfile.address.addressLine1,addressLine2:null!==(n=e.userProfile.address.addressLine2)&&void 0!==n?n:"",city:e.userProfile.address.city,state:e.userProfile.address.state,postCode:e.userProfile.address.postcode}}includeJwt(){return!this.slateJoinAppUrl().match(/autodev|sandbox/)}},Vn=class{constructor(n){t(this,n)}render(){return n("sss-iframe-host",{build:t=>qn.build(t,this.history)})}},zn=class{constructor(n){t(this,n),this.continue=o(this,"continue",7),this.standardChoiceFormUrl="/super-selection/embed/v1.0/app/assets/Superannuation_Standard_Choice_Form.pdf",this.handleContinue=()=>{this.continue.emit()}}render(){return n(s,null,n("div",{class:"fixed z-40 top-0 left-0 bg-white opacity-70 w-full h-full"}),n("div",{class:"fixed z-50 top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2"},n("div",{class:"p-6 shadow-sm border rounded-lg bg-white text-center max-w-560"},n("div",{class:"flex justify-center"},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"orange",viewBox:"0 0 16 16"},n("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"}))),n("p",{class:"my-4"},"You’ve selected a self-managed super fund (SMSF). Currently, SMSF information can’t be sent via this form. You’ll need to provide your employer with a"," ",n("a",{target:"_blank",href:this.standardChoiceFormUrl},"standard choice form")," ","for your SMSF details."),n("sss-button",{onClick:this.handleContinue,fillWidth:!0},"Continue"))))}},Hn=class{constructor(n){t(this,n),this.standardChoiceFormSignature="",this.isSubmitDisabled=!0}render(){return n(s,null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Confirm your super choice"),n("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."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"max-w-560"},n("div",{class:"p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row"},Gt.promotedFundId&&pn(Gt.promotedFundId)&&n("div",{class:"pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start"},n("img",{class:"h-16 w-auto",alt:Gt.fundName,src:pn(Gt.promotedFundId)})),n("div",{class:"flex justify-between w-full"},n("div",null,n("div",{class:"text-xs font-semibold text-gray-500 sm:uppercase"},"Nominated fund"),n("div",{class:"text-sm mt-2"},Gt.fundName)),n("div",{class:"grid content-center ml-4"},n("stencil-route-link",{url:Kt.ChoicePage},n("sss-button",{variant:"secondary"},"Change"))))),n("div",{class:"mt-4 p-4 sm:p-6 border shadow-sm rounded-lg"},n("div",{class:"sm:text-lg font-bold"},"Superannuation Standard Choice Form"),n("div",{class:"bg-blue-50 border-l-4 border-blue-400 p-4 mt-3"},n("div",{class:"flex"},n("div",{class:"flex-shrink-0"},n("img",{class:"h-5 w-5",src:r("assets/icon-information-circle.svg")})),n("div",{class:"ml-2"},n("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.")))),n("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()},n("label",{class:"text-sm font-medium text-gray-700"},"Type your full name"),n("input",{type:"text",autocomplete:"off",class:{"shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full 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}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Type your full name"),n("div",{class:"mt-6"},n("sss-button",{fillWidth:!0,promiseFn:()=>this.handleSubmitForm(),disabled:this.isSubmitDisabled},"Confirm and continue")))))))}async handleSubmitForm(){this.formState="validated",this.formElement.checkValidity()&&(await Gt.handleSubmitFn(this.standardChoiceFormSignature.trim()),Ut.markSuperSelectionAsSubmitted())}},Wn=class{constructor(n){t(this,n)}render(){return n(s,{class:"text-center"},n("div",{class:"flex justify-center"},n("div",{class:"relative"},n("div",{class:"h-20 w-20 rounded-full bg-primary-base opacity-10"}),n("div",{class:"h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2"},n((()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",class:"fill-primary-base"},n("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)))),n("h3",{class:"text-2xl leading-8 font-bold mt-4"},"Your super choice has been submitted"),n("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."),n("div",{class:"flex justify-center mt-8"},n("div",{class:"max-w-[200px] w-full"},n("sss-button",{fillWidth:!0,onClick:this.handleContinueButtonClick},n("span",null,"Continue")))))}handleContinueButtonClick(t){Ut.completeSuperSelectionFlow()}},$n=class{constructor(n){t(this,n),this.joinFundClicked=o(this,"joinFundClicked",7)}render(){return n(s,null,n("div",{class:"py-6 px-4 lg:px-6 flex flex-col justify-between h-full"},n("div",null,n("div",{class:"md:max-w-[240px] lg:max-w-full"},n("sss-button",{class:"uuid-button-continue",fillWidth:!0,onClick:()=>this.handleFundClick()},"Choose this fund")),n("div",{class:"text-xs text-gray-500 mt-6 leading-4"},this.disclaimer)),this.abnInfo&&this.abn&&n("div",{class:"text-xs text-gray-500 mt-2"},n("p",null,`${vn.isNewComplianceEnabled()?"Issued by ":""}${this.abnInfo}.`),n("p",null,"ABN: ",this.abn))))}handleFundClick(){return this.joinFundClicked.emit()}},Xn=class{constructor(n){t(this,n)}render(){return n(s,null,n("div",{class:"px-4 lg:px-6 pt-6"},n("div",{class:"text-right w-100 -mt-5 -mr-3.5 lg:-mr-5"},n("span",{class:"text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5"},vn.isNewComplianceEnabled()?"Featured":"Advertised")),n("div",{class:"flex lg:block mt-2 md:mt-0 lg:mt-2"},n("img",{class:"h-16 object-contain w-auto max-w-[80px] md:hidden lg:block lg:max-w-none",alt:this.name,src:r("assets/"+this.logo)}),n("div",{class:"grid content-center"},n("p",{class:"text-lg font-bold ml-4 mb-2 md:ml-0 md:mb-0 lg:mt-4"},this.name))),n("div",{class:"mt-4 text-sm space-y-2"},JSON.parse(this.features).map((t=>n("div",{class:"flex"},n("div",{class:"h-5 w-5 flex-none mr-1.5"},n("img",{src:r("assets/icon-check.svg")})),n("p",{class:"leading-5"},t.value))))),this.featureSubText&&n("p",{class:"text-xs text-gray-500 italic mt-4 leading-4"},this.featureSubText)))}},Jn=class{constructor(n){t(this,n),this.promotedFunds=this.getPromotedFunds(),this.eventTrackingService=zt.Instance}componentDidLoad(){const t=this.promotedFunds.map((t=>t.fundId));return this.eventTrackingService.TrackSuperFundPanelViewedAsync({promotedFundsShown:t})}render(){return n(s,null,n("div",null,n("sss-header-section",{currentPage:"choice"}),vn.isNewComplianceEnabled()&&n("div",{class:"mt-8 text-sm text-center leading-6"},"Not looking to join a new fund? You can skip the featured super funds and"," ",n("stencil-route-link",{url:Kt.MyOwnFund},n("span",{class:"text-primary-base font-medium"},"choose another super fund")),"."),!vn.isNewComplianceEnabled()&&n("div",{class:"flex justify-center pb-4"},n("div",{class:"text-center space-y-4 max-w-960 text-sm leading-6"},n("p",{class:"text-lg leading-8 text-gray-600"},"The choice of superannuation fund is an important personal financial decision. It is open to you to continue with your existing fund, or alternatively, you can select from one of the funds below or choose another fund."),n("p",null,"Flare is not licensed to advise you in relation to this decision and you may wish to return to this page at a later stage."),n("p",null,"The content on this page and on the following pages relating to each super fund is provided by the trustee or promoter of the super fund. The super funds presented have not been selected by your employer and neither your employer or Flare are making any recommendation or opinion."),n("p",null,"There are many super funds out there and you should consider the relevant product disclosure statement and choose one that is right for you. If you are unsure, obtain your own advice. You can choose your super fund later, if you need time to obtain advice."),n("p",null,"You should be aware that, if you do choose one of these advertised funds, Flare and its associated entities will normally receive a fee for you doing so."))),n("div",{class:"flex justify-center mt-8"},n("div",{class:{"lg:grid border-l border-t lg:border-b rounded-lg":!0,"lg:grid-cols-1 max-w-400":1===this.promotedFunds.length,"lg:grid-cols-2 max-w-720":2===this.promotedFunds.length,"lg:grid-cols-3 max-w-960":3===this.promotedFunds.length}},this.promotedFunds.map(((t,e)=>n("div",{class:{"border-r":!0,"rounded-tr-lg":0===e,"lg:rounded-tr-none":0===e&&e!==this.promotedFunds.length-1,"rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg":e===this.promotedFunds.length-1}},n("div",{class:{"flex border-b lg:border-b-0":!0,"rounded-b-lg":e===this.promotedFunds.length-1}},n("div",{class:"hidden md:flex lg:hidden w-36 justify-center pt-6 pl-6"},n("img",{class:"h-16 object-contain w-full max-w-[96px]",alt:t.name,src:r("assets/"+t.logo)})),n("div",{class:"w-full"},n("sss-super-choice-item-top",{logo:t.logo,name:t.name,features:JSON.stringify(t.features),featureSubText:t.featureSubText}),n("div",{class:"lg:hidden"},n("sss-super-choice-item-bottom",{disclaimer:t.disclaimer,abnInfo:t.abnInfo,abn:t.abn,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)}))))))),this.promotedFunds.map(((t,e)=>n("div",{class:{"hidden lg:block border-r":!0,"rounded-br-lg":e===this.promotedFunds.length-1}},n("sss-super-choice-item-bottom",{disclaimer:t.disclaimer,abnInfo:t.abnInfo,abn:t.abn,onJoinFundClicked:async()=>this.handleJoinSuperClickAsync(t)})))))),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"pb-8 sm:pb-12 max-w-720 border-b"},n("h5",{class:"font-bold sm:text-lg"},"Or, choose another super fund:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base"},n("li",null,"Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."),n("li",null,"If you are unsure of your current super fund details, you can find out at"," ",n("a",{class:"text-primary-base font-medium",target:"_blank",href:Zt.toExternalUrl("https://my.gov.au")},"www.my.gov.au")),n("li",null,"A full list of super funds can be viewed at"," ",n("a",{class:"text-primary-base font-medium",target:"_blank",href:Zt.toExternalUrl("https://www.apra.gov.au/register-of-superannuation-institutions")},"www.apra.gov.au"))),n("stencil-route-link",{url:Kt.MyOwnFund},n("sss-button",{fillWidthOnMobile:!0},"Choose another super fund")))),vn.isNewComplianceEnabled()&&n("div",{class:"flex justify-center"},n("div",{class:"pt-8 sm:pt-12 max-w-720"},n("h5",{class:"font-semibold"},"IMPORTANT INFORMATION:"),n("ul",{class:"list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6"},n("li",null,"The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."),n("li",null,"This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."),n("li",null,"Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."),n("li",null,"You should consider the relevant superannuation fund’s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund’s website."),n("li",null,"You should be aware that, if you do choose one of the featured superannuation funds, Flare and it’s associates will normally receive a fee for you doing so (this includes Simple Financial Choices Pty Ltd, a wholly owned subsidiary of Flare, which is a sub-promoter of Slate Super)."))))))}allFunds(){const t=(t,e)=>n("a",{class:"font-medium underline",target:"_blank",href:Zt.toExternalUrl(t.href),onClick:t.onClick},e);return[{fundId:"slate",name:"Slate Super",logo:"logo-slate.png",route:Kt.SlateJoin,features:[{order:1,value:"A lifestage investment strategy that evolves with you"},{order:2,value:"Advanced mobile app with retirement forecast and smart features"},{order:3,value:"Member advocates at Slate to assist with your account"}],disclaimer:n("p",{class:"small text-muted"},"You should consider the"," ",n(t,{href:"https://slate.co/pds/?utm_source=flare&utm_medium=superselection",onClick:()=>this.pdsViewedAsync("Slate Super","32367272075001")},"Product Disclosure Statement")," ","and"," ",n(t,{href:"https://slate.co/forms-and-documents/target-market-determination/"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of the fund."),abnInfo:"Diversa Trustees Limited",abn:"49 006 421 638"},{fundId:"australian-retirement-trust",name:"Australian Retirement Trust",logo:"logo-art.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"$200 billion in retirement savings"},{order:2,value:"2+ million members"},{order:3,value:"A focus on delivering strong, long‑term returns"}],featureSubText:"QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option.",disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf",onClick:()=>this.pdsViewedAsync("Australian Retirement Trust")},"Product Disclosure Statement")," ","and"," ",n(t,{href:"https://www.australianretirementtrust.com.au/tmd"},"Target Market Determination")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Australian Retirement Trust",abn:"60 905 115 063"},{fundId:"aware",name:"Aware Super",logo:"logo-aware.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"Acting on climate change"},{order:2,value:"All profits go to members"},{order:3,value:"One of Australia’s largest funds"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://aware.com.au/member/forms-and-resources/pds/FSS",onClick:()=>this.pdsViewedAsync("Aware Super")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Aware Super Pty Ltd",abn:"53 226 460 365"},{fundId:"active",name:"Active Super",logo:"logo-active.svg",route:Kt.PromotedFundJoinV1,features:[{order:1,value:"One of Canstar's top-performing funds*"},{order:2,value:"Recognised as a leader in responsible investment"},{order:3,value:"Calls answered in 20 seconds (average over 5 years)"}],featureSubText:"*Past performance is not a reliable indicator of future performance. As at 22 April 2022, Active Super is ranked among Canstar’s top five funds for 18-49 year-olds with a balance up to $250,000 based on returns over 5 years in the Accumulation Scheme.",disclaimer:n("p",null,"Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at"," ",n(t,{onClick:()=>this.pdsViewedAsync("Active Super"),href:"https://www.activesuper.com.au/pds"},"activesuper.com.au")," ","before making a decision.")},{fundId:"australian-ethical",name:"Australian Ethical",logo:"logo-slate.png",route:Kt.PromotedFundJoinV2,features:[{order:1,value:"TODO #1"},{order:2,value:"TODO #2"},{order:3,value:"TODO #3"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://www.australianethical.com.au/TODO",onClick:()=>this.pdsViewedAsync("Australian Ethical")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund.")},{fundId:"virgin",name:"Virgin Money Super",logo:"logo-slate.png",route:Kt.PromotedFundJoinV2,features:[{order:1,value:"TODO #1"},{order:2,value:"TODO #2"},{order:3,value:"TODO #3"}],disclaimer:n("p",null,"You should consider the"," ",n(t,{href:"https://virginmoney.com.au/superannuation/TODO",onClick:()=>this.pdsViewedAsync("Virgin Money Super")},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund.")}]}getPromotedFunds(){const t=[];return Ut.promotedFunds.forEach((n=>{const e=this.allFunds().find((t=>n===t.fundId));void 0!==e&&t.push(e)})),t}async handleJoinSuperClickAsync(t){var n;const e=Ut.promotedFunds;return await this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:hn(t.fundId),fundName:null!==(n=fn(t.fundId))&&void 0!==n?n:"",promotedFundId:t.fundId,promotedFundsShown:e}),_n.fundId=t.fundId,Zt.navigateInternally(this.history,t.route)}pdsViewedAsync(t,n){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:n,fundName:t,pageName:"Panel Fund Page"})}static get assetsDirs(){return["assets"]}},Yn=class{constructor(n){t(this,n),this.group=null,this.match=null,this.componentProps={},this.exact=!1,this.scrollOnNextRender=!1,this.previousMatch=null}computeMatch(t){const n=null!=this.group||null!=this.el.parentElement&&"stencil-route-switch"===this.el.parentElement.tagName.toLowerCase();if(t&&!n)return this.previousMatch=this.match,this.match=lt(t.pathname,{path:this.url,exact:this.exact,strict:!0})}async loadCompleted(){let t={};var n,e;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||(e=this.previousMatch,null==(n=this.match)&&null==e||null!=e&&n&&e&&n.path===e.path&&n.url===e.url&&ot(n.params,e.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?n(this.component,Object.assign({},t)):void 0}get el(){return u(this)}static get watchers(){return{location:["computeMatch"]}}};_.injectProps(Yn,["location","history","historyType","routeViewsUpdated"]),Yn.style="stencil-route.inactive{display:none}";const Gn=(t,n,e)=>e(t.confirm(n)),Kn=(t,n)=>{const e=t[n],i="__storage_test__";try{return e.setItem(i,i),e.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!==e.length}},Qn=class{constructor(n){t(this,n),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=lt(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict}))}handleClick(t){var n,e,i;if(!((n=t).metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&this.history&&this.url&&this.root)return t.preventDefault(),this.history.push((i=this.root,"/"==(e=this.url).charAt(0)&&"/"==i.charAt(i.length-1)?i.slice(0,i.length-1)+e:i+e))}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})),n(this.custom,Object.assign({},t),n("slot",null))}get el(){return u(this)}static get watchers(){return{location:["computeMatch"]}}};_.injectProps(Qn,["history","location","root"]);const Zn=t=>"STENCIL-ROUTE"===t.tagName,te=class{constructor(n){t(this,n),this.group=((1e17*Math.random()).toString().match(/.{4}/g)||[]).join("-"),this.subscribers=[],this.queue=c(this,"queue")}componentWillLoad(){null!=this.location&&this.regenerateSubscribers(this.location)}async regenerateSubscribers(t){if(null==t)return;let n=-1;if(this.subscribers=Array.prototype.slice.call(this.el.children).filter(Zn).map(((e,i)=>{const r=lt(t.pathname,{path:e.url,exact:e.exact,strict:!0});return r&&-1===n&&(n=i),{el:e,match:r}})),-1===n)return;if(this.activeIndex===n)return void(this.subscribers[n].el.match=this.subscribers[n].match);this.activeIndex=n;const e=this.subscribers[this.activeIndex];this.scrollTopOffset&&(e.el.scrollTopOffset=this.scrollTopOffset),e.el.group=this.group,e.el.match=e.match,e.el.componentUpdated=t=>{this.queue.write((()=>{this.subscribers.forEach(((t,n)=>{if(t.el.componentUpdated=void 0,n===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 n("slot",null)}get el(){return u(this)}static get watchers(){return{location:["regenerateSubscribers"]}}};_.injectProps(te,["location","routeViewsUpdated"]);const ne=(t,...n)=>{t||console.warn(...n)},ee=()=>{let t,n=[];return{setPrompt:n=>(ne(null==t,"A history supports only one prompt at a time"),t=n,()=>{t===n&&(t=null)}),confirmTransitionTo:(n,e,i,r)=>{if(null!=t){const s="function"==typeof t?t(n,e):t;"string"==typeof s?"function"==typeof i?i(s,r):(ne(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),r(!0)):r(!1!==s)}else r(!0)},appendListener:t=>{let e=!0;const i=(...n)=>{e&&t(...n)};return n.push(i),()=>{e=!1,n=n.filter((t=>t!==i))}},notifyListeners:(...t)=>{n.forEach((n=>n(...t)))}}},ie=(t,n="scrollPositions")=>{let e=new Map;const i=(n,i)=>{if(e.set(n,i),Kn(t,"sessionStorage")){const n=[];e.forEach(((t,e)=>{n.push([e,t])})),t.sessionStorage.setItem("scrollPositions",JSON.stringify(n))}};if(Kn(t,"sessionStorage")){const i=t.sessionStorage.getItem(n);e=i?new Map(JSON.parse(i)):e}return"scrollRestoration"in t.history&&(history.scrollRestoration="manual"),{set:i,get:t=>e.get(t),has:t=>e.has(t),capture:n=>{i(n,[t.scrollX,t.scrollY])}}},re={hashbang:{encodePath:t=>"!"===t.charAt(0)?t:"!/"+nt(t),decodePath:t=>"!"===t.charAt(0)?t.substr(1):t},noslash:{encodePath:nt,decodePath:tt},slash:{encodePath:tt,decodePath:tt}},se=(t,n)=>{const e=0==t.pathname.indexOf(n)?"/"+t.pathname.slice(n.length):t.pathname;return Object.assign({},t,{pathname:e})},oe={browser:(t,n={})=>{let e=!1;const i=t.history,r=t.location,s=t.navigator,o=(t=>{const n=t.navigator.userAgent;return(-1===n.indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&t.history&&"pushState"in t.history})(t),a=!(-1===s.userAgent.indexOf("Trident")),u=ie(t),c=null!=n.forceRefresh&&n.forceRefresh,l=null!=n.getUserConfirmation?n.getUserConfirmation:Gn,d=null!=n.keyLength?n.keyLength:6,f=n.basename?Z(tt(n.basename)):"",h=()=>{try{return t.history.state||{}}catch(t){return{}}},p=t=>{t=t||{};const{key:n,state:e}=t,{pathname:i,search:s,hash:o}=r;let a=i+s+o;return ne(!f||K(a,f),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+f+'".'),f&&(a=Q(a,f)),at(a,e,n||rt(d))},m=ee(),v=t=>{u.capture(M.location.key),Object.assign(M,t),M.location.scrollPosition=u.get(M.location.key),M.length=i.length,m.notifyListeners(M.location,M.action)},w=t=>{((t,n)=>void 0===n.state&&-1===t.userAgent.indexOf("CriOS"))(s,t)||g(p(t.state))},y=()=>{g(p(h()))},g=t=>{if(e)e=!1,v();else{const n="POP";m.confirmTransitionTo(t,n,l,(e=>{e?v({action:n,location:t}):b(t)}))}},b=t=>{let n=k.indexOf(M.location.key),i=k.indexOf(t.key);-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,_(r))},x=p(h());let k=[x.key],S=0,C=!1;const A=t=>f+et(t),_=t=>{i.go(t)},F=n=>{S+=n,1===S?(t.addEventListener("popstate",w),a&&t.addEventListener("hashchange",y)):0===S&&(t.removeEventListener("popstate",w),a&&t.removeEventListener("hashchange",y))},M={length:i.length,action:"POP",location:x,createHref:A,push:(t,n)=>{ne(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"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 e="PUSH",s=at(t,n,rt(d),M.location);m.confirmTransitionTo(s,e,l,(t=>{if(!t)return;const n=A(s),{key:a,state:u}=s;if(o)if(i.pushState({key:a,state:u},"",n),c)r.href=n;else{const t=k.indexOf(M.location.key),n=k.slice(0,-1===t?0:t+1);n.push(s.key),k=n,v({action:e,location:s})}else ne(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),r.href=n}))},replace:(t,n)=>{ne(!("object"==typeof t&&void 0!==t.state&&void 0!==n),"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 e="REPLACE",s=at(t,n,rt(d),M.location);m.confirmTransitionTo(s,e,l,(t=>{if(!t)return;const n=A(s),{key:a,state:u}=s;if(o)if(i.replaceState({key:a,state:u},"",n),c)r.replace(n);else{const t=k.indexOf(M.location.key);-1!==t&&(k[t]=s.key),v({action:e,location:s})}else ne(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),r.replace(n)}))},go:_,goBack:()=>_(-1),goForward:()=>_(1),block:(t="")=>{const n=m.setPrompt(t);return C||(F(1),C=!0),()=>(C&&(C=!1,F(-1)),n())},listen:t=>{const n=m.appendListener(t);return F(1),()=>{F(-1),n()}},win:t};return M},hash:(t,n={})=>{let e=!1,i=null,r=0,s=!1;const o=t.location,a=t.history,u=-1===t.navigator.userAgent.indexOf("Firefox"),c=null!=n.keyLength?n.keyLength:6,{getUserConfirmation:l=Gn,hashType:d="slash"}=n,f=n.basename?Z(tt(n.basename)):"",{encodePath:h,decodePath:p}=re[d],m=()=>{const t=o.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)},v=t=>{const n=o.href.indexOf("#");o.replace(o.href.slice(0,n>=0?n:0)+"#"+t)},w=()=>{let t=p(m());return ne(!f||K(t,f),'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 "'+f+'".'),f&&(t=Q(t,f)),at(t,void 0,rt(c))},y=ee(),g=t=>{Object.assign(I,t),I.length=a.length,y.notifyListeners(I.location,I.action)},b=()=>{const t=m(),n=h(t);if(t!==n)v(n);else{const t=w(),n=I.location;if(!e&&(r=n).pathname===(s=t).pathname&&r.search===s.search&&r.hash===s.hash&&r.key===s.key&&ot(r.state,s.state))return;if(i===et(t))return;i=null,x(t)}var r,s},x=t=>{if(e)e=!1,g();else{const n="POP";y.confirmTransitionTo(t,n,l,(e=>{e?g({action:n,location:t}):k(t)}))}},k=t=>{let n=_.lastIndexOf(et(I.location)),i=_.lastIndexOf(et(t));-1===n&&(n=0),-1===i&&(i=0);const r=n-i;r&&(e=!0,F(r))},S=m(),C=h(S);S!==C&&v(C);const A=w();let _=[et(A)];const F=t=>{ne(u,"Hash history go(n) causes a full page reload in this browser"),a.go(t)},M=(t,n)=>{r+=n,1===r?t.addEventListener("hashchange",b):0===r&&t.removeEventListener("hashchange",b)},I={length:a.length,action:"POP",location:A,createHref:t=>"#"+h(f+et(t)),push:(t,n)=>{ne(void 0===n,"Hash history cannot push state; it is ignored");const e="PUSH",r=at(t,void 0,rt(c),I.location);y.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),s=h(f+n);if(m()!==s){i=n,(t=>{o.hash=t})(s);const t=_.lastIndexOf(et(I.location)),a=_.slice(0,-1===t?0:t+1);a.push(n),_=a,g({action:e,location:r})}else ne(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),g()}))},replace:(t,n)=>{ne(void 0===n,"Hash history cannot replace state; it is ignored");const e="REPLACE",r=at(t,void 0,rt(c),I.location);y.confirmTransitionTo(r,e,l,(t=>{if(!t)return;const n=et(r),s=h(f+n);m()!==s&&(i=n,v(s));const o=_.indexOf(et(I.location));-1!==o&&(_[o]=n),g({action:e,location:r})}))},go:F,goBack:()=>F(-1),goForward:()=>F(1),block:(n="")=>{const e=y.setPrompt(n);return s||(M(t,1),s=!0),()=>(s&&(s=!1,M(t,-1)),e())},listen:n=>{const e=y.appendListener(n);return M(t,1),()=>{M(t,-1),e()}},win:t};return I}},ae=class{constructor(n){t(this,n),this.root="/",this.historyType="browser",this.titleSuffix="",this.routeViewsUpdated=(t={})=>{if(this.history&&t.scrollToId&&"browser"===this.historyType){const n=this.history.win.document.getElementById(t.scrollToId);if(n)return n.scrollIntoView()}this.scrollTo(t.scrollTopOffset||this.scrollTopOffset)},this.isServer=c(this,"isServer"),this.queue=c(this,"queue")}componentWillLoad(){this.history=oe[this.historyType](this.el.ownerDocument.defaultView),this.history.listen((t=>{t=se(t,this.root),this.location=t})),this.location=se(this.history.location,this.root)}scrollTo(t){const n=this.history;if(null!=t&&!this.isServer&&n)return"POP"===n.action&&Array.isArray(n.location.scrollPosition)?this.queue.write((()=>{n&&n.location&&Array.isArray(n.location.scrollPosition)&&n.win.scrollTo(n.location.scrollPosition[0],n.location.scrollPosition[1])})):this.queue.write((()=>{n.win.scrollTo(0,t)}))}render(){if(this.location&&this.history)return n(_.Provider,{state:{historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated}},n("slot",null))}get el(){return u(this)}},ue=class{constructor(n){t(this,n),this.stepSubmitSuccess=o(this,"step-completion",7),this.successPageAcknowledged=o(this,"successPageAcknowledged",5),this.initialised=o(this,"initialised",7),this.isSelfHosted=!1,this.isAppInitialised=!1}async componentWillLoad(){const t=Bt.fromNullable(this.accessToken);if(Bt.isNone(t))throw Error("jwt property is missing.");Ut.state.jwt=t;const n=Bt.fromNullable(this.backendUrl);if(Bt.isNone(n))throw Error("apiBaseUrl property is missing.");Ut.state.apiBaseUrl=Bt.some(n.value.replace(/\/$/,"")+"/");const e=Bt.fromNullable(this.appBaseUrl);if(Bt.isNone(e))throw Error("appBaseUrl property is missing.");Ut.state.appBaseUrl=Bt.some(e.value.replace(/\/$/,"")),Ut.onChange("hasSuccessPageBeenAcknowledged",(()=>this.successPageAcknowledged.emit())),Ut.onChange("hasSuperSelectionBeenSubmitted",(t=>{t&&(this.stepSubmitSuccess.emit(),Ut.state.hasSuperSelectionBeenSubmitted=!1,this.isSelfHosted&&Zt.navigateInternally(this.history,Kt.Success))}))}async componentDidLoad(){await Ut.loadAppStateAsync();const t=await mn.GetExistingFundAsync();this.isAppInitialised=!0,this.initialised.emit({accountIdOrDefault:Ut.accountIdOrDefault,partnerIdOrDefault:Ut.partnerIdOrDefault,profileId:Ut.profileId}),Wt(),Bt.isSome(t)&&"Inactive"!==t.value.valid?Zt.navigateInternally(this.history,Kt.ExistingChoicePage):Zt.navigateInternally(this.history,vn.isNewComplianceEnabled()?Kt.ConsentPage:Kt.ChoicePage)}authTokenChanged(t){Ut.state.jwt=Bt.fromNullable(t)}onRouteChange(){null===window||void 0===window||window.scroll(0,0)}render(){return n(s,null,n("link",{rel:"stylesheet",href:r("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 n("stencil-router",{root:this.routerBaseUrl(),class:"font-inter"},n("stencil-route-switch",{scrollTopOffset:0},this.isAppInitialised?n("div",{class:{"pt-28":!0,"-mt-12 pb-6":!this.isFundJoinPage(),"-mt-28":this.isFundJoinPage()}},Qt,n("sss-footer-section",null)):n("div",{class:"flex justify-center py-20"},n("sss-loading-indicator",null))))}isFundJoinPage(){return window.location.pathname.includes(Kt.SlateJoin)||window.location.pathname.includes(Kt.PromotedFundJoinV1)||window.location.pathname.includes(Kt.PromotedFundJoinV2)}static get assetsDirs(){return["assets"]}static get watchers(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}}};H(ue),ue.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 ce,le=[],de="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"}(ce||(ce={}));var fe,he=function(t){return Object.freeze(t)},pe=function(t,n){this.inlineSize=t,this.blockSize=n,he(this)},me=function(){function t(t,n,e,i){return this.x=t,this.y=n,this.width=e,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,he(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(n){return new t(n.x,n.y,n.width,n.height)},t}(),ve=function(t){return t instanceof SVGElement&&"getBBox"in t},we=function(t){if(ve(t)){var n=t.getBBox();return!n.width&&!n.height}return!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},ye=function(t){var n,e,i=null===(e=null===(n=t)||void 0===n?void 0:n.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(i&&t instanceof i.Element)},ge="undefined"!=typeof window?window:{},be=new WeakMap,xe=/auto|scroll/,ke=/^tb|vertical/,Se=/msie|trident/i.test(ge.navigator&&ge.navigator.userAgent),Ce=function(t){return parseFloat(t||"0")},Ae=function(t,n,e){return void 0===t&&(t=0),void 0===n&&(n=0),void 0===e&&(e=!1),new pe((e?n:t)||0,(e?t:n)||0)},_e=he({devicePixelContentBoxSize:Ae(),borderBoxSize:Ae(),contentBoxSize:Ae(),contentRect:new me(0,0,0,0)}),Fe=function(t,n){if(void 0===n&&(n=!1),be.has(t)&&!n)return be.get(t);if(we(t))return be.set(t,_e),_e;var e=getComputedStyle(t),i=ve(t)&&t.ownerSVGElement&&t.getBBox(),r=!Se&&"border-box"===e.boxSizing,s=ke.test(e.writingMode||""),o=!i&&xe.test(e.overflowY||""),a=!i&&xe.test(e.overflowX||""),u=i?0:Ce(e.paddingTop),c=i?0:Ce(e.paddingRight),l=i?0:Ce(e.paddingBottom),d=i?0:Ce(e.paddingLeft),f=i?0:Ce(e.borderTopWidth),h=i?0:Ce(e.borderRightWidth),p=i?0:Ce(e.borderBottomWidth),m=d+c,v=u+l,w=(i?0:Ce(e.borderLeftWidth))+h,y=f+p,g=a?t.offsetHeight-y-t.clientHeight:0,b=o?t.offsetWidth-w-t.clientWidth:0,x=r?m+w:0,k=r?v+y:0,S=i?i.width:Ce(e.width)-x-b,C=i?i.height:Ce(e.height)-k-g,A=S+m+b+w,_=C+v+g+y,F=he({devicePixelContentBoxSize:Ae(Math.round(S*devicePixelRatio),Math.round(C*devicePixelRatio),s),borderBoxSize:Ae(A,_,s),contentBoxSize:Ae(S,C,s),contentRect:new me(d,u,S,C)});return be.set(t,F),F},Me=function(t,n,e){var i=Fe(t,e),r=i.borderBoxSize,s=i.contentBoxSize,o=i.devicePixelContentBoxSize;switch(n){case ce.DEVICE_PIXEL_CONTENT_BOX:return o;case ce.BORDER_BOX:return r;default:return s}},Ie=function(t){var n=Fe(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=he([n.borderBoxSize]),this.contentBoxSize=he([n.contentBoxSize]),this.devicePixelContentBoxSize=he([n.devicePixelContentBoxSize])},Te=function(t){if(we(t))return 1/0;for(var n=0,e=t.parentNode;e;)n+=1,e=e.parentNode;return n},Ee=function(){var t=1/0,n=[];le.forEach((function(e){if(0!==e.activeTargets.length){var i=[];e.activeTargets.forEach((function(n){var e=new Ie(n.target),r=Te(n.target);i.push(e),n.lastReportedSize=Me(n.target,n.observedBox),r<t&&(t=r)})),n.push((function(){e.callback.call(e.observer,i,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,i=n;e<i.length;e++)(0,i[e])();return t},je=function(t){le.forEach((function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach((function(e){e.isActive()&&(Te(e.target)>t?n.activeTargets.push(e):n.skippedTargets.push(e))}))}))},Be=[],Ne=0,Pe={attributes:!0,characterData:!0,childList:!0,subtree:!0},Re=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Oe=function(t){return void 0===t&&(t=0),Date.now()+t},De=!1,Le=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var n=this;if(void 0===t&&(t=250),!De){De=!0;var e,i=Oe(t);e=function(){var e=!1;try{e=function(){var t,n=0;for(je(n);le.some((function(t){return t.activeTargets.length>0}));)n=Ee(),je(n);return le.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:de}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=de),window.dispatchEvent(t)),n>0}()}finally{if(De=!1,t=i-Oe(),!Ne)return;e?n.run(1e3):t>0?n.run(t):n.start()}},function(t){if(!fe){var n=0,e=document.createTextNode("");new MutationObserver((function(){return Be.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),fe=function(){e.textContent=""+(n?n--:n++)}}Be.push(t),fe()}((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Pe)};document.body?n():ge.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Re.forEach((function(n){return ge.addEventListener(n,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Re.forEach((function(n){return ge.removeEventListener(n,t.listener,!0)})),this.stopped=!0)},t}()),Ue=function(t){!Ne&&t>0&&Le.start(),!(Ne+=t)&&Le.stop()},qe=function(){function t(t,n){this.target=t,this.observedBox=n||ce.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,n=Me(this.target,this.observedBox,!0);return ve(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=n),this.lastReportedSize.inlineSize!==n.inlineSize||this.lastReportedSize.blockSize!==n.blockSize},t}(),Ve=function(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n},ze=new WeakMap,He=function(t,n){for(var e=0;e<t.length;e+=1)if(t[e].target===n)return e;return-1},We=function(){function t(){}return t.connect=function(t,n){var e=new Ve(t,n);ze.set(t,e)},t.observe=function(t,n,e){var i=ze.get(t),r=0===i.observationTargets.length;He(i.observationTargets,n)<0&&(r&&le.push(i),i.observationTargets.push(new qe(n,e&&e.box)),Ue(1),Le.schedule())},t.unobserve=function(t,n){var e=ze.get(t),i=He(e.observationTargets,n);i>=0&&(1===e.observationTargets.length&&le.splice(le.indexOf(e),1),e.observationTargets.splice(i,1),Ue(-1))},t.disconnect=function(t){var n=this,e=ze.get(t);e.observationTargets.slice().forEach((function(e){return n.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),$e=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.");We.connect(this,t)}return t.prototype.observe=function(t,n){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ye(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");We.observe(this,t,n)},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(!ye(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");We.unobserve(this,t)},t.prototype.disconnect=function(){We.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const Xe=new class{constructor(){this._appRootUrl=new z((()=>this.resolveRootUrl())),this.getAppRootUrl=()=>this._appRootUrl.value,this.getAppHostUrl=()=>`${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/,"")}async loadConfigurationAsync(){const t=await Ft(this.getAppRootUrl()+"config.json").get().json();Dn.update({appConfiguration:Bt.fromNullable(t)})}resolveRootUrl(){const t=Bt.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(Bt.isNone(t))throw Error("Unsupported host URL");return t.value[0]+"/"}};function Je(){return"undefined"!=typeof globalThis&&globalThis?globalThis:"undefined"!=typeof self&&self?self:"undefined"!=typeof window&&window?window:"undefined"!=typeof global&&global?global:null}function Ye(t){var n=Object.create;if(n)return n(t);if(null==t)return{};var e=typeof t;if("object"!==e&&"function"!==e)throw new TypeError("Object prototype may only be an Object:"+t);function i(){}return i.prototype=t,new i}var Ge,Ke,Qe=function(t,n){return(Qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)},Ze=Je()||{};Ke=function(t,n){function e(){this.constructor=t}Qe(t,n),t.prototype=null===n?Ye(n):(e.prototype=n.prototype,new e)},(Ge=Ze).__assign||(Ge.__assign=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}),Ge.__extends||(Ge.__extends=Ke),__assign||(__assign=Ze.__assign),__extends||(__extends=Ze.__extends);var ti=Je;function ni(t){var n=ti();return n&&n[t]?n[t]:"window"===t&&ei()?window:null}function ei(){return Boolean("object"==typeof window&&window)}function ii(){return ei()?window:ni("window")}function ri(){return Boolean("object"==typeof document&&document)}function si(){return ri()?document:ni("document")}function oi(){return Boolean("object"==typeof navigator&&navigator)?navigator:ni("navigator")}function ai(){return"object"==typeof location&&location?location:ni("location")}function ui(){return ni("performance")}function ci(){return Boolean("object"==typeof JSON&&JSON||null!==ni("JSON"))}function li(){return ci()?JSON||ni("JSON"):null}var di=null,fi=!1,hi=123456789,pi=987654321;function mi(t){t<0&&(t>>>=0),hi=123456789+t&4294967295,pi=987654321-t&4294967295,fi=!0}function vi(){mi(4294967296*Math.random()^(new Date).getTime())}function wi(t,n){return typeof t===n}function yi(t){return wi(t,"undefined")||void 0===t}function gi(t){return yi(t)||null===t}function bi(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function xi(t){return wi(t,"object")}function ki(t){return wi(t,"function")}function Si(t,n,e,i){void 0===i&&(i=!1);var r=!1;if(!gi(t))try{gi(t.addEventListener)?gi(t.attachEvent)||(t.attachEvent("on"+n,e),r=!0):(t.addEventListener(n,e,i),r=!0)}catch(t){}return r}function Ci(t,n,e,i){if(void 0===i&&(i=!1),!gi(t))try{gi(t.removeEventListener)?gi(t.detachEvent)||t.detachEvent("on"+n,e):t.removeEventListener(n,e,i)}catch(t){}}function Ai(t,n){if(t&&xi(t))for(var e in t)bi(t,e)&&n.call(t,e,t[e])}var _i,Fi=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 wi(t,"string")},t.isNumber=function(t){return wi(t,"number")},t.isBoolean=function(t){return wi(t,"boolean")},t.disableCookies=function(){t._canUseCookies=!1},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Mi,(function(n){var e=0|t.randomValue(15);return("x"===n?e:3&e|8).toString(16)}))},t.toISOString=function(n){if(t.isDate(n)){var e=function(t){var n=String(t);return 1===n.length&&(n="0"+n),n};return n.getUTCFullYear()+"-"+e(n.getUTCMonth()+1)+"-"+e(n.getUTCDate())+"T"+e(n.getUTCHours())+":"+e(n.getUTCMinutes())+":"+e(n.getUTCSeconds())+"."+String((n.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}},t.arrForEach=function(t,n,e){for(var i=t.length,r=0;r<i;r++)r in t&&n.call(e||t,t[r],r,t)},t.arrIndexOf=function(t,n,e){for(var i=t.length,r=e||0,s=Math.max(r>=0?r:i-Math.abs(r),0);s<i;s++)if(s in t&&t[s]===n)return s;return-1},t.arrMap=function(t,n,e){for(var i=t.length,r=e||t,s=new Array(i),o=0;o<i;o++)o in t&&(s[o]=n.call(r,t[o],t));return s},t.arrReduce=function(t,n,e){var i,r=t.length,s=0;if(arguments.length>=3)i=arguments[2];else{for(;s<r&&!(s in t);)s++;i=t[s++]}for(;s<r;)s in t&&(i=n(i,t[s],s,t)),s++;return i},t.strTrim=function(n){return t.isString(n)?n.replace(/^\s+|\s+$/g,""):n},t.objKeys=function(t){var n=!{toString:null}.propertyIsEnumerable("toString");if(!(ki(t)||xi(t)&&null!==t))throw new TypeError("objKeys called on non-object");var e=[];for(var i in t)bi(t,i)&&e.push(i);if(n)for(var r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=r.length,o=0;o<s;o++)bi(t,r[o])&&e.push(r[o]);return e},t.objDefineAccessors=function(t,n,e,i){var r=Object.defineProperty;if(r)try{var s={enumerable:!0,configurable:!0};return e&&(s.get=e),i&&(s.set=i),r(t,n,s),!0}catch(t){}return!1},t.addEventHandler=function(t,n){var e=!1,i=ii();i&&(e=Si(i,t,n),e=Si(i.body,t,n)||e);var r=si();return r&&(e=Ii.Attach(r,t,n)||e),e},t.dateNow=function(){var t=Date;return t.now?t.now():(new t).getTime()},t.perfNow=function(){var n=ui();return n&&n.now?n.now():t.dateNow()},t.newId=function(n){void 0===n&&(n=22);for(var e=t.random32()>>>0,i=0,r="";r.length<n;)i++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&e),e>>>=6,5===i&&(e=(t.random32()<<2&4294967295|3&e)>>>0,i=0);return r},t.isIE=function(){if(null===di){var t=((oi()||{}).userAgent||"").toLowerCase();di=-1!==t.indexOf("msie")||-1!==t.indexOf("trident/")}return di},t.randomValue=function(n){return n>0?Math.floor(t.random32()/4294967295*(n+1))>>>0:0},t.random32=function(n){var e,i=ni("crypto")||ni("msCrypto");return i&&i.getRandomValues?e=4294967295&i.getRandomValues(new Uint32Array(1))[0]:t.isIE()?(fi||vi(),e=4294967295&t.mwcRandom32()):e=Math.floor(4294967296*Math.random()|0),n||(e>>>=0),e},t.mwcRandomSeed=function(t){t?mi(t):vi()},t.mwcRandom32=function(t){var n=((pi=36969*(65535&pi)+(pi>>16)&4294967295)<<16)+(65535&(hi=18e3*(65535&hi)+(hi>>16)&4294967295))>>>0&4294967295|0;return t||(n>>>=0),n},t.generateW3CId=function(){for(var n,e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],i="",r=0;r<4;r++)i+=e[15&(n=t.random32())]+e[n>>4&15]+e[n>>8&15]+e[n>>12&15]+e[n>>16&15]+e[n>>20&15]+e[n>>24&15]+e[n>>28&15];var s=e[8+(3&t.random32())|0];return i.substr(0,8)+i.substr(9,4)+"4"+i.substr(13,3)+s+i.substr(16,3)+i.substr(19,12)},t.isTypeof=wi,t.isUndefined=yi,t.isNullOrUndefined=gi,t.hasOwnProperty=bi,t.isFunction=ki,t.isObject=xi,t.objCreate=Ye,t}(),Mi=/[xy]/g,Ii=function(){function t(){}return t.Attach=Si,t.AttachEvent=Si,t.Detach=Ci,t.DetachEvent=Ci,t}();!function(t){t[t.CRITICAL=1]="CRITICAL",t[t.WARNING=2]="WARNING"}(_i||(_i={}));var Ti=Object.getPrototypeOf,Ei=0;
|
|
2
2
|
/*!
|
|
3
3
|
* Microsoft Dynamic Proto Utility, 1.1.0
|
|
4
4
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
5
|
-
*/function Ei(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function ji(t){return"function"==typeof t}function Bi(t){return t&&(t===Object.prototype||t===Array.prototype)}function Ni(t){return Bi(t)||t===Function.prototype}function Pi(t){if(t){if(Ii)return Ii(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}function Ri(t,n,e){return"constructor"!==n&&ji(t[n])&&(e||Ei(t,n))}function Oi(t){throw new TypeError("DynamicProto: "+t)}function Di(t,n){for(var e=t.length-1;e>=0;e--)if(t[e]===n)return!0;return!1}function Li(t,n,e,i){var r=null;if(t&&Ei(e,"_dynClass")){var s=t._dynInstFuncs||{};if((r=(s[e._dynClass]||{})[n])||Oi("Missing ["+n+"] function"),!r._dynInstChk&&!1!==s._dynInstChk){for(var o=!Ei(t,n),a=Pi(t),u=[];o&&a&&!Ni(a)&&!Di(u,a);){var c=a[n];if(c){o=c===i;break}u.push(a),a=Pi(a)}try{o&&(t[n]=r),r._dynInstChk=1}catch(t){s._dynInstChk=!1}}}return r}function Ui(t,n,e){var i=n[t];return i===e&&(i=Pi(n)[t]),ji(i)||Oi("["+t+"] is not a function"),i}function qi(t,n){return Ei(t,"prototype")?t.name||n||"_unknown_":((t||{}).constructor||{}).name||n||"_unknown_"}function zi(t,n,e,i){Ei(t,"prototype")||Oi("theClass is an invalid class definition.");var r=t.prototype;(function(t,n){for(var e=Pi(n);e&&!Ni(e);){if(e===t)return!0;e=Pi(e)}return!1})(r,n)||Oi("["+qi(t)+"] is not in class hierarchy of ["+qi(n)+"]");var s=null;Ei(r,"_dynClass")?s=r._dynClass:(s="_dynCls$"+qi(t,"_")+"$"+Ti,Ti++,r._dynClass=s);var o=zi._dfOpts,a=!!o.useBaseInst;a&&i&&void 0!==i.useBaseInst&&(a=!!i.useBaseInst);var u=function(t){var n={};for(var e in t)!n[e]&&Ri(t,e,!1)&&(n[e]=t[e]);return n}(n);e(n,function(t,n,e,i){function r(t,n,e){var r=n[o];if(r._isDynProxy&&i){var s=t._dynInstFuncs||{};!1!==s._dynInstChk&&(r=(s[n._dynClass]||{})[e]||r)}return function(){return r.apply(t,arguments)}}var s={};for(var o in e)s[o]=r(n,e,o);for(var a=Pi(t),u=[];a&&!Ni(a)&&!Di(u,a);){for(var o in a)!s[o]&&Ri(a,o,!Ii)&&(s[o]=r(n,a,o));u.push(a),a=Pi(a)}return s}(r,n,u,a));var c=!!Ii&&!!o.setInstFuncs;c&&i&&(c=!!i.setInstFuncs),function(t,n,e,i,r){function s(t,n){var e=function(){return(Li(this,n,t,e)||Ui(n,t,e)).apply(this,arguments)};return e._isDynProxy=1,e}if(!Bi(t)){var o=e._dynInstFuncs=e._dynInstFuncs||{},a=o[n]=o[n]||{};for(var u in!1!==o._dynInstChk&&(o._dynInstChk=!!r),e)Ri(e,u,!1)&&e[u]!==i[u]&&(a[u]=e[u],delete e[u],(!Ei(t,u)||t[u]&&!t[u]._isDynProxy)&&(t[u]=s(t,u)))}}(r,s,n,u,!1!==c)}function Vi(t){return t?'"'+t.replace(/\"/g,"")+'"':""}zi._dfOpts={setInstFuncs:!0,useBaseInst:!0};var Hi=function(){function t(t,n,e,i){void 0===e&&(e=!1);var r=this;r.messageId=t,r.message=(e?"AI: ":"AI (Internal): ")+t;var s="";ui()&&(s=ci().stringify(i));var o=(n?" message:"+Vi(n):"")+(i?" props:"+Vi(s):"");r.message+=o}return t.dataType="MessageData",t}(),Wi=function(){function t(n){this.identifier="DiagnosticLogger",this.queue=[];var e=0,i={};zi(t,this,(function(t){var r=_i.isNullOrUndefined,s=_i.isUndefined,o=_i.isFunction;function a(t,e){var i=n[t];return r(i)?e:i}r(n)&&(n={}),t.consoleLoggingLevel=function(){return a("loggingLevelConsole",0)},t.telemetryLoggingLevel=function(){return a("loggingLevelTelemetry",1)},t.maxInternalMessageLimit=function(){return a("maxMessageLimit",25)},t.enableDebugExceptions=function(){return a("enableDebugExceptions",!1)},t.throwInternal=function(n,e,r,o,a){void 0===a&&(a=!1);var u=new Hi(e,r,a,o);if(t.enableDebugExceptions())throw u;if(!s(u)&&u&&!s(u.message)){if(a){var c=+u.messageId;!i[c]&&t.consoleLoggingLevel()>=Ai.WARNING&&(t.warnToConsole(u.message),i[c]=!0)}else t.consoleLoggingLevel()>=Ai.WARNING&&t.warnToConsole(u.message);t.logInternalMessage(n,u)}},t.warnToConsole=function(t){var n="undefined"!=typeof console?console:ti("console");if(n){var e="log";n.warn&&(e="warn"),o(n[e])&&n[e](t)}},t.resetInternalMessageCount=function(){e=0,i={}},t.logInternalMessage=function(n,r){if(!(e>=t.maxInternalMessageLimit())){var s=!0,o="AITR_"+r.messageId;if(i[o]?s=!1:i[o]=!0,s&&(n<=t.telemetryLoggingLevel()&&(t.queue.push(r),e++),e===t.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",u=new Hi(23,a,!1);t.queue.push(u),t.warnToConsole(a)}}}}))}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}(),$i=function(){function t(n,e,i){var r,s=this,o=!1;s.start=_i.dateNow(),s.name=n,s.isAsync=i,s.isChildEvt=function(){return!1},_i.isFunction(e)&&(o=_i.objDefineAccessors(s,"payload",(function(){return!r&&_i.isFunction(e)&&(r=e(),e=null),r}))),s.getCtx=function(n){return n?n===t.ParentContextKey||n===t.ChildrenContextKey?s[n]:(s.ctx||{})[n]:null},s.setCtx=function(n,e){n&&(n===t.ParentContextKey?(s[n]||(s.isChildEvt=function(){return!0}),s[n]=e):n===t.ChildrenContextKey?s[n]=e:(s.ctx=s.ctx||{})[n]=e)},s.complete=function(){var n=0,i=s.getCtx(t.ChildrenContextKey);if(_i.isArray(i))for(var r=0;r<i.length;r++){var a=i[r];a&&(n+=a.time)}s.time=_i.dateNow()-s.start,s.exTime=s.time-n,s.complete=function(){},!o&&_i.isFunction(e)&&(s.payload=e())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),Xi=function(){function t(n){this.ctx={},zi(t,this,(function(t){t.create=function(t,n,e){return new $i(t,n,e)},t.fire=function(t){t&&(t.complete(),n&&n.perfEvent(t))},t.setCtx=function(n,e){n&&((t.ctx=t.ctx||{})[n]=e)},t.getCtx=function(n){return(t.ctx||{})[n]}}))}return t.prototype.create=function(){return null},t.prototype.fire=function(){},t.prototype.setCtx=function(){},t.prototype.getCtx=function(){},t}();function Ji(t,n,e,i,r){if(t){var s=t;if(s&&_i.isFunction(s.getPerfMgr)&&(s=s.getPerfMgr()),s){var o=void 0,a=s.getCtx("CoreUtils.doPerf");try{if(o=s.create(n(),i,r)){if(a&&o.setCtx&&(o.setCtx($i.ParentContextKey,a),a.getCtx&&a.setCtx)){var u=a.getCtx($i.ChildrenContextKey);u||a.setCtx($i.ChildrenContextKey,u=[]),u.push(o)}return s.setCtx("CoreUtils.doPerf",o),e(o)}}catch(t){o&&o.setCtx&&o.setCtx("exception",t)}finally{o&&s.fire(o),s.setCtx("CoreUtils.doPerf",a)}}}return e()}var Yi=_i.isFunction,Gi=function(t,n){var e=this,i=null,r=Yi(t.processTelemetry),s=Yi(t.setNextPlugin);e._hasRun=!1,e.getPlugin=function(){return t},e.getNext=function(){return i},e.setNext=function(t){i=t},e.processTelemetry=function(o,a){a||(a=n);var u=t?t.identifier:"TelemetryPluginChain";Ji(a?a.core():null,(function(){return u+":processTelemetry"}),(function(){if(t&&r){e._hasRun=!0;try{a.setNext(i),s&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(o,a)}catch(e){var n=i&&i._hasRun;i&&n||a.diagLog().throwInternal(Ai.CRITICAL,73,"Plugin ["+t.identifier+"] failed during processTelemetry - "+e),i&&!n&&i.processTelemetry(o,a)}}else i&&(e._hasRun=!0,i.processTelemetry(o,a))}),(function(){return{item:o}}),!o.sync)}},Ki=_i.isNullOrUndefined;function Qi(t,n){var e=[];if(t&&t.length>0)for(var i=null,r=0;r<t.length;r++){var s=t[r];if(s&&_i.isFunction(s.processTelemetry)){var o=new Gi(s,n);e.push(o),i&&i.setNext(o),i=o}}return e.length>0?e[0]:null}var Zi=function t(n,e,i,r){var s=this,o=null;null!==r&&(n&&_i.isFunction(n.getPlugin)?o=function(t,n,e){var i=[],r=!e;if(t)for(;t;){var s=t.getPlugin();(r||s===e)&&(r=!0,i.push(s)),t=t.getNext()}return r||i.push(e),Qi(i,n)}(n,s,r||n.getPlugin()):r?o=function(t,n,e){var i=t,r=!1;return e&&t&&(i=[],_i.arrForEach(t,(function(t){(r||t===e)&&(r=!0,i.push(t))}))),e&&!r&&(i||(i=[]),i.push(e)),Qi(i,n)}(n,s,r):_i.isUndefined(r)&&(o=Qi(n,s))),s.core=function(){return i},s.diagLog=function(){var t=(i||{}).logger;return t||(t=new Wi(e||{})),t},s.getCfg=function(){return e},s.getExtCfg=function(t,n){var i;if(void 0===n&&(n={}),e){var r=e.extensionConfig;r&&t&&(i=r[t])}return i||n},s.getConfig=function(t,n,i){var r;void 0===i&&(i=!1);var o=s.getExtCfg(t,null);return o&&!Ki(o[n])?r=o[n]:e&&!Ki(e[n])&&(r=e[n]),Ki(r)?i:r},s.hasNext=function(){return null!=o},s.getNext=function(){return o},s.setNext=function(t){o=t},s.processNext=function(t){var n=o;n&&(o=n.getNext(),n.processTelemetry(t,s))},s.createNew=function(n,r){return void 0===n&&(n=null),new t(n||o,e,i,r)}},tr=_i.isFunction,nr=function(){function t(){var t=this,n=!1,e=null,i=null;t.core=null,t.diagLog=function(n){return t._getTelCtx(n).diagLog()},t.isInitialized=function(){return n},t.setInitialized=function(t){n=t},t.setNextPlugin=function(t){i=t},t.processNext=function(t,n){n?n.processNext(t):i&&tr(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(n){void 0===n&&(n=null);var r=n;r||(r=(e||new Zi(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return r},t._baseTelInit=function(r,s,o,a){r&&(r.extensionConfig=r.extensionConfig||[]),!a&&s&&(a=s.getProcessTelContext().getNext());var u=i;i&&i.getPlugin&&(u=i.getPlugin()),t.core=s,e=new Zi(a,r,s,u),n=!0}}return t.prototype.initialize=function(t,n,e,i){this._baseTelInit(t,n,e,i)},t}(),er=_i.isFunction;function ir(t,n){for(var e=[],i=null,r=t.getNext();r;){var s=r.getPlugin();s&&(i&&er(i.setNextPlugin)&&er(s.processTelemetry)&&i.setNextPlugin(s),er(s.isInitialized)&&s.isInitialized()||e.push(s),i=s,r=r.getNext())}_i.arrForEach(e,(function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())}))}function rr(t){return t.sort((function(t,n){var e=0,i=er(n.processTelemetry);return er(t.processTelemetry)?e=i?t.priority-n.priority:1:i&&(e=-1),e}))}var sr=_i.objDefineAccessors,or=function(t){function n(){var e=t.call(this)||this;e.identifier="ChannelControllerPlugin",e.priority=500;var i,r=_i.arrForEach;function s(t){t&&t.length>0&&(function(t){r(t,(function(t){if(t.priority<500)throw Error("Channel has invalid priority"+t.identifier)}))}(t=t.sort((function(t,n){return t.priority-n.priority}))),i.push(t))}return zi(n,e,(function(t,n){t.setNextPlugin=function(){},t.processTelemetry=function(t,n){i&&r(i,(function(i){i.length>0&&e._getTelCtx(n).createNew(i).processNext(t)}))},t.getChannelControls=function(){return i},t.initialize=function(e,o,a){t.isInitialized()||(n.initialize(e,o,a),e.isCookieUseDisabled&&_i.disableCookies(),function(t,n){if(i=[],t&&r(t,(function(t){return s(t)})),n){var e=[];r(n,(function(t){t.priority>500&&e.push(t)})),s(e)}}((e||{}).channels,a),r(i,(function(t){return ir(new Zi(t,e,o),a)})))}})),e}return __extends(n,t),n.prototype.processTelemetry=function(){},n.prototype.getChannelControls=function(){return null},n.prototype.initialize=function(){},n._staticInit=(sr(n.prototype,"ChannelControls",n.prototype.getChannelControls),void sr(n.prototype,"channelQueue",n.prototype.getChannelControls)),n}(nr),ar=_i.arrForEach,ur=_i.isNullOrUndefined,cr=function(){function t(){var n,e,i,r,s=!1;zi(t,this,(function(t){t._extensions=new Array,e=new or,t.logger=_i.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),n=[],t.isInitialized=function(){return s},t.initialize=function(n,r,o,a){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!n||ur(n.instrumentationKey))throw Error("Please provide instrumentation key");i=a,t._notificationManager=a,t.config=n||{},n.extensions=ur(n.extensions)?[]:n.extensions,(n.extensionConfig=ur(n.extensionConfig)?{}:n.extensionConfig).NotificationManager=a,o&&(t.logger=o);var u=[];u.push.apply(u,r.concat(n.extensions)),u=rr(u);var c=[],l={};if(ar(u,(function(t){if(ur(t)||ur(t.initialize))throw Error("Extensions must provide callback to initialize");var n=t.priority,i=t.identifier;t&&n&&(ur(l[n])?l[n]=i:o.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+i)),(!n||n<e.priority)&&c.push(t)})),u.push(e),c.push(e),u=rr(u),t._extensions=u,ir(new Zi([e],n,t),u),ir(new Zi(c,n,t),u),t._extensions=c,0===t.getTransmissionControls().length)throw new Error("No channels available");s=!0,t.releaseQueue()},t.getTransmissionControls=function(){return e.getChannelControls()},t.track=function(e){e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=_i.toISOString(new Date)),ur(e.ver)&&(e.ver="4.0"),t.isInitialized()?t.getProcessTelContext().processNext(e):n.push(e)},t.getProcessTelContext=function(){var n=t._extensions,i=n;return n&&0!==n.length||(i=[e]),new Zi(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=_i.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return r||t.config&&t.config.enablePerfMgr&&(r=new Xi(t.getNotifyMgr())),r},t.setPerfMgr=function(t){r=t},t.eventCnt=function(){return n.length},t.releaseQueue=function(){n.length>0&&(ar(n,(function(n){t.getProcessTelContext().processNext(n)})),n=[])}}))}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}(),lr=function(){function t(n){this.listeners=[];var e=_i.arrForEach,i=!!(n||{}).perfEvtsSendAll;zi(t,this,(function(t){t.addNotificationListener=function(n){t.listeners.push(n)},t.removeNotificationListener=function(n){for(var e=_i.arrIndexOf(t.listeners,n);e>-1;)t.listeners.splice(e,1),e=_i.arrIndexOf(t.listeners,n)},t.eventsSent=function(n){e(t.listeners,(function(t){t&&t.eventsSent&&setTimeout((function(){return t.eventsSent(n)}),0)}))},t.eventsDiscarded=function(n,i){e(t.listeners,(function(t){t&&t.eventsDiscarded&&setTimeout((function(){return t.eventsDiscarded(n,i)}),0)}))},t.eventsSendRequest=function(n,i){e(t.listeners,(function(t){if(t&&t.eventsSendRequest)if(i)setTimeout((function(){return t.eventsSendRequest(n,i)}),0);else try{t.eventsSendRequest(n,i)}catch(t){}}))},t.perfEvent=function(n){n&&(!i&&n.isChildEvt()||e(t.listeners,(function(t){if(t&&t.perfEvent)if(n.isAsync)setTimeout((function(){return t.perfEvent(n)}),0);else try{t.perfEvent(n)}catch(t){}})))}}))}return t.prototype.addNotificationListener=function(){},t.prototype.removeNotificationListener=function(){},t.prototype.eventsSent=function(){},t.prototype.eventsDiscarded=function(){},t.prototype.eventsSendRequest=function(){},t}(),dr=function(t){function n(){var e=t.call(this)||this;return zi(n,e,(function(t,n){function e(n){var e=t.getNotifyMgr();e&&e.eventsDiscarded([n],2)}t.initialize=function(t,e,i,r){n.initialize(t,e,i||new Wi(t),r||new lr(t))},t.track=function(i){Ji(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw e(i),Error("Invalid telemetry item");!function(t){if(_i.isNullOrUndefined(t.name))throw e(t),Error("telemetry name required")}(i),n.track(i)}),(function(){return{item:i}}),!i.sync)},t.addNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.addNotificationListener(n)},t.removeNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.removeNotificationListener(n)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&e>0||(e=1e4),setInterval((function(){var e=t.logger?t.logger.queue:[];_i.arrForEach(e,(function(e){var i={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:_i.toISOString(new Date),baseType:Hi.dataType,baseData:{message:e.message}};t.track(i)})),e.length=0}),e)}})),e}return __extends(n,t),n.prototype.initialize=function(){},n.prototype.track=function(){},n.prototype.addNotificationListener=function(){},n.prototype.removeNotificationListener=function(){},n.prototype.pollInternalLogs=function(){return 0},n}(cr),fr=["req","rsp","hkErr","fnErr"];function hr(t,n){if(t)for(var e=0;e<t.length&&!n(t[e],e);e++);}function pr(t,n,e,i,r){r>=0&&r<=2&&hr(t,(function(t,s){var o=t.cbks,a=o[fr[r]];if(a){n.ctx=function(){return i[s]=i[s]||{}};try{a.apply(n.inst,e)}catch(t){var u=n.err;try{var c=o[fr[2]];c&&(n.err=t,c.apply(n.inst,e))}catch(t){}finally{n.err=u}}}}))}var mr,vr,wr,yr=Object.getPrototypeOf;function gr(t,n,e){var i=null;return t&&(_i.hasOwnProperty(t,n)?i=t:e&&(i=gr(function(t){if(t){if(yr)return yr(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}(t),n,!1))),i}function br(t,n,e,i){if(void 0===i&&(i=!0),t&&n&&e){var r=gr(t,n,i);if(r){var s=r[n];if("function"==typeof s){var o=s._aiHooks;if(!o){var a=(c=o={i:0,n,f:s,h:[]},function(){var t=this,n=arguments,e=c.h,i={name:c.n,inst:t,ctx:null,set:a},r=[],s=o([i],n);function o(t,n){return hr(n,(function(n){t.push(n)})),t}function a(t,e){(n=o([],n))[t]=e,s=o([i],n)}pr(e,i,s,r,0);var u=c.f;try{i.rslt=u.apply(t,n)}catch(t){throw i.err=t,pr(e,i,s,r,3),t}return pr(e,i,s,r,1),i.rslt});a._aiHooks=o,r[n]=a}var u={id:o.i,cbks:e,rm:function(){var t=this.id;hr(o.h,(function(n,e){if(n.id===t)return o.h.splice(e,1),1}))}};return o.i++,o.h.push(u),u}}}var c;return null}!function(t){t[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage"}(mr||(mr={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(vr||(vr={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(wr||(wr={}));var xr,kr=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}(),Sr=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(n,e,i){var r=e.length,s=t.sanitizeKey(n,e);if(s.length!==r){for(var o=0,a=s;void 0!==i[a];)o++,a=s.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(o);s=a}return s},t.sanitizeKey=function(n,e){var i;return e&&(e=t.trim(e.toString())).length>t.MAX_NAME_LENGTH&&(i=e.substring(0,t.MAX_NAME_LENGTH),n.throwInternal(Ai.WARNING,57,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},t.sanitizeString=function(n,e,i){var r;return void 0===i&&(i=t.MAX_STRING_LENGTH),e&&(i=i||t.MAX_STRING_LENGTH,(e=t.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),n.throwInternal(Ai.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},t.sanitizeUrl=function(n,e){return t.sanitizeInput(n,e,t.MAX_URL_LENGTH,66)},t.sanitizeMessage=function(n,e){var i;return e&&e.length>t.MAX_MESSAGE_LENGTH&&(i=e.substring(0,t.MAX_MESSAGE_LENGTH),n.throwInternal(Ai.WARNING,56,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},t.sanitizeException=function(n,e){var i;return e&&e.length>t.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,t.MAX_EXCEPTION_LENGTH),n.throwInternal(Ai.WARNING,52,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},t.sanitizeProperties=function(n,e){if(e){var i={};Ci(e,(function(e,r){if(_i.isObject(r)&&ui())try{r=ci().stringify(r)}catch(t){n.throwInternal(Ai.WARNING,49,"custom property is not valid",{exception:t},!0)}r=t.sanitizeString(n,r,t.MAX_PROPERTY_LENGTH),e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeMeasurements=function(n,e){if(e){var i={};Ci(e,(function(e,r){e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeId=function(n,e){return e?t.sanitizeInput(n,e,t.MAX_ID_LENGTH,69).toString():e},t.sanitizeInput=function(n,e,i,r){var s;return e&&(e=t.trim(e)).length>i&&(s=e.substring(0,i),n.throwInternal(Ai.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),s||e},t.padNumber=function(t){var n="00"+t;return n.substr(n.length-3)},t.trim=function(t){return _i.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}(),Cr=si(),Ar=_i.isString,_r=null,Fr=function(){function t(){}return t.createDomEvent=function(t){var n=null;if(_i.isFunction(Event))n=new Event(t);else{var e=ri();e&&e.createEvent&&(n=e.createEvent("Event")).initEvent(t,!0,!0)}return n},t.disableStorage=function(){t._canUseLocalStorage=!1,t._canUseSessionStorage=!1},t._getLocalStorageObject=function(){return t.canUseLocalStorage()?t._getVerifiedStorageObject(mr.LocalStorage):null},t._getVerifiedStorageObject=function(t){var n,e,i=null;try{if(_i.isNullOrUndefined(Ze()))return null;e=new Date,(i=ti(t===mr.LocalStorage?"localStorage":"sessionStorage")).setItem(e.toString(),e.toString()),n=i.getItem(e.toString())!==e.toString(),i.removeItem(e.toString()),n&&(i=null)}catch(t){i=null}return i},t.isInternalApplicationInsightsEndpoint=function(n){return-1!==t._internalEndpoints.indexOf(n.toLowerCase())},t.canUseLocalStorage=function(){return void 0===t._canUseLocalStorage&&(t._canUseLocalStorage=!!t._getVerifiedStorageObject(mr.LocalStorage)),t._canUseLocalStorage},t.getStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Ai.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setStorage=function(n,e,i){var r=t._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Ai.WARNING,3,"Browser failed write to local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(Ai.WARNING,5,"Browser failed removal of local storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t._getSessionStorageObject=function(){return t.canUseSessionStorage()?t._getVerifiedStorageObject(mr.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(mr.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var n=[];return t.canUseSessionStorage()&&Ci(ti("sessionStorage"),(function(t){n.push(t)})),n},t.getSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Ai.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setSessionStorage=function(n,e,i){var r=t._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Ai.WARNING,4,"Browser failed write to session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(Ai.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.disableCookies=function(){_i.disableCookies()},t.canUseCookies=function(n){if(void 0===_i._canUseCookies){_i._canUseCookies=!1;try{_i._canUseCookies=void 0!==t.document.cookie}catch(e){n.throwInternal(Ai.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(e),{exception:t.dump(e)})}}return _i._canUseCookies},t.disallowsSameSiteNone=function(t){return!!Ar(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)"===(n=t).substring((i=(e=n.length)-"AppleWebKit/605.1.15 (KHTML, like Gecko)".length)>=0?i:0,e)||-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 n,e,i},t.setCookie=function(n,e,i,r){if(t.canUseCookies(n)){var s="",o="";r&&(s=";domain="+r);var a=oi();a&&"https:"===a.protocol&&(o=";secure",null===_r&&(_r=t.disallowsSameSiteNone((si()||{}).userAgent)),_r||(i+=";SameSite=None")),t.document.cookie=e+"="+i+s+";path=/"+o}},t.stringToBoolOrDefault=function(t,n){return void 0===n&&(n=!1),null==t?n:"true"===t.toString().toLowerCase()},t.getCookie=function(n,e){if(t.canUseCookies(n)){var i="";if(e&&e.length)for(var r=e+"=",s=t.document.cookie.split(";"),o=0;o<s.length;o++){var a=s[o];if((a=t.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,s[o].length);break}}return i}},t.deleteCookie=function(n,e){t.canUseCookies(n)&&(t.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},t.random32=function(){return _i.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var n=t?t.toLowerCase():Cr?(Cr.userAgent||"").toLowerCase():"";if(-1!==n.indexOf("msie"))return parseInt(n.split("msie")[1]);if(n.indexOf("trident/")){var e=parseInt(n.split("trident/")[1]);if(e)return e+4}return null},t.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var n=""+(t=Math.round(t))%1e3,e=""+Math.floor(t/1e3)%60,i=""+Math.floor(t/6e4)%60,r=""+Math.floor(t/36e5)%24,s=Math.floor(t/864e5);return(s>0?s+".":"")+(r=r.length<2?"0"+r:r)+":"+(i=i.length<2?"0"+i:i)+":"+(e=e.length<2?"0"+e:e)+"."+(1===n.length?"00"+n:2===n.length?"0"+n:n)},t.isCrossOriginError=function(t,n,e,i,r){return("Script error."===t||"Script error"===t)&&!r},t.dump=function(t){var n=Object.prototype.toString.call(t),e="";return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":ui()&&(e=ci().stringify(t)),n+e},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,n){return Mi.Attach(ei(),t,n)},t.IsBeaconApiSupported=function(){return"sendBeacon"in Cr&&Cr.sendBeacon},t.getExtension=function(t,n){for(var e=null,i=0;!e&&i<t.length;)t[i]&&t[i].identifier===n&&(e=t[i]),i++;return e},t.document=ri()||{},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=_i.strTrim,t.newId=_i.newId,t.generateW3CId=_i.generateW3CId,t.isArray=_i.isArray,t.isError=_i.isError,t.isDate=_i.isDate,t.toISOStringForIE8=_i.toISOString,t}(),Mr=function(){function t(){}return t.parseUrl=function(n){var e=t._htmlAnchorIdx,i=t._htmlAnchorElement,r=i[e];return t.document.createElement?i[e]||(r=i[e]=t.document.createElement("a")):r={host:t.parseHost(n,!0)},r.href=n,++e>=i.length&&(e=0),t._htmlAnchorIdx=e,r},t.getAbsoluteUrl=function(n){var e,i=t.parseUrl(n);return i&&(e=i.href),e},t.getPathName=function(n){var e,i=t.parseUrl(n);return i&&(e=i.pathname),e},t.getCompleteUrl=function(t,n){return t?t.toUpperCase()+" "+n:n},t.parseHost=function(n,e){var i=t.parseFullHost(n,e);if(i){var r=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&Ar(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return i},t.parseFullHost=function(t,n){var e=null;if(t){var i=t.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&Ar(i[2])&&i[2].length>0&&(e=i[2]||"",n&&i.length>2)){var r=(i[1]||"").toLowerCase(),s=i[3]||"";("http"===r&&":80"===s||"https"===r&&":443"===s)&&(s=""),e+=s}}return e},t.document=ri()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),Ir=function(){function t(){}return t.canIncludeCorrelationHeader=function(t,n,e){if(!n||t&&t.disableCorrelationHeaders)return!1;if(t&&t.correlationHeaderExcludePatterns)for(var i=0;i<t.correlationHeaderExcludePatterns.length;i++)if(t.correlationHeaderExcludePatterns[i].test(n))return!1;var r=Mr.parseUrl(n).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(Mr.parseFullHost(n,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||r===e))return!1;var s,o=t&&t.correlationHeaderDomains;if(o&&(_i.arrForEach(o,(function(t){var n=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));s=s||n.test(r)})),!s))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(new RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&r.length>0},t.getCorrelationContext=function(n){if(n){var e=t.getCorrelationContextValue(n,kr.requestContextTargetKey);if(e&&e!==t.correlationIdPrefix)return e}},t.getCorrelationContextValue=function(t,n){if(t)for(var e=t.split(","),i=0;i<e.length;++i){var r=e[i].split("=");if(2===r.length&&r[0]===n)return r[1]}},t.correlationIdPrefix="cid-v1:",t}(),Tr=function(){function t(){}return t.ParseDependencyPath=function(t,n,e,i){var r,s=i,o=i;if(n&&n.length>0){var a=Mr.parseUrl(n);if(r=a.host,!s)if(null!=a.pathname){var u=0===a.pathname.length?"/":a.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=a.pathname,s=Sr.sanitizeString(t,e?e+" "+u:u)}else s=Sr.sanitizeString(t,n)}else r=i,s=i;return{target:r,name:s,data:o}},t}(),Er=function(){function t(){}return t.Now=function(){var t=ai();if(t&&t.now&&t.timing){var n=t.now()+t.timing.navigationStart;if(n>0)return n}return(new Date).getTime()},t.GetDuration=function(t,n){var e=null;return 0===t||0===n||_i.isNullOrUndefined(t)||_i.isNullOrUndefined(n)||(e=n-t),e},t}(),jr="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Br=function(){function t(){}return t.parse=function(n){if(!n)return{};var e=n.split(t._FIELDS_SEPARATOR),i=_i.arrReduce(e,(function(n,e){var i=e.split(t._FIELD_KEY_VALUE_SEPARATOR);return 2===i.length&&(n[i[0].toLowerCase()]=i[1]),n}),{});return _i.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}(),Nr=function(t){function n(){return t.call(this)||this}return __extends(n,t),n}((function(){})),Pr=function(t){function n(n,e,i){var r=t.call(this)||this;return r.name=Sr.sanitizeString(n,i)||Fr.NotSpecified,r.data=e,r.time=_i.toISOString(new Date),r.aiDataContract={time:vr.Required,iKey:vr.Required,name:vr.Required,sampleRate:function(){return 100===r.sampleRate?vr.Hidden:vr.Required},tags:vr.Required,data:vr.Required},r}return __extends(n,t),n}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),Rr=function(){},Or=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Rr),Dr=function(t){function n(n,e,i,r){var s=t.call(this)||this;return s.aiDataContract={ver:vr.Required,name:vr.Required,properties:vr.Default,measurements:vr.Default},s.name=Sr.sanitizeString(n,e)||Fr.NotSpecified,s.properties=Sr.sanitizeProperties(n,i),s.measurements=Sr.sanitizeMeasurements(n,r),s}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(Or),Lr=function(t){function n(n,e,i,r,s,o){var a,u=t.call(this)||this;return u.aiDataContract={ver:vr.Required,exceptions:vr.Required,severityLevel:vr.Default,properties:vr.Default,measurements:vr.Default},"ver"in(a=e)&&"exceptions"in a&&"properties"in a?(u.exceptions=e.exceptions,u.properties=e.properties,u.measurements=e.measurements,e.severityLevel&&(u.severityLevel=e.severityLevel),e.id&&(u.id=e.id),e.problemGroup&&(u.problemGroup=e.problemGroup),u.ver=2,_i.isNullOrUndefined(e.isManual)||(u.isManual=e.isManual)):(u.exceptions=[new Ur(n,e)],u.properties=Sr.sanitizeProperties(n,i)||{},u.measurements=Sr.sanitizeMeasurements(n,r),s&&(u.severityLevel=s),o&&(u.id=o)),u}return __extends(n,t),n.CreateFromInterface=function(t,e,i,r){var s=e.exceptions&&_i.arrMap(e.exceptions,(function(n){return Ur.CreateFromInterface(t,n)}));return new n(t,__assign({},e,{exceptions:s}),i,r)},n.prototype.toInterface=function(){var t=this,n=t.exceptions,e=t.properties,i=t.measurements,r=t.severityLevel,s=t.problemGroup,o=t.id,a=t.isManual;return{ver:"4.0",exceptions:n instanceof Array&&_i.arrMap(n,(function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:s,id:o,isManual:a}},n.CreateSimpleException=function(t,n,e,i,r){return{exceptions:[{hasFullStack:!0,message:t,stack:r,typeName:n}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.exceptions=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(Rr)),Ur=function(t){function n(e,i){var r,s=t.call(this)||this;if(s.aiDataContract={id:vr.Default,outerId:vr.Default,typeName:vr.Required,message:vr.Required,hasFullStack:vr.Default,stack:vr.Default,parsedStack:vr.Array},"hasFullStack"in(r=i)&&"typeName"in r)s.typeName=i.typeName,s.message=i.message,s.stack=i.stack,s.parsedStack=i.parsedStack,s.hasFullStack=i.hasFullStack;else{var o=i;Fr.isError(o)||(o=o.error||o.evt||o),s.typeName=Sr.sanitizeString(e,function(t){var n="";if(t&&!(n=t.typeName||t.name||""))try{var e=/function (.{1,})\(/.exec(t.constructor.toString());n=e&&e.length>1?e[1]:""}catch(t){}return n}(o))||Fr.NotSpecified,s.message=Sr.sanitizeMessage(e,i.message)||Fr.NotSpecified;var a=i.stack;s.parsedStack=n.parseStack(a),s.stack=Sr.sanitizeException(e,a),s.hasFullStack=Fr.isArray(s.parsedStack)&&s.parsedStack.length>0}return s}return __extends(n,t),n.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&_i.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}},n.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&_i.arrMap(e.parsedStack,(function(t){return qr.CreateFromInterface(t)}))||e.parsedStack;return new n(t,__assign({},e,{parsedStack:i}))},n.parseStack=function(t){var n;if(_i.isString(t)){var e=t.split("\n");n=[];for(var i=0,r=0,s=0;s<=e.length;s++)if(qr.regex.test(e[s])){var o=new qr(e[s],i++);r+=o.sizeInBytes,n.push(o)}if(r>32768)for(var a=0,u=n.length-1,c=0,l=a,d=u;a<u;){if((c+=n[a].sizeInBytes+n[u].sizeInBytes)>32768){n.splice(l,d-l+1);break}l=a,d=u,a++,u--}}return n},n}((function(){this.hasFullStack=!0,this.parsedStack=[]})),qr=function(t){function n(e,i){var r=t.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:vr.Required,method:vr.Required,assembly:vr.Default,fileName:vr.Default,line:vr.Default},"string"==typeof e){var s=e;r.level=i,r.method="<no_method>",r.assembly=Fr.trim(s),r.fileName="",r.line=0;var o=s.match(n.regex);o&&o.length>=5&&(r.method=Fr.trim(o[2])||r.method,r.fileName=Fr.trim(o[4]),r.line=parseInt(o[5])||0)}else r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=n.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return __extends(n,t),n.CreateFromInterface=function(t){return new n(t,null)},n.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}((function(){})),zr=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.metrics=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(Rr);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(xr||(xr={}));var Vr,Hr=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:vr.Required,kind:vr.Default,value:vr.Required,count:vr.Default,min:vr.Default,max:vr.Default,stdDev:vr.Default},n}return __extends(n,t),n}((function(){this.kind=xr.Measurement})),Wr=function(t){function n(n,e,i,r,s,o,a,u){var c=t.call(this)||this;c.aiDataContract={ver:vr.Required,metrics:vr.Required,properties:vr.Default};var l=new Hr;return l.count=r>0?r:void 0,l.max=isNaN(o)||null===o?void 0:o,l.min=isNaN(s)||null===s?void 0:s,l.name=Sr.sanitizeString(n,e)||Fr.NotSpecified,l.value=i,c.metrics=[l],c.properties=Sr.sanitizeProperties(n,a),c.measurements=Sr.sanitizeMeasurements(n,u),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",n.dataType="MetricData",n}(zr),$r=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Or),Xr=function(t){function n(n,e,i,r,s,o,a){var u=t.call(this)||this;return u.aiDataContract={ver:vr.Required,name:vr.Default,url:vr.Default,duration:vr.Default,properties:vr.Default,measurements:vr.Default,id:vr.Default},u.id=Sr.sanitizeId(n,a),u.url=Sr.sanitizeUrl(n,i),u.name=Sr.sanitizeString(n,e)||Fr.NotSpecified,isNaN(r)||(u.duration=Fr.msToTimeSpan(r)),u.properties=Sr.sanitizeProperties(n,s),u.measurements=Sr.sanitizeMeasurements(n,o),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",n.dataType="PageviewData",n}($r),Jr=function(t){function n(n,e,i,r,s,o,a,u,c,l,d,f){void 0===c&&(c="Ajax");var h=t.call(this)||this;h.aiDataContract={id:vr.Required,ver:vr.Required,name:vr.Default,resultCode:vr.Default,duration:vr.Default,success:vr.Default,data:vr.Default,target:vr.Default,type:vr.Default,properties:vr.Default,measurements:vr.Default,kind:vr.Default,value:vr.Default,count:vr.Default,min:vr.Default,max:vr.Default,stdDev:vr.Default,dependencyKind:vr.Default,dependencySource:vr.Default,commandName:vr.Default,dependencyTypeName:vr.Default},h.id=e,h.duration=Fr.msToTimeSpan(s),h.success=o,h.resultCode=a+"",h.type=Sr.sanitizeString(n,c);var p=Tr.ParseDependencyPath(n,i,u,r);return h.data=Sr.sanitizeUrl(n,r)||p.data,h.target=Sr.sanitizeString(n,p.target),l&&(h.target=h.target+" | "+l),h.name=Sr.sanitizeString(n,p.name),h.properties=Sr.sanitizeProperties(n,d),h.measurements=Sr.sanitizeMeasurements(n,f),h}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",n.dataType="RemoteDependencyData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.success=!0,n.properties={},n.measurements={},n}return __extends(n,t),n}(Rr)),Yr=function(t){function n(n,e,i,r,s){var o=t.call(this)||this;return o.aiDataContract={ver:vr.Required,message:vr.Required,severityLevel:vr.Default,properties:vr.Default},o.message=Sr.sanitizeMessage(n,e=e||Fr.NotSpecified),o.properties=Sr.sanitizeProperties(n,r),o.measurements=Sr.sanitizeMeasurements(n,s),i&&(o.severityLevel=i),o}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Message",n.dataType="MessageData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Rr)),Gr=function(t){function n(n,e,i,r,s,o,a){var u=t.call(this)||this;return u.aiDataContract={ver:vr.Required,name:vr.Default,url:vr.Default,duration:vr.Default,perfTotal:vr.Default,networkConnect:vr.Default,sentRequest:vr.Default,receivedResponse:vr.Default,domProcessing:vr.Default,properties:vr.Default,measurements:vr.Default},u.url=Sr.sanitizeUrl(n,i),u.name=Sr.sanitizeString(n,e)||Fr.NotSpecified,u.properties=Sr.sanitizeProperties(n,s),u.measurements=Sr.sanitizeMeasurements(n,o),a&&(u.domProcessing=a.domProcessing,u.duration=a.duration,u.networkConnect=a.networkConnect,u.perfTotal=a.perfTotal,u.receivedResponse=a.receivedResponse,u.sentRequest=a.sentRequest),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",n.dataType="PageviewPerformanceData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}($r)),Kr=function(t){function n(n,e){var i=t.call(this)||this;return i.aiDataContract={baseType:vr.Required,baseData:vr.Required},i.baseType=n,i.baseData=e,i}return __extends(n,t),n}(Nr);!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"}(Vr||(Vr={}));var Qr=function(){this.applicationVersion="ai.application.ver",this.applicationBuild="ai.application.build",this.applicationTypeId="ai.application.typeId",this.applicationId="ai.application.applicationId",this.applicationLayer="ai.application.layer",this.deviceId="ai.device.id",this.deviceIp="ai.device.ip",this.deviceLanguage="ai.device.language",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceFriendlyName="ai.device.friendlyName",this.deviceNetwork="ai.device.network",this.deviceNetworkName="ai.device.networkName",this.deviceOEMName="ai.device.oemName",this.deviceOS="ai.device.os",this.deviceOSVersion="ai.device.osVersion",this.deviceRoleInstance="ai.device.roleInstance",this.deviceRoleName="ai.device.roleName",this.deviceScreenResolution="ai.device.screenResolution",this.deviceType="ai.device.type",this.deviceMachineName="ai.device.machineName",this.deviceVMName="ai.device.vmName",this.deviceBrowser="ai.device.browser",this.deviceBrowserVersion="ai.device.browserVersion",this.locationIp="ai.location.ip",this.locationCountry="ai.location.country",this.locationProvince="ai.location.province",this.locationCity="ai.location.city",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationRootId="ai.operation.rootId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.sessionIsNew="ai.session.isNew",this.userAccountAcquisitionDate="ai.user.accountAcquisitionDate",this.userAccountId="ai.user.accountId",this.userAgent="ai.user.userAgent",this.userId="ai.user.id",this.userStoreRegion="ai.user.storeRegion",this.userAuthUserId="ai.user.authUserId",this.userAnonymousUserAcquisitionDate="ai.user.anonUserAcquisitionDate",this.userAuthenticatedUserAcquisitionDate="ai.user.authUserAcquisitionDate",this.cloudName="ai.cloud.name",this.cloudRole="ai.cloud.role",this.cloudRoleVer="ai.cloud.roleVer",this.cloudRoleInstance="ai.cloud.roleInstance",this.cloudEnvironment="ai.cloud.environment",this.cloudLocation="ai.cloud.location",this.cloudDeploymentUnit="ai.cloud.deploymentUnit",this.internalNodeName="ai.internal.nodeName",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalSnippet="ai.internal.snippet",this.internalSdkSrc="ai.internal.sdkSrc"},Zr=function(){function t(){}return t.create=function(t,n,e,i,r,s){if(e=Sr.sanitizeString(i,e)||Fr.NotSpecified,_i.isNullOrUndefined(t)||_i.isNullOrUndefined(n)||_i.isNullOrUndefined(e))throw Error("Input doesn't contain all required fields");var o={name:e,time:_i.toISOString(new Date),iKey:"",ext:s||{},tags:[],data:{},baseType:n,baseData:t};return _i.isNullOrUndefined(r)||Ci(r,(function(t,n){o.data[t]=n})),o},t}(),ts=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}(),ns=new Qr,es=function t(n,e,i,r){zi(t,this,(function(t){var s,o=_i.arrForEach,a=_i.isNullOrUndefined,u=null,c=[],l=!1;function d(){i&&o(i.getTransmissionControls(),(function(t){o(t,(function(t){return t.flush(!0)}))}))}i&&(s=i.logger),t.trackPageView=function(t,i){var f=t.name;if(a(f)||"string"!=typeof f){var h=ri();f=t.name=h&&h.title||""}var p=t.uri;if(a(p)||"string"!=typeof p){var m=oi();p=t.uri=m&&m.href||""}if(!r.isPerformanceTimingSupported())return n.sendPageViewInternal(t,i),d(),void s.throwInternal(Ai.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,y=!1,g=r.getPerformanceTiming().navigationStart;g>0&&(v=Er.GetDuration(g,+new Date),r.shouldCollectDuration(v)||(v=void 0)),a(i)||a(i.duration)||(w=i.duration),!e&&isNaN(w)||(isNaN(w)&&(i||(i={}),i.duration=v),n.sendPageViewInternal(t,i),d(),y=!0),i||(i={}),c.push((function(){var e=!1;try{if(r.isPerformanceTimingDataReady()){e=!0;var o={name:f,uri:p};r.populatePageViewPerformanceEvent(o),o.isValid||y?(y||(i.duration=o.durationMs,n.sendPageViewInternal(t,i)),l||(n.sendPageViewPerformanceInternal(o,i),l=!0)):(i.duration=v,n.sendPageViewInternal(t,i))}else g>0&&Er.GetDuration(g,+new Date)>6e4&&(e=!0,y||(i.duration=6e4,n.sendPageViewInternal(t,i)))}catch(t){s.throwInternal(Ai.CRITICAL,38,"trackPageView failed on page load calculation: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}return e})),u||(u=setInterval((function(){var t=c.slice(0),n=!1;c=[],o(t,(function(t){t()?n=!0:c.push(t)})),0===c.length&&(clearInterval(u),u=null),n&&d()}),100))}}))},is=function(){function t(t,n){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=n,this._logger=t}return t.prototype.trackPreviousPageVisit=function(t,n){try{var e=this.restartPageVisitTimer(t,n);e&&this.pageVisitTimeTrackingHandler(e.pageName,e.pageUrl,e.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Fr.dump(t))}},t.prototype.restartPageVisitTimer=function(t,n){try{var e=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),e}catch(t){return this._logger.warnToConsole("Call to restart failed: "+Fr.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(Fr.canUseSessionStorage()){if(null!=Fr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var e=new rs(t,n),i=ci().stringify(e);Fr.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+Fr.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(Fr.canUseSessionStorage()){var t=_i.dateNow(),n=Fr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(n&&ui()){var e=ci().parse(n);return e.pageVisitTime=t-e.pageVisitStartTime,Fr.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),e}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+Fr.dump(t)),null}},t}(),rs=function(t,n){this.pageVisitStartTime=_i.dateNow(),this.pageName=t,this.pageUrl=n},ss=function(){function t(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}return t.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var n=this.getPerformanceNavigationTiming(),e=this.getPerformanceTiming();if(n||e){if(n)var i=n.duration,r=Er.GetDuration(n.startTime,n.connectEnd),s=Er.GetDuration(n.requestStart,n.responseStart),o=Er.GetDuration(n.responseStart,n.responseEnd),a=Er.GetDuration(n.responseEnd,n.loadEventEnd);else i=Er.GetDuration(e.navigationStart,e.loadEventEnd),r=Er.GetDuration(e.navigationStart,e.connectEnd),s=Er.GetDuration(e.requestStart,e.responseStart),o=Er.GetDuration(e.responseStart,e.responseEnd),a=Er.GetDuration(e.responseEnd,e.loadEventEnd);0===i?this._logger.throwInternal(Ai.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:s,response:o,dom:a}):this.shouldCollectDuration(i,r,s,o,a)?i<Math.floor(r)+Math.floor(s)+Math.floor(o)+Math.floor(a)?this._logger.throwInternal(Ai.WARNING,8,"client performance math error.",{total:i,network:r,request:s,response:o,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=Fr.msToTimeSpan(i),t.networkConnect=Fr.msToTimeSpan(r),t.sentRequest=Fr.msToTimeSpan(s),t.receivedResponse=Fr.msToTimeSpan(o),t.domProcessing=Fr.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(Ai.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:s,response:o,dom:a})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?ai().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?ai().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=ai();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=ai();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=ai(),n=t?t.timing:0;return n&&n.domainLookupStart>0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},t.prototype.shouldCollectDuration=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=si()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=e.userAgent,s=!1;if(r)for(var o=0;o<i.length;o++)s=s||-1!==r.toLowerCase().indexOf(i[o]);if(s)return!1;for(o=0;o<t.length;o++)if(t[o]<0||t[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},t}();function os(t,n){t&&t.dispatchEvent&&n&&t.dispatchEvent(n)}var as=function(t){function n(){var n=t.call(this)||this;n.identifier="ApplicationInsightsAnalytics",n.priority=180,n.autoRoutePVDelay=500,n._trackAjaxAttempts=0;var e=oi();return n._prevUri=e&&e.href||"",n}return __extends(n,t),n.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=Fr.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=Fr.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=Fr.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=Fr.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=Fr.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=Fr.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Fr.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Fr.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},n.prototype.processTelemetry=function(t,n){var e=this;Ji(this.core,(function(){return e.identifier+":processTelemetry"}),(function(){var i=!1,r=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var s=0;s<r;++s){var o=e._telemetryInitializers[s];if(o)try{if(!1===o.apply(null,[t])){i=!0;break}}catch(t){n.diagLog().throwInternal(Ai.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Fr.getExceptionName(t),{exception:Fr.dump(t)},!0)}}i||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},n.prototype.trackEvent=function(t,n){try{var e=Zr.create(t,Dr.dataType,Dr.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Ai.WARNING,39,"trackTrace failed, trace will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.stopTrackEvent=function(t,n){try{this._eventTracking.stop(t,void 0,n)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.trackTrace=function(t,n){try{var e=Zr.create(t,Yr.dataType,Yr.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Ai.WARNING,39,"trackTrace failed, trace will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.trackMetric=function(t,n){try{var e=Zr.create(t,Wr.dataType,Wr.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,36,"trackMetric failed, metric will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.trackPageView=function(t,n){try{var e=t||{};this._pageViewManager.trackPageView(e,__assign({},e.properties,e.measurements,n)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,37,"trackPageView failed, page view will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.sendPageViewInternal=function(t,n,e){var i=ri();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var r=Zr.create(t,Xr.dataType,Xr.envelopeType,this.diagLog(),n,e);this.core.track(r),this._trackAjaxAttempts=0},n.prototype.sendPageViewPerformanceInternal=function(t,n,e){var i=Zr.create(t,Gr.dataType,Gr.envelopeType,this.diagLog(),n,e);this.core.track(i)},n.prototype.trackPageViewPerformance=function(t,n){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,n)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var n=ri();t=n&&n.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.stopTrackPage=function(t,n,e,i){try{if("string"!=typeof t){var r=ri();t=r&&r.title||""}if("string"!=typeof n){var s=oi();n=s&&s.href||""}this._pageTracking.stop(t,n,e,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype.sendExceptionInternal=function(t,n,e){var i=new Lr(this.diagLog(),t.exception||new Error(Fr.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),r=Zr.create(i,Lr.dataType,Lr.envelopeType,this.diagLog(),n,e);this.core.track(r)},n.prototype.trackException=function(t,n){try{this.sendExceptionInternal(t,n)}catch(t){this.diagLog().throwInternal(Ai.CRITICAL,35,"trackException failed, exception will not be collected: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}},n.prototype._onerror=function(t){try{var n={url:t&&t.url||(ri()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(Fr.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(n.url);else{if(!Fr.isError(t.error)){var e="window.onerror@"+n.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=e}this.trackException({exception:t.error,severityLevel:Vr.Error},n)}}catch(n){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(Ai.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+Fr.getExceptionName(n),{exception:Fr.dump(n),errorString:i})}},n.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype.initialize=function(e,i,r,s){var o=this;if(!this.isInitialized()){if(_i.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,e,i,r,s),this.setInitialized(!1);var a=this._getTelCtx(),u=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=a.getExtCfg(u);var c=n.getDefaultConfig();void 0!==c&&(Ci(c,(function(t,n){o.config[t]=a.getConfig(u,t,n)})),this._globalconfig&&Ci(c,(function(t,n){void 0===o._globalconfig[t]&&(o._globalconfig[t]=n)}))),this.config.isCookieUseDisabled&&Fr.disableCookies(),this.config.isStorageUseDisabled&&Fr.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new ss(this.core),this._pageViewManager=new es(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new is(this.diagLog(),(function(t,n,e){return o.trackPageVisitTime(t,n,e)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new us(this.diagLog(),"trackEvent"),this._eventTracking.action=function(t,n,e,i){i||(i={}),i.duration=e.toString(),o.trackEvent({name:t,properties:i})},this._pageTracking=new us(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,n,e,i,r){_i.isNullOrUndefined(i)&&(i={}),i.duration=e.toString(),o.sendPageViewInternal({name:t,uri:n,properties:i,measurements:r},i)};var d,f=ei(),h=Boolean("object"==typeof history&&history)?history:ti("history"),p=oi(),m=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var v=f.onerror;f.onerror=function(t,n,e,i,r){var s=v&&v(t,n,e,i,r);return!0!==s&&m._onerror({message:t,url:n,lineNumber:e,columnNumber:i,error:r}),s},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var w=f.onunhandledrejection;f.onunhandledrejection=function(t){var n=w&&w.call(f,t);return!0!==n&&m._onerror({message:t.reason.toString(),error:t.reason instanceof Error?t.reason:new Error(t.reason.toString()),url:p?p.href:"",lineNumber:0,columnNumber:0}),n},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&h&&_i.isFunction(h.pushState)&&_i.isFunction(h.replaceState)&&f&&"undefined"!=typeof Event){var y=this;_i.arrForEach(r,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(o._properties=t)})),h.pushState=(d=h.pushState,function(){var t=d.apply(this,arguments);return os(f,Fr.createDomEvent(y.config.namePrefix+"pushState")),os(f,Fr.createDomEvent(y.config.namePrefix+"locationchange")),t}),h.replaceState=function(t){return function(){var n=t.apply(this,arguments);return os(f,Fr.createDomEvent(y.config.namePrefix+"replaceState")),os(f,Fr.createDomEvent(y.config.namePrefix+"locationchange")),n}}(h.replaceState),f.addEventListener&&(f.addEventListener(y.config.namePrefix+"popstate",(function(){os(f,Fr.createDomEvent(y.config.namePrefix+"locationchange"))})),f.addEventListener(y.config.namePrefix+"locationchange",(function(){y._properties&&y._properties.context&&y._properties.context.telemetryTrace&&(y._properties.context.telemetryTrace.traceID=Fr.generateW3CId(),y._properties.context.telemetryTrace.name=p&&p.pathname||"_unknown_"),o._currUri?(o._prevUri=o._currUri,o._currUri=p&&p.href||""):o._currUri=p&&p.href||"",setTimeout(function(t){y.trackPageView({refUri:t,properties:{duration:0}})}.bind(o,o._prevUri),y.autoRoutePVDelay)})))}this.setInitialized(!0)}},n.prototype.trackPageVisitTime=function(t,n,e){this.trackMetric({name:"PageVisitTime",average:e,max:e,min:e,sampleCount:1},{PageName:t,PageUrl:n})},n.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===Jr.dataType){var e=t.baseData;if(e)for(var i=0;i<n.length;i++)if(e.target&&e.target.indexOf(n[i])>=0)return!1}return!0}))}},n.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype._sendCORSException=function(t){var n=Zr.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},Lr.dataType,Lr.envelopeType,this.diagLog(),{url:t});this.core.track(n)},n.Version="2.5.10",n}(nr),us=function(){function t(t,n){this._name=n,this._events={},this._logger=t}return t.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(Ai.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,n,e,i){var r=this._events[t];if(isNaN(r))this._logger.throwInternal(Ai.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var s=+new Date,o=Er.GetDuration(r,s);this.action(t,n,o,e,i)}delete this._events[t],this._events[t]=void 0},t}(),cs=function t(n){var e=[];zi(t,this,(function(t){t.enqueue=function(t){e.push(t)},t.count=function(){return e.length},t.clear=function(){e.length=0},t.getItems=function(){return e.slice(0)},t.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},t.markAsSent=function(){t.clear()},t.clearSent=function(){}}))},ls=function(){function t(n,e){var i,r=!1;zi(t,this,(function(s){var o=c(t.BUFFER_KEY),a=c(t.SENT_BUFFER_KEY);function u(t,n){var e=[];return _i.arrForEach(n,(function(n){_i.isFunction(n)||-1!==_i.arrIndexOf(t,n)||e.push(n)})),e}function c(t){var i=t;try{i=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+i:i;var r=Fr.getSessionStorage(n,i);if(r){var s=ci().parse(r);if(_i.isString(s)&&(s=ci().parse(s)),s&&Fr.isArray(s))return s}}catch(t){n.throwInternal(Ai.CRITICAL,42," storage key: "+i+", "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}return[]}function l(t,i){var r=t;try{r=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+r:r;var s=JSON.stringify(i);Fr.setSessionStorage(n,r,s)}catch(t){Fr.setSessionStorage(n,r,JSON.stringify([])),n.throwInternal(Ai.WARNING,41," storage key: "+r+", "+Fr.getExceptionName(t)+". Buffer cleared",{exception:Fr.dump(t)})}}(i=o.concat(a)).length>t.MAX_BUFFER_SIZE&&(i.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,[]),l(t.BUFFER_KEY,i),s.enqueue=function(e){i.length>=t.MAX_BUFFER_SIZE?r||(n.throwInternal(Ai.WARNING,67,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(e),l(t.BUFFER_KEY,i))},s.count=function(){return i.length},s.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),r=!1},s.getItems=function(){return i.slice(0)},s.batchPayloads=function(t){return t&&t.length>0?e.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},s.markAsSent=function(e){i=u(e,i),l(t.BUFFER_KEY,i);var r=c(t.SENT_BUFFER_KEY);r instanceof Array&&e instanceof Array&&((r=r.concat(e)).length>t.MAX_BUFFER_SIZE&&(n.throwInternal(Ai.CRITICAL,67,"Sent buffer reached its maximum size: "+r.length,!0),r.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,r))},s.clearSent=function(n){var e=c(t.SENT_BUFFER_KEY);e=u(n,e),l(t.SENT_BUFFER_KEY,e)}}))}return t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}(),ds=_i.isNullOrUndefined;function fs(t,n,e){return t&&e?(t[n]=e,t[n]):null}var hs=function(){function t(){}return t.extractPropsAndMeasurements=function(t,n,e){ds(t)||Ci(t,(function(t,i){_i.isNumber(i)?e[t]=i:_i.isString(i)?n[t]=i:ui()&&(n[t]=ci().stringify(i))}))},t.createEnvelope=function(n,e,i,r){var s=new Pr(n,r,e);fs(s,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(s.time=_i.toISOString(i.baseData.startTime)),s.iKey=i.iKey;var o=i.iKey.replace(/-/g,"");return s.name=s.name.replace("{0}",o),t.extractPartAExtensions(i,s),i.tags=i.tags||[],s},t.extractPartAExtensions=function(n,e){var i=e.tags=e.tags||{},r=n.ext=n.ext||{},s=n.tags=n.tags||[],o=r.user;o&&(fs(i,ns.userAuthUserId,o.authId),fs(i,ns.userId,o.id||o.localId));var a=r.app;a&&fs(i,ns.sessionId,a.sesId);var u=r.device;u&&(fs(i,ns.deviceId,u.id||u.localId),fs(i,ns.deviceType,u.deviceClass),fs(i,ns.deviceIp,u.ip),fs(i,ns.deviceModel,u.model),fs(i,ns.deviceType,u.deviceType));var c=n.ext.web;if(c){fs(i,ns.deviceLanguage,c.browserLang),fs(i,ns.deviceBrowserVersion,c.browserVer),fs(i,ns.deviceBrowser,c.browser);var l=e.data=e.data||{},d=l.baseData=l.baseData||{},f=d.properties=d.properties||{};fs(f,"domain",c.domain),fs(f,"isManual",c.isManual?"true":null),fs(f,"screenRes",c.screenRes),fs(f,"userConsent",c.userConsent?"true":null)}var h=r.os;h&&fs(i,ns.deviceOS,h.name);var p=r.trace;p&&(fs(i,ns.operationParentId,p.parentID),fs(i,ns.operationName,p.name),fs(i,ns.operationId,p.traceID));for(var m={},v=s.length-1;v>=0;v--)Ci(s[v],(function(t,n){m[t]=n})),s.splice(v,1);Ci(s,(function(t,n){m[t]=n})),e.tags=__assign({},i,m),e.tags[ns.internalSdkVersion]||(e.tags[ns.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,n){this._logger=t,ds(n.baseData)&&this._logger.throwInternal(Ai.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),ps=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};hs.extractPropsAndMeasurements(e.data,r,i);var s=e.baseData;if(ds(s))return n.warnToConsole("Invalid input for dependency data"),null;var o=new Jr(n,s.id,s.target,s.name,s.duration,s.success,s.responseCode,s.properties&&s.properties["http.method"]?s.properties["http.method"]:"GET",s.type,s.correlationContext,r,i),a=new Kr(Jr.dataType,o);return hs.createEnvelope(n,Jr.envelopeType,e,a)},n.DependencyEnvelopeCreator=new n,n}(hs),ms=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i={},r={};e.baseType!==Dr.dataType&&(i.baseTypeSource=e.baseType),e.baseType===Dr.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&hs.extractPropsAndMeasurements(e.baseData,i,r),hs.extractPropsAndMeasurements(e.data,i,r);var s=new Dr(n,e.baseData.name,i,r),o=new Kr(Dr.dataType,s);return hs.createEnvelope(n,Dr.envelopeType,e,o)},n.EventEnvelopeCreator=new n,n}(hs),vs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};hs.extractPropsAndMeasurements(e.data,r,i);var s=Lr.CreateFromInterface(n,e.baseData,r,i),o=new Kr(Lr.dataType,s);return hs.createEnvelope(n,Lr.envelopeType,e,o)},n.ExceptionEnvelopeCreator=new n,n}(hs),ws=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.properties||{},s=i.measurements||{};hs.extractPropsAndMeasurements(e.data,r,s);var o=new Wr(n,i.name,i.average,i.sampleCount,i.min,i.max,r,s),a=new Kr(Wr.dataType,o);return hs.createEnvelope(n,Wr.envelopeType,e,a)},n.MetricEnvelopeCreator=new n,n}(hs),ys=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i,r=e.baseData;ds(r)||ds(r.properties)||ds(r.properties.duration)?ds(e.data)||ds(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=r.properties.duration,delete r.properties.duration);var s,o=e.baseData;((e.ext||{}).trace||{}).traceID&&(s=e.ext.trace.traceID);var a=o.id||s,u=o.name,c=o.uri,l=o.properties||{},d=o.measurements||{};ds(o.refUri)||(l.refUri=o.refUri),ds(o.pageType)||(l.pageType=o.pageType),ds(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn.toString()),ds(o.properties)||Ci(o.properties,(function(t,n){l[t]=n})),hs.extractPropsAndMeasurements(e.data,l,d);var f=new Xr(n,u,c,i,l,d,a),h=new Kr(Xr.dataType,f);return hs.createEnvelope(n,Xr.envelopeType,e,h)},n.PageViewEnvelopeCreator=new n,n}(hs),gs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.name,s=i.uri||i.url,o=i.properties||{},a=i.measurements||{};hs.extractPropsAndMeasurements(e.data,o,a);var u=new Gr(n,r,s,void 0,o,a,i),c=new Kr(Gr.dataType,u);return hs.createEnvelope(n,Gr.envelopeType,e,c)},n.PageViewPerformanceEnvelopeCreator=new n,n}(hs),bs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.message,r=e.baseData.severityLevel,s=e.baseData.properties||{},o=e.baseData.measurements||{};hs.extractPropsAndMeasurements(e.data,s,o);var a=new Yr(n,i,r,s,o),u=new Kr(Yr.dataType,a);return hs.createEnvelope(n,Yr.envelopeType,e,u)},n.TraceEnvelopeCreator=new n,n}(hs),xs=function t(n){zi(t,this,(function(t){function e(t,s){var o={};if(!t)return n.throwInternal(Ai.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:s},!0),o;if(t.__aiCircularRefCheck)return n.throwInternal(Ai.WARNING,50,"Circular reference detected while serializing object",{name:s},!0),o;if(!t.aiDataContract){if("measurements"===s)o=r(t,"number",s);else if("properties"===s)o=r(t,"string",s);else if("tags"===s)o=r(t,"string",s);else if(Fr.isArray(t))o=i(t,s);else{n.throwInternal(Ai.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{ci().stringify(t),o=t}catch(t){n.throwInternal(Ai.CRITICAL,48,t&&_i.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return o}return t.__aiCircularRefCheck=!0,Ci(t.aiDataContract,(function(r,a){var u=_i.isFunction(a)?a()&vr.Required:a&vr.Required,c=_i.isFunction(a)?a()&vr.Hidden:a&vr.Hidden,l=a&vr.Array,d=void 0!==t[r],f=_i.isObject(t[r])&&null!==t[r];if(!u||d||l){if(!c){var h;void 0!==(h=f?l?i(t[r],r):e(t[r],r):t[r])&&(o[r]=h)}}else n.throwInternal(Ai.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:r,name:s})})),delete t.__aiCircularRefCheck,o}function i(t,i){var r;if(t)if(Fr.isArray(t)){r=[];for(var s=0;s<t.length;s++){var o=e(t[s],i+"["+s+"]");r.push(o)}}else n.throwInternal(Ai.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(t,e,i){var r;return t&&(r={},Ci(t,(function(t,s){if("string"===e)r[t]=void 0===s?"undefined":null===s?"null":s.toString?s.toString():"invalid field: toString() is not defined.";else if("number"===e)if(void 0===s)r[t]="undefined";else if(null===s)r[t]="null";else{var o=parseFloat(s);r[t]=isNaN(o)?"NaN":o}else r[t]="invalid field: "+i+" is of unknown type.",n.throwInternal(Ai.CRITICAL,r[t],null,!0)}))),r}t.serialize=function(t){var i=e(t,"root");try{return ci().stringify(i)}catch(t){n.throwInternal(Ai.CRITICAL,48,t&&_i.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},ks=function(){function t(){var n=ei(),e=ri(),i=!1,r=!0;zi(t,this,(function(t){try{if(n&&Mi.Attach(n,"online",o)&&(Mi.Attach(n,"offline",a),i=!0),e){var s=e.body||e;_i.isUndefined(s.ononline)||(s.ononline=o,s.onoffline=a,i=!0)}}catch(t){i=!1}function o(){r=!0}function a(){r=!1}t.isListening=i,t.isOnline=function(){var t=!0,n=si();return i?t=r:n&&!_i.isNullOrUndefined(n.onLine)&&(t=n.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,Ss=function(){function t(){}return t.prototype.getHashCodeScore=function(n){return this.getHashCode(n)/t.INT_MAX_VALUE*100},t.prototype.getHashCode=function(n){if(""===n)return 0;for(;n.length<t.MIN_INPUT_LENGTH;)n=n.concat(n);for(var e=5381,i=0;i<n.length;++i)e=(e<<5)+e+n.charCodeAt(i),e&=e;return Math.abs(e)},t.INT_MAX_VALUE=2147483647,t.MIN_INPUT_LENGTH=8,t}(),Cs=function(){function t(){this.hashCodeGeneragor=new Ss,this.keys=new Qr}return t.prototype.getSamplingScore=function(t){return t.tags&&t.tags[this.keys.userId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.userId]):t.ext&&t.ext.user&&t.ext.user.id?this.hashCodeGeneragor.getHashCodeScore(t.ext.user.id):t.tags&&t.tags[this.keys.operationId]?this.hashCodeGeneragor.getHashCodeScore(t.tags[this.keys.operationId]):t.ext&&t.ext.telemetryTrace&&t.ext.telemetryTrace.traceID?this.hashCodeGeneragor.getHashCodeScore(t.ext.telemetryTrace.traceID):100*Math.random()},t}(),As=function(){function t(t,n){this.INT_MAX_VALUE=2147483647,this._logger=_i.isNullOrUndefined(n)?new Wi:n,(t>100||t<0)&&(this._logger.throwInternal(Ai.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 Cs}return t.prototype.isSampledIn=function(t){var n=this.sampleRate;return null==n||n>=100||t.baseType===Wr.dataType||this.samplingScoreGenerator.getSamplingScore(t)<n},t}();
|
|
5
|
+
*/function ji(t,n){return t&&Object.prototype.hasOwnProperty.call(t,n)}function Bi(t){return"function"==typeof t}function Ni(t){return t&&(t===Object.prototype||t===Array.prototype)}function Pi(t){return Ni(t)||t===Function.prototype}function Ri(t){if(t){if(Ti)return Ti(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}function Oi(t,n,e){return"constructor"!==n&&Bi(t[n])&&(e||ji(t,n))}function Di(t){throw new TypeError("DynamicProto: "+t)}function Li(t,n){for(var e=t.length-1;e>=0;e--)if(t[e]===n)return!0;return!1}function Ui(t,n,e,i){var r=null;if(t&&ji(e,"_dynClass")){var s=t._dynInstFuncs||{};if((r=(s[e._dynClass]||{})[n])||Di("Missing ["+n+"] function"),!r._dynInstChk&&!1!==s._dynInstChk){for(var o=!ji(t,n),a=Ri(t),u=[];o&&a&&!Pi(a)&&!Li(u,a);){var c=a[n];if(c){o=c===i;break}u.push(a),a=Ri(a)}try{o&&(t[n]=r),r._dynInstChk=1}catch(t){s._dynInstChk=!1}}}return r}function qi(t,n,e){var i=n[t];return i===e&&(i=Ri(n)[t]),Bi(i)||Di("["+t+"] is not a function"),i}function Vi(t,n){return ji(t,"prototype")?t.name||n||"_unknown_":((t||{}).constructor||{}).name||n||"_unknown_"}function zi(t,n,e,i){ji(t,"prototype")||Di("theClass is an invalid class definition.");var r=t.prototype;(function(t,n){for(var e=Ri(n);e&&!Pi(e);){if(e===t)return!0;e=Ri(e)}return!1})(r,n)||Di("["+Vi(t)+"] is not in class hierarchy of ["+Vi(n)+"]");var s=null;ji(r,"_dynClass")?s=r._dynClass:(s="_dynCls$"+Vi(t,"_")+"$"+Ei,Ei++,r._dynClass=s);var o=zi._dfOpts,a=!!o.useBaseInst;a&&i&&void 0!==i.useBaseInst&&(a=!!i.useBaseInst);var u=function(t){var n={};for(var e in t)!n[e]&&Oi(t,e,!1)&&(n[e]=t[e]);return n}(n);e(n,function(t,n,e,i){function r(t,n,e){var r=n[o];if(r._isDynProxy&&i){var s=t._dynInstFuncs||{};!1!==s._dynInstChk&&(r=(s[n._dynClass]||{})[e]||r)}return function(){return r.apply(t,arguments)}}var s={};for(var o in e)s[o]=r(n,e,o);for(var a=Ri(t),u=[];a&&!Pi(a)&&!Li(u,a);){for(var o in a)!s[o]&&Oi(a,o,!Ti)&&(s[o]=r(n,a,o));u.push(a),a=Ri(a)}return s}(r,n,u,a));var c=!!Ti&&!!o.setInstFuncs;c&&i&&(c=!!i.setInstFuncs),function(t,n,e,i,r){function s(t,n){var e=function(){return(Ui(this,n,t,e)||qi(n,t,e)).apply(this,arguments)};return e._isDynProxy=1,e}if(!Ni(t)){var o=e._dynInstFuncs=e._dynInstFuncs||{},a=o[n]=o[n]||{};for(var u in!1!==o._dynInstChk&&(o._dynInstChk=!!r),e)Oi(e,u,!1)&&e[u]!==i[u]&&(a[u]=e[u],delete e[u],(!ji(t,u)||t[u]&&!t[u]._isDynProxy)&&(t[u]=s(t,u)))}}(r,s,n,u,!1!==c)}function Hi(t){return t?'"'+t.replace(/\"/g,"")+'"':""}zi._dfOpts={setInstFuncs:!0,useBaseInst:!0};var Wi=function(){function t(t,n,e,i){void 0===e&&(e=!1);var r=this;r.messageId=t,r.message=(e?"AI: ":"AI (Internal): ")+t;var s="";ci()&&(s=li().stringify(i));var o=(n?" message:"+Hi(n):"")+(i?" props:"+Hi(s):"");r.message+=o}return t.dataType="MessageData",t}(),$i=function(){function t(n){this.identifier="DiagnosticLogger",this.queue=[];var e=0,i={};zi(t,this,(function(t){var r=Fi.isNullOrUndefined,s=Fi.isUndefined,o=Fi.isFunction;function a(t,e){var i=n[t];return r(i)?e:i}r(n)&&(n={}),t.consoleLoggingLevel=function(){return a("loggingLevelConsole",0)},t.telemetryLoggingLevel=function(){return a("loggingLevelTelemetry",1)},t.maxInternalMessageLimit=function(){return a("maxMessageLimit",25)},t.enableDebugExceptions=function(){return a("enableDebugExceptions",!1)},t.throwInternal=function(n,e,r,o,a){void 0===a&&(a=!1);var u=new Wi(e,r,a,o);if(t.enableDebugExceptions())throw u;if(!s(u)&&u&&!s(u.message)){if(a){var c=+u.messageId;!i[c]&&t.consoleLoggingLevel()>=_i.WARNING&&(t.warnToConsole(u.message),i[c]=!0)}else t.consoleLoggingLevel()>=_i.WARNING&&t.warnToConsole(u.message);t.logInternalMessage(n,u)}},t.warnToConsole=function(t){var n="undefined"!=typeof console?console:ni("console");if(n){var e="log";n.warn&&(e="warn"),o(n[e])&&n[e](t)}},t.resetInternalMessageCount=function(){e=0,i={}},t.logInternalMessage=function(n,r){if(!(e>=t.maxInternalMessageLimit())){var s=!0,o="AITR_"+r.messageId;if(i[o]?s=!1:i[o]=!0,s&&(n<=t.telemetryLoggingLevel()&&(t.queue.push(r),e++),e===t.maxInternalMessageLimit())){var a="Internal events throttle limit per PageView reached for this app.",u=new Wi(23,a,!1);t.queue.push(u),t.warnToConsole(a)}}}}))}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}(),Xi=function(){function t(n,e,i){var r,s=this,o=!1;s.start=Fi.dateNow(),s.name=n,s.isAsync=i,s.isChildEvt=function(){return!1},Fi.isFunction(e)&&(o=Fi.objDefineAccessors(s,"payload",(function(){return!r&&Fi.isFunction(e)&&(r=e(),e=null),r}))),s.getCtx=function(n){return n?n===t.ParentContextKey||n===t.ChildrenContextKey?s[n]:(s.ctx||{})[n]:null},s.setCtx=function(n,e){n&&(n===t.ParentContextKey?(s[n]||(s.isChildEvt=function(){return!0}),s[n]=e):n===t.ChildrenContextKey?s[n]=e:(s.ctx=s.ctx||{})[n]=e)},s.complete=function(){var n=0,i=s.getCtx(t.ChildrenContextKey);if(Fi.isArray(i))for(var r=0;r<i.length;r++){var a=i[r];a&&(n+=a.time)}s.time=Fi.dateNow()-s.start,s.exTime=s.time-n,s.complete=function(){},!o&&Fi.isFunction(e)&&(s.payload=e())}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t}(),Ji=function(){function t(n){this.ctx={},zi(t,this,(function(t){t.create=function(t,n,e){return new Xi(t,n,e)},t.fire=function(t){t&&(t.complete(),n&&n.perfEvent(t))},t.setCtx=function(n,e){n&&((t.ctx=t.ctx||{})[n]=e)},t.getCtx=function(n){return(t.ctx||{})[n]}}))}return t.prototype.create=function(){return null},t.prototype.fire=function(){},t.prototype.setCtx=function(){},t.prototype.getCtx=function(){},t}();function Yi(t,n,e,i,r){if(t){var s=t;if(s&&Fi.isFunction(s.getPerfMgr)&&(s=s.getPerfMgr()),s){var o=void 0,a=s.getCtx("CoreUtils.doPerf");try{if(o=s.create(n(),i,r)){if(a&&o.setCtx&&(o.setCtx(Xi.ParentContextKey,a),a.getCtx&&a.setCtx)){var u=a.getCtx(Xi.ChildrenContextKey);u||a.setCtx(Xi.ChildrenContextKey,u=[]),u.push(o)}return s.setCtx("CoreUtils.doPerf",o),e(o)}}catch(t){o&&o.setCtx&&o.setCtx("exception",t)}finally{o&&s.fire(o),s.setCtx("CoreUtils.doPerf",a)}}}return e()}var Gi=Fi.isFunction,Ki=function(t,n){var e=this,i=null,r=Gi(t.processTelemetry),s=Gi(t.setNextPlugin);e._hasRun=!1,e.getPlugin=function(){return t},e.getNext=function(){return i},e.setNext=function(t){i=t},e.processTelemetry=function(o,a){a||(a=n);var u=t?t.identifier:"TelemetryPluginChain";Yi(a?a.core():null,(function(){return u+":processTelemetry"}),(function(){if(t&&r){e._hasRun=!0;try{a.setNext(i),s&&t.setNextPlugin(i),i&&(i._hasRun=!1),t.processTelemetry(o,a)}catch(e){var n=i&&i._hasRun;i&&n||a.diagLog().throwInternal(_i.CRITICAL,73,"Plugin ["+t.identifier+"] failed during processTelemetry - "+e),i&&!n&&i.processTelemetry(o,a)}}else i&&(e._hasRun=!0,i.processTelemetry(o,a))}),(function(){return{item:o}}),!o.sync)}},Qi=Fi.isNullOrUndefined;function Zi(t,n){var e=[];if(t&&t.length>0)for(var i=null,r=0;r<t.length;r++){var s=t[r];if(s&&Fi.isFunction(s.processTelemetry)){var o=new Ki(s,n);e.push(o),i&&i.setNext(o),i=o}}return e.length>0?e[0]:null}var tr=function t(n,e,i,r){var s=this,o=null;null!==r&&(n&&Fi.isFunction(n.getPlugin)?o=function(t,n,e){var i=[],r=!e;if(t)for(;t;){var s=t.getPlugin();(r||s===e)&&(r=!0,i.push(s)),t=t.getNext()}return r||i.push(e),Zi(i,n)}(n,s,r||n.getPlugin()):r?o=function(t,n,e){var i=t,r=!1;return e&&t&&(i=[],Fi.arrForEach(t,(function(t){(r||t===e)&&(r=!0,i.push(t))}))),e&&!r&&(i||(i=[]),i.push(e)),Zi(i,n)}(n,s,r):Fi.isUndefined(r)&&(o=Zi(n,s))),s.core=function(){return i},s.diagLog=function(){var t=(i||{}).logger;return t||(t=new $i(e||{})),t},s.getCfg=function(){return e},s.getExtCfg=function(t,n){var i;if(void 0===n&&(n={}),e){var r=e.extensionConfig;r&&t&&(i=r[t])}return i||n},s.getConfig=function(t,n,i){var r;void 0===i&&(i=!1);var o=s.getExtCfg(t,null);return o&&!Qi(o[n])?r=o[n]:e&&!Qi(e[n])&&(r=e[n]),Qi(r)?i:r},s.hasNext=function(){return null!=o},s.getNext=function(){return o},s.setNext=function(t){o=t},s.processNext=function(t){var n=o;n&&(o=n.getNext(),n.processTelemetry(t,s))},s.createNew=function(n,r){return void 0===n&&(n=null),new t(n||o,e,i,r)}},nr=Fi.isFunction,er=function(){function t(){var t=this,n=!1,e=null,i=null;t.core=null,t.diagLog=function(n){return t._getTelCtx(n).diagLog()},t.isInitialized=function(){return n},t.setInitialized=function(t){n=t},t.setNextPlugin=function(t){i=t},t.processNext=function(t,n){n?n.processNext(t):i&&nr(i.processTelemetry)&&i.processTelemetry(t,null)},t._getTelCtx=function(n){void 0===n&&(n=null);var r=n;r||(r=(e||new tr(null,{},t.core)).createNew(null,i&&i.getPlugin?i.getPlugin:i));return r},t._baseTelInit=function(r,s,o,a){r&&(r.extensionConfig=r.extensionConfig||[]),!a&&s&&(a=s.getProcessTelContext().getNext());var u=i;i&&i.getPlugin&&(u=i.getPlugin()),t.core=s,e=new tr(a,r,s,u),n=!0}}return t.prototype.initialize=function(t,n,e,i){this._baseTelInit(t,n,e,i)},t}(),ir=Fi.isFunction;function rr(t,n){for(var e=[],i=null,r=t.getNext();r;){var s=r.getPlugin();s&&(i&&ir(i.setNextPlugin)&&ir(s.processTelemetry)&&i.setNextPlugin(s),ir(s.isInitialized)&&s.isInitialized()||e.push(s),i=s,r=r.getNext())}Fi.arrForEach(e,(function(e){e.initialize(t.getCfg(),t.core(),n,t.getNext())}))}function sr(t){return t.sort((function(t,n){var e=0,i=ir(n.processTelemetry);return ir(t.processTelemetry)?e=i?t.priority-n.priority:1:i&&(e=-1),e}))}var or=Fi.objDefineAccessors,ar=function(t){function n(){var e=t.call(this)||this;e.identifier="ChannelControllerPlugin",e.priority=500;var i,r=Fi.arrForEach;function s(t){t&&t.length>0&&(function(t){r(t,(function(t){if(t.priority<500)throw Error("Channel has invalid priority"+t.identifier)}))}(t=t.sort((function(t,n){return t.priority-n.priority}))),i.push(t))}return zi(n,e,(function(t,n){t.setNextPlugin=function(){},t.processTelemetry=function(t,n){i&&r(i,(function(i){i.length>0&&e._getTelCtx(n).createNew(i).processNext(t)}))},t.getChannelControls=function(){return i},t.initialize=function(e,o,a){t.isInitialized()||(n.initialize(e,o,a),e.isCookieUseDisabled&&Fi.disableCookies(),function(t,n){if(i=[],t&&r(t,(function(t){return s(t)})),n){var e=[];r(n,(function(t){t.priority>500&&e.push(t)})),s(e)}}((e||{}).channels,a),r(i,(function(t){return rr(new tr(t,e,o),a)})))}})),e}return __extends(n,t),n.prototype.processTelemetry=function(){},n.prototype.getChannelControls=function(){return null},n.prototype.initialize=function(){},n._staticInit=(or(n.prototype,"ChannelControls",n.prototype.getChannelControls),void or(n.prototype,"channelQueue",n.prototype.getChannelControls)),n}(er),ur=Fi.arrForEach,cr=Fi.isNullOrUndefined,lr=function(){function t(){var n,e,i,r,s=!1;zi(t,this,(function(t){t._extensions=new Array,e=new ar,t.logger=Fi.objCreate({throwInternal:function(){},warnToConsole:function(){},resetInternalMessageCount:function(){}}),n=[],t.isInitialized=function(){return s},t.initialize=function(n,r,o,a){if(t.isInitialized())throw Error("Core should not be initialized more than once");if(!n||cr(n.instrumentationKey))throw Error("Please provide instrumentation key");i=a,t._notificationManager=a,t.config=n||{},n.extensions=cr(n.extensions)?[]:n.extensions,(n.extensionConfig=cr(n.extensionConfig)?{}:n.extensionConfig).NotificationManager=a,o&&(t.logger=o);var u=[];u.push.apply(u,r.concat(n.extensions)),u=sr(u);var c=[],l={};if(ur(u,(function(t){if(cr(t)||cr(t.initialize))throw Error("Extensions must provide callback to initialize");var n=t.priority,i=t.identifier;t&&n&&(cr(l[n])?l[n]=i:o.warnToConsole("Two extensions have same priority #"+n+" - "+l[n]+", "+i)),(!n||n<e.priority)&&c.push(t)})),u.push(e),c.push(e),u=sr(u),t._extensions=u,rr(new tr([e],n,t),u),rr(new tr(c,n,t),u),t._extensions=c,0===t.getTransmissionControls().length)throw new Error("No channels available");s=!0,t.releaseQueue()},t.getTransmissionControls=function(){return e.getChannelControls()},t.track=function(e){e.iKey||(e.iKey=t.config.instrumentationKey),e.time||(e.time=Fi.toISOString(new Date)),cr(e.ver)&&(e.ver="4.0"),t.isInitialized()?t.getProcessTelContext().processNext(e):n.push(e)},t.getProcessTelContext=function(){var n=t._extensions,i=n;return n&&0!==n.length||(i=[e]),new tr(i,t.config,t)},t.getNotifyMgr=function(){return i||(i=Fi.objCreate({addNotificationListener:function(){},removeNotificationListener:function(){},eventsSent:function(){},eventsDiscarded:function(){},eventsSendRequest:function(){}}),t._notificationManager=i),i},t.getPerfMgr=function(){return r||t.config&&t.config.enablePerfMgr&&(r=new Ji(t.getNotifyMgr())),r},t.setPerfMgr=function(t){r=t},t.eventCnt=function(){return n.length},t.releaseQueue=function(){n.length>0&&(ur(n,(function(n){t.getProcessTelContext().processNext(n)})),n=[])}}))}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}(),dr=function(){function t(n){this.listeners=[];var e=Fi.arrForEach,i=!!(n||{}).perfEvtsSendAll;zi(t,this,(function(t){t.addNotificationListener=function(n){t.listeners.push(n)},t.removeNotificationListener=function(n){for(var e=Fi.arrIndexOf(t.listeners,n);e>-1;)t.listeners.splice(e,1),e=Fi.arrIndexOf(t.listeners,n)},t.eventsSent=function(n){e(t.listeners,(function(t){t&&t.eventsSent&&setTimeout((function(){return t.eventsSent(n)}),0)}))},t.eventsDiscarded=function(n,i){e(t.listeners,(function(t){t&&t.eventsDiscarded&&setTimeout((function(){return t.eventsDiscarded(n,i)}),0)}))},t.eventsSendRequest=function(n,i){e(t.listeners,(function(t){if(t&&t.eventsSendRequest)if(i)setTimeout((function(){return t.eventsSendRequest(n,i)}),0);else try{t.eventsSendRequest(n,i)}catch(t){}}))},t.perfEvent=function(n){n&&(!i&&n.isChildEvt()||e(t.listeners,(function(t){if(t&&t.perfEvent)if(n.isAsync)setTimeout((function(){return t.perfEvent(n)}),0);else try{t.perfEvent(n)}catch(t){}})))}}))}return t.prototype.addNotificationListener=function(){},t.prototype.removeNotificationListener=function(){},t.prototype.eventsSent=function(){},t.prototype.eventsDiscarded=function(){},t.prototype.eventsSendRequest=function(){},t}(),fr=function(t){function n(){var e=t.call(this)||this;return zi(n,e,(function(t,n){function e(n){var e=t.getNotifyMgr();e&&e.eventsDiscarded([n],2)}t.initialize=function(t,e,i,r){n.initialize(t,e,i||new $i(t),r||new dr(t))},t.track=function(i){Yi(t.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(null===i)throw e(i),Error("Invalid telemetry item");!function(t){if(Fi.isNullOrUndefined(t.name))throw e(t),Error("telemetry name required")}(i),n.track(i)}),(function(){return{item:i}}),!i.sync)},t.addNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.addNotificationListener(n)},t.removeNotificationListener=function(n){var e=t.getNotifyMgr();e&&e.removeNotificationListener(n)},t.pollInternalLogs=function(n){var e=t.config.diagnosticLogInterval;return e&&e>0||(e=1e4),setInterval((function(){var e=t.logger?t.logger.queue:[];Fi.arrForEach(e,(function(e){var i={name:n||"InternalMessageId: "+e.messageId,iKey:t.config.instrumentationKey,time:Fi.toISOString(new Date),baseType:Wi.dataType,baseData:{message:e.message}};t.track(i)})),e.length=0}),e)}})),e}return __extends(n,t),n.prototype.initialize=function(){},n.prototype.track=function(){},n.prototype.addNotificationListener=function(){},n.prototype.removeNotificationListener=function(){},n.prototype.pollInternalLogs=function(){return 0},n}(lr),hr=["req","rsp","hkErr","fnErr"];function pr(t,n){if(t)for(var e=0;e<t.length&&!n(t[e],e);e++);}function mr(t,n,e,i,r){r>=0&&r<=2&&pr(t,(function(t,s){var o=t.cbks,a=o[hr[r]];if(a){n.ctx=function(){return i[s]=i[s]||{}};try{a.apply(n.inst,e)}catch(t){var u=n.err;try{var c=o[hr[2]];c&&(n.err=t,c.apply(n.inst,e))}catch(t){}finally{n.err=u}}}}))}var vr,wr,yr,gr=Object.getPrototypeOf;function br(t,n,e){var i=null;return t&&(Fi.hasOwnProperty(t,n)?i=t:e&&(i=br(function(t){if(t){if(gr)return gr(t);var n=t.__proto__||t.prototype||t.constructor;if(n)return n}return null}(t),n,!1))),i}function xr(t,n,e,i){if(void 0===i&&(i=!0),t&&n&&e){var r=br(t,n,i);if(r){var s=r[n];if("function"==typeof s){var o=s._aiHooks;if(!o){var a=(c=o={i:0,n,f:s,h:[]},function(){var t=this,n=arguments,e=c.h,i={name:c.n,inst:t,ctx:null,set:a},r=[],s=o([i],n);function o(t,n){return pr(n,(function(n){t.push(n)})),t}function a(t,e){(n=o([],n))[t]=e,s=o([i],n)}mr(e,i,s,r,0);var u=c.f;try{i.rslt=u.apply(t,n)}catch(t){throw i.err=t,mr(e,i,s,r,3),t}return mr(e,i,s,r,1),i.rslt});a._aiHooks=o,r[n]=a}var u={id:o.i,cbks:e,rm:function(){var t=this.id;pr(o.h,(function(n,e){if(n.id===t)return o.h.splice(e,1),1}))}};return o.i++,o.h.push(u),u}}}var c;return null}!function(t){t[t.LocalStorage=0]="LocalStorage",t[t.SessionStorage=1]="SessionStorage"}(vr||(vr={})),function(t){t[t.Default=0]="Default",t[t.Required=1]="Required",t[t.Array=2]="Array",t[t.Hidden=4]="Hidden"}(wr||(wr={})),function(t){t[t.AI=0]="AI",t[t.AI_AND_W3C=1]="AI_AND_W3C",t[t.W3C=2]="W3C"}(yr||(yr={}));var kr,Sr=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}(),Cr=function(){function t(){}return t.sanitizeKeyAndAddUniqueness=function(n,e,i){var r=e.length,s=t.sanitizeKey(n,e);if(s.length!==r){for(var o=0,a=s;void 0!==i[a];)o++,a=s.substring(0,t.MAX_NAME_LENGTH-3)+t.padNumber(o);s=a}return s},t.sanitizeKey=function(n,e){var i;return e&&(e=t.trim(e.toString())).length>t.MAX_NAME_LENGTH&&(i=e.substring(0,t.MAX_NAME_LENGTH),n.throwInternal(_i.WARNING,57,"name is too long. It has been truncated to "+t.MAX_NAME_LENGTH+" characters.",{name:e},!0)),i||e},t.sanitizeString=function(n,e,i){var r;return void 0===i&&(i=t.MAX_STRING_LENGTH),e&&(i=i||t.MAX_STRING_LENGTH,(e=t.trim(e)).toString().length>i&&(r=e.toString().substring(0,i),n.throwInternal(_i.WARNING,61,"string value is too long. It has been truncated to "+i+" characters.",{value:e},!0))),r||e},t.sanitizeUrl=function(n,e){return t.sanitizeInput(n,e,t.MAX_URL_LENGTH,66)},t.sanitizeMessage=function(n,e){var i;return e&&e.length>t.MAX_MESSAGE_LENGTH&&(i=e.substring(0,t.MAX_MESSAGE_LENGTH),n.throwInternal(_i.WARNING,56,"message is too long, it has been truncated to "+t.MAX_MESSAGE_LENGTH+" characters.",{message:e},!0)),i||e},t.sanitizeException=function(n,e){var i;return e&&e.length>t.MAX_EXCEPTION_LENGTH&&(i=e.substring(0,t.MAX_EXCEPTION_LENGTH),n.throwInternal(_i.WARNING,52,"exception is too long, it has been truncated to "+t.MAX_EXCEPTION_LENGTH+" characters.",{exception:e},!0)),i||e},t.sanitizeProperties=function(n,e){if(e){var i={};Ai(e,(function(e,r){if(Fi.isObject(r)&&ci())try{r=li().stringify(r)}catch(t){n.throwInternal(_i.WARNING,49,"custom property is not valid",{exception:t},!0)}r=t.sanitizeString(n,r,t.MAX_PROPERTY_LENGTH),e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeMeasurements=function(n,e){if(e){var i={};Ai(e,(function(e,r){e=t.sanitizeKeyAndAddUniqueness(n,e,i),i[e]=r})),e=i}return e},t.sanitizeId=function(n,e){return e?t.sanitizeInput(n,e,t.MAX_ID_LENGTH,69).toString():e},t.sanitizeInput=function(n,e,i,r){var s;return e&&(e=t.trim(e)).length>i&&(s=e.substring(0,i),n.throwInternal(_i.WARNING,r,"input is too long, it has been truncated to "+i+" characters.",{data:e},!0)),s||e},t.padNumber=function(t){var n="00"+t;return n.substr(n.length-3)},t.trim=function(t){return Fi.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}(),Ar=oi(),_r=Fi.isString,Fr=null,Mr=function(){function t(){}return t.createDomEvent=function(t){var n=null;if(Fi.isFunction(Event))n=new Event(t);else{var e=si();e&&e.createEvent&&(n=e.createEvent("Event")).initEvent(t,!0,!0)}return n},t.disableStorage=function(){t._canUseLocalStorage=!1,t._canUseSessionStorage=!1},t._getLocalStorageObject=function(){return t.canUseLocalStorage()?t._getVerifiedStorageObject(vr.LocalStorage):null},t._getVerifiedStorageObject=function(t){var n,e,i=null;try{if(Fi.isNullOrUndefined(ti()))return null;e=new Date,(i=ni(t===vr.LocalStorage?"localStorage":"sessionStorage")).setItem(e.toString(),e.toString()),n=i.getItem(e.toString())!==e.toString(),i.removeItem(e.toString()),n&&(i=null)}catch(t){i=null}return i},t.isInternalApplicationInsightsEndpoint=function(n){return-1!==t._internalEndpoints.indexOf(n.toLowerCase())},t.canUseLocalStorage=function(){return void 0===t._canUseLocalStorage&&(t._canUseLocalStorage=!!t._getVerifiedStorageObject(vr.LocalStorage)),t._canUseLocalStorage},t.getStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseLocalStorage=!1,n.throwInternal(_i.WARNING,1,"Browser failed read of local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setStorage=function(n,e,i){var r=t._getLocalStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(_i.WARNING,3,"Browser failed write to local storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeStorage=function(n,e){var i=t._getLocalStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseLocalStorage=!1,n.throwInternal(_i.WARNING,5,"Browser failed removal of local storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t._getSessionStorageObject=function(){return t.canUseSessionStorage()?t._getVerifiedStorageObject(vr.SessionStorage):null},t.canUseSessionStorage=function(){return void 0===t._canUseSessionStorage&&(t._canUseSessionStorage=!!t._getVerifiedStorageObject(vr.SessionStorage)),t._canUseSessionStorage},t.getSessionStorageKeys=function(){var n=[];return t.canUseSessionStorage()&&Ai(ni("sessionStorage"),(function(t){n.push(t)})),n},t.getSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.getItem(e)}catch(e){t._canUseSessionStorage=!1,n.throwInternal(_i.WARNING,2,"Browser failed read of session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return null},t.setSessionStorage=function(n,e,i){var r=t._getSessionStorageObject();if(null!==r)try{return r.setItem(e,i),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(_i.WARNING,4,"Browser failed write to session storage. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.removeSessionStorage=function(n,e){var i=t._getSessionStorageObject();if(null!==i)try{return i.removeItem(e),!0}catch(e){t._canUseSessionStorage=!1,n.throwInternal(_i.WARNING,6,"Browser failed removal of session storage item. "+t.getExceptionName(e),{exception:t.dump(e)})}return!1},t.disableCookies=function(){Fi.disableCookies()},t.canUseCookies=function(n){if(void 0===Fi._canUseCookies){Fi._canUseCookies=!1;try{Fi._canUseCookies=void 0!==t.document.cookie}catch(e){n.throwInternal(_i.WARNING,68,"Cannot access document.cookie - "+t.getExceptionName(e),{exception:t.dump(e)})}}return Fi._canUseCookies},t.disallowsSameSiteNone=function(t){return!!_r(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)"===(n=t).substring((i=(e=n.length)-"AppleWebKit/605.1.15 (KHTML, like Gecko)".length)>=0?i:0,e)||-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 n,e,i},t.setCookie=function(n,e,i,r){if(t.canUseCookies(n)){var s="",o="";r&&(s=";domain="+r);var a=ai();a&&"https:"===a.protocol&&(o=";secure",null===Fr&&(Fr=t.disallowsSameSiteNone((oi()||{}).userAgent)),Fr||(i+=";SameSite=None")),t.document.cookie=e+"="+i+s+";path=/"+o}},t.stringToBoolOrDefault=function(t,n){return void 0===n&&(n=!1),null==t?n:"true"===t.toString().toLowerCase()},t.getCookie=function(n,e){if(t.canUseCookies(n)){var i="";if(e&&e.length)for(var r=e+"=",s=t.document.cookie.split(";"),o=0;o<s.length;o++){var a=s[o];if((a=t.trim(a))&&0===a.indexOf(r)){i=a.substring(r.length,s[o].length);break}}return i}},t.deleteCookie=function(n,e){t.canUseCookies(n)&&(t.document.cookie=e+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},t.random32=function(){return Fi.random32(!0)},t.getIEVersion=function(t){void 0===t&&(t=null);var n=t?t.toLowerCase():Ar?(Ar.userAgent||"").toLowerCase():"";if(-1!==n.indexOf("msie"))return parseInt(n.split("msie")[1]);if(n.indexOf("trident/")){var e=parseInt(n.split("trident/")[1]);if(e)return e+4}return null},t.msToTimeSpan=function(t){(isNaN(t)||t<0)&&(t=0);var n=""+(t=Math.round(t))%1e3,e=""+Math.floor(t/1e3)%60,i=""+Math.floor(t/6e4)%60,r=""+Math.floor(t/36e5)%24,s=Math.floor(t/864e5);return(s>0?s+".":"")+(r=r.length<2?"0"+r:r)+":"+(i=i.length<2?"0"+i:i)+":"+(e=e.length<2?"0"+e:e)+"."+(1===n.length?"00"+n:2===n.length?"0"+n:n)},t.isCrossOriginError=function(t,n,e,i,r){return("Script error."===t||"Script error"===t)&&!r},t.dump=function(t){var n=Object.prototype.toString.call(t),e="";return"[object Error]"===n?e="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":ci()&&(e=li().stringify(t)),n+e},t.getExceptionName=function(t){return"[object Error]"===Object.prototype.toString.call(t)?t.name:""},t.addEventHandler=function(t,n){return Ii.Attach(ii(),t,n)},t.IsBeaconApiSupported=function(){return"sendBeacon"in Ar&&Ar.sendBeacon},t.getExtension=function(t,n){for(var e=null,i=0;!e&&i<t.length;)t[i]&&t[i].identifier===n&&(e=t[i]),i++;return e},t.document=si()||{},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=Fi.strTrim,t.newId=Fi.newId,t.generateW3CId=Fi.generateW3CId,t.isArray=Fi.isArray,t.isError=Fi.isError,t.isDate=Fi.isDate,t.toISOStringForIE8=Fi.toISOString,t}(),Ir=function(){function t(){}return t.parseUrl=function(n){var e=t._htmlAnchorIdx,i=t._htmlAnchorElement,r=i[e];return t.document.createElement?i[e]||(r=i[e]=t.document.createElement("a")):r={host:t.parseHost(n,!0)},r.href=n,++e>=i.length&&(e=0),t._htmlAnchorIdx=e,r},t.getAbsoluteUrl=function(n){var e,i=t.parseUrl(n);return i&&(e=i.href),e},t.getPathName=function(n){var e,i=t.parseUrl(n);return i&&(e=i.pathname),e},t.getCompleteUrl=function(t,n){return t?t.toUpperCase()+" "+n:n},t.parseHost=function(n,e){var i=t.parseFullHost(n,e);if(i){var r=i.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(null!=r&&r.length>3&&_r(r[2])&&r[2].length>0)return r[2]+(r[3]||"")}return i},t.parseFullHost=function(t,n){var e=null;if(t){var i=t.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(null!=i&&i.length>2&&_r(i[2])&&i[2].length>0&&(e=i[2]||"",n&&i.length>2)){var r=(i[1]||"").toLowerCase(),s=i[3]||"";("http"===r&&":80"===s||"https"===r&&":443"===s)&&(s=""),e+=s}}return e},t.document=si()||{},t._htmlAnchorIdx=0,t._htmlAnchorElement=[null,null,null,null,null],t}(),Tr=function(){function t(){}return t.canIncludeCorrelationHeader=function(t,n,e){if(!n||t&&t.disableCorrelationHeaders)return!1;if(t&&t.correlationHeaderExcludePatterns)for(var i=0;i<t.correlationHeaderExcludePatterns.length;i++)if(t.correlationHeaderExcludePatterns[i].test(n))return!1;var r=Ir.parseUrl(n).host.toLowerCase();if(!r||-1===r.indexOf(":443")&&-1===r.indexOf(":80")||(r=(Ir.parseFullHost(n,!0)||"").toLowerCase()),!(t&&t.enableCorsCorrelation||r===e))return!1;var s,o=t&&t.correlationHeaderDomains;if(o&&(Fi.arrForEach(o,(function(t){var n=new RegExp(t.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));s=s||n.test(r)})),!s))return!1;var a=t&&t.correlationHeaderExcludedDomains;if(!a||0===a.length)return!0;for(i=0;i<a.length;i++)if(new RegExp(a[i].toLowerCase().replace(/\./g,".").replace(/\*/g,".*")).test(r))return!1;return r&&r.length>0},t.getCorrelationContext=function(n){if(n){var e=t.getCorrelationContextValue(n,Sr.requestContextTargetKey);if(e&&e!==t.correlationIdPrefix)return e}},t.getCorrelationContextValue=function(t,n){if(t)for(var e=t.split(","),i=0;i<e.length;++i){var r=e[i].split("=");if(2===r.length&&r[0]===n)return r[1]}},t.correlationIdPrefix="cid-v1:",t}(),Er=function(){function t(){}return t.ParseDependencyPath=function(t,n,e,i){var r,s=i,o=i;if(n&&n.length>0){var a=Ir.parseUrl(n);if(r=a.host,!s)if(null!=a.pathname){var u=0===a.pathname.length?"/":a.pathname;"/"!==u.charAt(0)&&(u="/"+u),o=a.pathname,s=Cr.sanitizeString(t,e?e+" "+u:u)}else s=Cr.sanitizeString(t,n)}else r=i,s=i;return{target:r,name:s,data:o}},t}(),jr=function(){function t(){}return t.Now=function(){var t=ui();if(t&&t.now&&t.timing){var n=t.now()+t.timing.navigationStart;if(n>0)return n}return(new Date).getTime()},t.GetDuration=function(t,n){var e=null;return 0===t||0===n||Fi.isNullOrUndefined(t)||Fi.isNullOrUndefined(n)||(e=n-t),e},t}(),Br="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Nr=function(){function t(){}return t.parse=function(n){if(!n)return{};var e=n.split(t._FIELDS_SEPARATOR),i=Fi.arrReduce(e,(function(n,e){var i=e.split(t._FIELD_KEY_VALUE_SEPARATOR);return 2===i.length&&(n[i[0].toLowerCase()]=i[1]),n}),{});return Fi.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}(),Pr=function(t){function n(){return t.call(this)||this}return __extends(n,t),n}((function(){})),Rr=function(t){function n(n,e,i){var r=t.call(this)||this;return r.name=Cr.sanitizeString(n,i)||Mr.NotSpecified,r.data=e,r.time=Fi.toISOString(new Date),r.aiDataContract={time:wr.Required,iKey:wr.Required,name:wr.Required,sampleRate:function(){return 100===r.sampleRate?wr.Hidden:wr.Required},tags:wr.Required,data:wr.Required},r}return __extends(n,t),n}((function(){this.ver=1,this.sampleRate=100,this.tags={}})),Or=function(){},Dr=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Or),Lr=function(t){function n(n,e,i,r){var s=t.call(this)||this;return s.aiDataContract={ver:wr.Required,name:wr.Required,properties:wr.Default,measurements:wr.Default},s.name=Cr.sanitizeString(n,e)||Mr.NotSpecified,s.properties=Cr.sanitizeProperties(n,i),s.measurements=Cr.sanitizeMeasurements(n,r),s}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Event",n.dataType="EventData",n}(Dr),Ur=function(t){function n(n,e,i,r,s,o){var a,u=t.call(this)||this;return u.aiDataContract={ver:wr.Required,exceptions:wr.Required,severityLevel:wr.Default,properties:wr.Default,measurements:wr.Default},"ver"in(a=e)&&"exceptions"in a&&"properties"in a?(u.exceptions=e.exceptions,u.properties=e.properties,u.measurements=e.measurements,e.severityLevel&&(u.severityLevel=e.severityLevel),e.id&&(u.id=e.id),e.problemGroup&&(u.problemGroup=e.problemGroup),u.ver=2,Fi.isNullOrUndefined(e.isManual)||(u.isManual=e.isManual)):(u.exceptions=[new qr(n,e)],u.properties=Cr.sanitizeProperties(n,i)||{},u.measurements=Cr.sanitizeMeasurements(n,r),s&&(u.severityLevel=s),o&&(u.id=o)),u}return __extends(n,t),n.CreateFromInterface=function(t,e,i,r){var s=e.exceptions&&Fi.arrMap(e.exceptions,(function(n){return qr.CreateFromInterface(t,n)}));return new n(t,__assign({},e,{exceptions:s}),i,r)},n.prototype.toInterface=function(){var t=this,n=t.exceptions,e=t.properties,i=t.measurements,r=t.severityLevel,s=t.problemGroup,o=t.id,a=t.isManual;return{ver:"4.0",exceptions:n instanceof Array&&Fi.arrMap(n,(function(t){return t.toInterface()}))||void 0,severityLevel:r,properties:e,measurements:i,problemGroup:s,id:o,isManual:a}},n.CreateSimpleException=function(t,n,e,i,r){return{exceptions:[{hasFullStack:!0,message:t,stack:r,typeName:n}]}},n.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",n.dataType="ExceptionData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.exceptions=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(Or)),qr=function(t){function n(e,i){var r,s=t.call(this)||this;if(s.aiDataContract={id:wr.Default,outerId:wr.Default,typeName:wr.Required,message:wr.Required,hasFullStack:wr.Default,stack:wr.Default,parsedStack:wr.Array},"hasFullStack"in(r=i)&&"typeName"in r)s.typeName=i.typeName,s.message=i.message,s.stack=i.stack,s.parsedStack=i.parsedStack,s.hasFullStack=i.hasFullStack;else{var o=i;Mr.isError(o)||(o=o.error||o.evt||o),s.typeName=Cr.sanitizeString(e,function(t){var n="";if(t&&!(n=t.typeName||t.name||""))try{var e=/function (.{1,})\(/.exec(t.constructor.toString());n=e&&e.length>1?e[1]:""}catch(t){}return n}(o))||Mr.NotSpecified,s.message=Cr.sanitizeMessage(e,i.message)||Mr.NotSpecified;var a=i.stack;s.parsedStack=n.parseStack(a),s.stack=Cr.sanitizeException(e,a),s.hasFullStack=Mr.isArray(s.parsedStack)&&s.parsedStack.length>0}return s}return __extends(n,t),n.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&Fi.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}},n.CreateFromInterface=function(t,e){var i=e.parsedStack instanceof Array&&Fi.arrMap(e.parsedStack,(function(t){return Vr.CreateFromInterface(t)}))||e.parsedStack;return new n(t,__assign({},e,{parsedStack:i}))},n.parseStack=function(t){var n;if(Fi.isString(t)){var e=t.split("\n");n=[];for(var i=0,r=0,s=0;s<=e.length;s++)if(Vr.regex.test(e[s])){var o=new Vr(e[s],i++);r+=o.sizeInBytes,n.push(o)}if(r>32768)for(var a=0,u=n.length-1,c=0,l=a,d=u;a<u;){if((c+=n[a].sizeInBytes+n[u].sizeInBytes)>32768){n.splice(l,d-l+1);break}l=a,d=u,a++,u--}}return n},n}((function(){this.hasFullStack=!0,this.parsedStack=[]})),Vr=function(t){function n(e,i){var r=t.call(this)||this;if(r.sizeInBytes=0,r.aiDataContract={level:wr.Required,method:wr.Required,assembly:wr.Default,fileName:wr.Default,line:wr.Default},"string"==typeof e){var s=e;r.level=i,r.method="<no_method>",r.assembly=Mr.trim(s),r.fileName="",r.line=0;var o=s.match(n.regex);o&&o.length>=5&&(r.method=Mr.trim(o[2])||r.method,r.fileName=Mr.trim(o[4]),r.line=parseInt(o[5])||0)}else r.level=e.level,r.method=e.method,r.assembly=e.assembly,r.fileName=e.fileName,r.line=e.line,r.sizeInBytes=0;return r.sizeInBytes+=r.method.length,r.sizeInBytes+=r.fileName.length,r.sizeInBytes+=r.assembly.length,r.sizeInBytes+=n.baseSize,r.sizeInBytes+=r.level.toString().length,r.sizeInBytes+=r.line.toString().length,r}return __extends(n,t),n.CreateFromInterface=function(t){return new n(t,null)},n.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},n.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/,n.baseSize=58,n}((function(){})),zr=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.metrics=[],n.properties={},n.measurements={},n}return __extends(n,t),n}(Or);!function(t){t[t.Measurement=0]="Measurement",t[t.Aggregation=1]="Aggregation"}(kr||(kr={}));var Hr,Wr=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.aiDataContract={name:wr.Required,kind:wr.Default,value:wr.Required,count:wr.Default,min:wr.Default,max:wr.Default,stdDev:wr.Default},n}return __extends(n,t),n}((function(){this.kind=kr.Measurement})),$r=function(t){function n(n,e,i,r,s,o,a,u){var c=t.call(this)||this;c.aiDataContract={ver:wr.Required,metrics:wr.Required,properties:wr.Default};var l=new Wr;return l.count=r>0?r:void 0,l.max=isNaN(o)||null===o?void 0:o,l.min=isNaN(s)||null===s?void 0:s,l.name=Cr.sanitizeString(n,e)||Mr.NotSpecified,l.value=i,c.metrics=[l],c.properties=Cr.sanitizeProperties(n,a),c.measurements=Cr.sanitizeMeasurements(n,u),c}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",n.dataType="MetricData",n}(zr),Xr=function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Dr),Jr=function(t){function n(n,e,i,r,s,o,a){var u=t.call(this)||this;return u.aiDataContract={ver:wr.Required,name:wr.Default,url:wr.Default,duration:wr.Default,properties:wr.Default,measurements:wr.Default,id:wr.Default},u.id=Cr.sanitizeId(n,a),u.url=Cr.sanitizeUrl(n,i),u.name=Cr.sanitizeString(n,e)||Mr.NotSpecified,isNaN(r)||(u.duration=Mr.msToTimeSpan(r)),u.properties=Cr.sanitizeProperties(n,s),u.measurements=Cr.sanitizeMeasurements(n,o),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",n.dataType="PageviewData",n}(Xr),Yr=function(t){function n(n,e,i,r,s,o,a,u,c,l,d,f){void 0===c&&(c="Ajax");var h=t.call(this)||this;h.aiDataContract={id:wr.Required,ver:wr.Required,name:wr.Default,resultCode:wr.Default,duration:wr.Default,success:wr.Default,data:wr.Default,target:wr.Default,type:wr.Default,properties:wr.Default,measurements:wr.Default,kind:wr.Default,value:wr.Default,count:wr.Default,min:wr.Default,max:wr.Default,stdDev:wr.Default,dependencyKind:wr.Default,dependencySource:wr.Default,commandName:wr.Default,dependencyTypeName:wr.Default},h.id=e,h.duration=Mr.msToTimeSpan(s),h.success=o,h.resultCode=a+"",h.type=Cr.sanitizeString(n,c);var p=Er.ParseDependencyPath(n,i,u,r);return h.data=Cr.sanitizeUrl(n,r)||p.data,h.target=Cr.sanitizeString(n,p.target),l&&(h.target=h.target+" | "+l),h.name=Cr.sanitizeString(n,p.name),h.properties=Cr.sanitizeProperties(n,d),h.measurements=Cr.sanitizeMeasurements(n,f),h}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",n.dataType="RemoteDependencyData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.success=!0,n.properties={},n.measurements={},n}return __extends(n,t),n}(Or)),Gr=function(t){function n(n,e,i,r,s){var o=t.call(this)||this;return o.aiDataContract={ver:wr.Required,message:wr.Required,severityLevel:wr.Default,properties:wr.Default},o.message=Cr.sanitizeMessage(n,e=e||Mr.NotSpecified),o.properties=Cr.sanitizeProperties(n,r),o.measurements=Cr.sanitizeMeasurements(n,s),i&&(o.severityLevel=i),o}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.Message",n.dataType="MessageData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Or)),Kr=function(t){function n(n,e,i,r,s,o,a){var u=t.call(this)||this;return u.aiDataContract={ver:wr.Required,name:wr.Default,url:wr.Default,duration:wr.Default,perfTotal:wr.Default,networkConnect:wr.Default,sentRequest:wr.Default,receivedResponse:wr.Default,domProcessing:wr.Default,properties:wr.Default,measurements:wr.Default},u.url=Cr.sanitizeUrl(n,i),u.name=Cr.sanitizeString(n,e)||Mr.NotSpecified,u.properties=Cr.sanitizeProperties(n,s),u.measurements=Cr.sanitizeMeasurements(n,o),a&&(u.domProcessing=a.domProcessing,u.duration=a.duration,u.networkConnect=a.networkConnect,u.perfTotal=a.perfTotal,u.receivedResponse=a.receivedResponse,u.sentRequest=a.sentRequest),u}return __extends(n,t),n.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",n.dataType="PageviewPerformanceData",n}(function(t){function n(){var n=t.call(this)||this;return n.ver=2,n.properties={},n.measurements={},n}return __extends(n,t),n}(Xr)),Qr=function(t){function n(n,e){var i=t.call(this)||this;return i.aiDataContract={baseType:wr.Required,baseData:wr.Required},i.baseType=n,i.baseData=e,i}return __extends(n,t),n}(Pr);!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"}(Hr||(Hr={}));var Zr=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"},ts=function(){function t(){}return t.create=function(t,n,e,i,r,s){if(e=Cr.sanitizeString(i,e)||Mr.NotSpecified,Fi.isNullOrUndefined(t)||Fi.isNullOrUndefined(n)||Fi.isNullOrUndefined(e))throw Error("Input doesn't contain all required fields");var o={name:e,time:Fi.toISOString(new Date),iKey:"",ext:s||{},tags:[],data:{},baseType:n,baseData:t};return Fi.isNullOrUndefined(r)||Ai(r,(function(t,n){o.data[t]=n})),o},t}(),ns=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}(),es=new Zr,is=function t(n,e,i,r){zi(t,this,(function(t){var s,o=Fi.arrForEach,a=Fi.isNullOrUndefined,u=null,c=[],l=!1;function d(){i&&o(i.getTransmissionControls(),(function(t){o(t,(function(t){return t.flush(!0)}))}))}i&&(s=i.logger),t.trackPageView=function(t,i){var f=t.name;if(a(f)||"string"!=typeof f){var h=si();f=t.name=h&&h.title||""}var p=t.uri;if(a(p)||"string"!=typeof p){var m=ai();p=t.uri=m&&m.href||""}if(!r.isPerformanceTimingSupported())return n.sendPageViewInternal(t,i),d(),void s.throwInternal(_i.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,y=!1,g=r.getPerformanceTiming().navigationStart;g>0&&(v=jr.GetDuration(g,+new Date),r.shouldCollectDuration(v)||(v=void 0)),a(i)||a(i.duration)||(w=i.duration),!e&&isNaN(w)||(isNaN(w)&&(i||(i={}),i.duration=v),n.sendPageViewInternal(t,i),d(),y=!0),i||(i={}),c.push((function(){var e=!1;try{if(r.isPerformanceTimingDataReady()){e=!0;var o={name:f,uri:p};r.populatePageViewPerformanceEvent(o),o.isValid||y?(y||(i.duration=o.durationMs,n.sendPageViewInternal(t,i)),l||(n.sendPageViewPerformanceInternal(o,i),l=!0)):(i.duration=v,n.sendPageViewInternal(t,i))}else g>0&&jr.GetDuration(g,+new Date)>6e4&&(e=!0,y||(i.duration=6e4,n.sendPageViewInternal(t,i)))}catch(t){s.throwInternal(_i.CRITICAL,38,"trackPageView failed on page load calculation: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}return e})),u||(u=setInterval((function(){var t=c.slice(0),n=!1;c=[],o(t,(function(t){t()?n=!0:c.push(t)})),0===c.length&&(clearInterval(u),u=null),n&&d()}),100))}}))},rs=function(){function t(t,n){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=n,this._logger=t}return t.prototype.trackPreviousPageVisit=function(t,n){try{var e=this.restartPageVisitTimer(t,n);e&&this.pageVisitTimeTrackingHandler(e.pageName,e.pageUrl,e.pageVisitTime)}catch(t){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Mr.dump(t))}},t.prototype.restartPageVisitTimer=function(t,n){try{var e=this.stopPageVisitTimer();return this.startPageVisitTimer(t,n),e}catch(t){return this._logger.warnToConsole("Call to restart failed: "+Mr.dump(t)),null}},t.prototype.startPageVisitTimer=function(t,n){try{if(Mr.canUseSessionStorage()){if(null!=Mr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName))throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit");var e=new ss(t,n),i=li().stringify(e);Mr.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,i)}}catch(t){this._logger.warnToConsole("Call to start failed: "+Mr.dump(t))}},t.prototype.stopPageVisitTimer=function(){try{if(Mr.canUseSessionStorage()){var t=Fi.dateNow(),n=Mr.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(n&&ci()){var e=li().parse(n);return e.pageVisitTime=t-e.pageVisitStartTime,Mr.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName),e}return null}return null}catch(t){return this._logger.warnToConsole("Stop page visit timer failed: "+Mr.dump(t)),null}},t}(),ss=function(t,n){this.pageVisitStartTime=Fi.dateNow(),this.pageName=t,this.pageUrl=n},os=function(){function t(t){this.MAX_DURATION_ALLOWED=36e5,t&&(this._logger=t.logger)}return t.prototype.populatePageViewPerformanceEvent=function(t){t.isValid=!1;var n=this.getPerformanceNavigationTiming(),e=this.getPerformanceTiming();if(n||e){if(n)var i=n.duration,r=jr.GetDuration(n.startTime,n.connectEnd),s=jr.GetDuration(n.requestStart,n.responseStart),o=jr.GetDuration(n.responseStart,n.responseEnd),a=jr.GetDuration(n.responseEnd,n.loadEventEnd);else i=jr.GetDuration(e.navigationStart,e.loadEventEnd),r=jr.GetDuration(e.navigationStart,e.connectEnd),s=jr.GetDuration(e.requestStart,e.responseStart),o=jr.GetDuration(e.responseStart,e.responseEnd),a=jr.GetDuration(e.responseEnd,e.loadEventEnd);0===i?this._logger.throwInternal(_i.WARNING,10,"error calculating page view performance.",{total:i,network:r,request:s,response:o,dom:a}):this.shouldCollectDuration(i,r,s,o,a)?i<Math.floor(r)+Math.floor(s)+Math.floor(o)+Math.floor(a)?this._logger.throwInternal(_i.WARNING,8,"client performance math error.",{total:i,network:r,request:s,response:o,dom:a}):(t.durationMs=i,t.perfTotal=t.duration=Mr.msToTimeSpan(i),t.networkConnect=Mr.msToTimeSpan(r),t.sentRequest=Mr.msToTimeSpan(s),t.receivedResponse=Mr.msToTimeSpan(o),t.domProcessing=Mr.msToTimeSpan(a),t.isValid=!0):this._logger.throwInternal(_i.WARNING,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:i,network:r,request:s,response:o,dom:a})}},t.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?ui().timing:null},t.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?ui().getEntriesByType("navigation")[0]:null},t.prototype.isPerformanceNavigationTimingSupported=function(){var t=ui();return t&&t.getEntriesByType&&t.getEntriesByType("navigation").length>0},t.prototype.isPerformanceTimingSupported=function(){var t=ui();return t&&t.timing},t.prototype.isPerformanceTimingDataReady=function(){var t=ui(),n=t?t.timing:0;return n&&n.domainLookupStart>0&&n.navigationStart>0&&n.responseStart>0&&n.requestStart>0&&n.loadEventEnd>0&&n.responseEnd>0&&n.connectEnd>0&&n.domLoading>0},t.prototype.shouldCollectDuration=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=oi()||{},i=["googlebot","adsbot-google","apis-google","mediapartners-google"],r=e.userAgent,s=!1;if(r)for(var o=0;o<i.length;o++)s=s||-1!==r.toLowerCase().indexOf(i[o]);if(s)return!1;for(o=0;o<t.length;o++)if(t[o]<0||t[o]>=this.MAX_DURATION_ALLOWED)return!1;return!0},t}();function as(t,n){t&&t.dispatchEvent&&n&&t.dispatchEvent(n)}var us=function(t){function n(){var n=t.call(this)||this;n.identifier="ApplicationInsightsAnalytics",n.priority=180,n.autoRoutePVDelay=500,n._trackAjaxAttempts=0;var e=ai();return n._prevUri=e&&e.href||"",n}return __extends(n,t),n.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=18e5,t.sessionExpirationMs=864e5,t.disableExceptionTracking=Mr.stringToBoolOrDefault(t.disableExceptionTracking),t.autoTrackPageVisitTime=Mr.stringToBoolOrDefault(t.autoTrackPageVisitTime),t.overridePageViewDuration=Mr.stringToBoolOrDefault(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=Mr.stringToBoolOrDefault(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isCookieUseDisabled=Mr.stringToBoolOrDefault(t.isCookieUseDisabled),t.isStorageUseDisabled=Mr.stringToBoolOrDefault(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Mr.stringToBoolOrDefault(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Mr.stringToBoolOrDefault(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t},n.prototype.processTelemetry=function(t,n){var e=this;Yi(this.core,(function(){return e.identifier+":processTelemetry"}),(function(){var i=!1,r=e._telemetryInitializers.length;n=e._getTelCtx(n);for(var s=0;s<r;++s){var o=e._telemetryInitializers[s];if(o)try{if(!1===o.apply(null,[t])){i=!0;break}}catch(t){n.diagLog().throwInternal(_i.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Mr.getExceptionName(t),{exception:Mr.dump(t)},!0)}}i||e.processNext(t,n)}),(function(){return{item:t}}),!t.sync)},n.prototype.trackEvent=function(t,n){try{var e=ts.create(t,Lr.dataType,Lr.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(_i.WARNING,39,"trackTrace failed, trace will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.startTrackEvent=function(t){try{this._eventTracking.start(t)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,29,"startTrackEvent failed, event will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.stopTrackEvent=function(t,n){try{this._eventTracking.stop(t,void 0,n)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,30,"stopTrackEvent failed, event will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.trackTrace=function(t,n){try{var e=ts.create(t,Gr.dataType,Gr.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(_i.WARNING,39,"trackTrace failed, trace will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.trackMetric=function(t,n){try{var e=ts.create(t,$r.dataType,$r.envelopeType,this.diagLog(),n);this.core.track(e)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,36,"trackMetric failed, metric will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.trackPageView=function(t,n){try{var e=t||{};this._pageViewManager.trackPageView(e,__assign({},e.properties,e.measurements,n)),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(e.name,e.uri)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,37,"trackPageView failed, page view will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.sendPageViewInternal=function(t,n,e){var i=si();i&&(t.refUri=void 0===t.refUri?i.referrer:t.refUri);var r=ts.create(t,Jr.dataType,Jr.envelopeType,this.diagLog(),n,e);this.core.track(r),this._trackAjaxAttempts=0},n.prototype.sendPageViewPerformanceInternal=function(t,n,e){var i=ts.create(t,Kr.dataType,Kr.envelopeType,this.diagLog(),n,e);this.core.track(i)},n.prototype.trackPageViewPerformance=function(t,n){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(t),this.sendPageViewPerformanceInternal(t,n)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,37,"trackPageViewPerformance failed, page view will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.startTrackPage=function(t){try{if("string"!=typeof t){var n=si();t=n&&n.title||""}this._pageTracking.start(t)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,31,"startTrackPage failed, page view may not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.stopTrackPage=function(t,n,e,i){try{if("string"!=typeof t){var r=si();t=r&&r.title||""}if("string"!=typeof n){var s=ai();n=s&&s.href||""}this._pageTracking.stop(t,n,e,i),this.config.autoTrackPageVisitTime&&this._pageVisitTimeManager.trackPreviousPageVisit(t,n)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,32,"stopTrackPage failed, page view will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype.sendExceptionInternal=function(t,n,e){var i=new Ur(this.diagLog(),t.exception||new Error(Mr.NotSpecified),t.properties,t.measurements,t.severityLevel,t.id).toInterface(),r=ts.create(i,Ur.dataType,Ur.envelopeType,this.diagLog(),n,e);this.core.track(r)},n.prototype.trackException=function(t,n){try{this.sendExceptionInternal(t,n)}catch(t){this.diagLog().throwInternal(_i.CRITICAL,35,"trackException failed, exception will not be collected: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}},n.prototype._onerror=function(t){try{var n={url:t&&t.url||(si()||{}).URL,lineNumber:t.lineNumber,columnNumber:t.columnNumber,message:t.message};if(Mr.isCrossOriginError(t.message,t.url,t.lineNumber,t.columnNumber,t.error))this._sendCORSException(n.url);else{if(!Mr.isError(t.error)){var e="window.onerror@"+n.url+":"+t.lineNumber+":"+(t.columnNumber||0);t.error=new Error(t.message),t.error.stack=e}this.trackException({exception:t.error,severityLevel:Hr.Error},n)}}catch(n){var i=t.error?t.error.name+", "+t.error.message:"null";this.diagLog().throwInternal(_i.CRITICAL,11,"_onError threw exception while logging error, error will not be collected: "+Mr.getExceptionName(n),{exception:Mr.dump(n),errorString:i})}},n.prototype.addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype.initialize=function(e,i,r,s){var o=this;if(!this.isInitialized()){if(Fi.isNullOrUndefined(i))throw Error("Error initializing");t.prototype.initialize.call(this,e,i,r,s),this.setInitialized(!1);var a=this._getTelCtx(),u=this.identifier;this._globalconfig={instrumentationKey:e.instrumentationKey,endpointUrl:e.endpointUrl||"https://dc.services.visualstudio.com/v2/track"},this.config=a.getExtCfg(u);var c=n.getDefaultConfig();void 0!==c&&(Ai(c,(function(t,n){o.config[t]=a.getConfig(u,t,n)})),this._globalconfig&&Ai(c,(function(t,n){void 0===o._globalconfig[t]&&(o._globalconfig[t]=n)}))),this.config.isCookieUseDisabled&&Mr.disableCookies(),this.config.isStorageUseDisabled&&Mr.disableStorage();var l={instrumentationKey:function(){return e.instrumentationKey},accountId:function(){return o.config.accountId||e.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||e.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||e.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||e.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||e.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||e.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||e.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||e.appId}};this._pageViewPerformanceManager=new os(this.core),this._pageViewManager=new is(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager),this._pageVisitTimeManager=new rs(this.diagLog(),(function(t,n,e){return o.trackPageVisitTime(t,n,e)})),this._telemetryInitializers=this._telemetryInitializers||[],this._addDefaultTelemetryInitializers(l),this._eventTracking=new cs(this.diagLog(),"trackEvent"),this._eventTracking.action=function(t,n,e,i){i||(i={}),i.duration=e.toString(),o.trackEvent({name:t,properties:i})},this._pageTracking=new cs(this.diagLog(),"trackPageView"),this._pageTracking.action=function(t,n,e,i,r){Fi.isNullOrUndefined(i)&&(i={}),i.duration=e.toString(),o.sendPageViewInternal({name:t,uri:n,properties:i,measurements:r},i)};var d,f=ii(),h=Boolean("object"==typeof history&&history)?history:ni("history"),p=ai(),m=this;if(!1===this.config.disableExceptionTracking&&!this.config.autoExceptionInstrumented&&f){var v=f.onerror;f.onerror=function(t,n,e,i,r){var s=v&&v(t,n,e,i,r);return!0!==s&&m._onerror({message:t,url:n,lineNumber:e,columnNumber:i,error:r}),s},this.config.autoExceptionInstrumented=!0}if(!1===this.config.disableExceptionTracking&&!0===this.config.enableUnhandledPromiseRejectionTracking&&!this.config.autoUnhandledPromiseInstrumented&&f){var w=f.onunhandledrejection;f.onunhandledrejection=function(t){var n=w&&w.call(f,t);return!0!==n&&m._onerror({message:t.reason.toString(),error:t.reason instanceof Error?t.reason:new Error(t.reason.toString()),url:p?p.href:"",lineNumber:0,columnNumber:0}),n},this.config.autoUnhandledPromiseInstrumented=!0}if(!0===this.config.enableAutoRouteTracking&&h&&Fi.isFunction(h.pushState)&&Fi.isFunction(h.replaceState)&&f&&"undefined"!=typeof Event){var y=this;Fi.arrForEach(r,(function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(o._properties=t)})),h.pushState=(d=h.pushState,function(){var t=d.apply(this,arguments);return as(f,Mr.createDomEvent(y.config.namePrefix+"pushState")),as(f,Mr.createDomEvent(y.config.namePrefix+"locationchange")),t}),h.replaceState=function(t){return function(){var n=t.apply(this,arguments);return as(f,Mr.createDomEvent(y.config.namePrefix+"replaceState")),as(f,Mr.createDomEvent(y.config.namePrefix+"locationchange")),n}}(h.replaceState),f.addEventListener&&(f.addEventListener(y.config.namePrefix+"popstate",(function(){as(f,Mr.createDomEvent(y.config.namePrefix+"locationchange"))})),f.addEventListener(y.config.namePrefix+"locationchange",(function(){y._properties&&y._properties.context&&y._properties.context.telemetryTrace&&(y._properties.context.telemetryTrace.traceID=Mr.generateW3CId(),y._properties.context.telemetryTrace.name=p&&p.pathname||"_unknown_"),o._currUri?(o._prevUri=o._currUri,o._currUri=p&&p.href||""):o._currUri=p&&p.href||"",setTimeout(function(t){y.trackPageView({refUri:t,properties:{duration:0}})}.bind(o,o._prevUri),y.autoRoutePVDelay)})))}this.setInitialized(!0)}},n.prototype.trackPageVisitTime=function(t,n,e){this.trackMetric({name:"PageVisitTime",average:e,max:e,min:e,sampleCount:1},{PageName:t,PageUrl:n})},n.prototype._addDefaultTelemetryInitializers=function(t){if(!t.isBrowserLinkTrackingEnabled()){var n=["/browserLinkSignalR/","/__browserLink/"];this._addTelemetryInitializer((function(t){if(t.baseType===Yr.dataType){var e=t.baseData;if(e)for(var i=0;i<n.length;i++)if(e.target&&e.target.indexOf(n[i])>=0)return!1}return!0}))}},n.prototype._addTelemetryInitializer=function(t){this._telemetryInitializers.push(t)},n.prototype._sendCORSException=function(t){var n=ts.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},Ur.dataType,Ur.envelopeType,this.diagLog(),{url:t});this.core.track(n)},n.Version="2.5.10",n}(er),cs=function(){function t(t,n){this._name=n,this._events={},this._logger=t}return t.prototype.start=function(t){void 0!==this._events[t]&&this._logger.throwInternal(_i.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,n,e,i){var r=this._events[t];if(isNaN(r))this._logger.throwInternal(_i.WARNING,63,"stop was called without a corresponding start.",{name:this._name,key:t},!0);else{var s=+new Date,o=jr.GetDuration(r,s);this.action(t,n,o,e,i)}delete this._events[t],this._events[t]=void 0},t}(),ls=function t(n){var e=[];zi(t,this,(function(t){t.enqueue=function(t){e.push(t)},t.count=function(){return e.length},t.clear=function(){e.length=0},t.getItems=function(){return e.slice(0)},t.batchPayloads=function(t){return t&&t.length>0?n.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},t.markAsSent=function(){t.clear()},t.clearSent=function(){}}))},ds=function(){function t(n,e){var i,r=!1;zi(t,this,(function(s){var o=c(t.BUFFER_KEY),a=c(t.SENT_BUFFER_KEY);function u(t,n){var e=[];return Fi.arrForEach(n,(function(n){Fi.isFunction(n)||-1!==Fi.arrIndexOf(t,n)||e.push(n)})),e}function c(t){var i=t;try{i=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+i:i;var r=Mr.getSessionStorage(n,i);if(r){var s=li().parse(r);if(Fi.isString(s)&&(s=li().parse(s)),s&&Mr.isArray(s))return s}}catch(t){n.throwInternal(_i.CRITICAL,42," storage key: "+i+", "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}return[]}function l(t,i){var r=t;try{r=e.namePrefix&&e.namePrefix()?e.namePrefix()+"_"+r:r;var s=JSON.stringify(i);Mr.setSessionStorage(n,r,s)}catch(t){Mr.setSessionStorage(n,r,JSON.stringify([])),n.throwInternal(_i.WARNING,41," storage key: "+r+", "+Mr.getExceptionName(t)+". Buffer cleared",{exception:Mr.dump(t)})}}(i=o.concat(a)).length>t.MAX_BUFFER_SIZE&&(i.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,[]),l(t.BUFFER_KEY,i),s.enqueue=function(e){i.length>=t.MAX_BUFFER_SIZE?r||(n.throwInternal(_i.WARNING,67,"Maximum buffer size reached: "+i.length,!0),r=!0):(i.push(e),l(t.BUFFER_KEY,i))},s.count=function(){return i.length},s.clear=function(){i=[],l(t.BUFFER_KEY,[]),l(t.SENT_BUFFER_KEY,[]),r=!1},s.getItems=function(){return i.slice(0)},s.batchPayloads=function(t){return t&&t.length>0?e.emitLineDelimitedJson()?t.join("\n"):"["+t.join(",")+"]":null},s.markAsSent=function(e){i=u(e,i),l(t.BUFFER_KEY,i);var r=c(t.SENT_BUFFER_KEY);r instanceof Array&&e instanceof Array&&((r=r.concat(e)).length>t.MAX_BUFFER_SIZE&&(n.throwInternal(_i.CRITICAL,67,"Sent buffer reached its maximum size: "+r.length,!0),r.length=t.MAX_BUFFER_SIZE),l(t.SENT_BUFFER_KEY,r))},s.clearSent=function(n){var e=c(t.SENT_BUFFER_KEY);e=u(n,e),l(t.SENT_BUFFER_KEY,e)}}))}return t.BUFFER_KEY="AI_buffer",t.SENT_BUFFER_KEY="AI_sentBuffer",t.MAX_BUFFER_SIZE=2e3,t}(),fs=Fi.isNullOrUndefined;function hs(t,n,e){return t&&e?(t[n]=e,t[n]):null}var ps=function(){function t(){}return t.extractPropsAndMeasurements=function(t,n,e){fs(t)||Ai(t,(function(t,i){Fi.isNumber(i)?e[t]=i:Fi.isString(i)?n[t]=i:ci()&&(n[t]=li().stringify(i))}))},t.createEnvelope=function(n,e,i,r){var s=new Rr(n,r,e);hs(s,"sampleRate",i.sampleRate),(i.baseData||{}).startTime&&(s.time=Fi.toISOString(i.baseData.startTime)),s.iKey=i.iKey;var o=i.iKey.replace(/-/g,"");return s.name=s.name.replace("{0}",o),t.extractPartAExtensions(i,s),i.tags=i.tags||[],s},t.extractPartAExtensions=function(n,e){var i=e.tags=e.tags||{},r=n.ext=n.ext||{},s=n.tags=n.tags||[],o=r.user;o&&(hs(i,es.userAuthUserId,o.authId),hs(i,es.userId,o.id||o.localId));var a=r.app;a&&hs(i,es.sessionId,a.sesId);var u=r.device;u&&(hs(i,es.deviceId,u.id||u.localId),hs(i,es.deviceType,u.deviceClass),hs(i,es.deviceIp,u.ip),hs(i,es.deviceModel,u.model),hs(i,es.deviceType,u.deviceType));var c=n.ext.web;if(c){hs(i,es.deviceLanguage,c.browserLang),hs(i,es.deviceBrowserVersion,c.browserVer),hs(i,es.deviceBrowser,c.browser);var l=e.data=e.data||{},d=l.baseData=l.baseData||{},f=d.properties=d.properties||{};hs(f,"domain",c.domain),hs(f,"isManual",c.isManual?"true":null),hs(f,"screenRes",c.screenRes),hs(f,"userConsent",c.userConsent?"true":null)}var h=r.os;h&&hs(i,es.deviceOS,h.name);var p=r.trace;p&&(hs(i,es.operationParentId,p.parentID),hs(i,es.operationName,p.name),hs(i,es.operationId,p.traceID));for(var m={},v=s.length-1;v>=0;v--)Ai(s[v],(function(t,n){m[t]=n})),s.splice(v,1);Ai(s,(function(t,n){m[t]=n})),e.tags=__assign({},i,m),e.tags[es.internalSdkVersion]||(e.tags[es.internalSdkVersion]="javascript:"+t.Version)},t.prototype.Init=function(t,n){this._logger=t,fs(n.baseData)&&this._logger.throwInternal(_i.CRITICAL,46,"telemetryItem.baseData cannot be null.")},t.Version="2.5.10",t}(),ms=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};ps.extractPropsAndMeasurements(e.data,r,i);var s=e.baseData;if(fs(s))return n.warnToConsole("Invalid input for dependency data"),null;var o=new Yr(n,s.id,s.target,s.name,s.duration,s.success,s.responseCode,s.properties&&s.properties["http.method"]?s.properties["http.method"]:"GET",s.type,s.correlationContext,r,i),a=new Qr(Yr.dataType,o);return ps.createEnvelope(n,Yr.envelopeType,e,a)},n.DependencyEnvelopeCreator=new n,n}(ps),vs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i={},r={};e.baseType!==Lr.dataType&&(i.baseTypeSource=e.baseType),e.baseType===Lr.dataType?(i=e.baseData.properties||{},r=e.baseData.measurements||{}):e.baseData&&ps.extractPropsAndMeasurements(e.baseData,i,r),ps.extractPropsAndMeasurements(e.data,i,r);var s=new Lr(n,e.baseData.name,i,r),o=new Qr(Lr.dataType,s);return ps.createEnvelope(n,Lr.envelopeType,e,o)},n.EventEnvelopeCreator=new n,n}(ps),ws=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.measurements||{},r=e.baseData.properties||{};ps.extractPropsAndMeasurements(e.data,r,i);var s=Ur.CreateFromInterface(n,e.baseData,r,i),o=new Qr(Ur.dataType,s);return ps.createEnvelope(n,Ur.envelopeType,e,o)},n.ExceptionEnvelopeCreator=new n,n}(ps),ys=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.properties||{},s=i.measurements||{};ps.extractPropsAndMeasurements(e.data,r,s);var o=new $r(n,i.name,i.average,i.sampleCount,i.min,i.max,r,s),a=new Qr($r.dataType,o);return ps.createEnvelope(n,$r.envelopeType,e,a)},n.MetricEnvelopeCreator=new n,n}(ps),gs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i,r=e.baseData;fs(r)||fs(r.properties)||fs(r.properties.duration)?fs(e.data)||fs(e.data.duration)||(i=e.data.duration,delete e.data.duration):(i=r.properties.duration,delete r.properties.duration);var s,o=e.baseData;((e.ext||{}).trace||{}).traceID&&(s=e.ext.trace.traceID);var a=o.id||s,u=o.name,c=o.uri,l=o.properties||{},d=o.measurements||{};fs(o.refUri)||(l.refUri=o.refUri),fs(o.pageType)||(l.pageType=o.pageType),fs(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn.toString()),fs(o.properties)||Ai(o.properties,(function(t,n){l[t]=n})),ps.extractPropsAndMeasurements(e.data,l,d);var f=new Jr(n,u,c,i,l,d,a),h=new Qr(Jr.dataType,f);return ps.createEnvelope(n,Jr.envelopeType,e,h)},n.PageViewEnvelopeCreator=new n,n}(ps),bs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData,r=i.name,s=i.uri||i.url,o=i.properties||{},a=i.measurements||{};ps.extractPropsAndMeasurements(e.data,o,a);var u=new Kr(n,r,s,void 0,o,a,i),c=new Qr(Kr.dataType,u);return ps.createEnvelope(n,Kr.envelopeType,e,c)},n.PageViewPerformanceEnvelopeCreator=new n,n}(ps),xs=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype.Create=function(n,e){t.prototype.Init.call(this,n,e);var i=e.baseData.message,r=e.baseData.severityLevel,s=e.baseData.properties||{},o=e.baseData.measurements||{};ps.extractPropsAndMeasurements(e.data,s,o);var a=new Gr(n,i,r,s,o),u=new Qr(Gr.dataType,a);return ps.createEnvelope(n,Gr.envelopeType,e,u)},n.TraceEnvelopeCreator=new n,n}(ps),ks=function t(n){zi(t,this,(function(t){function e(t,s){var o={};if(!t)return n.throwInternal(_i.CRITICAL,48,"cannot serialize object because it is null or undefined",{name:s},!0),o;if(t.__aiCircularRefCheck)return n.throwInternal(_i.WARNING,50,"Circular reference detected while serializing object",{name:s},!0),o;if(!t.aiDataContract){if("measurements"===s)o=r(t,"number",s);else if("properties"===s)o=r(t,"string",s);else if("tags"===s)o=r(t,"string",s);else if(Mr.isArray(t))o=i(t,s);else{n.throwInternal(_i.WARNING,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{li().stringify(t),o=t}catch(t){n.throwInternal(_i.CRITICAL,48,t&&Fi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}return o}return t.__aiCircularRefCheck=!0,Ai(t.aiDataContract,(function(r,a){var u=Fi.isFunction(a)?a()&wr.Required:a&wr.Required,c=Fi.isFunction(a)?a()&wr.Hidden:a&wr.Hidden,l=a&wr.Array,d=void 0!==t[r],f=Fi.isObject(t[r])&&null!==t[r];if(!u||d||l){if(!c){var h;void 0!==(h=f?l?i(t[r],r):e(t[r],r):t[r])&&(o[r]=h)}}else n.throwInternal(_i.CRITICAL,24,"Missing required field specification. The field is required but not present on source",{field:r,name:s})})),delete t.__aiCircularRefCheck,o}function i(t,i){var r;if(t)if(Mr.isArray(t)){r=[];for(var s=0;s<t.length;s++){var o=e(t[s],i+"["+s+"]");r.push(o)}}else n.throwInternal(_i.CRITICAL,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:i},!0);return r}function r(t,e,i){var r;return t&&(r={},Ai(t,(function(t,s){if("string"===e)r[t]=void 0===s?"undefined":null===s?"null":s.toString?s.toString():"invalid field: toString() is not defined.";else if("number"===e)if(void 0===s)r[t]="undefined";else if(null===s)r[t]="null";else{var o=parseFloat(s);r[t]=isNaN(o)?"NaN":o}else r[t]="invalid field: "+i+" is of unknown type.",n.throwInternal(_i.CRITICAL,r[t],null,!0)}))),r}t.serialize=function(t){var i=e(t,"root");try{return li().stringify(i)}catch(t){n.throwInternal(_i.CRITICAL,48,t&&Fi.isFunction(t.toString)?t.toString():"Error serializing object",null,!0)}}}))},Ss=function(){function t(){var n=ii(),e=si(),i=!1,r=!0;zi(t,this,(function(t){try{if(n&&Ii.Attach(n,"online",o)&&(Ii.Attach(n,"offline",a),i=!0),e){var s=e.body||e;Fi.isUndefined(s.ononline)||(s.ononline=o,s.onoffline=a,i=!0)}}catch(t){i=!1}function o(){r=!0}function a(){r=!1}t.isListening=i,t.isOnline=function(){var t=!0,n=oi();return i?t=r:n&&!Fi.isNullOrUndefined(n.onLine)&&(t=n.onLine),t},t.isOffline=function(){return!t.isOnline()}}))}return t.Offline=new t,t}().Offline,Cs=function(){function t(){}return t.prototype.getHashCodeScore=function(n){return this.getHashCode(n)/t.INT_MAX_VALUE*100},t.prototype.getHashCode=function(n){if(""===n)return 0;for(;n.length<t.MIN_INPUT_LENGTH;)n=n.concat(n);for(var e=5381,i=0;i<n.length;++i)e=(e<<5)+e+n.charCodeAt(i),e&=e;return Math.abs(e)},t.INT_MAX_VALUE=2147483647,t.MIN_INPUT_LENGTH=8,t}(),As=function(){function t(){this.hashCodeGeneragor=new Cs,this.keys=new Zr}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}(),_s=function(){function t(t,n){this.INT_MAX_VALUE=2147483647,this._logger=Fi.isNullOrUndefined(n)?new $i:n,(t>100||t<0)&&(this._logger.throwInternal(_i.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 As}return t.prototype.isSampledIn=function(t){var n=this.sampleRate;return null==n||n>=100||t.baseType===$r.dataType||this.samplingScoreGenerator.getSamplingScore(t)<n},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 _s(t){try{return t.responseText}catch(t){}return null}var Fs=function(t){function n(){var e,i,r,s,o=t.call(this)||this;return o.priority=1001,o.identifier="AppInsightsChannelPlugin",o._XMLHttpRequestSupported=!1,zi(n,o,(function(t,a){function u(){throw new Error("Method not implemented.")}function c(n){var e=t._senderConfig.endpointUrl(),i=t._buffer.batchPayloads(n),r=new Blob([i],{type:"text/plain;charset=UTF-8"});si().sendBeacon(e,r)?(t._buffer.markAsSent(n),t._onSuccess(n,n.length)):(l(n,!0),t.diagLog().throwInternal(Ai.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(n,e){var i=new XMLHttpRequest,r=t._senderConfig.endpointUrl();try{i[jr]=!0}catch(t){}i.open("POST",r,e),i.setRequestHeader("Content-type","application/json"),Fr.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(kr.sdkContextHeader,kr.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,n,n.length)},i.onerror=function(e){return t._onError(n,m(i),e)};var s=t._buffer.batchPayloads(n);i.send(s),t._buffer.markAsSent(n)}function d(n){try{if(n&&""!==n){var e=ci().parse(n);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted===e.errors.length)return e}}catch(e){t.diagLog().throwInternal(Ai.CRITICAL,43,"Cannot parse the response. "+Fr.getExceptionName(e),{response:n})}return null}function f(n,r){if(void 0===r&&(r=1),n&&0!==n.length){t._buffer.clearSent(n),e++;for(var s=0,o=n;s<o.length;s++)t._buffer.enqueue(o[s]);!function(t){var n;if(e<=1)n=10;else{var r=(Math.pow(2,e)-1)/2,s=Math.floor(Math.random()*r*10)+1;n=Math.max(Math.min(s*=t,3600),10)}var o=_i.dateNow()+1e3*n;i=o}(r),h()}}function h(){if(!r){var n=i?Math.max(0,i-_i.dateNow()):0,e=Math.max(t._senderConfig.maxBatchInterval(),n);r=setTimeout((function(){t.triggerSend(!0,null,1)}),e)}}function p(t){return 408===t||429===t||500===t||503===t}function m(t,n){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+_s(t)||t.response||"":n}function v(n){var e=ei(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,n)},i.onerror=function(e){return t._onError(n,w(i),e)};var r=e&&e.location&&e.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(r,0))return t.diagLog().throwInternal(Ai.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var s=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",s);var o=t._buffer.batchPayloads(n);i.send(o),t._buffer.markAsSent(n)}function w(t,n){return t?"XDomainRequest,Response:"+_s(t)||"":n}t.pause=u,t.resume=u,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(n){t.diagLog().throwInternal(Ai.CRITICAL,22,"flush failed, telemetry will not be collected: "+Fr.getExceptionName(n),{exception:Fr.dump(n)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!Fr.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,c,2)}catch(n){t.diagLog().throwInternal(Ai.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Fr.getExceptionName(n),{exception:Fr.dump(n)})}},t.teardown=u,t.initialize=function(r,o,u,d){a.initialize(r,o,u,d);var f=t._getTelCtx(),h=t.identifier;s=new xs(o.logger),e=0,i=null,t._sender=null;var p=n._getDefaultAppInsightsChannelConfig();if(t._senderConfig=n._getEmptyAppInsightsChannelConfig(),Ci(p,(function(n,e){t._senderConfig[n]=function(){return f.getConfig(h,n,e())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&Fr.canUseSessionStorage()?new ls(t.diagLog(),t._senderConfig):new cs(t._senderConfig),t._sample=new As(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(_i.isNullOrUndefined(t.disableInstrumentaionKeyValidation)||!t.disableInstrumentaionKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(t.instrumentationKey)}(r)||t.diagLog().throwInternal(Ai.CRITICAL,100,"Invalid Instrumentation key "+r.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&Fr.IsBeaconApiSupported())t._sender=c;else if(void 0!==typeof XMLHttpRequest){var m=ti("XMLHttpRequest");m&&("withCredentials"in new m?(t._sender=l,t._XMLHttpRequestSupported=!0):void 0!==typeof XDomainRequest&&(t._sender=v))}},t.processTelemetry=function(e,i){i=t._getTelCtx(i);try{if(t._senderConfig.disableTelemetry())return;if(!e)return void i.diagLog().throwInternal(Ai.CRITICAL,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void i.diagLog().throwInternal(Ai.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(Ai.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(e))return void i.diagLog().throwInternal(Ai.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});e.sampleRate=t._sample.sampleRate;var r=n.constructEnvelope(e,t._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(Ai.CRITICAL,47,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags.ProcessLegacy&&(_i.arrForEach(e.tags.ProcessLegacy,(function(t){try{t&&!1===t(r)&&(o=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(Ai.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Fr.getExceptionName(t),{exception:Fr.dump(t)},!0)}})),delete e.tags.ProcessLegacy),o)return;var a=s.serialize(r),u=t._buffer.getItems(),c=t._buffer.batchPayloads(u);c&&c.length+a.length>t._senderConfig.maxBatchSizeInBytes()&&t.triggerSend(!0,null,10),t._buffer.enqueue(a),h()}catch(t){i.diagLog().throwInternal(Ai.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}t.processNext(e,i)},t._xhrReadyStateChange=function(n,i,r){if(4===n.readyState){var s=null;t._appId||(s=d(_s(n)||n.response))&&s.appId&&(t._appId=s.appId),(n.status<200||n.status>=300)&&0!==n.status?!t._senderConfig.isRetryDisabled()&&p(n.status)?(f(i),t.diagLog().throwInternal(Ai.WARNING,40,". Response code "+n.status+". Will retry to send "+i.length+" items.")):t._onError(i,m(n)):ks.isOffline()?t._senderConfig.isRetryDisabled()||(f(i,10),t.diagLog().throwInternal(Ai.WARNING,40,". Offline - Response Code: "+n.status+". Offline status: "+ks.isOffline()+". Will retry to send "+i.length+" items.")):206===n.status?(s||(s=d(_s(n)||n.response)),s&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,m(n))):(e=0,t._onSuccess(i,r))}},t.triggerSend=function(n,e,s){void 0===n&&(n=!0);try{if(t._senderConfig.disableTelemetry())t._buffer.clear();else if(t._buffer.count()>0){var a=t._buffer.getItems();!function(n,e){var i,r=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(r&&r.eventsSendRequest)try{r.eventsSendRequest(n,e)}catch(n){t.diagLog().throwInternal(Ai.CRITICAL,74,"send request notification failed: "+Fr.getExceptionName(n),{exception:Fr.dump(n)})}}(s||0,n),e?e.call(o,a,n):t._sender(a,n)}clearTimeout(r),r=null,i=null}catch(n){var u=Fr.getIEVersion();(!u||u>9)&&t.diagLog().throwInternal(Ai.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+Fr.getExceptionName(n),{exception:Fr.dump(n)})}},t._onError=function(n,e){t.diagLog().throwInternal(Ai.WARNING,26,"Failed to send telemetry.",{message:e}),t._buffer.clearSent(n)},t._onPartialSuccess=function(n,e){for(var i=[],r=[],s=0,o=e.errors.reverse();s<o.length;s++){var a=o[s],u=n.splice(a.index,1)[0];p(a.statusCode)?r.push(u):i.push(u)}n.length>0&&t._onSuccess(n,e.itemsAccepted),i.length>0&&t._onError(i,m(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),r.length>0&&(f(r),t.diagLog().throwInternal(Ai.WARNING,40,"Partial success. Delivered: "+n.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},t._onSuccess=function(n){t._buffer.clearSent(n)},t._xdrOnLoad=function(n,i){var r=_s(n);if(!n||r+""!="200"&&""!==r){var s=d(r);s&&s.itemsReceived&&s.itemsReceived>s.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,w(n))}else e=0,t._onSuccess(i,0)}})),o}return __extends(n,t),n.constructEnvelope=function(t,n,e){var i;switch((i=n===t.iKey||_i.isNullOrUndefined(n)?t:__assign({},t,{iKey:n})).baseType){case Dr.dataType:return ms.EventEnvelopeCreator.Create(e,i);case Yr.dataType:return bs.TraceEnvelopeCreator.Create(e,i);case Xr.dataType:return ys.PageViewEnvelopeCreator.Create(e,i);case Gr.dataType:return gs.PageViewPerformanceEnvelopeCreator.Create(e,i);case Lr.dataType:return vs.ExceptionEnvelopeCreator.Create(e,i);case Wr.dataType:return ws.MetricEnvelopeCreator.Create(e,i);case Jr.dataType:return ps.DependencyEnvelopeCreator.Create(e,i);default:return ms.EventEnvelopeCreator.Create(e,i)}},n._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}}},n._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}},n}(nr),Ms=function(){},Is=function(){function t(n,e){var i=this;this._logger=_i.isNullOrUndefined(e)?new Wi:e,n||(n={}),"function"!=typeof n.sessionExpirationMs&&(n.sessionExpirationMs=function(){return t.acquisitionSpan}),"function"!=typeof n.sessionRenewalMs&&(n.sessionRenewalMs=function(){return t.renewalSpan}),this.config=n,this._storageNamePrefix=function(){return i.config.namePrefix&&i.config.namePrefix()?t.cookieNameConst+i.config.namePrefix():t.cookieNameConst},this.automaticSession=new Ms}return t.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var n=(new Date).getTime(),e=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,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=Fr.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=Fr.getStorage(this._logger,this._storageNamePrefix());n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||this.renew()},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{n.length>1&&(this.automaticSession.acquisitionDate=+new Date(+n[1]),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0),n.length>2&&(this.automaticSession.renewalDate=+new Date(+n[2]),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(t){this._logger.throwInternal(Ai.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+Fr.getExceptionName(t),{exception:Fr.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(Ai.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=Fr.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),Fr.canUseLocalStorage()||this._logger.throwInternal(Ai.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,e){var i=n+this.config.sessionExpirationMs(),r=e+this.config.sessionRenewalMs(),s=new Date,o=[t,n,e];s.setTime(i<r?i:r);var a=this.config.cookieDomain?this.config.cookieDomain():null,u=0===this.config.sessionExpirationMs()?"0":s.toUTCString();Fr.setCookie(this._logger,this._storageNamePrefix(),o.join("|")+";expires="+u,a),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,n,e){Fr.setStorage(this._logger,this._storageNamePrefix(),[t,n,e].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),Ts=function(){},Es=function(){this.id="browser",this.deviceClass="Browser"},js=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},Bs=function(){function t(n,e){this.isNewUser=!1,this._logger=e;var i=Fr.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var r=i.split(t.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=n,!this.id){this.id=_i.newId(n&&n.idLength?n.idLength():22);var s=new Date,o=_i.toISOString(s);this.accountAcquisitionDate=o,this.isNewUser=!0,s.setTime(s.getTime()+31536e6);var a=[this.id,o],u=this.config.cookieDomain?this.config.cookieDomain():void 0;Fr.setCookie(this._logger,t.userCookieName,a.join(t.cookieSeparator)+";expires="+s.toUTCString(),u);var c=n.namePrefix&&n.namePrefix()?n.namePrefix()+"ai_session":"ai_session";Fr.removeStorage(this._logger,c)}this.accountId=n.accountId?n.accountId():void 0;var l=Fr.getCookie(this._logger,t.authUserCookieName);if(l){var d=(l=decodeURI(l)).split(t.cookieSeparator);d[0]&&(this.authenticatedId=d[0]),d.length>1&&d[1]&&(this.accountId=d[1])}}return t.prototype.setAuthenticatedUserContext=function(n,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(n)||e&&!this.validateUserInput(e))this._logger.throwInternal(Ai.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=n;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&Fr.setCookie(this._logger,t.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,Fr.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}(),Ns=function(){},Ps=function(t,n,e,i){this.traceID=t||Fr.generateW3CId(),this.parentID=n,this.name=e;var r=oi();!e&&r&&r.pathname&&(this.name=r.pathname),this.name=Sr.sanitizeString(i,this.name)},Rs=function(){function t(t,n){var e=this;e.application=new Ts,e.internal=new js(n),ni()&&(e.sessionManager=new Is(n,t),e.device=new Es,e.location=new Ns,e.user=new Bs(n,t),e.telemetryTrace=new Ps(void 0,void 0,void 0,t),e.session=new Ms),e.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var n=this.session,e=this.sessionManager,i=n||e&&e.automaticSession;i&&_i.isString(i.id)&&(t.ext.app.sesId=i.id),n&&(t.ext.app.sesId=_i.isString(n.id)?n.id:e.automaticSession.id)},t.prototype.applyOperatingSystemContxt=function(t){var n=this.os;n&&n.name&&(t.ext.os=n)},t.prototype.applyApplicationContext=function(t){var n=this.application;n&&(_i.isString(n.ver)&&(t.tags[ns.applicationVersion]=n.ver),_i.isString(n.build)&&(t.tags[ns.applicationBuild]=n.build))},t.prototype.applyDeviceContext=function(t){var n=this.device;n&&(_i.isString(n.id)&&(t.ext.device.localId=n.id),_i.isString(n.ip)&&(t.ext.device.ip=n.ip),_i.isString(n.model)&&(t.ext.device.model=n.model),_i.isString(n.deviceClass)&&(t.ext.device.deviceClass=n.deviceClass))},t.prototype.applyInternalContext=function(t){var n=this.internal;n&&(_i.isString(n.agentVersion)&&(t.tags[ns.internalAgentVersion]=n.agentVersion),_i.isString(n.sdkVersion)&&(t.tags[ns.internalSdkVersion]=n.sdkVersion),t.baseType!==Hi.dataType&&t.baseType!==Xr.dataType||(_i.isString(n.snippetVer)&&(t.tags[ns.internalSnippet]=n.snippetVer),_i.isString(n.sdkSrc)&&(t.tags[ns.internalSdkSrc]=n.sdkSrc)))},t.prototype.applyLocationContext=function(t){var n=this.location;n&&_i.isString(n.ip)&&(t.tags[ns.locationIp]=n.ip)},t.prototype.applyOperationContext=function(t){var n=this.telemetryTrace;if(n){var e=t.ext.trace||{traceID:void 0,parentID:void 0};_i.isString(n.traceID)&&(e.traceID=n.traceID),_i.isString(n.name)&&(e.name=n.name),_i.isString(n.parentID)&&(e.parentID=n.parentID),t.ext.trace=e}},t.prototype.applyWebContext=function(t){var n=this.web;n&&(t.ext.web=t.ext.web||{},t.ext.web=n)},t.prototype.applyUserContext=function(t){var n=this.user;n&&(t.tags||(t.tags=[]),_i.isString(n.accountId)&&(t.tags[ns.userAccountId]=n.accountId),_i.isString(n.id)&&(t.ext.user.id=n.id),_i.isString(n.authenticatedId)&&(t.ext.user.authId=n.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[ts.DeviceExt]&&0===_i.objKeys(t.ext[ts.DeviceExt]).length&&delete t.ext[ts.DeviceExt],t.ext[ts.UserExt]&&0===_i.objKeys(t.ext[ts.UserExt]).length&&delete t.ext[ts.UserExt],t.ext[ts.WebExt]&&0===_i.objKeys(t.ext[ts.WebExt]).length&&delete t.ext[ts.WebExt],t.ext[ts.OSExt]&&0===_i.objKeys(t.ext[ts.OSExt]).length&&delete t.ext[ts.OSExt],t.ext[ts.AppExt]&&0===_i.objKeys(t.ext[ts.AppExt]).length&&delete t.ext[ts.AppExt],t.ext[ts.TraceExt]&&0===_i.objKeys(t.ext[ts.TraceExt]).length&&delete t.ext[ts.TraceExt]},t}(),Os=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.priority=110,n.identifier="AppInsightsPropertiesPlugin",n}return __extends(n,t),n.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}}},n.prototype.initialize=function(e,i,r,s){var o=this;t.prototype.initialize.call(this,e,i,r,s);var a=this._getTelCtx(),u=this.identifier,c=n.getDefaultConfig();this._extensionConfig=this._extensionConfig||n.getDefaultConfig(),Ci(c,(function(t,n){o._extensionConfig[t]=function(){return a.getConfig(u,t,n())}})),this.context=new Rs(i.logger,this._extensionConfig),this._breezeChannel=Fr.getExtension(r,"AppInsightsChannelPlugin"),this.context.appId=function(){return o._breezeChannel?o._breezeChannel._appId:null}},n.prototype.processTelemetry=function(t,n){if(_i.isNullOrUndefined(t));else{if(n=this._getTelCtx(n),t.name===Xr.envelopeType&&n.diagLog().resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t,n),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var e=new Hi(72,(si()||{}).userAgent||"");n.diagLog().logInternalMessage(Ai.CRITICAL,e)}this.processNext(t,n)}},n.prototype._processTelemetryInternal=function(t,n){t.tags||(t.tags=[]),t.ext||(t.ext={});var e=t.ext;e[ts.DeviceExt]=e[ts.DeviceExt]||{},e[ts.WebExt]=e[ts.WebExt]||{},e[ts.UserExt]=e[ts.UserExt]||{},e[ts.OSExt]=e[ts.OSExt]||{},e[ts.AppExt]=e[ts.AppExt]||{},e[ts.TraceExt]=e[ts.TraceExt]||{};var i=this.context;i.applySessionContext(t,n),i.applyApplicationContext(t,n),i.applyDeviceContext(t,n),i.applyOperationContext(t,n),i.applyUserContext(t,n),i.applyOperatingSystemContxt(t,n),i.applyWebContext(t,n),i.applyLocationContext(t,n),i.applyInternalContext(t,n),i.cleanUp(t,n)},n}(nr),Ds=_i.objKeys,Ls=_i.arrForEach;function Us(t,n,e){var i=0,r=t[n],s=t[e];return r&&s&&(i=Er.GetDuration(r,s)),i}function qs(t,n,e,i,r){var s=0,o=Us(e,i,r);return o&&(s=zs(t,n,Fr.msToTimeSpan(o))),s}function zs(t,n,e){var i=0;return t&&n&&e&&((t.ajaxPerf=t.ajaxPerf||{})[n]=e,i=1),i}var Vs=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},Hs=function t(n,e,i){var r=this,s=i;r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Vs,r.clientFailure=0,r.traceID=n,r.spanID=e,zi(t,r,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?Mr.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?Sr.sanitizeUrl(s,Mr.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(n,e,i){if(t.ajaxTotalDuration=Math.round(1e3*Er.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var r,s=((r={id:"|"+t.traceID+"."+t.spanID,target:t.getAbsoluteUrl(),name:t.getPathName(),type:n,duration:t.ajaxTotalDuration,success:+t.status>=200&&+t.status<400,responseCode:+t.status,method:t.method}).properties={HttpMethod:t.method},r);if(function(t,n){var e=t.perfTiming,i=n.properties||{},r=0,s=_i.isString,o="redirect",a="startTime",u="connectEnd",c="requestStart",l="responseEnd",d=o+"Start",f=o="End";if(e){r|=qs(i,o,e,d,f),r|=qs(i,"domainLookup",e,"domainLookupStart","domainLookupEnd"),r|=qs(i,"connect",e,"connectStart",u),r|=qs(i,"request",e,c,"requestEnd"),r|=qs(i,"response",e,"responseStart",l),r|=qs(i,"networkConnect",e,a,u),r|=qs(i,"sentRequest",e,c,l);var h=e.duration;h||(h=Us(e,a,l)||0),r|=zs(i,"duration",h),r|=zs(i,"perfTotal",h);var p=e.serverTiming;if(p){var m={};Ls(p,(function(t,n){var e=function(t){var n=t,e=/([^\w\d_$])/g;return e.test(t)&&(n=t.replace(e,"_")),n}(t.name||""+n),i=m[e]||{};Ci(t,(function(t,n){("name"!==t&&s(n)||_i.isNumber(n))&&(i[t]&&(n=i[t]+";"+n),!n&&s(n)||(i[t]=n))})),m[e]=i})),r|=zs(i,"serverTiming",m)}r|=zs(i,"transferSize",e.transferSize),r|=zs(i,"encodedBodySize",e.encodedBodySize),r|=zs(i,"decodedBodySize",e.decodedBodySize)}else t.perfMark&&(r|=zs(i,"missing",t.perfAttempts));r&&(n.properties=i)}(t,s),e&&Ds(t.requestHeaders).length>0&&(s.properties=s.properties||{},s.properties.requestHeaders=t.requestHeaders),i){var o=i();if(o){var a=o.correlationContext;if(a&&(s.correlationContext=a),o.headerMap&&Ds(o.headerMap).length>0&&(s.properties=s.properties||{},s.properties.responseHeaders=o.headerMap),t.status>=400){var u=o.type;s.properties=s.properties||{},""!==u&&"text"!==u||(s.properties.responseText=o.responseText?o.statusText+" - "+o.responseText:o.statusText),"json"===u&&(s.properties.responseText=o.response?o.statusText+" - "+JSON.stringify(o.response):o.statusText)}}}return s}}))},Ws=function(){function t(n,e){var i=this;i.traceFlag=t.DEFAULT_TRACE_FLAG,i.version=t.DEFAULT_VERSION,i.traceId=n&&t.isValidTraceId(n)?n:Fr.generateW3CId(),i.spanId=e&&t.isValidSpanId(e)?e:Fr.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}(),$s=_i.isNullOrUndefined,Xs=_i.arrForEach,Js=0;function Ys(t){var n="";try{$s(t)||$s(t.ajaxData)||$s(t.ajaxData.requestUrl)||(n+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return n}function Gs(t,n,e,i,r){t.diagLog().throwInternal(Ai.CRITICAL,n,e,i,r)}function Ks(t,n,e,i,r){t.diagLog().throwInternal(Ai.WARNING,n,e,i,r)}function Qs(t,n,e){return function(i){Gs(t,n,e,{ajaxDiagnosticsMessage:Ys(i.inst),exception:Fr.dump(i.err)})}}function Zs(t,n){return t&&n?t.indexOf(n):-1}var to,no=function(t){function n(){var e=t.call(this)||this;e.identifier=n.identifier,e.priority=120;var i,r,s,o,a=oi(),u=!1,c=!1,l=a&&a.host&&a.host.toLowerCase(),d=n.getEmptyConfig(),f=!1,h=0,p=!1,m=0,v=!1,w=[],y={};return zi(n,e,(function(t,e){function a(t,n,e){w.push(function(t,n,e){return t?br(t.prototype,n,e,!1):null}(t,n,e))}function g(t,n,e){var i=!1,r=((_i.isString(n)?n:(n||{}).url||"")||"").toLowerCase(),s=Zs(r,"?"),o=Zs(r,"#");return(-1===s||-1!==o&&o<s)&&(s=o),-1!==s&&(r=r.substring(0,s)),$s(t)?$s(n)||(i="object"==typeof n&&!0===n[jr]||!!e&&!0===e[jr]):i=!0===t[jr]||!0===r[jr],i?y[r]||(y[r]=1):y[r]&&(i=!0),i}function b(t,n){var e=!0,i=c;return $s(t)||(e=!0===n||!$s(t.ajaxData)),i&&e}function x(t){try{var n=t.responseType;if(""===n||"text"===n)return t.responseText}catch(t){}return null}function k(n){try{var e=n.getAllResponseHeaders();if(null!==e&&-1!==Zs(e.toLowerCase(),kr.requestContextHeaderLowerCase)){var i=n.getResponseHeader(kr.requestContextHeader);return Ir.getCorrelationContext(i)}}catch(e){Ks(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Ys(n),exception:Fr.dump(e)})}}function S(t,n){if(n.requestUrl&&o&&p){var e=ai();if(e&&_i.isFunction(e.mark)){Js++;var i=o+t+"#"+Js;e.mark(i);var r=e.getEntriesByName(i);r&&1===r.length&&(n.perfMark=r[0])}}}function C(t,n,e,i){var r=n.perfMark,s=ai(),o=d.maxAjaxPerfLookupAttempts,a=d.ajaxPerfLookupDelay,u=n.requestUrl,c=0;!function l(){try{if(s&&r){c++;for(var d=null,f=s.getEntries(),h=f.length-1;h>=0;h--){var p=f[h];if(p){if("resource"===p.entryType)p.initiatorType!==t||-1===Zs(p.name,u)&&-1===Zs(u,p.name)||(d=p);else if("mark"===p.entryType&&p.name===r.name){n.perfTiming=d;break}if(p.startTime<r.startTime-1e3)break}}}!r||n.perfTiming||c>=o||!1===n.async?(r&&_i.isFunction(s.clearMarks)&&s.clearMarks(r.name),n.perfAttempts=c,e()):setTimeout(l,a)}catch(t){i(t)}}()}function A(n){var e="";try{$s(n)||(e+="string"==typeof n?"(url: '"+n+"')":"(url: '"+n.url+"')")}catch(n){Gs(t,15,"Failed to grab failed fetch diagnostics message",{exception:Fr.dump(n)})}return e}function _(n,e,i,r,s){function o(n,e,r){var s=r||{};s.fetchDiagnosticsMessage=A(i),e&&(s.exception=Fr.dump(e)),Ks(t,n,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",s)}r&&(r.responseFinishedTime=Er.Now(),r.status=e,C("fetch",r,(function(){var n=r.CreateTrackItem("Fetch",f,s);n?t.trackDependencyDataInternal(n):o(14,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(t){o(18,t,null)})))}function F(n){if(n&&n.headers)try{var e=n.headers.get(kr.requestContextHeader);return Ir.getCorrelationContext(e)}catch(e){Ks(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:A(n),exception:Fr.dump(e)})}}t.initialize=function(l,h,y,A){if(!t.isInitialized()){e.initialize(l,h,y,A);var M=t._getTelCtx();Ci(n.getDefaultConfig(),(function(t,e){d[t]=M.getConfig(n.identifier,t,e)}));var I=d.distributedTracingMode;if(f=d.enableRequestHeaderTracking,m=d.maxAjaxCallsPerView,v=d.enableResponseHeaderTracking,s=I===wr.AI||I===wr.AI_AND_W3C,r=I===wr.AI_AND_W3C||I===wr.W3C,p=d.enableAjaxPerfTracking){var T=l.instrumentationKey||"unkwn";o=T.length>5?"ai.ajxmn."+T.substring(T.length-5)+".":"ai.ajxmn."+T+"."}if(!1===d.disableAjaxTracking&&function(t){var n=!1;if("undefined"!=typeof XMLHttpRequest&&!$s(XMLHttpRequest)){var e=XMLHttpRequest.prototype;n=!($s(e)||$s(e.open)||$s(e.send)||$s(e.abort))}var i=Fr.getIEVersion();if(i&&i<9&&(n=!1),n)try{(new XMLHttpRequest).ajaxData={};var r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=r}catch(e){n=!1,Gs(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Fr.dump(e)})}return n}(t)&&!c&&(a(XMLHttpRequest,"open",{req:function(n,e,r,s){var o=n.inst,a=o.ajaxData;g(o,r)||!b(o,!0)||a&&a.xhrMonitoringState.openDone||function(n,e,r,s){var o=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Fr.generateW3CId(),a=Fr.generateW3CId().substr(0,16),u=new Hs(o,a,t.diagLog());u.method=e,u.requestUrl=r,u.xhrMonitoringState.openDone=!0,u.requestHeaders={},u.async=s,n.ajaxData=u,function(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=Mi.Attach(n,"readystatechange",(function(){try{n&&4===n.readyState&&b(n)&&function(n){var e=n.ajaxData;function i(e,i){var r=i||{};r.ajaxDiagnosticsMessage=Ys(n),e&&(r.exception=Fr.dump(e)),Ks(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}e.responseFinishedTime=Er.Now(),e.status=n.status,C("xmlhttprequest",e,(function(){try{var r=e.CreateTrackItem("Ajax",f,(function(){var t={statusText:n.statusText,headerMap:null,correlationContext:k(n),type:n.responseType,responseText:x(n),response:n.response};if(v){var e=n.getAllResponseHeaders();if(e){var i=_i.strTrim(e).split(/[\r\n]+/),r={};Xs(i,(function(t){var n=t.split(": "),e=n.shift(),i=n.join(": ");r[e]=i})),t.headerMap=r}}return t}));r?t.trackDependencyDataInternal(r):i(null,{requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime})}finally{try{n.ajaxData=null}catch(t){}}}),(function(t){i(t,null)}))}(n)}catch(i){var e=Fr.dump(i);e&&-1!==Zs(e.toLowerCase(),"c00c023f")||Gs(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Ys(n),exception:e})}}))}(n)}(o,e,r,s)},hkErr:Qs(t,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"send",{req:function(n){var e=n.inst,i=e.ajaxData;b(e)&&!i.xhrMonitoringState.sendDone&&(S("xhr",i),i.requestSentTime=Er.Now(),e=t.includeCorrelationHeaders(i,void 0,void 0,e),i.xhrMonitoringState.sendDone=!0)},hkErr:Qs(t,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"abort",{req:function(t){var n=t.inst,e=n.ajaxData;b(n)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Qs(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),f&&a(XMLHttpRequest,"setRequestHeader",{req:function(t,n,e){var i=t.inst;b(i)&&(i.ajaxData.requestHeaders[n]=e)},hkErr:Qs(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0),function(){var n,e=!(n=Ze())||$s(n.Request)||$s(n.Request.prototype)||$s(n.fetch)?null:n.fetch;if(e){var r=Ze(),s=e.polyfill;!1===d.disableFetchTracking?(w.push(br(r,"fetch",{req:function(n,e,r){var o;if(u&&!g(null,e,r)&&(!s||!c)){var a=n.ctx();o=function(n,e){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Fr.generateW3CId(),s=Fr.generateW3CId().substr(0,16),o=new Hs(r,s,t.diagLog());o.requestSentTime=Er.Now(),o.requestUrl=n instanceof Request?n?n.url:"":n;var a="GET";e&&e.method?a=e.method:n&&n instanceof Request&&(a=n.method),o.method=a;var u={};return f&&new Headers((e?e.headers:0)||n instanceof Request&&n.headers||{}).forEach((function(t,n){u[n]=t})),o.requestHeaders=u,S("fetch",o),o}(e,r);var l=t.includeCorrelationHeaders(o,e,r);l!==r&&n.set(1,l),a.data=o}},rsp:function(t,n){var e=t.ctx().data;e&&(t.rslt=t.rslt.then((function(t){return _(0,(t||{}).status,t,e,(function(){var n={statusText:t.statusText,headerMap:null,correlationContext:F(t)};if(v){var e={};t.headers.forEach((function(t,n){e[n]=t})),n.headerMap=e}return n})),t})).catch((function(t){throw _(0,0,n,e,null),t})))},hkErr:Qs(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),u=!0):s&&w.push(br(r,"fetch",{req:function(t,n,e){g(null,n,e)}})),s&&(r.fetch.polyfill=s)}}(),y.length>0&&y){for(var E=void 0,j=0;!E&&j<y.length;)y[j]&&"AppInsightsPropertiesPlugin"===y[j].identifier&&(E=y[j]),j++;E&&(i=E.context)}}},t.teardown=function(){Xs(w,(function(t){t.rm()})),w=[],u=!1,c=!1,t.setInitialized(!1)},t.trackDependencyData=function(n,e){t.trackDependencyDataInternal(n,e)},t.includeCorrelationHeaders=function(n,e,o,a){var u=t._currentWindowHost||l;if(e){if(Ir.canIncludeCorrelationHeader(d,n.getAbsoluteUrl(),u)&&(o||(o={}),o.headers=new Headers(o.headers||e instanceof Request&&e.headers||{}),s&&(o.headers.set(kr.requestIdHeader,h="|"+n.traceID+"."+n.spanID),f&&(n.requestHeaders[kr.requestIdHeader]=h)),(p=d.appId||i&&i.appId())&&(o.headers.set(kr.requestContextHeader,kr.requestContextAppIdFormat+p),f&&(n.requestHeaders[kr.requestContextHeader]=kr.requestContextAppIdFormat+p)),r)){var c=new Ws(n.traceID,n.spanID);o.headers.set(kr.traceParentHeader,c.toString()),f&&(n.requestHeaders[kr.traceParentHeader]=c.toString())}return o}if(a){var h,p;if(Ir.canIncludeCorrelationHeader(d,n.getAbsoluteUrl(),u))s&&(a.setRequestHeader(kr.requestIdHeader,h="|"+n.traceID+"."+n.spanID),f&&(n.requestHeaders[kr.requestIdHeader]=h)),(p=d.appId||i&&i.appId())&&(a.setRequestHeader(kr.requestContextHeader,kr.requestContextAppIdFormat+p),f&&(n.requestHeaders[kr.requestContextHeader]=kr.requestContextAppIdFormat+p)),r&&(c=new Ws(n.traceID,n.spanID),a.setRequestHeader(kr.traceParentHeader,c.toString()),f&&(n.requestHeaders[kr.traceParentHeader]=c.toString()));return a}},t.trackDependencyDataInternal=function(n,e,i){if(-1===m||h<m){d.distributedTracingMode!==wr.W3C&&d.distributedTracingMode!==wr.AI_AND_W3C||"string"!=typeof n.id||"."===n.id[n.id.length-1]||(n.id+="."),_i.isNullOrUndefined(n.startTime)&&(n.startTime=new Date);var r=Zr.create(n,Jr.dataType,Jr.envelopeType,t.diagLog(),e,i);t.core.track(r)}else h===m&&Gs(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);++h}})),e}return __extends(n,t),n.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:wr.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}},n.getEmptyConfig=function(){var t=this.getDefaultConfig();return Ci(t,(function(n){t[n]=void 0})),t},n.prototype.processTelemetry=function(t,n){this.processNext(t,n)},n.identifier="AjaxDependencyPlugin",n}(nr),eo=function(){function t(t){var n=this;n._snippetVersion=""+(t.sv||t.version||""),t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};if(e.connectionString){var i=Br.parse(e.connectionString),r=i.ingestionendpoint;e.endpointUrl=r?r+"/v2/track":e.endpointUrl,e.instrumentationKey=i.instrumentationkey||e.instrumentationKey}n.appInsights=new as,n.properties=new Os,n.dependencies=new no,n.core=new dr,n.snippet=t,n.config=e,n.getSKUDefaults()}return t.prototype.trackEvent=function(t,n){this.appInsights.trackEvent(t,n)},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,n){this.appInsights.trackTrace(t,n)},t.prototype.trackMetric=function(t,n){this.appInsights.trackMetric(t,n)},t.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},t.prototype.stopTrackPage=function(t,n,e,i){this.appInsights.stopTrackPage(t,n,e,i)},t.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},t.prototype.stopTrackEvent=function(t,n,e){this.appInsights.stopTrackEvent(t,n,e)},t.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},t.prototype.setAuthenticatedUserContext=function(t,n,e){void 0===e&&(e=!1),this.properties.context.user.setAuthenticatedUserContext(t,n,e)},t.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},t.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},t.prototype.flush=function(t){var n=this;void 0===t&&(t=!0),Ji(this.core,(function(){return"AISKU.flush"}),(function(){_i.arrForEach(n.core.getTransmissionControls(),(function(n){_i.arrForEach(n,(function(n){n.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),_i.arrForEach(this.core.getTransmissionControls(),(function(n){_i.arrForEach(n,(function(n){n.onunloadFlush?n.onunloadFlush():n.flush(t)}))}))},t.prototype.loadAppInsights=function(t,n,e){var i=this;void 0===t&&(t=!1);var r=this;if(t&&r.config.extensions&&r.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return Ji(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var s=[],o=new Fs;s.push(o),s.push(r.properties),s.push(r.dependencies),s.push(r.appInsights),r.core.initialize(r.config,s,n,e),r.context=r.properties.context,to&&r.context&&(r.context.internal.sdkSrc=to),function(n){if(n){var e="";_i.isNullOrUndefined(r._snippetVersion)||(e+=r._snippetVersion),t&&(e+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=e||"-"),Ci(r,(function(t,e){_i.isString(t)&&!_i.isFunction(e)&&"_"!==t.substring(0,1)&&(n[t]=e)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},t.prototype.updateSnippetDefinitions=function(t){Ci(this,(function(n,e){_i.isString(n)&&(t[n]=e)}))},t.prototype.emptyQueue=function(){var t=this;try{if(Fr.isArray(t.snippet.queue)){for(var n=t.snippet.queue.length,e=0;e<n;e++)(0,t.snippet.queue[e])();t.snippet.queue=void 0,delete t.snippet.queue}}catch(t){t&&_i.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(ni()||ii()){var n=function(){t.onunloadFlush(!1);var n=t.appInsights.core._extensions.AppInsightsPropertiesPlugin;n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup()};if(!t.appInsights.config.disableFlushOnBeforeUnload){var e=_i.addEventHandler("beforeunload",n);(e=_i.addEventHandler("pagehide",n)||e)||(i=si())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(Ai.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||_i.addEventHandler("pagehide",n)}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 n(){var e,i,r,s,o=t.call(this)||this;return o.priority=1001,o.identifier="AppInsightsChannelPlugin",o._XMLHttpRequestSupported=!1,zi(n,o,(function(t,a){function u(){throw new Error("Method not implemented.")}function c(n){var e=t._senderConfig.endpointUrl(),i=t._buffer.batchPayloads(n),r=new Blob([i],{type:"text/plain;charset=UTF-8"});oi().sendBeacon(e,r)?(t._buffer.markAsSent(n),t._onSuccess(n,n.length)):(l(n,!0),t.diagLog().throwInternal(_i.WARNING,40,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function l(n,e){var i=new XMLHttpRequest,r=t._senderConfig.endpointUrl();try{i[Br]=!0}catch(t){}i.open("POST",r,e),i.setRequestHeader("Content-type","application/json"),Mr.isInternalApplicationInsightsEndpoint(r)&&i.setRequestHeader(Sr.sdkContextHeader,Sr.sdkContextHeaderAppIdRequest),i.onreadystatechange=function(){return t._xhrReadyStateChange(i,n,n.length)},i.onerror=function(e){return t._onError(n,m(i),e)};var s=t._buffer.batchPayloads(n);i.send(s),t._buffer.markAsSent(n)}function d(n){try{if(n&&""!==n){var e=li().parse(n);if(e&&e.itemsReceived&&e.itemsReceived>=e.itemsAccepted&&e.itemsReceived-e.itemsAccepted===e.errors.length)return e}}catch(e){t.diagLog().throwInternal(_i.CRITICAL,43,"Cannot parse the response. "+Mr.getExceptionName(e),{response:n})}return null}function f(n,r){if(void 0===r&&(r=1),n&&0!==n.length){t._buffer.clearSent(n),e++;for(var s=0,o=n;s<o.length;s++)t._buffer.enqueue(o[s]);!function(t){var n;if(e<=1)n=10;else{var r=(Math.pow(2,e)-1)/2,s=Math.floor(Math.random()*r*10)+1;n=Math.max(Math.min(s*=t,3600),10)}var o=Fi.dateNow()+1e3*n;i=o}(r),h()}}function h(){if(!r){var n=i?Math.max(0,i-Fi.dateNow()):0,e=Math.max(t._senderConfig.maxBatchInterval(),n);r=setTimeout((function(){t.triggerSend(!0,null,1)}),e)}}function p(t){return 408===t||429===t||500===t||503===t}function m(t,n){return t?"XMLHttpRequest,Status:"+t.status+",Response:"+Fs(t)||t.response||"":n}function v(n){var e=ii(),i=new XDomainRequest;i.onload=function(){return t._xdrOnLoad(i,n)},i.onerror=function(e){return t._onError(n,w(i),e)};var r=e&&e.location&&e.location.protocol||"";if(0!==t._senderConfig.endpointUrl().lastIndexOf(r,0))return t.diagLog().throwInternal(_i.WARNING,40,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),void t._buffer.clear();var s=t._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",s);var o=t._buffer.batchPayloads(n);i.send(o),t._buffer.markAsSent(n)}function w(t,n){return t?"XDomainRequest,Response:"+Fs(t)||"":n}t.pause=u,t.resume=u,t.flush=function(){try{t.triggerSend(!0,null,1)}catch(n){t.diagLog().throwInternal(_i.CRITICAL,22,"flush failed, telemetry will not be collected: "+Mr.getExceptionName(n),{exception:Mr.dump(n)})}},t.onunloadFlush=function(){if(!1!==t._senderConfig.onunloadDisableBeacon()&&!1!==t._senderConfig.isBeaconApiDisabled()||!Mr.IsBeaconApiSupported())t.flush();else try{t.triggerSend(!0,c,2)}catch(n){t.diagLog().throwInternal(_i.CRITICAL,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Mr.getExceptionName(n),{exception:Mr.dump(n)})}},t.teardown=u,t.initialize=function(r,o,u,d){a.initialize(r,o,u,d);var f=t._getTelCtx(),h=t.identifier;s=new ks(o.logger),e=0,i=null,t._sender=null;var p=n._getDefaultAppInsightsChannelConfig();if(t._senderConfig=n._getEmptyAppInsightsChannelConfig(),Ai(p,(function(n,e){t._senderConfig[n]=function(){return f.getConfig(h,n,e())}})),t._buffer=t._senderConfig.enableSessionStorageBuffer()&&Mr.canUseSessionStorage()?new ds(t.diagLog(),t._senderConfig):new ls(t._senderConfig),t._sample=new _s(t._senderConfig.samplingPercentage(),t.diagLog()),function(t){return!(Fi.isNullOrUndefined(t.disableInstrumentaionKeyValidation)||!t.disableInstrumentaionKeyValidation)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(t.instrumentationKey)}(r)||t.diagLog().throwInternal(_i.CRITICAL,100,"Invalid Instrumentation key "+r.instrumentationKey),!t._senderConfig.isBeaconApiDisabled()&&Mr.IsBeaconApiSupported())t._sender=c;else if(void 0!==typeof XMLHttpRequest){var m=ni("XMLHttpRequest");m&&("withCredentials"in new m?(t._sender=l,t._XMLHttpRequestSupported=!0):void 0!==typeof XDomainRequest&&(t._sender=v))}},t.processTelemetry=function(e,i){i=t._getTelCtx(i);try{if(t._senderConfig.disableTelemetry())return;if(!e)return void i.diagLog().throwInternal(_i.CRITICAL,7,"Cannot send empty telemetry");if(e.baseData&&!e.baseType)return void i.diagLog().throwInternal(_i.CRITICAL,70,"Cannot send telemetry without baseData and baseType");if(e.baseType||(e.baseType="EventData"),!t._sender)return void i.diagLog().throwInternal(_i.CRITICAL,28,"Sender was not initialized");if(!t._sample.isSampledIn(e))return void i.diagLog().throwInternal(_i.WARNING,33,"Telemetry item was sampled out and not sent",{SampleRate:t._sample.sampleRate});e.sampleRate=t._sample.sampleRate;var r=n.constructEnvelope(e,t._senderConfig.instrumentationKey(),i.diagLog());if(!r)return void i.diagLog().throwInternal(_i.CRITICAL,47,"Unable to create an AppInsights envelope");var o=!1;if(e.tags&&e.tags.ProcessLegacy&&(Fi.arrForEach(e.tags.ProcessLegacy,(function(t){try{t&&!1===t(r)&&(o=!0,i.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(t){i.diagLog().throwInternal(_i.CRITICAL,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Mr.getExceptionName(t),{exception:Mr.dump(t)},!0)}})),delete e.tags.ProcessLegacy),o)return;var a=s.serialize(r),u=t._buffer.getItems(),c=t._buffer.batchPayloads(u);c&&c.length+a.length>t._senderConfig.maxBatchSizeInBytes()&&t.triggerSend(!0,null,10),t._buffer.enqueue(a),h()}catch(t){i.diagLog().throwInternal(_i.WARNING,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}t.processNext(e,i)},t._xhrReadyStateChange=function(n,i,r){if(4===n.readyState){var s=null;t._appId||(s=d(Fs(n)||n.response))&&s.appId&&(t._appId=s.appId),(n.status<200||n.status>=300)&&0!==n.status?!t._senderConfig.isRetryDisabled()&&p(n.status)?(f(i),t.diagLog().throwInternal(_i.WARNING,40,". Response code "+n.status+". Will retry to send "+i.length+" items.")):t._onError(i,m(n)):Ss.isOffline()?t._senderConfig.isRetryDisabled()||(f(i,10),t.diagLog().throwInternal(_i.WARNING,40,". Offline - Response Code: "+n.status+". Offline status: "+Ss.isOffline()+". Will retry to send "+i.length+" items.")):206===n.status?(s||(s=d(Fs(n)||n.response)),s&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,m(n))):(e=0,t._onSuccess(i,r))}},t.triggerSend=function(n,e,s){void 0===n&&(n=!0);try{if(t._senderConfig.disableTelemetry())t._buffer.clear();else if(t._buffer.count()>0){var a=t._buffer.getItems();!function(n,e){var i,r=t.core[i="getNotifyMgr"]?t.core[i]():t.core._notificationManager;if(r&&r.eventsSendRequest)try{r.eventsSendRequest(n,e)}catch(n){t.diagLog().throwInternal(_i.CRITICAL,74,"send request notification failed: "+Mr.getExceptionName(n),{exception:Mr.dump(n)})}}(s||0,n),e?e.call(o,a,n):t._sender(a,n)}clearTimeout(r),r=null,i=null}catch(n){var u=Mr.getIEVersion();(!u||u>9)&&t.diagLog().throwInternal(_i.CRITICAL,40,"Telemetry transmission failed, some telemetry will be lost: "+Mr.getExceptionName(n),{exception:Mr.dump(n)})}},t._onError=function(n,e){t.diagLog().throwInternal(_i.WARNING,26,"Failed to send telemetry.",{message:e}),t._buffer.clearSent(n)},t._onPartialSuccess=function(n,e){for(var i=[],r=[],s=0,o=e.errors.reverse();s<o.length;s++){var a=o[s],u=n.splice(a.index,1)[0];p(a.statusCode)?r.push(u):i.push(u)}n.length>0&&t._onSuccess(n,e.itemsAccepted),i.length>0&&t._onError(i,m(null,["partial success",e.itemsAccepted,"of",e.itemsReceived].join(" "))),r.length>0&&(f(r),t.diagLog().throwInternal(_i.WARNING,40,"Partial success. Delivered: "+n.length+", Failed: "+i.length+". Will retry to send "+r.length+" our of "+e.itemsReceived+" items"))},t._onSuccess=function(n){t._buffer.clearSent(n)},t._xdrOnLoad=function(n,i){var r=Fs(n);if(!n||r+""!="200"&&""!==r){var s=d(r);s&&s.itemsReceived&&s.itemsReceived>s.itemsAccepted&&!t._senderConfig.isRetryDisabled()?t._onPartialSuccess(i,s):t._onError(i,w(n))}else e=0,t._onSuccess(i,0)}})),o}return __extends(n,t),n.constructEnvelope=function(t,n,e){var i;switch((i=n===t.iKey||Fi.isNullOrUndefined(n)?t:__assign({},t,{iKey:n})).baseType){case Lr.dataType:return vs.EventEnvelopeCreator.Create(e,i);case Gr.dataType:return xs.TraceEnvelopeCreator.Create(e,i);case Jr.dataType:return gs.PageViewEnvelopeCreator.Create(e,i);case Kr.dataType:return bs.PageViewPerformanceEnvelopeCreator.Create(e,i);case Ur.dataType:return ws.ExceptionEnvelopeCreator.Create(e,i);case $r.dataType:return ys.MetricEnvelopeCreator.Create(e,i);case Yr.dataType:return ms.DependencyEnvelopeCreator.Create(e,i);default:return vs.EventEnvelopeCreator.Create(e,i)}},n._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}}},n._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}},n}(er),Is=function(){},Ts=function(){function t(n,e){var i=this;this._logger=Fi.isNullOrUndefined(e)?new $i:e,n||(n={}),"function"!=typeof n.sessionExpirationMs&&(n.sessionExpirationMs=function(){return t.acquisitionSpan}),"function"!=typeof n.sessionRenewalMs&&(n.sessionRenewalMs=function(){return t.renewalSpan}),this.config=n,this._storageNamePrefix=function(){return i.config.namePrefix&&i.config.namePrefix()?t.cookieNameConst+i.config.namePrefix():t.cookieNameConst},this.automaticSession=new Is}return t.prototype.update=function(){this.automaticSession.id||this.initializeAutomaticSession();var n=(new Date).getTime(),e=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs(),i=0!==this.config.sessionExpirationMs()&&n-this.automaticSession.renewalDate>this.config.sessionRenewalMs();e||i?this.renew():(!this.cookieUpdatedTimestamp||n-this.cookieUpdatedTimestamp>t.cookieUpdateInterval)&&(this.automaticSession.renewalDate=n,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=Mr.getCookie(this._logger,this._storageNamePrefix());if(t&&"function"==typeof t.split)this.initializeAutomaticSessionWithData(t);else{var n=Mr.getStorage(this._logger,this._storageNamePrefix());n&&this.initializeAutomaticSessionWithData(n)}this.automaticSession.id||this.renew()},t.prototype.initializeAutomaticSessionWithData=function(t){var n=t.split("|");n.length>0&&(this.automaticSession.id=n[0]);try{n.length>1&&(this.automaticSession.acquisitionDate=+new Date(+n[1]),this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0),n.length>2&&(this.automaticSession.renewalDate=+new Date(+n[2]),this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0)}catch(t){this._logger.throwInternal(_i.CRITICAL,9,"Error parsing ai_session cookie, session will be reset: "+Mr.getExceptionName(t),{exception:Mr.dump(t)})}0===this.automaticSession.renewalDate&&this._logger.throwInternal(_i.WARNING,27,"AI session renewal date is 0, session will be reset.")},t.prototype.renew=function(){var t=(new Date).getTime();this.automaticSession.id=Mr.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),Mr.canUseLocalStorage()||this._logger.throwInternal(_i.WARNING,0,"Browser does not support local storage. Session durations will be inaccurate.")},t.prototype.setCookie=function(t,n,e){var i=n+this.config.sessionExpirationMs(),r=e+this.config.sessionRenewalMs(),s=new Date,o=[t,n,e];s.setTime(i<r?i:r);var a=this.config.cookieDomain?this.config.cookieDomain():null,u=0===this.config.sessionExpirationMs()?"0":s.toUTCString();Mr.setCookie(this._logger,this._storageNamePrefix(),o.join("|")+";expires="+u,a),this.cookieUpdatedTimestamp=(new Date).getTime()},t.prototype.setStorage=function(t,n,e){Mr.setStorage(this._logger,this._storageNamePrefix(),[t,n,e].join("|"))},t.acquisitionSpan=864e5,t.renewalSpan=18e5,t.cookieUpdateInterval=6e4,t.cookieNameConst="ai_session",t}(),Es=function(){},js=function(){this.id="browser",this.deviceClass="Browser"},Bs=function(t){this.sdkVersion=(t.sdkExtension&&t.sdkExtension()?t.sdkExtension()+"_":"")+"javascript:2.5.10"},Ns=function(){function t(n,e){this.isNewUser=!1,this._logger=e;var i=Mr.getCookie(this._logger,t.userCookieName);if(i){this.isNewUser=!1;var r=i.split(t.cookieSeparator);r.length>0&&(this.id=r[0])}if(this.config=n,!this.id){this.id=Fi.newId(n&&n.idLength?n.idLength():22);var s=new Date,o=Fi.toISOString(s);this.accountAcquisitionDate=o,this.isNewUser=!0,s.setTime(s.getTime()+31536e6);var a=[this.id,o],u=this.config.cookieDomain?this.config.cookieDomain():void 0;Mr.setCookie(this._logger,t.userCookieName,a.join(t.cookieSeparator)+";expires="+s.toUTCString(),u);var c=n.namePrefix&&n.namePrefix()?n.namePrefix()+"ai_session":"ai_session";Mr.removeStorage(this._logger,c)}this.accountId=n.accountId?n.accountId():void 0;var l=Mr.getCookie(this._logger,t.authUserCookieName);if(l){var d=(l=decodeURI(l)).split(t.cookieSeparator);d[0]&&(this.authenticatedId=d[0]),d.length>1&&d[1]&&(this.accountId=d[1])}}return t.prototype.setAuthenticatedUserContext=function(n,e,i){if(void 0===i&&(i=!1),!this.validateUserInput(n)||e&&!this.validateUserInput(e))this._logger.throwInternal(_i.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=n;var r=this.authenticatedId;e&&(this.accountId=e,r=[this.authenticatedId,this.accountId].join(t.cookieSeparator)),i&&Mr.setCookie(this._logger,t.authUserCookieName,encodeURI(r),this.config.cookieDomain())}},t.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null,this.accountId=null,Mr.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}(),Ps=function(){},Rs=function(t,n,e,i){this.traceID=t||Mr.generateW3CId(),this.parentID=n,this.name=e;var r=ai();!e&&r&&r.pathname&&(this.name=r.pathname),this.name=Cr.sanitizeString(i,this.name)},Os=function(){function t(t,n){var e=this;e.application=new Es,e.internal=new Bs(n),ei()&&(e.sessionManager=new Ts(n,t),e.device=new js,e.location=new Ps,e.user=new Ns(n,t),e.telemetryTrace=new Rs(void 0,void 0,void 0,t),e.session=new Is),e.appId=function(){return null}}return t.prototype.applySessionContext=function(t){var n=this.session,e=this.sessionManager,i=n||e&&e.automaticSession;i&&Fi.isString(i.id)&&(t.ext.app.sesId=i.id),n&&(t.ext.app.sesId=Fi.isString(n.id)?n.id:e.automaticSession.id)},t.prototype.applyOperatingSystemContxt=function(t){var n=this.os;n&&n.name&&(t.ext.os=n)},t.prototype.applyApplicationContext=function(t){var n=this.application;n&&(Fi.isString(n.ver)&&(t.tags[es.applicationVersion]=n.ver),Fi.isString(n.build)&&(t.tags[es.applicationBuild]=n.build))},t.prototype.applyDeviceContext=function(t){var n=this.device;n&&(Fi.isString(n.id)&&(t.ext.device.localId=n.id),Fi.isString(n.ip)&&(t.ext.device.ip=n.ip),Fi.isString(n.model)&&(t.ext.device.model=n.model),Fi.isString(n.deviceClass)&&(t.ext.device.deviceClass=n.deviceClass))},t.prototype.applyInternalContext=function(t){var n=this.internal;n&&(Fi.isString(n.agentVersion)&&(t.tags[es.internalAgentVersion]=n.agentVersion),Fi.isString(n.sdkVersion)&&(t.tags[es.internalSdkVersion]=n.sdkVersion),t.baseType!==Wi.dataType&&t.baseType!==Jr.dataType||(Fi.isString(n.snippetVer)&&(t.tags[es.internalSnippet]=n.snippetVer),Fi.isString(n.sdkSrc)&&(t.tags[es.internalSdkSrc]=n.sdkSrc)))},t.prototype.applyLocationContext=function(t){var n=this.location;n&&Fi.isString(n.ip)&&(t.tags[es.locationIp]=n.ip)},t.prototype.applyOperationContext=function(t){var n=this.telemetryTrace;if(n){var e=t.ext.trace||{traceID:void 0,parentID:void 0};Fi.isString(n.traceID)&&(e.traceID=n.traceID),Fi.isString(n.name)&&(e.name=n.name),Fi.isString(n.parentID)&&(e.parentID=n.parentID),t.ext.trace=e}},t.prototype.applyWebContext=function(t){var n=this.web;n&&(t.ext.web=t.ext.web||{},t.ext.web=n)},t.prototype.applyUserContext=function(t){var n=this.user;n&&(t.tags||(t.tags=[]),Fi.isString(n.accountId)&&(t.tags[es.userAccountId]=n.accountId),Fi.isString(n.id)&&(t.ext.user.id=n.id),Fi.isString(n.authenticatedId)&&(t.ext.user.authId=n.authenticatedId))},t.prototype.cleanUp=function(t){t.ext[ns.DeviceExt]&&0===Fi.objKeys(t.ext[ns.DeviceExt]).length&&delete t.ext[ns.DeviceExt],t.ext[ns.UserExt]&&0===Fi.objKeys(t.ext[ns.UserExt]).length&&delete t.ext[ns.UserExt],t.ext[ns.WebExt]&&0===Fi.objKeys(t.ext[ns.WebExt]).length&&delete t.ext[ns.WebExt],t.ext[ns.OSExt]&&0===Fi.objKeys(t.ext[ns.OSExt]).length&&delete t.ext[ns.OSExt],t.ext[ns.AppExt]&&0===Fi.objKeys(t.ext[ns.AppExt]).length&&delete t.ext[ns.AppExt],t.ext[ns.TraceExt]&&0===Fi.objKeys(t.ext[ns.TraceExt]).length&&delete t.ext[ns.TraceExt]},t}(),Ds=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.priority=110,n.identifier="AppInsightsPropertiesPlugin",n}return __extends(n,t),n.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}}},n.prototype.initialize=function(e,i,r,s){var o=this;t.prototype.initialize.call(this,e,i,r,s);var a=this._getTelCtx(),u=this.identifier,c=n.getDefaultConfig();this._extensionConfig=this._extensionConfig||n.getDefaultConfig(),Ai(c,(function(t,n){o._extensionConfig[t]=function(){return a.getConfig(u,t,n())}})),this.context=new Os(i.logger,this._extensionConfig),this._breezeChannel=Mr.getExtension(r,"AppInsightsChannelPlugin"),this.context.appId=function(){return o._breezeChannel?o._breezeChannel._appId:null}},n.prototype.processTelemetry=function(t,n){if(Fi.isNullOrUndefined(t));else{if(n=this._getTelCtx(n),t.name===Jr.envelopeType&&n.diagLog().resetInternalMessageCount(),this.context.session&&"string"!=typeof this.context.session.id&&this.context.sessionManager.update(),this._processTelemetryInternal(t,n),this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=!1;var e=new Wi(72,(oi()||{}).userAgent||"");n.diagLog().logInternalMessage(_i.CRITICAL,e)}this.processNext(t,n)}},n.prototype._processTelemetryInternal=function(t,n){t.tags||(t.tags=[]),t.ext||(t.ext={});var e=t.ext;e[ns.DeviceExt]=e[ns.DeviceExt]||{},e[ns.WebExt]=e[ns.WebExt]||{},e[ns.UserExt]=e[ns.UserExt]||{},e[ns.OSExt]=e[ns.OSExt]||{},e[ns.AppExt]=e[ns.AppExt]||{},e[ns.TraceExt]=e[ns.TraceExt]||{};var i=this.context;i.applySessionContext(t,n),i.applyApplicationContext(t,n),i.applyDeviceContext(t,n),i.applyOperationContext(t,n),i.applyUserContext(t,n),i.applyOperatingSystemContxt(t,n),i.applyWebContext(t,n),i.applyLocationContext(t,n),i.applyInternalContext(t,n),i.cleanUp(t,n)},n}(er),Ls=Fi.objKeys,Us=Fi.arrForEach;function qs(t,n,e){var i=0,r=t[n],s=t[e];return r&&s&&(i=jr.GetDuration(r,s)),i}function Vs(t,n,e,i,r){var s=0,o=qs(e,i,r);return o&&(s=zs(t,n,Mr.msToTimeSpan(o))),s}function zs(t,n,e){var i=0;return t&&n&&e&&((t.ajaxPerf=t.ajaxPerf||{})[n]=e,i=1),i}var Hs=function(){var t=this;t.openDone=!1,t.setRequestHeaderDone=!1,t.sendDone=!1,t.abortDone=!1,t.stateChangeAttached=!1},Ws=function t(n,e,i){var r=this,s=i;r.perfMark=null,r.completed=!1,r.requestHeadersSize=null,r.requestHeaders=null,r.responseReceivingDuration=null,r.callbackDuration=null,r.ajaxTotalDuration=null,r.aborted=0,r.pageUrl=null,r.requestUrl=null,r.requestSize=0,r.method=null,r.status=null,r.requestSentTime=null,r.responseStartedTime=null,r.responseFinishedTime=null,r.callbackFinishedTime=null,r.endTime=null,r.xhrMonitoringState=new Hs,r.clientFailure=0,r.traceID=n,r.spanID=e,zi(t,r,(function(t){t.getAbsoluteUrl=function(){return t.requestUrl?Ir.getAbsoluteUrl(t.requestUrl):null},t.getPathName=function(){return t.requestUrl?Cr.sanitizeUrl(s,Ir.getCompleteUrl(t.method,t.requestUrl)):null},t.CreateTrackItem=function(n,e,i){if(t.ajaxTotalDuration=Math.round(1e3*jr.GetDuration(t.requestSentTime,t.responseFinishedTime))/1e3,t.ajaxTotalDuration<0)return null;var r,s=((r={id:"|"+t.traceID+"."+t.spanID,target:t.getAbsoluteUrl(),name:t.getPathName(),type:n,duration:t.ajaxTotalDuration,success:+t.status>=200&&+t.status<400,responseCode:+t.status,method:t.method}).properties={HttpMethod:t.method},r);if(function(t,n){var e=t.perfTiming,i=n.properties||{},r=0,s=Fi.isString,o="redirect",a="startTime",u="connectEnd",c="requestStart",l="responseEnd",d=o+"Start",f=o="End";if(e){r|=Vs(i,o,e,d,f),r|=Vs(i,"domainLookup",e,"domainLookupStart","domainLookupEnd"),r|=Vs(i,"connect",e,"connectStart",u),r|=Vs(i,"request",e,c,"requestEnd"),r|=Vs(i,"response",e,"responseStart",l),r|=Vs(i,"networkConnect",e,a,u),r|=Vs(i,"sentRequest",e,c,l);var h=e.duration;h||(h=qs(e,a,l)||0),r|=zs(i,"duration",h),r|=zs(i,"perfTotal",h);var p=e.serverTiming;if(p){var m={};Us(p,(function(t,n){var e=function(t){var n=t,e=/([^\w\d_$])/g;return e.test(t)&&(n=t.replace(e,"_")),n}(t.name||""+n),i=m[e]||{};Ai(t,(function(t,n){("name"!==t&&s(n)||Fi.isNumber(n))&&(i[t]&&(n=i[t]+";"+n),!n&&s(n)||(i[t]=n))})),m[e]=i})),r|=zs(i,"serverTiming",m)}r|=zs(i,"transferSize",e.transferSize),r|=zs(i,"encodedBodySize",e.encodedBodySize),r|=zs(i,"decodedBodySize",e.decodedBodySize)}else t.perfMark&&(r|=zs(i,"missing",t.perfAttempts));r&&(n.properties=i)}(t,s),e&&Ls(t.requestHeaders).length>0&&(s.properties=s.properties||{},s.properties.requestHeaders=t.requestHeaders),i){var o=i();if(o){var a=o.correlationContext;if(a&&(s.correlationContext=a),o.headerMap&&Ls(o.headerMap).length>0&&(s.properties=s.properties||{},s.properties.responseHeaders=o.headerMap),t.status>=400){var u=o.type;s.properties=s.properties||{},""!==u&&"text"!==u||(s.properties.responseText=o.responseText?o.statusText+" - "+o.responseText:o.statusText),"json"===u&&(s.properties.responseText=o.response?o.statusText+" - "+JSON.stringify(o.response):o.statusText)}}}return s}}))},$s=function(){function t(n,e){var i=this;i.traceFlag=t.DEFAULT_TRACE_FLAG,i.version=t.DEFAULT_VERSION,i.traceId=n&&t.isValidTraceId(n)?n:Mr.generateW3CId(),i.spanId=e&&t.isValidSpanId(e)?e:Mr.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}(),Xs=Fi.isNullOrUndefined,Js=Fi.arrForEach,Ys=0;function Gs(t){var n="";try{Xs(t)||Xs(t.ajaxData)||Xs(t.ajaxData.requestUrl)||(n+="(url: '"+t.ajaxData.requestUrl+"')")}catch(t){}return n}function Ks(t,n,e,i,r){t.diagLog().throwInternal(_i.CRITICAL,n,e,i,r)}function Qs(t,n,e,i,r){t.diagLog().throwInternal(_i.WARNING,n,e,i,r)}function Zs(t,n,e){return function(i){Ks(t,n,e,{ajaxDiagnosticsMessage:Gs(i.inst),exception:Mr.dump(i.err)})}}function to(t,n){return t&&n?t.indexOf(n):-1}var no,eo=function(t){function n(){var e=t.call(this)||this;e.identifier=n.identifier,e.priority=120;var i,r,s,o,a=ai(),u=!1,c=!1,l=a&&a.host&&a.host.toLowerCase(),d=n.getEmptyConfig(),f=!1,h=0,p=!1,m=0,v=!1,w=[],y={};return zi(n,e,(function(t,e){function a(t,n,e){w.push(function(t,n,e){return t?xr(t.prototype,n,e,!1):null}(t,n,e))}function g(t,n,e){var i=!1,r=((Fi.isString(n)?n:(n||{}).url||"")||"").toLowerCase(),s=to(r,"?"),o=to(r,"#");return(-1===s||-1!==o&&o<s)&&(s=o),-1!==s&&(r=r.substring(0,s)),Xs(t)?Xs(n)||(i="object"==typeof n&&!0===n[Br]||!!e&&!0===e[Br]):i=!0===t[Br]||!0===r[Br],i?y[r]||(y[r]=1):y[r]&&(i=!0),i}function b(t,n){var e=!0,i=c;return Xs(t)||(e=!0===n||!Xs(t.ajaxData)),i&&e}function x(t){try{var n=t.responseType;if(""===n||"text"===n)return t.responseText}catch(t){}return null}function k(n){try{var e=n.getAllResponseHeaders();if(null!==e&&-1!==to(e.toLowerCase(),Sr.requestContextHeaderLowerCase)){var i=n.getResponseHeader(Sr.requestContextHeader);return Tr.getCorrelationContext(i)}}catch(e){Qs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Gs(n),exception:Mr.dump(e)})}}function S(t,n){if(n.requestUrl&&o&&p){var e=ui();if(e&&Fi.isFunction(e.mark)){Ys++;var i=o+t+"#"+Ys;e.mark(i);var r=e.getEntriesByName(i);r&&1===r.length&&(n.perfMark=r[0])}}}function C(t,n,e,i){var r=n.perfMark,s=ui(),o=d.maxAjaxPerfLookupAttempts,a=d.ajaxPerfLookupDelay,u=n.requestUrl,c=0;!function l(){try{if(s&&r){c++;for(var d=null,f=s.getEntries(),h=f.length-1;h>=0;h--){var p=f[h];if(p){if("resource"===p.entryType)p.initiatorType!==t||-1===to(p.name,u)&&-1===to(u,p.name)||(d=p);else if("mark"===p.entryType&&p.name===r.name){n.perfTiming=d;break}if(p.startTime<r.startTime-1e3)break}}}!r||n.perfTiming||c>=o||!1===n.async?(r&&Fi.isFunction(s.clearMarks)&&s.clearMarks(r.name),n.perfAttempts=c,e()):setTimeout(l,a)}catch(t){i(t)}}()}function A(n){var e="";try{Xs(n)||(e+="string"==typeof n?"(url: '"+n+"')":"(url: '"+n.url+"')")}catch(n){Ks(t,15,"Failed to grab failed fetch diagnostics message",{exception:Mr.dump(n)})}return e}function _(n,e,i,r,s){function o(n,e,r){var s=r||{};s.fetchDiagnosticsMessage=A(i),e&&(s.exception=Mr.dump(e)),Qs(t,n,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",s)}r&&(r.responseFinishedTime=jr.Now(),r.status=e,C("fetch",r,(function(){var n=r.CreateTrackItem("Fetch",f,s);n?t.trackDependencyDataInternal(n):o(14,null,{requestSentTime:r.requestSentTime,responseFinishedTime:r.responseFinishedTime})}),(function(t){o(18,t,null)})))}function F(n){if(n&&n.headers)try{var e=n.headers.get(Sr.requestContextHeader);return Tr.getCorrelationContext(e)}catch(e){Qs(t,18,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:A(n),exception:Mr.dump(e)})}}t.initialize=function(l,h,y,A){if(!t.isInitialized()){e.initialize(l,h,y,A);var M=t._getTelCtx();Ai(n.getDefaultConfig(),(function(t,e){d[t]=M.getConfig(n.identifier,t,e)}));var I=d.distributedTracingMode;if(f=d.enableRequestHeaderTracking,m=d.maxAjaxCallsPerView,v=d.enableResponseHeaderTracking,s=I===yr.AI||I===yr.AI_AND_W3C,r=I===yr.AI_AND_W3C||I===yr.W3C,p=d.enableAjaxPerfTracking){var T=l.instrumentationKey||"unkwn";o=T.length>5?"ai.ajxmn."+T.substring(T.length-5)+".":"ai.ajxmn."+T+"."}if(!1===d.disableAjaxTracking&&function(t){var n=!1;if("undefined"!=typeof XMLHttpRequest&&!Xs(XMLHttpRequest)){var e=XMLHttpRequest.prototype;n=!(Xs(e)||Xs(e.open)||Xs(e.send)||Xs(e.abort))}var i=Mr.getIEVersion();if(i&&i<9&&(n=!1),n)try{(new XMLHttpRequest).ajaxData={};var r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=r}catch(e){n=!1,Ks(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Mr.dump(e)})}return n}(t)&&!c&&(a(XMLHttpRequest,"open",{req:function(n,e,r,s){var o=n.inst,a=o.ajaxData;g(o,r)||!b(o,!0)||a&&a.xhrMonitoringState.openDone||function(n,e,r,s){var o=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Mr.generateW3CId(),a=Mr.generateW3CId().substr(0,16),u=new Ws(o,a,t.diagLog());u.method=e,u.requestUrl=r,u.xhrMonitoringState.openDone=!0,u.requestHeaders={},u.async=s,n.ajaxData=u,function(n){n.ajaxData.xhrMonitoringState.stateChangeAttached=Ii.Attach(n,"readystatechange",(function(){try{n&&4===n.readyState&&b(n)&&function(n){var e=n.ajaxData;function i(e,i){var r=i||{};r.ajaxDiagnosticsMessage=Gs(n),e&&(r.exception=Mr.dump(e)),Qs(t,14,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",r)}e.responseFinishedTime=jr.Now(),e.status=n.status,C("xmlhttprequest",e,(function(){try{var r=e.CreateTrackItem("Ajax",f,(function(){var t={statusText:n.statusText,headerMap:null,correlationContext:k(n),type:n.responseType,responseText:x(n),response:n.response};if(v){var e=n.getAllResponseHeaders();if(e){var i=Fi.strTrim(e).split(/[\r\n]+/),r={};Js(i,(function(t){var n=t.split(": "),e=n.shift(),i=n.join(": ");r[e]=i})),t.headerMap=r}}return t}));r?t.trackDependencyDataInternal(r):i(null,{requestSentTime:e.requestSentTime,responseFinishedTime:e.responseFinishedTime})}finally{try{n.ajaxData=null}catch(t){}}}),(function(t){i(t,null)}))}(n)}catch(i){var e=Mr.dump(i);e&&-1!==to(e.toLowerCase(),"c00c023f")||Ks(t,16,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Gs(n),exception:e})}}))}(n)}(o,e,r,s)},hkErr:Zs(t,15,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"send",{req:function(n){var e=n.inst,i=e.ajaxData;b(e)&&!i.xhrMonitoringState.sendDone&&(S("xhr",i),i.requestSentTime=jr.Now(),e=t.includeCorrelationHeaders(i,void 0,void 0,e),i.xhrMonitoringState.sendDone=!0)},hkErr:Zs(t,17,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),a(XMLHttpRequest,"abort",{req:function(t){var n=t.inst,e=n.ajaxData;b(n)&&!e.xhrMonitoringState.abortDone&&(e.aborted=1,e.xhrMonitoringState.abortDone=!0)},hkErr:Zs(t,13,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),f&&a(XMLHttpRequest,"setRequestHeader",{req:function(t,n,e){var i=t.inst;b(i)&&(i.ajaxData.requestHeaders[n]=e)},hkErr:Zs(t,71,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0),function(){var n,e=!(n=ti())||Xs(n.Request)||Xs(n.Request.prototype)||Xs(n.fetch)?null:n.fetch;if(e){var r=ti(),s=e.polyfill;!1===d.disableFetchTracking?(w.push(xr(r,"fetch",{req:function(n,e,r){var o;if(u&&!g(null,e,r)&&(!s||!c)){var a=n.ctx();o=function(n,e){var r=i&&i.telemetryTrace&&i.telemetryTrace.traceID||Mr.generateW3CId(),s=Mr.generateW3CId().substr(0,16),o=new Ws(r,s,t.diagLog());o.requestSentTime=jr.Now(),o.requestUrl=n instanceof Request?n?n.url:"":n;var a="GET";e&&e.method?a=e.method:n&&n instanceof Request&&(a=n.method),o.method=a;var u={};return f&&new Headers((e?e.headers:0)||n instanceof Request&&n.headers||{}).forEach((function(t,n){u[n]=t})),o.requestHeaders=u,S("fetch",o),o}(e,r);var l=t.includeCorrelationHeaders(o,e,r);l!==r&&n.set(1,l),a.data=o}},rsp:function(t,n){var e=t.ctx().data;e&&(t.rslt=t.rslt.then((function(t){return _(0,(t||{}).status,t,e,(function(){var n={statusText:t.statusText,headerMap:null,correlationContext:F(t)};if(v){var e={};t.headers.forEach((function(t,n){e[n]=t})),n.headerMap=e}return n})),t})).catch((function(t){throw _(0,0,n,e,null),t})))},hkErr:Zs(t,15,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),u=!0):s&&w.push(xr(r,"fetch",{req:function(t,n,e){g(null,n,e)}})),s&&(r.fetch.polyfill=s)}}(),y.length>0&&y){for(var E=void 0,j=0;!E&&j<y.length;)y[j]&&"AppInsightsPropertiesPlugin"===y[j].identifier&&(E=y[j]),j++;E&&(i=E.context)}}},t.teardown=function(){Js(w,(function(t){t.rm()})),w=[],u=!1,c=!1,t.setInitialized(!1)},t.trackDependencyData=function(n,e){t.trackDependencyDataInternal(n,e)},t.includeCorrelationHeaders=function(n,e,o,a){var u=t._currentWindowHost||l;if(e){if(Tr.canIncludeCorrelationHeader(d,n.getAbsoluteUrl(),u)&&(o||(o={}),o.headers=new Headers(o.headers||e instanceof Request&&e.headers||{}),s&&(o.headers.set(Sr.requestIdHeader,h="|"+n.traceID+"."+n.spanID),f&&(n.requestHeaders[Sr.requestIdHeader]=h)),(p=d.appId||i&&i.appId())&&(o.headers.set(Sr.requestContextHeader,Sr.requestContextAppIdFormat+p),f&&(n.requestHeaders[Sr.requestContextHeader]=Sr.requestContextAppIdFormat+p)),r)){var c=new $s(n.traceID,n.spanID);o.headers.set(Sr.traceParentHeader,c.toString()),f&&(n.requestHeaders[Sr.traceParentHeader]=c.toString())}return o}if(a){var h,p;if(Tr.canIncludeCorrelationHeader(d,n.getAbsoluteUrl(),u))s&&(a.setRequestHeader(Sr.requestIdHeader,h="|"+n.traceID+"."+n.spanID),f&&(n.requestHeaders[Sr.requestIdHeader]=h)),(p=d.appId||i&&i.appId())&&(a.setRequestHeader(Sr.requestContextHeader,Sr.requestContextAppIdFormat+p),f&&(n.requestHeaders[Sr.requestContextHeader]=Sr.requestContextAppIdFormat+p)),r&&(c=new $s(n.traceID,n.spanID),a.setRequestHeader(Sr.traceParentHeader,c.toString()),f&&(n.requestHeaders[Sr.traceParentHeader]=c.toString()));return a}},t.trackDependencyDataInternal=function(n,e,i){if(-1===m||h<m){d.distributedTracingMode!==yr.W3C&&d.distributedTracingMode!==yr.AI_AND_W3C||"string"!=typeof n.id||"."===n.id[n.id.length-1]||(n.id+="."),Fi.isNullOrUndefined(n.startTime)&&(n.startTime=new Date);var r=ts.create(n,Yr.dataType,Yr.envelopeType,t.diagLog(),e,i);t.core.track(r)}else h===m&&Ks(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);++h}})),e}return __extends(n,t),n.getDefaultConfig=function(){return{maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,disableCorrelationHeaders:!1,distributedTracingMode:yr.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}},n.getEmptyConfig=function(){var t=this.getDefaultConfig();return Ai(t,(function(n){t[n]=void 0})),t},n.prototype.processTelemetry=function(t,n){this.processNext(t,n)},n.identifier="AjaxDependencyPlugin",n}(er),io=function(){function t(t){var n=this;n._snippetVersion=""+(t.sv||t.version||""),t.queue=t.queue||[],t.version=t.version||2;var e=t.config||{};if(e.connectionString){var i=Nr.parse(e.connectionString),r=i.ingestionendpoint;e.endpointUrl=r?r+"/v2/track":e.endpointUrl,e.instrumentationKey=i.instrumentationkey||e.instrumentationKey}n.appInsights=new us,n.properties=new Ds,n.dependencies=new eo,n.core=new fr,n.snippet=t,n.config=e,n.getSKUDefaults()}return t.prototype.trackEvent=function(t,n){this.appInsights.trackEvent(t,n)},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,n){this.appInsights.trackTrace(t,n)},t.prototype.trackMetric=function(t,n){this.appInsights.trackMetric(t,n)},t.prototype.startTrackPage=function(t){this.appInsights.startTrackPage(t)},t.prototype.stopTrackPage=function(t,n,e,i){this.appInsights.stopTrackPage(t,n,e,i)},t.prototype.startTrackEvent=function(t){this.appInsights.startTrackEvent(t)},t.prototype.stopTrackEvent=function(t,n,e){this.appInsights.stopTrackEvent(t,n,e)},t.prototype.addTelemetryInitializer=function(t){return this.appInsights.addTelemetryInitializer(t)},t.prototype.setAuthenticatedUserContext=function(t,n,e){void 0===e&&(e=!1),this.properties.context.user.setAuthenticatedUserContext(t,n,e)},t.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},t.prototype.trackDependencyData=function(t){this.dependencies.trackDependencyData(t)},t.prototype.flush=function(t){var n=this;void 0===t&&(t=!0),Yi(this.core,(function(){return"AISKU.flush"}),(function(){Fi.arrForEach(n.core.getTransmissionControls(),(function(n){Fi.arrForEach(n,(function(n){n.flush(t)}))}))}),null,t)},t.prototype.onunloadFlush=function(t){void 0===t&&(t=!0),Fi.arrForEach(this.core.getTransmissionControls(),(function(n){Fi.arrForEach(n,(function(n){n.onunloadFlush?n.onunloadFlush():n.flush(t)}))}))},t.prototype.loadAppInsights=function(t,n,e){var i=this;void 0===t&&(t=!1);var r=this;if(t&&r.config.extensions&&r.config.extensions.length>0)throw new Error("Extensions not allowed in legacy mode");return Yi(r.core,(function(){return"AISKU.loadAppInsights"}),(function(){var s=[],o=new Ms;s.push(o),s.push(r.properties),s.push(r.dependencies),s.push(r.appInsights),r.core.initialize(r.config,s,n,e),r.context=r.properties.context,no&&r.context&&(r.context.internal.sdkSrc=no),function(n){if(n){var e="";Fi.isNullOrUndefined(r._snippetVersion)||(e+=r._snippetVersion),t&&(e+=".lg"),r.context&&r.context.internal&&(r.context.internal.snippetVer=e||"-"),Ai(r,(function(t,e){Fi.isString(t)&&!Fi.isFunction(e)&&"_"!==t.substring(0,1)&&(n[t]=e)}))}}(r.snippet),r.emptyQueue(),r.pollInternalLogs(),r.addHousekeepingBeforeUnload(i)})),r},t.prototype.updateSnippetDefinitions=function(t){Ai(this,(function(n,e){Fi.isString(n)&&(t[n]=e)}))},t.prototype.emptyQueue=function(){var t=this;try{if(Mr.isArray(t.snippet.queue)){for(var n=t.snippet.queue.length,e=0;e<n;e++)(0,t.snippet.queue[e])();t.snippet.queue=void 0,delete t.snippet.queue}}catch(t){t&&Fi.isFunction(t.toString)&&t.toString()}},t.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},t.prototype.addHousekeepingBeforeUnload=function(t){if(ei()||ri()){var n=function(){t.onunloadFlush(!1);var n=t.appInsights.core._extensions.AppInsightsPropertiesPlugin;n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup()};if(!t.appInsights.config.disableFlushOnBeforeUnload){var e=Fi.addEventHandler("beforeunload",n);(e=Fi.addEventHandler("pagehide",n)||e)||(i=oi())&&i.product&&"ReactNative"===i.product||t.appInsights.core.logger.throwInternal(_i.CRITICAL,19,"Could not add handler for beforeunload and pagehide")}t.appInsights.config.disableFlushOnUnload||Fi.addEventHandler("pagehide",n)}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,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var e=(document||{}).currentScript;e&&(t=e.src)}catch(t){}if(t)try{var i=t.toLowerCase();if(i)for(var r="",s=0;s<n.length;s++)if(-1!==i.indexOf(n[s])){r="cdn"+(s+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),
|
|
14
|
+
*/!function(){var t=null,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var e=(document||{}).currentScript;e&&(t=e.src)}catch(t){}if(t)try{var i=t.toLowerCase();if(i)for(var r="",s=0;s<n.length;s++)if(-1!==i.indexOf(n[s])){r="cdn"+(s+1),-1===i.indexOf("/scripts/")&&(-1!==i.indexOf("/next/")?r+="-next":-1!==i.indexOf("/beta/")&&(r+="-beta")),no=r+"";break}}catch(t){}}();const ro=new class extends A{constructor(t){super(t),this.store=t,this.appConfiguration$=this.select((t=>t.appConfiguration))}get configuration(){const t=this.getValue().appConfiguration;if(U(t))throw Error("App configuration is not yet loaded");return t.value}}(Dn),so=new class{constructor(){this.appInsights=new z((()=>new io({config:{instrumentationKey:ro.configuration.AppInsightsKey,enableAutoRouteTracking:!0,autoTrackPageVisitTime:!0,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:!0}})))}init(){this.appInsights.value.loadAppInsights(),l((t=>this.appInsightsErrorHandler(t)))}getAppInsights(){return this.appInsights.value}addCustomProperties(t){this.appInsights.value.addTelemetryInitializer((n=>{n.data=n.data?n.data:{};for(const[e,i]of Object.entries(t))n.data[e]=i}))}appInsightsErrorHandler(t){this.appInsights.value.trackException({error:t,severityLevel:Hr.Error}),(t=>{console.error(t)})(t)}},oo=new class extends A{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===Pn.Unauthorized||this.getValue().authenticationState===Pn.Error}get isAuthorized(){return this.getValue().authenticationState===Pn.Authenticated}}(Dn),ao=new class{constructor(){this.authCodeQueryParameter="code"}authorizationCodeIsPresent(t){const n=this.getAuthorizationCodeFromRoute(t);return Bt.isSome(n)}initFromRoute(t){const n=this.getAuthorizationCodeFromRoute(t);if(Bt.isNone(n))throw Dn.update({authenticationState:Pn.Error}),Error(`"${this.authCodeQueryParameter}" URL query parameter missing`);this.authCodeExchangeAsync(n.value)}async authCodeExchangeAsync(t){const n=new URLSearchParams([["grant_type","authorization_code"],["client_id","apollo-super-selection-app"],["code",t],["redirect_uri",""+Xe.getAppHostUrl()]]),e=await Ft(ro.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(n.toString()).badRequest((()=>{throw Dn.update({authenticationState:Pn.Error}),new Error("Failed to authenticate.")})).json();Dn.update({jwt:Bt.fromNullable(e.access_token),authenticationState:Pn.Authenticated}),window.gtag&&window.gtag("event","oidc_sign_in",{}),window.history.replaceState(null,"",Xe.getAppRootUrl())}getAuthorizationCodeFromRoute(t){const n=new URLSearchParams(t);return Bt.fromNullable(n.get(this.authCodeQueryParameter))}};class uo{static completeSuperSelectionStep(){const{successRedirectionUrl:t}=Ln.getIframeInteropMode();Bt.isSome(t)?window.top.location.href=t.value:Jt()}static initFromRoute(t){const n=new URLSearchParams(t),e=Bt.fromNullable(n.get("success-redirection-url")),i={successRedirectionUrl:Bt.none};if(Bt.isSome(e))try{const t=new URL(e.value);i.successRedirectionUrl=Bt.some(t.toString())}catch(t){throw Error(`"${e.value}" is not a valid URL`)}return i}}class co{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 Rn}static completeSuperSelectionStep(){this.postRNMessage()}static postRNMessage(){co.getRnInterop().postMessage(JSON.stringify({stepStatus:"completed"}))}}co.getRnInterop=()=>window.ReactNativeWebView;const lo=new class{constructor(){this.interopModeQueryParameter="interop-mode"}completeSuperSelectionStep(){if(Ln.isIframeInteropEnabled())uo.completeSuperSelectionStep();else{if(!Ln.isReactNativeInteropEnabled())throw Error("Unknown interop mode");co.completeSuperSelectionStep()}}init(t){const n=null==(e=new URLSearchParams(t).get(this.interopModeQueryParameter))?q:V(e);var e;L(n)&&"react-native"===n.value?Dn.update({reactNativeInterop:V(co.init())}):Dn.update({iframeInterop:V(uo.initFromRoute(t))})}};const fo=class{constructor(n){t(this,n)}async componentWillLoad(){await async function(){await Xe.loadConfigurationAsync(),so.init(),function(){if(!window.location.pathname.endsWith("/")){const t=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",t)}}(),(oo.isUnauthorized||ao.authorizationCodeIsPresent(window.location.search))&&(lo.init(window.location.search),ao.initFromRoute(window.location.search))}(),oo.sessionState$.subscribe((t=>this.sessionState=t)),oo.jwt$.subscribe((t=>this.jwt=t)),ro.appConfiguration$.subscribe((t=>this.appConfiguration=t))}render(){return n(s,null,n("link",{rel:"stylesheet",href:r("apollo-super-selection.css"),media:"all"}),n("div",{ref:t=>this.observeContentResize(t)},Bt.isNone(this.appConfiguration)?n("sss-loading-page",{class:"font-inter"}):this.renderAppContent()))}renderAppContent(){return n("stencil-router",{root:Xe.getAppRootUrl(),class:"sss-app-container"},n("stencil-route-switch",{scrollTopOffset:0},n("stencil-route",{url:"/",routeRender:this.renderProtectedRoute((t=>n("super-selection-app",Object.assign({accessToken:Bt.toUndefined(this.jwt),backendUrl:ro.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(){lo.completeSuperSelectionStep()}handleStepSubmitSuccess(){Yt()}handleAppInitialised(t){so.addCustomProperties({"X-ACCOUNT-ID":t.detail.accountIdOrDefault,"X-PARTNER-ID":t.detail.partnerIdOrDefault,"X-PROFILE-ID":t.detail.profileId}),so.getAppInsights().trackPageView();const n=document.getElementById("sss-external-loading-page-container");n&&document.body.removeChild(n)}observeContentResize(t){new(window.ResizeObserver||$e)((()=>{$t(t.offsetHeight,-1)})).observe(t)}renderProtectedRoute(t){switch(this.sessionState){case Pn.Authenticated:return t;case Pn.Unauthorized:return()=>n("sss-loading-page",null);case Pn.Error:return()=>n("h1",null,"Authentication Error")}}};fo.style="html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#ffc418;--fl-color-primary-dark:#e4aa00;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";export{ft as sss_button,tn as sss_consent_page,on as sss_custom_fund,cn as sss_default_fund,ln as sss_dropdown_async,wn as sss_existing_choice_page,yn as sss_footer_section,gn as sss_header_section,bn as sss_iframe_host,xn as sss_loading_indicator,kn as sss_loading_page,Sn as sss_my_own_fund,Cn as sss_my_own_fund_inputs,Mn as sss_promoted_fund_join_v1_page,Tn as sss_promoted_fund_join_v2_page,jn as sss_self_managed_fund,Nn as sss_self_managed_fund_inputs,Vn as sss_slate_join_page,zn as sss_smsf_not_supported_dialog,Hn as sss_standard_choice_form,Wn as sss_success,$n as sss_super_choice_item_bottom,Xn as sss_super_choice_item_top,Jn as sss_super_choice_page,Yn as stencil_route,Qn as stencil_route_link,te as stencil_route_switch,ae as stencil_router,ue as super_selection_app,fo as super_selection_app_host}
|