@flarehr/apollo-super-selection 3.52.60060 → 3.53.61179
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.css +1 -0
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
- package/dist/lib/apollo-super-selection/p-03373b03.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
- package/dist/lib/apollo-super-selection/{p-381262c1.system.js → p-15f0e5eb.system.js} +1 -1
- package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
- package/dist/lib/apollo-super-selection/p-6c94de60.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-74f91404.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +3 -4
- package/dist/lib/cjs/{app-globals-45007120.js → app-globals-b1125d8c.js} +1 -1
- package/dist/lib/cjs/{datorama-akita-7f4b082a.js → datorama-akita-6c9cb8fb.js} +1005 -68
- package/dist/lib/cjs/loader.cjs.js +3 -4
- package/dist/lib/cjs/{fl-button_31.cjs.entry.js → sss-button_28.cjs.entry.js} +2099 -2167
- package/dist/lib/collection/apollo-super-selection.css +1 -0
- package/dist/lib/collection/collection-manifest.json +16 -28
- package/dist/lib/collection/components/app-host/loading-page.js +3 -3
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -4
- package/dist/lib/collection/components/app-host/super-selection-app-host.js +7 -19
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +69 -1
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +9 -3
- package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +16 -21
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +57 -0
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +132 -0
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +6 -18
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +50 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +31 -16
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +10 -14
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +36 -45
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +40 -19
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +45 -40
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +104 -58
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +53 -49
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.js +6 -16
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-page.js +1 -1
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +1 -4
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-iframe-builder.js +10 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +13 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +2 -3
- package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +28 -0
- package/dist/lib/collection/components/super-selection-app/misc/button.js +146 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +359 -0
- package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
- package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +8 -4
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +20 -0
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +95 -0
- package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +8 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +6 -4
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +71 -34
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +10 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +94 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +89 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +67 -90
- package/dist/lib/collection/components/super-selection-app/super-selection-app.css +16 -4
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +32 -11
- package/dist/lib/esm/apollo-super-selection.js +3 -4
- package/dist/lib/esm/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm/{datorama-akita-79ce4385.js → datorama-akita-127aea91.js} +960 -28
- package/dist/lib/esm/loader.js +3 -4
- package/dist/lib/esm/{fl-button_31.entry.js → sss-button_28.entry.js} +2086 -2151
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_28.entry.js +69 -0
- package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +30 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +19 -4
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +4 -6
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -2
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +11 -0
- package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +44 -0
- package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +51 -0
- package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +6 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +3 -2
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +6 -3
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +8 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +1 -1
- package/dist/lib/types/components.d.ts +146 -97
- package/package.json +12 -7
- package/dist/lib/apollo-super-selection/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-qsuper.png +0 -0
- package/dist/lib/apollo-super-selection/p-0623b20a.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-13573238.system.js +0 -15
- package/dist/lib/apollo-super-selection/p-342cee5a.js +0 -1
- package/dist/lib/apollo-super-selection/p-38f24f69.js +0 -1
- package/dist/lib/apollo-super-selection/p-64ebe17d.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-7dbe5a2f.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-d82b00ed.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-df9ce4b7.js +0 -15
- package/dist/lib/apollo-super-selection/p-f7a45412.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-fbe8c6d1.entry.js +0 -14
- package/dist/lib/cjs/delay-81aff2f1.js +0 -955
- package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -90
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.css +0 -11
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.css +0 -23
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.js +0 -62
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-fund.store.js +0 -10
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-standard-choice-page.js +0 -67
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.css +0 -0
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.js +0 -19
- package/dist/lib/collection/components/super-selection-app/notifications-section/notifications-section.js +0 -25
- package/dist/lib/collection/components/super-selection-app/services/notifications.service.js +0 -37
- package/dist/lib/collection/components/super-selection-app/services/notifications.store.js +0 -3
- package/dist/lib/collection/components/super-selection-app/services/selected-super-choice-info.service.js +0 -50
- package/dist/lib/collection/components/super-selection-app/standard-choice/api/standard-choice.model.js +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.css +0 -18
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.js +0 -53
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item.js +0 -296
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.css +0 -70
- package/dist/lib/esm/delay-c0555599.js +0 -935
- package/dist/lib/esm/fl-style-guide.entry.js +0 -86
- package/dist/lib/esm-es5/datorama-akita-79ce4385.js +0 -15
- package/dist/lib/esm-es5/delay-c0555599.js +0 -1
- package/dist/lib/esm-es5/fl-button_31.entry.js +0 -69
- package/dist/lib/esm-es5/fl-style-guide.entry.js +0 -1
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-fund.store.d.ts +0 -7
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slatesuper-header.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/notifications-section/notifications-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/services/notifications.service.d.ts +0 -15
- package/dist/lib/types/components/super-selection-app/services/notifications.store.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/services/selected-super-choice-info.service.d.ts +0 -18
- package/dist/lib/types/components/super-selection-app/standard-choice/api/standard-choice.model.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item.d.ts +0 -22
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,n){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r["throw"](e))}catch(e){a(e)}}function u(e){e.done?n(e.value):i(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return u([e,t])}}function u(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-38ee2795.system.js","./p-14885f78.system.js","./p-ae4f5e0b.system.js"],(function(e){"use strict";var t,n,r,i,a,o,s,u,c,l,f,d,p,h,v,m,g,y,b,w,x,S,_,I,C,T;return{setters:[function(e){t=e.r;n=e.h;r=e.g;i=e.f;a=e.a;o=e.H;s=e.c;u=e.d;c=e.e;l=e.s},function(e){f=e.f;d=e.m;p=e.S;h=e.a;v=e.i;m=e.b;g=e.O;y=e.c;b=e.d;w=e.g;x=e.h;S=e.j;_=e.k;I=e.l;C=e.Q},function(e){T=e.A}],execute:function(){function E(){}function A(e,t,n){if(n===void 0){n=Number.POSITIVE_INFINITY}if(typeof t==="function"){return function(r){return r.pipe(A((function(n,r){return f(e(n,r)).pipe(d((function(e,i){return t(n,e,r,i)})))}),n))}}else if(typeof t==="number"){n=t}return function(t){return t.lift(new k(e,n))}}var k=function(){function e(e,t){if(t===void 0){t=Number.POSITIVE_INFINITY}this.project=e;this.concurrent=t}e.prototype.call=function(e,t){return t.subscribe(new N(e,this.project,this.concurrent))};return e}();var N=function(e){__extends(t,e);function t(t,n,r){if(r===void 0){r=Number.POSITIVE_INFINITY}var i=e.call(this,t)||this;i.project=n;i.concurrent=r;i.hasCompleted=false;i.buffer=[];i.active=0;i.index=0;return i}t.prototype._next=function(e){if(this.active<this.concurrent){this._tryNext(e)}else{this.buffer.push(e)}};t.prototype._tryNext=function(e){var t;var n=this.index++;try{t=this.project(e,n)}catch(e){this.destination.error(e);return}this.active++;this._innerSub(t)};t.prototype._innerSub=function(e){var t=new h(this);var n=this.destination;n.add(t);var r=v(e,t);if(r!==t){n.add(r)}};t.prototype._complete=function(){this.hasCompleted=true;if(this.active===0&&this.buffer.length===0){this.destination.complete()}this.unsubscribe()};t.prototype.notifyNext=function(e){this.destination.next(e)};t.prototype.notifyComplete=function(){var e=this.buffer;this.active--;if(e.length>0){this._next(e.shift())}else if(this.active===0&&this.hasCompleted){this.destination.complete()}};return t}(p);function F(e,t,n,r){if(y(n)){r=n;n=undefined}if(r){return F(e,t,n).pipe(d((function(e){return m(e)?r.apply(void 0,e):r(e)})))}return new g((function(r){function i(e){if(arguments.length>1){r.next(Array.prototype.slice.call(arguments))}else{r.next(e)}}P(e,t,i,r,n)}))}function P(e,t,n,r,i){var a;if(O(e)){var o=e;e.addEventListener(t,n,i);a=function(){return o.removeEventListener(t,n,i)}}else if(R(e)){var s=e;e.on(t,n);a=function(){return s.off(t,n)}}else if(D(e)){var u=e;e.addListener(t,n);a=function(){return u.removeListener(t,n)}}else if(e&&e.length){for(var c=0,l=e.length;c<l;c++){P(e[c],t,n,r,i)}}else{throw new TypeError("Invalid event target")}r.add(a)}function D(e){return e&&typeof e.addListener==="function"&&typeof e.removeListener==="function"}function R(e){return e&&typeof e.on==="function"&&typeof e.off==="function"}function O(e){return e&&typeof e.addEventListener==="function"&&typeof e.removeEventListener==="function"}function M(e,t){if(t===void 0){t=b}return function(n){return n.lift(new L(e,t))}}var L=function(){function e(e,t){this.dueTime=e;this.scheduler=t}e.prototype.call=function(e,t){return t.subscribe(new U(e,this.dueTime,this.scheduler))};return e}();var U=function(e){__extends(t,e);function t(t,n,r){var i=e.call(this,t)||this;i.dueTime=n;i.scheduler=r;i.debouncedSubscription=null;i.lastValue=null;i.hasValue=false;return i}t.prototype._next=function(e){this.clearDebounce();this.lastValue=e;this.hasValue=true;this.add(this.debouncedSubscription=this.scheduler.schedule(B,this.dueTime,this))};t.prototype._complete=function(){this.debouncedNext();this.destination.complete()};t.prototype.debouncedNext=function(){this.clearDebounce();if(this.hasValue){var e=this.lastValue;this.lastValue=null;this.hasValue=false;this.destination.next(e)}};t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;if(e!==null){this.remove(e);e.unsubscribe();this.debouncedSubscription=null}};return t}(w);function B(e){e.debouncedNext()}function j(e,t,n){return function r(i){return i.lift(new V(e,t,n))}}var V=function(){function e(e,t,n){this.nextOrObserver=e;this.error=t;this.complete=n}e.prototype.call=function(e,t){return t.subscribe(new q(e,this.nextOrObserver,this.error,this.complete))};return e}();var q=function(e){__extends(t,e);function t(t,n,r,i){var a=e.call(this,t)||this;a._tapNext=E;a._tapError=E;a._tapComplete=E;a._tapError=r||E;a._tapComplete=i||E;if(y(n)){a._context=a;a._tapNext=n}else if(n){a._context=n;a._tapNext=n.next||E;a._tapError=n.error||E;a._tapComplete=n.complete||E}return a}t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.next(e)};t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){this.destination.error(e);return}this.destination.error(e)};t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()};return t}(w);var z="3.53.61179";var H=function(e){return e._tag==="Some"};var W=function(e){return e._tag==="None"};var G={_tag:"None"};var K=function(e){return{_tag:"Some",value:e}};function X(e){return e==null?G:K(e)}function J(e){return W(e)?undefined:e.value}var Y=function(e){return function(t){return W(t)?e():t.value}};var Q=Y;var $=function(){function e(e){this.factory=e;this._value=G}Object.defineProperty(e.prototype,"value",{get:function(){if(H(this._value)){return this._value.value}var e=this.factory();this._value=K(e);return e},enumerable:false,configurable:true});return e}();function Z(){if(!window.location.pathname.endsWith("/")){var e=window.location.pathname+"/"+window.location.search+window.location.hash;history.pushState(history.state,"",e)}}function ee(e){T.injectProps(e,["history","location"])}var te="/";var ne="./";var re=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");var ie=function(e,t){var n=[];var r=0;var i=0;var a="";var o=t&&t.delimiter||te;var s=t&&t.delimiters||ne;var u=false;var c;while((c=re.exec(e))!==null){var l=c[0];var f=c[1];var d=c.index;a+=e.slice(i,d);i=d+l.length;if(f){a+=f[1];u=true;continue}var p="";var h=e[i];var v=c[2];var m=c[3];var g=c[4];var y=c[5];if(!u&&a.length){var b=a.length-1;if(s.indexOf(a[b])>-1){p=a[b];a=a.slice(0,b)}}if(a){n.push(a);a="";u=false}var w=p!==""&&h!==undefined&&h!==p;var x=y==="+"||y==="*";var S=y==="?"||y==="*";var _=p||o;var I=m||g;n.push({name:v||r++,prefix:p,delimiter:_,optional:S,repeat:x,partial:w,pattern:I?oe(I):"[^"+ae(_)+"]+?"})}if(a||i<e.length){n.push(a+e.substr(i))}return n};var ae=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")};var oe=function(e){return e.replace(/([=!:$/()])/g,"\\$1")};var se=function(e){return e&&e.sensitive?"":"i"};var ue=function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n){for(var r=0;r<n.length;r++){t.push({name:r,prefix:null,delimiter:null,optional:false,repeat:false,partial:false,pattern:null})}}return e};var ce=function(e,t,n){var r=[];for(var i=0;i<e.length;i++){r.push(de(e[i],t,n).source)}return new RegExp("(?:"+r.join("|")+")",se(n))};var le=function(e,t,n){return fe(ie(e,n),t,n)};var fe=function(e,t,n){n=n||{};var r=n.strict;var i=n.end!==false;var a=ae(n.delimiter||te);var o=n.delimiters||ne;var s=[].concat(n.endsWith||[]).map(ae).concat("$").join("|");var u="";var c=false;for(var l=0;l<e.length;l++){var f=e[l];if(typeof f==="string"){u+=ae(f);c=l===e.length-1&&o.indexOf(f[f.length-1])>-1}else{var d=ae(f.prefix||"");var p=f.repeat?"(?:"+f.pattern+")(?:"+d+"(?:"+f.pattern+"))*":f.pattern;if(t)t.push(f);if(f.optional){if(f.partial){u+=d+"("+p+")?"}else{u+="(?:"+d+"("+p+"))?"}}else{u+=d+"("+p+")"}}}if(i){if(!r)u+="(?:"+a+")?";u+=s==="$"?"$":"(?="+s+")"}else{if(!r)u+="(?:"+a+"(?="+s+"))?";if(!c)u+="(?="+a+"|"+s+")"}return new RegExp("^"+u,se(n))};var de=function(e,t,n){if(e instanceof RegExp){return ue(e,t)}if(Array.isArray(e)){return ce(e,t,n)}return le(e,t,n)};var pe=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};var he=function(e,t){return pe(e,t)?e.substr(t.length):e};var ve=function(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e};var me=function(e){return e.charAt(0)==="/"?e:"/"+e};var ge=function(e){return e.charAt(0)==="/"?e.substr(1):e};var ye=function(e){var t=e||"/";var n="";var r="";var i=t.indexOf("#");if(i!==-1){r=t.substr(i);t=t.substr(0,i)}var a=t.indexOf("?");if(a!==-1){n=t.substr(a);t=t.substr(0,a)}return{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r,query:{},key:""}};var be=function(e){var t=e.pathname,n=e.search,r=e.hash;var i=t||"/";if(n&&n!=="?"){i+=n.charAt(0)==="?"?n:"?"+n}if(r&&r!=="#"){i+=r.charAt(0)==="#"?r:"#"+r}return i};var we=function(e){if(!e){return{}}return(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];e[r]=i?decodeURIComponent(i.replace(/\+/g," ")):"";return e}),{})};var xe=function(e){return e.charAt(0)==="/"};var Se=function(e){return Math.random().toString(36).substr(2,e)};var _e=function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1){e[n]=e[r]}e.pop()};var Ie=function(e,t){if(t===void 0){t=""}var n=t&&t.split("/")||[];var r;var i=0;var a=e&&e.split("/")||[];var o=e&&xe(e);var s=t&&xe(t);var u=o||s;if(e&&xe(e)){n=a}else if(a.length){n.pop();n=n.concat(a)}if(!n.length){return"/"}if(n.length){var c=n[n.length-1];r=c==="."||c===".."||c===""}else{r=false}for(var l=n.length;l>=0;l--){var f=n[l];if(f==="."){_e(n,l)}else if(f===".."){_e(n,l);i++}else if(i){_e(n,l);i--}}if(!u){for(;i--;i){n.unshift("..")}}if(u&&n[0]!==""&&(!n[0]||!xe(n[0]))){n.unshift("")}var d=n.join("/");if(r&&d.substr(-1)!=="/"){d+="/"}return d};var Ce=function(e,t){if(e===t){return true}if(e==null||t==null){return false}if(Array.isArray(e)){return Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return Ce(e,t[n])}))}var n=typeof e;var r=typeof t;if(n!==r){return false}if(n==="object"){var i=e.valueOf();var a=t.valueOf();if(i!==e||a!==t){return Ce(i,a)}var o=Object.keys(e);var s=Object.keys(t);if(o.length!==s.length){return false}return o.every((function(n){return Ce(e[n],t[n])}))}return false};var Te=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Ce(e.state,t.state)};var Ee=function(e,t,n,r){var i;if(typeof e==="string"){i=ye(e);if(t!==undefined){i.state=t}}else{i=Object.assign({pathname:""},e);if(i.search&&i.search.charAt(0)!=="?"){i.search="?"+i.search}if(i.hash&&i.hash.charAt(0)!=="#"){i.hash="#"+i.hash}if(t!==undefined&&i.state===undefined){i.state=t}}try{i.pathname=decodeURI(i.pathname)}catch(e){if(e instanceof URIError){throw new URIError('Pathname "'+i.pathname+'" could not be decoded. '+"This is likely caused by an invalid percent-encoding.")}else{throw e}}i.key=n;if(r){if(!i.pathname){i.pathname=r.pathname}else if(i.pathname.charAt(0)!=="/"){i.pathname=Ie(i.pathname,r.pathname)}}else{if(!i.pathname){i.pathname="/"}}i.query=we(i.search||"");return i};var Ae=0;var ke={};var Ne=1e4;var Fe=function(e,t){var n=""+t.end+t.strict;var r=ke[n]||(ke[n]={});var i=JSON.stringify(e);if(r[i]){return r[i]}var a=[];var o=de(e,a,t);var s={re:o,keys:a};if(Ae<Ne){r[i]=s;Ae+=1}return s};var Pe=function(e,t){if(t===void 0){t={}}if(typeof t==="string"){t={path:t}}var n=t.path,r=n===void 0?"/":n,i=t.exact,a=i===void 0?false:i,o=t.strict,s=o===void 0?false:o;var u=Fe(r,{end:a,strict:s}),c=u.re,l=u.keys;var f=c.exec(e);if(!f){return null}var d=f[0],p=f.slice(1);var h=e===d;if(a&&!h){return null}return{path:r,url:r==="/"&&d===""?"/":d,isExact:h,params:l.reduce((function(e,t,n){e[t.name]=p[n];return e}),{})}};var De=function(e,t){if(e==null&&t==null){return true}if(t==null){return false}return e&&t&&e.path===t.path&&e.url===t.url&&Ce(e.params,t.params)};var Re;(function(e){e[e["Available"]=0]="Available";e[e["Pending"]=1]="Pending";e[e["Error"]=2]="Error"})(Re||(Re={}));var Oe=e("sss_button",function(){function e(e){t(this,e);this.fillWidth=false;this.fillWidthOnMobile=false;this.disabled=false;this.variant="primary";this.promiseFn=function(){return Promise.resolve()};this.state=Re.Available}e.prototype.render=function(){var e=this;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":true,"disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400":true,"border-transparent text-white bg-primary-base hover:bg-primary-hover":this.variant==="primary","border-gray-300 text-gray-700 bg-white hover:bg-gray-50":this.variant==="secondary","w-full":this.fillWidth||this.fillWidthOnMobile,"sm:w-auto":this.fillWidthOnMobile},disabled:this.disabled,onClick:function(){return e.clicked()}},this.state===Re.Pending&&n("sss-loading-indicator",{theme:this.variant==="primary"?"light":"primary",size:16}),n("div",{class:{hidden:this.state===Re.Pending}},n("slot",null)))};e.prototype.clicked=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!this.promiseFn||this.state===Re.Pending)return[2];t.label=1;case 1:t.trys.push([1,3,,4]);this.state=Re.Pending;return[4,this.promiseFn()];case 2:t.sent();this.state=Re.Available;return[3,4];case 3:e=t.sent();this.state=Re.Error;throw e;case 4:return[2]}}))}))};return e}());var Me=undefined&&undefined.__assign||function(){Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return Me.apply(this,arguments)};var Le=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};var Ue=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=Me({},e);for(var i in t){if(t.hasOwnProperty(i)){if(t[i]instanceof Array&&e[i]instanceof Array){r[i]=n?Le(e[i],t[i]):t[i]}else if(typeof t[i]==="object"&&typeof e[i]==="object"){r[i]=Ue(e[i],t[i],n)}else{r[i]=t[i]}}}return r};var Be=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};var je={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,i=r===void 0?true:r,a=n.instance,o=a===void 0?false:a;var s=[];for(var u=2;u<arguments.length;u++){s[u-2]=arguments[u]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(i&&!c)throw new Error(e+" is not defined");return o&&c?new(c.bind.apply(c,Be([void 0],s))):c}};var Ve=function(e,t,n,r){if(!e.getEntriesByName)return false;var i=e.getEntriesByName(t);if(i&&i.length>0){n(i.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);ze.callbacks.delete(t);if(ze.callbacks.size<1){ze.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var qe=function(e,t){if(!ze.observer&&e&&t){ze.observer=new t((function(t){ze.callbacks.forEach((function(n,r){Ve(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return ze.observer};var ze={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=je.polyfill("performance",{doThrow:false});var r=je.polyfill("PerformanceObserver",{doThrow:false});if(!qe(n,r))return;if(!Ve(n,e,t,n)){if(ze.callbacks.size<1)ze.observer.observe({entryTypes:["resource","measure"]});ze.callbacks.set(e,t)}}};var He=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,i){return i===e.length-2?r(n(t)):r(n)}))}};var We=function(){function e(e){this.error=e}return e}();var Ge=function(e){var t=e._url,n=e._catchers,r=e._resolvers,i=e._middlewares,a=e._options;var o=new Map(n);var s=Ue(je.defaults,a);var u=je.polyfill("AbortController",{doThrow:false,instance:true});if(!s["signal"]&&u){s["signal"]=u.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var l=He(i)(je.polyfill("fetch"))(t,s);var f=l.catch((function(e){throw new We(e)})).then((function(e){c.clear();if(!e.ok){return e[je.errorType||"text"]().then((function(t){var n=new Error(t);n[je.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var d=function(t){return t.catch((function(t){c.clear();var n=t instanceof We?t.error:t;if(t instanceof We&&o.has("__fromFetch"))return o.get("__fromFetch")(n,e);else if(o.has(n.status))return o.get(n.status)(n,e);else if(o.has(n.name))return o.get(n.name)(n,e);else throw n}))};var p=function(e){return function(t){return e?d(f.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):d(f.then((function(e){return t?t(e):e})))}};var h={res:p(null),json:p("json"),blob:p("blob"),formData:p("formData"),arrayBuffer:p("arrayBuffer"),text:p("text"),perfs:function(e){l.then((function(t){return ze.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=u}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[u,h]},error:function(e,t){o.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var Ke=undefined&&undefined.__assign||function(){Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return Ke.apply(this,arguments)};var Xe=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};var Je="application/json";var Ye="Content-Type";var Qe=function(){function e(e,t,n,r,i,a){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(i===void 0){i=[]}if(a===void 0){a=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=i;this._deferredChain=a}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,i=r===void 0?this._url:r,a=n.options,o=a===void 0?this._options:a,s=n.catchers,u=s===void 0?this._catchers:s,c=n.resolvers,l=c===void 0?this._resolvers:c,f=n.middlewares,d=f===void 0?this._middlewares:f,p=n.deferredChain,h=p===void 0?this._deferredChain:p;return new e(i,Ke({},o),new Map(u),Xe(l),Xe(d),Xe(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}je.defaults=t?Ue(je.defaults,e):e;return this};e.prototype.errorType=function(e){je.errorType=e;return this};e.prototype.polyfills=function(e){je.polyfills=Ke(Ke({},je.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?Ue(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:$e(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:Ue(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[Ye]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:Ke(Ke({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:Xe(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:Xe(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:Xe(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var i=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==Ye.toLowerCase()||n.startsWith(Je)})))?this.json(n):this.body(n);i=i.options(Ke(Ke({},t),{method:e}));var a=i._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),i);return Ge(a)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:Ke(Ke({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===Ye.toLowerCase()&&n.startsWith(Je)})))===null||t===void 0?void 0:t[1];return this.content(n||Je).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(Ze(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:tt(e)).content("application/x-www-form-urlencoded")};return e}();var $e=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var i=je.polyfill("URLSearchParams",{instance:true});for(var a in t){if(t[a]instanceof Array){for(var o=0,s=t[a];o<s.length;o++){var u=s[o];i.append(a,u)}}else{i.append(a,t[a])}}r=i.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function Ze(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=je.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var i=e[0],a=e[1];var o=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);o=o?o+"["+i+"]":i;if(a instanceof Array){for(var s=0,u=a;s<u.length;s++){var c=u[s];n.append(o+"[]",c)}}else if(t&&typeof a==="object"&&(!(t instanceof Array)||!t.includes(i))){if(a!==null){Ze(a,t,n,Xe(r,[i]))}}else{n.append(o,a)}}));return n}function et(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function tt(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return et(t,e)})).join("&")}return et(t,n)})).join("&")}var nt=Qe.factory;nt["default"]=Qe.factory;var rt=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var it=function(e,t){var n;return function(){var r=[];for(var i=0;i<arguments.length;i++){r[i]=arguments[i]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var at=function(e){return!("isConnected"in e)||e.isConnected};var ot=it((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(at))}}),2e3);var st=function(e){var t=e.on;var n=new Map;if(typeof r==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=r();if(t){rt(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(i))}ot(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(i)}));ot(n)}))}};var ut=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var i=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var a=function(){r.dispose.forEach((function(e){return e()}));i()};var o=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var s=function(e,i){var a=n.get(e);if(t(i,a,e)){n.set(e,i);r.set.forEach((function(t){return t(e,i,a)}))}};var u=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return o(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){s(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){ct(r[e],t)}};var l=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var i=c("reset",(function(){return n(e[t])}));return function(){r();i()}};var f=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:u,get:o,set:s,on:c,onChange:l,use:f,dispose:a,reset:i}};var ct=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var lt=function(e,t){var n=ut(e,t);st(n);return n};function ft(e,t,n){return n={path:t,exports:{},require:function(e,t){return dt()}},e(n,n.exports),n.exports}function dt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var pt=ft((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function i(e){return function(){return e}}t.constant=i;t.constTrue=i(true);t.constFalse=i(false);t.constNull=i(null);t.constUndefined=i(undefined);t.constVoid=t.constUndefined;function a(e){return function(t,n){return e(n,t)}}t.flip=a;function o(e,t,n,r,i,a,o,s,u){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return u(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=o;function s(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=s;function u(e){return e+1}t.increment=u;function c(e){return e-1}t.decrement=c;function l(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=l;function f(e){return function(t){return e.apply(void 0,t)}}t.tupled=f;function d(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=d;function p(e,t,n,r,i,a,o,s,u,c,l,f,d,p,h,v,m,g,y,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return a(i(r(n(t(e)))));case 7:return o(a(i(r(n(t(e))))));case 8:return s(o(a(i(r(n(t(e)))))));case 9:return u(s(o(a(i(r(n(t(e))))))));case 10:return c(u(s(o(a(i(r(n(t(e)))))))));case 11:return l(c(u(s(o(a(i(r(n(t(e))))))))));case 12:return f(l(c(u(s(o(a(i(r(n(t(e)))))))))));case 13:return d(f(l(c(u(s(o(a(i(r(n(t(e))))))))))));case 14:return p(d(f(l(c(u(s(o(a(i(r(n(t(e)))))))))))));case 15:return h(p(d(f(l(c(u(s(o(a(i(r(n(t(e))))))))))))));case 16:return v(h(p(d(f(l(c(u(s(o(a(i(r(n(t(e)))))))))))))));case 17:return m(v(h(p(d(f(l(c(u(s(o(a(i(r(n(t(e))))))))))))))));case 18:return g(m(v(h(p(d(f(l(c(u(s(o(a(i(r(n(t(e)))))))))))))))));case 19:return y(g(m(v(h(p(d(f(l(c(u(s(o(a(i(r(n(t(e))))))))))))))))));case 20:return b(y(g(m(v(h(p(d(f(l(c(u(s(o(a(i(r(n(t(e)))))))))))))))))))}return}t.pipe=p;t.hole=l;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var v=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=v}));var ht=ft((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var i=function(e){return{_tag:"Some",value:e}};t.some=i;function a(e){return e==null?t.none:t.some(e)}t.fromNullable=a;function o(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=o;function s(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=s;function u(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=u;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function l(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=l;function f(e){return t.isNone(e)?null:e.value}t.toNullable=f;function d(e){return t.isNone(e)?undefined:e.value}t.toUndefined=d;var p=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=p;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return a(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=v;function v(e){return function(n){return t.isNone(n)?t.none:a(e(n.value))}}t.chainNullableK=v;var m=function(e,n){return pt.pipe(e,t.map(n))};var g=function(e,n){return pt.pipe(e,t.ap(n))};var y=function(e,n){return pt.pipe(e,t.chain(n))};var b=function(e,n,r){return pt.pipe(e,t.reduce(n,r))};var w=function(e){var n=t.foldMap(e);return function(e,t){return pt.pipe(e,n(t))}};var x=function(e,n,r){return pt.pipe(e,t.reduceRight(n,r))};var S=function(e){var n=t.traverse(e);return function(e,t){return pt.pipe(e,n(t))}};var _=function(e,n){return pt.pipe(e,t.alt(n))};var I=function(e,n){return pt.pipe(e,t.filter(n))};var C=function(e,n){return pt.pipe(e,t.filterMap(n))};var T=function(e,n){return pt.pipe(e,t.extend(n))};var E=function(e,n){return pt.pipe(e,t.partition(n))};var A=function(e,n){return pt.pipe(e,t.partitionMap(n))};var k=function(e){var n=t.wither(e);return function(e,t){return pt.pipe(e,n(t))}};var N=function(e){var n=t.wilt(e);return function(e,t){return pt.pipe(e,n(t))}};var F=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=F;var P=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=P;var D=function(e){return pt.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=D;var R=function(e){return pt.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=R;t.of=t.some;var O=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=O;var M=function(e){return t.chain((function(n){return pt.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=M;t.flatten=t.chain(pt.identity);var L=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=L;t.alt=t.altW;var U=function(){return t.none};t.zero=U;var B=function(){return t.none};t.throwError=B;var j=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=j;t.duplicate=t.extend(pt.identity);var V=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=V;var q=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=q;var z=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=z;t.compact=t.flatten;var H={left:t.none,right:t.none};var W=function(e){var n=pt.pipe(e,t.map((function(e){return{left:u(e),right:c(e)}})));return t.isNone(n)?H:n.value};t.separate=W;var G=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=G;var K=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=K;var X=function(e){return function(t){return{left:I(t,(function(t){return!e(t)})),right:I(t,e)}}};t.partition=X;var J=function(e){return pt.flow(t.map(e),t.separate)};t.partitionMap=J;var Y=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=Y;var Q=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=Q;var $=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=$;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:u(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function ie(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=ie;function ae(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=ae;function oe(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=oe;function se(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=se;t.Functor={URI:t.URI,map:m};t.Applicative={URI:t.URI,map:m,ap:g,of:t.of};t.Monad={URI:t.URI,map:m,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:b,foldMap:w,reduceRight:x};t.Alt={URI:t.URI,map:m,alt:_};t.Alternative={URI:t.URI,map:m,ap:g,of:t.of,alt:_,zero:t.zero};t.Extend={URI:t.URI,map:m,extend:T};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:m,compact:t.compact,separate:t.separate,filter:I,filterMap:C,partition:E,partitionMap:A};t.Traversable={URI:t.URI,map:m,reduce:b,foldMap:w,reduceRight:x,traverse:S,sequence:t.sequence};t.Witherable={URI:t.URI,map:m,reduce:b,foldMap:w,reduceRight:x,traverse:S,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:I,filterMap:C,partition:E,partitionMap:A,wither:k,wilt:N};t.MonadThrow={URI:t.URI,map:m,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:m,of:t.of,ap:g,chain:y,reduce:b,foldMap:w,reduceRight:x,traverse:S,sequence:t.sequence,zero:t.zero,alt:_,extend:T,compact:t.compact,separate:t.separate,filter:I,filterMap:C,partition:E,partitionMap:A,wither:k,wilt:N,throwError:t.throwError};function ue(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=ue;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function le(e){return function(n){return t.isSome(e(n))}}t.getRefinement=le;t.Do=t.of({});var fe=function(e){return t.map(pt.bindTo_(e))};t.bindTo=fe;var de=function(e,n){return t.chain((function(r){return pt.pipe(n(r),t.map((function(t){return pt.bind_(r,e,t)})))}))};t.bind=de;var pe=function(e,n){return pt.flow(t.map((function(t){return function(n){return pt.bind_(t,e,n)}})),t.ap(n))};t.apS=pe;var he=function(e){return function(n){var r=[];for(var i=0;i<n.length;i++){var a=e(i,n[i]);if(t.isNone(a)){return t.none}r.push(a.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var ve=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=ve;t.sequenceArray=t.traverseArray(pt.identity)}));function vt(e){this.message=e}vt.prototype=new Error,vt.prototype.name="InvalidCharacterError";var mt="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new vt("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,a=0,o="";r=t.charAt(a++);~r&&(n=i%4?64*n+r:r,i++%4)?o+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function gt(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(mt(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return mt(t)}}function yt(e){this.message=e}function bt(e,t){if("string"!=typeof e)throw new yt("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(gt(e.split(".")[n]))}catch(e){throw new yt("Invalid token specified: "+e.message)}}yt.prototype=new Error,yt.prototype.name="InvalidTokenError";var wt=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,Ct().url("super-choice/australian-funds?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,Ct().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()]}))}))};e.prototype.toSearchFilterQueryString=function(e){switch(e.type){case"partialMatch":return"search="+e.searchString+"&maxRecordCount="+e.maxRecordCount;case"usiMatch":return"usi="+e.usi}};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var i=function(e){return e&&e.length};return[n,r].filter(i).join("&")};return e}();var xt=new wt;var St={apiBaseUrl:ht.none,appBaseUrl:ht.none,profileId:ht.none,jwt:ht.none,superBuyer:ht.none,promotedFunds:ht.none,accountConfiguration:ht.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false};var _t=function(){function e(){var e=this;var t=lt(St),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=pt.pipe(t,ht.chain((function(e){return ht.fromNullable(bt(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(ht.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(ht.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(ht.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(ht.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(ht.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){return pt.pipe(this._state.accountConfiguration,ht.map((function(e){return ht.fromNullable(e.defaultFundUsi)})),ht.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return pt.pipe(this._state.accountConfiguration,ht.map((function(e){return e.accountId})),ht.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return pt.pipe(this._state.superBuyer,ht.map((function(e){return e.partnerId})),ht.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(ht.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"showSmsfNotSupported",{get:function(){return pt.pipe(this._state.superBuyer,ht.map((function(e){return e.showSmsfNotSupported})),ht.getOrElse((function(){return false})))},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,xt.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=ht.fromNullable(e.accountConfiguration);this._state.superBuyer=ht.fromNullable(e.superBuyer);this._state.promotedFunds=ht.fromNullable(e.promotedFunds);return[2]}}))}))};return e}();var It=new _t;function Ct(){var e=It.jwt;var t=It.profileId;var n=It.accountIdOrDefault;var r=It.partnerIdOrDefault;return nt(It.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var Tt=function(){function e(){}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.PostAnalyticsEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("analytics-events").post(e).res()]}))}))};return e}();var Et=function(){function e(){this.eventTrackingApi=Tt.Instance}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.TrackFinancialProductViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({FinancialProductViewed:e})]}))}))};e.prototype.TrackSuperFundPdsViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPdsViewed:e})]}))}))};e.prototype.TrackFinancialProductAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({FinancialProductAccepted:e})]}))}))};e.prototype.TrackFinancialProductRejectedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({FinancialProductRejected:e})]}))}))};e.prototype.TrackSuperFundPrivacyConfirmationAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrivacyConfirmationAccepted:e})]}))}))};e.prototype.TrackPromotedSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})]}))}))};e.prototype.TrackMyOwnSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})]}))}))};e.prototype.TrackSmsfSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})]}))}))};e.prototype.TrackDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})]}))}))};e.prototype.TrackSuperFundPanelViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPanelViewed:e})]}))}))};e.prototype.TrackSuperFundNominationViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationViewed:e})]}))}))};e.prototype.TrackSuperFundNominationDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationDeclined:e})]}))}))};e.prototype.TrackSuperFundDisclaimerViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerViewed:e})]}))}))};e.prototype.TrackSuperFundDisclaimerAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerAccepted:e})]}))}))};e.prototype.trackEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,this.eventTrackingApi.PostAnalyticsEventAsync({event:e})];case 1:n.sent();return[3,3];case 2:t=n.sent();return[2];case 3:return[2]}}))}))};return e}();function At(){kt({type:"appReady"})}function kt(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function Nt(e,t){kt({type:"contentResized",height:e,width:t})}function Ft(e){kt({type:"pageNavigated",url:e})}function Pt(){kt({type:"complete"})}function Dt(){kt({type:"submitSuccess"})}var Rt={appReady:At,resize:Nt,navigation:Ft,complete:Pt,submitSuccess:Dt};var Ot={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",promotedFundId:undefined};var Mt=lt(Ot).state;var Lt;(function(e){e["ConsentPage"]="/consent";e["ExistingChoicePage"]="/existing";e["ChoicePage"]="/";e["SlateJoin"]="/slate/join/";e["PromotedFundJoin"]="/promoted-fund/join";e["MyOwnFund"]="/super-choice/my-own-fund/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(Lt||(Lt={}));var Ut=[n("stencil-route",{url:Lt.ConsentPage,component:"sss-consent-page"}),n("stencil-route",{url:Lt.ExistingChoicePage,component:"sss-existing-choice-page"}),n("stencil-route",{exact:true,url:Lt.ChoicePage,component:"sss-super-choice-page"}),n("stencil-route",{url:Lt.SlateJoin,component:"sss-slate-join-page"}),n("stencil-route",{url:Lt.PromotedFundJoin,component:"sss-promoted-fund-join-page"}),n("stencil-route",{url:Lt.MyOwnFund,component:"sss-my-own-fund"}),n("stencil-route",{url:Lt.SelfManagedFund,component:"sss-self-managed-fund"}),n("stencil-route",{url:Lt.DefaultFund,component:"sss-default-fund"}),n("stencil-route",{url:Lt.StandardChoice,component:"sss-standard-choice-form"}),n("stencil-route",{url:Lt.Success,component:"sss-success"})];var Bt=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);Rt.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){Mt.handleSubmitFn=e.handleSubmitFn;Mt.fundName=e.fundName;Mt.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,Lt.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=It.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var jt=new Bt;var Vt=e("sss_consent_page",function(){function e(e){t(this,e);this.promotedFunds=It.promotedFunds;this.eventTrackingService=Et.Instance}e.prototype.componentDidLoad=function(){var e={promotedFundsShown:this.promotedFunds};this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(e)};e.prototype.render=function(){var e=this;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"},"Choosing a superannuation fund is an important life decision, take the time to consider your options carefully to get the most out of your largest workplace benefit – your super."),n("div",{class:"flex justify-center mt-8 sm:mt-12"},n("div",{class:"border shadow-sm p-4 sm:p-6 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 provides this paperless employee management service, and will promote superannuation funds and offer you employee benefits that you may be interested in;"),n("li",null,"all content contained in the following pages is factual information only. It does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"),n("li",null,"in promoting any superannuation funds, Flare is not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds; and"),n("li",null,"if you do choose one of the featured superannuation funds, Flare and its associates will normally receive a fee for you doing so.")),n("sss-button",{fillWidth:true,promiseFn:function(){return e.handleSuperFundDisclaimerAccepted()}},"Continue"))))};e.prototype.handleSuperFundDisclaimerAccepted=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e={promotedFundsShown:this.promotedFunds};this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync(e);jt.navigateInternally(this.history,Lt.ChoicePage);return[2]}))}))};return e}());var qt;(function(e){e["MyOwnFund"]="Your current super fund";e["DefaultFund"]="Your employer's default fund";e["SelfManagedFund"]="Your self-managed super fund"})(qt||(qt={}));var zt={continueAllowed:false,nextRoute:"/",myOwnFundForm:{fundUsi:G,fundName:G,memberNumber:G},selfManagedFundForm:{fundName:"",fundAbn:"",fundEsa:"",addressLine1:"",addressLine2:"",state:"",postcode:"",city:"",bankAccountName:"",bsb:"",bankAccountNumber:""},currentCustomFundType:qt.MyOwnFund,customFunds:[{label:qt.MyOwnFund,value:Lt.MyOwnFund},{label:qt.SelfManagedFund,value:Lt.SelfManagedFund},{label:qt.DefaultFund,value:Lt.DefaultFund}]};var Ht=lt(zt),Wt=Ht.state,Gt=Ht.reset;var Kt=Wt.customFunds;var Xt=e("sss_custom_fund",function(){function e(e){t(this,e);this.currentCustomFund=Kt[0];this.fundOptionsList=Kt;this.showFundOptionsSelection=false}e.prototype.componentWillLoad=function(){var e="";if(window.location.pathname.includes(Lt.MyOwnFund))e=Lt.MyOwnFund;if(window.location.pathname.includes(Lt.DefaultFund))e=Lt.DefaultFund;if(window.location.pathname.includes(Lt.SelfManagedFund))e=Lt.SelfManagedFund;this.currentCustomFund=Kt.find((function(t){return t.value===e}))||Kt[0];jt.navigateInternally(this.history,e)};e.prototype.render=function(){var e=this;var t=function(){return 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"}))};var r=function(){return 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:function(){return e.showFundOptionsSelection=!e.showFundOptionsSelection}},n("span",{class:{"block truncate":true,"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(t,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((function(t){return n("li",{class:"text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 hover:bg-primary-hover",onClick:function(){e.showFundOptionsSelection=!e.showFundOptionsSelection;jt.navigateInternally(e.history,t.value)}},n("span",{class:{"block truncate":true,"font-semibold":e.currentCustomFund===t}},t.label),e.currentCustomFund===t&&n("span",{class:"absolute inset-y-0 right-0 flex items-center pr-4"},n(r,null)))})))),n("slot",null))};return e}());ee(Xt);var Jt=function(){function e(){}e.prototype.searchFundsAsync=function(e,t){return xt.getAustralianFundsAsync({type:"partialMatch",searchString:e,maxRecordCount:t})};e.prototype.getActiveFundByUsiAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,xt.getAustralianFundsAsync({type:"usiMatch",usi:e})];case 1:t=n.sent();if(t.length===1){return[2,ht.some(t[0])]}return[2,ht.none]}}))}))};e.prototype.getFundByUsiAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,xt.getAustralianFundsAsync({type:"usiMatch",usi:e},true)];case 1:t=n.sent();if(t.length===1){return[2,ht.some(t[0])]}return[2,ht.none]}}))}))};return e}();var Yt=new Jt;var Qt=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};return e}();var $t=new Qt;var Zt=e("sss_default_fund",function(){function e(e){t(this,e);this.defaultFundProductName="Loading fund...";this.eventTrackingService=Et.Instance}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=It.defaultFundUsi;if(ht.isNone(e)){return[2]}this.isDefaultFundExists=true;return[4,Yt.getActiveFundByUsiAsync(e.value)];case 1:t=n.sent();if(ht.isNone(t)){this.isInvalidDefaultFund=true;return[2]}this.defaultFund=t.value;this.defaultFundProductName=t.value.productName;return[2]}}))}))};e.prototype.componentDidLoad=function(){var e,t,n,r;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:(t=(e=this.defaultFund)===null||e===void 0?void 0:e.usi)!==null&&t!==void 0?t:"",fundName:(r=(n=this.defaultFund)===null||n===void 0?void 0:n.productName)!==null&&r!==void 0?r:"",promotedFundsShown:It.promotedFunds})};e.prototype.render=function(){var e=this;return n(o,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:a("assets/icon-exclamation.svg")})),n("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},this.isDefaultFundExists&&!this.isInvalidDefaultFund?n("span",null,"By choosing to join your employer’s default super fund, you acknowledge that your application to join is subject to Trustee approval."):n("span",null,"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s 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:true,promiseFn:function(){return e.handleSubmitForm()}},"Continue")),n("stencil-route-link",{url:Lt.ChoicePage},n("sss-button",{fillWidth:true,variant:"secondary"},"Back")))))))};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){if(this.isInvalidDefaultFund){return[2]}jt.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",handleSubmitFn:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,$t.submitDefaultFundChoiceAsync({standardChoiceFormSignature:t})];case 1:e.sent();return[2]}}))}))}});return[2]}))}))};return e}());var en="html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";var tn=3;var nn=e("sss_dropdown_async",function(){function e(e){var r=this;t(this,e);this.valueChanged=s(this,"valueChanged",7);this.required=false;this.disabled=false;this.minSearchStringLength=tn;this.isMouseOver=false;this.searchState="pristine";this.inputValue="";this.isDropdownVisible=false;this.filteredOptions=[];this.shouldExecuteSearch=function(e){var t;return r.isDropdownVisible&&(e===null||e===void 0?void 0:e.length)>=r.minSearchStringLength&&((t=r.selectedOption)===null||t===void 0?void 0:t.label)!==e};this.onBeginSearch=function(e){r.inputValue=e;r.searchState="in progress"};this.onCompleteSearch=function(e){r.filteredOptions=e;r.highlightedOptionIndex=undefined;r.searchState="done"};this.renderFilteredResults=function(){if(r.searchState==="pristine"){return n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Start typing to find the results")}if(r.searchState==="in progress"){return n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"Searching...")}if(r.filteredOptions.length===0){return n("span",{class:"cursor-pointer text-gray-500 py-1.5 pl-4"},"No items match your search")}return r.filteredOptions.map((function(e,t){return n("div",{class:{"cursor-pointer text-wrap hover:bg-primary-hover py-1.5 pl-4":true,"bg-primary-base":r.isOptionSelected(e)},onClick:function(t){r.toggleDropdown(false);r.selectOption(e)}},e.label)}))};this.resetInput=function(){var e,t;r.inputValue=(t=(e=r.selectedOption)===null||e===void 0?void 0:e.label)!==null&&t!==void 0?t:""};this.toggleDropdown=function(e){r.isDropdownVisible=e};this.processKeyboardNavigation=function(e){var t="Enter";var n="ArrowDown";var i="ArrowUp";var a="Escape";switch(e.key){case n:r.toggleDropdown(true);r.highlightNextItem();return true;case i:r.highlightPreviousItem();return true;case t:if(r.highlightedOptionIndex!==undefined){r.toggleDropdown(false);r.selectOption(r.filteredOptions[r.highlightedOptionIndex])}return true;case a:r.inputElement.blur();return true}return false};this.highlightPreviousItem=function(){if(r.filteredOptions.length===0){return}r.highlightedOptionIndex=r.highlightedOptionIndex===undefined?0:Math.max(r.highlightedOptionIndex-1,0)};this.highlightNextItem=function(){if(r.filteredOptions.length===0){return}r.highlightedOptionIndex=r.highlightedOptionIndex===undefined?0:Math.min(r.highlightedOptionIndex+1,r.filteredOptions.length-1)};this.selectOption=function(e){r.selectedOption=e;r.inputValue=e.label;r.valueChanged.emit(e)};this.isOptionSelected=function(e){var t;return((t=r.selectedOption)===null||t===void 0?void 0:t.label)===e.label}}e.prototype.componentWillLoad=function(){this.selectedOption=this.value};e.prototype.componentDidLoad=function(){var e=this;this.searchResultsSubscription=F(this.inputElement,"keyup").pipe(M(500),d((function(t){return e.inputElement.value})),x(),S(this.shouldExecuteSearch),j(this.onBeginSearch),A(this._searchFunction),j(this.onCompleteSearch)).subscribe()};e.prototype.disconnectedCallback=function(){this.searchResultsSubscription.unsubscribe()};e.prototype.handleFocus=function(){this.toggleDropdown(true)};e.prototype.handleBlur=function(){if(this.isMouseOver){return}this.toggleDropdown(false);this.highlightedOptionIndex=undefined;this.resetInput()};e.prototype.handleKeyDown=function(e){if(this.processKeyboardNavigation(e)){e.preventDefault()}};e.prototype.render=function(){var e=this;var t;return n(o,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":true,"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:function(t){return e.inputElement=t}}),n("div",{class:{"invalid-feedback mt-2 text-sm text-red-600":true,hidden:!this.isDropdownVisible}},(t=this.requiredValidationMessage)!==null&&t!==void 0?t:"Required."),n("div",{class:{"sss-dropdown-menu absolute shadow rounded-md border mt-0 w-full overflow-auto bg-white z-50 py-2":true,hidden:!this.isDropdownVisible},onMouseEnter:function(t){return e.isMouseOver=true},onMouseLeave:function(t){return e.isMouseOver=false}},this.renderFilteredResults())))};Object.defineProperty(e.prototype,"_searchFunction",{get:function(){if(this.searchFunction===undefined){throw new Error("Can't render <sss-dropdown-async/> component with no searchFunction")}return this.searchFunction},enumerable:false,configurable:true});return e}());nn.style=en;var rn={Id:"slate",Name:"Slate Super",PdsUrl:"https://slate.co/pds/?utm_source=flare&utm_medium=superselection",Usi:"32367272075001",DiversaAbn:"49 006 421 638"};var an={Id:"australian-retirement-trust",Name:"Australian Retirement Trust",PdsUrl:"https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf",Abn:"60 905 115 063"};var on={Id:"aware",Name:"Aware Super",PdsUrlText:"View the PDS and TMD",PdsUrl:"https://aware.com.au/member/forms-and-resources/pds/FSS",Abn:"53 226 460 365"};var sn={Id:"active",Name:"Active Super",PdsUrlText:"View the PDS",PdsUrl:"https://www.activesuper.com.au/pds",Abn:"28 901 371 321"};var un=[{dtoPropName:"slate",id:rn.Id},{dtoPropName:"australianRetirementTrust",id:an.Id},{dtoPropName:"aware",id:on.Id},{dtoPropName:"active",id:sn.Id}];var cn=function(e){switch(e){case rn.Id:return rn.Name;case an.Id:return an.Name;case on.Id:return on.Name;case sn.Id:return sn.Name;default:return}};var ln=function(e){var t="";switch(e){case rn.Id:t="logo-slate.png";break;case an.Id:t="logo-art.svg";break;case on.Id:t="logo-aware.svg";break;case sn.Id:t="logo-active.svg";break;default:return}if(t!=="")return a("assets/"+t)};function fn(e){if("slate"in e){return G}else if("australianRetirementTrust"in e){return K(e.australianRetirementTrust.usi)}else if("aware"in e){return K(e.aware.usi)}else if("active"in e){return K(e.active.usi)}else{return G}}function dn(e){if("promoted"in e){return fn(e.promoted)}else if("myOwnFund"in e){return K(e.myOwnFund.usi)}else if("smsf"in e){return G}else if("default"in e){return K(e.default.usi)}else{return G}}function pn(e){if("slate"in e){return K(e.slate.memberNumber)}else if("australianRetirementTrust"in e){return K(e.australianRetirementTrust.memberNumber)}else if("aware"in e){return K(e.aware.memberNumber)}else if("active"in e){return K(e.active.memberNumber)}else{return G}}function hn(e){if("promoted"in e){return pn(e.promoted)}else if("myOwnFund"in e){return K(e.myOwnFund.memberNumber)}else if("smsf"in e){return G}else if("default"in e){return G}else{return G}}var vn=function(){function e(){}e.prototype.GetExistingFundAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,a,o,s,u,s,c,l;return __generator(this,(function(f){switch(f.label){case 0:n=It.superBuyer.superChoice;r=(e=It.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails;if(!n)return[2,G];if(!r)return[2,G];i=n.dateSubmitted==undefined?G:K(new Date(n.dateSubmitted));a=dn(r);o=hn(r);if(!("promoted"in r))return[3,1];s=un.find((function(e){return e.dtoPropName in r.promoted}));if((s===null||s===void 0?void 0:s.id)==undefined)return[2,G];return[2,K({type:"Promoted Fund",id:s.id,name:(t=cn(s.id))!==null&&t!==void 0?t:"",usi:a,valid:"Active",memberNumber:o,lastNominatedAt:i})];case 1:if(!("smsf"in r))return[3,2];return[2,K({type:"Self Managed Fund",name:r.smsf.fundName,valid:"Unknown",lastNominatedAt:i})];case 2:if(!("myOwnFund"in r))return[3,4];u=r.myOwnFund.usi;return[4,this.getFundByUsiAsync(u)];case 3:s=f.sent();return[2,K({type:"My Own Fund",name:H(s)?s.value.productName:u,usi:a,valid:this.toFundValidState(s),memberNumber:o,lastNominatedAt:i})];case 4:if(!("default"in r))return[3,6];c=r.default.usi;return[4,this.getFundByUsiAsync(c)];case 5:l=f.sent();return[2,K({type:"Default Fund",name:H(l)?l.value.productName:c,usi:a,valid:this.toFundValidState(l),lastNominatedAt:i})];case 6:return[2,G]}}))}))};e.prototype.submitRetainSuperFundAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/retain-super-fund").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.getFundByUsiAsync=function(e){return Yt.getFundByUsiAsync(e)};e.prototype.toFundValidState=function(e){if(H(e)){return e.value.isActive?"Active":"Inactive"}else{return"Unknown"}};return e}();var mn=new vn;var gn=e("sss_existing_choice_page",function(){function e(e){t(this,e);this.eventTrackingService=Et.Instance;this.createSuperFundNominationDetail=function(e){function t(e){return H(e)?e.value:undefined}function n(e){return"usi"in e?t(e.usi):undefined}function r(e){return"memberNumber"in e?t(e.memberNumber):undefined}return{fundType:e.type.toString(),fundName:e.name,fundUsi:n(e),memberNumber:r(e),fundStatus:e.valid.toString(),lastNominatedAt:H(e.lastNominatedAt)?e.lastNominatedAt.value.toISOString():""}}}e.prototype.componentDidLoad=function(){var e=this.createSuperFundNominationDetail(this.existingFund);this.eventTrackingService.TrackSuperFundNominationViewedAsync(e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,mn.GetExistingFundAsync()];case 1:e=t.sent();if(H(e)&&e.value.valid!=="Inactive"){this.existingFund=e.value}else{jt.navigateInternally(this.history,Lt.ChoicePage)}return[2]}}))}))};e.prototype.render=function(){var e=this;var t=function(e){return n("div",{class:"flex justify-center mt-6"},n("img",{class:"h-16 w-auto",alt:cn(e.id),src:ln(e.id)}))};var r=function(){return 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"}))))};var i=function(){return 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"}))))};var a=function(){return 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"},function(){switch(e.existingFund.type){case"Promoted Fund":return n(t,{id:e.existingFund.id});case"Self Managed Fund":return n(i,null);case"My Own Fund":return n(r,null);case"Default Fund":return n(a,null)}}(),n("div",{class:"sm:text-lg font-bold leading-6"},this.existingFund.name),n("div",{class:"mt-8"},n("sss-button",{fillWidth:true,promiseFn:function(){return e.handleFundNominationAccepted()}},"Continue with this fund"))),n("div",{class:"mt-4"},n("sss-button",{fillWidth:true,variant:"secondary",promiseFn:function(){return e.handleFundNominationDeclined()}},"Choose another fund")))))};e.prototype.handleFundNominationAccepted=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this.createSuperFundNominationDetail(this.existingFund);return[4,mn.submitRetainSuperFundAsync(e)];case 1:t.sent();It.markSuperSelectionAsSubmitted();jt.navigateInternally(this.history,Lt.Success);return[2]}}))}))};e.prototype.handleFundNominationDeclined=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this.createSuperFundNominationDetail(this.existingFund);return[4,this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(e)];case 1:t.sent();jt.navigateInternally(this.history,Lt.ChoicePage);return[2]}}))}))};return e}());var yn=e("sss_footer_section",function(){function e(e){t(this,e)}e.prototype.render=function(){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-white hover:text-inherit"},"v",z),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."))};return e}());var bn=e("sss_header_section",function(){function e(e){t(this,e)}e.prototype.render=function(){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")))};return e}());var wn=e("sss_loading_indicator",function(){function e(e){t(this,e);this.theme="primary";this.size=48}e.prototype.render=function(){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:this.theme==="primary"?"fill-primary-base":"fill-white"})))};return e}());var xn=e("sss_loading_page",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(o,{class:"flex flex-col justify-center items-center"},n("h5",{class:"text-lg"},"Loading your superannuation step"),n("sss-loading-indicator",null))};return e}());var Sn=e("sss_my_own_fund",function(){function e(e){t(this,e);this.isNotAllInformationProvidedMessageVisible=false;this.isSubmitDisabled=true;this.eventTrackingService=Et.Instance}e.prototype.componentDidLoad=function(){return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:It.promotedFunds})};e.prototype.render=function(){var e=this;return n(o,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:true,onSubmit:function(e){return e.preventDefault()},class:{"was-validated":this.formState==="validated"},ref:function(t){return e.formElement=t},onInput:function(t){return e.isSubmitDisabled=!e.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:a("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:Wt.myOwnFundForm,showValidationErrors:this.formState==="validated",onFormChanged:function(t){Wt.myOwnFundForm=Object.assign(Object.assign({},Wt.myOwnFundForm),t.detail);e.isNotAllInformationProvidedMessageVisible=false}}),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:true,promiseFn:function(){return e.handleSubmitForm()},disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Lt.ChoicePage},n("sss-button",{fillWidth:true,variant:"secondary"},"Back"))))))))};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(n){this.formState="validated";if(!this.formElement.checkValidity()){return[2]}e=H(Wt.myOwnFundForm.fundUsi)&&H(Wt.myOwnFundForm.memberNumber);if(!e){this.isNotAllInformationProvidedMessageVisible=true;return[2]}jt.navigateInternallyToStandardChoice({history:this.history,fundName:this.getOrError(Wt.myOwnFundForm.fundName),handleSubmitFn:function(e){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:t={fundUsi:this.getOrError(Wt.myOwnFundForm.fundUsi),memberNumber:this.getOrError(Wt.myOwnFundForm.memberNumber),standardChoiceFormSignature:e};return[4,$t.submitCustomFundChoiceAsync(t)];case 1:n.sent();return[2]}}))}))}});return[2]}))}))};e.prototype.getOrError=function(e){return pt.pipe(e,Q((function(){throw new Error("Option value is none.")})))};return e}());ee(Sn);var _n=e("sss_my_own_fund_inputs",function(){function e(e){var n=this;t(this,e);this.formChanged=s(this,"formChanged",7);this.MIN_SEARCH_STRING_LENGTH=3;this.MAX_RECORD_COUNT=10;this.searchFundsAsync=function(e){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,Yt.searchFundsAsync(e,this.MAX_RECORD_COUNT)];case 1:t=n.sent();return[2,t.sort((function(e,t){return e.productName.localeCompare(t.productName)})).map((function(e){return{label:e.productName+" ("+e.usi+")",value:e.usi}}))]}}))}))}}e.prototype.render=function(){var e=this;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:true,requiredValidationMessage:"Select a fund",placeholder:"Type to search by name or USI...",value:this.selectedOption,onValueChanged:function(t){e.selectedOption=t.detail;e.updateFund(t.detail)},showValidationErrors:this.showValidationErrors})),H(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":true,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.showValidationErrors},required:true,pattern:"[A-Za-z0-9]{4,16}",name:"memberNumber",id:"memberNumber",value:J(Wt.myOwnFundForm.memberNumber),onChange:function(t){return e.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)"))))};e.prototype.updateFund=function(e){this.formChanged.emit({fundUsi:K(e.value),fundName:K(e.label)})};e.prototype.updateMemberNumber=function(e){this.formChanged.emit({memberNumber:K(e)})};return e}());var In=function(){function e(){}e.prototype.submitChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/promoted-fund").post(e).badRequest((function(){throw new Error("Failed to process Promoted Fund choice request")})).text()]}))}))};return e}();var Cn=new In;var Tn={fundId:""};var En=lt(Tn).state;var An=function(){function e(){var e=this;this.hostIsLocalSuperSelection=function(){return window.location.origin==="http://localhost:7100"};this.environmentDiscriminator=function(){return e.hostIsLocalSuperSelection()?"autodev-partner":window.location.hostname.toLowerCase().split(".")[0]};this.promotedFundJoinAppUrl=function(){return"https://"+e.environmentDiscriminator()+".flarehr.com/promoted-fund-join/embed/v1.0/web"}}e.prototype.build=function(e,t){if(!(e===null||e===void 0?void 0:e.contentDocument))return;var n=Object.assign(Object.assign({},this.getMemberData()),{partnerId:It.partnerIdOrDefault,accountId:It.accountIdOrDefault,fundId:En.fundId,authToken:It.jwt});var r=function(n){var i;var a=n.data;if(!a){return}if(a.sender==="promoted-fund-redirect"){window.removeEventListener("message",r);switch(a.type){case"cancel":jt.navigateInternally(t,Lt.ChoicePage);break;case"success":if(a.memberNumber){jt.navigateInternallyToStandardChoice({history:t,fundName:(i=cn(En.fundId))!==null&&i!==void 0?i:"",handleSubmitFn:function(e){return Cn.submitChoiceAsync(Object.assign(Object.assign({},En),{memberNumber:a.memberNumber,usi:a.usi.replace(/ /g,""),standardChoiceFormSignature:e,shownFunds:It.promotedFunds}))},promotedFundId:En.fundId});break}default:jt.navigateInternally(t,Lt.ChoicePage);break}return}if(a.sender==="promoted-fund-join"){switch(a.type){case"contentResized":e.height=a.height>0?a.height:e.height;e.width=a.width>0?a.width:e.width;break;case"pageNavigated":window.scroll(e.offsetLeft,e.offsetTop);Rt.navigation(window.location.href);break}}};window.addEventListener("message",r);var i=e.contentDocument;i.open();var a=i.createElement("form");a.method="POST";a.target="_self";a.action=this.promotedFundJoinAppUrl();var o;for(o in n){var s=n[o];if(s!==undefined){var u=document.createElement("input");u.type="hidden";u.name=o;u.value=s;a.append(u)}}i.appendChild(a);i.close();a.submit()};e.prototype.getMemberData=function(){var e,t;var n=It.superBuyer;return{title:n.userProfile.title,firstName:n.userProfile.firstName,middleName:n.userProfile.middleName,lastName:n.userProfile.lastName,dateOfBirth:n.userProfile.dateOfBirth,gender:n.userProfile.gender,email:n.userProfile.email,mobilePhone:n.userProfile.mobilePhone,taxFileNumber:(e=n.tfn)!==null&&e!==void 0?e:"",addressLine1:n.userProfile.address.addressLine1,addressLine2:(t=n.userProfile.address.addressLine2)!==null&&t!==void 0?t:"",city:n.userProfile.address.city,state:n.userProfile.address.state,postCode:n.userProfile.address.postcode}};return e}();var kn=new An;var Nn=e("sss_promoted_fund_join_page",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){kn.build(this.iframeElement,this.history)};e.prototype.render=function(){var e=this;return n(o,{class:"w-screen"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:function(t){return e.iframeElement=t}}))};return e}());var Fn=e("sss_self_managed_fund",function(){function e(e){var n=this;t(this,e);this.showSmsfNotSupported=false;this.isSubmitDisabled=true;this.eventTrackingService=Et.Instance;this.success=function(){jt.navigateInternallyToStandardChoice({history:n.history,fundName:"Self-managed super fund",handleSubmitFn:function(e){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:t={smsfChoice:{abn:Wt.selfManagedFundForm.fundAbn,fundName:Wt.selfManagedFundForm.fundName,fundAddress:{addressLine1:Wt.selfManagedFundForm.addressLine1,addressLine2:Wt.selfManagedFundForm.addressLine2,city:Wt.selfManagedFundForm.city,state:Wt.selfManagedFundForm.state,postcode:Wt.selfManagedFundForm.postcode},bsb:Wt.selfManagedFundForm.bsb,bankAccountName:Wt.selfManagedFundForm.bankAccountName,bankAccountNumber:Wt.selfManagedFundForm.bankAccountNumber,electronicServiceAddress:Wt.selfManagedFundForm.fundEsa},standardChoiceFormSignature:e};return[4,$t.submitSelfManagedFundChoiceAsync(t)];case 1:n.sent();return[2]}}))}))}})}}e.prototype.componentDidLoad=function(){return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({promotedFundsShown:It.promotedFunds})};e.prototype.render=function(){var e=this;return n(o,null,n("sss-header-section",{currentPage:"own-fund"}),n("div",{class:"flex justify-center mt-11"},n("sss-custom-fund",null,n("form",{noValidate:true,onSubmit:function(e){return e.preventDefault()},class:{"was-validated":this.formState==="validated"},ref:function(t){return e.formElement=t},onInput:function(t){return e.isSubmitDisabled=!e.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:a("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:Wt.selfManagedFundForm,showValidationErrors:this.formState==="validated",onFormChanged:function(e){Wt.selfManagedFundForm=Object.assign(Object.assign({},Wt.selfManagedFundForm),e.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:true,promiseFn:function(){return e.handleSubmitForm()},disabled:this.isSubmitDisabled},"Continue")),n("stencil-route-link",{url:Lt.ChoicePage},n("sss-button",{fillWidth:true,variant:"secondary"},"Back")))),this.showSmsfNotSupported&&n("sss-smsf-not-supported-dialog",{ref:function(t){return e.notSupportedDialog=t},onContinue:this.success})))))};e.prototype.componentDidRender=function(){var e;this.showSmsfNotSupported&&((e=this.notSupportedDialog)===null||e===void 0?void 0:e.scrollIntoView())};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.formState="validated";if(this.formElement.checkValidity()){if(It.showSmsfNotSupported){this.showSmsfNotSupported=true}else{this.success()}}return[2]}))}))};return e}());ee(Fn);var Pn={"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"};var Dn=e("sss_self_managed_fund_inputs",function(){function e(e){t(this,e);this.formChanged=s(this,"formChanged",7);this.currentBank=G;this.addressErrorMessage=G;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}$/)}e.prototype.render=function(){var e=this;var 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":true,"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:true,minlength:"2",name:"fundName",id:"fundName",value:Wt.selfManagedFundForm.fundName,onChange:function(t){return e.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:true,minlength:"2",name:"fundAbn",id:"fundAbn",value:Wt.selfManagedFundForm.fundAbn,onChange:function(t){return e.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:true,minlength:"2",name:"fundEsa",id:"fundEsa",value:Wt.selfManagedFundForm.fundEsa,onChange:function(t){return e.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":true}),required:true,minlength:"2",name:"addressLine1",id:"addressLine1",value:Wt.selfManagedFundForm.addressLine1,onChange:function(t){e.updateFormField("addressLine1",t.target.value.trim());e.updateAddressErrorMessage()},ref:function(t){return e.addressLine1Element=t}}),n("input",{placeholder:"Address line 2 (optional)",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":true}),name:"addressLine2",id:"addressLine2",value:Wt.selfManagedFundForm.addressLine2,onChange:function(t){return e.updateFormField("addressLine2",t.target.value.trim())}}),n("input",{placeholder:"City/suburb",type:"text",class:Object.assign(Object.assign({},t),{"rounded-none shadow-none":true}),name:"city",required:true,id:"city",value:Wt.selfManagedFundForm.city,onChange:function(t){e.updateFormField("city",t.target.value.trim());e.updateAddressErrorMessage()},ref:function(t){return e.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:true,class:Object.assign(Object.assign({},t),{"rounded-none rounded-bl-md shadow-none":true}),name:"postcode",minlength:"4",maxlength:"4",pattern:"[0-9]{4}",id:"postcode",value:Wt.selfManagedFundForm.postcode,onChange:function(t){e.updateFormField("postcode",t.target.value.trim());e.updateAddressErrorMessage()},ref:function(t){return e.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":true,"text-gray-500":!this.fundForm.state}),name:"state",required:true,id:"state",onChange:function(t){e.updateFormField("state",t.target.value.trim());e.updateAddressErrorMessage()},ref:function(t){return e.stateElement=t}},n("option",{disabled:true,selected:!this.fundForm.state,value:""},"State"),this.stateOptions.map((function(t){return n("option",{value:t.value,selected:e.fundForm.state===t.value},t.label)})))))),H(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:true,class:t,name:"bankAccountName",minlength:"2",id:"bankAccountName",value:Wt.selfManagedFundForm.bankAccountName,onChange:function(t){return e.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:true,class:t,name:"bsb",id:"bsb",minlength:"6",maxlength:"7",onKeyUp:function(t){return e.updateCurrentBank(t)},pattern:this.bsbRegex.source,value:Wt.selfManagedFundForm.bsb}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid BSB"))),H(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:true,class:t,name:"bankAccountNumber",id:"bankAccountNumber",minlength:"2",maxlength:"11",pattern:this.bankAccountNumberRegex.source,value:Wt.selfManagedFundForm.bankAccountNumber,onKeyUp:function(t){return e.updateCurrentBankAccountNumber(t)},onChange:function(t){return e.updateFormField("bankAccountNumber",t.target.value.trim())}}),n("div",{class:"invalid-feedback mt-2 text-sm text-red-600"},"Enter a valid bank account number"))))};e.prototype.updateFormField=function(e,t){var n;this.formChanged.emit((n={},n[e]=t,n))};e.prototype.filterDigits=function(e){return e.replace(/[^0-9]/g,"")};e.prototype.updateCurrentBank=function(e){var t=this.filterDigits(e.target.value);var n=t.substring(0,2);var r=t.substring(0,3);var i=Pn[n];var a=Pn[r];if(i)this.currentBank=K(i);if(a)this.currentBank=K(a);if(t===""||t.length>6)this.currentBank=G;this.updateFormField("bsb",t)};e.prototype.updateCurrentBankAccountNumber=function(e){var t=this.filterDigits(e.target.value);this.updateFormField("bankAccountNumber",t)};e.prototype.updateAddressErrorMessage=function(){var e=G;if(W(e)&&!this.addressLine1Element.checkValidity()){e=K("Enter a valid address line 1")}if(W(e)&&!this.cityElement.checkValidity()){e=K("Enter a valid city/suburb")}if(W(e)&&!this.postcodeElement.checkValidity()){e=K("Enter a valid post code")}if(W(e)&&!this.stateElement.checkValidity()){e=K("Select a state")}this.addressErrorMessage=e};return e}());var Rn=undefined&&undefined.__decorate||function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)if(o=e[s])a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a;return i>3&&a&&Object.defineProperty(t,n,a),a};var On;(function(e){e[e["Unauthorized"]=0]="Unauthorized";e[e["Authenticated"]=1]="Authenticated";e[e["Error"]=2]="Error"})(On||(On={}));var Mn=function(){function e(){}return e}();function Ln(){return{authenticationState:On.Unauthorized,jwt:G,reactNativeInterop:G,iframeInterop:G,appConfiguration:G}}var Un=function(e){__extends(t,e);function t(){return e.call(this,Ln())||this}return t}(I);Un=Rn([_({name:"sss-session",resettable:true})],Un);var Bn=new Un;var jn=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;n.store=t;return n}t.prototype.isReactNativeInteropEnabled=function(){return H(this.getValue().reactNativeInterop)};t.prototype.isIframeInteropEnabled=function(){return H(this.getValue().iframeInterop)};t.prototype.getIframeInteropMode=function(){var e=this.getValue().iframeInterop;if(W(e)){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 e.value};return t}(C);var Vn=new jn(Bn);var qn=function(){function e(){}e.prototype.submitSlateChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,Ct().url("super-choice/slate").post(e).badRequest((function(){throw new Error("Failed to process Slate join request")})).text()]}))}))};return e}();var zn=new qn;var Hn=function(){function e(){var e=this;this.hostIsLocalSuperSelection=function(){return window.location.origin==="http://localhost:7100"};this.hostIsDeployed=function(){return window.location.origin.endsWith("partner.flarehr.com")};this.skipConsolidation=function(){return Vn.isReactNativeInteropEnabled()?"true":"false"};this.skipInsurance=function(){return Vn.isReactNativeInteropEnabled()?"true":"false"};this.environmentDiscriminator=function(){var e=window.location.hostname.toLowerCase().split(".")[0];switch(e){case"autodev-partner":case"test-partner":case"partner":case"sandbox-partner":return e.replace("partner","");default:return"autodev-"}};this.slateJoinAppUrl=function(){return"https://"+e.environmentDiscriminator()+"join.slatesuper.com.au/confirm"}}e.prototype.build=function(e,t){if(!(e===null||e===void 0?void 0:e.contentDocument))return;var n=this.hostIsLocalSuperSelection()||this.hostIsDeployed()?window.location.origin+"/super-selection/embed/v1.0/app":"https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app";var r=n+"/slate-redirect.html";var i=Object.assign(Object.assign({},this.getSlateJoinMemberData()),{successRedirectUrl:r,cancelRedirectUrl:r,skipConsolidation:this.skipConsolidation(),skipInsurance:this.skipInsurance()});if(this.includeJwt()){i.authToken=It.jwt}var a=function(n){var r=n.data,i=n.origin;if(!r){return}if(r.sender==="slate-redirect"){window.removeEventListener("message",a);switch(r.type){case"success":if(r.memberNumber){jt.navigateInternallyToStandardChoice({history:t,fundName:rn.Name,handleSubmitFn:function(e){return zn.submitSlateChoiceAsync({memberNumber:r.memberNumber,standardChoiceFormSignature:e,shownFunds:It.promotedFunds})},promotedFundId:rn.Id});break}default:jt.navigateInternally(t,Lt.ChoicePage);break}return}if(r.sender==="flare"&&i.endsWith("join.slatesuper.com.au")){switch(r.type){case"contentResized":e.height=r.height>0?r.height:e.height;e.width=r.width>0?r.width:e.width;break}}};window.addEventListener("message",a);var o=e.contentDocument;o.open();var s=o.createElement("form");s.method="POST";s.target="_self";s.action=this.slateJoinAppUrl();var u;for(u in i){var c=i[u];if(c!==undefined){var l=document.createElement("input");l.type="hidden";l.name=u;l.value=c;s.append(l)}}o.appendChild(s);o.close();s.submit()};e.prototype.getSlateJoinMemberData=function(){var e,t;var n=It.superBuyer;var r=function(e){switch(e){case"Male":return"Male";case"Female":return"Female";case"Intersex":return"Intersex/Indeterminate";default:return"Unknown"}};return{firstName:n.userProfile.firstName,middleName:n.userProfile.middleName,lastName:n.userProfile.lastName,dateOfBirth:n.userProfile.dateOfBirth,gender:r(n.userProfile.gender),email:n.userProfile.email,mobilePhone:n.userProfile.mobilePhone,taxFileNumber:(e=n.tfn)!==null&&e!==void 0?e:"",addressLine1:n.userProfile.address.addressLine1,addressLine2:(t=n.userProfile.address.addressLine2)!==null&&t!==void 0?t:"",city:n.userProfile.address.city,state:n.userProfile.address.state,postCode:n.userProfile.address.postcode}};e.prototype.includeJwt=function(){return!this.slateJoinAppUrl().match(/autodev|sandbox/)};return e}();var Wn=new Hn;var Gn=e("sss_slate_join_page",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){Wn.build(this.iframeElement,this.history)};e.prototype.render=function(){var e=this;return n(o,{class:"w-screen"},n("iframe",{width:"100%",height:window.innerHeight,style:{border:"none"},ref:function(t){return e.iframeElement=t}}))};return e}());var Kn=e("sss_smsf_not_supported_dialog",function(){function e(e){var n=this;t(this,e);this.continue=s(this,"continue",7);this.standardChoiceFormUrl="/super-selection/embed/v1.0/app/assets/Superannuation_Standard_Choice_Form.pdf";this.handleContinue=function(){n.continue.emit()}}e.prototype.render=function(){return n(o,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:true},"Continue"))))};return e}());var Xn=e("sss_standard_choice_form",function(){function e(e){t(this,e);this.standardChoiceFormSignature="";this.isSubmitDisabled=true}e.prototype.render=function(){var e=this;return n(o,null,n("div",{class:"text-2xl sm:text-3xl font-bold text-center"},"Confirm your super choice"),n("div",{class:"sm:text-lg font-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"},Mt.promotedFundId&&ln(Mt.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:Mt.fundName,src:ln(Mt.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"},Mt.fundName)),n("div",{class:"grid content-center ml-4"},n("stencil-route-link",{url:Lt.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:a("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:true,onSubmit:function(e){return e.preventDefault()},class:{"mt-3":true,"was-validated":this.formState==="validated"},ref:function(t){return e.formElement=t},onInput:function(t){return e.isSubmitDisabled=!e.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":true,"invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500":this.formState==="validated"},required:true,minlength:"2",name:"standardChoiceFormSignature",id:"standardChoiceFormSignature",value:this.standardChoiceFormSignature}),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:true,promiseFn:function(){return e.handleSubmitForm()},disabled:this.isSubmitDisabled},"Confirm and continue")))))))};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.formState="validated";if(!this.formElement.checkValidity())return[3,2];return[4,Mt.handleSubmitFn(this.standardChoiceFormSignature.trim())];case 1:e.sent();It.markSuperSelectionAsSubmitted();jt.navigateInternally(this.history,Lt.Success);e.label=2;case 2:return[2]}}))}))};return e}());var Jn=e("sss_success",function(){function e(e){t(this,e)}e.prototype.render=function(){var e=function(){return 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"}))};return n(o,{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(e,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"},"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:true,onClick:this.handleContinueButtonClick},n("span",null,"Continue")))))};e.prototype.handleContinueButtonClick=function(e){It.completeSuperSelectionFlow()};return e}());var Yn=e("sss_super_choice_item_bottom",function(){function e(e){t(this,e);this.joinFundClicked=s(this,"joinFundClicked",7)}e.prototype.render=function(){var e=this;return n(o,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:true,onClick:function(){return e.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,this.abnInfo,"."),n("p",null,"ABN: ",this.abn))))};e.prototype.handleFundClick=function(){return this.joinFundClicked.emit()};return e}());var Qn=e("sss_super_choice_item_top",function(){function e(e){t(this,e)}e.prototype.render=function(){return n(o,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"},"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:a("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((function(e){return n("div",{class:"flex"},n("div",{class:"h-5 w-5 flex-none mr-1.5"},n("img",{src:a("assets/icon-check.svg")})),n("p",{class:"leading-5"},e.value))}))),this.featureSubText&&n("p",{class:"text-xs text-gray-500 italic mt-4 leading-4"},this.featureSubText)))};return e}());var $n=e("sss_super_choice_page",function(){function e(e){t(this,e);this.promotedFunds=this.getPromotedFunds();this.eventTrackingService=Et.Instance}e.prototype.componentDidLoad=function(){var e=this.promotedFunds.map((function(e){return e.fundId}));this.eventTrackingService.TrackSuperFundPanelViewedAsync({promotedFundsShown:e})};e.prototype.render=function(){var e=this;var t="https://my.gov.au";var r="www.my.gov.au";var i="https://www.apra.gov.au/register-of-superannuation-institutions";var s="www.apra.gov.au";return n(o,null,n("div",null,n("sss-header-section",{currentPage:"choice"}),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":true,"lg:grid-cols-1 max-w-400":this.promotedFunds.length===1,"lg:grid-cols-2 max-w-720":this.promotedFunds.length===2,"lg:grid-cols-3 max-w-960":this.promotedFunds.length===3}},this.promotedFunds.map((function(t,r){return n("div",{class:{"border-r":true,"rounded-tr-lg":r===0,"lg:rounded-tr-none":r===0&&r!==e.promotedFunds.length-1,"rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg":r===e.promotedFunds.length-1}},n("div",{class:{"flex border-b lg:border-b-0":true,"rounded-b-lg":r===e.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:a("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:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.handleJoinSuperClickAsync(t)]}))}))}})))))})),this.promotedFunds.map((function(t,r){return n("div",{class:{"hidden lg:block border-r":true,"rounded-br-lg":r===e.promotedFunds.length-1}},n("sss-super-choice-item-bottom",{disclaimer:t.disclaimer,abnInfo:t.abnInfo,abn:t.abn,onJoinFundClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){return[2,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:jt.toExternalUrl(t)},r)),n("li",null,"A full list of super funds can be viewed at"," ",n("a",{class:"text-primary-base font-medium",target:"_blank",href:jt.toExternalUrl(i)},s))),n("stencil-route-link",{url:Lt.MyOwnFund},n("sss-button",{fillWidthOnMobile:true},"Choose another super fund"))))))};e.prototype.allFunds=function(){var e=this;return[{fundId:rn.Id,name:rn.Name,logo:"logo-slate.png",route:Lt.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("a",{class:"font-medium underline",target:"_blank",href:jt.toExternalUrl(rn.PdsUrl),onClick:function(){return e.pdsViewedAsync(rn.Name,rn.Usi)}},"Product Disclosure Statement")," ","and"," ",n("a",{class:"font-medium underline",target:"_blank",href:jt.toExternalUrl("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:rn.DiversaAbn},{fundId:an.Id,name:an.Name,logo:"logo-art.svg",route:Lt.PromotedFundJoin,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("a",{class:"font-medium underline",target:"_blank",href:jt.toExternalUrl(an.PdsUrl),onClick:function(){return e.pdsViewedAsync(an.Name)}},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Australian Retirement Trust",abn:an.Abn},{fundId:on.Id,name:on.Name,logo:"logo-aware.svg",route:Lt.PromotedFundJoin,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("a",{class:"font-medium underline",target:"_blank",href:jt.toExternalUrl(on.PdsUrl),onClick:function(){return e.pdsViewedAsync(on.Name)}},"Product Disclosure Statement")," ","before deciding to invest in or apply to become a member of this fund."),abnInfo:"Aware Super Pty Ltd",abn:on.Abn},{fundId:sn.Id,name:sn.Name,logo:"logo-active.svg",route:Lt.PromotedFundJoin,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 does not indicate future performance. As at 22/4/22, Active Super ranked in Canstar’s top 5 funds for 18-49 year-olds with balances up to $250K based on returns over 5 years in 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("a",{class:"font-medium underline",target:"_blank",onClick:function(){return e.pdsViewedAsync(sn.Name)},href:jt.toExternalUrl(sn.PdsUrl)},"activesuper.com.au")," ","before making a decision.")}]};e.prototype.getPromotedFunds=function(){var e=this;var t=[];It.promotedFunds.forEach((function(n){var r=e.allFunds().find((function(e){return n===e.fundId}));if(r!==undefined){t.push(r)}}));return t};e.prototype.handleJoinSuperClickAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:t=It.promotedFunds;if(!(e.fundId===rn.Id))return[3,2];return[4,this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundUsi:rn.Usi,fundName:rn.Name,promotedFundId:rn.Id,promotedFundsShown:t})];case 1:n.sent();return[3,8];case 2:if(!(e.fundId===an.Id))return[3,4];return[4,this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundName:an.Name,promotedFundId:an.Id,promotedFundsShown:t})];case 3:n.sent();En.fundId=e.fundId;return[3,8];case 4:if(!(e.fundId===on.Id))return[3,6];return[4,this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundName:on.Name,promotedFundId:on.Id,promotedFundsShown:t})];case 5:n.sent();En.fundId=e.fundId;return[3,8];case 6:if(!(e.fundId===sn.Id))return[3,8];return[4,this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({fundName:sn.Name,promotedFundId:sn.Id,promotedFundsShown:t})];case 7:n.sent();En.fundId=e.fundId;n.label=8;case 8:return[2,jt.navigateInternally(this.history,e.route)]}}))}))};e.prototype.pdsViewedAsync=function(e,t){return this.eventTrackingService.TrackSuperFundPdsViewedAsync({fundUsi:t,fundName:e,pageName:"Panel Fund Page"})};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}());var Zn="stencil-route.inactive{display:none}";var er=e("stencil_route",function(){function e(e){t(this,e);this.group=null;this.match=null;this.componentProps={};this.exact=false;this.scrollOnNextRender=false;this.previousMatch=null}e.prototype.computeMatch=function(e){var t=this.group!=null||this.el.parentElement!=null&&this.el.parentElement.tagName.toLowerCase()==="stencil-route-switch";if(!e||t){return}this.previousMatch=this.match;return this.match=Pe(e.pathname,{path:this.url,exact:this.exact,strict:true})};e.prototype.loadCompleted=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e={};if(this.history&&this.history.location.hash){e={scrollToId:this.history.location.hash.substr(1)}}else if(this.scrollTopOffset){e={scrollTopOffset:this.scrollTopOffset}}if(typeof this.componentUpdated==="function"){this.componentUpdated(e)}else if(this.match&&!De(this.match,this.previousMatch)&&this.routeViewsUpdated){this.routeViewsUpdated(e)}return[2]}))}))};e.prototype.componentDidUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.loadCompleted()];case 1:e.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.loadCompleted()];case 1:e.sent();return[2]}}))}))};e.prototype.render=function(){if(!this.match||!this.history){return null}var e=Object.assign({},this.componentProps,{history:this.history,match:this.match});if(this.routeRender){return this.routeRender(Object.assign({},e,{component:this.component}))}if(this.component){var t=this.component;return n(t,Object.assign({},e))}};Object.defineProperty(e.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{location:["computeMatch"]}},enumerable:false,configurable:true});return e}());T.injectProps(er,["location","history","historyType","routeViewsUpdated"]);er.style=Zn;var tr=function(e,t,n){return n(e.confirm(t))};var nr=function(e){return e.metaKey||e.altKey||e.ctrlKey||e.shiftKey};var rr=function(e){var t=e.navigator.userAgent;if((t.indexOf("Android 2.")!==-1||t.indexOf("Android 4.0")!==-1)&&t.indexOf("Mobile Safari")!==-1&&t.indexOf("Chrome")===-1&&t.indexOf("Windows Phone")===-1){return false}return e.history&&"pushState"in e.history};var ir=function(e){return e.userAgent.indexOf("Trident")===-1};var ar=function(e){return e.userAgent.indexOf("Firefox")===-1};var or=function(e,t){return t.state===undefined&&e.userAgent.indexOf("CriOS")===-1};var sr=function(e,t){var n=e[t];var r="__storage_test__";try{n.setItem(r,r);n.removeItem(r);return true}catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&n.length!==0}};var ur=function(e,t){if(e.charAt(0)=="/"&&t.charAt(t.length-1)=="/"){return t.slice(0,t.length-1)+e}return t+e};var cr=e("stencil_route_link",function(){function e(e){t(this,e);this.unsubscribe=function(){return};this.activeClass="link-active";this.exact=false;this.strict=true;this.custom="a";this.match=null}e.prototype.componentWillLoad=function(){this.computeMatch()};e.prototype.computeMatch=function(){if(this.location){this.match=Pe(this.location.pathname,{path:this.urlMatch||this.url,exact:this.exact,strict:this.strict})}};e.prototype.handleClick=function(e){if(nr(e)||!this.history||!this.url||!this.root){return}e.preventDefault();return this.history.push(ur(this.url,this.root))};e.prototype.render=function(){var e;var t={class:(e={},e[this.activeClass]=this.match!==null,e),onClick:this.handleClick.bind(this)};if(this.anchorClass){t.class[this.anchorClass]=true}if(this.custom==="a"){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})}return n(this.custom,Object.assign({},t),n("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{location:["computeMatch"]}},enumerable:false,configurable:true});return e}());T.injectProps(cr,["history","location","root"]);var lr=function(){return((Math.random()*1e17).toString().match(/.{4}/g)||[]).join("-")};var fr=function(e,t,n){return Pe(e,{path:t,exact:n,strict:true})};var dr=function(e){return e.tagName==="STENCIL-ROUTE"};var pr=e("stencil_route_switch",function(){function e(e){t(this,e);this.group=lr();this.subscribers=[];this.queue=c(this,"queue")}e.prototype.componentWillLoad=function(){if(this.location!=null){this.regenerateSubscribers(this.location)}};e.prototype.regenerateSubscribers=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n;var r=this;return __generator(this,(function(i){if(e==null){return[2]}t=-1;this.subscribers=Array.prototype.slice.call(this.el.children).filter(dr).map((function(n,r){var i=fr(e.pathname,n.url,n.exact);if(i&&t===-1){t=r}return{el:n,match:i}}));if(t===-1){return[2]}if(this.activeIndex===t){this.subscribers[t].el.match=this.subscribers[t].match;return[2]}this.activeIndex=t;n=this.subscribers[this.activeIndex];if(this.scrollTopOffset){n.el.scrollTopOffset=this.scrollTopOffset}n.el.group=this.group;n.el.match=n.match;n.el.componentUpdated=function(e){r.queue.write((function(){r.subscribers.forEach((function(e,t){e.el.componentUpdated=undefined;if(t===r.activeIndex){return e.el.style.display=""}if(r.scrollTopOffset){e.el.scrollTopOffset=r.scrollTopOffset}e.el.group=r.group;e.el.match=null;e.el.style.display="none"}))}));if(r.routeViewsUpdated){r.routeViewsUpdated(Object.assign({scrollTopOffset:r.scrollTopOffset},e))}};return[2]}))}))};e.prototype.render=function(){return n("slot",null)};Object.defineProperty(e.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{location:["regenerateSubscribers"]}},enumerable:false,configurable:true});return e}());T.injectProps(pr,["location","routeViewsUpdated"]);var hr=function(e){var t=[];for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}if(!e){console.warn.apply(console,t)}};var vr=function(){var e;var t=[];var n=function(t){hr(e==null,"A history supports only one prompt at a time");e=t;return function(){if(e===t){e=null}}};var r=function(t,n,r,i){if(e!=null){var a=typeof e==="function"?e(t,n):e;if(typeof a==="string"){if(typeof r==="function"){r(a,i)}else{hr(false,"A history needs a getUserConfirmation function in order to use a prompt message");i(true)}}else{i(a!==false)}}else{i(true)}};var i=function(e){var n=true;var r=function(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}if(n){e.apply(void 0,t)}};t.push(r);return function(){n=false;t=t.filter((function(e){return e!==r}))}};var a=function(){var e=[];for(var n=0;n<arguments.length;n++){e[n]=arguments[n]}t.forEach((function(t){return t.apply(void 0,e)}))};return{setPrompt:n,confirmTransitionTo:r,appendListener:i,notifyListeners:a}};var mr=function(e,t){if(t===void 0){t="scrollPositions"}var n=new Map;var r=function(t,r){n.set(t,r);if(sr(e,"sessionStorage")){var i=[];n.forEach((function(e,t){i.push([t,e])}));e.sessionStorage.setItem("scrollPositions",JSON.stringify(i))}};var i=function(e){return n.get(e)};var a=function(e){return n.has(e)};var o=function(t){r(t,[e.scrollX,e.scrollY])};if(sr(e,"sessionStorage")){var s=e.sessionStorage.getItem(t);n=s?new Map(JSON.parse(s)):n}if("scrollRestoration"in e.history){history.scrollRestoration="manual"}return{set:r,get:i,has:a,capture:o}};var gr="popstate";var yr="hashchange";var br=function(e,t){if(t===void 0){t={}}var n=false;var r=e.history;var i=e.location;var a=e.navigator;var o=rr(e);var s=!ir(a);var u=mr(e);var c=t.forceRefresh!=null?t.forceRefresh:false;var l=t.getUserConfirmation!=null?t.getUserConfirmation:tr;var f=t.keyLength!=null?t.keyLength:6;var d=t.basename?ve(me(t.basename)):"";var p=function(){try{return e.history.state||{}}catch(e){return{}}};var h=function(e){e=e||{};var t=e.key,n=e.state;var r=i.pathname,a=i.search,o=i.hash;var s=r+a+o;hr(!d||pe(s,d),"You are attempting to use a basename on a page whose URL path does not begin "+'with the basename. Expected path "'+s+'" to begin with "'+d+'".');if(d){s=he(s,d)}return Ee(s,n,t||Se(f))};var v=vr();var m=function(e){u.capture(R.location.key);Object.assign(R,e);R.location.scrollPosition=u.get(R.location.key);R.length=r.length;v.notifyListeners(R.location,R.action)};var g=function(e){if(!or(a,e)){b(h(e.state))}};var y=function(){b(h(p()))};var b=function(e){if(n){n=false;m()}else{var t="POP";v.confirmTransitionTo(e,t,l,(function(n){if(n){m({action:t,location:e})}else{w(e)}}))}};var w=function(e){var t=R.location;var r=S.indexOf(t.key);var i=S.indexOf(e.key);if(r===-1){r=0}if(i===-1){i=0}var a=r-i;if(a){n=true;A(a)}};var x=h(p());var S=[x.key];var _=0;var I=false;var C=function(e){return d+be(e)};var T=function(e,t){hr(!(typeof e==="object"&&e.state!==undefined&&t!==undefined),"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");var n="PUSH";var a=Ee(e,t,Se(f),R.location);v.confirmTransitionTo(a,n,l,(function(e){if(!e){return}var t=C(a);var s=a.key,u=a.state;if(o){r.pushState({key:s,state:u},"",t);if(c){i.href=t}else{var l=S.indexOf(R.location.key);var f=S.slice(0,l===-1?0:l+1);f.push(a.key);S=f;m({action:n,location:a})}}else{hr(u===undefined,"Browser history cannot push state in browsers that do not support HTML5 history");i.href=t}}))};var E=function(e,t){hr(!(typeof e==="object"&&e.state!==undefined&&t!==undefined),"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");var n="REPLACE";var a=Ee(e,t,Se(f),R.location);v.confirmTransitionTo(a,n,l,(function(e){if(!e){return}var t=C(a);var s=a.key,u=a.state;if(o){r.replaceState({key:s,state:u},"",t);if(c){i.replace(t)}else{var l=S.indexOf(R.location.key);if(l!==-1){S[l]=a.key}m({action:n,location:a})}}else{hr(u===undefined,"Browser history cannot replace state in browsers that do not support HTML5 history");i.replace(t)}}))};var A=function(e){r.go(e)};var k=function(){return A(-1)};var N=function(){return A(1)};var F=function(t){_+=t;if(_===1){e.addEventListener(gr,g);if(s){e.addEventListener(yr,y)}}else if(_===0){e.removeEventListener(gr,g);if(s){e.removeEventListener(yr,y)}}};var P=function(e){if(e===void 0){e=""}var t=v.setPrompt(e);if(!I){F(1);I=true}return function(){if(I){I=false;F(-1)}return t()}};var D=function(e){var t=v.appendListener(e);F(1);return function(){F(-1);t()}};var R={length:r.length,action:"POP",location:x,createHref:C,push:T,replace:E,go:A,goBack:k,goForward:N,block:P,listen:D,win:e};return R};var wr="hashchange";var xr={hashbang:{encodePath:function(e){return e.charAt(0)==="!"?e:"!/"+ge(e)},decodePath:function(e){return e.charAt(0)==="!"?e.substr(1):e}},noslash:{encodePath:ge,decodePath:me},slash:{encodePath:me,decodePath:me}};var Sr=function(e,t){if(t===void 0){t={}}var n=false;var r=null;var i=0;var a=false;var o=e.location;var s=e.history;var u=ar(e.navigator);var c=t.keyLength!=null?t.keyLength:6;var l=t.getUserConfirmation,f=l===void 0?tr:l,d=t.hashType,p=d===void 0?"slash":d;var h=t.basename?ve(me(t.basename)):"";var v=xr[p],m=v.encodePath,g=v.decodePath;var y=function(){var e=o.href;var t=e.indexOf("#");return t===-1?"":e.substring(t+1)};var b=function(e){return o.hash=e};var w=function(e){var t=o.href.indexOf("#");o.replace(o.href.slice(0,t>=0?t:0)+"#"+e)};var x=function(){var e=g(y());hr(!h||pe(e,h),"You are attempting to use a basename on a page whose URL path does not begin "+'with the basename. Expected path "'+e+'" to begin with "'+h+'".');if(h){e=he(e,h)}return Ee(e,undefined,Se(c))};var S=vr();var _=function(e){Object.assign(j,e);j.length=s.length;S.notifyListeners(j.location,j.action)};var I=function(){var e=y();var t=m(e);if(e!==t){w(t)}else{var i=x();var a=j.location;if(!n&&Te(a,i)){return}if(r===be(i)){return}r=null;C(i)}};var C=function(e){if(n){n=false;_()}else{var t="POP";S.confirmTransitionTo(e,t,f,(function(n){if(n){_({action:t,location:e})}else{T(e)}}))}};var T=function(e){var t=j.location;var r=N.lastIndexOf(be(t));var i=N.lastIndexOf(be(e));if(r===-1){r=0}if(i===-1){i=0}var a=r-i;if(a){n=true;R(a)}};var E=y();var A=m(E);if(E!==A){w(A)}var k=x();var N=[be(k)];var F=function(e){return"#"+m(h+be(e))};var P=function(e,t){hr(t===undefined,"Hash history cannot push state; it is ignored");var n="PUSH";var i=Ee(e,undefined,Se(c),j.location);S.confirmTransitionTo(i,n,f,(function(e){if(!e){return}var t=be(i);var a=m(h+t);var o=y()!==a;if(o){r=t;b(a);var s=N.lastIndexOf(be(j.location));var u=N.slice(0,s===-1?0:s+1);u.push(t);N=u;_({action:n,location:i})}else{hr(false,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack");_()}}))};var D=function(e,t){hr(t===undefined,"Hash history cannot replace state; it is ignored");var n="REPLACE";var i=Ee(e,undefined,Se(c),j.location);S.confirmTransitionTo(i,n,f,(function(e){if(!e){return}var t=be(i);var a=m(h+t);var o=y()!==a;if(o){r=t;w(a)}var s=N.indexOf(be(j.location));if(s!==-1){N[s]=t}_({action:n,location:i})}))};var R=function(e){hr(u,"Hash history go(n) causes a full page reload in this browser");s.go(e)};var O=function(){return R(-1)};var M=function(){return R(1)};var L=function(e,t){i+=t;if(i===1){e.addEventListener(wr,I)}else if(i===0){e.removeEventListener(wr,I)}};var U=function(t){if(t===void 0){t=""}var n=S.setPrompt(t);if(!a){L(e,1);a=true}return function(){if(a){a=false;L(e,-1)}return n()}};var B=function(t){var n=S.appendListener(t);L(e,1);return function(){L(e,-1);n()}};var j={length:s.length,action:"POP",location:k,createHref:F,push:P,replace:D,go:R,goBack:O,goForward:M,block:U,listen:B,win:e};return j};var _r=function(e,t){var n=e.pathname.indexOf(t)==0?"/"+e.pathname.slice(t.length):e.pathname;return Object.assign({},e,{pathname:n})};var Ir={browser:br,hash:Sr};var Cr=e("stencil_router",function(){function e(e){var n=this;t(this,e);this.root="/";this.historyType="browser";this.titleSuffix="";this.routeViewsUpdated=function(e){if(e===void 0){e={}}if(n.history&&e.scrollToId&&n.historyType==="browser"){var t=n.history.win.document.getElementById(e.scrollToId);if(t){return t.scrollIntoView()}}n.scrollTo(e.scrollTopOffset||n.scrollTopOffset)};this.isServer=c(this,"isServer");this.queue=c(this,"queue")}e.prototype.componentWillLoad=function(){var e=this;this.history=Ir[this.historyType](this.el.ownerDocument.defaultView);this.history.listen((function(t){t=_r(t,e.root);e.location=t}));this.location=_r(this.history.location,this.root)};e.prototype.scrollTo=function(e){var t=this.history;if(e==null||this.isServer||!t){return}if(t.action==="POP"&&Array.isArray(t.location.scrollPosition)){return this.queue.write((function(){if(t&&t.location&&Array.isArray(t.location.scrollPosition)){t.win.scrollTo(t.location.scrollPosition[0],t.location.scrollPosition[1])}}))}return this.queue.write((function(){t.win.scrollTo(0,e)}))};e.prototype.render=function(){if(!this.location||!this.history){return}var e={historyType:this.historyType,location:this.location,titleSuffix:this.titleSuffix,root:this.root,history:this.history,routeViewsUpdated:this.routeViewsUpdated};return n(T.Provider,{state:e},n("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return e}());var Tr="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 Er=e("super_selection_app",function(){function e(e){t(this,e);this.stepSubmitSuccess=s(this,"step-completion",7);this.successPageAcknowledged=s(this,"successPageAcknowledged",5);this.initialised=s(this,"initialised",7);this.isAppInitialised=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;var r=this;return __generator(this,(function(i){e=ht.fromNullable(this.accessToken);if(ht.isNone(e)){throw Error("jwt property is missing.")}It.state.jwt=e;t=ht.fromNullable(this.backendUrl);if(ht.isNone(t)){throw Error("apiBaseUrl property is missing.")}It.state.apiBaseUrl=ht.some(t.value.replace(/\/$/,"")+"/");n=ht.fromNullable(this.appBaseUrl);if(ht.isNone(n)){throw Error("appBaseUrl property is missing.")}It.state.appBaseUrl=ht.some(n.value.replace(/\/$/,""));It.onChange("hasSuccessPageBeenAcknowledged",(function(e){return r.successPageAcknowledged.emit()}));It.onChange("hasSuperSelectionBeenSubmitted",(function(e){if(!e)return;r.stepSubmitSuccess.emit();It.state.hasSuperSelectionBeenSubmitted=false}));return[2]}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,It.loadAppStateAsync()];case 1:t.sent();return[4,mn.GetExistingFundAsync()];case 2:e=t.sent();this.isAppInitialised=true;this.initialised.emit({accountIdOrDefault:It.accountIdOrDefault,partnerIdOrDefault:It.partnerIdOrDefault,profileId:It.profileId});Rt.appReady();if(ht.isSome(e)&&e.value.valid!=="Inactive"){jt.navigateInternally(this.history,Lt.ExistingChoicePage)}else{jt.navigateInternally(this.history,Lt.ChoicePage)}return[2]}}))}))};e.prototype.authTokenChanged=function(e){It.state.jwt=ht.fromNullable(e)};e.prototype.onRouteChange=function(){window===null||window===void 0?void 0:window.scroll(0,0)};e.prototype.render=function(){return n(o,null,n("link",{rel:"stylesheet",href:a("apollo-super-selection.css"),media:"all"}),this.renderAppContent())};e.prototype.routerBaseUrl=function(){var e;return((e=this.appBaseUrl)===null||e===void 0?void 0:e.replace(/\/$/,""))+"/"};e.prototype.renderAppContent=function(){return n("stencil-router",{root:this.routerBaseUrl(),class:"font-inter"},n("stencil-route-switch",{scrollTopOffset:0},this.isAppInitialised?n("div",{class:{"pt-28":true,"pb-6 -mt-12":!this.isFundJoinPage(),"-mt-28":this.isFundJoinPage()}},Ut,n("sss-footer-section",null)):n("div",{class:"flex justify-center py-20"},n("sss-loading-indicator",null))))};e.prototype.isFundJoinPage=function(){return window.location.pathname.includes(Lt.SlateJoin)||window.location.pathname.includes(Lt.PromotedFundJoin)};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{accessToken:["authTokenChanged"],location:["onRouteChange"]}},enumerable:false,configurable:true});return e}());ee(Er);Er.style=Tr;var Ar=[];var kr=function(){return Ar.some((function(e){return e.activeTargets.length>0}))};var Nr=function(){return Ar.some((function(e){return e.skippedTargets.length>0}))};var Fr="ResizeObserver loop completed with undelivered notifications.";var Pr=function(){var e;if(typeof ErrorEvent==="function"){e=new ErrorEvent("error",{message:Fr})}else{e=document.createEvent("Event");e.initEvent("error",false,false);e.message=Fr}window.dispatchEvent(e)};var Dr;(function(e){e["BORDER_BOX"]="border-box";e["CONTENT_BOX"]="content-box";e["DEVICE_PIXEL_CONTENT_BOX"]="device-pixel-content-box"})(Dr||(Dr={}));var Rr=function(e){return Object.freeze(e)};var Or=function(){function e(e,t){this.inlineSize=e;this.blockSize=t;Rr(this)}return e}();var Mr=function(){function e(e,t,n,r){this.x=e;this.y=t;this.width=n;this.height=r;this.top=this.y;this.left=this.x;this.bottom=this.top+this.height;this.right=this.left+this.width;return Rr(this)}e.prototype.toJSON=function(){var e=this,t=e.x,n=e.y,r=e.top,i=e.right,a=e.bottom,o=e.left,s=e.width,u=e.height;return{x:t,y:n,top:r,right:i,bottom:a,left:o,width:s,height:u}};e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)};return e}();var Lr=function(e){return e instanceof SVGElement&&"getBBox"in e};var Ur=function(e){if(Lr(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)};var Br=function(e){var t,n;var r=(n=(t=e)===null||t===void 0?void 0:t.ownerDocument)===null||n===void 0?void 0:n.defaultView;return!!(r&&e instanceof r.Element)};var jr=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image"){break}case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return true}return false};var Vr=typeof window!=="undefined"?window:{};var qr=new WeakMap;var zr=/auto|scroll/;var Hr=/^tb|vertical/;var Wr=/msie|trident/i.test(Vr.navigator&&Vr.navigator.userAgent);var Gr=function(e){return parseFloat(e||"0")};var Kr=function(e,t,n){if(e===void 0){e=0}if(t===void 0){t=0}if(n===void 0){n=false}return new Or((n?t:e)||0,(n?e:t)||0)};var Xr=Rr({devicePixelContentBoxSize:Kr(),borderBoxSize:Kr(),contentBoxSize:Kr(),contentRect:new Mr(0,0,0,0)});var Jr=function(e,t){if(t===void 0){t=false}if(qr.has(e)&&!t){return qr.get(e)}if(Ur(e)){qr.set(e,Xr);return Xr}var n=getComputedStyle(e);var r=Lr(e)&&e.ownerSVGElement&&e.getBBox();var i=!Wr&&n.boxSizing==="border-box";var a=Hr.test(n.writingMode||"");var o=!r&&zr.test(n.overflowY||"");var s=!r&&zr.test(n.overflowX||"");var u=r?0:Gr(n.paddingTop);var c=r?0:Gr(n.paddingRight);var l=r?0:Gr(n.paddingBottom);var f=r?0:Gr(n.paddingLeft);var d=r?0:Gr(n.borderTopWidth);var p=r?0:Gr(n.borderRightWidth);var h=r?0:Gr(n.borderBottomWidth);var v=r?0:Gr(n.borderLeftWidth);var m=f+c;var g=u+l;var y=v+p;var b=d+h;var w=!s?0:e.offsetHeight-b-e.clientHeight;var x=!o?0:e.offsetWidth-y-e.clientWidth;var S=i?m+y:0;var _=i?g+b:0;var I=r?r.width:Gr(n.width)-S-x;var C=r?r.height:Gr(n.height)-_-w;var T=I+m+x+y;var E=C+g+w+b;var A=Rr({devicePixelContentBoxSize:Kr(Math.round(I*devicePixelRatio),Math.round(C*devicePixelRatio),a),borderBoxSize:Kr(T,E,a),contentBoxSize:Kr(I,C,a),contentRect:new Mr(f,u,I,C)});qr.set(e,A);return A};var Yr=function(e,t,n){var r=Jr(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case Dr.DEVICE_PIXEL_CONTENT_BOX:return o;case Dr.BORDER_BOX:return i;default:return a}};var Qr=function(){function e(e){var t=Jr(e);this.target=e;this.contentRect=t.contentRect;this.borderBoxSize=Rr([t.borderBoxSize]);this.contentBoxSize=Rr([t.contentBoxSize]);this.devicePixelContentBoxSize=Rr([t.devicePixelContentBoxSize])}return e}();var $r=function(e){if(Ur(e)){return Infinity}var t=0;var n=e.parentNode;while(n){t+=1;n=n.parentNode}return t};var Zr=function(){var e=Infinity;var t=[];Ar.forEach((function n(r){if(r.activeTargets.length===0){return}var i=[];r.activeTargets.forEach((function t(n){var r=new Qr(n.target);var a=$r(n.target);i.push(r);n.lastReportedSize=Yr(n.target,n.observedBox);if(a<e){e=a}}));t.push((function e(){r.callback.call(r.observer,i,r.observer)}));r.activeTargets.splice(0,r.activeTargets.length)}));for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e};var ei=function(e){Ar.forEach((function t(n){n.activeTargets.splice(0,n.activeTargets.length);n.skippedTargets.splice(0,n.skippedTargets.length);n.observationTargets.forEach((function t(r){if(r.isActive()){if($r(r.target)>e){n.activeTargets.push(r)}else{n.skippedTargets.push(r)}}}))}))};var ti=function(){var e=0;ei(e);while(kr()){e=Zr();ei(e)}if(Nr()){Pr()}return e>0};var ni;var ri=[];var ii=function(){return ri.splice(0).forEach((function(e){return e()}))};var ai=function(e){if(!ni){var t=0;var n=document.createTextNode("");var r={characterData:true};new MutationObserver((function(){return ii()})).observe(n,r);ni=function(){n.textContent=""+(t?t--:t++)}}ri.push(e);ni()};var oi=function(e){ai((function t(){requestAnimationFrame(e)}))};var si=0;var ui=function(){return!!si};var ci=250;var li={attributes:true,characterData:true,childList:true,subtree:true};var fi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"];var di=function(e){if(e===void 0){e=0}return Date.now()+e};var pi=false;var hi=function(){function e(){var e=this;this.stopped=true;this.listener=function(){return e.schedule()}}e.prototype.run=function(e){var t=this;if(e===void 0){e=ci}if(pi){return}pi=true;var n=di(e);oi((function(){var r=false;try{r=ti()}finally{pi=false;e=n-di();if(!ui()){return}if(r){t.run(1e3)}else if(e>0){t.run(e)}else{t.start()}}}))};e.prototype.schedule=function(){this.stop();this.run()};e.prototype.observe=function(){var e=this;var t=function(){return e.observer&&e.observer.observe(document.body,li)};document.body?t():Vr.addEventListener("DOMContentLoaded",t)};e.prototype.start=function(){var e=this;if(this.stopped){this.stopped=false;this.observer=new MutationObserver(this.listener);this.observe();fi.forEach((function(t){return Vr.addEventListener(t,e.listener,true)}))}};e.prototype.stop=function(){var e=this;if(!this.stopped){this.observer&&this.observer.disconnect();fi.forEach((function(t){return Vr.removeEventListener(t,e.listener,true)}));this.stopped=true}};return e}();var vi=new hi;var mi=function(e){!si&&e>0&&vi.start();si+=e;!si&&vi.stop()};var gi=function(e){return!Lr(e)&&!jr(e)&&getComputedStyle(e).display==="inline"};var yi=function(){function e(e,t){this.target=e;this.observedBox=t||Dr.CONTENT_BOX;this.lastReportedSize={inlineSize:0,blockSize:0}}e.prototype.isActive=function(){var e=Yr(this.target,this.observedBox,true);if(gi(this.target)){this.lastReportedSize=e}if(this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize){return true}return false};return e}();var bi=function(){function e(e,t){this.activeTargets=[];this.skippedTargets=[];this.observationTargets=[];this.observer=e;this.callback=t}return e}();var wi=new WeakMap;var xi=function(e,t){for(var n=0;n<e.length;n+=1){if(e[n].target===t){return n}}return-1};var Si=function(){function e(){}e.connect=function(e,t){var n=new bi(e,t);wi.set(e,n)};e.observe=function(e,t,n){var r=wi.get(e);var i=r.observationTargets.length===0;if(xi(r.observationTargets,t)<0){i&&Ar.push(r);r.observationTargets.push(new yi(t,n&&n.box));mi(1);vi.schedule()}};e.unobserve=function(e,t){var n=wi.get(e);var r=xi(n.observationTargets,t);var i=n.observationTargets.length===1;if(r>=0){i&&Ar.splice(Ar.indexOf(n),1);n.observationTargets.splice(r,1);mi(-1)}};e.disconnect=function(e){var t=this;var n=wi.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)}));n.activeTargets.splice(0,n.activeTargets.length)};return e}();var _i=function(){function e(e){if(arguments.length===0){throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.")}if(typeof e!=="function"){throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.")}Si.connect(this,e)}e.prototype.observe=function(e,t){if(arguments.length===0){throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.")}if(!Br(e)){throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element")}Si.observe(this,e,t)};e.prototype.unobserve=function(e){if(arguments.length===0){throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.")}if(!Br(e)){throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element")}Si.unobserve(this,e)};e.prototype.disconnect=function(){Si.disconnect(this)};e.toString=function(){return"function ResizeObserver () { [polyfill code] }"};return e}();var Ii=function(){function e(){var e=this;this._appRootUrl=new $((function(){return e.resolveRootUrl()}));this.getAppRootUrl=function(){return e._appRootUrl.value};this.getAppHostUrl=function(){return(""+window.location.origin+e.getAppRootUrl()).replace(/\/$/,"")}}e.prototype.loadConfigurationAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,nt(this.getAppRootUrl()+"config.json").get().json()];case 1:e=t.sent();Bn.update({appConfiguration:ht.fromNullable(e)});return[2]}}))}))};e.prototype.resolveRootUrl=function(){var e=ht.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));if(ht.isNone(e)){throw Error("Unsupported host URL")}return e.value[0]+"/"};return e}();var Ci=new Ii;var Ti="function";var Ei="object";var Ai="undefined";var ki="prototype";var Ni="hasOwnProperty";function Fi(){if(typeof globalThis!==Ai&&globalThis){return globalThis}if(typeof self!==Ai&&self){return self}if(typeof window!==Ai&&window){return window}if(typeof global!==Ai&&global){return global}return null}function Pi(e){var t=Object["create"];if(t){return t(e)}if(e==null){return{}}var n=typeof e;if(n!==Ei&&n!==Ti){throw new TypeError("Object prototype may only be an Object:"+e)}function r(){}r[ki]=e;return new r}function Di(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t){if(Object[ki][Ni].call(t,i)){e[i]=t[i]}}}return e}var Ri=function(e,t){Ri=Object["setPrototypeOf"]||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t){if(t[Ni](n)){e[n]=t[n]}}};return Ri(e,t)};function Oi(e,t){Ri(e,t);function n(){this.constructor=e}e[ki]=t===null?Pi(t):(n[ki]=t[ki],new n)}var Mi=Fi()||{};(function(e,t,n){if(!e.__assign){e.__assign=Object.assign||t}if(!e.__extends){e.__extends=n}})(Mi,Di,Oi);if(!__assign){__assign=Mi.__assign}if(!__extends){__extends=Mi.__extends}var Li={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5};var Ui=Ai;var Bi=Ei;var ji=ki;var Vi=Ti;var qi="window";var zi="document";var Hi="navigator";var Wi="history";var Gi="location";var Ki="console";var Xi="performance";var Ji="JSON";var Yi="crypto";var Qi="msCrypto";var $i="ReactNative";var Zi=Fi;function ea(e){var t=Zi();if(t&&t[e]){return t[e]}if(e===qi&&ta()){return window}return null}function ta(){return Boolean(typeof window===Bi&&window)}function na(){if(ta()){return window}return ea(qi)}function ra(){return Boolean(typeof document===Bi&&document)}function ia(){if(ra()){return document}return ea(zi)}function aa(){return Boolean(typeof navigator===Bi&&navigator)}function oa(){if(aa()){return navigator}return ea(Hi)}function sa(){return Boolean(typeof history===Bi&&history)}function ua(){if(sa()){return history}return ea(Wi)}function ca(){if(typeof location===Bi&&location){return location}return ea(Gi)}function la(){if(typeof console!==Ui){return console}return ea(Ki)}function fa(){return ea(Xi)}function da(){return Boolean(typeof JSON===Bi&&JSON||ea(Ji)!==null)}function pa(){if(da()){return JSON||ea(Ji)}return null}function ha(){return ea(Yi)}function va(){return ea(Qi)}function ma(){var e=oa();if(e&&e.product){return e.product===$i}return false}var ga="on";var ya="attachEvent";var ba="addEventListener";var wa="detachEvent";var xa="removeEventListener";var Sa=4294967296;var _a=4294967295;var Ia=null;var Ca=false;var Ta=123456789;var Ea=987654321;function Aa(e){if(e<0){e>>>=0}Ta=123456789+e&_a;Ea=987654321-e&_a;Ca=true}function ka(){Aa(Math.random()*Sa^(new Date).getTime())}function Na(e,t){return typeof e===t}function Fa(e){return Na(e,Ai)||e===undefined}function Pa(e){return Fa(e)||e===null}function Da(e,t){return e&&Object[ki].hasOwnProperty.call(e,t)}function Ra(e){return Na(e,Ei)}function Oa(e){return Na(e,Ti)}function Ma(e,t,n,r){if(r===void 0){r=false}var i=false;if(!Pa(e)){try{if(!Pa(e[ba])){e[ba](t,n,r);i=true}else if(!Pa(e[ya])){e[ya](ga+t,n);i=true}}catch(e){}}return i}function La(e,t,n,r){if(r===void 0){r=false}if(!Pa(e)){try{if(!Pa(e[xa])){e[xa](t,n,r)}else if(!Pa(e[wa])){e[wa](ga+t,n)}}catch(e){}}}function Ua(e){var t=e;var n=/([^\w\d_$])/g;if(n.test(e)){t=e.replace(n,"_")}return t}function Ba(e,t){if(e&&Ra(e)){for(var n in e){if(Da(e,n)){t.call(e,n,e[n])}}}}var ja=function(){function e(){}e.isDate=function(e){return Object[ki].toString.call(e)==="[object Date]"};e.isArray=function(e){return Object[ki].toString.call(e)==="[object Array]"};e.isError=function(e){return Object[ki].toString.call(e)==="[object Error]"};e.isString=function(e){return Na(e,"string")};e.isNumber=function(e){return Na(e,"number")};e.isBoolean=function(e){return Na(e,"boolean")};e.disableCookies=function(){e._canUseCookies=false};e.newGuid=function(){function t(){return e.randomValue(15)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Va,(function(e){var n=t()|0,r=e==="x"?n:n&3|8;return r.toString(16)}))};e.toISOString=function(t){if(e.isDate(t)){var n=function(e){var t=String(e);if(t.length===1){t="0"+t}return t};return t.getUTCFullYear()+"-"+n(t.getUTCMonth()+1)+"-"+n(t.getUTCDate())+"T"+n(t.getUTCHours())+":"+n(t.getUTCMinutes())+":"+n(t.getUTCSeconds())+"."+String((t.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}};e.arrForEach=function(e,t,n){var r=e.length;for(var i=0;i<r;i++){if(i in e){t.call(n||e,e[i],i,e)}}};e.arrIndexOf=function(e,t,n){var r=e.length;var i=n||0;for(var a=Math.max(i>=0?i:r-Math.abs(i),0);a<r;a++){if(a in e&&e[a]===t){return a}}return-1};e.arrMap=function(e,t,n){var r=e.length;var i=n||e;var a=new Array(r);for(var o=0;o<r;o++){if(o in e){a[o]=t.call(i,e[o],e)}}return a};e.arrReduce=function(e,t,n){var r=e.length;var i=0;var a;if(arguments.length>=3){a=arguments[2]}else{while(i<r&&!(i in e)){i++}a=e[i++]}while(i<r){if(i in e){a=t(a,e[i],i,e)}i++}return a};e.strTrim=function(t){if(!e.isString(t)){return t}return t.replace(/^\s+|\s+$/g,"")};e.objKeys=function(e){var t=!{toString:null}.propertyIsEnumerable("toString");if(!Oa(e)&&(!Ra(e)||e===null)){throw new TypeError("objKeys called on non-object")}var n=[];for(var r in e){if(Da(e,r)){n.push(r)}}if(t){var i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var a=i.length;for(var o=0;o<a;o++){if(Da(e,i[o])){n.push(i[o])}}}return n};e.objDefineAccessors=function(e,t,n,r){var i=Object["defineProperty"];if(i){try{var a={enumerable:true,configurable:true};if(n){a.get=n}if(r){a.set=r}i(e,t,a);return true}catch(e){}}return false};e.addEventHandler=function(e,t){var n=false;var r=na();if(r){n=Ma(r,e,t);n=Ma(r["body"],e,t)||n}var i=ia();if(i){n=qa.Attach(i,e,t)||n}return n};e.dateNow=function(){var e=Date;if(e.now){return e.now()}return(new e).getTime()};e.perfNow=function(){var t=fa();if(t&&t.now){return t.now()}return e.dateNow()};e.newId=function(t){if(t===void 0){t=22}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var r=e.random32()>>>0;var i=0;var a="";while(a.length<t){i++;a+=n.charAt(r&63);r>>>=6;if(i===5){r=(e.random32()<<2&4294967295|r&3)>>>0;i=0}}return a};e.isIE=function(){if(Ia===null){var e=oa()||{};var t=(e.userAgent||"").toLowerCase();Ia=t.indexOf("msie")!==-1||t.indexOf("trident/")!==-1}return Ia};e.randomValue=function(t){if(t>0){return Math.floor(e.random32()/_a*(t+1))>>>0}return 0};e.random32=function(t){var n;var r=ha()||va();if(r&&r.getRandomValues){n=r.getRandomValues(new Uint32Array(1))[0]&_a}else if(e.isIE()){if(!Ca){ka()}n=e.mwcRandom32()&_a}else{n=Math.floor(Sa*Math.random()|0)}if(!t){n>>>=0}return n};e.mwcRandomSeed=function(e){if(!e){ka()}else{Aa(e)}};e.mwcRandom32=function(e){Ea=36969*(Ea&65535)+(Ea>>16)&_a;Ta=18e3*(Ta&65535)+(Ta>>16)&_a;var t=(Ea<<16)+(Ta&65535)>>>0&_a|0;if(!e){t>>>=0}return t};e.generateW3CId=function(){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];var n="",r;for(var i=0;i<4;i++){r=e.random32();n+=t[r&15]+t[r>>4&15]+t[r>>8&15]+t[r>>12&15]+t[r>>16&15]+t[r>>20&15]+t[r>>24&15]+t[r>>28&15]}var a=t[8+(e.random32()&3)|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+a+n.substr(16,3)+n.substr(19,12)};e.isTypeof=Na;e.isUndefined=Fa;e.isNullOrUndefined=Pa;e.hasOwnProperty=Da;e.isFunction=Oa;e.isObject=Ra;e.objCreate=Pi;return e}();var Va=/[xy]/g;var qa=function(){function e(){}e.Attach=Ma;e.AttachEvent=Ma;e.Detach=La;e.DetachEvent=La;return e}();var za;(function(e){e[e["CRITICAL"]=1]="CRITICAL";e[e["WARNING"]=2]="WARNING"})(za||(za={}));var Ha={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103};
|
|
2
|
+
/*!
|
|
3
|
+
* Microsoft Dynamic Proto Utility, 1.1.0
|
|
4
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
5
|
+
*/var Wa="constructor";var Ga="prototype";var Ka="function";var Xa="_dynInstFuncs";var Ja="_isDynProxy";var Ya="_dynClass";var Qa="_dynCls$";var $a="_dynInstChk";var Za=$a;var eo="_dfOpts";var to="_unknown_";var no="__proto__";var ro="useBaseInst";var io="setInstFuncs";var ao=Object["getPrototypeOf"];var oo=0;function so(e,t){return e&&Object[Ga].hasOwnProperty.call(e,t)}function uo(e){return typeof e===Ka}function co(e){return e&&(e===Object[Ga]||e===Array[Ga])}function lo(e){return co(e)||e===Function[Ga]}function fo(e){if(e){if(ao){return ao(e)}var t=e[no]||e[Ga]||e[Wa];if(t){return t}}return null}function po(e,t,n){return t!==Wa&&uo(e[t])&&(n||so(e,t))}function ho(e){throw new TypeError("DynamicProto: "+e)}function vo(e){var t={};for(var n in e){if(!t[n]&&po(e,n,false)){t[n]=e[n]}}return t}function mo(e,t){for(var n=e.length-1;n>=0;n--){if(e[n]===t){return true}}return false}function go(e,t,n,r){function i(e,t,n){var i=t[o];if(i[Ja]&&r){var a=e[Xa]||{};if(a[Za]!==false){i=(a[t[Ya]]||{})[n]||i}}return function(){return i.apply(e,arguments)}}var a={};for(var o in n){a[o]=i(t,n,o)}var s=fo(e);var u=[];while(s&&!lo(s)&&!mo(u,s)){for(var o in s){if(!a[o]&&po(s,o,!ao)){a[o]=i(t,s,o)}}u.push(s);s=fo(s)}return a}function yo(e,t,n,r){var i=null;if(e&&so(n,Ya)){var a=e[Xa]||{};i=(a[n[Ya]]||{})[t];if(!i){ho("Missing ["+t+"] "+Ka)}if(!i[$a]&&a[Za]!==false){var o=!so(e,t);var s=fo(e);var u=[];while(o&&s&&!lo(s)&&!mo(u,s)){var c=s[t];if(c){o=c===r;break}u.push(s);s=fo(s)}try{if(o){e[t]=i}i[$a]=1}catch(e){a[Za]=false}}}return i}function bo(e,t,n){var r=t[e];if(r===n){r=fo(t)[e]}if(!uo(r)){ho("["+e+"] is not a "+Ka)}return r}function wo(e,t,n,r,i){function a(e,t){var n=function(){var r=yo(this,t,e,n)||bo(t,e,n);return r.apply(this,arguments)};n[Ja]=1;return n}if(!co(e)){var o=n[Xa]=n[Xa]||{};var s=o[t]=o[t]||{};if(o[Za]!==false){o[Za]=!!i}for(var u in n){if(po(n,u,false)&&n[u]!==r[u]){s[u]=n[u];delete n[u];if(!so(e,u)||e[u]&&!e[u][Ja]){e[u]=a(e,u)}}}}}function xo(e,t){var n=fo(t);while(n&&!lo(n)){if(n===e){return true}n=fo(n)}return false}function So(e,t){if(so(e,Ga)){return e.name||t||to}return((e||{})[Wa]||{}).name||t||to}function _o(e,t,n,r){if(!so(e,Ga)){ho("theClass is an invalid class definition.")}var i=e[Ga];if(!xo(i,t)){ho("["+So(e)+"] is not in class hierarchy of ["+So(t)+"]")}var a=null;if(so(i,Ya)){a=i[Ya]}else{a=Qa+So(e,"_")+"$"+oo;oo++;i[Ya]=a}var o=_o[eo];var s=!!o[ro];if(s&&r&&r[ro]!==undefined){s=!!r[ro]}var u=vo(t);var c=go(i,t,u,s);n(t,c);var l=!!ao&&!!o[io];if(l&&r){l=!!r[io]}wo(i,a,t,u,l!==false)}var Io={setInstFuncs:true,useBaseInst:true};_o[eo]=Io;var Co="AI (Internal): ";var To="AI: ";var Eo="AITR_";function Ao(e){if(e){return'"'+e.replace(/\"/g,"")+'"'}return""}var ko=function(){function e(e,t,n,r){if(n===void 0){n=false}var i=this;i.messageId=e;i.message=(n?To:Co)+e;var a="";if(da()){a=pa().stringify(r)}var o=(t?" message:"+Ao(t):"")+(r?" props:"+Ao(a):"");i.message+=o}e.dataType="MessageData";return e}();var No=function(){function e(t){this.identifier="DiagnosticLogger";this.queue=[];var n=0;var r={};_o(e,this,(function(e){var i=ja.isNullOrUndefined;var a=ja.isUndefined;var o=ja.isFunction;if(i(t)){t={}}e.consoleLoggingLevel=function(){return s("loggingLevelConsole",0)};e.telemetryLoggingLevel=function(){return s("loggingLevelTelemetry",1)};e.maxInternalMessageLimit=function(){return s("maxMessageLimit",25)};e.enableDebugExceptions=function(){return s("enableDebugExceptions",false)};e.throwInternal=function(t,n,i,o,s){if(s===void 0){s=false}var u=new ko(n,i,s,o);if(e.enableDebugExceptions()){throw u}else{if(!a(u)&&!!u){if(!a(u.message)){if(s){var c=+u.messageId;if(!r[c]&&e.consoleLoggingLevel()>=za.WARNING){e.warnToConsole(u.message);r[c]=true}}else{if(e.consoleLoggingLevel()>=za.WARNING){e.warnToConsole(u.message)}}e.logInternalMessage(t,u)}}}};e.warnToConsole=function(e){var t=la();if(!!t){var n="log";if(t.warn){n="warn"}if(o(t[n])){t[n](e)}}};e.resetInternalMessageCount=function(){n=0;r={}};e.logInternalMessage=function(t,i){if(u()){return}var a=true;var o=Eo+i.messageId;if(r[o]){a=false}else{r[o]=true}if(a){if(t<=e.telemetryLoggingLevel()){e.queue.push(i);n++}if(n===e.maxInternalMessageLimit()){var s="Internal events throttle limit per PageView reached for this app.";var c=new ko(Ha.MessageLimitPerPVExceeded,s,false);e.queue.push(c);e.warnToConsole(s)}}};function s(e,n){var r=t[e];if(!i(r)){return r}return n}function u(){return n>=e.maxInternalMessageLimit()}}))}e.prototype.enableDebugExceptions=function(){return false};e.prototype.consoleLoggingLevel=function(){return 0};e.prototype.telemetryLoggingLevel=function(){return 1};e.prototype.maxInternalMessageLimit=function(){return 25};e.prototype.throwInternal=function(e,t,n,r,i){};e.prototype.warnToConsole=function(e){};e.prototype.resetInternalMessageCount=function(){};e.prototype.logInternalMessage=function(e,t){};return e}();var Fo="ctx";var Po=function(){function e(t,n,r){var i=this;var a=false;i.start=ja.dateNow();i.name=t;i.isAsync=r;i.isChildEvt=function(){return false};if(ja.isFunction(n)){var o;a=ja.objDefineAccessors(i,"payload",(function(){if(!o&&ja.isFunction(n)){o=n();n=null}return o}))}i.getCtx=function(t){if(t){if(t===e.ParentContextKey||t===e.ChildrenContextKey){return i[t]}return(i[Fo]||{})[t]}return null};i.setCtx=function(t,n){if(t){if(t===e.ParentContextKey){if(!i[t]){i.isChildEvt=function(){return true}}i[t]=n}else if(t===e.ChildrenContextKey){i[t]=n}else{var r=i[Fo]=i[Fo]||{};r[t]=n}}};i.complete=function(){var t=0;var r=i.getCtx(e.ChildrenContextKey);if(ja.isArray(r)){for(var o=0;o<r.length;o++){var s=r[o];if(s){t+=s.time}}}i.time=ja.dateNow()-i.start;i.exTime=i.time-t;i.complete=function(){};if(!a&&ja.isFunction(n)){i.payload=n()}}}e.ParentContextKey="parent";e.ChildrenContextKey="childEvts";return e}();var Do=function(){function e(t){this.ctx={};_o(e,this,(function(e){e.create=function(e,t,n){return new Po(e,t,n)};e.fire=function(e){if(e){e.complete();if(t){t.perfEvent(e)}}};e.setCtx=function(t,n){if(t){var r=e[Fo]=e[Fo]||{};r[t]=n}};e.getCtx=function(t){return(e[Fo]||{})[t]}}))}e.prototype.create=function(e,t,n){return null};e.prototype.fire=function(e){};e.prototype.setCtx=function(e,t){};e.prototype.getCtx=function(e){};return e}();var Ro="CoreUtils.doPerf";function Oo(e,t,n,r,i){if(e){var a=e;if(a&&ja.isFunction(a["getPerfMgr"])){a=a["getPerfMgr"]()}if(a){var o=void 0;var s=a.getCtx(Ro);try{o=a.create(t(),r,i);if(o){if(s&&o.setCtx){o.setCtx(Po.ParentContextKey,s);if(s.getCtx&&s.setCtx){var u=s.getCtx(Po.ChildrenContextKey);if(!u){u=[];s.setCtx(Po.ChildrenContextKey,u)}u.push(o)}}a.setCtx(Ro,o);return n(o)}}catch(e){if(o&&o.setCtx){o.setCtx("exception",e)}}finally{if(o){a.fire(o)}a.setCtx(Ro,s)}}}return n()}var Mo=ja.isFunction;var Lo=function(){function e(e,t){var n=this;var r=null;var i=Mo(e.processTelemetry);var a=Mo(e.setNextPlugin);n._hasRun=false;n.getPlugin=function(){return e};n.getNext=function(){return r};n.setNext=function(e){r=e};n.processTelemetry=function(o,s){if(!s){s=t}var u=e?e.identifier:"TelemetryPluginChain";Oo(s?s.core():null,(function(){return u+":processTelemetry"}),(function(){if(e&&i){n._hasRun=true;try{s.setNext(r);if(a){e.setNextPlugin(r)}r&&(r._hasRun=false);e.processTelemetry(o,s)}catch(n){var t=r&&r._hasRun;if(!r||!t){s.diagLog().throwInternal(za.CRITICAL,Ha.PluginException,"Plugin ["+e.identifier+"] failed during processTelemetry - "+n)}if(r&&!t){r.processTelemetry(o,s)}}}else if(r){n._hasRun=true;r.processTelemetry(o,s)}}),(function(){return{item:o}}),!o.sync)}}return e}();var Uo=ja.isNullOrUndefined;function Bo(e,t){var n=[];if(e&&e.length>0){var r=null;for(var i=0;i<e.length;i++){var a=e[i];if(a&&ja.isFunction(a.processTelemetry)){var o=new Lo(a,t);n.push(o);if(r){r.setNext(o)}r=o}}}return n.length>0?n[0]:null}function jo(e,t,n){var r=[];var i=n?false:true;if(e){while(e){var a=e.getPlugin();if(i||a===n){i=true;r.push(a)}e=e.getNext()}}if(!i){r.push(n)}return Bo(r,t)}function Vo(e,t,n){var r=e;var i=false;if(n&&e){r=[];ja.arrForEach(e,(function(e){if(i||e===n){i=true;r.push(e)}}))}if(n&&!i){if(!r){r=[]}r.push(n)}return Bo(r,t)}var qo=function(){function e(t,n,r,i){var a=this;var o=null;if(i!==null){if(t&&ja.isFunction(t.getPlugin)){o=jo(t,a,i||t.getPlugin())}else{if(i){o=Vo(t,a,i)}else if(ja.isUndefined(i)){o=Bo(t,a)}}}a.core=function(){return r};a.diagLog=function(){var e=(r||{}).logger;if(!e){e=new No(n||{})}return e};a.getCfg=function(){return n};a.getExtCfg=function(e,t){if(t===void 0){t={}}var r;if(n){var i=n.extensionConfig;if(i&&e){r=i[e]}}return r?r:t};a.getConfig=function(e,t,r){if(r===void 0){r=false}var i;var o=a.getExtCfg(e,null);if(o&&!Uo(o[t])){i=o[t]}else if(n&&!Uo(n[t])){i=n[t]}return!Uo(i)?i:r};a.hasNext=function(){return o!=null};a.getNext=function(){return o};a.setNext=function(e){o=e};a.processNext=function(e){var t=o;if(t){o=t.getNext();t.processTelemetry(e,a)}};a.createNew=function(t,i){if(t===void 0){t=null}return new e(t||o,n,r,i)}}return e}();var zo=ja.isFunction;var Ho="getPlugin";var Wo=function(){function e(){var e=this;var t=false;var n=null;var r=null;e.core=null;e.diagLog=function(t){return e._getTelCtx(t).diagLog()};e.isInitialized=function(){return t};e.setInitialized=function(e){t=e};e.setNextPlugin=function(e){r=e};e.processNext=function(e,t){if(t){t.processNext(e)}else if(r&&zo(r.processTelemetry)){r.processTelemetry(e,null)}};e._getTelCtx=function(t){if(t===void 0){t=null}var i=t;if(!i){var a=n||new qo(null,{},e.core);if(r&&r[Ho]){i=a.createNew(null,r[Ho])}else{i=a.createNew(null,r)}}return i};e._baseTelInit=function(i,a,o,s){if(i){i.extensionConfig=i.extensionConfig||[]}if(!s&&a){s=a.getProcessTelContext().getNext()}var u=r;if(r&&r[Ho]){u=r[Ho]()}e.core=a;n=new qo(s,i,a,u);t=true}}e.prototype.initialize=function(e,t,n,r){this._baseTelInit(e,t,n,r)};return e}();var Go=ja.isFunction;var Ko="processTelemetry";var Xo="priority";var Jo="setNextPlugin";var Yo="isInitialized";function Qo(e,t){var n=[];var r=null;var i=e.getNext();while(i){var a=i.getPlugin();if(a){if(r&&Go(r[Jo])&&Go(a[Ko])){r[Jo](a)}if(!Go(a[Yo])||!a[Yo]()){n.push(a)}r=a;i=i.getNext()}}ja.arrForEach(n,(function(n){n.initialize(e.getCfg(),e.core(),t,e.getNext())}))}function $o(e){return e.sort((function(e,t){var n=0;var r=Go(t[Ko]);if(Go(e[Ko])){n=r?e[Xo]-t[Xo]:1}else if(r){n=-1}return n}))}var Zo=500;var es="Channel has invalid priority";var ts=ja.objDefineAccessors;var ns=function(e){__extends(t,e);function t(){var n=e.call(this)||this;n.identifier="ChannelControllerPlugin";n.priority=Zo;var r=ja.arrForEach;var i;_o(t,n,(function(e,t){e.setNextPlugin=function(e){};e.processTelemetry=function(e,t){if(i){r(i,(function(r){if(r.length>0){var i=n._getTelCtx(t).createNew(r);i.processNext(e)}}))}};e.getChannelControls=function(){return i};e.initialize=function(n,a,o){if(e.isInitialized()){return}t.initialize(n,a,o);if(n.isCookieUseDisabled){ja.disableCookies()}s((n||{}).channels,o);r(i,(function(e){return Qo(new qo(e,n,a),o)}))}}));function a(e){r(e,(function(e){if(e.priority<Zo){throw Error(es+e.identifier)}}))}function o(e){if(e&&e.length>0){e=e.sort((function(e,t){return e.priority-t.priority}));a(e);i.push(e)}}function s(e,t){i=[];if(e){r(e,(function(e){return o(e)}))}if(t){var n=[];r(t,(function(e){if(e.priority>Zo){n.push(e)}}));o(n)}}return n}t.prototype.processTelemetry=function(e,t){};t.prototype.getChannelControls=function(){return null};t.prototype.initialize=function(e,t,n){};t._staticInit=function(){ts(t.prototype,"ChannelControls",t.prototype.getChannelControls);ts(t.prototype,"channelQueue",t.prototype.getChannelControls)}();return t}(Wo);var rs="Extensions must provide callback to initialize";var is=ja.arrForEach;var as=ja.isNullOrUndefined;var os="_notificationManager";var ss=function(){function e(){var t=false;var n;var r;var i;var a;_o(e,this,(function(e){e._extensions=new Array;r=new ns;e.logger=ja.objCreate({throwInternal:function(e,t,n,r,i){},warnToConsole:function(e){},resetInternalMessageCount:function(){}});n=[];e.isInitialized=function(){return t};e.initialize=function(n,a,o,s){if(e.isInitialized()){throw Error("Core should not be initialized more than once")}if(!n||as(n.instrumentationKey)){throw Error("Please provide instrumentation key")}i=s;e[os]=s;e.config=n||{};n.extensions=as(n.extensions)?[]:n.extensions;var u=n.extensionConfig=as(n.extensionConfig)?{}:n.extensionConfig;u.NotificationManager=s;if(o){e.logger=o}var c=[];c.push.apply(c,a.concat(n.extensions));c=$o(c);var l=[];var f={};is(c,(function(e){if(as(e)||as(e.initialize)){throw Error(rs)}var t=e.priority;var n=e.identifier;if(e&&t){if(!as(f[t])){o.warnToConsole("Two extensions have same priority #"+t+" - "+f[t]+", "+n)}else{f[t]=n}}if(!t||t<r.priority){l.push(e)}}));c.push(r);l.push(r);c=$o(c);e._extensions=c;Qo(new qo([r],n,e),c);Qo(new qo(l,n,e),c);e._extensions=l;if(e.getTransmissionControls().length===0){throw new Error("No channels available")}t=true;e.releaseQueue()};e.getTransmissionControls=function(){return r.getChannelControls()};e.track=function(t){if(!t.iKey){t.iKey=e.config.instrumentationKey}if(!t.time){t.time=ja.toISOString(new Date)}if(as(t.ver)){t.ver="4.0"}if(e.isInitialized()){e.getProcessTelContext().processNext(t)}else{n.push(t)}};e.getProcessTelContext=function(){var t=e._extensions;var n=t;if(!t||t.length===0){n=[r]}return new qo(n,e.config,e)};e.getNotifyMgr=function(){if(!i){i=ja.objCreate({addNotificationListener:function(e){},removeNotificationListener:function(e){},eventsSent:function(e){},eventsDiscarded:function(e,t){},eventsSendRequest:function(e,t){}});e[os]=i}return i};e.getPerfMgr=function(){if(!a){if(e.config&&e.config.enablePerfMgr){a=new Do(e.getNotifyMgr())}}return a};e.setPerfMgr=function(e){a=e};e.eventCnt=function(){return n.length};e.releaseQueue=function(){if(n.length>0){is(n,(function(t){e.getProcessTelContext().processNext(t)}));n=[]}}}))}e.prototype.initialize=function(e,t,n,r){};e.prototype.getTransmissionControls=function(){return null};e.prototype.track=function(e){};e.prototype.getProcessTelContext=function(){return null};e.prototype.getNotifyMgr=function(){return null};e.prototype.getPerfMgr=function(){return null};e.prototype.setPerfMgr=function(e){};e.prototype.eventCnt=function(){return 0};e.prototype.releaseQueue=function(){};return e}();var us=function(){function e(t){this.listeners=[];var n=ja.arrForEach;var r=!!(t||{}).perfEvtsSendAll;_o(e,this,(function(e){e.addNotificationListener=function(t){e.listeners.push(t)};e.removeNotificationListener=function(t){var n=ja.arrIndexOf(e.listeners,t);while(n>-1){e.listeners.splice(n,1);n=ja.arrIndexOf(e.listeners,t)}};e.eventsSent=function(t){n(e.listeners,(function(e){if(e&&e.eventsSent){setTimeout((function(){return e.eventsSent(t)}),0)}}))};e.eventsDiscarded=function(t,r){n(e.listeners,(function(e){if(e&&e.eventsDiscarded){setTimeout((function(){return e.eventsDiscarded(t,r)}),0)}}))};e.eventsSendRequest=function(t,r){n(e.listeners,(function(e){if(e&&e.eventsSendRequest){if(r){setTimeout((function(){return e.eventsSendRequest(t,r)}),0)}else{try{e.eventsSendRequest(t,r)}catch(e){}}}}))};e.perfEvent=function(t){if(t){if(r||!t.isChildEvt()){n(e.listeners,(function(e){if(e&&e.perfEvent){if(t.isAsync){setTimeout((function(){return e.perfEvent(t)}),0)}else{try{e.perfEvent(t)}catch(e){}}}}))}}}}))}e.prototype.addNotificationListener=function(e){};e.prototype.removeNotificationListener=function(e){};e.prototype.eventsSent=function(e){};e.prototype.eventsDiscarded=function(e,t){};e.prototype.eventsSendRequest=function(e,t){};return e}();var cs=function(e){__extends(t,e);function t(){var n=e.call(this)||this;_o(t,n,(function(e,t){e.initialize=function(e,n,r,i){t.initialize(e,n,r||new No(e),i||new us(e))};e.track=function(i){Oo(e.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){if(i===null){r(i);throw Error("Invalid telemetry item")}n(i);t.track(i)}),(function(){return{item:i}}),!i.sync)};e.addNotificationListener=function(t){var n=e.getNotifyMgr();if(n){n.addNotificationListener(t)}};e.removeNotificationListener=function(t){var n=e.getNotifyMgr();if(n){n.removeNotificationListener(t)}};e.pollInternalLogs=function(t){var n=e.config.diagnosticLogInterval;if(!n||!(n>0)){n=1e4}return setInterval((function(){var n=e.logger?e.logger.queue:[];ja.arrForEach(n,(function(n){var r={name:t?t:"InternalMessageId: "+n.messageId,iKey:e.config.instrumentationKey,time:ja.toISOString(new Date),baseType:ko.dataType,baseData:{message:n.message}};e.track(r)}));n.length=0}),n)};function n(e){if(ja.isNullOrUndefined(e.name)){r(e);throw Error("telemetry name required")}}function r(t){var n=e.getNotifyMgr();if(n){n.eventsDiscarded([t],Li.InvalidEvent)}}}));return n}t.prototype.initialize=function(e,t,n,r){};t.prototype.track=function(e){};t.prototype.addNotificationListener=function(e){};t.prototype.removeNotificationListener=function(e){};t.prototype.pollInternalLogs=function(e){return 0};return t}(ss);var ls="_aiHooks";var fs=["req","rsp","hkErr","fnErr"];var ds="__proto__";var ps="constructor";function hs(e,t){if(e){for(var n=0;n<e.length;n++){if(t(e[n],n)){break}}}}function vs(e,t,n,r,i){if(i>=0&&i<=2){hs(e,(function(e,a){var o=e.cbks;var s=o[fs[i]];if(s){t.ctx=function(){var e=r[a]=r[a]||{};return e};try{s.apply(t.inst,n)}catch(e){var u=t.err;try{var c=o[fs[2]];if(c){t.err=e;c.apply(t.inst,n)}}catch(e){}finally{t.err=u}}}}))}}function ms(e){return function(){var t=this;var n=arguments;var r=e.h;var i={name:e.n,inst:t,ctx:null,set:u};var a=[];var o=s([i],n);function s(e,t){hs(t,(function(t){e.push(t)}));return e}function u(e,t){n=s([],n);n[e]=t;o=s([i],n)}vs(r,i,o,a,0);var c=e.f;try{i.rslt=c.apply(t,n)}catch(e){i.err=e;vs(r,i,o,a,3);throw e}vs(r,i,o,a,1);return i.rslt}}var gs=Object["getPrototypeOf"];function ys(e){if(e){if(gs){return gs(e)}var t=e[ds]||e[ji]||e[ps];if(t){return t}}return null}function bs(e,t,n){var r=null;if(e){if(ja.hasOwnProperty(e,t)){r=e}else if(n){r=bs(ys(e),t,false)}}return r}function ws(e,t,n){if(e){return xs(e[ji],t,n,false)}return null}function xs(e,t,n,r){if(r===void 0){r=true}if(e&&t&&n){var i=bs(e,t,r);if(i){var a=i[t];if(typeof a===Vi){var o=a[ls];if(!o){o={i:0,n:t,f:a,h:[]};var s=ms(o);s[ls]=o;i[t]=s}var u={id:o.i,cbks:n,rm:function(){var e=this.id;hs(o.h,(function(t,n){if(t.id===e){o.h.splice(n,1);return 1}}))}};o.i++;o.h.push(u);return u}}}return null}var Ss;(function(e){e[e["LocalStorage"]=0]="LocalStorage";e[e["SessionStorage"]=1]="SessionStorage"})(Ss||(Ss={}));var _s;(function(e){e[e["Default"]=0]="Default";e[e["Required"]=1]="Required";e[e["Array"]=2]="Array";e[e["Hidden"]=4]="Hidden"})(_s||(_s={}));var Is;(function(e){e[e["AI"]=0]="AI";e[e["AI_AND_W3C"]=1]="AI_AND_W3C";e[e["W3C"]=2]="W3C"})(Is||(Is={}));var Cs=function(){function e(){}e.requestContextHeader="Request-Context";e.requestContextTargetKey="appId";e.requestContextAppIdFormat="appId=cid-v1:";e.requestIdHeader="Request-Id";e.traceParentHeader="traceparent";e.sdkContextHeader="Sdk-Context";e.sdkContextHeaderAppIdRequest="appId";e.requestContextHeaderLowerCase="request-context";return e}();var Ts=function(){function e(){}e.sanitizeKeyAndAddUniqueness=function(t,n,r){var i=n.length;var a=e.sanitizeKey(t,n);if(a.length!==i){var o=0;var s=a;while(r[s]!==undefined){o++;s=a.substring(0,e.MAX_NAME_LENGTH-3)+e.padNumber(o)}a=s}return a};e.sanitizeKey=function(t,n){var r;if(n){n=e.trim(n.toString());if(n.length>e.MAX_NAME_LENGTH){r=n.substring(0,e.MAX_NAME_LENGTH);t.throwInternal(za.WARNING,Ha.NameTooLong,"name is too long. It has been truncated to "+e.MAX_NAME_LENGTH+" characters.",{name:n},true)}}return r||n};e.sanitizeString=function(t,n,r){if(r===void 0){r=e.MAX_STRING_LENGTH}var i;if(n){r=r?r:e.MAX_STRING_LENGTH;n=e.trim(n);if(n.toString().length>r){i=n.toString().substring(0,r);t.throwInternal(za.WARNING,Ha.StringValueTooLong,"string value is too long. It has been truncated to "+r+" characters.",{value:n},true)}}return i||n};e.sanitizeUrl=function(t,n){return e.sanitizeInput(t,n,e.MAX_URL_LENGTH,Ha.UrlTooLong)};e.sanitizeMessage=function(t,n){var r;if(n){if(n.length>e.MAX_MESSAGE_LENGTH){r=n.substring(0,e.MAX_MESSAGE_LENGTH);t.throwInternal(za.WARNING,Ha.MessageTruncated,"message is too long, it has been truncated to "+e.MAX_MESSAGE_LENGTH+" characters.",{message:n},true)}}return r||n};e.sanitizeException=function(t,n){var r;if(n){if(n.length>e.MAX_EXCEPTION_LENGTH){r=n.substring(0,e.MAX_EXCEPTION_LENGTH);t.throwInternal(za.WARNING,Ha.ExceptionTruncated,"exception is too long, it has been truncated to "+e.MAX_EXCEPTION_LENGTH+" characters.",{exception:n},true)}}return r||n};e.sanitizeProperties=function(t,n){if(n){var r={};Ba(n,(function(n,i){if(ja.isObject(i)&&da()){try{i=pa().stringify(i)}catch(e){t.throwInternal(za.WARNING,Ha.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:e},true)}}i=e.sanitizeString(t,i,e.MAX_PROPERTY_LENGTH);n=e.sanitizeKeyAndAddUniqueness(t,n,r);r[n]=i}));n=r}return n};e.sanitizeMeasurements=function(t,n){if(n){var r={};Ba(n,(function(n,i){n=e.sanitizeKeyAndAddUniqueness(t,n,r);r[n]=i}));n=r}return n};e.sanitizeId=function(t,n){return n?e.sanitizeInput(t,n,e.MAX_ID_LENGTH,Ha.IdTooLong).toString():n};e.sanitizeInput=function(t,n,r,i){var a;if(n){n=e.trim(n);if(n.length>r){a=n.substring(0,r);t.throwInternal(za.WARNING,i,"input is too long, it has been truncated to "+r+" characters.",{data:n},true)}}return a||n};e.padNumber=function(e){var t="00"+e;return t.substr(t.length-3)};e.trim=function(e){if(!ja.isString(e)){return e}return e.replace(/^\s+|\s+$/g,"")};e.MAX_NAME_LENGTH=150;e.MAX_ID_LENGTH=128;e.MAX_PROPERTY_LENGTH=8192;e.MAX_STRING_LENGTH=1024;e.MAX_URL_LENGTH=2048;e.MAX_MESSAGE_LENGTH=32768;e.MAX_EXCEPTION_LENGTH=32768;return e}();var Es=oa();var As=ja.isString;var ks=null;function Ns(e,t){var n=e.length;var r=n-t.length;return e.substring(r>=0?r:0,n)===t}var Fs=function(){function e(){}e.createDomEvent=function(e){var t=null;if(ja.isFunction(Event)){t=new Event(e)}else{var n=ia();if(n&&n.createEvent){t=n.createEvent("Event");t.initEvent(e,true,true)}}return t};e.disableStorage=function(){e._canUseLocalStorage=false;e._canUseSessionStorage=false};e._getLocalStorageObject=function(){if(e.canUseLocalStorage()){return e._getVerifiedStorageObject(Ss.LocalStorage)}return null};e._getVerifiedStorageObject=function(e){var t=null;var n;var r;try{if(ja.isNullOrUndefined(Zi())){return null}r=new Date;t=e===Ss.LocalStorage?ea("localStorage"):ea("sessionStorage");t.setItem(r.toString(),r.toString());n=t.getItem(r.toString())!==r.toString();t.removeItem(r.toString());if(n){t=null}}catch(e){t=null}return t};e.isInternalApplicationInsightsEndpoint=function(t){return e._internalEndpoints.indexOf(t.toLowerCase())!==-1};e.canUseLocalStorage=function(){if(e._canUseLocalStorage===undefined){e._canUseLocalStorage=!!e._getVerifiedStorageObject(Ss.LocalStorage)}return e._canUseLocalStorage};e.getStorage=function(t,n){var r=e._getLocalStorageObject();if(r!==null){try{return r.getItem(n)}catch(n){e._canUseLocalStorage=false;t.throwInternal(za.WARNING,Ha.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+e.getExceptionName(n),{exception:e.dump(n)})}}return null};e.setStorage=function(t,n,r){var i=e._getLocalStorageObject();if(i!==null){try{i.setItem(n,r);return true}catch(n){e._canUseLocalStorage=false;t.throwInternal(za.WARNING,Ha.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+e.getExceptionName(n),{exception:e.dump(n)})}}return false};e.removeStorage=function(t,n){var r=e._getLocalStorageObject();if(r!==null){try{r.removeItem(n);return true}catch(n){e._canUseLocalStorage=false;t.throwInternal(za.WARNING,Ha.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+e.getExceptionName(n),{exception:e.dump(n)})}}return false};e._getSessionStorageObject=function(){if(e.canUseSessionStorage()){return e._getVerifiedStorageObject(Ss.SessionStorage)}return null};e.canUseSessionStorage=function(){if(e._canUseSessionStorage===undefined){e._canUseSessionStorage=!!e._getVerifiedStorageObject(Ss.SessionStorage)}return e._canUseSessionStorage};e.getSessionStorageKeys=function(){var t=[];if(e.canUseSessionStorage()){Ba(ea("sessionStorage"),(function(e){t.push(e)}))}return t};e.getSessionStorage=function(t,n){var r=e._getSessionStorageObject();if(r!==null){try{return r.getItem(n)}catch(n){e._canUseSessionStorage=false;t.throwInternal(za.WARNING,Ha.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+e.getExceptionName(n),{exception:e.dump(n)})}}return null};e.setSessionStorage=function(t,n,r){var i=e._getSessionStorageObject();if(i!==null){try{i.setItem(n,r);return true}catch(n){e._canUseSessionStorage=false;t.throwInternal(za.WARNING,Ha.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+e.getExceptionName(n),{exception:e.dump(n)})}}return false};e.removeSessionStorage=function(t,n){var r=e._getSessionStorageObject();if(r!==null){try{r.removeItem(n);return true}catch(n){e._canUseSessionStorage=false;t.throwInternal(za.WARNING,Ha.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+e.getExceptionName(n),{exception:e.dump(n)})}}return false};e.disableCookies=function(){ja.disableCookies()};e.canUseCookies=function(t){if(ja._canUseCookies===undefined){ja._canUseCookies=false;try{ja._canUseCookies=e.document.cookie!==undefined}catch(n){t.throwInternal(za.WARNING,Ha.CannotAccessCookie,"Cannot access document.cookie - "+e.getExceptionName(n),{exception:e.dump(n)})}}return ja._canUseCookies};e.disallowsSameSiteNone=function(e){if(!As(e)){return false}if(e.indexOf("CPU iPhone OS 12")!==-1||e.indexOf("iPad; CPU OS 12")!==-1){return true}if(e.indexOf("Macintosh; Intel Mac OS X 10_14")!==-1&&e.indexOf("Version/")!==-1&&e.indexOf("Safari")!==-1){return true}if(e.indexOf("Macintosh; Intel Mac OS X 10_14")!==-1&&Ns(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)")){return true}if(e.indexOf("Chrome/5")!==-1||e.indexOf("Chrome/6")!==-1){return true}if(e.indexOf("UnrealEngine")!==-1&&e.indexOf("Chrome")===-1){return true}if(e.indexOf("UCBrowser/12")!==-1||e.indexOf("UCBrowser/11")!==-1){return true}return false};e.setCookie=function(t,n,r,i){if(e.canUseCookies(t)){var a="";var o="";if(i){a=";domain="+i}var s=ca();if(s&&s.protocol==="https:"){o=";secure";if(ks===null){ks=e.disallowsSameSiteNone((oa()||{}).userAgent)}if(!ks){r=r+";SameSite=None"}}e.document.cookie=n+"="+r+a+";path=/"+o}};e.stringToBoolOrDefault=function(e,t){if(t===void 0){t=false}if(e===undefined||e===null){return t}return e.toString().toLowerCase()==="true"};e.getCookie=function(t,n){if(!e.canUseCookies(t)){return}var r="";if(n&&n.length){var i=n+"=";var a=e.document.cookie.split(";");for(var o=0;o<a.length;o++){var s=a[o];s=e.trim(s);if(s&&s.indexOf(i)===0){r=s.substring(i.length,a[o].length);break}}}return r};e.deleteCookie=function(t,n){if(e.canUseCookies(t)){e.document.cookie=n+"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;"}};e.random32=function(){return ja.random32(true)};e.getIEVersion=function(e){if(e===void 0){e=null}var t=e?e.toLowerCase():Es?(Es.userAgent||"").toLowerCase():"";if(t.indexOf("msie")!==-1){return parseInt(t.split("msie")[1])}else if(t.indexOf("trident/")){var n=parseInt(t.split("trident/")[1]);if(n){return n+4}}return null};e.msToTimeSpan=function(e){if(isNaN(e)||e<0){e=0}e=Math.round(e);var t=""+e%1e3;var n=""+Math.floor(e/1e3)%60;var r=""+Math.floor(e/(1e3*60))%60;var i=""+Math.floor(e/(1e3*60*60))%24;var a=Math.floor(e/(1e3*60*60*24));t=t.length===1?"00"+t:t.length===2?"0"+t:t;n=n.length<2?"0"+n:n;r=r.length<2?"0"+r:r;i=i.length<2?"0"+i:i;return(a>0?a+".":"")+i+":"+r+":"+n+"."+t};e.isCrossOriginError=function(e,t,n,r,i){return(e==="Script error."||e==="Script error")&&!i};e.dump=function(e){var t=Object[ji].toString.call(e);var n="";if(t==="[object Error]"){n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'"}else if(da()){n=pa().stringify(e)}return t+n};e.getExceptionName=function(e){var t=Object[ji].toString.call(e);if(t==="[object Error]"){return e.name}return""};e.addEventHandler=function(e,t){return qa.Attach(na(),e,t)};e.IsBeaconApiSupported=function(){return"sendBeacon"in Es&&Es.sendBeacon};e.getExtension=function(e,t){var n=null;var r=0;while(!n&&r<e.length){if(e[r]&&e[r].identifier===t){n=e[r]}r++}return n};e.document=ia()||{};e._canUseLocalStorage=undefined;e._canUseSessionStorage=undefined;e._internalEndpoints=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"];e.NotSpecified="not_specified";e.trim=ja.strTrim;e.newId=ja.newId;e.generateW3CId=ja.generateW3CId;e.isArray=ja.isArray;e.isError=ja.isError;e.isDate=ja.isDate;e.toISOStringForIE8=ja.toISOString;return e}();var Ps=function(){function e(){}e.parseUrl=function(t){var n=e._htmlAnchorIdx;var r=e._htmlAnchorElement;var i=r[n];if(!e.document.createElement){i={host:e.parseHost(t,true)}}else if(!r[n]){i=r[n]=e.document.createElement("a")}i.href=t;n++;if(n>=r.length){n=0}e._htmlAnchorIdx=n;return i};e.getAbsoluteUrl=function(t){var n;var r=e.parseUrl(t);if(r){n=r.href}return n};e.getPathName=function(t){var n;var r=e.parseUrl(t);if(r){n=r.pathname}return n};e.getCompleteUrl=function(e,t){if(e){return e.toUpperCase()+" "+t}else{return t}};e.parseHost=function(t,n){var r=e.parseFullHost(t,n);if(r){var i=r.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(i!=null&&i.length>3&&As(i[2])&&i[2].length>0){return i[2]+(i[3]||"")}}return r};e.parseFullHost=function(e,t){var n=null;if(e){var r=e.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(r!=null&&r.length>2&&As(r[2])&&r[2].length>0){n=r[2]||"";if(t&&r.length>2){var i=(r[1]||"").toLowerCase();var a=r[3]||"";if(i==="http"&&a===":80"){a=""}else if(i==="https"&&a===":443"){a=""}n+=a}}}return n};e.document=ia()||{};e._htmlAnchorIdx=0;e._htmlAnchorElement=[null,null,null,null,null];return e}();var Ds=function(){function e(){}e.canIncludeCorrelationHeader=function(e,t,n){if(!t||e&&e.disableCorrelationHeaders){return false}if(e&&e.correlationHeaderExcludePatterns){for(var r=0;r<e.correlationHeaderExcludePatterns.length;r++){if(e.correlationHeaderExcludePatterns[r].test(t)){return false}}}var i=Ps.parseUrl(t).host.toLowerCase();if(i&&(i.indexOf(":443")!==-1||i.indexOf(":80")!==-1)){i=(Ps.parseFullHost(t,true)||"").toLowerCase()}if((!e||!e.enableCorsCorrelation)&&i!==n){return false}var a=e&&e.correlationHeaderDomains;if(a){var o;ja.arrForEach(a,(function(e){var t=new RegExp(e.toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));o=o||t.test(i)}));if(!o){return false}}var s=e&&e.correlationHeaderExcludedDomains;if(!s||s.length===0){return true}for(var r=0;r<s.length;r++){var u=new RegExp(s[r].toLowerCase().replace(/\./g,".").replace(/\*/g,".*"));if(u.test(i)){return false}}return i&&i.length>0};e.getCorrelationContext=function(t){if(t){var n=e.getCorrelationContextValue(t,Cs.requestContextTargetKey);if(n&&n!==e.correlationIdPrefix){return n}}};e.getCorrelationContextValue=function(e,t){if(e){var n=e.split(",");for(var r=0;r<n.length;++r){var i=n[r].split("=");if(i.length===2&&i[0]===t){return i[1]}}}};e.correlationIdPrefix="cid-v1:";return e}();var Rs=function(){function e(){}e.ParseDependencyPath=function(e,t,n,r){var i,a=r,o=r;if(t&&t.length>0){var s=Ps.parseUrl(t);i=s.host;if(!a){if(s.pathname!=null){var u=s.pathname.length===0?"/":s.pathname;if(u.charAt(0)!=="/"){u="/"+u}o=s.pathname;a=Ts.sanitizeString(e,n?n+" "+u:u)}else{a=Ts.sanitizeString(e,t)}}}else{i=r;a=r}return{target:i,name:a,data:o}};return e}();var Os=function(){function e(){}e.Now=function(){var e=fa();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0){return t}}return(new Date).getTime()};e.GetDuration=function(e,t){var n=null;if(e!==0&&t!==0&&!ja.isNullOrUndefined(e)&&!ja.isNullOrUndefined(t)){n=t-e}return n};return e}();var Ms="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";var Ls="sampleRate";var Us="ProcessLegacy";var Bs="http.method";var js="https://dc.services.visualstudio.com";var Vs=function(){function e(){}e.parse=function(t){if(!t){return{}}var n=t.split(e._FIELDS_SEPARATOR);var r=ja.arrReduce(n,(function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(r.length===2){var i=r[0].toLowerCase();var a=r[1];t[i]=a}return t}),{});if(ja.objKeys(r).length>0){if(r.endpointsuffix){var i=r.location?r.location+".":"";r.ingestionendpoint=r.ingestionendpoint||"https://"+i+"dc."+r.endpointsuffix}r.ingestionendpoint=r.ingestionendpoint||js}return r};e._FIELDS_SEPARATOR=";";e._FIELD_KEY_VALUE_SEPARATOR="=";return e}();var qs=function(){function e(){}return e}();var zs=function(e){__extends(t,e);function t(){return e.call(this)||this}return t}(qs);var Hs=function(){function e(){this.ver=1;this.sampleRate=100;this.tags={}}return e}();var Ws=function(e){__extends(t,e);function t(t,n,r){var i=e.call(this)||this;i.name=Ts.sanitizeString(t,r)||Fs.NotSpecified;i.data=n;i.time=ja.toISOString(new Date);i.aiDataContract={time:_s.Required,iKey:_s.Required,name:_s.Required,sampleRate:function(){return i.sampleRate===100?_s.Hidden:_s.Required},tags:_s.Required,data:_s.Required};return i}return t}(Hs);var Gs=function(){function e(){}return e}();var Ks=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.properties={};t.measurements={};return t}return t}(Gs);var Xs=function(e){__extends(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.aiDataContract={ver:_s.Required,name:_s.Required,properties:_s.Default,measurements:_s.Default};a.name=Ts.sanitizeString(t,n)||Fs.NotSpecified;a.properties=Ts.sanitizeProperties(t,r);a.measurements=Ts.sanitizeMeasurements(t,i);return a}t.envelopeType="Microsoft.ApplicationInsights.{0}.Event";t.dataType="EventData";return t}(Ks);var Js=function(){function e(){}return e}();var Ys=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.exceptions=[];t.properties={};t.measurements={};return t}return t}(Gs);var Qs=function(){function e(){this.hasFullStack=true;this.parsedStack=[]}return e}();var $s="error";function Zs(e){return"hasFullStack"in e&&"typeName"in e}function eu(e){return"ver"in e&&"exceptions"in e&&"properties"in e}function tu(e){var t="";if(e){t=e.typeName||e.name||"";if(!t){try{var n=/function (.{1,})\(/;var r=n.exec(e.constructor.toString());t=r&&r.length>1?r[1]:""}catch(e){}}}return t}var nu=function(e){__extends(t,e);function t(t,n,r,i,a,o){var s=e.call(this)||this;s.aiDataContract={ver:_s.Required,exceptions:_s.Required,severityLevel:_s.Default,properties:_s.Default,measurements:_s.Default};if(!eu(n)){s.exceptions=[new ru(t,n)];s.properties=Ts.sanitizeProperties(t,r)||{};s.measurements=Ts.sanitizeMeasurements(t,i);if(a){s.severityLevel=a}if(o){s.id=o}}else{s.exceptions=n.exceptions;s.properties=n.properties;s.measurements=n.measurements;if(n.severityLevel){s.severityLevel=n.severityLevel}if(n.id){s.id=n.id}if(n.problemGroup){s.problemGroup=n.problemGroup}s.ver=2;if(!ja.isNullOrUndefined(n.isManual)){s.isManual=n.isManual}}return s}t.CreateFromInterface=function(e,n,r,i){var a=n.exceptions&&ja.arrMap(n.exceptions,(function(t){return ru.CreateFromInterface(e,t)}));var o=new t(e,__assign({},n,{exceptions:a}),r,i);return o};t.prototype.toInterface=function(){var e=this,t=e.exceptions,n=e.properties,r=e.measurements,i=e.severityLevel,a=e.problemGroup,o=e.id,s=e.isManual;var u=t instanceof Array&&ja.arrMap(t,(function(e){return e.toInterface()}))||undefined;return{ver:"4.0",exceptions:u,severityLevel:i,properties:n,measurements:r,problemGroup:a,id:o,isManual:s}};t.CreateSimpleException=function(e,t,n,r,i,a){return{exceptions:[{hasFullStack:true,message:e,stack:i,typeName:t}]}};t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception";t.dataType="ExceptionData";return t}(Ys);var ru=function(e){__extends(t,e);function t(n,r){var i=e.call(this)||this;i.aiDataContract={id:_s.Default,outerId:_s.Default,typeName:_s.Required,message:_s.Required,hasFullStack:_s.Default,stack:_s.Default,parsedStack:_s.Array};if(!Zs(r)){var a=r;if(!Fs.isError(a)){a=a[$s]||a.evt||a}i.typeName=Ts.sanitizeString(n,tu(a))||Fs.NotSpecified;i.message=Ts.sanitizeMessage(n,r.message)||Fs.NotSpecified;var o=r.stack;i.parsedStack=t.parseStack(o);i.stack=Ts.sanitizeException(n,o);i.hasFullStack=Fs.isArray(i.parsedStack)&&i.parsedStack.length>0}else{i.typeName=r.typeName;i.message=r.message;i.stack=r.stack;i.parsedStack=r.parsedStack;i.hasFullStack=r.hasFullStack}return i}t.prototype.toInterface=function(){var e=this.parsedStack instanceof Array&&ja.arrMap(this.parsedStack,(function(e){return e.toInterface()}));var t={id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this.stack,parsedStack:e||undefined};return t};t.CreateFromInterface=function(e,n){var r=n.parsedStack instanceof Array&&ja.arrMap(n.parsedStack,(function(e){return iu.CreateFromInterface(e)}))||n.parsedStack;var i=new t(e,__assign({},n,{parsedStack:r}));return i};t.parseStack=function(e){var t;if(ja.isString(e)){var n=e.split("\n");t=[];var r=0;var i=0;for(var a=0;a<=n.length;a++){var o=n[a];if(iu.regex.test(o)){var s=new iu(n[a],r++);i+=s.sizeInBytes;t.push(s)}}var u=32*1024;if(i>u){var c=0;var l=t.length-1;var f=0;var d=c;var p=l;while(c<l){var h=t[c].sizeInBytes;var v=t[l].sizeInBytes;f+=h+v;if(f>u){var m=p-d+1;t.splice(d,m);break}d=c;p=l;c++;l--}}}return t};return t}(Qs);var iu=function(e){__extends(t,e);function t(n,r){var i=e.call(this)||this;i.sizeInBytes=0;i.aiDataContract={level:_s.Required,method:_s.Required,assembly:_s.Default,fileName:_s.Default,line:_s.Default};if(typeof n==="string"){var a=n;i.level=r;i.method="<no_method>";i.assembly=Fs.trim(a);i.fileName="";i.line=0;var o=a.match(t.regex);if(o&&o.length>=5){i.method=Fs.trim(o[2])||i.method;i.fileName=Fs.trim(o[4]);i.line=parseInt(o[5])||0}}else{i.level=n.level;i.method=n.method;i.assembly=n.assembly;i.fileName=n.fileName;i.line=n.line;i.sizeInBytes=0}i.sizeInBytes+=i.method.length;i.sizeInBytes+=i.fileName.length;i.sizeInBytes+=i.assembly.length;i.sizeInBytes+=t.baseSize;i.sizeInBytes+=i.level.toString().length;i.sizeInBytes+=i.line.toString().length;return i}t.CreateFromInterface=function(e){return new t(e,null)};t.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}};t.regex=/^([\s]+at)?(.*?)(\@|\s\(|\s)([^\(\@\n]+):([0-9]+):([0-9]+)(\)?)$/;t.baseSize=58;return t}(Js);var au=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.metrics=[];t.properties={};t.measurements={};return t}return t}(Gs);var ou;(function(e){e[e["Measurement"]=0]="Measurement";e[e["Aggregation"]=1]="Aggregation"})(ou||(ou={}));var su=function(){function e(){this.kind=ou.Measurement}return e}();var uu=function(e){__extends(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;t.aiDataContract={name:_s.Required,kind:_s.Default,value:_s.Required,count:_s.Default,min:_s.Default,max:_s.Default,stdDev:_s.Default};return t}return t}(su);var cu=function(e){__extends(t,e);function t(t,n,r,i,a,o,s,u){var c=e.call(this)||this;c.aiDataContract={ver:_s.Required,metrics:_s.Required,properties:_s.Default};var l=new uu;l.count=i>0?i:undefined;l.max=isNaN(o)||o===null?undefined:o;l.min=isNaN(a)||a===null?undefined:a;l.name=Ts.sanitizeString(t,n)||Fs.NotSpecified;l.value=r;c.metrics=[l];c.properties=Ts.sanitizeProperties(t,s);c.measurements=Ts.sanitizeMeasurements(t,u);return c}t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric";t.dataType="MetricData";return t}(au);var lu=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.properties={};t.measurements={};return t}return t}(Ks);var fu=function(e){__extends(t,e);function t(t,n,r,i,a,o,s){var u=e.call(this)||this;u.aiDataContract={ver:_s.Required,name:_s.Default,url:_s.Default,duration:_s.Default,properties:_s.Default,measurements:_s.Default,id:_s.Default};u.id=Ts.sanitizeId(t,s);u.url=Ts.sanitizeUrl(t,r);u.name=Ts.sanitizeString(t,n)||Fs.NotSpecified;if(!isNaN(i)){u.duration=Fs.msToTimeSpan(i)}u.properties=Ts.sanitizeProperties(t,a);u.measurements=Ts.sanitizeMeasurements(t,o);return u}t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview";t.dataType="PageviewData";return t}(lu);var du=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.success=true;t.properties={};t.measurements={};return t}return t}(Gs);var pu=function(e){__extends(t,e);function t(t,n,r,i,a,o,s,u,c,l,f,d){if(c===void 0){c="Ajax"}var p=e.call(this)||this;p.aiDataContract={id:_s.Required,ver:_s.Required,name:_s.Default,resultCode:_s.Default,duration:_s.Default,success:_s.Default,data:_s.Default,target:_s.Default,type:_s.Default,properties:_s.Default,measurements:_s.Default,kind:_s.Default,value:_s.Default,count:_s.Default,min:_s.Default,max:_s.Default,stdDev:_s.Default,dependencyKind:_s.Default,dependencySource:_s.Default,commandName:_s.Default,dependencyTypeName:_s.Default};p.id=n;p.duration=Fs.msToTimeSpan(a);p.success=o;p.resultCode=s+"";p.type=Ts.sanitizeString(t,c);var h=Rs.ParseDependencyPath(t,r,u,i);p.data=Ts.sanitizeUrl(t,i)||h.data;p.target=Ts.sanitizeString(t,h.target);if(l){p.target=p.target+" | "+l}p.name=Ts.sanitizeString(t,h.name);p.properties=Ts.sanitizeProperties(t,f);p.measurements=Ts.sanitizeMeasurements(t,d);return p}t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency";t.dataType="RemoteDependencyData";return t}(du);var hu=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.properties={};t.measurements={};return t}return t}(Gs);var vu=function(e){__extends(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;o.aiDataContract={ver:_s.Required,message:_s.Required,severityLevel:_s.Default,properties:_s.Default};n=n||Fs.NotSpecified;o.message=Ts.sanitizeMessage(t,n);o.properties=Ts.sanitizeProperties(t,i);o.measurements=Ts.sanitizeMeasurements(t,a);if(r){o.severityLevel=r}return o}t.envelopeType="Microsoft.ApplicationInsights.{0}.Message";t.dataType="MessageData";return t}(hu);var mu=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.ver=2;t.properties={};t.measurements={};return t}return t}(lu);var gu=function(e){__extends(t,e);function t(t,n,r,i,a,o,s){var u=e.call(this)||this;u.aiDataContract={ver:_s.Required,name:_s.Default,url:_s.Default,duration:_s.Default,perfTotal:_s.Default,networkConnect:_s.Default,sentRequest:_s.Default,receivedResponse:_s.Default,domProcessing:_s.Default,properties:_s.Default,measurements:_s.Default};u.url=Ts.sanitizeUrl(t,r);u.name=Ts.sanitizeString(t,n)||Fs.NotSpecified;u.properties=Ts.sanitizeProperties(t,a);u.measurements=Ts.sanitizeMeasurements(t,o);if(s){u.domProcessing=s.domProcessing;u.duration=s.duration;u.networkConnect=s.networkConnect;u.perfTotal=s.perfTotal;u.receivedResponse=s.receivedResponse;u.sentRequest=s.sentRequest}return u}t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance";t.dataType="PageviewPerformanceData";return t}(mu);var yu=function(e){__extends(t,e);function t(t,n){var r=e.call(this)||this;r.aiDataContract={baseType:_s.Required,baseData:_s.Required};r.baseType=t;r.baseData=n;return r}return t}(zs);var bu;(function(e){e[e["Verbose"]=0]="Verbose";e[e["Information"]=1]="Information";e[e["Warning"]=2]="Warning";e[e["Error"]=3]="Error";e[e["Critical"]=4]="Critical"})(bu||(bu={}));var wu=function(){function e(){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"}return e}();var xu=function(){function e(){}e.create=function(e,t,n,r,i,a){n=Ts.sanitizeString(r,n)||Fs.NotSpecified;if(ja.isNullOrUndefined(e)||ja.isNullOrUndefined(t)||ja.isNullOrUndefined(n)){throw Error("Input doesn't contain all required fields")}var o={name:n,time:ja.toISOString(new Date),iKey:"",ext:a?a:{},tags:[],data:{},baseType:t,baseData:e};if(!ja.isNullOrUndefined(i)){Ba(i,(function(e,t){o.data[e]=t}))}return o};return e}();var Su=function(){function e(){}e.UserExt="user";e.DeviceExt="device";e.TraceExt="trace";e.WebExt="web";e.AppExt="app";e.OSExt="os";e.SessionExt="ses";e.SDKExt="sdk";return e}();var _u=new wu;var Iu="AppInsightsPropertiesPlugin";var Cu="AppInsightsChannelPlugin";var Tu="ApplicationInsightsAnalytics";
|
|
6
|
+
/*!
|
|
7
|
+
* Application Insights JavaScript SDK - Web Analytics, 2.5.10
|
|
8
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
9
|
+
*/var Eu=function(){function e(t,n,r,i){_o(e,this,(function(e){var a=ja.arrForEach;var o=ja.isNullOrUndefined;var s=null;var u=[];var c=false;var l;if(r){l=r.logger}function f(){if(r){a(r.getTransmissionControls(),(function(e){a(e,(function(e){return e.flush(true)}))}))}}function d(e){u.push(e);if(!s){s=setInterval((function(){var e=u.slice(0);var t=false;u=[];a(e,(function(e){if(!e()){u.push(e)}else{t=true}}));if(u.length===0){clearInterval(s);s=null}if(t){f()}}),100)}}e.trackPageView=function(e,r){var a=e.name;if(o(a)||typeof a!=="string"){var s=ia();a=e.name=s&&s.title||""}var u=e.uri;if(o(u)||typeof u!=="string"){var p=ca();u=e.uri=p&&p.href||""}if(!i.isPerformanceTimingSupported()){t.sendPageViewInternal(e,r);f();l.throwInternal(za.WARNING,Ha.NavigationTimingNotSupported,"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.");return}var h=false;var v;var m=i.getPerformanceTiming().navigationStart;if(m>0){v=Os.GetDuration(m,+new Date);if(!i.shouldCollectDuration(v)){v=undefined}}var g;if(!o(r)&&!o(r.duration)){g=r.duration}if(n||!isNaN(g)){if(isNaN(g)){if(!r){r={}}r["duration"]=v}t.sendPageViewInternal(e,r);f();h=true}var y=6e4;if(!r){r={}}d((function(){var n=false;try{if(i.isPerformanceTimingDataReady()){n=true;var o={name:a,uri:u};i.populatePageViewPerformanceEvent(o);if(!o.isValid&&!h){r["duration"]=v;t.sendPageViewInternal(e,r)}else{if(!h){r["duration"]=o.durationMs;t.sendPageViewInternal(e,r)}if(!c){t.sendPageViewPerformanceInternal(o,r);c=true}}}else if(m>0&&Os.GetDuration(m,+new Date)>y){n=true;if(!h){r["duration"]=y;t.sendPageViewInternal(e,r)}}}catch(e){l.throwInternal(za.CRITICAL,Ha.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}return n}))}}))}return e}();
|
|
10
|
+
/*!
|
|
11
|
+
* Application Insights JavaScript SDK - Web Analytics, 2.5.10
|
|
12
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
13
|
+
*/var Au=function(){function e(e,t){this.prevPageVisitDataKeyName="prevPageVisitData";this.pageVisitTimeTrackingHandler=t;this._logger=e}e.prototype.trackPreviousPageVisit=function(e,t){try{var n=this.restartPageVisitTimer(e,t);if(n){this.pageVisitTimeTrackingHandler(n.pageName,n.pageUrl,n.pageVisitTime)}}catch(e){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Fs.dump(e))}};e.prototype.restartPageVisitTimer=function(e,t){try{var n=this.stopPageVisitTimer();this.startPageVisitTimer(e,t);return n}catch(e){this._logger.warnToConsole("Call to restart failed: "+Fs.dump(e));return null}};e.prototype.startPageVisitTimer=function(e,t){try{if(Fs.canUseSessionStorage()){if(Fs.getSessionStorage(this._logger,this.prevPageVisitDataKeyName)!=null){throw new Error("Cannot call startPageVisit consecutively without first calling stopPageVisit")}var n=new ku(e,t);var r=pa().stringify(n);Fs.setSessionStorage(this._logger,this.prevPageVisitDataKeyName,r)}}catch(e){this._logger.warnToConsole("Call to start failed: "+Fs.dump(e))}};e.prototype.stopPageVisitTimer=function(){try{if(Fs.canUseSessionStorage()){var e=ja.dateNow();var t=Fs.getSessionStorage(this._logger,this.prevPageVisitDataKeyName);if(t&&da()){var n=pa().parse(t);n.pageVisitTime=e-n.pageVisitStartTime;Fs.removeSessionStorage(this._logger,this.prevPageVisitDataKeyName);return n}else{return null}}return null}catch(e){this._logger.warnToConsole("Stop page visit timer failed: "+Fs.dump(e));return null}};return e}();var ku=function(){function e(e,t){this.pageVisitStartTime=ja.dateNow();this.pageName=e;this.pageUrl=t}return e}();
|
|
14
|
+
/*!
|
|
15
|
+
* Application Insights JavaScript SDK - Web Analytics, 2.5.10
|
|
16
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
17
|
+
*/var Nu=function(){function e(e){this.MAX_DURATION_ALLOWED=36e5;if(e){this._logger=e.logger}}e.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=false;var t=this.getPerformanceNavigationTiming();var n=this.getPerformanceTiming();if(t||n){if(t){var r=t.duration;var i=Os.GetDuration(t.startTime,t.connectEnd);var a=Os.GetDuration(t.requestStart,t.responseStart);var o=Os.GetDuration(t.responseStart,t.responseEnd);var s=Os.GetDuration(t.responseEnd,t.loadEventEnd)}else{var r=Os.GetDuration(n.navigationStart,n.loadEventEnd);var i=Os.GetDuration(n.navigationStart,n.connectEnd);var a=Os.GetDuration(n.requestStart,n.responseStart);var o=Os.GetDuration(n.responseStart,n.responseEnd);var s=Os.GetDuration(n.responseEnd,n.loadEventEnd)}if(r===0){this._logger.throwInternal(za.WARNING,Ha.ErrorPVCalc,"error calculating page view performance.",{total:r,network:i,request:a,response:o,dom:s})}else if(!this.shouldCollectDuration(r,i,a,o,s)){this._logger.throwInternal(za.WARNING,Ha.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:r,network:i,request:a,response:o,dom:s})}else if(r<Math.floor(i)+Math.floor(a)+Math.floor(o)+Math.floor(s)){this._logger.throwInternal(za.WARNING,Ha.ClientPerformanceMathError,"client performance math error.",{total:r,network:i,request:a,response:o,dom:s})}else{e.durationMs=r;e.perfTotal=e.duration=Fs.msToTimeSpan(r);e.networkConnect=Fs.msToTimeSpan(i);e.sentRequest=Fs.msToTimeSpan(a);e.receivedResponse=Fs.msToTimeSpan(o);e.domProcessing=Fs.msToTimeSpan(s);e.isValid=true}}};e.prototype.getPerformanceTiming=function(){if(this.isPerformanceTimingSupported()){return fa().timing}return null};e.prototype.getPerformanceNavigationTiming=function(){if(this.isPerformanceNavigationTimingSupported()){return fa().getEntriesByType("navigation")[0]}return null};e.prototype.isPerformanceNavigationTimingSupported=function(){var e=fa();return e&&e.getEntriesByType&&e.getEntriesByType("navigation").length>0};e.prototype.isPerformanceTimingSupported=function(){var e=fa();return e&&e.timing};e.prototype.isPerformanceTimingDataReady=function(){var e=fa();var t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0};e.prototype.shouldCollectDuration=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var n=oa()||{};var r=["googlebot","adsbot-google","apis-google","mediapartners-google"];var i=n.userAgent;var a=false;if(i){for(var o=0;o<r.length;o++){a=a||i.toLowerCase().indexOf(r[o])!==-1}}if(a){return false}else{for(var o=0;o<e.length;o++){if(e[o]<0||e[o]>=this.MAX_DURATION_ALLOWED){return false}}}return true};return e}();
|
|
18
|
+
/*!
|
|
19
|
+
* Application Insights JavaScript SDK - Web Analytics, 2.5.10
|
|
20
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
21
|
+
*/var Fu="duration";function Pu(e,t){if(e&&e.dispatchEvent&&t){e.dispatchEvent(t)}}var Du=function(e){__extends(t,e);function t(){var t=e.call(this)||this;t.identifier=Tu;t.priority=180;t.autoRoutePVDelay=500;t._trackAjaxAttempts=0;var n=ca();t._prevUri=n&&n.href||"";return t}t.getDefaultConfig=function(e){if(!e){e={}}e.sessionRenewalMs=30*60*1e3;e.sessionExpirationMs=24*60*60*1e3;e.disableExceptionTracking=Fs.stringToBoolOrDefault(e.disableExceptionTracking);e.autoTrackPageVisitTime=Fs.stringToBoolOrDefault(e.autoTrackPageVisitTime);e.overridePageViewDuration=Fs.stringToBoolOrDefault(e.overridePageViewDuration);e.enableUnhandledPromiseRejectionTracking=Fs.stringToBoolOrDefault(e.enableUnhandledPromiseRejectionTracking);if(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100){e.samplingPercentage=100}e.isCookieUseDisabled=Fs.stringToBoolOrDefault(e.isCookieUseDisabled);e.isStorageUseDisabled=Fs.stringToBoolOrDefault(e.isStorageUseDisabled);e.isBrowserLinkTrackingEnabled=Fs.stringToBoolOrDefault(e.isBrowserLinkTrackingEnabled);e.enableAutoRouteTracking=Fs.stringToBoolOrDefault(e.enableAutoRouteTracking);e.namePrefix=e.namePrefix||"";return e};t.prototype.processTelemetry=function(e,t){var n=this;Oo(this.core,(function(){return n.identifier+":processTelemetry"}),(function(){var r=false;var i=n._telemetryInitializers.length;t=n._getTelCtx(t);for(var a=0;a<i;++a){var o=n._telemetryInitializers[a];if(o){try{if(o.apply(null,[e])===false){r=true;break}}catch(e){t.diagLog().throwInternal(za.CRITICAL,Ha.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Fs.getExceptionName(e),{exception:Fs.dump(e)},true)}}}if(!r){n.processNext(e,t)}}),(function(){return{item:e}}),!e.sync)};t.prototype.trackEvent=function(e,t){try{var n=xu.create(e,Xs.dataType,Xs.envelopeType,this.diagLog(),t);this.core.track(n)}catch(e){this.diagLog().throwInternal(za.WARNING,Ha.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.startTrackEvent=function(e){try{this._eventTracking.start(e)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.stopTrackEvent=function(e,t,n){try{this._eventTracking.stop(e,undefined,t)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.trackTrace=function(e,t){try{var n=xu.create(e,vu.dataType,vu.envelopeType,this.diagLog(),t);this.core.track(n)}catch(e){this.diagLog().throwInternal(za.WARNING,Ha.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.trackMetric=function(e,t){try{var n=xu.create(e,cu.dataType,cu.envelopeType,this.diagLog(),t);this.core.track(n)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.trackPageView=function(e,t){try{var n=e||{};this._pageViewManager.trackPageView(n,__assign({},n.properties,n.measurements,t));if(this.config.autoTrackPageVisitTime){this._pageVisitTimeManager.trackPreviousPageVisit(n.name,n.uri)}}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.TrackPVFailed,"trackPageView failed, page view will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.sendPageViewInternal=function(e,t,n){var r=ia();if(r){e.refUri=e.refUri===undefined?r.referrer:e.refUri}var i=xu.create(e,fu.dataType,fu.envelopeType,this.diagLog(),t,n);this.core.track(i);this._trackAjaxAttempts=0};t.prototype.sendPageViewPerformanceInternal=function(e,t,n){var r=xu.create(e,gu.dataType,gu.envelopeType,this.diagLog(),t,n);this.core.track(r)};t.prototype.trackPageViewPerformance=function(e,t){try{this._pageViewPerformanceManager.populatePageViewPerformanceEvent(e);this.sendPageViewPerformanceInternal(e,t)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.TrackPVFailed,"trackPageViewPerformance failed, page view will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.startTrackPage=function(e){try{if(typeof e!=="string"){var t=ia();e=t&&t.title||""}this._pageTracking.start(e)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.stopTrackPage=function(e,t,n,r){try{if(typeof e!=="string"){var i=ia();e=i&&i.title||""}if(typeof t!=="string"){var a=ca();t=a&&a.href||""}this._pageTracking.stop(e,t,n,r);if(this.config.autoTrackPageVisitTime){this._pageVisitTimeManager.trackPreviousPageVisit(e,t)}}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype.sendExceptionInternal=function(e,t,n){var r=new nu(this.diagLog(),e.exception||new Error(Fs.NotSpecified),e.properties,e.measurements,e.severityLevel,e.id).toInterface();var i=xu.create(r,nu.dataType,nu.envelopeType,this.diagLog(),t,n);this.core.track(i)};t.prototype.trackException=function(e,t){try{this.sendExceptionInternal(e,t)}catch(e){this.diagLog().throwInternal(za.CRITICAL,Ha.TrackExceptionFailed,"trackException failed, exception will not be collected: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}};t.prototype._onerror=function(e){try{var t={url:e&&e.url||(ia()||{}).URL,lineNumber:e.lineNumber,columnNumber:e.columnNumber,message:e.message};if(Fs.isCrossOriginError(e.message,e.url,e.lineNumber,e.columnNumber,e.error)){this._sendCORSException(t.url)}else{if(!Fs.isError(e.error)){var n="window.onerror@"+t.url+":"+e.lineNumber+":"+(e.columnNumber||0);e.error=new Error(e.message);e.error.stack=n}this.trackException({exception:e.error,severityLevel:bu.Error},t)}}catch(t){var r=e.error?e.error.name+", "+e.error.message:"null";this.diagLog().throwInternal(za.CRITICAL,Ha.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+Fs.getExceptionName(t),{exception:Fs.dump(t),errorString:r})}};t.prototype.addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)};t.prototype.initialize=function(n,r,i,a){var o=this;if(this.isInitialized()){return}if(ja.isNullOrUndefined(r)){throw Error("Error initializing")}e.prototype.initialize.call(this,n,r,i,a);this.setInitialized(false);var s=this._getTelCtx();var u=this.identifier;this._globalconfig={instrumentationKey:n.instrumentationKey,endpointUrl:n.endpointUrl||"https://dc.services.visualstudio.com/v2/track"};this.config=s.getExtCfg(u);var c=t.getDefaultConfig();if(c!==undefined){Ba(c,(function(e,t){o.config[e]=s.getConfig(u,e,t)}));if(this._globalconfig){Ba(c,(function(e,t){if(o._globalconfig[e]===undefined){o._globalconfig[e]=t}}))}}if(this.config.isCookieUseDisabled){Fs.disableCookies()}if(this.config.isStorageUseDisabled){Fs.disableStorage()}var l={instrumentationKey:function(){return n.instrumentationKey},accountId:function(){return o.config.accountId||n.accountId},sessionRenewalMs:function(){return o.config.sessionRenewalMs||n.sessionRenewalMs},sessionExpirationMs:function(){return o.config.sessionExpirationMs||n.sessionExpirationMs},sampleRate:function(){return o.config.samplingPercentage||n.samplingPercentage},cookieDomain:function(){return o.config.cookieDomain||n.cookieDomain},sdkExtension:function(){return o.config.sdkExtension||n.sdkExtension},isBrowserLinkTrackingEnabled:function(){return o.config.isBrowserLinkTrackingEnabled||n.isBrowserLinkTrackingEnabled},appId:function(){return o.config.appId||n.appId}};this._pageViewPerformanceManager=new Nu(this.core);this._pageViewManager=new Eu(this,this.config.overridePageViewDuration,this.core,this._pageViewPerformanceManager);this._pageVisitTimeManager=new Au(this.diagLog(),(function(e,t,n){return o.trackPageVisitTime(e,t,n)}));this._telemetryInitializers=this._telemetryInitializers||[];this._addDefaultTelemetryInitializers(l);this._eventTracking=new Ru(this.diagLog(),"trackEvent");this._eventTracking.action=function(e,t,n,r){if(!r){r={}}r[Fu]=n.toString();o.trackEvent({name:e,properties:r})};this._pageTracking=new Ru(this.diagLog(),"trackPageView");this._pageTracking.action=function(e,t,n,r,i){if(ja.isNullOrUndefined(r)){r={}}r[Fu]=n.toString();var a={name:e,uri:t,properties:r,measurements:i};o.sendPageViewInternal(a,r)};var f=na();var d=ua();var p=ca();var h=this;if(this.config.disableExceptionTracking===false&&!this.config.autoExceptionInstrumented&&f){var v="onerror";var m=f[v];f.onerror=function(e,t,n,r,i){var a=m&&m(e,t,n,r,i);if(a!==true){h._onerror({message:e,url:t,lineNumber:n,columnNumber:r,error:i})}return a};this.config.autoExceptionInstrumented=true}if(this.config.disableExceptionTracking===false&&this.config.enableUnhandledPromiseRejectionTracking===true&&!this.config.autoUnhandledPromiseInstrumented&&f){var g="onunhandledrejection";var y=f[g];f[g]=function(e){var t=y&&y.call(f,e);if(t!==true){h._onerror({message:e.reason.toString(),error:e.reason instanceof Error?e.reason:new Error(e.reason.toString()),url:p?p.href:"",lineNumber:0,columnNumber:0})}return t};this.config.autoUnhandledPromiseInstrumented=true}if(this.config.enableAutoRouteTracking===true&&d&&ja.isFunction(d.pushState)&&ja.isFunction(d.replaceState)&&f&&typeof Event!=="undefined"){var b=this;ja.arrForEach(i,(function(e){if(e.identifier===Iu){o._properties=e}}));d.pushState=function(e){return function t(){var n=e.apply(this,arguments);Pu(f,Fs.createDomEvent(b.config.namePrefix+"pushState"));Pu(f,Fs.createDomEvent(b.config.namePrefix+"locationchange"));return n}}(d.pushState);d.replaceState=function(e){return function t(){var n=e.apply(this,arguments);Pu(f,Fs.createDomEvent(b.config.namePrefix+"replaceState"));Pu(f,Fs.createDomEvent(b.config.namePrefix+"locationchange"));return n}}(d.replaceState);if(f.addEventListener){f.addEventListener(b.config.namePrefix+"popstate",(function(){Pu(f,Fs.createDomEvent(b.config.namePrefix+"locationchange"))}));f.addEventListener(b.config.namePrefix+"locationchange",(function(){if(b._properties&&b._properties.context&&b._properties.context.telemetryTrace){b._properties.context.telemetryTrace.traceID=Fs.generateW3CId();b._properties.context.telemetryTrace.name=p&&p.pathname||"_unknown_"}if(o._currUri){o._prevUri=o._currUri;o._currUri=p&&p.href||""}else{o._currUri=p&&p.href||""}setTimeout(function(e){b.trackPageView({refUri:e,properties:{duration:0}})}.bind(o,o._prevUri),b.autoRoutePVDelay)}))}}this.setInitialized(true)};t.prototype.trackPageVisitTime=function(e,t,n){var r={PageName:e,PageUrl:t};this.trackMetric({name:"PageVisitTime",average:n,max:n,min:n,sampleCount:1},r)};t.prototype._addDefaultTelemetryInitializers=function(e){if(!e.isBrowserLinkTrackingEnabled()){var t=["/browserLinkSignalR/","/__browserLink/"];var n=function(e){if(e.baseType===pu.dataType){var n=e.baseData;if(n){for(var r=0;r<t.length;r++){if(n.target&&n.target.indexOf(t[r])>=0){return false}}}}return true};this._addTelemetryInitializer(n)}};t.prototype._addTelemetryInitializer=function(e){this._telemetryInitializers.push(e)};t.prototype._sendCORSException=function(e){var t={message:"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",url:e,lineNumber:0,columnNumber:0,error:undefined};var n=xu.create(t,nu.dataType,nu.envelopeType,this.diagLog(),{url:e});this.core.track(n)};t.Version="2.5.10";return t}(Wo);var Ru=function(){function e(e,t){this._name=t;this._events={};this._logger=e}e.prototype.start=function(e){if(typeof this._events[e]!=="undefined"){this._logger.throwInternal(za.WARNING,Ha.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:this._name,key:e},true)}this._events[e]=+new Date};e.prototype.stop=function(e,t,n,r){var i=this._events[e];if(isNaN(i)){this._logger.throwInternal(za.WARNING,Ha.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:this._name,key:e},true)}else{var a=+new Date;var o=Os.GetDuration(i,a);this.action(e,t,o,n,r)}delete this._events[e];this._events[e]=undefined};return e}();
|
|
22
|
+
/*!
|
|
23
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
24
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
25
|
+
*/var Ou=function(){function e(t){var n=[];_o(e,this,(function(e){e.enqueue=function(e){n.push(e)};e.count=function(){return n.length};e.clear=function(){n.length=0};e.getItems=function(){return n.slice(0)};e.batchPayloads=function(e){if(e&&e.length>0){var n=t.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]";return n}return null};e.markAsSent=function(t){e.clear()};e.clearSent=function(e){}}))}return e}();var Mu=function(){function e(t,n){var r=false;var i;_o(e,this,(function(a){var o=c(e.BUFFER_KEY);var s=c(e.SENT_BUFFER_KEY);i=o.concat(s);if(i.length>e.MAX_BUFFER_SIZE){i.length=e.MAX_BUFFER_SIZE}l(e.SENT_BUFFER_KEY,[]);l(e.BUFFER_KEY,i);a.enqueue=function(n){if(i.length>=e.MAX_BUFFER_SIZE){if(!r){t.throwInternal(za.WARNING,Ha.SessionStorageBufferFull,"Maximum buffer size reached: "+i.length,true);r=true}return}i.push(n);l(e.BUFFER_KEY,i)};a.count=function(){return i.length};a.clear=function(){i=[];l(e.BUFFER_KEY,[]);l(e.SENT_BUFFER_KEY,[]);r=false};a.getItems=function(){return i.slice(0)};a.batchPayloads=function(e){if(e&&e.length>0){var t=n.emitLineDelimitedJson()?e.join("\n"):"["+e.join(",")+"]";return t}return null};a.markAsSent=function(n){i=u(n,i);l(e.BUFFER_KEY,i);var r=c(e.SENT_BUFFER_KEY);if(r instanceof Array&&n instanceof Array){r=r.concat(n);if(r.length>e.MAX_BUFFER_SIZE){t.throwInternal(za.CRITICAL,Ha.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+r.length,true);r.length=e.MAX_BUFFER_SIZE}l(e.SENT_BUFFER_KEY,r)}};a.clearSent=function(t){var n=c(e.SENT_BUFFER_KEY);n=u(t,n);l(e.SENT_BUFFER_KEY,n)};function u(e,t){var n=[];ja.arrForEach(t,(function(t){if(!ja.isFunction(t)&&ja.arrIndexOf(e,t)===-1){n.push(t)}}));return n}function c(e){var r=e;try{r=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+r:r;var i=Fs.getSessionStorage(t,r);if(i){var a=pa().parse(i);if(ja.isString(a)){a=pa().parse(a)}if(a&&Fs.isArray(a)){return a}}}catch(e){t.throwInternal(za.CRITICAL,Ha.FailedToRestoreStorageBuffer," storage key: "+r+", "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}return[]}function l(e,r){var i=e;try{i=n.namePrefix&&n.namePrefix()?n.namePrefix()+"_"+i:i;var a=JSON.stringify(r);Fs.setSessionStorage(t,i,a)}catch(e){Fs.setSessionStorage(t,i,JSON.stringify([]));t.throwInternal(za.WARNING,Ha.FailedToSetStorageBuffer," storage key: "+i+", "+Fs.getExceptionName(e)+". Buffer cleared",{exception:Fs.dump(e)})}}}))}e.BUFFER_KEY="AI_buffer";e.SENT_BUFFER_KEY="AI_sentBuffer";e.MAX_BUFFER_SIZE=2e3;return e}();
|
|
26
|
+
/*!
|
|
27
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
28
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
29
|
+
*/var Lu="baseType";var Uu="baseData";var Bu="properties";var ju="true";var Vu=ja.isNullOrUndefined;function qu(e,t,n){if(e&&n){e[t]=n;return e[t]}return null}var zu=function(){function e(){}e.extractPropsAndMeasurements=function(e,t,n){if(!Vu(e)){Ba(e,(function(e,r){if(ja.isNumber(r)){n[e]=r}else if(ja.isString(r)){t[e]=r}else if(da()){t[e]=pa().stringify(r)}}))}};e.createEnvelope=function(t,n,r,i){var a=new Ws(t,i,n);qu(a,"sampleRate",r[Ls]);if((r[Uu]||{}).startTime){a.time=ja.toISOString(r[Uu].startTime)}a.iKey=r.iKey;var o=r.iKey.replace(/-/g,"");a.name=a.name.replace("{0}",o);e.extractPartAExtensions(r,a);r.tags=r.tags||[];return a};e.extractPartAExtensions=function(t,n){var r=n.tags=n.tags||{};var i=t.ext=t.ext||{};var a=t.tags=t.tags||[];var o=i.user;if(o){qu(r,_u.userAuthUserId,o.authId);qu(r,_u.userId,o.id||o.localId)}var s=i.app;if(s){qu(r,_u.sessionId,s.sesId)}var u=i.device;if(u){qu(r,_u.deviceId,u.id||u.localId);qu(r,_u.deviceType,u.deviceClass);qu(r,_u.deviceIp,u.ip);qu(r,_u.deviceModel,u.model);qu(r,_u.deviceType,u.deviceType)}var c=t.ext.web;if(c){qu(r,_u.deviceLanguage,c.browserLang);qu(r,_u.deviceBrowserVersion,c.browserVer);qu(r,_u.deviceBrowser,c.browser);var l=n.data=n.data||{};var f=l[Uu]=l[Uu]||{};var d=f[Bu]=f[Bu]||{};qu(d,"domain",c.domain);qu(d,"isManual",c.isManual?ju:null);qu(d,"screenRes",c.screenRes);qu(d,"userConsent",c.userConsent?ju:null)}var p=i.os;if(p){qu(r,_u.deviceOS,p.name)}var h=i.trace;if(h){qu(r,_u.operationParentId,h.parentID);qu(r,_u.operationName,h.name);qu(r,_u.operationId,h.traceID)}var v={};for(var m=a.length-1;m>=0;m--){var g=a[m];Ba(g,(function(e,t){v[e]=t}));a.splice(m,1)}Ba(a,(function(e,t){v[e]=t}));n.tags=__assign({},r,v);if(!n.tags[_u.internalSdkVersion]){n.tags[_u.internalSdkVersion]="javascript:"+e.Version}};e.prototype.Init=function(e,t){this._logger=e;if(Vu(t[Uu])){this._logger.throwInternal(za.CRITICAL,Ha.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")}};e.Version="2.5.10";return e}();var Hu=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Uu].measurements||{};var i=n[Uu][Bu]||{};zu.extractPropsAndMeasurements(n.data,i,r);var a=n[Uu];if(Vu(a)){t.warnToConsole("Invalid input for dependency data");return null}var o=a[Bu]&&a[Bu][Bs]?a[Bu][Bs]:"GET";var s=new pu(t,a.id,a.target,a.name,a.duration,a.success,a.responseCode,o,a.type,a.correlationContext,i,r);var u=new yu(pu.dataType,s);return zu.createEnvelope(t,pu.envelopeType,n,u)};t.DependencyEnvelopeCreator=new t;return t}(zu);var Wu=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r={};var i={};if(n[Lu]!==Xs.dataType){r["baseTypeSource"]=n[Lu]}if(n[Lu]===Xs.dataType){r=n[Uu][Bu]||{};i=n[Uu].measurements||{}}else{if(n[Uu]){zu.extractPropsAndMeasurements(n[Uu],r,i)}}zu.extractPropsAndMeasurements(n.data,r,i);var a=n[Uu].name;var o=new Xs(t,a,r,i);var s=new yu(Xs.dataType,o);return zu.createEnvelope(t,Xs.envelopeType,n,s)};t.EventEnvelopeCreator=new t;return t}(zu);var Gu=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Uu].measurements||{};var i=n[Uu][Bu]||{};zu.extractPropsAndMeasurements(n.data,i,r);var a=n[Uu];var o=nu.CreateFromInterface(t,a,i,r);var s=new yu(nu.dataType,o);return zu.createEnvelope(t,nu.envelopeType,n,s)};t.ExceptionEnvelopeCreator=new t;return t}(zu);var Ku=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Uu];var i=r[Bu]||{};var a=r.measurements||{};zu.extractPropsAndMeasurements(n.data,i,a);var o=new cu(t,r.name,r.average,r.sampleCount,r.min,r.max,i,a);var s=new yu(cu.dataType,o);return zu.createEnvelope(t,cu.envelopeType,n,s)};t.MetricEnvelopeCreator=new t;return t}(zu);var Xu=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r="duration";var i;var a=n[Uu];if(!Vu(a)&&!Vu(a[Bu])&&!Vu(a[Bu][r])){i=a[Bu][r];delete a[Bu][r]}else if(!Vu(n.data)&&!Vu(n.data[r])){i=n.data[r];delete n.data[r]}var o=n[Uu];var s;if(((n.ext||{}).trace||{}).traceID){s=n.ext.trace.traceID}var u=o.id||s;var c=o.name;var l=o.uri;var f=o[Bu]||{};var d=o.measurements||{};if(!Vu(o.refUri)){f["refUri"]=o.refUri}if(!Vu(o.pageType)){f["pageType"]=o.pageType}if(!Vu(o.isLoggedIn)){f["isLoggedIn"]=o.isLoggedIn.toString()}if(!Vu(o[Bu])){var p=o[Bu];Ba(p,(function(e,t){f[e]=t}))}zu.extractPropsAndMeasurements(n.data,f,d);var h=new fu(t,c,l,i,f,d,u);var v=new yu(fu.dataType,h);return zu.createEnvelope(t,fu.envelopeType,n,v)};t.PageViewEnvelopeCreator=new t;return t}(zu);var Ju=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Uu];var i=r.name;var a=r.uri||r.url;var o=r[Bu]||{};var s=r.measurements||{};zu.extractPropsAndMeasurements(n.data,o,s);var u=new gu(t,i,a,undefined,o,s,r);var c=new yu(gu.dataType,u);return zu.createEnvelope(t,gu.envelopeType,n,c)};t.PageViewPerformanceEnvelopeCreator=new t;return t}(zu);var Yu=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.Create=function(t,n){e.prototype.Init.call(this,t,n);var r=n[Uu].message;var i=n[Uu].severityLevel;var a=n[Uu][Bu]||{};var o=n[Uu].measurements||{};zu.extractPropsAndMeasurements(n.data,a,o);var s=new vu(t,r,i,a,o);var u=new yu(vu.dataType,s);return zu.createEnvelope(t,vu.envelopeType,n,u)};t.TraceEnvelopeCreator=new t;return t}(zu);
|
|
30
|
+
/*!
|
|
31
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
32
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
33
|
+
*/var Qu=function(){function e(t){_o(e,this,(function(e){e.serialize=function(e){var r=n(e,"root");try{return pa().stringify(r)}catch(e){t.throwInternal(za.CRITICAL,Ha.CannotSerializeObject,e&&ja.isFunction(e.toString)?e.toString():"Error serializing object",null,true)}};function n(e,a){var o="__aiCircularRefCheck";var s={};if(!e){t.throwInternal(za.CRITICAL,Ha.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:a},true);return s}if(e[o]){t.throwInternal(za.WARNING,Ha.CircularReferenceDetected,"Circular reference detected while serializing object",{name:a},true);return s}if(!e.aiDataContract){if(a==="measurements"){s=i(e,"number",a)}else if(a==="properties"){s=i(e,"string",a)}else if(a==="tags"){s=i(e,"string",a)}else if(Fs.isArray(e)){s=r(e,a)}else{t.throwInternal(za.WARNING,Ha.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:a},true);try{pa().stringify(e);s=e}catch(e){t.throwInternal(za.CRITICAL,Ha.CannotSerializeObject,e&&ja.isFunction(e.toString)?e.toString():"Error serializing object",null,true)}}return s}e[o]=true;Ba(e.aiDataContract,(function(i,o){var u=ja.isFunction(o)?o()&_s.Required:o&_s.Required;var c=ja.isFunction(o)?o()&_s.Hidden:o&_s.Hidden;var l=o&_s.Array;var f=e[i]!==undefined;var d=ja.isObject(e[i])&&e[i]!==null;if(u&&!f&&!l){t.throwInternal(za.CRITICAL,Ha.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:i,name:a})}else if(!c){var p=void 0;if(d){if(l){p=r(e[i],i)}else{p=n(e[i],i)}}else{p=e[i]}if(p!==undefined){s[i]=p}}}));delete e[o];return s}function r(e,r){var i;if(!!e){if(!Fs.isArray(e)){t.throwInternal(za.CRITICAL,Ha.ItemNotInArray,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:r},true)}else{i=[];for(var a=0;a<e.length;a++){var o=e[a];var s=n(o,r+"["+a+"]");i.push(s)}}}return i}function i(e,n,r){var i;if(e){i={};Ba(e,(function(e,a){if(n==="string"){if(a===undefined){i[e]="undefined"}else if(a===null){i[e]="null"}else if(!a.toString){i[e]="invalid field: toString() is not defined."}else{i[e]=a.toString()}}else if(n==="number"){if(a===undefined){i[e]="undefined"}else if(a===null){i[e]="null"}else{var o=parseFloat(a);if(isNaN(o)){i[e]="NaN"}else{i[e]=o}}}else{i[e]="invalid field: "+r+" is of unknown type.";t.throwInternal(za.CRITICAL,i[e],null,true)}}))}return i}}))}return e}();
|
|
34
|
+
/*!
|
|
35
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
36
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
37
|
+
*/var $u=function(){function e(){var t=na();var n=ia();var r=false;var i=true;_o(e,this,(function(e){try{if(t){if(qa.Attach(t,"online",o)){qa.Attach(t,"offline",s);r=true}}if(n){var a=n.body||n;if(!ja.isUndefined(a.ononline)){a.ononline=o;a.onoffline=s;r=true}}}catch(e){r=false}e.isListening=r;e.isOnline=function(){var e=true;var t=oa();if(r){e=i}else if(t&&!ja.isNullOrUndefined(t.onLine)){e=t.onLine}return e};e.isOffline=function(){return!e.isOnline()};function o(){i=true}function s(){i=false}}))}e.Offline=new e;return e}();var Zu=$u.Offline;
|
|
38
|
+
/*!
|
|
39
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
40
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
41
|
+
*/var ec=function(){function e(){}e.prototype.getHashCodeScore=function(t){var n=this.getHashCode(t)/e.INT_MAX_VALUE;return n*100};e.prototype.getHashCode=function(t){if(t===""){return 0}while(t.length<e.MIN_INPUT_LENGTH){t=t.concat(t)}var n=5381;for(var r=0;r<t.length;++r){n=(n<<5)+n+t.charCodeAt(r);n=n&n}return Math.abs(n)};e.INT_MAX_VALUE=2147483647;e.MIN_INPUT_LENGTH=8;return e}();
|
|
42
|
+
/*!
|
|
43
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
44
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
45
|
+
*/var tc=function(){function e(){this.hashCodeGeneragor=new ec;this.keys=new wu}e.prototype.getSamplingScore=function(e){var t=0;if(e.tags&&e.tags[this.keys.userId]){t=this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId])}else if(e.ext&&e.ext.user&&e.ext.user.id){t=this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id)}else if(e.tags&&e.tags[this.keys.operationId]){t=this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId])}else if(e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID){t=this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID)}else{t=Math.random()*100}return t};return e}();
|
|
46
|
+
/*!
|
|
47
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
48
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
49
|
+
*/var nc=function(){function e(e,t){this.INT_MAX_VALUE=2147483647;this._logger=ja.isNullOrUndefined(t)?new No:t;if(e>100||e<0){this._logger.throwInternal(za.WARNING,Ha.SampleRateOutOfRange,"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:e},true);this.sampleRate=100}this.sampleRate=e;this.samplingScoreGenerator=new tc}e.prototype.isSampledIn=function(e){var t=this.sampleRate;var n=false;if(t===null||t===undefined||t>=100){return true}else if(e.baseType===cu.dataType){return true}n=this.samplingScoreGenerator.getSamplingScore(e)<t;return n};return e}();
|
|
50
|
+
/*!
|
|
51
|
+
* Application Insights JavaScript SDK - Channel, 2.5.10
|
|
52
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
53
|
+
*/function rc(e){try{return e.responseText}catch(e){}return null}var ic=function(e){__extends(t,e);function t(){var n=e.call(this)||this;n.priority=1001;n.identifier=Cu;n._XMLHttpRequestSupported=false;var r;var i;var a;var o;_o(t,n,(function(e,s){function u(){throw new Error("Method not implemented.")}e.pause=u;e.resume=u;e.flush=function(){try{e.triggerSend(true,null,1)}catch(t){e.diagLog().throwInternal(za.CRITICAL,Ha.FlushFailed,"flush failed, telemetry will not be collected: "+Fs.getExceptionName(t),{exception:Fs.dump(t)})}};e.onunloadFlush=function(){if((e._senderConfig.onunloadDisableBeacon()===false||e._senderConfig.isBeaconApiDisabled()===false)&&Fs.IsBeaconApiSupported()){try{e.triggerSend(true,l,2)}catch(t){e.diagLog().throwInternal(za.CRITICAL,Ha.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Fs.getExceptionName(t),{exception:Fs.dump(t)})}}else{e.flush()}};e.teardown=u;e.initialize=function(n,a,u,c){s.initialize(n,a,u,c);var d=e._getTelCtx();var p=e.identifier;o=new Qu(a.logger);r=0;i=null;e._sender=null;var h=t._getDefaultAppInsightsChannelConfig();e._senderConfig=t._getEmptyAppInsightsChannelConfig();Ba(h,(function(t,n){e._senderConfig[t]=function(){return d.getConfig(p,t,n())}}));e._buffer=e._senderConfig.enableSessionStorageBuffer()&&Fs.canUseSessionStorage()?new Mu(e.diagLog(),e._senderConfig):new Ou(e._senderConfig);e._sample=new nc(e._senderConfig.samplingPercentage(),e.diagLog());if(!S(n)){e.diagLog().throwInternal(za.CRITICAL,Ha.InvalidInstrumentationKey,"Invalid Instrumentation key "+n.instrumentationKey)}if(!e._senderConfig.isBeaconApiDisabled()&&Fs.IsBeaconApiSupported()){e._sender=l}else{if(typeof XMLHttpRequest!==undefined){var v=ea("XMLHttpRequest");if(v){var m=new v;if("withCredentials"in m){e._sender=f;e._XMLHttpRequestSupported=true}else if(typeof XDomainRequest!==undefined){e._sender=y}}}}};e.processTelemetry=function(n,r){r=e._getTelCtx(r);try{if(e._senderConfig.disableTelemetry()){return}if(!n){r.diagLog().throwInternal(za.CRITICAL,Ha.CannotSendEmptyTelemetry,"Cannot send empty telemetry");return}if(n.baseData&&!n.baseType){r.diagLog().throwInternal(za.CRITICAL,Ha.InvalidEvent,"Cannot send telemetry without baseData and baseType");return}if(!n.baseType){n.baseType="EventData"}if(!e._sender){r.diagLog().throwInternal(za.CRITICAL,Ha.SenderNotInitialized,"Sender was not initialized");return}if(!c(n)){r.diagLog().throwInternal(za.WARNING,Ha.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:e._sample.sampleRate});return}else{n[Ls]=e._sample.sampleRate}var i=t.constructEnvelope(n,e._senderConfig.instrumentationKey(),r.diagLog());if(!i){r.diagLog().throwInternal(za.CRITICAL,Ha.CreateEnvelopeError,"Unable to create an AppInsights envelope");return}var a=false;if(n.tags&&n.tags[Us]){ja.arrForEach(n.tags[Us],(function(e){try{if(e&&e(i)===false){a=true;r.diagLog().warnToConsole("Telemetry processor check returns false")}}catch(e){r.diagLog().throwInternal(za.CRITICAL,Ha.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+Fs.getExceptionName(e),{exception:Fs.dump(e)},true)}}));delete n.tags[Us]}if(a){return}var s=o.serialize(i);var u=e._buffer.getItems();var l=e._buffer.batchPayloads(u);if(l&&l.length+s.length>e._senderConfig.maxBatchSizeInBytes()){e.triggerSend(true,null,10)}e._buffer.enqueue(s);v()}catch(e){r.diagLog().throwInternal(za.WARNING,Ha.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}e.processNext(n,r)};e._xhrReadyStateChange=function(t,n,i){if(t.readyState===4){var a=null;if(!e._appId){a=d(rc(t)||t.response);if(a&&a.appId){e._appId=a.appId}}if((t.status<200||t.status>=300)&&t.status!==0){if(!e._senderConfig.isRetryDisabled()&&m(t.status)){p(n);e.diagLog().throwInternal(za.WARNING,Ha.TransmissionFailed,". "+"Response code "+t.status+". Will retry to send "+n.length+" items.")}else{e._onError(n,g(t))}}else if(Zu.isOffline()){if(!e._senderConfig.isRetryDisabled()){var o=10;p(n,o);e.diagLog().throwInternal(za.WARNING,Ha.TransmissionFailed,". Offline - Response Code: "+t.status+". Offline status: "+Zu.isOffline()+". Will retry to send "+n.length+" items.")}}else{if(t.status===206){if(!a){a=d(rc(t)||t.response)}if(a&&!e._senderConfig.isRetryDisabled()){e._onPartialSuccess(n,a)}else{e._onError(n,g(t))}}else{r=0;e._onSuccess(n,i)}}}};e.triggerSend=function(t,r,o){if(t===void 0){t=true}try{if(!e._senderConfig.disableTelemetry()){if(e._buffer.count()>0){var s=e._buffer.getItems();x(o||0,t);if(r){r.call(n,s,t)}else{e._sender(s,t)}}}else{e._buffer.clear()}clearTimeout(a);a=null;i=null}catch(t){var u=Fs.getIEVersion();if(!u||u>9){e.diagLog().throwInternal(za.CRITICAL,Ha.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+Fs.getExceptionName(t),{exception:Fs.dump(t)})}}};e._onError=function(t,n,r){e.diagLog().throwInternal(za.WARNING,Ha.OnError,"Failed to send telemetry.",{message:n});e._buffer.clearSent(t)};e._onPartialSuccess=function(t,n){var r=[];var i=[];var a=n.errors.reverse();for(var o=0,s=a;o<s.length;o++){var u=s[o];var c=t.splice(u.index,1)[0];if(m(u.statusCode)){i.push(c)}else{r.push(c)}}if(t.length>0){e._onSuccess(t,n.itemsAccepted)}if(r.length>0){e._onError(r,g(null,["partial success",n.itemsAccepted,"of",n.itemsReceived].join(" ")))}if(i.length>0){p(i);e.diagLog().throwInternal(za.WARNING,Ha.TransmissionFailed,"Partial success. "+"Delivered: "+t.length+", Failed: "+r.length+". Will retry to send "+i.length+" our of "+n.itemsReceived+" items")}};e._onSuccess=function(t,n){e._buffer.clearSent(t)};e._xdrOnLoad=function(t,n){var i=rc(t);if(t&&(i+""==="200"||i==="")){r=0;e._onSuccess(n,0)}else{var a=d(i);if(a&&a.itemsReceived&&a.itemsReceived>a.itemsAccepted&&!e._senderConfig.isRetryDisabled()){e._onPartialSuccess(n,a)}else{e._onError(n,b(t))}}};function c(t){return e._sample.isSampledIn(t)}function l(t,n){var r=e._senderConfig.endpointUrl();var i=e._buffer.batchPayloads(t);var a=new Blob([i],{type:"text/plain;charset=UTF-8"});var o=oa().sendBeacon(r,a);if(o){e._buffer.markAsSent(t);e._onSuccess(t,t.length)}else{f(t,true);e.diagLog().throwInternal(za.WARNING,Ha.TransmissionFailed,". "+"Failed to send telemetry with Beacon API, retried with xhrSender.")}}function f(t,n){var r=new XMLHttpRequest;var i=e._senderConfig.endpointUrl();try{r[Ms]=true}catch(e){}r.open("POST",i,n);r.setRequestHeader("Content-type","application/json");if(Fs.isInternalApplicationInsightsEndpoint(i)){r.setRequestHeader(Cs.sdkContextHeader,Cs.sdkContextHeaderAppIdRequest)}r.onreadystatechange=function(){return e._xhrReadyStateChange(r,t,t.length)};r.onerror=function(n){return e._onError(t,g(r),n)};var a=e._buffer.batchPayloads(t);r.send(a);e._buffer.markAsSent(t)}function d(t){try{if(t&&t!==""){var n=pa().parse(t);if(n&&n.itemsReceived&&n.itemsReceived>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors.length){return n}}}catch(n){e.diagLog().throwInternal(za.CRITICAL,Ha.InvalidBackendResponse,"Cannot parse the response. "+Fs.getExceptionName(n),{response:t})}return null}function p(t,n){if(n===void 0){n=1}if(!t||t.length===0){return}e._buffer.clearSent(t);r++;for(var i=0,a=t;i<a.length;i++){var o=a[i];e._buffer.enqueue(o)}h(n);v()}function h(e){var t=10;var n;if(r<=1){n=t}else{var a=(Math.pow(2,r)-1)/2;var o=Math.floor(Math.random()*a*t)+1;o=e*o;n=Math.max(Math.min(o,3600),t)}var s=ja.dateNow()+n*1e3;i=s}function v(){if(!a){var t=i?Math.max(0,i-ja.dateNow()):0;var n=Math.max(e._senderConfig.maxBatchInterval(),t);a=setTimeout((function(){e.triggerSend(true,null,1)}),n)}}function m(e){return e===408||e===429||e===500||e===503}function g(e,t){if(e){return"XMLHttpRequest,Status:"+e.status+",Response:"+rc(e)||e.response||""}return t}function y(t,n){var r=na();var i=new XDomainRequest;i.onload=function(){return e._xdrOnLoad(i,t)};i.onerror=function(n){return e._onError(t,b(i),n)};var a=r&&r.location&&r.location.protocol||"";if(e._senderConfig.endpointUrl().lastIndexOf(a,0)!==0){e.diagLog().throwInternal(za.WARNING,Ha.TransmissionFailed,". "+"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.");e._buffer.clear();return}var o=e._senderConfig.endpointUrl().replace(/^(https?:)/,"");i.open("POST",o);var s=e._buffer.batchPayloads(t);i.send(s);e._buffer.markAsSent(t)}function b(e,t){if(e){return"XDomainRequest,Response:"+rc(e)||""}return t}function w(){var t="getNotifyMgr";if(e.core[t]){return e.core[t]()}return e.core["_notificationManager"]}function x(t,n){var r=w();if(r&&r.eventsSendRequest){try{r.eventsSendRequest(t,n)}catch(t){e.diagLog().throwInternal(za.CRITICAL,Ha.NotificationException,"send request notification failed: "+Fs.getExceptionName(t),{exception:Fs.dump(t)})}}}function S(e){var t=ja.isNullOrUndefined(e.disableInstrumentaionKeyValidation)?false:e.disableInstrumentaionKeyValidation;if(t){return true}var n="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";var r=new RegExp(n);return r.test(e.instrumentationKey)}}));return n}t.constructEnvelope=function(e,t,n){var r;if(t!==e.iKey&&!ja.isNullOrUndefined(t)){r=__assign({},e,{iKey:t})}else{r=e}switch(r.baseType){case Xs.dataType:return Wu.EventEnvelopeCreator.Create(n,r);case vu.dataType:return Yu.TraceEnvelopeCreator.Create(n,r);case fu.dataType:return Xu.PageViewEnvelopeCreator.Create(n,r);case gu.dataType:return Ju.PageViewPerformanceEnvelopeCreator.Create(n,r);case nu.dataType:return Gu.ExceptionEnvelopeCreator.Create(n,r);case cu.dataType:return Ku.MetricEnvelopeCreator.Create(n,r);case pu.dataType:return Hu.DependencyEnvelopeCreator.Create(n,r);default:return Wu.EventEnvelopeCreator.Create(n,r)}};t._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return false},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return false},enableSessionStorageBuffer:function(){return true},isRetryDisabled:function(){return false},isBeaconApiDisabled:function(){return true},onunloadDisableBeacon:function(){return false},instrumentationKey:function(){return undefined},namePrefix:function(){return undefined},samplingPercentage:function(){return 100}}};t._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:undefined,emitLineDelimitedJson:undefined,maxBatchInterval:undefined,maxBatchSizeInBytes:undefined,disableTelemetry:undefined,enableSessionStorageBuffer:undefined,isRetryDisabled:undefined,isBeaconApiDisabled:undefined,onunloadDisableBeacon:undefined,instrumentationKey:undefined,namePrefix:undefined,samplingPercentage:undefined}};return t}(Wo);var ac=function(){function e(){}return e}();var oc=function(){function e(t,n){var r=this;if(ja.isNullOrUndefined(n)){this._logger=new No}else{this._logger=n}if(!t){t={}}if(!(typeof t.sessionExpirationMs==="function")){t.sessionExpirationMs=function(){return e.acquisitionSpan}}if(!(typeof t.sessionRenewalMs==="function")){t.sessionRenewalMs=function(){return e.renewalSpan}}this.config=t;this._storageNamePrefix=function(){return r.config.namePrefix&&r.config.namePrefix()?e.cookieNameConst+r.config.namePrefix():e.cookieNameConst};this.automaticSession=new ac}e.prototype.update=function(){if(!this.automaticSession.id){this.initializeAutomaticSession()}var t=(new Date).getTime();var n=this.config.sessionExpirationMs()===0?false:t-this.automaticSession.acquisitionDate>this.config.sessionExpirationMs();var r=this.config.sessionExpirationMs()===0?false:t-this.automaticSession.renewalDate>this.config.sessionRenewalMs();if(n||r){this.renew()}else{if(!this.cookieUpdatedTimestamp||t-this.cookieUpdatedTimestamp>e.cookieUpdateInterval){this.automaticSession.renewalDate=t;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)}}};e.prototype.backup=function(){this.setStorage(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate)};e.prototype.initializeAutomaticSession=function(){var e=Fs.getCookie(this._logger,this._storageNamePrefix());if(e&&typeof e.split==="function"){this.initializeAutomaticSessionWithData(e)}else{var t=Fs.getStorage(this._logger,this._storageNamePrefix());if(t){this.initializeAutomaticSessionWithData(t)}}if(!this.automaticSession.id){this.renew()}};e.prototype.initializeAutomaticSessionWithData=function(e){var t=e.split("|");if(t.length>0){this.automaticSession.id=t[0]}try{if(t.length>1){var n=+t[1];this.automaticSession.acquisitionDate=+new Date(n);this.automaticSession.acquisitionDate=this.automaticSession.acquisitionDate>0?this.automaticSession.acquisitionDate:0}if(t.length>2){var r=+t[2];this.automaticSession.renewalDate=+new Date(r);this.automaticSession.renewalDate=this.automaticSession.renewalDate>0?this.automaticSession.renewalDate:0}}catch(e){this._logger.throwInternal(za.CRITICAL,Ha.ErrorParsingAISessionCookie,"Error parsing ai_session cookie, session will be reset: "+Fs.getExceptionName(e),{exception:Fs.dump(e)})}if(this.automaticSession.renewalDate===0){this._logger.throwInternal(za.WARNING,Ha.SessionRenewalDateIsZero,"AI session renewal date is 0, session will be reset.")}};e.prototype.renew=function(){var e=(new Date).getTime();this.automaticSession.id=Fs.newId(this.config&&this.config.idLength?this.config.idLength():22);this.automaticSession.acquisitionDate=e;this.automaticSession.renewalDate=e;this.setCookie(this.automaticSession.id,this.automaticSession.acquisitionDate,this.automaticSession.renewalDate);if(!Fs.canUseLocalStorage()){this._logger.throwInternal(za.WARNING,Ha.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")}};e.prototype.setCookie=function(e,t,n){var r=t+this.config.sessionExpirationMs();var i=n+this.config.sessionRenewalMs();var a=new Date;var o=[e,t,n];if(r<i){a.setTime(r)}else{a.setTime(i)}var s=this.config.cookieDomain?this.config.cookieDomain():null;var u=this.config.sessionExpirationMs()===0?"0":a.toUTCString();Fs.setCookie(this._logger,this._storageNamePrefix(),o.join("|")+";expires="+u,s);this.cookieUpdatedTimestamp=(new Date).getTime()};e.prototype.setStorage=function(e,t,n){Fs.setStorage(this._logger,this._storageNamePrefix(),[e,t,n].join("|"))};e.acquisitionSpan=864e5;e.renewalSpan=18e5;e.cookieUpdateInterval=6e4;e.cookieNameConst="ai_session";return e}();var sc=function(){function e(){}return e}();var uc=function(){function e(){this.id="browser";this.deviceClass="Browser"}return e}();var cc="2.5.10";var lc=function(){function e(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:"+cc}return e}();var fc=function(){function e(t,n){this.isNewUser=false;this._logger=n;var r=Fs.getCookie(this._logger,e.userCookieName);if(r){this.isNewUser=false;var i=r.split(e.cookieSeparator);if(i.length>0){this.id=i[0]}}this.config=t;if(!this.id){this.id=ja.newId(t&&t.idLength?t.idLength():22);var a=new Date;var o=ja.toISOString(a);this.accountAcquisitionDate=o;this.isNewUser=true;a.setTime(a.getTime()+31536e6);var s=[this.id,o];var u=this.config.cookieDomain?this.config.cookieDomain():undefined;Fs.setCookie(this._logger,e.userCookieName,s.join(e.cookieSeparator)+";expires="+a.toUTCString(),u);var c=t.namePrefix&&t.namePrefix()?t.namePrefix()+"ai_session":"ai_session";Fs.removeStorage(this._logger,c)}this.accountId=t.accountId?t.accountId():undefined;var l=Fs.getCookie(this._logger,e.authUserCookieName);if(l){l=decodeURI(l);var f=l.split(e.cookieSeparator);if(f[0]){this.authenticatedId=f[0]}if(f.length>1&&f[1]){this.accountId=f[1]}}}e.prototype.setAuthenticatedUserContext=function(t,n,r){if(r===void 0){r=false}var i=!this.validateUserInput(t)||n&&!this.validateUserInput(n);if(i){this._logger.throwInternal(za.WARNING,Ha.SetAuthContextFailedAccountName,"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.",true);return}this.authenticatedId=t;var a=this.authenticatedId;if(n){this.accountId=n;a=[this.authenticatedId,this.accountId].join(e.cookieSeparator)}if(r){Fs.setCookie(this._logger,e.authUserCookieName,encodeURI(a),this.config.cookieDomain())}};e.prototype.clearAuthenticatedUserContext=function(){this.authenticatedId=null;this.accountId=null;Fs.deleteCookie(this._logger,e.authUserCookieName)};e.prototype.validateUserInput=function(e){if(typeof e!=="string"||!e||e.match(/,|;|=| |\|/)){return false}return true};e.cookieSeparator="|";e.userCookieName="ai_user";e.authUserCookieName="ai_authUser";return e}();var dc=function(){function e(){}return e}();var pc=function(){function e(e,t,n,r){this.traceID=e||Fs.generateW3CId();this.parentID=t;this.name=n;var i=ca();if(!n&&i&&i.pathname){this.name=i.pathname}this.name=Ts.sanitizeString(r,this.name)}return e}();var hc=function(){function e(e,t){var n=this;n.application=new sc;n.internal=new lc(t);if(ta()){n.sessionManager=new oc(t,e);n.device=new uc;n.location=new dc;n.user=new fc(t,e);n.telemetryTrace=new pc(undefined,undefined,undefined,e);n.session=new ac}n.appId=function(){return null}}e.prototype.applySessionContext=function(e,t){var n=this.session;var r=this.sessionManager;var i=n||r&&r.automaticSession;if(i){if(ja.isString(i.id)){e.ext.app.sesId=i.id}}if(n){if(ja.isString(n.id)){e.ext.app.sesId=n.id}else{e.ext.app.sesId=r.automaticSession.id}}};e.prototype.applyOperatingSystemContxt=function(e,t){var n=this.os;if(n&&n.name){e.ext.os=n}};e.prototype.applyApplicationContext=function(e,t){var n=this.application;if(n){if(ja.isString(n.ver)){e.tags[_u.applicationVersion]=n.ver}if(ja.isString(n.build)){e.tags[_u.applicationBuild]=n.build}}};e.prototype.applyDeviceContext=function(e,t){var n=this.device;if(n){if(ja.isString(n.id)){e.ext.device.localId=n.id}if(ja.isString(n.ip)){e.ext.device.ip=n.ip}if(ja.isString(n.model)){e.ext.device.model=n.model}if(ja.isString(n.deviceClass)){e.ext.device.deviceClass=n.deviceClass}}};e.prototype.applyInternalContext=function(e,t){var n=this.internal;if(n){if(ja.isString(n.agentVersion)){e.tags[_u.internalAgentVersion]=n.agentVersion}if(ja.isString(n.sdkVersion)){e.tags[_u.internalSdkVersion]=n.sdkVersion}if(e.baseType===ko.dataType||e.baseType===fu.dataType){if(ja.isString(n.snippetVer)){e.tags[_u.internalSnippet]=n.snippetVer}if(ja.isString(n.sdkSrc)){e.tags[_u.internalSdkSrc]=n.sdkSrc}}}};e.prototype.applyLocationContext=function(e,t){var n=this.location;if(n){if(ja.isString(n.ip)){e.tags[_u.locationIp]=n.ip}}};e.prototype.applyOperationContext=function(e,t){var n=this.telemetryTrace;if(n){var r=e.ext.trace||{traceID:undefined,parentID:undefined};if(ja.isString(n.traceID)){r.traceID=n.traceID}if(ja.isString(n.name)){r.name=n.name}if(ja.isString(n.parentID)){r.parentID=n.parentID}e.ext.trace=r}};e.prototype.applyWebContext=function(e,t){var n=this.web;if(n){e.ext.web=e.ext.web||{};e.ext.web=n}};e.prototype.applyUserContext=function(e,t){var n=this.user;if(n){if(!e.tags){e.tags=[]}if(ja.isString(n.accountId)){e.tags[_u.userAccountId]=n.accountId}if(ja.isString(n.id)){e.ext.user.id=n.id}if(ja.isString(n.authenticatedId)){e.ext.user.authId=n.authenticatedId}}};e.prototype.cleanUp=function(e,t){if(e.ext[Su.DeviceExt]&&ja.objKeys(e.ext[Su.DeviceExt]).length===0){delete e.ext[Su.DeviceExt]}if(e.ext[Su.UserExt]&&ja.objKeys(e.ext[Su.UserExt]).length===0){delete e.ext[Su.UserExt]}if(e.ext[Su.WebExt]&&ja.objKeys(e.ext[Su.WebExt]).length===0){delete e.ext[Su.WebExt]}if(e.ext[Su.OSExt]&&ja.objKeys(e.ext[Su.OSExt]).length===0){delete e.ext[Su.OSExt]}if(e.ext[Su.AppExt]&&ja.objKeys(e.ext[Su.AppExt]).length===0){delete e.ext[Su.AppExt]}if(e.ext[Su.TraceExt]&&ja.objKeys(e.ext[Su.TraceExt]).length===0){delete e.ext[Su.TraceExt]}};return e}();var vc=function(e){__extends(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;t.priority=110;t.identifier=Iu;return t}t.getDefaultConfig=function(){var e={instrumentationKey:function(){return undefined},accountId:function(){return null},sessionRenewalMs:function(){return 30*60*1e3},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 24*60*60*1e3},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return false},appId:function(){return null},namePrefix:function(){return undefined},idLength:function(){return 22}};return e};t.prototype.initialize=function(n,r,i,a){var o=this;e.prototype.initialize.call(this,n,r,i,a);var s=this._getTelCtx();var u=this.identifier;var c=t.getDefaultConfig();this._extensionConfig=this._extensionConfig||t.getDefaultConfig();Ba(c,(function(e,t){o._extensionConfig[e]=function(){return s.getConfig(u,e,t())}}));this.context=new hc(r.logger,this._extensionConfig);this._breezeChannel=Fs.getExtension(i,Cu);this.context.appId=function(){return o._breezeChannel?o._breezeChannel["_appId"]:null}};t.prototype.processTelemetry=function(e,t){if(ja.isNullOrUndefined(e));else{t=this._getTelCtx(t);if(e.name===fu.envelopeType){t.diagLog().resetInternalMessageCount()}if(this.context.session){if(typeof this.context.session.id!=="string"){this.context.sessionManager.update()}}this._processTelemetryInternal(e,t);if(this.context&&this.context.user&&this.context.user.isNewUser){this.context.user.isNewUser=false;var n=new ko(Ha.SendBrowserInfoOnUserInit,(oa()||{}).userAgent||"");t.diagLog().logInternalMessage(za.CRITICAL,n)}this.processNext(e,t)}};t.prototype._processTelemetryInternal=function(e,t){if(!e.tags){e.tags=[]}if(!e.ext){e.ext={}}var n=e.ext;n[Su.DeviceExt]=n[Su.DeviceExt]||{};n[Su.WebExt]=n[Su.WebExt]||{};n[Su.UserExt]=n[Su.UserExt]||{};n[Su.OSExt]=n[Su.OSExt]||{};n[Su.AppExt]=n[Su.AppExt]||{};n[Su.TraceExt]=n[Su.TraceExt]||{};var r=this.context;r.applySessionContext(e,t);r.applyApplicationContext(e,t);r.applyDeviceContext(e,t);r.applyOperationContext(e,t);r.applyUserContext(e,t);r.applyOperatingSystemContxt(e,t);r.applyWebContext(e,t);r.applyLocationContext(e,t);r.applyInternalContext(e,t);r.cleanUp(e,t)};return t}(Wo);
|
|
54
|
+
/*!
|
|
55
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.10
|
|
56
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
57
|
+
*/var mc="properties";var gc=ja.objKeys;var yc=ja.arrForEach;function bc(e,t,n){var r=0;var i=e[t];var a=e[n];if(i&&a){r=Os.GetDuration(i,a)}return r}function wc(e,t,n,r,i){var a=0;var o=bc(n,r,i);if(o){a=xc(e,t,Fs.msToTimeSpan(o))}return a}function xc(e,t,n){var r="ajaxPerf";var i=0;if(e&&t&&n){var a=e[r]=e[r]||{};a[t]=n;i=1}return i}function Sc(e,t){var n=e.perfTiming;var r=t[mc]||{};var i=0;var a=ja.isString;var o="name";var s="Start";var u="End";var c="domainLookup";var l="connect";var f="redirect";var d="request";var p="response";var h="duration";var v="startTime";var m=c+s;var g=c+u;var y=l+s;var b=l+u;var w=d+s;var x=d+u;var S=p+s;var _=p+u;var I=f+s;var C=f=u;var T="transferSize";var E="encodedBodySize";var A="decodedBodySize";var k="serverTiming";if(n){i|=wc(r,f,n,I,C);i|=wc(r,c,n,m,g);i|=wc(r,l,n,y,b);i|=wc(r,d,n,w,x);i|=wc(r,p,n,S,_);i|=wc(r,"networkConnect",n,v,b);i|=wc(r,"sentRequest",n,w,_);var N=n[h];if(!N){N=bc(n,v,_)||0}i|=xc(r,h,N);i|=xc(r,"perfTotal",N);var F=n[k];if(F){var P={};yc(F,(function(e,t){var n=Ua(e[o]||""+t);var r=P[n]||{};Ba(e,(function(e,t){if(e!==o&&a(t)||ja.isNumber(t)){if(r[e]){t=r[e]+";"+t}if(t||!a(t)){r[e]=t}}}));P[n]=r}));i|=xc(r,k,P)}i|=xc(r,T,n[T]);i|=xc(r,E,n[E]);i|=xc(r,A,n[A])}else{if(e.perfMark){i|=xc(r,"missing",e.perfAttempts)}}if(i){t[mc]=r}}var _c=function(){function e(){var e=this;e.openDone=false;e.setRequestHeaderDone=false;e.sendDone=false;e.abortDone=false;e.stateChangeAttached=false}return e}();var Ic=function(){function e(t,n,r){var i=this;var a=r;var o="responseText";i.perfMark=null;i.completed=false;i.requestHeadersSize=null;i.requestHeaders=null;i.responseReceivingDuration=null;i.callbackDuration=null;i.ajaxTotalDuration=null;i.aborted=0;i.pageUrl=null;i.requestUrl=null;i.requestSize=0;i.method=null;i.status=null;i.requestSentTime=null;i.responseStartedTime=null;i.responseFinishedTime=null;i.callbackFinishedTime=null;i.endTime=null;i.xhrMonitoringState=new _c;i.clientFailure=0;i.traceID=t;i.spanID=n;_o(e,i,(function(e){e.getAbsoluteUrl=function(){return e.requestUrl?Ps.getAbsoluteUrl(e.requestUrl):null};e.getPathName=function(){return e.requestUrl?Ts.sanitizeUrl(a,Ps.getCompleteUrl(e.method,e.requestUrl)):null};e.CreateTrackItem=function(t,n,r){e.ajaxTotalDuration=Math.round(Os.GetDuration(e.requestSentTime,e.responseFinishedTime)*1e3)/1e3;if(e.ajaxTotalDuration<0){return null}var i=(c={id:"|"+e.traceID+"."+e.spanID,target:e.getAbsoluteUrl(),name:e.getPathName(),type:t,duration:e.ajaxTotalDuration,success:+e.status>=200&&+e.status<400,responseCode:+e.status,method:e.method},c[mc]={HttpMethod:e.method},c);Sc(e,i);if(n){if(gc(e.requestHeaders).length>0){i[mc]=i[mc]||{};i[mc].requestHeaders=e.requestHeaders}}if(r){var a=r();if(a){var s=a.correlationContext;if(s){i.correlationContext=s}if(a.headerMap){if(gc(a.headerMap).length>0){i[mc]=i[mc]||{};i[mc].responseHeaders=a.headerMap}}if(e.status>=400){var u=a.type;i[mc]=i[mc]||{};if(u===""||u==="text"){i[mc][o]=a[o]?a.statusText+" - "+a[o]:a.statusText}if(u==="json"){i[mc][o]=a.response?a.statusText+" - "+JSON.stringify(a.response):a.statusText}}}}return i;var c}}))}return e}();
|
|
58
|
+
/*!
|
|
59
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.10
|
|
60
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
61
|
+
*/var Cc=function(){function e(t,n){var r=this;r.traceFlag=e.DEFAULT_TRACE_FLAG;r.version=e.DEFAULT_VERSION;if(t&&e.isValidTraceId(t)){r.traceId=t}else{r.traceId=Fs.generateW3CId()}if(n&&e.isValidSpanId(n)){r.spanId=n}else{r.spanId=Fs.generateW3CId().substr(0,16)}}e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&e!=="00000000000000000000000000000000"};e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&e!=="0000000000000000"};e.prototype.toString=function(){var e=this;return e.version+"-"+e.traceId+"-"+e.spanId+"-"+e.traceFlag};e.DEFAULT_TRACE_FLAG="01";e.DEFAULT_VERSION="00";return e}();
|
|
62
|
+
/*!
|
|
63
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 2.5.10
|
|
64
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
65
|
+
*/var Tc="ai.ajxmn.";var Ec="diagLog";var Ac="ajaxData";var kc="throwInternal";var Nc="fetch";var Fc=ja.isNullOrUndefined;var Pc=ja.arrForEach;var Dc=0;function Rc(){var e=Zi();if(!e||Fc(e.Request)||Fc(e.Request[ji])||Fc(e[Nc])){return null}return e[Nc]}function Oc(e){var t=false;if(typeof XMLHttpRequest!==Ui&&!Fc(XMLHttpRequest)){var n=XMLHttpRequest[ji];t=!Fc(n)&&!Fc(n.open)&&!Fc(n.send)&&!Fc(n.abort)}var r=Fs.getIEVersion();if(r&&r<9){t=false}if(t){try{var i=new XMLHttpRequest;i[Ac]={};var a=XMLHttpRequest[ji].open;XMLHttpRequest[ji].open=a}catch(n){t=false;Lc(e,Ha.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Fs.dump(n)})}}return t}function Mc(e){var t="";try{if(!Fc(e)&&!Fc(e[Ac])&&!Fc(e[Ac].requestUrl)){t+="(url: '"+e[Ac].requestUrl+"')"}}catch(e){}return t}function Lc(e,t,n,r,i){e[Ec]()[kc](za.CRITICAL,t,n,r,i)}function Uc(e,t,n,r,i){e[Ec]()[kc](za.WARNING,t,n,r,i)}function Bc(e,t,n){return function(r){Lc(e,t,n,{ajaxDiagnosticsMessage:Mc(r.inst),exception:Fs.dump(r.err)})}}function jc(e,t){if(e&&t){return e.indexOf(t)}return-1}var Vc=function(e){__extends(t,e);function t(){var n=e.call(this)||this;n.identifier=t.identifier;n.priority=120;var r="trackDependencyDataInternal";var i=ca();var a=false;var o=false;var s=i&&i.host&&i.host.toLowerCase();var u=t.getEmptyConfig();var c=false;var l=0;var f;var d;var p;var h;var v=false;var m=0;var g=false;var y=[];var b={};_o(t,n,(function(e,n){e.initialize=function(r,a,o,s){if(!e.isInitialized()){n.initialize(r,a,o,s);var l=e._getTelCtx();var y=t.getDefaultConfig();Ba(y,(function(e,n){u[e]=l.getConfig(t.identifier,e,n)}));var b=u.distributedTracingMode;c=u.enableRequestHeaderTracking;v=u.enableAjaxPerfTracking;m=u.maxAjaxCallsPerView;g=u.enableResponseHeaderTracking;p=b===Is.AI||b===Is.AI_AND_W3C;d=b===Is.AI_AND_W3C||b===Is.W3C;if(v){var w=r.instrumentationKey||"unkwn";if(w.length>5){h=Tc+w.substring(w.length-5)+"."}else{h=Tc+w+"."}}if(u.disableAjaxTracking===false){x()}i();if(o.length>0&&o){var S=void 0,_=0;while(!S&&_<o.length){if(o[_]&&o[_].identifier===Iu){S=o[_]}_++}if(S){f=S.context}}}};e.teardown=function(){Pc(y,(function(e){e.rm()}));y=[];a=false;o=false;e.setInitialized(false)};e.trackDependencyData=function(t,n){e[r](t,n)};e.includeCorrelationHeaders=function(t,n,r,i){var a=e["_currentWindowHost"]||s;if(n){if(Ds.canIncludeCorrelationHeader(u,t.getAbsoluteUrl(),a)){if(!r){r={}}r.headers=new Headers(r.headers||(n instanceof Request?n.headers||{}:{}));if(p){var o="|"+t.traceID+"."+t.spanID;r.headers.set(Cs.requestIdHeader,o);if(c){t.requestHeaders[Cs.requestIdHeader]=o}}var l=u.appId||f&&f.appId();if(l){r.headers.set(Cs.requestContextHeader,Cs.requestContextAppIdFormat+l);if(c){t.requestHeaders[Cs.requestContextHeader]=Cs.requestContextAppIdFormat+l}}if(d){var h=new Cc(t.traceID,t.spanID);r.headers.set(Cs.traceParentHeader,h.toString());if(c){t.requestHeaders[Cs.traceParentHeader]=h.toString()}}}return r}else if(i){if(Ds.canIncludeCorrelationHeader(u,t.getAbsoluteUrl(),a)){if(p){var o="|"+t.traceID+"."+t.spanID;i.setRequestHeader(Cs.requestIdHeader,o);if(c){t.requestHeaders[Cs.requestIdHeader]=o}}var l=u.appId||f&&f.appId();if(l){i.setRequestHeader(Cs.requestContextHeader,Cs.requestContextAppIdFormat+l);if(c){t.requestHeaders[Cs.requestContextHeader]=Cs.requestContextAppIdFormat+l}}if(d){var h=new Cc(t.traceID,t.spanID);i.setRequestHeader(Cs.traceParentHeader,h.toString());if(c){t.requestHeaders[Cs.traceParentHeader]=h.toString()}}}return i}return undefined};e[r]=function(t,n,r){if(m===-1||l<m){if((u.distributedTracingMode===Is.W3C||u.distributedTracingMode===Is.AI_AND_W3C)&&typeof t.id==="string"&&t.id[t.id.length-1]!=="."){t.id+="."}if(ja.isNullOrUndefined(t.startTime)){t.startTime=new Date}var i=xu.create(t,pu.dataType,pu.envelopeType,e[Ec](),n,r);e.core.track(i)}else if(l===m){Lc(e,Ha.MaxAjaxPerPVExceeded,"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.",true)}++l};function i(){var t=Rc();if(!t){return}var n=Zi();var r=t.polyfill;if(u.disableFetchTracking===false){y.push(xs(n,Nc,{req:function(t,n,i){var s;if(a&&!S(null,n,i)&&!(r&&o)){var u=t.ctx();s=F(n,i);var c=e.includeCorrelationHeaders(s,n,i);if(c!==i){t.set(1,c)}u.data=s}},rsp:function(e,t){var n=e.ctx().data;if(n){e.rslt=e.rslt.then((function(t){D(e,(t||{}).status,t,n,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:R(t)};if(g){var n={};t.headers.forEach((function(e,t){n[t]=e}));e.headerMap=n}return e}));return t}))["catch"]((function(r){D(e,0,t,n,null);throw r}))}},hkErr:Bc(e,Ha.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")}));a=true}else if(r){y.push(xs(n,Nc,{req:function(e,t,n){S(null,t,n)}}))}if(r){n[Nc].polyfill=r}}function w(e,t,n){y.push(ws(e,t,n))}function x(){if(Oc(e)&&!o){w(XMLHttpRequest,"open",{req:function(e,t,n,r){var i=e.inst;var a=i[Ac];if(!S(i,n)&&_(i,true)&&(!a||!a.xhrMonitoringState.openDone)){I(i,t,n,r)}},hkErr:Bc(e,Ha.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")});w(XMLHttpRequest,"send",{req:function(t,n){var r=t.inst;var i=r[Ac];if(_(r)&&!i.xhrMonitoringState.sendDone){k("xhr",i);i.requestSentTime=Os.Now();r=e.includeCorrelationHeaders(i,undefined,undefined,r);i.xhrMonitoringState.sendDone=true}},hkErr:Bc(e,Ha.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")});w(XMLHttpRequest,"abort",{req:function(e){var t=e.inst;var n=t[Ac];if(_(t)&&!n.xhrMonitoringState.abortDone){n.aborted=1;n.xhrMonitoringState.abortDone=true}},hkErr:Bc(e,Ha.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")});if(c){w(XMLHttpRequest,"setRequestHeader",{req:function(e,t,n){var r=e.inst;if(_(r)){r[Ac].requestHeaders[t]=n}},hkErr:Bc(e,Ha.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")})}o=true}}function S(e,t,n){var r=false;var i=((!ja.isString(t)?(t||{}).url||"":t)||"").toLowerCase();var a=jc(i,"?");var o=jc(i,"#");if(a===-1||o!==-1&&o<a){a=o}if(a!==-1){i=i.substring(0,a)}if(!Fc(e)){r=e[Ms]===true||i[Ms]===true}else if(!Fc(t)){r=(typeof t==="object"?t[Ms]===true:false)||(n?n[Ms]===true:false)}if(r){if(!b[i]){b[i]=1}}else{if(b[i]){r=true}}return r}function _(e,t){var n=true;var r=o;if(!Fc(e)){n=t===true||!Fc(e[Ac])}return r&&n}function I(t,n,r,i){var a=f&&f.telemetryTrace&&f.telemetryTrace.traceID||Fs.generateW3CId();var o=Fs.generateW3CId().substr(0,16);var s=new Ic(a,o,e[Ec]());s.method=n;s.requestUrl=r;s.xhrMonitoringState.openDone=true;s.requestHeaders={};s.async=i;t[Ac]=s;C(t)}function C(t){t[Ac].xhrMonitoringState.stateChangeAttached=qa.Attach(t,"readystatechange",(function(){try{if(t&&t.readyState===4&&_(t)){E(t)}}catch(r){var n=Fs.dump(r);if(!n||jc(n.toLowerCase(),"c00c023f")===-1){Lc(e,Ha.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:Mc(t),exception:n})}}}))}function T(e){try{var t=e.responseType;if(t===""||t==="text"){return e.responseText}}catch(e){}return null}function E(t){var n=t[Ac];n.responseFinishedTime=Os.Now();n.status=t.status;function i(n,r){var i=r||{};i["ajaxDiagnosticsMessage"]=Mc(t);if(n){i["exception"]=Fs.dump(n)}Uc(e,Ha.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",i)}N("xmlhttprequest",n,(function(){try{var a=n.CreateTrackItem("Ajax",c,(function(){var e={statusText:t.statusText,headerMap:null,correlationContext:A(t),type:t.responseType,responseText:T(t),response:t.response};if(g){var n=t.getAllResponseHeaders();if(n){var r=ja.strTrim(n).split(/[\r\n]+/);var i={};Pc(r,(function(e){var t=e.split(": ");var n=t.shift();var r=t.join(": ");i[n]=r}));e.headerMap=i}}return e}));if(a){e[r](a)}else{i(null,{requestSentTime:n.requestSentTime,responseFinishedTime:n.responseFinishedTime})}}finally{try{t[Ac]=null}catch(e){}}}),(function(e){i(e,null)}))}function A(t){try{var n=t.getAllResponseHeaders();if(n!==null){var r=jc(n.toLowerCase(),Cs.requestContextHeaderLowerCase);if(r!==-1){var i=t.getResponseHeader(Cs.requestContextHeader);return Ds.getCorrelationContext(i)}}}catch(n){Uc(e,Ha.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:Mc(t),exception:Fs.dump(n)})}}function k(e,t){if(t.requestUrl&&h&&v){var n=fa();if(n&&ja.isFunction(n.mark)){Dc++;var r=h+e+"#"+Dc;n.mark(r);var i=n.getEntriesByName(r);if(i&&i.length===1){t.perfMark=i[0]}}}}function N(e,t,n,r){var i=t.perfMark;var a=fa();var o=u.maxAjaxPerfLookupAttempts;var s=u.ajaxPerfLookupDelay;var c=t.requestUrl;var l=0;(function u(){try{if(a&&i){l++;var f=null;var d=a.getEntries();for(var p=d.length-1;p>=0;p--){var h=d[p];if(h){if(h.entryType==="resource"){if(h.initiatorType===e&&(jc(h.name,c)!==-1||jc(c,h.name)!==-1)){f=h}}else if(h.entryType==="mark"&&h.name===i.name){t.perfTiming=f;break}if(h.startTime<i.startTime-1e3){break}}}}if(!i||t.perfTiming||l>=o||t.async===false){if(i&&ja.isFunction(a.clearMarks)){a.clearMarks(i.name)}t.perfAttempts=l;n()}else{setTimeout(u,s)}}catch(e){r(e)}})()}function F(t,n){var r=f&&f.telemetryTrace&&f.telemetryTrace.traceID||Fs.generateW3CId();var i=Fs.generateW3CId().substr(0,16);var a=new Ic(r,i,e[Ec]());a.requestSentTime=Os.Now();if(t instanceof Request){a.requestUrl=t?t.url:""}else{a.requestUrl=t}var o="GET";if(n&&n.method){o=n.method}else if(t&&t instanceof Request){o=t.method}a.method=o;var s={};if(c){var u=new Headers((n?n.headers:0)||(t instanceof Request?t.headers||{}:{}));u.forEach((function(e,t){s[t]=e}))}a.requestHeaders=s;k("fetch",a);return a}function P(t){var n="";try{if(!Fc(t)){if(typeof t==="string"){n+="(url: '"+t+"')"}else{n+="(url: '"+t.url+"')"}}}catch(t){Lc(e,Ha.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Fs.dump(t)})}return n}function D(t,n,i,a,o,s){if(!a){return}function u(t,n,r){var a=r||{};a["fetchDiagnosticsMessage"]=P(i);if(n){a["exception"]=Fs.dump(n)}Uc(e,t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",a)}a.responseFinishedTime=Os.Now();a.status=n;N("fetch",a,(function(){var t=a.CreateTrackItem("Fetch",c,o);if(t){e[r](t)}else{u(Ha.FailedMonitorAjaxDur,null,{requestSentTime:a.requestSentTime,responseFinishedTime:a.responseFinishedTime})}}),(function(e){u(Ha.FailedMonitorAjaxGetCorrelationHeader,e,null)}))}function R(t){if(t&&t.headers){try{var n=t.headers.get(Cs.requestContextHeader);return Ds.getCorrelationContext(n)}catch(n){Uc(e,Ha.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:P(t),exception:Fs.dump(n)})}}}}));return n}t.getDefaultConfig=function(){var e={maxAjaxCallsPerView:500,disableAjaxTracking:false,disableFetchTracking:true,disableCorrelationHeaders:false,distributedTracingMode:Is.AI,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:undefined,appId:undefined,enableCorsCorrelation:false,enableRequestHeaderTracking:false,enableResponseHeaderTracking:false,enableAjaxErrorStatusText:false,enableAjaxPerfTracking:false,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25};return e};t.getEmptyConfig=function(){var e=this.getDefaultConfig();Ba(e,(function(t){e[t]=undefined}));return e};t.prototype.processTelemetry=function(e,t){this.processNext(e,t)};t.identifier="AjaxDependencyPlugin";return t}(Wo);
|
|
66
|
+
/*!
|
|
67
|
+
* Application Insights JavaScript SDK - Web, 2.5.10
|
|
68
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
69
|
+
*/var qc;var zc=function(){function e(e){var t=this;t._snippetVersion=""+(e.sv||e.version||"");e.queue=e.queue||[];e.version=e.version||2;var n=e.config||{};if(n.connectionString){var r=Vs.parse(n.connectionString);var i=r.ingestionendpoint;n.endpointUrl=i?i+"/v2/track":n.endpointUrl;n.instrumentationKey=r.instrumentationkey||n.instrumentationKey}t.appInsights=new Du;t.properties=new vc;t.dependencies=new Vc;t.core=new cs;t.snippet=e;t.config=n;t.getSKUDefaults()}e.prototype.trackEvent=function(e,t){this.appInsights.trackEvent(e,t)};e.prototype.trackPageView=function(e){var t=e||{};this.appInsights.trackPageView(t)};e.prototype.trackPageViewPerformance=function(e){var t=e||{};this.appInsights.trackPageViewPerformance(t)};e.prototype.trackException=function(e){if(!e.exception&&e.error){e.exception=e.error}this.appInsights.trackException(e)};e.prototype._onerror=function(e){this.appInsights._onerror(e)};e.prototype.trackTrace=function(e,t){this.appInsights.trackTrace(e,t)};e.prototype.trackMetric=function(e,t){this.appInsights.trackMetric(e,t)};e.prototype.startTrackPage=function(e){this.appInsights.startTrackPage(e)};e.prototype.stopTrackPage=function(e,t,n,r){this.appInsights.stopTrackPage(e,t,n,r)};e.prototype.startTrackEvent=function(e){this.appInsights.startTrackEvent(e)};e.prototype.stopTrackEvent=function(e,t,n){this.appInsights.stopTrackEvent(e,t,n)};e.prototype.addTelemetryInitializer=function(e){return this.appInsights.addTelemetryInitializer(e)};e.prototype.setAuthenticatedUserContext=function(e,t,n){if(n===void 0){n=false}this.properties.context.user.setAuthenticatedUserContext(e,t,n)};e.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()};e.prototype.trackDependencyData=function(e){this.dependencies.trackDependencyData(e)};e.prototype.flush=function(e){var t=this;if(e===void 0){e=true}Oo(this.core,(function(){return"AISKU.flush"}),(function(){ja.arrForEach(t.core.getTransmissionControls(),(function(t){ja.arrForEach(t,(function(t){t.flush(e)}))}))}),null,e)};e.prototype.onunloadFlush=function(e){if(e===void 0){e=true}ja.arrForEach(this.core.getTransmissionControls(),(function(t){ja.arrForEach(t,(function(t){if(t.onunloadFlush){t.onunloadFlush()}else{t.flush(e)}}))}))};e.prototype.loadAppInsights=function(e,t,n){var r=this;if(e===void 0){e=false}var i=this;function a(t){if(t){var n="";if(!ja.isNullOrUndefined(i._snippetVersion)){n+=i._snippetVersion}if(e){n+=".lg"}if(i.context&&i.context.internal){i.context.internal.snippetVer=n||"-"}Ba(i,(function(e,n){if(ja.isString(e)&&!ja.isFunction(n)&&e.substring(0,1)!=="_"){t[e]=n}}))}}if(e&&i.config.extensions&&i.config.extensions.length>0){throw new Error("Extensions not allowed in legacy mode")}Oo(i.core,(function(){return"AISKU.loadAppInsights"}),(function(){var e=[];var o=new ic;e.push(o);e.push(i.properties);e.push(i.dependencies);e.push(i.appInsights);i.core.initialize(i.config,e,t,n);i.context=i.properties.context;if(qc&&i.context){i.context.internal.sdkSrc=qc}a(i.snippet);i.emptyQueue();i.pollInternalLogs();i.addHousekeepingBeforeUnload(r)}));return i};e.prototype.updateSnippetDefinitions=function(e){Ba(this,(function(t,n){if(ja.isString(t)){e[t]=n}}))};e.prototype.emptyQueue=function(){var e=this;try{if(Fs.isArray(e.snippet.queue)){var t=e.snippet.queue.length;for(var n=0;n<t;n++){var r=e.snippet.queue[n];r()}e.snippet.queue=undefined;delete e.snippet.queue}}catch(e){var i={};if(e&&ja.isFunction(e.toString)){i.exception=e.toString()}}};e.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()};e.prototype.addHousekeepingBeforeUnload=function(e){if(ta()||ra()){var t=function(){e.onunloadFlush(false);var t=e.appInsights.core["_extensions"][Iu];if(t&&t.context&&t.context._sessionManager){t.context._sessionManager.backup()}};if(!e.appInsights.config.disableFlushOnBeforeUnload){var n=ja.addEventHandler("beforeunload",t);n=ja.addEventHandler("pagehide",t)||n;if(!n&&!ma()){e.appInsights.core.logger.throwInternal(za.CRITICAL,Ha.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload and pagehide")}}if(!e.appInsights.config.disableFlushOnUnload){ja.addEventHandler("pagehide",t)}}};e.prototype.getSKUDefaults=function(){var e=this;e.config.diagnosticLogInterval=e.config.diagnosticLogInterval&&e.config.diagnosticLogInterval>0?e.config.diagnosticLogInterval:1e4};return e}();(function(){var e=null;var t=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var n=(document||{}).currentScript;if(n){e=n.src}}catch(e){}if(e){try{var r=e.toLowerCase();if(r){var i="";for(var a=0;a<t.length;a++){if(r.indexOf(t[a])!==-1){i="cdn"+(a+1);if(r.indexOf("/scripts/")===-1){if(r.indexOf("/next/")!==-1){i+="-next"}else if(r.indexOf("/beta/")!==-1){i+="-beta"}}qc=i+"";break}}}}catch(e){}}})();var Hc=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;n.store=t;n.appConfiguration$=n.select((function(e){return e.appConfiguration}));return n}Object.defineProperty(t.prototype,"configuration",{get:function(){var e=this.getValue().appConfiguration;if(W(e)){throw Error("App configuration is not yet loaded")}return e.value},enumerable:false,configurable:true});return t}(C);var Wc=new Hc(Bn);var Gc=function(){function e(){this.appInsights=new $((function(){return new zc({config:{instrumentationKey:Wc.configuration.AppInsightsKey,enableAutoRouteTracking:true,autoTrackPageVisitTime:true,maxBatchInterval:1e3,enableUnhandledPromiseRejectionTracking:true}})}))}e.prototype.init=function(){var e=this;this.appInsights.value.loadAppInsights();l((function(t){return e.appInsightsErrorHandler(t)}))};e.prototype.getAppInsights=function(){return this.appInsights.value};e.prototype.addCustomProperties=function(e){this.appInsights.value.addTelemetryInitializer((function(t){t.data=t.data?t.data:{};for(var n=0,r=Object.entries(e);n<r.length;n++){var i=r[n],a=i[0],o=i[1];t.data[a]=o}}))};e.prototype.appInsightsErrorHandler=function(e){this.appInsights.value.trackException({error:e,severityLevel:bu.Error});var t=function(e){return console.error(e)};t(e)};return e}();var Kc=new Gc;var Xc=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;n.store=t;n.sessionState$=n.select((function(e){return e.authenticationState}));n.jwt$=n.select((function(e){return e.jwt}));return n}Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.getValue().authenticationState},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isUnauthorized",{get:function(){return this.getValue().authenticationState===On.Unauthorized||this.getValue().authenticationState===On.Error},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isAuthorized",{get:function(){return this.getValue().authenticationState===On.Authenticated},enumerable:false,configurable:true});return t}(C);var Jc=new Xc(Bn);function Yc(e,t){if(window["gtag"]){window["gtag"]("event",e,t)}}var Qc=function(){function e(){this.authCodeQueryParameter="code"}e.prototype.authorizationCodeIsPresent=function(e){var t=this.getAuthorizationCodeFromRoute(e);return ht.isSome(t)};e.prototype.initFromRoute=function(e){var t=this.getAuthorizationCodeFromRoute(e);if(ht.isNone(t)){Bn.update({authenticationState:On.Error});throw Error('"'+this.authCodeQueryParameter+'" URL query parameter missing')}this.authCodeExchangeAsync(t.value)};e.prototype.authCodeExchangeAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:t=new URLSearchParams([["grant_type","authorization_code"],["client_id","apollo-super-selection-app"],["code",e],["redirect_uri",""+Ci.getAppHostUrl()]]);return[4,nt(Wc.configuration.OidcAuthority+"/connect/token").headers({"Content-Type":"application/x-www-form-urlencoded"}).post(t.toString()).badRequest((function(){Bn.update({authenticationState:On.Error});throw new Error("Failed to authenticate.")})).json()];case 1:n=r.sent();Bn.update({jwt:ht.fromNullable(n.access_token),authenticationState:On.Authenticated});Yc("oidc_sign_in",{});window.history.replaceState(null,"",Ci.getAppRootUrl());return[2]}}))}))};e.prototype.getAuthorizationCodeFromRoute=function(e){var t=new URLSearchParams(e);return ht.fromNullable(t.get(this.authCodeQueryParameter))};return e}();var $c=new Qc;var Zc=function(){function e(){}e.completeSuperSelectionStep=function(){var e=Vn.getIframeInteropMode().successRedirectionUrl;if(ht.isSome(e)){window.top.location.href=e.value}else{Rt.complete()}};e.initFromRoute=function(e){var t="success-redirection-url";var n=new URLSearchParams(e);var r=ht.fromNullable(n.get(t));var i={successRedirectionUrl:ht.none};if(ht.isSome(r)){try{var a=new URL(r.value);i.successRedirectionUrl=ht.some(a.toString())}catch(e){throw Error('"'+r.value+'" is not a valid URL')}}return i};return e}();var el=function(){function e(){}e.init=function(){var e=window["ReactNativeWebView"]!==undefined;if(!e){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 Mn};e.completeSuperSelectionStep=function(){this.postRNMessage()};e.postRNMessage=function(){var t={stepStatus:"completed"};e.getRnInterop().postMessage(JSON.stringify(t))};return e}();el.getRnInterop=function(){return window["ReactNativeWebView"]};var tl=function(){function e(){this.interopModeQueryParameter="interop-mode"}e.prototype.completeSuperSelectionStep=function(){if(Vn.isIframeInteropEnabled()){Zc.completeSuperSelectionStep()}else if(Vn.isReactNativeInteropEnabled()){el.completeSuperSelectionStep()}else{throw Error("Unknown interop mode")}};e.prototype.init=function(e){var t=new URLSearchParams(e);var n=X(t.get(this.interopModeQueryParameter));if(H(n)&&n.value==="react-native"){Bn.update({reactNativeInterop:K(el.init())});return}Bn.update({iframeInterop:K(Zc.initFromRoute(e))})};return e}();var nl=new tl;function rl(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,Ci.loadConfigurationAsync()];case 1:t.sent();Kc.init();Z();e=Jc.isUnauthorized||$c.authorizationCodeIsPresent(window.location.search);if(!e){return[2]}nl.init(window.location.search);$c.initFromRoute(window.location.search);return[2]}}))}))}var il="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}}";var al=e("super_selection_app_host",function(){function e(e){t(this,e)}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:return[4,rl()];case 1:t.sent();Jc.sessionState$.subscribe((function(t){return e.sessionState=t}));Jc.jwt$.subscribe((function(t){return e.jwt=t}));Wc.appConfiguration$.subscribe((function(t){return e.appConfiguration=t}));return[2]}}))}))};e.prototype.render=function(){var e=this;return n(o,null,n("link",{rel:"stylesheet",href:a("apollo-super-selection.css"),media:"all"}),n("div",{ref:function(t){return e.observeContentResize(t)}},ht.isNone(this.appConfiguration)?n("sss-loading-page",{class:"font-inter"}):this.renderAppContent()))};e.prototype.renderAppContent=function(){var e=this;return n("stencil-router",{root:Ci.getAppRootUrl(),class:"sss-app-container"},n("stencil-route-switch",{scrollTopOffset:0},n("stencil-route",{url:"/",routeRender:this.renderProtectedRoute((function(t){return n("super-selection-app",Object.assign({accessToken:ht.toUndefined(e.jwt),backendUrl:Wc.configuration.ApiBaseUrl,appBaseUrl:e.getAppBaseUrl(),onSuccessPageAcknowledged:e.handleSuccessPageAcknowledged,"onStep-completion":e.handleStepSubmitSuccess,onInitialised:e.handleAppInitialised},t))}))})))};e.prototype.getAppBaseUrl=function(){var e=window.location.pathname.split("app");return e[0]+"app/"};e.prototype.handleSuccessPageAcknowledged=function(){nl.completeSuperSelectionStep()};e.prototype.handleStepSubmitSuccess=function(){Rt.submitSuccess()};e.prototype.handleAppInitialised=function(e){Kc.addCustomProperties({"X-ACCOUNT-ID":e.detail.accountIdOrDefault,"X-PARTNER-ID":e.detail.partnerIdOrDefault,"X-PROFILE-ID":e.detail.profileId});Kc.getAppInsights().trackPageView();var t=document.getElementById("sss-external-loading-page-container");if(t){document.body.removeChild(t)}};e.prototype.observeContentResize=function(e){var t=window.ResizeObserver||_i;new t((function(){Rt.resize(e.offsetHeight,-1)})).observe(e)};e.prototype.renderProtectedRoute=function(e){switch(this.sessionState){case On.Authenticated:return e;case On.Unauthorized:return function(){return n("sss-loading-page",null)};case On.Error:return function(){return n("h1",null,"Authentication Error")}}};return e}());al.style=il}}}));
|