/*! For license information please see RequestOtpGeneration.js.LICENSE.txt */
(()=>{"use strict";var e,t={};function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var i,r,o,s={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},a="GUEST",c="MEMBER",l=0,u=1,d=2,h=(n(e={},a,"li_gc"),n(e,c,"li_mc"),function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var o in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=i,this.optedInConsentMap={},s)t[o]=t[o]||l,t[o]!==l&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===u||t[o]===l&&r===u});i=[s.ADVERTISING,s.ANALYTICS_AND_RESEARCH,s.FUNCTIONAL],r=[l,u,d,l],o=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";"));window.encodeURIComponent;function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelector('meta[name="pageKey"]'),i=e.getElementById("config"),r=i&&"true"===i.dataset.disableJsbeaconPagekeySuffix;return n&&n.content?"".concat(n.content).concat(r||t.skipSuffix?"":"_jsbeacon"):""}function f(e){let t=e.domain;return t?t.split(".").slice(-2).join("."):""}function m(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}const g={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ESCAPE:"Escape",ENTER:"Enter",SPACEBAR:" ",TAB:"Tab"},v={Down:g.ARROW_DOWN,Right:g.ARROW_RIGHT,Left:g.ARROW_LEFT,Up:g.ARROW_UP,Esc:g.ESCAPE,Spacebar:g.SPACEBAR,Tab:g.TAB};function y(e){return v[e]||e}function b(e,t){if(!e)return null;let n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;for(;e&&!n.call(e,t);)e=e.parentElement;return e}function E(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}class w{constructor(){this._unloadCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("beforeunload",(e=>{for(let t=0;t<this._unloadCallbacks.length;t++){if(!1===this._unloadCallbacks[t].call(null,e))break}}))}addUnloadCallback(e){e instanceof Function&&this._unloadCallbacks.push(e)}}!function(){let e}();function _(e){return null==e||"object"!=typeof e?[]:Array.prototype.slice.call(e)}function T(e,t,n){const i=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return i&&(n?i[2]:decodeURIComponent(i[2]))}function S(e,t){return k(e,"trk",t)}function k(e,t,n,i){if(!e||!t)throw new Error("Required param of addQueryParam missing: url = ".concat(e,",  key = ").concat(t));t=encodeURIComponent(t),n=encodeURIComponent(n);const r=T(e,t,!0);if(r)return i?e.replace(r,n):e;{const i=e.indexOf("?");let[r,o]=e.split("#"),s="&";return i<0?s="?":i===e.length-1&&(s=""),o&&(o="#".concat(o)),"".concat(r).concat(s).concat(t,"=").concat(n).concat(o||"")}}function C(e,t,n){var i=this;if("function"!=typeof e)throw new TypeError("Expected a function.");let r;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];const c=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(i,s)}),t),c&&e.apply(i,s)}}function I(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function L(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=document.createEvent("CustomEvent");i.initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function R(e){return"string"!=typeof e?null:e.split("?")[0]}const A="click",O="keydown",x="focusEl";class N{constructor(e,t,n){let{mainButton:i,closeButton:r}=n,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)throw Error("An element must be provided to Collapsible");if(!t)throw Error("An expandable element must be provided to Collapsible");if(!i)throw Error("A main button element must be provided to Collapsible");this.el=e,this.expandableEl=t,this._isList=["UL","OL","DL"].includes(this.expandableEl.tagName);const{isOpen:s=!1}=o;this.isOpen=s,this.mainButton=i,this.closeButton=r,this.buttons=[i],this._isList&&this.el.addEventListener("keyup",(e=>this._onKeyUp(e))),this.expandableEl.addEventListener(O,(e=>this._onKeyDown(e))),this.mainButton.addEventListener(A,(e=>this.closeButton?this._open(e):this._toggle(e))),this.mainButton.addEventListener(O,(e=>this._onButtonKeyDown(e))),this.closeButton&&(this.closeButton.addEventListener(A,(()=>this.close())),this.closeButton.addEventListener(O,(e=>this._onButtonKeyDown(e))),this.buttons.push(this.closeButton))}get isList(){return this._isList}_toggle(e){this.isOpen?this.close():this._open(e)}_onButtonKeyDown(e){switch(y(e.key)){case g.ENTER:case g.SPACEBAR:e.preventDefault(),this.isOpen?this.close():this._open(e);break;case g.ARROW_UP:this.isOpen||this._open(e);break;case g.ARROW_DOWN:this.isOpen&&this.close()}}_onKeyUp(e){y(e.key)===g.SPACEBAR&&e.preventDefault()}_onKeyDown(e){const t=y(e.key);if(t===g.ESCAPE&&this.isOpen)this.close();else if(this._isList){let n;switch(t){case g.SPACEBAR:L(e.target,A);break;case g.ARROW_LEFT:case g.ARROW_UP:n=b(e.target,"li");let t=n.previousElementSibling;t&&L(t,x);break;case g.ARROW_RIGHT:case g.ARROW_DOWN:n=b(e.target,"li");let i=n.nextElementSibling;i&&L(i,x)}}}_open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isOpen){const{key:t}=e;this.isOpen=!0,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),L(this.el,"open",{key:t})}}close(){let{shouldReturnFocusToTrigger:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isOpen&&(this.isOpen=!1,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),L(this.el,"close"),e&&this.mainButton.focus())}}const M=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([disabled]):not([tabindex^="-"]):not([type="hidden"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','[tabindex]:not([tabindex^="-"]):not([disabled])'].join(",");function D(e){const t=window.getComputedStyle(e);return"hidden"===t.visibility||"none"===t.display}function P(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,i=arguments.length>2?arguments[2]:void 0;return e===n?!D(e):i&&i.get(e)?i.get(e):(D(e)?t=!1:e.parentNode&&(t=P(e.parentNode,n,i)),i&&i.set(e,t),t)}const B="collapsible-dropdown",F=".".concat(B,"__list"),U=".".concat(B,"__button"),H="no-focus-ring";class q{constructor(e){let{getFocusItemFromListItem:t=(e=>e.querySelector(M)),elementToFocus:n,dropdownTriggerEl:i,dropdownContentEl:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("An element must be provided to CollapsibleDropdown");if(this.el=e,this.dropdownContentEl=r||this.el.querySelector(F),!n){const e=this.dropdownContentEl===this.dropdownContentEl.parentElement.querySelector(M),t="-1"===this.dropdownContentEl.getAttribute("tabIndex");e||t||console.warn('elementToFocus not provided and the dropdown container is not focusable. Consider adding tabindex="-1" to:',this.dropdownContentEl)}this.elementToFocus=n||this.dropdownContentEl,this.dropdownTriggerEl=i||this.el.querySelector(U),this.hideClass="hidden",this.collapsible=new N(e,this.dropdownContentEl,{mainButton:this.dropdownTriggerEl}),this._handleBodyClick=this._handleBodyClick.bind(this),this._focusOutsideDropdown=this._focusOutsideDropdown.bind(this),this._leaveWindow=this._leaveWindow.bind(this),this._attachEventListeners(),this.collapsible.isList&&(this._getFocusItemFromListItem=t)}_attachEventListeners(){this.el.addEventListener("open",(e=>this._showDropdownList(e))),this.el.addEventListener("close",(()=>this._hideDropdownList())),this.collapsible.isList&&this.dropdownContentEl.addEventListener("focusEl",(e=>this._manageFocus(e)))}_manageFocus(e){const{target:t}=e;if(t&&this._getFocusItemFromListItem){const e=this._getFocusItemFromListItem(t);e&&e.focus()}}_handleBodyClick(e){this.el.contains(e.target)||this.collapsible.close({shouldReturnFocusToTrigger:!1})}_showDropdownList(e){this.el.addEventListener("focusout",this._focusOutsideDropdown),window.addEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.remove(this.hideClass),this.elementToFocus.focus();const{key:t}=e&&e.detail;t?this.elementToFocus.classList.remove(H):this.elementToFocus.classList.add(H),document.addEventListener("mousedown",this._handleBodyClick)}_hideDropdownList(){document.removeEventListener("mousedown",this._handleBodyClick),this.el.removeEventListener("focusout",this._focusOutsideDropdown),window.removeEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.add(this.hideClass)}_focusOutsideDropdown(e){e.relatedTarget&&!this.el.contains(e.relatedTarget)&&this.collapsible.isOpen&&this.collapsible.close()}_leaveWindow(){this.collapsible.isOpen&&this.collapsible.close()}}function j(e){let{method:t="GET",headers:n={},sendCookies:i=!0,skipCsrfToken:r=!1,postData:o,isPemEnabled:s=!1,pemDegradationTrackingMetadata:a=[],pemEntityIds:c=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=new Promise(((s,a)=>{const c=new XMLHttpRequest;if(c.addEventListener("load",(function(){if(c.status>=200&&c.status<300||304===c.status)s({status:c.status,responseText:c.responseText});else{const n=new Error("".concat(t," request for ").concat(e," has failed with status code ").concat(c.status));n.response={status:c.status,responseText:c.responseText},c.response&&(n.response.rawHeaders=c.getAllResponseHeaders()),a(n)}})),c.addEventListener("error",(function(e){a(e)})),c.open(t,e,!0),c.withCredentials=i,Object.keys(n).forEach((e=>{c.setRequestHeader(e,n[e])})),!r){const e=I("JSESSIONID");e&&c.setRequestHeader("Csrf-Token",m(e))}c.send(o)}));return s&&(a.length?function(e,t,n,i){try{const r=e.then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e,{status:e.status})})).catch((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e.response,{status:e.response?e.response.status:500,headers:e.response&&e.response.rawHeaders?W(e.response.rawHeaders):new Headers})}));window.tracking.then((e=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,i,r,e.state.currentPageInstance)}))}))}catch(e){}}(l,e,c,a):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),l}function W(e){const t=new Headers;return e&&e.trim().split(/[\r\n]+/).forEach((e=>{const n=e.trim().split(": "),i=n.shift();if(i){const e=n.join(": ");t.set(i.toLocaleLowerCase(),e)}})),t}class z{constructor(e){if(!e)throw Error("An element must be provided to LanguageSelector");this._el=e,this.listEl=this._el.querySelector(".collapsible-dropdown__list"),this.dropdownTriggerEl=this._el.querySelector(".language-selector__button"),this.currentListItem=this.listEl.querySelector(".language-selector__link--selected"),this.collapsibleDropdown=new q(e,{dropdownTriggerEl:this.dropdownTriggerEl,elementToFocus:this.currentListItem}),this._attachCustomEventListeners()}_attachCustomEventListeners(){this.listEl.addEventListener("click",this._handleLocaleButtonClick.bind(this))}_handleLocaleButtonClick(e){return function(e){const t=m(I("bcookie")||""),n=function(e){let t="";return e.indexOf("linkedin.cn")>-1?t="https://www.linkedin.cn":e.indexOf("linkedin-ei.cn")>-1?t="https://www.linkedin-ei.cn":e.indexOf("linkedin-ei.com")>-1?t="https://www.linkedin-ei.com":e.indexOf("linkedin.com")>-1&&(t="https://www.linkedin.com"),t}(f(document));return j("".concat(n,"/psettings/update-language/cors?csrfToken=").concat(encodeURIComponent(t)),{method:"POST",headers:{"Content-Type":"application/json"},postData:JSON.stringify({locale:e}),skipCsrfToken:!0})}(e.target.getAttribute("data-locale")).then((()=>{location.reload()}))}}var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:"undefined"!=typeof self?self:{},K="object"==typeof G&&G&&G.Object===Object&&G,V="object"==typeof self&&self&&self.Object===Object&&self;K||V||Function("return this")(),Object.prototype.toString,Math.max,Math.min;const Q="member-nav-header__search--focused";class X{constructor(){const e=document.querySelector(".member-nav-menu");if(!e)throw Error("The member header should have a dropdown element");const t=document.querySelector('[data-id="member-nav-header__link-item-me"]');this.collapsibleDropdown=new q(e,{dropdownTriggerEl:t}),this.searchEl=document.querySelector('[data-id="member-nav-header__search"]'),this.searchEl&&(this.searchEl.addEventListener("focusin",(()=>this.searchEl.classList.add(Q))),this.searchEl.addEventListener("focusout",(()=>this.searchEl.classList.remove(Q))))}}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $;function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||ae(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ae(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function re(e,t,n){return t&&ie(e.prototype,t),n&&ie(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){if(e){if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ue,de=new Uint8Array(16);function he(){if(!ue&&!(ue="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ue(de)}var pe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function fe(e){return"string"==typeof e&&pe.test(e)}for(var me=[],ge=0;ge<256;++ge)me.push((ge+256).toString(16).substr(1));function ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(me[e[t+0]]+me[e[t+1]]+me[e[t+2]]+me[e[t+3]]+"-"+me[e[t+4]]+me[e[t+5]]+"-"+me[e[t+6]]+me[e[t+7]]+"-"+me[e[t+8]]+me[e[t+9]]+"-"+me[e[t+10]]+me[e[t+11]]+me[e[t+12]]+me[e[t+13]]+me[e[t+14]]+me[e[t+15]]).toLowerCase();if(!fe(n))throw TypeError("Stringified UUID is invalid");return n}function ye(e,t,n){var i=(e=e||{}).random||(e.rng||he)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return ve(i)}var be=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var Ee=("undefined"!=typeof FastBoot?FastBoot.require:require)("crypto");if(Ee){var we=new Uint8Array(256),_e=we.length;be={rng:function(){return _e>we.length-16&&(Ee.randomFillSync(we),_e=0),we.slice(_e,_e+=16)}}}}"object"===("undefined"==typeof crypto?"undefined":le(crypto))&&crypto.randomUUID;function Te(){return ye(be,new Array(16),0)}function Se(e){return se(e).map((function(e){return String.fromCharCode(e)})).join("")}var ke=/^[a-zA-Z0-9/+]+[=]+$/;function Ce(e,t){return{pageUrn:Le(e),trackingId:t||function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],r=0,o=e.length,s=o%3,a=o-s;r<a;)t=e[r]<<16,t|=e[r+1]<<8,t|=e[r+2],i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push(n.charAt(63&t)),r+=3;switch(s){case 2:t=e[r]<<16,t|=e[r+1]<<8,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push("=");break;case 1:t=e[r]<<16,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push("="),i.push("=")}return i.join("")}(Te())}}function Ie(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function Le(e){return"urn:li:page:".concat(e)}function Re(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function Ae(e,t){return void 0!==t.allSettled?t.allSettled(e):function(e){return new Promise((function(t){var n=new Set,i=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map((function(e){return e.then((function(){return i(e)})).catch((function(){return i(e)}))}))}))}(e)}function Oe(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function xe(e,t,n){var i=e.get(t);i&&i.push(n)||e.set(t,[n])}function Ne(e,t,n){var i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)}var Me,De,Pe=(Me=new Map,De=new Map,{on:function(e,t){xe(Me,e,t)},before:function(e,t){xe(De,e,t)},off:function(e,t){Ne(Me,e,t)},offBefore:function(e,t){Ne(De,e,t)},emit:function(e,t){(De.get(e)||[]).concat(Me.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){De.clear(),Me.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var Be=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||Pe.emit("internal:hide",e)};document.addEventListener("visibilitychange",Be),window.addEventListener("pagehide",Be)}var Fe=Uint8Array,Ue=Uint16Array,He=Uint32Array,qe=new Fe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),je=new Fe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),We=new Fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ze=function(e,t){for(var n=new Ue(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];var r=new He(n[30]);for(i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return[n,r]},Ge=ze(qe,2),Ke=Ge[0],Ve=Ge[1];Ke[28]=258,Ve[258]=28;for(var Qe=ze(je,0)[1],Xe=new Ue(32768),Je=0;Je<32768;++Je){var Ye=(43690&Je)>>>1|(21845&Je)<<1;Ye=(61680&(Ye=(52428&Ye)>>>2|(13107&Ye)<<2))>>>4|(3855&Ye)<<4,Xe[Je]=((65280&Ye)>>>8|(255&Ye)<<8)>>>1}var Ze=function(e,t,n){for(var i=e.length,r=0,o=new Ue(t);r<i;++r)e[r]&&++o[e[r]-1];var s,a=new Ue(t);for(r=0;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;if(n){s=new Ue(1<<t);var c=15-t;for(r=0;r<i;++r)if(e[r])for(var l=r<<4|e[r],u=t-e[r],d=a[e[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[Xe[d]>>>c]=l}else for(s=new Ue(i),r=0;r<i;++r)e[r]&&(s[r]=Xe[a[e[r]-1]++]>>>15-e[r]);return s},$e=new Fe(288);for(Je=0;Je<144;++Je)$e[Je]=8;for(Je=144;Je<256;++Je)$e[Je]=9;for(Je=256;Je<280;++Je)$e[Je]=7;for(Je=280;Je<288;++Je)$e[Je]=8;var et=new Fe(32);for(Je=0;Je<32;++Je)et[Je]=5;var tt=Ze($e,9,0),nt=Ze(et,5,0),it=function(e){return(e+7)/8|0},rt=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},ot=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},st=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return[pt,0];if(1==r){var s=new Fe(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var p=new Ue(h+1),f=at(n[u-1],p,0);if(f>t){i=0;var m=0,g=f-t,v=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i<r;++i){var y=o[i].s;if(!(p[y]>t))break;m+=v-(1<<f-p[y]),p[y]=t}for(m>>>=g;m>0;){var b=o[i].s;p[b]<t?m-=1<<t-p[b]++-1:++i}for(;i>=0&&m;--i){var E=o[i].s;p[E]==t&&(--p[E],++m)}f=t}return[new Fe(p),f]},at=function e(t,n,i){return-1==t.s?Math.max(e(t.l,n,i+1),e(t.r,n,i+1)):n[t.s]=i},ct=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ue(++t),i=0,r=e[0],o=1,s=function(e){n[i++]=e},a=1;a<=t;++a)if(e[a]==r&&a!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=e[a]}return[n.subarray(0,i),t]},lt=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},ut=function(e,t,n){var i=n.length,r=it(t+2);e[r]=255&i,e[r+1]=i>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var o=0;o<i;++o)e[r+o+4]=n[o];return 8*(r+4+i)},dt=function(e,t,n,i,r,o,s,a,c,l,u){rt(t,u++,n),++r[256];for(var d=st(r,15),h=d[0],p=d[1],f=st(o,15),m=f[0],g=f[1],v=ct(h),y=v[0],b=v[1],E=ct(m),w=E[0],_=E[1],T=new Ue(19),S=0;S<y.length;++S)T[31&y[S]]++;for(S=0;S<w.length;++S)T[31&w[S]]++;for(var k=st(T,7),C=k[0],I=k[1],L=19;L>4&&!C[We[L-1]];--L);var R,A,O,x,N=l+5<<3,M=lt(r,$e)+lt(o,et)+s,D=lt(r,h)+lt(o,m)+s+14+3*L+lt(T,C)+(2*T[16]+3*T[17]+7*T[18]);if(N<=M&&N<=D)return ut(t,u,e.subarray(c,c+l));if(rt(t,u,1+(D<M)),u+=2,D<M){R=Ze(h,p,0),A=h,O=Ze(m,g,0),x=m;var P=Ze(C,I,0);for(rt(t,u,b-257),rt(t,u+5,_-1),rt(t,u+10,L-4),u+=14,S=0;S<L;++S)rt(t,u+3*S,C[We[S]]);u+=3*L;for(var B=[y,w],F=0;F<2;++F){var U=B[F];for(S=0;S<U.length;++S){var H=31&U[S];rt(t,u,P[H]),u+=C[H],H>15&&(rt(t,u,U[S]>>>5&127),u+=U[S]>>>12)}}}else R=tt,A=$e,O=nt,x=et;for(S=0;S<a;++S)if(i[S]>255){H=i[S]>>>18&31,ot(t,u,R[H+257]),u+=A[H+257],H>7&&(rt(t,u,i[S]>>>23&31),u+=qe[H]);var q=31&i[S];ot(t,u,O[q]),u+=x[q],q>3&&(ot(t,u,i[S]>>>5&8191),u+=je[q])}else ot(t,u,R[i[S]]),u+=A[i[S]];return ot(t,u,R[256]),u+A[256]},ht=new He([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),pt=new Fe(0),ft=function(e,t,n,i,r,o){var s=e.length,a=new Fe(i+s+5*(1+Math.ceil(s/7e3))+r),c=a.subarray(i,a.length-r),l=0;if(!t||s<8)for(var u=0;u<=s;u+=65535){var d=u+65535;d>=s&&(c[l>>3]=o),l=ut(c,l+1,e.subarray(u,d))}else{for(var h=ht[t-1],p=h>>>13,f=8191&h,m=(1<<n)-1,g=new Ue(32768),v=new Ue(m+1),y=Math.ceil(n/3),b=2*y,E=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&m},w=new He(25e3),_=new Ue(288),T=new Ue(32),S=0,k=0,C=(u=0,0),I=0,L=0;u<s;++u){var R=E(u),A=32767&u,O=v[R];if(g[A]=O,v[R]=A,I<=u){var x=s-u;if((S>7e3||C>24576)&&x>423){l=dt(e,c,0,w,_,T,k,C,L,u-L,l),C=S=k=0,L=u;for(var N=0;N<286;++N)_[N]=0;for(N=0;N<30;++N)T[N]=0}var M=2,D=0,P=f,B=A-O&32767;if(x>2&&R==E(u-B))for(var F=Math.min(p,x)-1,U=Math.min(32767,u),H=Math.min(258,x);B<=U&&--P&&A!=O;){if(e[u+M]==e[u+M-B]){for(var q=0;q<H&&e[u+q]==e[u+q-B];++q);if(q>M){if(M=q,D=B,q>F)break;var j=Math.min(B,q-2),W=0;for(N=0;N<j;++N){var z=u-B+N+32768&32767,G=z-g[z]+32768&32767;G>W&&(W=G,O=z)}}}B+=(A=O)-(O=g[A])+32768&32767}if(D){w[C++]=268435456|Ve[M]<<18|Qe[D];var K=31&Ve[M],V=31&Qe[D];k+=qe[K]+je[V],++_[257+K],++T[V],I=u+M,++S}else w[C++]=e[u],++_[e[u]]}}l=dt(e,c,o,w,_,T,k,C,L,u-L,l),!o&&7&l&&(l=ut(c,l+1,pt))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var i=new(2==e.BYTES_PER_ELEMENT?Ue:4==e.BYTES_PER_ELEMENT?He:Fe)(n-t);return i.set(e.subarray(t,n)),i}(a,0,i+it(l)+r)},mt=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),gt=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};var vt="undefined"!=typeof TextDecoder&&new TextDecoder;try{vt.decode(pt,{stream:!0})}catch($n){}function yt(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function bt(){try{return yt()&&"keepalive"in new Request("")}catch(e){return!1}}function Et(e){var t=e.body,n=e.keepalive,i=e.headers,r=e.compress;i["content-type"]||(i["content-type"]="text/plain;charset=UTF-8");var o=t;if(r&&"undefined"!=typeof TextEncoder)try{o=function(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,i=0;i<t.length;++i)n=mt[255&n^t[i]]^n>>>8;e=n},d:function(){return~e}}}(),i=e.length;n.p(e);var r,o,s,a=(r=e,o=t,s=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),ft(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,s,8,!0)),c=a.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&gt(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var i=0;i<=n.length;++i)e[i+10]=n.charCodeAt(i)}}(a,t),gt(a,c-8,n.d()),gt(a,c-4,i),a}((new TextEncoder).encode(t)),i["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:i,method:"POST",mode:"cors"}}function wt(e){return e&&"message"in e?e.message:"UNKNOWN_ERROR"}var _t,Tt="undefined"!=typeof navigator&&"sendBeacon"in navigator,St=bt()?function(e,t,n,i){return new Promise((function(r){fetch(e,Et({body:t,keepalive:!0,headers:n,compress:i})).catch((function(){return fetch(e,Et({body:t,keepalive:!1,headers:n,compress:i}))})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:e.status}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:wt(e)})}))}))}:function(e,t,n,i){return new Promise((function(r){if(Tt){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void r({type:"unknown",drop:!1})}fetch(e,Et({body:t,keepalive:!1,headers:n,compress:i})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:200}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:wt(e)})}))}))};function kt(e){return new Promise((function(t,n){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return n(e.error)}}))}function Ct(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",i=arguments.length>3?arguments[3]:void 0,r=indexedDB.open(e);r.onupgradeneeded=function(){try{r.result.createObjectStore(t,{keyPath:n})}catch(e){null==i||i.onError(e)}};var o=new Promise((function(e,t){r.onsuccess=function(){var t=r.result;t.onversionchange=function(){return t.close()},e(t),null==i||i.onSuccess()},r.onerror=function(){t(r.error),null==i||i.onError(r.error)}}));return function(e,n){return o.then((function(i){return n(i.transaction(t,e).objectStore(t))}))}}function It(){return _t||(_t=Ct("idb-queue","default")),_t}function Lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,i=null;return e.openKeyCursor().onsuccess=function(){var r=this.result;r&&n++<t.batchEvictionNumber?(i=r.key,r.continue()):null!=i&&e.delete(IDBKeyRange.upperBound(i))},kt(e.transaction)}var Rt=!1;function At(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:It();return n("readwrite",(function(n){return n.put(e),kt(n.count()).then((function(e){if(!(e<=t.maxNumber))return Lt(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1e3,batchEvictionNumber:300};return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:It())("readwrite",(function(t){return Lt(t,e)}))}(t,n)}))}function Ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:It();return Rt?Promise.resolve():At(e,t,n)}function xt(e,t,n){return t("readonly",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),(e<0||i.length<e)&&t.continue())},kt(t.transaction).then((function(){return i}))}))}function Nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:i})),e}function Mt(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function Dt(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function Pt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeRemaining:5,timeout:1e4};if("undefined"==typeof requestIdleCallback)setTimeout(e,t.fallbackTimeout||10);else{!function n(){requestIdleCallback((function(i){i.timeRemaining()>t.timeRemaining||i.didTimeout?e():n()}),{timeout:t.timeout})}()}}var Bt=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ne(this,e),oe(this,"config",void 0),oe(this,"compress",void 0),oe(this,"throttleControl",void 0),oe(this,"withStore",void 0),oe(this,"disablePersistence",!1),this.config=t,this.compress=i;var r=t.measureIDB;r&&performance.mark(r.createStartMark),this.withStore=Ct(t.idbName,"beacons","timestamp",{onSuccess:function(){r&&performance.measure(r.createSuccessMeasure,r.createStartMark)},onError:function(){r&&performance.measure(r.createFailMeasure,r.createStartMark),n.disablePersistence=!0}}),this.throttleControl=function(e,t){var n=0;return{throttledFn:function(){var i=Date.now();i-n>t&&(Mt((function(){return"[throttle] Run fn() at "+String(i)})),e(),n=i)},resetThrottle:function(){n=0}}}(this.replayEntries.bind(this),t.throttleWait)}return re(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push",value:function(e){var t=this;if(!this.disablePersistence){var n=function(){Mt((function(){return"Persisting to DB "+e.url})),Ot(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),Mt((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,Dt((function(){return"push failed"}))}))};this.config.useIdle?Pt(n):n()}}},{key:"clear",value:function(){var e=this;return this.disablePersistence?Promise.resolve():function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It();return Rt=!0,e("readwrite",(function(e){return e.clear(),kt(e.transaction).finally((function(){return Rt=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,Dt((function(){return"clear failed"}))}))}},{key:"peek",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):function(){return xt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:It(),"next")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,Dt((function(){return"peek failed"})),[]}))}},{key:"peekBack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):function(){return xt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:It(),"prev")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,Dt((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){Mt((function(){return"Replaying entry: shift from store"})),function(){return function(e,t,n){return t("readwrite",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),t.delete(),(e<0||i.length<e)&&t.continue())},kt(t.transaction).then((function(){return i}))}))}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:It(),"next")}(1,e.withStore).then((function(t){if(t.length>0){var n,i,r=t[0],o=r.url,s=r.body,a=r.headers,c=r.timestamp,l=r.statusCode,u=r.attemptCount;return Mt((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(u)})),null===(n=(i=e.config).onBeforeRetry)||void 0===n||n.call(i,s),St(o,s,Nt(a,e.config.headerName,u,l),e.compress).then((function(t){if("unknown"===t.type||"success"===t.type){var n,i;null===(n=(i=e.config).onResult)||void 0===n||n.call(i,t,s),e.replayEntries()}else{var r,a,d,h,p,f;if(u+1>e.config.attemptLimit)return Mt((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),t.drop=!0,void(null===(r=(a=e.config).onResult)||void 0===r||r.call(a,t,s));if("network"===t.type||e.config.statusCodes.includes(t.statusCode))return t.drop=!1,null===(d=(h=e.config).onResult)||void 0===d||d.call(h,t,s),Mt((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),Ot({url:o,body:s,timestamp:c,statusCode:l,attemptCount:u+1},e.config,e.withStore);t.drop=!0,null===(p=(f=e.config).onResult)||void 0===p||p.call(f,t,s)}}))}})).catch((function(t){e.disablePersistence=!0,t&&t.message&&Dt((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?Pt(t):t()}}}]),e}(),Ft=function(){function e(){ne(this,e)}return re(e,[{key:"onNotify",value:function(){}},{key:"push",value:function(){}},{key:"clear",value:function(){return Promise.resolve()}},{key:"peek",value:function(){return Promise.resolve([])}},{key:"peekBack",value:function(){return Promise.resolve([])}}]),e}(),Ut=function(){function e(t,n){ne(this,e),oe(this,"queue",void 0),oe(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new Bt(t,n.compress):new Ft}return re(e,[{key:"pushToQueue",value:function(e){this.queue.push(e)}},{key:"notifyQueue",value:function(){this.queue.onNotify()}},{key:"clearQueue",value:function(){return this.beaconListeners.forEach((function(e){return e()})),this.queue.clear()}},{key:"peekQueue",value:function(e){return this.queue.peek(e)}},{key:"peekBackQueue",value:function(e){return this.queue.peekBack(e)}},{key:"onClear",value:function(e){this.beaconListeners.add(e)}},{key:"removeOnClear",value:function(e){this.beaconListeners.delete(e)}}]),e}();oe(Ut,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var Ht=[502,504],qt=[429,503],jt=function(){function e(t,n,i,r){var o=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ne(this,e),oe(this,"url",void 0),oe(this,"body",void 0),oe(this,"config",void 0),oe(this,"persistenceConfig",void 0),oe(this,"compress",void 0),oe(this,"timestamp",void 0),oe(this,"isClearQueuePending",!1),oe(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=i,this.persistenceConfig=r,this.compress=s,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return re(e,[{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.persistenceConfig.db.onClear(this.onClearCallback);var n=this.retryLimit;return this.retry((function(t){return St(e.url,e.body,t,e.compress)}),n,t).finally((function(){Mt((function(){return"beacon finished"})),e.persistenceConfig.db.removeOnClear(e.onClearCallback)}))}},{key:"retryLimit",get:function(){return this.config.attemptLimit}},{key:"getAttemptCount",value:function(e){return this.retryLimit-e+1}},{key:"retry",value:function(e,t,n,i){var r=this,o=this.getAttemptCount(t)-1;return e(Nt(n,this.config.headerName,o,i)).then((function(i){var o,s,a,c;if(i.drop=!1,"unknown"===i.type||"success"===i.type)r.isClearQueuePending||r.persistenceConfig.disabled||r.persistenceConfig.db.notifyQueue(),a=i;else if(Mt((function(){return"retry rejected "+JSON.stringify(i)})),r.shouldPersist(t,i))r.persistenceConfig.db.pushToQueue({url:r.url,body:r.body,headers:n,statusCode:i.statusCode,timestamp:r.timestamp,attemptCount:r.getAttemptCount(t)}),a={type:"persisted",drop:!1,statusCode:i.statusCode};else{if(t>0&&r.isRetryableError(i)){var l,u;null===(l=(u=r.config).onIntermediateResult)||void 0===l||l.call(u,i,r.body);var d=r.config.calculateRetryDelay(r.getAttemptCount(t),t);return Mt((function(){return"in memory retry in ".concat(d,"ms")})),(c=d,new Promise((function(e){return setTimeout(e,c)}))).then((function(){return r.retry(e,t-1,n,i.statusCode)}))}(a=i).drop=!0}return null===(o=(s=r.config).onIntermediateResult)||void 0===o||o.call(s,a,r.body),a}))}},{key:"isRetryableError",value:function(e){return!("network"!==e.type&&!this.config.statusCodes.includes(e.statusCode))}},{key:"shouldPersist",value:function(e,t){return!(this.isClearQueuePending||this.persistenceConfig.disabled||navigator.onLine&&(0!==e||"network"!==t.type)&&("response"!==t.type||!this.persistenceConfig.statusCodes.includes(t.statusCode)))}}]),e}();function Wt(e,t,n,i,r){"control"!==i&&e.retryConfig&&function(){if("undefined"==typeof Promise||"undefined"==typeof navigator)return!1;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.cookieEnabled,n=navigator.storage;return e&&bt()&&t&&n}()&&navigator.storage.estimate().then((function(o){if(!((o.quota||0)-(o.usage||0)>52428800))return function(e){var t=window.indexedDB.deleteDatabase(e);return new Promise((function(e,n){t.onsuccess=function(){return e()},t.onerror=function(){return n(t.error)}}))}("beacons");var s,a,c=null!==(s=e.retryConfig.inMemory)&&void 0!==s?s:{attemptLimit:4,statusCodes:[502,504]},l=null!==(a=e.retryConfig.persist)&&void 0!==a?a:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u={compress:n,inMemoryRetry:{onIntermediateResult:null==r?void 0:r.onIntermediateResult,attemptLimit:c.attemptLimit,statusCodes:c.statusCodes,headerName:"x-li-retry-context",calculateRetryDelay:function(e){return function(e){return 1e3*Math.pow(2,e)}(e)}},disablePersistenceRetry:e.retryConfig.disablePersistence,persistenceRetry:{onBeforeRetry:null==r?void 0:r.onBeforeRetry,onResult:null==r?void 0:r.onResult,idbName:"beacons",attemptLimit:l.attemptLimit,statusCodes:l.statusCodes,maxNumber:l.maxNumber,batchEvictionNumber:l.batchEvictionNumber,throttleWait:l.throttleWait,useIdle:!0,measureIDB:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Boolean(t.compress),i=Object.assign({attemptLimit:0,statusCodes:Ht,calculateRetryDelay:function(e,t){return 2e3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var r=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:qt,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},t.persistenceRetry);r.headerName=r.headerName||i.headerName,e=new Ut(r,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(r,o,s){var a;return yt()?new jt(r,o,i,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(a=t.persistenceRetry)||void 0===a?void 0:a.statusCodes)||qt},n).send(s):Promise.resolve({type:"unknown",drop:!0})},database:e}}(u),h=d.beacon,p=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:p},"enabled"===i?(e.retryBeacon.shouldRetry=!1,!u.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?p.peekQueue(1).then((function(e){if(Array.isArray(e)&&e[0]){var t=JSON.parse(e[0].body);if(Array.isArray(t)&&t.some((function(e){return!e.eventInfo.shouldAnonymizeMemberId})))return p.clearQueue()}}),(function(){return p.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){Pe.emit("internal:error",{tags:["core-web-tracking:retry:idb"],reason:e})})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Pe.emit("internal:error",{tags:["core-web-tracking:retry:setup"],reason:e})}))}var zt=function(){function e(t){ne(this,e),oe(this,"host",void 0),this.host=t}return re(e,[{key:"checkAndEnablePersistentRetry",value:function(e,t){if("function"==typeof(null==e?void 0:e.shouldAnonymizeMemberId)&&!this.host.retryBeacon){var n=this.getRetryTreatment();this.host.retryConfig&&Wt(this.host,e,this.shouldCompressPayload(),n,t)}}},{key:"clearPersistedEventsOnLogout",value:function(){var e=this.host.retryBeacon;if(e&&e.shouldRetry)return e.shouldRetry=!1,e.database.clearQueue().catch((function(e){Pe.emit("internal:error",{tags:["core-web-tracking:retry:logout"],reason:e})}))}},{key:"sendPayload",value:function(e,t,n,i){var r,o=this.getRetryTreatment();bt()&&"control"!==o&&null!==(r=this.host.retryBeacon)&&void 0!==r&&r.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,i)}},{key:"sendPayloadWithRetry",value:function(e,t,n){(!Array.isArray(t)||t.length>0)&&this.host.retryBeacon.beacon(e,JSON.stringify(t),n).catch((function(e){Pe.emit("internal:error",{tags:["core-web-tracking:retry:beacon"],reason:e})}))}},{key:"sendPayloadFireForget",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;(!Array.isArray(t)||t.length>0)&&("undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1||!yt()||"undefined"==typeof Promise?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var i=new XMLHttpRequest;if(i.open("POST",e,!0),i.withCredentials=!0,n.headers)for(var r=0,o=Object.keys(n.headers);r<o.length;r++){var s=o[r];i.setRequestHeader(s,n.headers[s])}i.send(t)}}(e,JSON.stringify(t),{headers:n}):St(e,JSON.stringify(t),n,this.shouldCompressPayload()).then((function(e){null==i||i.onResult(e,t)}),(function(){})))}},{key:"getRetryTreatment",value:function(){var e,t,n;if(!this.host.retryConfig)return"control";var i=this.host.retryConfig.lixKey;return i?null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,i))&&void 0!==e?e:"control":"enabled"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression}}]),e}(),Gt="undefined"!=typeof window&&"undefined"!=typeof document,Kt=/JSESSIONID="?([^";]+)"?/,Vt="",Qt=0;function Xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,i=e.regex,r=void 0===i?Kt:i;if(!Vt||Date.now()-Qt>n){var o=Gt&&document.cookie.match(r);Vt=o&&o[1]||"",Qt=Date.now()}return Vt}var Jt=function(){function e(t){ne(this,e),oe(this,"networkTransporter",void 0),oe(this,"inactive",void 0),oe(this,"mpName",void 0),oe(this,"endpoint",void 0),oe(this,"debug",void 0),this.networkTransporter=new zt(t),this.mpName=t.appId,this.inactive=t.inactive;var n=function(e){var t,n=!1;switch(e){case"https://www.linkedin.com/li/track":t=Zt;break;case"https://www.linkedin-ei.com/li/track/validate":default:n=!0,t=Yt;break;case"https://www.linkedin-ei.com/li/track":t=Yt}return{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return re(e,[{key:"fireFragment",value:function(e){if(!this.inactive){var t={"content-type":"application/json; charset=UTF-8","x-li-track":JSON.stringify({mpName:this.mpName}),"csrf-token":Xt(),"x-restli-protocol-version":"2.0.0"},n={fragmentEvent:e,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,n,t)}}}]),e}(),Yt="https://www.linkedin-ei.com/trackingMonitoring/?action=saveClientFragment",Zt="https://www.linkedin.com/trackingMonitoring/?action=saveClientFragment";function $t(e){return"string"==typeof e}function en(e){return $t(e)?e:e.topicName||e.eventName}function tn(e){return $t(e)?e:e.eventName}var nn,rn,on=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ne(this,e),oe(this,"host",void 0),oe(this,"cmoTransporter",void 0),oe(this,"clientMonitoringInstanceId",Se(Te())),oe(this,"currentContext",{pageKey:"unknown",pageInstance:Ce("unknown")}),oe(this,"appState",{}),oe(this,"estimatedFragmentSize",0),oe(this,"fragmentSizeLimit",void 0),oe(this,"activeFragmentEvent",void 0),oe(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=i.cmoTransporter||new Jt(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=an(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return re(e,[{key:"getCurrentInstanceId",value:function(){return this.clientMonitoringInstanceId}},{key:"scheduleDebouncedFiring",value:function(){var e,t,n=this;void 0!==this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.fragmentIsFull()&&this.fireFragmentEventIfFull(!0),this.debounceTimer=setTimeout((function(){n.fireFragmentEventIfFull()}),null!==(e=null===(t=this.host.batching)||void 0===t?void 0:t.debounceTime)&&void 0!==e?e:1)}},{key:"logEventGenerated",value:function(e){this.scheduleDebouncedFiring();var t=this.activeFragmentEvent.stats,n=this.activeFragmentEvent.firstEventNumber+t.eventsGenerated;return t.eventTopics.push(e),t.eventsGenerated++,this.estimatedFragmentSize+=e.length,n}},{key:"logEventReadyToSend",value:function(e){this.activeFragmentEvent.stats.eventsReadyToSend+=e}},{key:"logEventSent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId();t===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.eventsSent+=e:this.findPreviousInstanceStat(t,(function(t){t.eventsSent+=e}))}},{key:"logNetworkResponseCode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId(),n=this.activeFragmentEvent.stats.networkResponseStats;t!==this.getCurrentInstanceId()&&this.findPreviousInstanceStat(t,(function(e){n=e.networkResponseStats})),e>=200&&e<300?n.eventsWith2XXResponse++:400===e?n.eventsWith400Response++:408===e?n.eventsWith408Response++:429===e?n.eventsWith429Response++:e>400&&e<500?n.eventsWith4XXResponse++:500===e?n.eventsWith500Response++:502===e?n.eventsWith502Response++:503===e?n.eventsWith503Response++:504===e?n.eventsWith504Response++:e>500&&e<600&&n.eventsWith5XXResponse++}},{key:"findPreviousInstanceStat",value:function(e,t){var n,i=te(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.instanceId===e)return void t(r)}}catch(e){i.e(e)}finally{i.f()}var o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,instanceId:e,eventsSent:0,eventTopics:[],networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},failures:[]};t(c),this.activeFragmentEvent.stats.previousInstanceEventStats.push(c)}},{key:"logFailedEvent",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,instanceId:r,instanceEventNumber:i,reason:e,rawError:n,eventName:tn(t),eventTopic:en(t)};this.estimatedFragmentSize+=JSON.stringify(c).length,r===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(c):this.findPreviousInstanceStat(r,(function(e){e.failures.push(c)})),this.fireFragmentEventIfFull()}},{key:"flush",value:function(){this.activeFragmentEvent.isLastFragment=!0,this.fireFragmentEventIfFull(!0)}},{key:"fragmentIsFull",value:function(){return this.activeFragmentEvent.stats.eventsGenerated>=100||this.estimatedFragmentSize>=this.fragmentSizeLimit}},{key:"fireFragmentEventIfFull",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.fragmentIsFull()){this.debounceTimer=void 0;var e=this.getEventHeaders(),t=e.header,n=e.requestHeader,i=this.activeFragmentEvent;i.header=t,i.requestHeader=n,this.cmoTransporter.fireFragment(i),this.estimatedFragmentSize=0,this.activeFragmentEvent=an(this.clientMonitoringInstanceId,i.fragmentNumber+1,i.firstEventNumber+i.stats.eventsGenerated,!1,e)}}},{key:"setCurrentContext",value:function(e){this.currentContext=e}},{key:"updateAppState",value:function(e){this.host.api.assign(this.appState,e)}},{key:"getEventHeaders",value:function(){var e=void 0;this.appState.clientApplicationInstance&&((e=this.appState.clientApplicationInstance).trackingId=cn(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=cn(t.trackingId),{requestHeader:{interfaceLocale:this.host.locale,pageKey:this.currentContext.pageKey,path:this.host.api.location.pathname+this.host.api.location.search,referer:this.host.api.document.referrer},header:{applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:e,pageInstance:t,time:Date.now(),version:this.host.appVersion,server:"",service:"",guid:"0000000000000000"}}}}]),e}();function sn(e){return nn||(nn=new on(e)),{getCurrentInstanceId:function(){return nn.getCurrentInstanceId()},logEventGenerated:function(e){return nn.logEventGenerated(e)},logEventReadyToSend:function(e){nn.logEventReadyToSend(e)},logEventSent:function(e){nn.logEventSent(e)},logPersistedEventSent:function(e,t){nn.logEventSent(t,e)},logNetworkResponseCode:function(e){nn.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=nn)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,i){nn.logFailedEvent(e,t,n,i)},logPersistedFailedEvent:function(e,t,n,i,r){nn.logFailedEvent(t,n,i,r,e)},flush:function(){nn.flush()},destroy:function(){nn=void 0},isDestroyed:function(){return void 0===nn},setCurrentContext:function(e){nn.setCurrentContext(e)},updateAppState:function(e){nn.updateAppState(e)}}}function an(e,t,n,i,r){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:i,stats:{instanceId:e,eventsGenerated:0,eventsReadyToSend:0,eventsSent:0,networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},eventTopics:[],failures:[],previousInstanceEventStats:[]},requestHeader:r.requestHeader,header:r.header}}function cn(e){return Array.isArray(e)?Se(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(ke)}(e)?atob(e):Se(function(e){return function(e){if(!fe(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(e)}(e))}!function(e){e.NONE="NONE",e.UNKNOWN_EXECUTION_ERROR="UNKNOWN_EXECUTION_ERROR",e.MISSING_REQUIRED_PROPERTIES="MISSING_REQUIRED_PROPERITES",e.STORAGE_WRITE_FAILURE="STORAGE_WRITE_FAILURE",e.RETRIES_EXCEEDED="RETRIES_EXCEEDED",e.EVENT_EVICTED_FROM_STORAGE="EVENT_EVICTED_FROM_STORAGE",e.STORAGE_UNAVAILABLE="STORAGE_UNAVAILABLE",e.SERIALIZATION_FAILURE="SERIALIZATION_FAILURE"}(rn||(rn={}));var ln,un,dn,hn="PageViewEvent",pn=function(){function e(t){var n,i=this;ne(this,e),oe(this,"host",void 0),oe(this,"queue",void 0),oe(this,"preContextQueue",void 0),oe(this,"debounceTimer",void 0),oe(this,"unloadHandlers",void 0),oe(this,"maxQueueSize",void 0),oe(this,"flushDebounceTime",void 0),oe(this,"trackingEventListeners",[]),oe(this,"onHideHandler",(function(){i.forceFlush()})),oe(this,"networkTransporter",void 0),oe(this,"clientMonitoringConn",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var r=t.batching;this.maxQueueSize=r&&r.maxSize||1,this.flushDebounceTime=r&&r.debounceTime||0,Pe.on("internal:hide",this.onHideHandler),this.networkTransporter=new zt(t),"enabled"===(null===(n=t.__getLixTreatment)||void 0===n?void 0:n.call(t,"pemberly.tracking.monitoring"))&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=sn(t))}return re(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var i;if(t&&!t.isDestroyed())try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&i.forEach((function(n){var i,r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logFailedEvent(rn.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},a,null!==(i=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==i?i:-1)}))}catch(e){}},onBeforeRetry:function(e){var n;if(t&&!t.isDestroyed())try{if(n=JSON.parse(e),!Array.isArray(n)||0===n.length||!n[0].eventBody.header.clientMonitoringInstanceId)return;var i=n[0].eventBody.header.clientMonitoringInstanceId,r=n.length;t.logPersistedEventSent(i,r)}catch(e){}},onResult:function(e,n){var i;if(t)try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length||!i[0].eventBody.header.clientMonitoringInstanceId)return;var r=i[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(r,e.statusCode),!0===e.drop&&i.forEach((function(n){var i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logPersistedFailedEvent(r,rn.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},a,n.eventBody.header.clientMonitoringInstanceEventNumber)}))}catch(e){}}});this.networkTransporter.checkAndEnablePersistentRetry(e,n)}},{key:"clearPersistedEventsOnLogout",value:function(){return this.networkTransporter.clearPersistedEventsOnLogout()}},{key:"on",value:function(e){this.trackingEventListeners.push(e)}},{key:"fireEvent",value:function(e){var t=function(e){return e.meta.time=Date.now(),e}(e);this.clientMonitoringConn&&(t.meta.clientMonitoringInstanceId=this.clientMonitoringConn.getCurrentInstanceId(),t.meta.clientMonitoringInstanceEventNumber=this.clientMonitoringConn.logEventGenerated(en(e.id)));var n,i=this.host,r=i.api.Promise,o=i.batching;return function(e){return!!e.meta.context}(t)?(this.prepareCompleteEnvelopeQueue(t),null===(n=this.clientMonitoringConn)||void 0===n||n.logEventReadyToSend(1),o?(this.batchFire(),r.resolve(!0)):(this.flush(!0),r.resolve(!0))):(this.preContextQueue.push(t),r.resolve(!0))}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,Pe.off("internal:hide",this.onHideHandler)}},{key:"forceFlush",value:function(){var e=this;this.populatePreContextQueue({pageInstance:Ce("unknown"),pageKey:"unknown"}).forEach((function(t){return e.queue.push(t)})),this.flush(!0)}},{key:"prepareCompleteEnvelopeQueue",value:function(e){var t=this,n=e.meta.context=Re(e.meta.context,this.host.api);"function"==typeof e.body&&(e.body=e.body(n)),this.preContextQueue.length>0&&this.populatePreContextQueue(n).forEach((function(e){return t.queue.push(e)})),this.queue.push(e)}},{key:"envelop",value:function(e,t){var n=this.host,i=n.appId,r=n.api;return{eventBody:t,eventInfo:"string"==typeof e?{appId:i,eventName:e,topicName:e}:r.assign({appId:i},e)}}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,i=n.appVersion,r=n.locale,o=n.api,s=o.location,a=o.document,c=o.assign,l=e.meta.context,u=l.pageKey,d=l.pageInstance,h=function(e){return"string"==typeof e?e===hn:e.eventName===hn}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||u,p=null;"string"!=typeof r&&null!==this.host.locale||(p=r);var f={interfaceLocale:p,pageKey:h,path:s.pathname+s.search,referer:a.referrer},m={header:c({pageInstance:d,time:e.meta.time,version:i},e.meta.header||{}),requestHeader:c(f,e.meta.requestHeader||{})},g=e.meta.clientMonitoringInstanceId,v=e.meta.clientMonitoringInstanceEventNumber;return g&&c(m.header,{clientMonitoringInstanceId:g,clientMonitoringInstanceEventNumber:v}),c(e.body,m)}},{key:"populatePreContextQueue",value:function(e){var t,n=this.preContextQueue;return this.preContextQueue=[],null===(t=this.clientMonitoringConn)||void 0===t||t.logEventReadyToSend(n.length),n.map((function(t){return t.meta.context=e,"function"==typeof t.body&&(t.body=t.body(e)),t}))}},{key:"trigger",value:function(e,t){this.trackingEventListeners.forEach((function(n){return n(e,t)}))}},{key:"requestFlush",value:function(e){var t=this;e((function(n){n.timeRemaining()>5||n.didTimeout?t.forceFlush():t.requestFlush(e)}),{timeout:1e4})}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.host.api.requestIdleCallback;e||!t?this.sendPayload():this.requestFlush(t)}},{key:"batchFire",value:function(){var e=this;this.queue.length>this.maxQueueSize?this.flush():(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){return e.flush()}),this.flushDebounceTime))}},{key:"sendPayload",value:function(){var e=this,t=this.queue;if(0!==t.length){this.queue=[];var n,i,r=[],o=[];t.forEach((function(t){var n=e.getGenericEventBody(t),i=e.envelop(t.id,n);e.trigger(i,t.meta);var s=i.eventInfo.eventName;"LixTreatmentsEvent"===s||"JavaScriptErrorEvent"===s?r.push(i):o.push(i)})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(r.length+o.length),i=this.clientMonitoringConn,n={onResult:function(e,t){i&&!i.isDestroyed()&&(e.statusCode&&i.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,r=t.eventInfo.topicName||n,o="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(o)].join(", ");null==i||i.logFailedEvent(rn.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:r},s,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.host.endpoint,r,void 0,n),this.networkTransporter.sendPayload(this.host.endpoint,o,void 0,n))}}}]),e}();function fn(e){if(!e)return{};var t=e.trk,n=!1,i=e.licu&&decodeURIComponent(e.licu);e.external_control&&(i="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)),n=!0);var r=e.lipi&&function(e){var t=decodeURIComponent(e).split(";");if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi),o=r&&{pageInstance:r,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var s=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(s),trackingId:e.external_page_instance},pageKey:s},n=!0}var a=e.external_app&&e.external_app_instance?{applicationUrn:"urn:li:externalApplication:".concat(decodeURIComponent(e.external_app)),trackingId:e.external_app_instance,version:""}:void 0;return a&&((o=o||{}).applicationInstance=a),{fromExternalApp:n||!!a,previousApplicationInstance:a,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:i}}function mn(e){return"retryConfig"in e.host}!function(){function e(t,n){var i,r;if(ne(this,e),oe(this,"transporter",void 0),oe(this,"delegate",void 0),oe(this,"currentContext",void 0),oe(this,"appState",void 0),oe(this,"previousAppContext",void 0),oe(this,"customTransporters",void 0),oe(this,"clientMonitoringConn",void 0),this.transporter=t,this.delegate=n,this.appState={},this.customTransporters={},n&&n.customTransporterHosts)for(var o in n.customTransporterHosts)if(Object.prototype.hasOwnProperty.call(n.customTransporterHosts,o)){var s=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[o]=new pn(this.transporter.host.api.assign(s,n.customTransporterHosts[o]))}"enabled"===(null===(i=(r=t.host).__getLixTreatment)||void 0===i?void 0:i.call(r,"pemberly.tracking.monitoring"))&&t.host.clientMonitoringConfig&&!t.host.inactive&&"location"in t.host.api&&(this.clientMonitoringConn=sn(t.host))}re(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){mn(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=mn(this.transporter)?this.transporter.clearPersistedEventsOnLogout():null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return Re(this.currentContext,this.host.api)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.navMetaFromSeed(e,fn(t));if(this.setCurrentContext(i.to),!n.suppressEventsFiring)return this.fireNavEvents(i)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=Re(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(Re(e,this.host.api))}},{key:"updateAppState",value:function(e){var t;this.host.api.assign(this.appState,e),null===(t=this.clientMonitoringConn)||void 0===t||t.updateAppState(e)}},{key:"fireCIE",value:function(e,t,n,i,r){return this.fireEvent("ControlInteractionEvent",(function(n){var o=Ie(n.pageKey,e),s={controlTrackingId:i,controlUrn:o,interactionType:t};return r&&r(o),s}),{context:n})}},{key:"fireEvent",value:function(e,t,n){if(!t){var i=en(e),r=void 0===t?"undefined":null===t?"null":le(t),o='Firing tracking event "'.concat(i,'" with invalid body, you fired "').concat(r,'"');if(this.clientMonitoringConn){var s=this.clientMonitoringConn.logEventGenerated(i);this.clientMonitoringConn.logFailedEvent(rn.MISSING_REQUIRED_PROPERTIES,e,o,s)}throw new Error(o)}return this.fireEnvelope(this.generateEnvelope(e,t,n))}},{key:"fireEnvelope",value:function(e){var t,n;if(null!==(t=this.delegate)&&void 0!==t&&null!==(n=t.shouldAnonymizeMemberId)&&void 0!==n&&n.call(t))if($t(e.id)){var i=e.id;e.id={eventName:i,topicName:i,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var r=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(r){var o=r.meta.transporterKey,s=o?this.customTransporters[o]:this.transporter;if(!s&&o){var a=en(r.id),c="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var l=this.clientMonitoringConn.logEventGenerated(a);this.clientMonitoringConn.logFailedEvent(rn.UNKNOWN_EXECUTION_ERROR,r.id,c,l)}throw new Error(c)}return s.fireEvent(r)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return Ce(e,t)}},{key:"firePVE",value:function(e,t,n){var i={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},r=this.host.api.assign(i,t),o=this.generateEnvelope("PageViewEvent",r,{context:n});return o.meta.requestHeader.pageKey=e,this.fireEnvelope(o)}},{key:"destroy",value:function(){for(var e in this.transporter.destroy(),this.customTransporters)this.customTransporters[e].destroy();this.clientMonitoringConn&&(this.clientMonitoringConn.flush(),this.clientMonitoringConn.destroy(),this.clientMonitoringConn=void 0),Pe.clear()}},{key:"forceFlush",value:function(){for(var e in this.transporter.forceFlush(),this.customTransporters)this.customTransporters[e].forceFlush()}},{key:"generateControlUrn",value:function(e,t){return Ie((t||this.currentContext||{pageKey:"unknown"}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,i){var r={controlTrackingId:i,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",r,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,i=e.from;return{previousPageInstance:i&&i.pageInstance,triggerControlTrackingId:t,triggerControlUrn:n}}},{key:"getTrackingCode",value:function(){return this.previousAppContext&&this.previousAppContext.pageKey}},{key:"navMetaFromSeed",value:function(e,t){var n="NavigationEvent";this.previousAppContext=t.previousContext;var i=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:i,to:{applicationInstance:t.applicationInstance,pageInstance:this.generatePageInstance(e,t.pageTrackingId),pageKey:e},triggerId:t.previousControlId,triggerUrn:t.previousControlUrn}}},{key:"fireNavEvents",value:function(e){var t=this.generateNavigationEvent(e),n=e.to,i=e.from,r=e.navEventId,o=this.generateEnvelope(r,t);o.meta.requestHeader.pageKey=n.pageKey;var s=i&&i.applicationInstance;return s&&(o.meta.header.clientApplicationInstance=s),this.host.api.Promise.all([this.firePVE(n.pageKey),this.fireEnvelope(o)])}},{key:"generateEnvelope",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&Re(this.currentContext,this.host.api),requestHeader:this.host.api.assign({trackingCode:this.getTrackingCode()},n.requestHeader||{}),header:this.host.api.assign({applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:this.appState.clientApplicationInstance},n.header||{})};return{body:"function"==typeof t?t:function(){return t},id:e,meta:i}}}])}(),function(){function e(t,n){var i,r=this;ne(this,e),oe(this,"core",void 0),oe(this,"protocol",void 0),oe(this,"throttleKeySet",new Set),oe(this,"config",void 0),oe(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),r.reportError(e.reason,e.tags.concat(["info"])).catch((function(){}))})),this.core=t;var o=this.core.host.api.location.protocol;this.protocol=o.substring(0,o.length-1),this.config={throttleTime:null!==(i=null==n?void 0:n.throttleTime)&&void 0!==i?i:100},Pe.on("internal:error",this.reportTransporterError)}re(e,[{key:"reportError",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callTreeId,s=void 0===o?"":o,a=r.responseHeaders,c=void 0===a?{}:a,l=e.message,u=e.name,d=e.stack,h=void 0===d?"":d,p=e.fileName,f=void 0===p?"":p,m=e.lineNumber,g=void 0===m?0:m,v=e.columnNumber,y=void 0===v?0:v,b=this.core.host,E=b.appId,w=b.appVersion,_=b.service,T=b.serviceInstance,S=b.treeID,k=void 0===S?"":S,C=b.api,I=C.Promise,L=C.location,R=L.host,A=L.pathname,O=L.search,x=L.hash,N=void 0===x?"":x;if(c){t={};var M=new Map;Object.keys(c).forEach((function(e){M.set(e.toLowerCase(),c[e])})),t.callTreeId=M.get("x-li-uuid"),t.microsoftEdgeReference=M.get("x-msedge-ref"),t.pointOfPresenceId=M.get("x-li-pop"),t.fabric=M.get("x-li-fabric")}var D=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:E,e:{c:y,l:g,m:l,s:h,t:u,u:f},h:N,l:n.protocol,o:R,p:A,pageKey:e.pageKey,q:O,service:_,serviceInstance:T,serviceVersion:w,t:i,trackingID:e.pageInstance.trackingId,treeID:k,callTreeId:s,responseTraceHeaders:t}}))};if(this.config.throttleTime<0)return D();var P=function(e){return e.split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)}(u+l+h+i.join("")+s);return this.throttleKeySet.has(P)?I.resolve(!1):(this.throttleKeySet.add(P),setTimeout((function(){return n.throttleKeySet.delete(P)}),this.config.throttleTime),D())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),Pe.off("internal:error",this.reportTransporterError)}}])}();var gn=function(){function e(){ne(this,e),oe(this,"userTimingEntries",[]),oe(this,"longTasks",[]),oe(this,"resourceTimingEntries",[]),oe(this,"cdnData",void 0)}return re(e,[{key:"reset",value:function(){this.userTimingEntries=[],this.longTasks=[],this.resourceTimingEntries=[]}},{key:"attachTreeIds",value:function(e){this.resourceTimingEntries.forEach((function(t){var n=e.get(t.name);n&&(t.resourceTreeId=n)}))}},{key:"getData",value:function(){return{userTimingEntries:this.userTimingEntries,longTasks:this.longTasks,resourceTimingEntries:this.resourceTimingEntries.map(yn),cdnData:this.cdnData}}}]),e}(),vn=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function yn(e){return vn.reduce((function(t,n){var i=e[n];return void 0!==i&&(t[n]=i),t}),{})}function bn(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};un=Object.assign(Object.assign({},n),t),dn=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(un.root,n);var i=En(e,ln.All,(function(){return En(e,ln.Two,(function(){return En(e,ln.One)}))}));if(i){var r=An(On(i,e));return r.length>0&&(i=r[0]),_n(i)}throw new Error("Selector was not found.")}function En(e,t,n){for(var i=null,r=[],o=e,s=0,a=function(){var e=In(function(e){var t=e.getAttribute("id");return t&&un.idName(t)?{name:"#"+Fn(t,{isIdentifier:!0}),penalty:0}:null}(o))||In.apply(void 0,se(function(e){return Array.from(e.attributes).filter((function(e){return un.attr(e.name,e.value)})).map((function(e){return{name:"["+Fn(e.name,{isIdentifier:!0})+'="'+Fn(e.value)+'"]',penalty:.5}}))}(o)))||In.apply(void 0,se(function(e){return Array.from(e.classList).filter(un.className).map((function(e){return{name:"."+Fn(e,{isIdentifier:!0}),penalty:1}}))}(o)))||In(function(e){var t=e.tagName.toLowerCase();return un.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],a=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var i=0;n&&(n.nodeType===Node.ELEMENT_NODE&&i++,n!==e);)n=n.nextSibling;return i}(o);if(t===ln.All)a&&(e=e.concat(e.filter(Cn).map((function(e){return kn(e,a)}))));else if(t===ln.Two)e=e.slice(0,1),a&&(e=e.concat(e.filter(Cn).map((function(e){return kn(e,a)}))));else if(t===ln.One){var c=ee(e=e.slice(0,1),1)[0];a&&Cn(c)&&(e=[kn(c,a)])}var l,u=te(e);try{for(u.s();!(l=u.n()).done;)l.value.level=s}catch(e){u.e(e)}finally{u.f()}if(r.push(e),r.length>=un.seedMinLength&&(i=wn(r,n)))return"break";o=o.parentElement,s++};o&&o!==un.root.parentElement&&"break"!==a(););return i||(i=wn(r,n)),i}function wn(e,t){var n=An(Rn(e));if(n.length>un.threshold)return t?t():null;var i,r=te(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(Sn(o))return o}}catch(e){r.e(e)}finally{r.f()}return null}function _n(e){for(var t=e[0],n=t.name,i=1;i<e.length;i++){var r=e[i].level||0;n=t.level===r-1?"".concat(e[i].name," > ").concat(n):"".concat(e[i].name," ").concat(n),t=e[i]}return n}function Tn(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function Sn(e){switch(dn.querySelectorAll(_n(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(_n(e)));case 1:return!0;default:return!1}}function kn(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Cn(e){return"html"!==e.name&&!e.name.startsWith("#")}function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.filter(Ln);return i.length>0?i:null}function Ln(e){return null!=e}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,i=[],r=te(e[0]);try{for(r.s();!(n=r.n()).done;){var o=n.value;i=i.concat(Rn(e.slice(1,e.length),t.concat(o)))}}catch(e){r.e(e)}finally{r.f()}return i}return[t]}function An(e){return Array.from(e).sort((function(e,t){return Tn(e)-Tn(t)}))}function On(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},i=[];if(e.length>2&&e.length>un.optimizedMinLength)for(var r=1;r<e.length-1;r++){if(n.counter>un.maxNumberOfTries)return i;n.counter+=1;var o=se(e);o.splice(r,1);var s=_n(o);if(n.visited.has(s))return i;Sn(o)&&xn(o,t)&&(i.push(o),n.visited.set(s,!0),i=i.concat(On(o,t,n)))}return i}function xn(e,t){return dn.querySelector(_n(e))===t}!function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(ln||(ln={}));var Nn,Mn=/[ -,\.\/:-@\[-\^`\{-~]/,Dn=/[ -,\.\/:-@\[\]\^`\{-~]/,Pn=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Bn={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},Bn),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var i="double"==n.quotes?'"':"'",r=n.isIdentifier,o=e.charAt(0),s="",a=0,c=e.length;a<c;){var l=e.charAt(a++),u=l.charCodeAt(0),d=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&a<c){var h=e.charCodeAt(a++);56320==(64512&h)?u=((1023&u)<<10)+(1023&h)+65536:a--}d="\\"+u.toString(16).toUpperCase()+" "}else d=n.escapeEverything?Mn.test(l)?"\\"+l:"\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?"\\"+u.toString(16).toUpperCase()+" ":"\\"==l||!r&&('"'==l&&i==l||"'"==l&&i==l)||r&&Dn.test(l)?"\\"+l:l;s+=d}return r&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(o)&&(s="\\3"+o+" "+s.slice(1))),s=s.replace(Pn,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!r&&n.wrap?i+s+i:s}function Un(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n,i=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(i+n)}return Date.now()}function Hn(e){var t=e||performance;return Math.round(t.now())}function qn(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return bn(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=qn(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function jn(e,t,n){var i=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){i.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){i.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})})),n&&(e.clearMeasures(),e.clearMarks())),i}function Wn(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var zn,Gn=function(){function e(t){ne(this,e),oe(this,"hostApis",void 0),oe(this,"hostnameProperties",void 0),oe(this,"usedHostnames",void 0),oe(this,"abortController",void 0),oe(this,"pendingPromises",void 0),this.hostApis=t;var n=t.AbortController;this.hostnameProperties={},this.usedHostnames=new Set,this.abortController=new n,this.pendingPromises=new Set}return re(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return Oe(this.usedHostnames).map((function(t){return e.hostnameProperties[t]||{hostname:t,provider:"",ipVersion:"",httpVersion:""}}))}},{key:"getDataWhenReady",value:function(e){var t=this,n=this.hostApis,i=n.AbortController,r=n.Promise,o=Ae(Oe(this.pendingPromises),r),s=setTimeout((function(){t.abortController.abort(),t.abortController=new i}),e);return o.then((function(){return clearTimeout(s),t.getPresentData()}))}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,i,r=this.hostApis.assign,o=(n=e.name,i=this.hostApis.document,(Nn=Nn||i.createElement("a")).href=n,Nn.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var s=this.fetchCdnFromUrl(e.name).then((function(e){var n=r({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(s),n}));this.pendingPromises.add(s)}}}},{key:"fetchCdnFromUrl",value:function(e){return(0,this.hostApis.fetch)(e,{method:"HEAD",signal:this.abortController.signal}).then((function(e){return{provider:e.headers.get("X-CDN")||"",ipVersion:e.headers.get("X-CDN-CLIENT-IP-VERSION")||"",httpVersion:e.headers.get("X-CDN-Proto")||""}}))}},{key:"isResourcePossiblyFromCache",value:function(e){return void 0!==e.transferSize?0===e.transferSize:e.domainLookupStart===e.domainLookupEnd&&e.connectEnd===e.connectStart&&0===e.secureConnectionStart}}]),e}(),Kn=function(){function e(t,n,i,r){var o=this;ne(this,e),oe(this,"hostApis",void 0),oe(this,"statics",void 0),oe(this,"options",void 0),oe(this,"allowTimingOrigin",void 0),oe(this,"collectResourceTimings",void 0),oe(this,"collectCdnData",void 0),oe(this,"perfObserver",void 0),oe(this,"renderTimings",new Map),oe(this,"urlToTreeId",new Map),oe(this,"cdnDataProvider",void 0),oe(this,"currentCollect",void 0),oe(this,"currentTimer",void 0),oe(this,"collectWhileWaitingForAsync",void 0),oe(this,"onBeforeHideHandler",(function(){o.collectAndClearTimer(!0)})),oe(this,"observables",new gn),oe(this,"isInitial",!0),this.hostApis=t,this.statics=n,this.options=i,this.allowTimingOrigin=r,this.collectResourceTimings=i["enable-rs-timing"],this.collectCdnData=i["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Gn(t))}return re(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(Nn=Nn||t.createElement("a")).href=e,Nn.href}(t,this.hostApis.document),e)}},{key:"recordRenderStart",value:function(e,t){this.renderTimings.has(e)||this.renderTimings.set(e,{renderName:t,viewId:e,renderStart:Un(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||Un(this.hostApis.performance,this.allowTimingOrigin))}},{key:"startObserving",value:function(){var e=this.hostApis,t=e.PerformanceObserver,n=e.performance;this.stopObserving(),t?this.setupPerformanceObserver(t):this.collectResourceTimings&&this.emulateResourceTimingObserver(n),this.collectResourceTimings&&this.processNewResourceTimings()}},{key:"stopObserving",value:function(){var e;this.collectAndClearTimer(!0),null===(e=this.perfObserver)||void 0===e||e.disconnect(),this.reset()}},{key:"collectAndClearTimer",value:function(e){this.currentCollect?(this.currentCollect(e),clearTimeout(this.currentTimer),this.currentCollect=null,this.currentTimer=null):e&&this.collectWhileWaitingForAsync&&this.collectWhileWaitingForAsync()}},{key:"collect",value:function(e){var t=this,n=this.isInitial;this.isInitial=!1;var i=this.hostApis,r=i.assign,o=i.PerformanceObserver,s=i.Promise;this.currentCollect=function(i){Pe.offBefore("internal:hide",t.onBeforeHideHandler);var a=function(){var i=Object.create(null);t.observables.cdnData=t.collectCdnData?t.cdnDataProvider.getPresentData():null,o||(t.observables.userTimingEntries=jn(t.hostApis.performance,t.options,!0),t.collectResourceTimings&&t.processNewResourceTimings()),t.observables.attachTreeIds(t.urlToTreeId),t.urlToTreeId.clear();var s=t.observables.getData(),a=t.extractUsedCDN(s.cdnData||[]);r(t.statics,a),r(i,s,t.snapshot,t.statics),n&&(r(i,function(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var i=e.timing,r=e.navigation;return i&&r?(t.navigationTimingApi=!0,Vn.forEach((function(e){e in i&&(t[e]=i[e])})),t.navigationType=r.type,t.redirectCount=r.redirectCount):t.navigationTimingApi=!1,t}(t.hostApis.performance)),t.statics.pageLoadMode="PARTIAL"),t.reset(),e(i)};if(i)a();else{t.collectWhileWaitingForAsync=a;var c=[];t.collectCdnData&&c.push(t.cdnDataProvider.getDataWhenReady(t.options["async-plugins-timeout"]).then((function(e){t.observables.cdnData=e}))),c.length>0?Ae(c,s).then((function(){t.collectWhileWaitingForAsync=null,a()})):a()}},Pe.before("internal:hide",this.onBeforeHideHandler),this.currentTimer=setTimeout((function(){t.currentCollect(!1),t.currentCollect=null,t.currentTimer=null}),this.options["beacon-timeout"])}},{key:"setupPerformanceObserver",value:function(e){var t=this;this.perfObserver=new e((function(e){e.getEntries().forEach((function(e){var n=e.entryType,i=e.name,r=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e):"mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:i,startTime:r,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:i,startTime:r,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:i,startTime:r})}))})),this.observables.userTimingEntries=jn(this.hostApis.performance,this.options,!1);var n=["longtask"];(this.collectResourceTimings||this.collectCdnData)&&n.push("resource"),this.options["user-timing-mark-enabled"]&&n.push("mark"),this.options["user-timing-measure-enabled"]&&n.push("measure"),this.perfObserver.observe({entryTypes:n})}},{key:"emulateResourceTimingObserver",value:function(e){var t=this;e&&"function"==typeof e.setResourceTimingBufferSize&&"function"==typeof e.onresourcetimingbufferfull&&(e.setResourceTimingBufferSize(100),e.onresourcetimingbufferfull=function(){return t.processNewResourceTimings()})}},{key:"processNewResourceTimings",value:function(){var e=this,t=this.hostApis.performance;"function"==typeof t.getEntriesByType&&"function"==typeof t.clearResourceTimings&&(t.getEntriesByType("resource").forEach((function(t){return e.processSingleResourceTiming(t)})),t.clearResourceTimings())}},{key:"processSingleResourceTiming",value:function(e){this.collectResourceTimings&&this.observables.resourceTimingEntries.push(e),this.collectCdnData&&this.cdnDataProvider.inspectEntryForCdnData(e)}},{key:"extractUsedCDN",value:function(e){var t=e.filter((function(e){return e.hostname.indexOf("static")>=0})),n=t.length>0?t[0]:{hostname:"",provider:"",httpVersion:"",ipVersion:""};return{usedCDN:{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}}},{key:"reset",value:function(){var e;this.observables.reset(),null===(e=this.cdnDataProvider)||void 0===e||e.clearUsedHostnames()}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:Wn(this.renderTimings),networkInformationMetrics:Qn(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),Vn=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function Qn(e){return e?{connectionType:e.type&&e.type.toUpperCase()||"UNKNOWN",effectiveType:function(e){switch(e){case"2g":return"TWO_G";case"3g":return"THREE_G";case"4g":return"FOUR_G";default:return"SLOW_2G"}}(e.effectiveType),roundTripTime:e.rtt||-1,downlinkBandwidth:e.downlink||-1,downlinkMaxBandwidth:void 0===e.downlinkMax?-1:e.downlinkMax===1/0?0:e.downlinkMax}:void 0}!function(e){e.RealUserMonitoringEvent="RealUserMonitoringEvent",e.FeaturePerformanceMeasurementEvent="FeaturePerformanceMeasurementEvent",e.ClientPerfMetricsEvent="ClientPerfMetricsEvent",e.WEB_UI_FRAMEWORK="web-ui-framework",e.APP_ID="app-id",e.APP_VERSION="app-version",e.IS_SINGLE_PAGE_APP="is-single-page-app",e.IS_APP_RENDER_FAILED="is-app-render-failed",e.APP_RENDER_MODE="app-render-mode",e.USER_TIMING_MARK_ENABLED="user-timing-mark-enabled",e.USER_TIMING_MEASURE_ENABLED="user-timing-measure-enabled",e.BEACON_SOURCE="beacon-source",e.BEACON_TIMEOUT="beacon-timeout",e.ENABLE_RS_TIMING="enable-rs-timing",e.ENABLE_CDN_TRACKING="enable-cdn-tracking",e.ASYNC_PLUGINS_TIMEOUT="async-plugins-timeout",e.ENABLE_MEMORY_MEASUREMENT="enable-memory-measurement",e.PAGE_KEY_PREFIX="pageKeyPrefix"}(zn||(zn={}));var Xn=(oe($={},"web-ui-framework","EMBER"),oe($,"app-id","linkedin.rum.tracking"),oe($,"app-version","unknown"),oe($,"is-single-page-app",!0),oe($,"user-timing-mark-enabled",!1),oe($,"user-timing-measure-enabled",!0),oe($,"beacon-source","apps"),oe($,"enable-rs-timing",!0),oe($,"enable-cdn-tracking",!1),oe($,"async-plugins-timeout",5e3),oe($,"beacon-timeout",3e4),oe($,"enable-memory-measurement",!1),oe($,"pageKeyPrefix",""),$),Jn=-1,Yn=-2,Zn=re((function e(t,n,i){ne(this,e),oe(this,"webUIFramework",void 0),oe(this,"timeSource",void 0),oe(this,"isSinglePageApp",void 0),oe(this,"appRenderMode",void 0),oe(this,"isAppRenderFailed",void 0),oe(this,"pageLoadMode","INITIAL"),oe(this,"isSSL",void 0),oe(this,"treeId",void 0),oe(this,"isFromServiceWorker",void 0),oe(this,"usedCDN",void 0),this.webUIFramework=n["web-ui-framework"],this.timeSource=n["beacon-source"],this.isSinglePageApp=n["is-single-page-app"],this.appRenderMode=t["app-render-mode"],this.isAppRenderFailed=t["is-app-render-failed"],this.isSSL="https:"===i.api.location.protocol?1:0,this.treeId=i.treeID,this.isFromServiceWorker=i.isFromServiceWorker}));var $n,ei,ti,ni,ii,ri=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},oi=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},si=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},ai=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},ci=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},li=-1,ui=function(){return"hidden"===document.visibilityState?0:1/0},di=function(){si((function(e){var t=e.timeStamp;li=t}),!0)},hi=function(){return li<0&&(li=ui(),di(),ai((function(){setTimeout((function(){li=ui(),di()}),0)}))),{get firstHiddenTime(){return li}}},pi=!1,fi=-1,mi=function(e,t){pi||(function(e,t){var n,i=hi(),r=ri("FCP"),o=function(e){"first-contentful-paint"===e.name&&(a&&a.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],a=s?null:oi("paint",o);(s||a)&&(n=ci(e,r,t),s&&o(s),ai((function(i){r=ri("FCP"),n=ci(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))}((function(e){fi=e.value})),pi=!0);var n,i=function(t){fi>-1&&e(t)},r=ri("CLS",0),o=0,s=[],a=function(e){if(!e.hadRecentInput){var t=s[0],i=s[s.length-1];o&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>r.value&&(r.value=o,r.entries=s,n())}},c=oi("layout-shift",a);c&&(n=ci(i,r,t),si((function(){c.takeRecords().map(a),n(!0)})),ai((function(){o=0,fi=-1,r=ri("CLS",0),n=ci(i,r,t)})))},gi={passive:!0,capture:!0},vi=new Date,yi=function(e,t){$n||($n=t,ei=e,ti=new Date,wi(removeEventListener),bi())},bi=function(){if(ei>=0&&ei<ti-vi){var e={entryType:"first-input",name:$n.type,target:$n.target,cancelable:$n.cancelable,startTime:$n.timeStamp,processingStart:$n.timeStamp+ei};ni.forEach((function(t){t(e)})),ni=[]}},Ei=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){yi(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,gi),removeEventListener("pointercancel",i,gi)};addEventListener("pointerup",n,gi),addEventListener("pointercancel",i,gi)}(t,e):yi(t,e)}},wi=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Ei,gi)}))},_i=function(e,t){var n,i=hi(),r=ri("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=oi("first-input",o);n=ci(e,r,t),s&&si((function(){s.takeRecords().map(o),s.disconnect()}),!0),s&&ai((function(){var i;r=ri("FID"),n=ci(e,r,t),ni=[],ei=-1,$n=null,wi(addEventListener),i=o,ni.push(i),bi()}))},Ti={},Si=function(e,t){var n,i=hi(),r=ri("LCP"),o=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e)),n()},s=oi("largest-contentful-paint",o);if(s){n=ci(e,r,t);var a=function(){Ti[r.id]||(s.takeRecords().map(o),s.disconnect(),Ti[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,a,{once:!0,capture:!0})})),si(a,!0),ai((function(i){r=ri("LCP"),n=ci(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,Ti[r.id]=!0,n(!0)}))}))}))}},ki=["LCP","FID","CLS"],Ci={LCP:"LargestContentfulPaint",FID:"FirstInputDelay",CLS:"CumulativeLayoutShift"},Ii={},Li=!1,Ri=[],Ai={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function Oi(){var e=!0===window.__test__resetWebVitalsState;if(!Li||e){e&&(Ri=[]),ki.forEach(xi);var t=Symbol();ii=t,[Si,_i,mi].forEach((function(e){return e(Ni.bind(null,t),!0)})),[Si,_i,mi].forEach((function(e){return e(Mi.bind(null,t))})),Li=!0}}function xi(e){Ii[e]={name:e,value:Jn,updateHistory:[]};var t=Ai[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(Ii[e].value=Yn)}function Ni(e,t){if(e===ii){var n=Ii[t.name],i=Hn();n&&(n.updateHistory.push({time:i,data:t}),n.value=t.value),Ri.forEach((function(e){return e(t,i,!1)}))}}function Mi(e,t){e===ii&&Ri.forEach((function(e){return e(t,Hn(),!0)}))}var Di=function(){function e(t,n){ne(this,e),oe(this,"basePageTreeId",void 0),oe(this,"basePageKey",void 0),oe(this,"observing",!1),oe(this,"appContextMap",new Map),oe(this,"rumConfig",void 0),oe(this,"trackingCore",void 0),this.trackingCore=t,this.rumConfig=n}return re(e,[{key:"startObserving",value:function(){var e,t,n=this;Oi(),this.observing||(this.observing=!0,this.basePageTreeId=this.trackingCore.host.treeID||"_unknown",this.basePageKey=(null===(e=this.trackingCore.getCurrentContext())||void 0===e?void 0:e.pageKey)||"_unknown",ki.forEach((function(e){var t;(null===(t=Ii[e])||void 0===t?void 0:t.value)===Yn&&n.reportMetric(e)})),t=this.onMetricUpdate.bind(this),Ri.push(t))}},{key:"stopObserving",value:function(){this.observing=!1}},{key:"onMetricUpdate",value:function(e,t,n){var i;this.observing&&(n?this.reportMetric(e.name):this.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(i=this.trackingCore.getCurrentContext())||void 0===i?void 0:i.pageKey}))}},{key:"reportMetric",value:function(e){var t=Ii[e],n={name:Ci[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var i=Ii[e];if(i){var r=function(e,t,n,i,r){var o={basePageTreeId:e,basePageKey:t},s=null;switch(n.name){case"LCP":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1],s={pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",element:qn(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(s.url=o.url),s}(n,i);break;case"FID":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1];return{pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:qn(o.target)}}(n,i);break;case"CLS":s=function(e,t){if(0===e.updateHistory.length)return null;var n=e.updateHistory.map((function(e){return e.data.entries})).flat();if(0===n.length)return null;var i=n.reduce((function(e,t){return e&&e.value>t.value?e:t})),r=e.updateHistory.find((function(e){return e.data.entries.includes(i)})),o=null;i&&i.sources&&i.sources.length&&(o=i.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t})));var s,a=t.get(r.time);return o&&a?{shiftCount:n.length,"largestShift.value":i.value,"largestShift.hadRecentInput":i.hadRecentInput,"largestShift.largestSource.node":qn(null===(s=o)||void 0===s?void 0:s.node),"largestShift.pageKey":a.pageKey||"_unknown","largestShift.url":a.url,"largestShift.startTime":Math.round(i.startTime)}:null}(n,i)}if(s){var a={};return r(a,o,s),a}return o}(this.basePageTreeId,this.basePageKey,i,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)})),t}(r)}var o={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},o)}}]),e}(),Pi=function(){function e(t,n,i){ne(this,e),oe(this,"featureName",void 0),oe(this,"trackingCore",void 0),oe(this,"rumConfig",void 0),oe(this,"observing",!1),oe(this,"basePageTreeId",void 0),oe(this,"startPageInstance",void 0),oe(this,"startMemory",void 0),oe(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=i}return re(e,[{key:"startObserving",value:function(){var t,n=this,i=this.getMemory();i&&!this.observing&&(this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance)||Ce("unknown"),this.startMemory=i,this.reportTimeouts=e.checkpoints.map((function(e){return setTimeout((function(){return n.reportMemory(e)}),60*e*1e3)})))}},{key:"stopObserving",value:function(){this.reportTimeouts.forEach((function(e){return clearTimeout(e)})),this.observing=!1}},{key:"reportMemory",value:function(e){var t={name:this.featureName,basePageTreeId:this.basePageTreeId,startTime:Hn(this.trackingCore.host.api.performance),duration:0,startPageInstance:this.startPageInstance,marks:this.createMemoryMarks("-".concat(e,"min")),spans:[]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"FeaturePerformanceMeasurementEvent"},t)}},{key:"createMemoryMarks",value:function(e){var t=this.getMemory(),n=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"].map((function(n){return{name:n+e,startTime:t[n]}})),i=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(i<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(i)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();oe(Pi,"checkpoints",[1,3,10,30,90,180,300]),function(){function e(t,n,i){var r,o;ne(this,e),oe(this,"core",void 0),oe(this,"config",void 0),oe(this,"perfTimeWM",new WeakMap),oe(this,"collector",void 0),oe(this,"boomerangStart",-1),oe(this,"webVitalsObserver",void 0),oe(this,"appMemoryObserver",void 0),oe(this,"pageMemoryObserver",void 0),this.core=i,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(i.host.api.assign({},Xn),n);var s="enabled"===(null===(r=(o=this.core.host).__getLixTreatment)||void 0===r?void 0:r.call(o,"pemberly.tracking.time-origin-epoch-time"));this.collector=new Kn(i.host.api,new Zn(t,this.config,i.host),this.config,s),this.collector.startObserving()}re(e,[{key:"pingCDN",value:function(){}},{key:"recordTreeId",value:function(e,t){e&&this.collector.recordTreeId(e,t)}},{key:"recordRenderStart",value:function(e,t){this.collector.recordRenderStart(e,t||e)}},{key:"recordRenderEnd",value:function(e){this.collector.recordRenderEnd(e)}},{key:"start",value:function(){var e,t,n,i;this.collector.collectAndClearTimer(!1);var r,o=Object.create(null),s="enabled"===(null===(e=(t=this.core.host).__getLixTreatment)||void 0===e?void 0:e.call(t,"pemberly.tracking.time-origin-epoch-time"));return this.perfTimeWM.set(o,Un(this.core.host.api.performance,s)),(this.config["enable-memory-measurement"]||"enabled"===(null===(n=(i=this.core.host).__getLixTreatment)||void 0===n?void 0:n.call(i,"pemberly.tracking.rum-memory-measurement")))&&(null===(r=this.pageMemoryObserver)||void 0===r||r.stopObserving(),this.pageMemoryObserver=new Pi("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new Pi("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),o}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new Di(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,i=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0,s=this.core.host.api,a=s.performance,c=s.assign,l=this.perfTimeWM.get(e);if(void 0===l)throw new Error("The rum token passed in is invalid");this.perfTimeWM.delete(e);var u=Un(a,"enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time"))),d=this.config["app-version"];this.collector.collect((function(e){var t=i.boomerangStart=e.navigationStart||i.boomerangStart,n=e.navigationStart||l,s=u-n;i.core.fireEvent({appId:i.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(i){return c({pageKey:o||i.pageKey,isImpactedByHiddenWindow:r,appVersion:d,timeDone:s,navigationStart:n,boomerangStart:t,renderCompleteTime:u},e)}))}))}},{key:"destroy",value:function(){var e,t,n;this.collector.stopObserving(),null===(e=this.webVitalsObserver)||void 0===e||e.stopObserving(),null===(t=this.appMemoryObserver)||void 0===t||t.stopObserving(),null===(n=this.pageMemoryObserver)||void 0===n||n.stopObserving(),this.core.destroy()}}])}();var Bi="undefined"!=typeof window&&"undefined"!=typeof performance,Fi="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function Ui(e,t){t=t||"log";if("undefined"!=typeof window&&window&&window.jet&&"error"===t.toLowerCase())try{throw new Error(e)}catch(e){try{window.jet.error(e)}catch(e){}}"undefined"!=typeof console&&"function"==typeof console[t]&&console[t](e)}!function(){function e(t,n){ne(this,e),oe(this,"featureKey",void 0),oe(this,"productName",void 0),oe(this,"endPageInstance",void 0),oe(this,"startPageInstance",void 0),oe(this,"isCanceled",!1),oe(this,"featureIdentifier",void 0),oe(this,"name",void 0),oe(this,"startTime",void 0),oe(this,"duration",void 0),oe(this,"marks",[]),oe(this,"spanStarts",new Map),oe(this,"spans",[]),oe(this,"isSpanContainer",!1),oe(this,"basePageTreeId",void 0),oe(this,"isClosed",!1),this.featureKey=t,this.productName=n;var i=n?"::".concat(n):"";this.featureIdentifier="".concat(t).concat(i),this.name=t}re(e,[{key:"start",value:function(e){this.startPageInstance=e,Bi&&(this.startTime=Hn(),Fi&&performance.mark("LI:".concat(this.featureIdentifier,"-start")))}},{key:"mark",value:function(e){Bi&&(this.marks.push({name:e,startTime:Hn()}),Fi&&(performance.mark("LI:".concat(this.featureIdentifier,"-mark-").concat(e)),performance.measure("LI:".concat(this.featureIdentifier,"-mark-").concat(e),"LI:".concat(this.featureIdentifier,"-start"),"LI:".concat(this.featureIdentifier,"-mark-").concat(e))))}},{key:"spanStart",value:function(e){Bi&&(this.spanStarts.set(e,Hn()),Fi&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(Bi&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:Hn()-n}),Fi&&(performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end")),performance.measure("LI:".concat(this.featureIdentifier,"-span-").concat(t||e),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start"),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end")))}}},{key:"deleteSpan",value:function(e){if(this.isClosed)throw new Error("[rum measurement] spans can only be deleted before the feature performance measurement ends.");for(var t=this.spans.length-1;t>=0;t--)if(this.spans[t].name===e)return void this.spans.splice(t,1)}},{key:"end",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isClosed){if(this.isSpanContainer=t,this.isClosed=!0,this.isCanceled)throw new Error('[rum measurement] cannot end a canceled measurement "'.concat(this.featureIdentifier,'"'));this.endPageInstance=e,Bi&&(this.duration=Hn()-this.startTime,Fi&&!this.isSpanContainer&&(performance.mark("LI:".concat(this.featureIdentifier,"-end")),performance.measure("LI:".concat(this.featureIdentifier),"LI:".concat(this.featureIdentifier,"-start"),"LI:".concat(this.featureIdentifier,"-end"))),this.cleanUp())}}},{key:"cancel",value:function(){this.isCanceled||(this.isCanceled=!0)}},{key:"setBasePageTreeId",value:function(e){this.basePageTreeId=e}},{key:"toEventBody",value:function(){if(Bi){var e={name:this.featureKey,startTime:this.startTime,duration:this.isSpanContainer?-1:this.duration,basePageTreeId:this.basePageTreeId,startPageInstance:this.startPageInstance||Ce("unknown"),marks:this.marks,spans:this.spans};return this.productName&&(e.productName=this.productName),e}}},{key:"check",value:function(){if(Bi){if(this.isCanceled)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" has been canceled'));if(!this.isClosed)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" is still open'));if(this.isSpanContainer&&0===this.spans.length)throw new Error("The span container should have at least one span");for(var e=0,t=["startTime","duration","basePageTreeId"];e<t.length;e++){var n=t[e];if(void 0===this[n])throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" is missing "').concat(n,'"'))}}}},{key:"cleanUp",value:function(){this.spanStarts.clear()}}])}();const Hi=/ /g,qi=/[\s\u0000<>"]|%00/,ji=/\\/,Wi=/([.]|%2e){2}/i;let zi=new RegExp("^(?:HTTPS?|https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png|webp|bmp|tiff))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])");function Gi(e){let t,n="invalid://";if("string"!=typeof e)return Ui("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(Ui("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(Hi,"+")),!zi.test(t))return Ui("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(qi.test(t))return Ui("jSecure Error: not valid url character found in url: "+e,"error"),n;let i,r=t.split("?")[0],o=!1;try{i=decodeURI(r)}catch(e){o=!0}return o?(Ui("jSecure Error: malformed url path detected: "+r),n):ji.test(r)||Wi.test(r)||Wi.test(i)?(Ui("jSecure Error: malicious data found in url path: "+r,"error"),n):e}const Ki={redirect(e){window&&(window.location.href=e)}};const Vi="hidden",Qi="aria-hidden";function Xi(e,t){const n=_(e);for(let e=0;e<n.length;e++)n[e]&&1===n[e].nodeType&&t(n[e])}function Ji(e){Zi([e])}function Yi(e){$i([e])}function Zi(e){Xi(e,(e=>{e.classList.add(Vi),e.setAttribute(Qi,"true")}))}function $i(e){Xi(e,(e=>{e.classList.remove(Vi),e.setAttribute(Qi,"false")}))}function er(){const e=document.querySelector('meta[name="pillar"]');return e?e.getAttribute("content"):""}class tr{constructor(e){if(!e)throw new Error("An element must be passed in to Disable Background Navigation");this._container=e,this._hiddenElements=[]}disableBackground(){let e=this._container;for(;e&&e!==document.body&&e.parentElement;)this._hiddenElements=this._hiddenElements.concat([...e.parentElement.children].filter((t=>t!==e&&"true"!==t.getAttribute("aria-hidden")&&(t.setAttribute("aria-hidden",!0),!0)))),e=e.parentElement}enableBackground(){this._hiddenElements.forEach((e=>{e.removeAttribute("aria-hidden")})),this._hiddenElements=[]}}const nr=["class","disabled","style","tabindex","type"];class ir{constructor(e){if(!e)throw new Error("FocusTrap: No focus trap container passed in");this._container=e,this._observer=new MutationObserver((()=>this._setFirstAndLastFocusableEls(this._container))),this._handleKeyDown=this._focusTrap.bind(this),this._backgroundNavigationDisabler=new tr(this._container)}init(){this._observer.observe(this._container,{attributeFilter:nr,attributes:!0,childList:!0,subtree:!0}),this._setFirstAndLastFocusableEls(this._container),this._container.addEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.disableBackground()}tearDown(){this._observer.disconnect(),this._container.removeEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.enableBackground()}_focusTrap(e){const{key:t,target:n}=e,i=y(t),r=i===g.TAB&&e.shiftKey;!r&&i===g.TAB&&n===this.lastFocusableEl?(this.firstFocusableEl.focus(),e.preventDefault()):r&&n===this.firstFocusableEl&&(this.lastFocusableEl.focus(),e.preventDefault())}_setFirstAndLastFocusableEls(e){const[t,n]=this._getFirstAndLastFocusableEls(e);this.firstFocusableEl=t,this.lastFocusableEl=n,setTimeout((()=>{this._hasFocusBeenDropped()&&("-1"===e.getAttribute("tabindex")?e.focus():this.firstFocusableEl.focus())}),100)}_hasFocusBeenDropped(){const e=document.activeElement;return!e||e===document.body}_getFirstAndLastFocusableEls(e){const t=[...e.querySelectorAll(M)],n=new Map;let i,r,o=0,s=t.length-1;for(;(!i||!r)&&o<=s;){if(!i){const r=t[o];i=P(r,e,n)&&r,o++}if(!r){const i=t[s];r=P(i,e,n)&&i,s--}}return r=r||i,[i,r]}}const{ENTER:rr,ESCAPE:or}=g;var sr=Object.hasOwnProperty,ar=Object.setPrototypeOf,cr=Object.isFrozen,lr=Object.getPrototypeOf,ur=Object.getOwnPropertyDescriptor,dr=Object.freeze,hr=Object.seal,pr=Object.create,fr="undefined"!=typeof Reflect&&Reflect,mr=fr.apply,gr=fr.construct;mr||(mr=function(e,t,n){return e.apply(t,n)}),dr||(dr=function(e){return e}),hr||(hr=function(e){return e}),gr||(gr=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var vr,yr=Lr(Array.prototype.forEach),br=Lr(Array.prototype.pop),Er=Lr(Array.prototype.push),wr=Lr(String.prototype.toLowerCase),_r=Lr(String.prototype.match),Tr=Lr(String.prototype.replace),Sr=Lr(String.prototype.indexOf),kr=Lr(String.prototype.trim),Cr=Lr(RegExp.prototype.test),Ir=(vr=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return gr(vr,t)});function Lr(e){return function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return mr(e,t,i)}}function Rr(e,t){ar&&ar(e,null);for(var n=t.length;n--;){var i=t[n];if("string"==typeof i){var r=wr(i);r!==i&&(cr(t)||(t[n]=r),i=r)}e[i]=!0}return e}function Ar(e){var t=pr(null),n=void 0;for(n in e)mr(sr,e,[n])&&(t[n]=e[n]);return t}function Or(e,t){for(;null!==e;){var n=ur(e,t);if(n){if(n.get)return Lr(n.get);if("function"==typeof n.value)return Lr(n.value)}e=lr(e)}return function(e){return console.warn("fallback value for",e),null}}var xr=dr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Nr=dr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Mr=dr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Dr=dr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Pr=dr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Br=dr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fr=dr(["#text"]),Ur=dr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Hr=dr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qr=dr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jr=dr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Wr=hr(/\{\{[\s\S]*|[\s\S]*\}\}/gm),zr=hr(/<%[\s\S]*|[\s\S]*%>/gm),Gr=hr(/^data-[\-\w.\u00B7-\uFFFF]/),Kr=hr(/^aria-[\-\w]+$/),Vr=hr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qr=hr(/^(?:\w+script|data):/i),Xr=hr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Yr(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Zr=function(){return"undefined"==typeof window?null:window};var $r=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zr(),n=function(t){return e(t)};if(n.version="2.3.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,r=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,c=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,p=t.DOMParser,f=t.trustedTypes,m=c.prototype,g=Or(m,"cloneNode"),v=Or(m,"nextSibling"),y=Or(m,"childNodes"),b=Or(m,"parentNode");if("function"==typeof s){var E=r.createElement("template");E.content&&E.content.ownerDocument&&(r=E.content.ownerDocument)}var w=function(e,t){if("object"!==(void 0===e?"undefined":Jr(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(f,i),_=w?w.createHTML(""):"",T=r,S=T.implementation,k=T.createNodeIterator,C=T.createDocumentFragment,I=T.getElementsByTagName,L=i.importNode,R={};try{R=Ar(r).documentMode?r.documentMode:{}}catch(e){}var A={};n.isSupported="function"==typeof b&&S&&void 0!==S.createHTMLDocument&&9!==R;var O=Wr,x=zr,N=Gr,M=Kr,D=Qr,P=Xr,B=Vr,F=null,U=Rr({},[].concat(Yr(xr),Yr(Nr),Yr(Mr),Yr(Pr),Yr(Fr))),H=null,q=Rr({},[].concat(Yr(Ur),Yr(Hr),Yr(qr),Yr(jr))),j=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),W=null,z=null,G=!0,K=!0,V=!1,Q=!1,X=!1,J=!1,Y=!1,Z=!1,$=!1,ee=!1,te=!0,ne=!0,ie=!1,re={},oe=null,se=Rr({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ae=null,ce=Rr({},["audio","video","img","source","image","track"]),le=null,ue=Rr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",fe=pe,me=!1,ge=void 0,ve=["application/xhtml+xml","text/html"],ye=void 0,be=null,Ee=r.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},_e=function(e){be&&be===e||(e&&"object"===(void 0===e?"undefined":Jr(e))||(e={}),e=Ar(e),F="ALLOWED_TAGS"in e?Rr({},e.ALLOWED_TAGS):U,H="ALLOWED_ATTR"in e?Rr({},e.ALLOWED_ATTR):q,le="ADD_URI_SAFE_ATTR"in e?Rr(Ar(ue),e.ADD_URI_SAFE_ATTR):ue,ae="ADD_DATA_URI_TAGS"in e?Rr(Ar(ce),e.ADD_DATA_URI_TAGS):ce,oe="FORBID_CONTENTS"in e?Rr({},e.FORBID_CONTENTS):se,W="FORBID_TAGS"in e?Rr({},e.FORBID_TAGS):{},z="FORBID_ATTR"in e?Rr({},e.FORBID_ATTR):{},re="USE_PROFILES"in e&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,$=e.RETURN_DOM_FRAGMENT||!1,ee=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,B=e.ALLOWED_URI_REGEXP||B,fe=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(j.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ge=ge=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ye="application/xhtml+xml"===ge?function(e){return e}:wr,Q&&(K=!1),$&&(Z=!0),re&&(F=Rr({},[].concat(Yr(Fr))),H=[],!0===re.html&&(Rr(F,xr),Rr(H,Ur)),!0===re.svg&&(Rr(F,Nr),Rr(H,Hr),Rr(H,jr)),!0===re.svgFilters&&(Rr(F,Mr),Rr(H,Hr),Rr(H,jr)),!0===re.mathMl&&(Rr(F,Pr),Rr(H,qr),Rr(H,jr))),e.ADD_TAGS&&(F===U&&(F=Ar(F)),Rr(F,e.ADD_TAGS)),e.ADD_ATTR&&(H===q&&(H=Ar(H)),Rr(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Rr(le,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(oe===se&&(oe=Ar(oe)),Rr(oe,e.FORBID_CONTENTS)),ne&&(F["#text"]=!0),X&&Rr(F,["html","head","body"]),F.table&&(Rr(F,["tbody"]),delete W.tbody),dr&&dr(e),be=e)},Te=Rr({},["mi","mo","mn","ms","mtext"]),Se=Rr({},["foreignobject","desc","title","annotation-xml"]),ke=Rr({},Nr);Rr(ke,Mr),Rr(ke,Dr);var Ce=Rr({},Pr);Rr(Ce,Br);var Ie=function(e){Er(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=_}catch(t){e.remove()}}},Le=function(e,t){try{Er(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Er(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(Z||$)try{Ie(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){var t=void 0,n=void 0;if(Y)e="<remove></remove>"+e;else{var i=_r(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=w?w.createHTML(e):e;if(fe===pe)try{t=(new p).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(fe,"template",null);try{t.documentElement.innerHTML=me?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),fe===pe?I.call(t,X?"html":"body")[0]:X?t.documentElement:s},Ae=function(e){return k.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Oe=function(e){return"object"===(void 0===a?"undefined":Jr(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":Jr(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},xe=function(e,t,i){A[e]&&yr(A[e],(function(e){e.call(n,t,i,be)}))},Ne=function(e){var t,i=void 0;if(xe("beforeSanitizeElements",e,null),(t=e)instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore))return Ie(e),!0;if(_r(e.nodeName,/[\u0080-\uFFFF]/))return Ie(e),!0;var r=ye(e.nodeName);if(xe("uponSanitizeElement",e,{tagName:r,allowedTags:F}),!Oe(e.firstElementChild)&&(!Oe(e.content)||!Oe(e.content.firstElementChild))&&Cr(/<[/\w]/g,e.innerHTML)&&Cr(/<[/\w]/g,e.textContent))return Ie(e),!0;if("select"===r&&Cr(/<template/i,e.innerHTML))return Ie(e),!0;if(!F[r]||W[r]){if(ne&&!oe[r]){var o=b(e)||e.parentNode,s=y(e)||e.childNodes;if(s&&o)for(var a=s.length-1;a>=0;--a)o.insertBefore(g(s[a],!0),v(e))}if(!W[r]&&De(r)){if(j.tagNameCheck instanceof RegExp&&Cr(j.tagNameCheck,r))return!1;if(j.tagNameCheck instanceof Function&&j.tagNameCheck(r))return!1}return Ie(e),!0}return e instanceof c&&!function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=wr(e.tagName),i=wr(t.tagName);if(e.namespaceURI===he)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===i||Te[i]):Boolean(ke[n]);if(e.namespaceURI===de)return t.namespaceURI===pe?"math"===n:t.namespaceURI===he?"math"===n&&Se[i]:Boolean(Ce[n]);if(e.namespaceURI===pe){if(t.namespaceURI===he&&!Se[i])return!1;if(t.namespaceURI===de&&!Te[i])return!1;var r=Rr({},["title","style","font","a","script"]);return!Ce[n]&&(r[n]||!ke[n])}return!1}(e)?(Ie(e),!0):"noscript"!==r&&"noembed"!==r||!Cr(/<\/no(script|embed)/i,e.innerHTML)?(Q&&3===e.nodeType&&(i=e.textContent,i=Tr(i,O," "),i=Tr(i,x," "),e.textContent!==i&&(Er(n.removed,{element:e.cloneNode()}),e.textContent=i)),xe("afterSanitizeElements",e,null),!1):(Ie(e),!0)},Me=function(e,t,n){if(te&&("id"===t||"name"===t)&&(n in r||n in Ee))return!1;if(K&&!z[t]&&Cr(N,t));else if(G&&Cr(M,t));else if(!H[t]||z[t]){if(!(De(e)&&(j.tagNameCheck instanceof RegExp&&Cr(j.tagNameCheck,e)||j.tagNameCheck instanceof Function&&j.tagNameCheck(e))&&(j.attributeNameCheck instanceof RegExp&&Cr(j.attributeNameCheck,t)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(t))||"is"===t&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Cr(j.tagNameCheck,n)||j.tagNameCheck instanceof Function&&j.tagNameCheck(n))))return!1}else if(le[t]);else if(Cr(B,Tr(n,P,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Sr(n,"data:")||!ae[e]){if(V&&!Cr(D,Tr(n,P,"")));else if(n)return!1}else;return!0},De=function(e){return e.indexOf("-")>0},Pe=function(e){var t=void 0,i=void 0,r=void 0,o=void 0;xe("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(o=s.length;o--;){var c=t=s[o],l=c.name,u=c.namespaceURI;if(i=kr(t.value),r=ye(l),a.attrName=r,a.attrValue=i,a.keepAttr=!0,a.forceKeepAttr=void 0,xe("uponSanitizeAttribute",e,a),i=a.attrValue,!a.forceKeepAttr&&(Le(l,e),a.keepAttr))if(Cr(/\/>/i,i))Le(l,e);else{Q&&(i=Tr(i,O," "),i=Tr(i,x," "));var d=ye(e.nodeName);if(Me(d,r,i))try{u?e.setAttributeNS(u,l,i):e.setAttribute(l,i),br(n.removed)}catch(e){}}}xe("afterSanitizeAttributes",e,null)}},Be=function e(t){var n=void 0,i=Ae(t);for(xe("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)xe("uponSanitizeShadowNode",n,null),Ne(n)||(n.content instanceof o&&e(n.content),Pe(n));xe("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var s=void 0,c=void 0,l=void 0,u=void 0,d=void 0;if((me=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Oe(e)){if("function"!=typeof e.toString)throw Ir("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ir("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Jr(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Oe(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||_e(r),n.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){var h=ye(e.nodeName);if(!F[h]||W[h])throw Ir("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(c=(s=Re("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?s=c:s.appendChild(c);else{if(!Z&&!Q&&!X&&-1===e.indexOf("<"))return w&&ee?w.createHTML(e):e;if(!(s=Re(e)))return Z?null:ee?_:""}s&&Y&&Ie(s.firstChild);for(var p=Ae(ie?e:s);l=p.nextNode();)3===l.nodeType&&l===u||Ne(l)||(l.content instanceof o&&Be(l.content),Pe(l),u=l);if(u=null,ie)return e;if(Z){if($)for(d=C.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return H.shadowroot&&(d=L.call(i,d,!0)),d}var f=X?s.outerHTML:s.innerHTML;return Q&&(f=Tr(f,O," "),f=Tr(f,x," ")),w&&ee?w.createHTML(f):f},n.setConfig=function(e){_e(e),J=!0},n.clearConfig=function(){be=null,J=!1},n.isValidAttribute=function(e,t,n){be||_e({});var i=ye(e),r=ye(t);return Me(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&(A[e]=A[e]||[],Er(A[e],t))},n.removeHook=function(e){A[e]&&br(A[e])},n.removeHooks=function(e){A[e]&&(A[e]=[])},n.removeAllHooks=function(){A={}},n}(),eo=$r;const to={ADD_TAGS:["#comment","li-icon","icon","iframe"],ADD_ATTR:["target"],FORCE_BODY:!0,RETURN_DOM:!0};function no(e){return io(null,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).innerHTML}function io(e,t){let{ADD_TAGS:n=[],ADD_ATTR:i=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Y({},to);r.ADD_TAGS=[...r.ADD_TAGS,...n],r.ADD_ATTR=[...r.ADD_ATTR,...i];const o=eo.sanitize(t,r);return e&&e.nodeType===Node.ELEMENT_NODE&&(e.innerHTML="",e.append(...o.childNodes)),o}var ro="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",oo=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",so=["b","del","em","i","s","strong","sub","sup"],ao=so.concat(["a","abbr","address","area","article","aside","audio","bdi","bdo","big","blockquote","br","button","center","cite","code","datalist","dd","details","dfn","div","dl","dt","fieldset","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","img","ins","kbd","label","legend","li","map","mark","marquee","nav","nobr","ol","p","pre","q","rp","rt","ruby","samp","section","small","source","span","strike","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","video","wbr"]),co=[ro,"alt|checked|selected|colgroup|cols|colspan|disabled|height|hidden|maxlength|method|multiple|name|placeholder|readonly|rel|required|rows|rowspan|spellcheck|target|title|width","border|caption|color|controls|coords|hreflang|label|lang|loop|marginheight|marginwidth|preload|reversed|type|usemap|clear|headers|ismap|start|datetime|accept|max|min|size|step|style|cellspacing|cellpadding"].join("|"),lo="href|src",uo="data:image/(?:gif|jpg|jpeg|png);base64,",ho="https?|ftp|mailto|invalid";function po(){}var fo,mo,go=(mo=/[&<>"'\u0000\\=]/g,fo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"},function(e){return null==e?null:e.toString().replace(mo,(function(e){return fo[e]}))}),vo=function(){var e,t,n=/&(?:([a-z0-9]+)|#x([\da-f]{1,6})|#(\d{1,8}));/gi;if("undefined"==typeof document)return function(){throw new Error("document is undefined (i.e. you are probably in Node.js)")};e=document.createElement("div");var i={nbsp:" ",lt:"<",gt:">",amp:"&",quot:'"'};return t="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"�"},function(r){return null==r?null:(r+"").replace(n,(function(n,r,o,s){return r?(a=r,i.hasOwnProperty(a)?i[a]:(e.innerHTML="&"+a+";",c=e[oo],i[a]=c,c)):o||s?t(parseInt(o||s,o?16:10)||65533):"�";var a,c}))}}();var yo=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function bo(e){return/[<&]/.test(e)}var Eo,wo=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},_o="[ \t\r\n]*",To="[ \t\r\n]+";function So(e){e=yo(e)?e:[e];var t,n,i,r=0,o="<(?!/?";return o+="(?:",wo(e,(function(e,s){t=e.tags||ao,n=e.attrs||co,i=e.checkUrlAttrs||!1,0!==s&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=_o,o+="|"+To,o+="(?:(?:",o+="(?:"+n+")(?:=([\"'])[^'\"<>]*\\"+ ++r+")?",i&&(o+="|(?:"+lo+")=([\"'])(?:(?:"+ho+")(?::|&#(?:58|x3a);)|(?:"+uo+")|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\"+ ++r),o+=")"+_o+")+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function ko(e){return So({tags:e=e||ao,checkUrlAttrs:!0})}function Co(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n?!ko(n).test(e):i?!Co.R_UNSAFE_CUSTOM_ELEMENT.test(e):!Co.R_UNSAFE_HTML.test(e)}function Io(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}function Lo(e,t,n){if(null==e)return null;e=e.toString();var i=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){var r,o=e;if(n.hasOwnProperty(i))return n[i];if(t.hasOwnProperty(i)){if(!((r="string"==typeof(o=t[i]))||o instanceof po||"number"==typeof o))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");o=r?go(o):o.toString()}return n[i]=o,o}))}(e,t):e,r=e;return bo(i)&&!Co(i,n)&&(i=Io(i),Ui("Content contains non-whitelisted tags or attributes:\nContent: "+r,"error")),i}function Ro(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e}Co.R_UNSAFE_HTML=ko(),Co.R_UNSAFE_CUSTOM_ELEMENT=So([{tags:ao,checkUrlAttrs:!0},{tags:[(Eo={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"}).tag],attrs:[ro,Eo.attrs].join("|"),checkUrlAttrs:!1}]);var Ao={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ao.optgroup=Ao.option,Ao.tbody=Ao.tfoot=Ao.colgroup=Ao.caption=Ao.thead,Ao.th=Ao.td;var Oo=/<([\w:]+)/;function xo(e,t){var n,i,r,o,s,a,c,l=t.createDocumentFragment(),u=[];for(s=0,c=e.length;s<c;s++)if((o=e[s])||0===o)if("string"==typeof o){for(r=r||l.appendChild(t.createElement("div")),n=(Oo.exec(o)||["",""])[1].toLowerCase(),Do(r,(i=Ao[n]||Ao._default)[1]+o+i[2]),a=i[0];a--;)r.lastChild&&r.lastChild.nodeType===Node.ELEMENT_NODE&&(r=r.lastChild);Ro(u,r.childNodes),(r=l.firstChild).textContent=""}else Ro(u,o.nodeType?[o]:o);for(l.textContent="",o=u[s=0];o;)l.appendChild(o),o=u[++s];return l}var No=Lo,Mo=Lo;function Do(e,t,n){var i=Lo(t,n);return bo(i)?e.innerHTML=i:e[oo]=i,i}function Po(e,t){if(!(this instanceof Po))return new Po(e,t);(t=t||{}).allowTags=t.allowTags?t.allowTags.reduce((function(e,t){return e.concat(t)}),[]):null,this._string=e,this._options=t}Po.prototype=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(new po,{toString:function(){var e=this._string,t=this._stringVal,n=e;return void 0!==t?t:(Co(e,this._options)||(n=e,e=Io(e),Ui("UnsafeString contains non-whitelisted tags or attributes.\nString: "+n,"error")),this._stringVal=e,e)}});var Bo={ALLOWED_TAGS:ao,FORMATTING_TAGS:so,htmlEncode:go,htmlUnencode:vo,log:Ui,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r,o="",s=n.length;return e&&e.forEach((function(e,t){o+=e,t<s&&(r=n[t],o+=r instanceof Po?r:go(r))})),Mo(o)},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=xo([e],t);else{if(!yo(e))return e;n=xo(e,t)}return Ro([],n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:No,reEncode:function(e){return go(vo(e))},_redirector:Ki,redirect:function(e){const t=Gi(e);t===e&&Ki.redirect(t)},sanitizeHTML:Mo,sanitizeUrl:Gi,setElementContent:Do,text:function(e){return Ui("jSecure.text() is deprecated. Please use jSecure.htmlEncode().","warn"),go(e)},unsafe:function(e){return e},UnsafeString:Po};const Fo="toast--hidden",Uo=".toast",Ho=Object.freeze({SUCCESS:"success",ERROR:"error",NOTIFY:"notify"});class qo{constructor(){let e=document.getElementById("toasts");if(!e)throw new Error("No toasts element");this._el=e,this._position=e.getAttribute("type"),this.bindEvents()}trigger(e,t,n,i){if(!e||!Object.values(Ho).includes(e))throw new Error("Valid type not specified: type must be success, error, or notify");if(!t)throw new Error("No message specified");const r=n?"".concat(n,"_toast-").concat(e):"toast-".concat(e),o=this._createToastEl(e,t,r,i);return this._addToast(o)}clearAllToasts(){let e=this._el.querySelectorAll(Uo);Array.from(e).forEach((e=>{this._removeToast(e)}))}bindEvents(){this._el.addEventListener("click",(e=>{const t=b(e.target,".toast__dismiss-btn");if(t){const e=b(t,Uo);e&&this._removeToast(e)}}))}_isValidCtaMetadata(e){return["url","trk","text"].every((t=>e.hasOwnProperty(t)))}_createToastEl(e,t,n,i){const r=document.querySelector("#toast-template").content.firstElementChild.cloneNode(!0),o=document.querySelector("#toast-icon-".concat(e)).content.firstElementChild.cloneNode(!0);if(!r||!o)throw new Error("Toast templates are missing");r.classList.add("toast--".concat(e)),r.setAttribute("type",e);const s=r.querySelector(".toast__message");s.insertBefore(o,s.firstElementChild);r.querySelector(".toast__dismiss-btn").setAttribute("data-tracking-control-name","".concat(n,"_dismiss"));const a=r.querySelector(".toast__message-content");let c="text-color-text-neutral";if(e===Ho.ERROR?c="text-color-text-negative":e===Ho.SUCCESS&&(c="text-color-text-positive"),a.classList.add(c),io(a,t),i&&this._isValidCtaMetadata(i)){const e=r.querySelector(".toast__message-content-container"),t=document.querySelector("#toast-cta").content.firstElementChild.cloneNode(!0);t.setAttribute("href",Bo.sanitizeUrl(S(i.url,i.trk))),t.textContent=i.text,e.classList.add(c),e.append(t)}return r}_addToast(e){return this._el.appendChild(e),this._refreshLazyLoader(),setTimeout((function(){e.classList.remove(Fo)}),500),e}_removeToast(e){let t=this._el;e.classList.add(Fo),setTimeout((function(){t.removeChild(e)}),500)}_refreshLazyLoader(){var e,t;null===(e=window.lazyloader)||void 0===e||null===(t=e.then)||void 0===t||t.call(e,(e=>{e.refreshLoader()}))}}const jo={};function Wo(e){const t=document.getElementById(e);if(!t&&void 0!==jo[e])return jo[e];if(!t)return console.warn("Element with id: ".concat(e," not found")),jo[e]=null,jo[e];let n;for(const e of t.childNodes)try{if(e.nodeType===Node.COMMENT_NODE){n=JSON.parse(e.nodeValue);break}}catch(e){}return void 0===n?(console.warn("Error retrieving content with id: ".concat(e,". Use embedJson helper to embed this content")),null):(jo[e]=n,t.parentNode.removeChild(t),jo[e])}const zo={COPY:"copy",LINKEDIN:"linkedin",TWITTER:"twitter",FACEBOOK:"facebook"};Object.keys(zo).map((e=>zo[e]));const Go=["binlar","ask\\ jeeves","mozilla\\/4\\.0\\ \\(compatible\\;\\ msie\\ 6\\.0\\;\\ windows\\ nt\\ 5\\.1\\;1813\\)","companydatatree","genieo","microsoft\\+scheduled\\+cache\\+content\\+download\\+service","liferea","superfeedr","ez\\ publish\\ link\\ validator","htmlparser","argclrint","linkwalker","webtool","ask\\+jeeves","stackrambler","paros","^fdm\\+3\\.x","ms\\ search","indy\\+library","seznam","sitevigil","intergator","freedom(?!from)","google\\+page\\+speed\\+insights","znajdzfoto\\/image","riddler\\.io","^java\\/","twiceler","httpunit","ktxn","webcopier","mna\\+digital\\+circonus\\+check","stuff(?!nz)","updatepatrol","feedburner","hp\\+sitescope","crawler","gigablastopensource\\/","rpt\\-http","^fdm\\ 3\\.x","libwww\\-perl","((?=pital)|ca(?=pital))pita","bingpreview","oia\\.owa","^ahc\\/","thunderstone","microsoft\\ bits","alertsite","^python\\-requests\\/","dts\\ agent","tangjiutao","^inmon","linkscan","alexa\\ site\\ audit","webtrends(?!clientlibrary)","chkd","joedog","daumoa","typhoeus","loadimpactpageanalyzer","google\\ news","coldfusion","mna\\ digital\\ circonus\\ check","alexa\\+site\\+audit","getright","appengine","(?=crawler)crawl","ibot(?!ta)","jobo","python\\-httplib","powermarks","site24x7","proximic","yahoo\\+pipes","((?=aporter)|oper(?=aportable))aport","web\\+downloader","check\\_http","grabber","topsy\\.com\\/butterfly\\/","harvest","^inagist\\+url\\+resolver","fast","crescent(?!\\ build|\\+build)","sohu(?!ennews|video|news)","favorg","bloglines","fetch(?!tv)","wapt","microsoft\\+url\\+control","urchin","ning\\/1\\.0","pluck","google\\+news","spider","\\(compatible\\;\\+optimizer\\)","moreover\\/5\\.1","js\\-kit","server\\ density\\ external\\ llama","facebookexternalhit","ultraseek","catchpoint","yandex(?!\\ browser|\\+browser|mail)","echo(?!arena|fon|star)","^worldwatch\\/","combine(?!d)","winhttprequest","ez\\+publish\\+link\\+validator","jakarta","^webnotifier\\/","webmetrics","teoma","nerdbynature","ms\\+frontpage","nielsen","sucker","engagebdr","yahoofeedseeker","dts\\+agent","googleapps","holmes","plumtree","www\\-mechanize","google\\-hoteladsverifier","pingdom","drupal","sina\\_weibo","google\\ page\\ speed\\ insights","lisa","w3c\\_validator","^scan","yeti","snoopy","khte","trovit","atomz","httpcomponents","ms\\+search","google\\-http\\-java\\-client","spi\\_der","bubing","websitepulse","microsoft\\+bits","http\\_request2","ieautodiscovery","siteimprove","curl(?!ings)","go\\+1\\.1\\+package\\+http","^crowsnest\\/","email\\ exractor","utorrent","yahoocachesystem","shopwiki","justview","googlesecurityscanner","msnptc","rkg\\+url\\+verifier","monitor","bitvouseragent","((?=wormgame))worm","talktalk","help\\.coccoc\\.com","yahoo\\ pipes","heritrix","nutch","argus","kulturarw3","checkurl","universalsearch","amazon\\ route\\ 53\\ health\\ check\\ service","slurp","mozilla\\/5\\.0\\ \\(compatible\\;\\ msie\\ 5\\.0\\)","ezooms","kimengi\\/nineconnections\\.com","applesyndication","python\\-urllib","internal\\+zero\\-knowledge\\+agent","system\\+center\\+operations\\+manager","riverglassscanner","imgsizer","changedetection","nutscrape","feedzilla","contype","^lwp","\\(compatible\\;\\ optimizer\\)","infolink","outbrain","^prerender","admantx","^inagist\\ url\\ resolver","amazon\\+route\\+53\\+health\\+check\\+service","neustar","a6\\-indexer","comodo\\+ssl\\+checker","linkchecker","viglink","patric","newsnow","wasalive","scrapy","(?=gruber)grub","ruxitsynthetic","rkg\\ url\\ verifier","ocelli","webcapture","^kraken\\/","t\\-h\\-u\\-n\\-d\\-e\\-r\\-s\\-t\\-o\\-n\\-e","spider(?!solitaire)","isearch","hp\\ sitescope","maxamine","\\(simulated\\_by\\_webserver\\_stress\\_tool\\)","((?=obotics)|ther(?=obotfree))obot","yacy","twibble\\.io","google\\+wireless\\+transcoder","wget","internal\\ zero\\-knowledge\\ agent","google\\ wireless\\ transcoder","xenu","yahooseeker","advanced\\ email\\ extractor","feed43","ptst","reconnoiter","go\\ 1\\.1\\ package\\ http","advanced\\+email\\+extractor","linkdex","panscient\\.com","webcheck","linktiger","scooter","flipboard\\.com\\/browserproxy","evidon","twisted\\ pagegetter","cosmos","adbeat","sherlock","web\\ downloader","cookiereports","siteexplorer","miva","twisted\\+pagegetter","mfc\\_tear\\_sample","indy\\ library","b2w(?!tenisnew)","orangebot(?!swana)","lockss\\+cache","mozilla\\/4\\.0\\+\\(compatible\\;\\+msie\\+6\\.0\\;\\+windows\\+nt\\+5\\.1\\;1813\\)","yahooexternalcache","apache\\-httpclient\\/4\\.","archive\\.org","wesee\\:search","hiscan","ms\\ frontpage","tagscanner","google\\ web\\ preview","special\\_archiver","d24y\\-aegis","scoutjet","larbin","adsense\\-snapshot\\-google","keynote","skypeuripreview","clickajob","download\\+ninja","internet\\ ninja","^ltx71","ukonline","eventmachine\\ httpclient","nomad","mediapartners","twikle","microsoft\\ scheduled\\ cache\\ content\\ download\\ service","internet\\+ninja","scanalert","metauri","agentname","adr\\)","squider","isilo","teleport","automationtest","bordermanager","linklint","bot","templeton","rssreader","ichiro","(?=dialer\\-mobileapp)dialer","atomic\\_email\\_hunter","google\\+web\\+preview","longurl\\+api","longurl\\ api","internetseer","server\\+density\\+external\\+llama","topix","iopus","download\\ ninja","mozilla\\/5\\.0\\+\\(compatible\\;\\+msie\\+5\\.0\\)","europarchive","avantgo","flamingo\\_searchengine","lockss\\ cache","jobrapido","wesee\\:ads\\/","frontier","newspaper\\/0\\.0\\.","apachebench","flamingosearch","lydia","microsoft\\ url\\ control","phantomjs","system\\ center\\ operations\\ manager","^econtext\\/","akamai","cfschedule","searchme\\.com\\/support\\/","fortimail","comodo\\ ssl\\ checker","gomezagent","sitecon","webauto","golem","swcd","spundge\\/0\\.1","findlinks","^sjn","yandex","ia\\_archive","vagabondo","watchmouse","simplepie","1job","goldfire"].join("|");new RegExp(Go,"i");const Ko=/.*(iPad|iPod|iPhone|Android|BB10|BlackBerry|IEMobile).*/;function Vo(e){return!!e&&Ko.test(e)}class Qo{constructor(e){let{scrollThreshold:t=50,hideOnScrollBack:n=!1,hideOnScrollDown:i=!1,isBottom:r=!0,exposeStickyState:o=!1,marginApplied:s=!1,debounceDelay:a=100}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&i)throw new Error("hideOnScrollBack & hideOnScrollDown cannot both be true at the same time");this.el=e,this.scrollThreshold=t,this.hideOnScrollBack=n,this.hideOnScrollDown=i,this.isBottom=r,this.exposeStickyState=o,this._scrollListener=C(this._onScroll.bind(this),a),this.marginApplied=s,this.previousScrollPosition=window.pageYOffset,this._setSpacingBound=this._setSpacing.bind(this),this._setupResizeListener(),E((()=>{this.originalMarginTop=parseInt(window.getComputedStyle(document.body).marginTop)||0,this.originalMarginBottom=parseInt(window.getComputedStyle(document.body).marginBottom)||0,this._setSpacing(!0),this._doesPageHaveEnoughScroll()?window.addEventListener("scroll",this._scrollListener):this.hideOnScrollBack||this.show()}))}reactivate(){this._setupResizeListener(),this._setSpacing()}deactivate(){this._removeResizeListener(),this._resetSpacing()}_setupResizeListener(){Vo(navigator.userAgent)||window.addEventListener("resize",this._setSpacingBound)}_removeResizeListener(){window.removeEventListener("resize",this._setSpacingBound)}_doesPageHaveEnoughScroll(){return document.body.scrollHeight>window.innerHeight+this.scrollThreshold}_setSpacing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isBottom?this._setBottomSpacing():this.hideOnScrollBack||this.hideOnScrollDown||(this._setTopSpacing(),e&&this.show())}_resetSpacing(){this.marginApplied?(document.body.style.marginTop="0px",document.body.style.marginBottom="0px"):(document.body.style.marginTop="".concat(this.originalMarginTop,"px"),document.body.style.marginBottom="".concat(this.originalMarginBottom,"px"))}_setBottomSpacing(){let e=this.el.clientHeight;document.body.style.marginBottom&&!this.marginApplied&&(e+=this.originalMarginBottom),document.body.style.marginBottom="".concat(e,"px")}_setTopSpacing(){let e=this.el.clientHeight;document.body.style.marginTop&&!this.marginApplied&&(e+=this.originalMarginTop),document.body.style.marginTop="".concat(e,"px")}show(){this.el.classList.add("show"),L(this.el,"show")}hide(){this.el.classList.remove("show"),L(this.el,"hide")}_onScroll(){const e=window.pageYOffset;e>this.scrollThreshold?(this.hideOnScrollBack||this.hideOnScrollDown||this.exposeStickyState||window.removeEventListener("scroll",this._scrollListener),this.hideOnScrollDown?this.hide():this.show(),this.exposeStickyState&&this.el.classList.add("stuck")):(this.hideOnScrollBack&&this.hide(),this.exposeStickyState&&this.el.classList.remove("stuck")),this.previousScrollPosition>e&&this.hideOnScrollDown&&this.show(),this.previousScrollPosition=e}}const Xo="tooltip__popup";"".concat(Xo,"--show");const Jo="dismissable-input",Yo="dismissable-input--focus",Zo="dismissable-input__button",$o="dismissable-input__button--show",es="dismissable-input__input";class ts{constructor(e){this.el=e,this._input=this.el.querySelector(".".concat(es)),this._dismissButtonEl=this.el.querySelector(".".concat(Zo)),this._isDismissable=!!this._dismissButtonEl,this._attachEventListeners()}_attachEventListeners(){this._input.addEventListener("focus",this._onInputFocus.bind(this)),this._input.addEventListener("input",this._updateDismissButton.bind(this)),this._input.addEventListener("blur",this._onInputBlur.bind(this)),this._isDismissable&&(this._dismissButtonEl.addEventListener("click",this.clear.bind(this)),this._updateDismissButton())}_onInputFocus(){this.el.classList.add(Yo),this._updateDismissButton(),L(this._input,"dismissableInputFocused")}_updateDismissButton(){this._isDismissable&&(this._input.value.length?(this._showDismissButton(),this._dismissButtonEl.disabled=!1):(this._hideDismissButton(),this._dismissButtonEl.disabled=!0))}_hideDismissButton(){this._dismissButtonEl.classList.remove($o)}_showDismissButton(){this._dismissButtonEl.classList.add($o)}_onInputBlur(){this.el.classList.remove(Yo)}clear(){this._input.value="",this._updateDismissButton(""),this._input.focus(),L(this.el,"clear")}}const ns={block:"typeahead-input",showList:"typeahead-input__dropdown--show",dropdown:"typeahead-input__dropdown",dropdownList:"typeahead-input__dropdown-list",dropdownText:"typeahead-input__dropdown-text",listItemFocus:"typeahead-input__dropdown-item--highlighted",listItem:"typeahead-input__dropdown-item",liveText:"typeahead-live-text",template:"typeahead-item-template"},is="i18n_aria_live_text_no-suggestions",rs="i18n_aria_live_text_one-suggestion",os="i18n_aria_live_text_multiple-suggestions",ss=500;class as{constructor(e,t){let{createDismissableInput:n,elementClasses:i=ns,generateApiUrl:r,liveTextEl:o,liveTextClearTime:s=ss,onSelect:a,onInput:c=(()=>{}),inputEl:l,dropdownContainerEl:u,dropdownListEl:d}=t;this.el=e,this._liveTextClearTime=s,this._elementClasses=i,this._input=l||this.el.querySelector(".".concat(es)),this._dropdownContainerEl=u||this.el.querySelector(".".concat(this._elementClasses.dropdown)),this._dropdownListEl=d||this.el.querySelector(".".concat(this._elementClasses.dropdownList)),this._listId=this._dropdownListEl.id,this._generateApiUrl=r,this._onSelect=a,this._onInput=c,this._typeaheadItemTemplate=this.el.querySelector(".".concat(this._elementClasses.template)),this._boundClickOutsideToCloseHandler=this._clickOutsideToCloseHandler.bind(this),this._liveTextEl=o||this.el.querySelector(".".concat(this._elementClasses.liveText)),n&&(this.dismissableInput=new ts(this.el)),this._getLiveTextOptions(),this._resetState(),this._attachEventListeners(),this._requestHandler=C(this._getAndApplyResults.bind(this),500)}_resetState(){this._dropdownListItemEls=[],this._setHighlightedEl(null),this._setExpandedState(!1)}_attachEventListeners(){this.checkForListItemSelectHandler=this._checkForListItemSelect.bind(this),this.hideListHandler=this._hideList.bind(this),this.onKeyDownHandler=this._onKeyDown.bind(this),this.onUserInputHandler=this._onUserInput.bind(this),this.onClearHandler=this._onClear.bind(this),this._input.addEventListener("keydown",this.onKeyDownHandler),this._input.addEventListener("input",this.onUserInputHandler),this._input.addEventListener("focus",this.onUserInputHandler),this._input.addEventListener("blur",this.hideListHandler),this._dropdownListEl.addEventListener("mousedown",this.checkForListItemSelectHandler),this._isDismissable&&this.el.addEventListener("clear",this.onClearHandler)}_removeEventListeners(){this._input.removeEventListener("keydown",this.onKeyDownHandler),this._input.removeEventListener("input",this.onUserInputHandler),this._input.removeEventListener("focus",this.onUserInputHandler),this._input.removeEventListener("blur",this.hideListHandler),this._dropdownListEl.addEventListener("mousedown",this.checkForListItemSelectHandler)}_isListActive(){return this._input.getAttribute("aria-owns")===this._listId&&Boolean(this._input.getAttribute("aria-expanded"))}_clickOutsideToCloseHandler(e){e.target!==this._input&&this._hideList()}_onKeyDown(e){if(!this._isListActive())return;switch(y(e.key)){case g.ARROW_DOWN:e.preventDefault(),this._moveToResult(1);break;case g.ARROW_UP:e.preventDefault(),this._moveToResult(-1);break;case g.ENTER:this._checkForListItemSelect(e)}}_moveToResult(e){if(0===this._dropdownListItemEls.length)return;const t=-1===e?-1:0;let n=null===this._highlighted.index?t:this._highlighted.index+e;n<0&&(n=this._dropdownListItemEls.length-1),n>=this._dropdownListItemEls.length&&(n=0),this._setHighlightedEl(n)}_setHighlightedEl(e){this._highlighted&&this._highlighted.el&&(this._highlighted.el.classList.remove(this._elementClasses.listItemFocus),this._highlighted.el.setAttribute("aria-selected",!1)),null===e?(this._highlighted={el:null,index:null},this._input.removeAttribute("aria-activedescendant")):(this._highlighted.el=this._dropdownListItemEls[e],this._highlighted.index=e,this._highlighted.el.setAttribute("aria-selected",!0),this._highlighted.el.classList.add(this._elementClasses.listItemFocus),this._input.setAttribute("aria-activedescendant",this._highlighted.el.id))}_isInputValid(){return this._input.value.length>0}_onUserInput(e){this._onInput(e),this._isInputValid()?this._requestHandler():this._hideList()}_getAndApplyResults(){if(this._isInputValid()){const e=this._input.value;this._makeTypeaheadRequest(e).then((e=>this._appendResults(e))).then((()=>this._showList()))}}_makeTypeaheadRequest(e){return j(this._generateApiUrl(e),{sendCookies:!1}).then((e=>e&&JSON.parse(e.responseText)||[]))}_getItemEl(){return document.importNode(this._typeaheadItemTemplate.content,!0)}_appendResults(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._hideList(),e.forEach(((e,t)=>{const n=this._getItemEl(),i=n.querySelector(".".concat(this._elementClasses.listItem)),r=i.querySelector(".".concat(this._elementClasses.dropdownText));i.id="".concat(this._input.name,"-").concat(t+1),r.textContent=e.displayName,r.dataset.id=e.id,this._dropdownListEl.appendChild(n)})),this._dropdownListItemEls=_(this._dropdownListEl.children)}_shouldShowList(){return this._dropdownListItemEls.length>0&&this._isInputValid()}_showList(){this._shouldShowList()?(this._dropdownContainerEl.classList.add(this._elementClasses.showList),document.body.addEventListener("click",this._boundClickOutsideToCloseHandler),this._setExpandedState(!0)):(this._hideList(),this._setExpandedState(!1)),this._setLiveText()}_hideList(){if(this._isListActive()){for(;this._dropdownListEl.firstChild;)this._dropdownListEl.removeChild(this._dropdownListEl.firstChild);this._resetState(),this._dropdownContainerEl.classList.remove(this._elementClasses.showList),document.body.removeEventListener("click",this._boundClickOutsideToCloseHandler)}}_onClear(){this.hideListHandler()}_checkForListItemSelect(e){if(!this._isListActive())return;const t="mousedown"===e.type?e.target:this._highlighted.el;if(!t)return;e.preventDefault();const n=t.classList.contains(this._elementClasses.dropdownText)?t:t.querySelector(".".concat(this._elementClasses.dropdownText))||t.closest(".".concat(this._elementClasses.dropdownText));n&&this.el.contains(n)&&this._updateInputTo(n,e)}_updateInputTo(e,t){this._input.value=e.textContent.trim(),this._input.focus(),"function"==typeof this._onSelect&&this._onSelect(e,t),this._hideList()}_getLiveTextOptions(){this._liveTextNoSuggestions=Wo(is),this._liveTextOneSuggestion=Wo(rs),this._liveTextMultipleSuggestions=Wo(os)}_getLiveText(){let e;switch((this._dropdownListItemEls||[]).length){case 0:e=this._liveTextNoSuggestions;break;case 1:e=this._liveTextOneSuggestion;break;default:e=this._liveTextMultipleSuggestions}return e}_setLiveText(){const e=this._getLiveText(),t=document.createElement("p");t.textContent=e,this._liveTextEl.children.length&&(this._liveTextEl.removeChild(this._liveTextEl.firstChild),clearTimeout(this._liveTextTimeout)),this._liveTextEl.appendChild(t),this._liveTextTimeout=setTimeout((()=>{this._liveTextEl.firstChild&&this._liveTextEl.removeChild(this._liveTextEl.firstChild)}),this._liveTextClearTime)}_setExpandedState(e){this._input.setAttribute("aria-expanded",e),e&&(this._input.setAttribute("aria-owns",this._listId),this._input.setAttribute("aria-controls",this._listId))}}function cs(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).innerWidth<=769}const ls="no-scroll",us="fixed",ds="show-on-mobile",hs="hide-on-mobile",ps="isExpanded";class fs{constructor(e,t,n){let{onCloseExpandedSearch:i=(e=>e),isMobileDevice:r=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.el=e,this.expandedEl=t,this.placeholderEl=n,this.isMobileDevice=r,!this.el)throw new Error("No element passed in to BaseSearchBar");this.isExpanded=!1,this.type=this.el.getAttribute("data-searchbar-type"),this.firstInput=this.el.querySelector("input:first-of-type"),this.isIOSDevice="iPhone"===navigator.platform||"iPad"===navigator.platform||"iPod"===navigator.platform,this.onCloseExpandedSearch=i,r&&(this.focusTrap=new ir(this.expandedEl))}showExpandedSearch(){this.isExpanded=!0,this.isMobileDevice&&(this.focusTrap.init(),this.placeholderEl.classList.add("hidden")),this.placeholderEl.classList.remove(ds),this.placeholderEl.classList.add(hs),this.expandedEl.classList.add(ps),document.body.classList.add(ls),this.isIOSDevice&&(document.body.classList.add(us),this.expandedEl.addEventListener("touchstart",this._onIOSTouchStartEvent)),document.addEventListener("keyup",this._onKeyUpEvent.bind(this)),this.firstInput.focus()}hideExpandedSearch(){this.firstInput.blur(),this.isExpanded=!1,this.isMobileDevice&&(this.focusTrap.tearDown(),this.placeholderEl.classList.remove("hidden")),this.expandedEl.classList.remove(ps),this.placeholderEl.classList.remove(hs),this.placeholderEl.classList.add(ds),document.body.classList.remove(ls),this.isIOSDevice&&(document.body.classList.remove(us),this.expandedEl.removeEventListener("touchstart",this._onIOSTouchStartEvent)),document.removeEventListener("keyup",this._onKeyUpEvent),this.placeholderEl.focus(),this.onCloseExpandedSearch()}_onKeyUpEvent(e){const{key:t,target:n}=e,i="Escape"===t,r="INPUT"===n.tagName;i&&!r?(e.preventDefault(),this.hideExpandedSearch()):"Tab"===t&&this._userIsTabbedOut()&&this.hideExpandedSearch()}_onIOSTouchStartEvent(e){const{target:t}=e;b(t,".".concat(ns.block))||document.activeElement.blur()}_userIsTabbedOut(){if(this.expandedEl.classList.contains(ps)&&cs()){return!this.expandedEl.contains(document.activeElement)}return!1}}class ms extends as{constructor(e,t){let{generateApiUrl:n,liveTextEl:i,onSelect:r,onInput:o}=t;super(e,{createDismissableInput:!0,generateApiUrl:n,liveTextEl:i,onSelect:r,onInput:o})}}const gs={clearButton:"recent-searches__clear-btn",dropdown:"recent-searches",dropdownList:"recent-searches__list",listItem:"recent-searches__item",listItemClearButton:"recent-searches__item--clear",listItemLink:"recent-searches__item-link",listItemFocus:"recent-searches__item--highlighted",showList:"recent-searches--show"},vs="i18n_aria_live_text_recent-searches-one-suggestion",ys="i18n_aria_live_text_recent-searches-multiple-suggestions",bs="i18n_aria_live_text_recent-searches-cleared";class Es extends as{constructor(e,t){let{liveTextEl:n,clearRecentSearchApiBaseUrl:i}=t;if(super(e,{liveTextEl:n,elementClasses:gs,liveTextClearTime:1e3}),!e)throw Error("An element must be provided to RecentSearches");if(this.dropdownContainerEl=e.querySelector(".".concat(gs.dropdown)),!this.dropdownContainerEl)throw Error("A RecentSearches container element must be in the RecentSearches parent element");this._clearRecentSearchApiBaseUrl=i,this._dropdownListItemEls=_(this.dropdownContainerEl.querySelectorAll(".".concat(gs.listItem))),this._clearBtnItem=e.querySelector(".".concat(gs.listItemClearButton)),this._dropdownListItemEls.push(this._clearBtnItem),this._dismissButtonEl=e.querySelector(".".concat(Zo))}_attachEventListeners(){this._clearBtn=this.el.querySelector(".".concat(gs.clearButton)),this._clearRecentSearchesHandler=this._clearRecentSearches.bind(this),this._clearBtn.addEventListener("mousedown",this._clearRecentSearchesHandler),super._attachEventListeners()}_removeEventListeners(){this._clearBtn.removeEventListener("mousedown",this._clearRecentSearchesHandler),super._removeEventListeners()}_onUserInput(){this._shouldShowList()?this._showList():this._hideList()}_redirect(e){e.click()}_clickOutsideToCloseHandler(e){e.target===this._input||this._dismissButtonEl.contains(e.target)||this._hideList()}_checkForListItemSelect(e){if(!this._isListActive())return;const t="mousedown"===e.type?e.target:this._highlighted.el;if(!t)return;e.preventDefault();const n=t.querySelector(".".concat(gs.listItemLink));n?this._redirect(n):t.classList.contains(gs.listItemLink)?this._redirect(t):t===this._clearBtnItem&&this._clearRecentSearches()}_shouldShowList(){return this._dropdownListItemEls.length>1&&0===this._input.value.length}_onClear(){this.onUserInputHandler()}_hideList(){this._isListActive()&&(this.dropdownContainerEl.classList.remove(gs.showList),document.body.removeEventListener("click",this._boundClickOutsideToCloseHandler),this._setExpandedState(!1),this._setHighlightedEl(null))}_getLiveTextOptions(){this._liveTextOneSuggestion=Wo(vs),this._liveTextMultipleSuggestions=Wo(ys),this._liveTextClearedSuggestions=Wo(bs)}_getLiveText(){let e;switch(this._informUserThatSearchesAreCleared?0:this._dropdownListItemEls.length){case 0:e=this._liveTextClearedSuggestions,this._informUserThatSearchesAreCleared=!1;break;case 2:e=this._liveTextOneSuggestion;break;default:e=this._liveTextMultipleSuggestions}return e}_clearRecentSearches(){j(this._clearRecentSearchApiBaseUrl,{method:"DELETE"}).then((()=>{this._removeEventListeners(),this._informUserThatSearchesAreCleared=!0,super._hideList(),super._setLiveText()})).catch((e=>{throw e}))}}const ws="tab-selected",_s="hidden",Ts="switcher-tabs__button",Ss="switcher-tabs__tab";class ks{constructor(e,t,n){this.el=e,this.mobileTriggerEl=n,this.baseSearchBarsMap=t,this.currentType=this.el.getAttribute("data-current-search-type"),this.switcherTriggerAndTabs=this.el.querySelector(".".concat("switcher-tabs__trigger-and-tabs")),this.switcherTabs=this.el.querySelector(".".concat("switcher-tabs")),this.dropdownList=this.el.querySelector(".".concat("switcher-tabs__list")),this.dropdownTrigger=this.el.querySelector(".".concat("switcher-tabs__placeholder")),this.dropdownPlaceholderText=this.el.querySelector(".".concat("switcher-tabs__placeholder-text")),this._handleSwitcherClick=this._handleSwitcherClick.bind(this),this._initMobileExpandedSwitcher(),this._initCollapsibleSwitcher()}_initMobileExpandedSwitcher(){this.el.addEventListener("click",this._handleSwitcherClick),this.mobileTriggerEl.addEventListener("click",(e=>{e.preventDefault(),this.baseSearchBarsMap[this.currentType].showExpandedSearch()})),this.cancelBtn=this.el.querySelector(".".concat("switcher-tabs__cancel-btn")),this.cancelBtn.addEventListener("click",(e=>{e.preventDefault(),this.baseSearchBarsMap[this.currentType].hideExpandedSearch()}))}_initCollapsibleSwitcher(){this.collapsibleSwitcher=new q(this.switcherTriggerAndTabs,{dropdownContentEl:this.dropdownList,dropdownTriggerEl:this.dropdownTrigger}),this.switcherTriggerAndTabs.addEventListener("open",(()=>this._openSwitcher())),this.switcherTriggerAndTabs.addEventListener("close",(()=>this._closeSwitcher())),this._updatePlaceholderText()}_openSwitcher(){this.dropdownList.addEventListener("click",this._handleSwitcherClick),this.switcherTabs.classList.remove(_s),this.dropdownList.querySelector("button").focus()}_closeSwitcher(){this.dropdownList.removeEventListener("click",this._handleSwitcherClick),this.switcherTabs.classList.add(_s)}_handleSwitcherClick(e){if(!e.target.classList.contains(Ts)&&!e.target.classList.contains(Ss))return;const t=b(e.target,".".concat(Ss)),n=t.querySelector(".".concat(Ts)).getAttribute("data-switcher-type");n&&t&&this.currentType!==n?(this.collapsibleSwitcher.collapsible.currentListItem=t,this._switchTo(n,t)):this.collapsibleSwitcher.collapsible.close()}_switchTo(e,t){this._updateActiveTab(t),this._updatePlaceholderText(),this.el.setAttribute("data-current-search-type",e),this.collapsibleSwitcher.collapsible.close(),this.baseSearchBarsMap[this.currentType].isExpanded?this.baseSearchBarsMap[e].showExpandedSearch():this.baseSearchBarsMap[e].hideExpandedSearch(),this.currentType=e}_updateActiveTab(e){const t=this.el.querySelector(".".concat(ws)),n=b(t,".".concat(Ss));n&&(n.setAttribute("aria-selected","false"),t.classList.remove(ws)),e.classList.contains(Ss)&&(e.querySelector(".".concat(Ts)).classList.add(ws),e.setAttribute("aria-selected","true"))}_updatePlaceholderText(){let e=this.el.querySelector(".".concat(ws));e&&(this.dropdownPlaceholderText.textContent=e.textContent)}}class Cs{constructor(e){let{typeaheadApiBaseUrl:t,clearRecentSearchApiBaseUrl:n,shouldSearchOnSelect:i=!0,onCloseExpandedSearch:r,includeSwitcher:o=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.el=e,!this.el)throw new Error("No element passed into SearchBar");this.typeaheadApiBaseUrl=t;const s=this.el.querySelector(".".concat("search-bar__live-text"));this.shouldSearchOnSelect=i,this.placeholderEl=this.el.querySelector(".".concat("search-bar__placeholder"));const a=!!this.el.querySelector(".".concat("search-bar__mobile-wrapper"));if(this.baseSearchBarsMap=_(this.el.querySelectorAll(".".concat("base-search-bar"))).reduce(((e,t)=>{const n=new fs(t,this.el,this.placeholderEl,{onCloseExpandedSearch:r,isMobileDevice:a});return e[n.type]=n,e}),{}),t){this.baseSearchBarFormEl=this.baseSearchBarsMap.JOBS.el.querySelector(".base-search-bar__form"),this.geoIdInputEl=this.el.querySelector('input[name="geoId"]');const e=this.el.querySelector(".keywords-typeahead-input");new ms(e,{generateApiUrl:this._generateKeywordsTypeaheadApiUrl.bind(this),liveTextEl:s,onSelect:this._onKeywordsTypeaheadSelect.bind(this)});e.querySelector(".".concat(gs.dropdown))&&new Es(e,{clearRecentSearchApiBaseUrl:n,liveTextEl:s}),new ms(this.el.querySelector(".location-typeahead-input"),{generateApiUrl:this._generateLocationTypeaheadApiUrl.bind(this),liveTextEl:s,onSelect:this._onLocationTypeaheadSelect.bind(this),onInput:this._onLocationTypeaheadInput.bind(this)}),Array.from(this.el.querySelectorAll(".".concat(Jo,".search-input"))).forEach((e=>{new ts(e);e.querySelector(".".concat(gs.dropdown))&&new Es(e,{clearRecentSearchApiBaseUrl:n,liveTextEl:s})})),this._addCustomErrorStateHandler()}else Array.from(this.el.querySelectorAll(".".concat(Jo))).forEach((e=>new ts(e)));o&&(this.switcher=new ks(e,this.baseSearchBarsMap,this.placeholderEl)),this.setupSearchInputFocusTracking()}_generateKeywordsTypeaheadApiUrl(e){return"".concat(this.typeaheadApiBaseUrl,"?query=").concat(window.encodeURIComponent(e))}_generateLocationTypeaheadApiUrl(e){return"".concat(this.typeaheadApiBaseUrl,"?query=").concat(window.encodeURIComponent(e),"&typeaheadType=GEO&geoTypes=POPULATED_PLACE,ADMIN_DIVISION_2,MARKET_AREA,COUNTRY_REGION")}_onKeywordsTypeaheadSelect(){this.shouldSearchOnSelect&&this._submitForm()}_onLocationTypeaheadSelect(e){this.geoIdInputEl&&(this.geoIdInputEl.value=e.dataset.id),this.shouldSearchOnSelect&&this._submitForm()}_onLocationTypeaheadInput(){this.geoIdInputEl&&(this.geoIdInputEl.value="")}_submitForm(){const e=this.el.querySelector(".keywords-typeahead-input input");null!=e&&e.validity.valueMissing?e.reportValidity():this.baseSearchBarFormEl&&this.baseSearchBarFormEl.submit()}_addCustomErrorStateHandler(){const e=this.el.querySelector(".keywords-typeahead-input input"),t=this.el.querySelector(".keywords-typeahead-input-helper");null==e||e.addEventListener("invalid",(n=>{n.preventDefault(),this.baseSearchBarFormEl.classList.add("input-error"),null==t||t.classList.remove("hidden"),e.focus()}))}setupSearchInputFocusTracking(){this.el.addEventListener("dismissableInputFocused",(e=>{const t=e.target.getAttribute("data-tracking-control-name");t&&window.tracking&&window.tracking.then((e=>{e.fireTrackingEvent("SearchInputFocusEvent",{header:{},controlUrn:"urn:li:control:".concat(p(document),"-").concat(t)})}))}))}}const Is="/mwlite/badge-counts";document.querySelector.bind(document);String.fromCharCode(32);p(document);String.fromCharCode(32);function Ls(){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!e||0===e.trim().length};return e.errorMessageSuffix="error_empty",e}function Rs(e){const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").length<e};return t.errorMessageSuffix="error_too_short",t}function As(e){const t=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").length>e};return t.errorMessageSuffix="error_too_long",t}Ls(),Rs(3),As(128),Ls(),Rs(6),As(400);var Os=window||t.g;const xs="utag_data",Ns="utag_cfg_ovrd",Ms="trackingEventDebugData";Os[xs]||(Os[xs]={});const Ds="undefined"!=typeof window&&window&&"node"!==window.appEnvironment;Os[Ns]=Os[Ns]||{},Os[Ms]=Os[Ms]||[],Os[Ns].noview=!0,Os[Ns].nocookie=!0;Ds&&new RegExp("bot|google|aolbuild|baidu|bing|msn|duckduckgo|teoma|slurp|yandex|sogou|facebook|alexa","i").test(Os.navigator.userAgent);!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}(),function(){if("function"==typeof window.EventTarget)try{return!new e}catch(e){}const e=function(){this.listeners={}};e.prototype.listeners=null,e.prototype.addEventListener=function(e,t){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.removeEventListener=function(e,t){if(e in this.listeners)for(var n=this.listeners[e],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;n++)t[n].call(this,e);return!e.defaultPrevented},window.EventTarget=e}();const Ps={GOOGLE_ERROR:"googleError",GOOGLE_USER_FETCHED:"googleUserFetched",INITIALIZED:"initialized",PROMPT_MOMENT:"promptMomentNotification",TOKEN_FETCHED:"tokenFetched"},Bs={INITIALIZATION:"initialization",AUTHENTICATION:"authentication"},{GOOGLE_ERROR:Fs,GOOGLE_USER_FETCHED:Us,INITIALIZED:Hs}=Ps,{INITIALIZATION:qs,AUTHENTICATION:js}=Bs;const Ws=Ps,zs=Bs,{GOOGLE_USER_FETCHED:Gs,GOOGLE_ERROR:Ks,INITIALIZED:Vs}=Ws,{INITIALIZATION:Qs}=zs;function Xs(e){var t=e.intersectionRect;return t.width>=0&&t.height>=0}function Js(e){try{return e.getBoundingClientRect()}catch(e){if("object"==typeof e&&null!==e&&16389==(65535&e.number))return{top:0,bottom:0,left:0,width:0,height:0,right:0,x:0,y:0};throw e}}function Ys(e,t){return Math.round(e-t)}var Zs,$s=(Zs=function(e,t){return Zs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zs(e,t)},function(e,t){function n(){this.constructor=e}Zs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ea=function(){function e(){this.items=[]}return e.prototype.remove=function(e){for(var t=this.items.length,n=0;n<t;n++)this.removePredicate(e,this.items[n])&&(this.items.splice(n,1),n--,t--)},e.prototype.clear=function(){this.items=[]},e.prototype.push=function(e){this.items.push(e)},e.prototype.isEmpty=function(){return 0===this.items.length},e}(),ta=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $s(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:t.callback===e},t}(ea),na=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $s(t,e),t.prototype.removePredicate=function(e,t){return t===e},t}(ea),ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $s(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:"function"==typeof e?t.callback===e:t.el===e},t}(ea),ra=function(){return 0},oa=!("undefined"==typeof window||!window||"undefined"==typeof document||!document),sa=oa&&!!window.requestAnimationFrame,aa={hasDOM:oa,hasRAF:sa,getScrollTop:ra,getScrollLeft:ra,getHeight:ra,getWidth:ra,rAF:sa?window.requestAnimationFrame.bind(window):function(e){e()},meta:{width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0},version:0,lastVersion:0,updateMeta:ra,get isDirty(){return aa.version!==aa.lastVersion},document:window.document,IntersectionObserver:oa&&window.IntersectionObserver,performance:oa&&window.performance};function ca(){++aa.version}function la(){var e=null!=document.scrollingElement;aa.getScrollTop=e?function(){return document.scrollingElement.scrollTop}:function(){return window.scrollY},aa.getScrollLeft=e?function(){return document.scrollingElement.scrollLeft}:function(){return window.scrollX}}oa&&(aa.getHeight=function(){return window.innerHeight},aa.getWidth=function(){return window.innerWidth},aa.updateMeta=function(){aa.meta.height=aa.getHeight(),aa.meta.width=aa.getWidth(),aa.meta.scrollLeft=aa.getScrollLeft(),aa.meta.scrollTop=aa.getScrollTop(),aa.lastVersion=aa.version},aa.updateMeta(),"loading"!==document.readyState?la():document.addEventListener("DOMContentLoaded",la),window.addEventListener("resize",ca,!1),window.addEventListener("scroll",ca,!1));var ua=function(){function e(){this.reads=[],this.work=[],this.running=!1}return e.prototype.scheduleRead=function(e){this.reads.unshift(e),this.run()},e.prototype.scheduleWork=function(e){this.work.unshift(e),this.run()},e.prototype.run=function(){var e=this;this.running||(this.running=!0,aa.rAF((function(){e.running=!1;for(var t=0,n=e.reads.length;t<n;t++)e.reads.pop()();t=0;for(var i=e.work.length;t<i;t++)e.work.pop()();(e.work.length>0||e.reads.length>0)&&e.run()})))},e}(),da=null;var ha=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pa="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),fa=0,ma=function(){function e(e,t,n,i,r,o,s,a,c,l){this.dateNow=e,this.highResTime=t,this.scrollTop=n,this.scrollLeft=i,this.width=r,this.height=o,this.x=s,this.y=a,this.top=c,this.left=l}return e.generate=function(t){void 0===t&&(t=window);var n=this.revalidateRootMeta(t);return new e(Date.now(),performance.now(),n.scrollTop,n.scrollLeft,n.width,n.height,n.x,n.y,n.top,n.left)},e.revalidateRootMeta=function(e){void 0===e&&(e=document);var t,n={width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0};return aa.isDirty&&aa.updateMeta(),e===window||e===document?(n.height=aa.meta.height,n.width=aa.meta.width,n.scrollLeft=aa.meta.scrollLeft,n.scrollTop=aa.meta.scrollTop,n):(t=Js(e),n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,n.width=t.width,n.height=t.height,n.x=t.x,n.y=t.y,n.top=t.top,n.left=t.left,n)},e}();function ga(){return fa+++pa}var va=function(){function e(e,t){this.isTicking=!1,this.toRemove=[],this.engine=e||(da||(da=new ua)),this.root=t||window}return e.prototype.tick=function(){if(this.queue.isEmpty())this.isTicking=!1;else{if(this.toRemove.length>0){for(var e=0;e<this.toRemove.length;e++)this.queue.remove(this.toRemove[e]);this.toRemove=[]}this.applyQueue(ma.generate(this.root)),this.engine.scheduleRead(this.tick.bind(this))}},e.prototype.scheduleWork=function(e){this.engine.scheduleWork(e)},e.prototype.scheduleRead=function(e){this.engine.scheduleRead(e)},e.prototype.queryElement=function(e,t){var n,i,r=this;this.engine.scheduleRead((function(){n=Js(e),i=ma.generate(r.root)})),this.engine.scheduleWork((function(){t(n,i)}))},e.prototype.unwatch=function(e){this.toRemove.push(e)},e.prototype.unwatchAll=function(){this.queue.clear()},e.prototype.startTicking=function(){this.isTicking||(this.isTicking=!0,this.engine.scheduleRead(this.tick.bind(this)))},e}(),ya=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.queue=new ta,t}return ha(t,e),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.id;(0,n.callback)(e,i)}},t.prototype.watch=function(e){this.startTicking();var t=ga();return this.queue.push({callback:e,id:t}),t},t}(va),ba=function(e){function t(t){var n=e.call(this,void 0,window)||this;return n.predicate=t,n}return ha(t,e),t.prototype.applyQueue=function(t){this.predicate(t)&&e.prototype.applyQueue.call(this,t)},t}(ya),Ea=function(e){function t(t,n,i){void 0===i&&(i=!1);var r=e.call(this,t,n)||this;return r.lastVersion=aa.version,r.queue=new ia,r.ALLOW_CACHED_SCHEDULER=i,r}return ha(t,e),Object.defineProperty(t.prototype,"isDirty",{get:function(){return aa.version!==this.lastVersion},enumerable:!1,configurable:!0}),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.callback,r=n.el,o=n.id,s=n.clientRect;!this.isDirty&&s&&this.ALLOW_CACHED_SCHEDULER||(s=this.queue.items[t].clientRect=Js(r)),i(e,o,s)}this.lastVersion=aa.version},t.prototype.watch=function(e,t,n){this.startTicking(),n=n||ga();return this.queue.push({el:e,callback:t,id:n,clientRect:null}),n},t}(va),wa=null;var _a=function(){function e(){this.queue=new na}return e.prototype.listen=function(e){this.queue.push(e)},e.prototype.unlisten=function(e){this.queue.remove(e)},e.prototype.trigger=function(e){for(var t=0;t<this.queue.items.length;t++)this.queue.items[t](e)},e}(),Ta=function(){function e(e){this.scheduler=new ba(e.bind(this))}return e.prototype.trigger=function(){},e.prototype.listen=function(e){this.state=ma.generate(),this.scheduler.watch(e)},e.prototype.unlisten=function(e){this.scheduler.unwatch(e)},e}(),Sa=null;function ka(e,t){var n=(Sa||(Sa={scroll:new Ta((function(e){var t=this.state,n=t.scrollTop,i=t.scrollLeft;return this.state=e,n!==e.scrollTop||i!==e.scrollLeft})),resize:new Ta((function(e){var t=this.state,n=t.width,i=t.height;return this.state=e,i!==e.height||n!==e.width})),destroy:new _a,beforeunload:new _a,hide:new _a,show:new _a}))[e];n&&n.listen(t)}function Ca(e,t){if(Sa){var n=Sa[e];n&&n.unlisten(t)}}function Ia(e,t){if(Sa){var n=Sa[e];n&&n.trigger(t)}}function La(e){(wa||(wa=new ya)).scheduleWork(e)}function Ra(e){var t=e.left,n=e.right,i=e.top,r=e.bottom;return{left:t,x:t,top:i,y:i,bottom:r,right:n,width:n-t,height:r-i}}aa.hasDOM&&(window.addEventListener("beforeunload",(function(){Ia("beforeunload"),Ia("destroy")})),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?Ia("show"):Ia("hide")})));var Aa=function(){function e(e,t){void 0===t&&(t={}),this.records={},this.callback=e,t.threshold=t.threshold||0,this.rootMarginObj=function(e){var t=e.split(" ").map((function(e){return parseInt(e,10)}));switch(t.length){case 2:return{top:t[0],left:t[1],bottom:t[0],right:t[1]};case 3:return{top:t[0],left:t[1],bottom:t[2],right:t[1]};case 4:return{top:t[0],left:t[1],bottom:t[2],right:t[3]};default:return{top:0,left:0,bottom:0,right:0}}}(t.rootMargin||"0px"),this.root=t.root||null,Array.isArray(t.threshold)?this.thresholds=t.threshold:this.thresholds=[t.threshold],this.scheduler=new Ea(void 0,this.root,t.ALLOW_CACHED_SCHEDULER)}return e.prototype.observe=function(e){var t=this,n=e,i=n.__spanielId=n.__spanielId||ga();return this.scheduler.watch(e,(function(e,i,r){t.onTick(e,i,r,n)}),n.__spanielId),i},e.prototype.onTick=function(e,t,n,i){var r=this,o=this.generateEntryEvent(e,n,i),s=o.numSatisfiedThresholds,a=o.entry,c=this.records[t]||(this.records[t]={entry:a,numSatisfiedThresholds:0});s===c.numSatisfiedThresholds&&a.isIntersecting===c.entry.isIntersecting||(c.numSatisfiedThresholds=s,c.entry=a,this.scheduler.scheduleWork((function(){r.callback([a])})))},e.prototype.unobserve=function(e){this.scheduler.unwatch(e.__spanielId),delete this.records[e.__spanielId]},e.prototype.disconnect=function(){this.scheduler.unwatchAll(),this.records={}},e.prototype.takeRecords=function(){return[]},e.prototype.generateEntryEvent=function(e,t,n){for(var i=0,r=function(e,t,n,i){if("none"===n.style.display)return{time:e.dateNow,highResTime:e.highResTime,boundingClientRect:Oa(),intersectionRatio:0,intersectionRect:Oa(),isIntersecting:!1,rootBounds:Oa(),target:n};var r=t.bottom,o=t.right,s=e.left+i.left,a=e.top+i.top,c={left:s,top:a,bottom:i.bottom,right:i.right,width:e.width-(i.right+i.left),height:e.height-(i.bottom+i.top),y:a,x:s},l=Math.max(c.left,t.left),u=Math.max(c.top,t.top),d=Math.min(c.left+c.width,t.right)-l,h=Math.min(c.top+c.height,t.bottom)-u,p=d>=0?l:0,f=u>=0?u:0,m={left:p,top:f,x:p,y:f,width:d,height:h,right:o,bottom:r};return function(e){var t=e.unixTime,n=e.highResTime,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.target,a=r.height*r.width,c=a>0?o.width*o.height/a:0;return{time:t,highResTime:n,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:s,intersectionRatio:c,isIntersecting:Xs({intersectionRect:o})}}({unixTime:e.dateNow,highResTime:e.highResTime,rootBounds:c,target:n,boundingClientRect:Ra(t),intersectionRect:m})}(e,t,n,this.rootMarginObj),o=0;o<this.thresholds.length;o++){var s=this.thresholds[o];r.intersectionRatio>=s&&i++}return{numSatisfiedThresholds:i,entry:r}},e}();function Oa(){return{bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0}}var xa={x:0,y:0,width:0,height:0,bottom:0,left:0,top:0,right:0};!function(){function e(e,t){var n=this;this.paused=!1,this.queuedEntries=[],this.recordStore={},this.callback=e;var i=t||{threshold:[]},r=i.root,o=i.rootMargin,s=i.threshold,a=i.ALLOW_CACHED_SCHEDULER,c=i.BACKGROUND_TAB_FIX,l=i.USE_NATIVE_IO,u="string"!=typeof(o=o||"0px")?function(e){return e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px"}(o):o;this.thresholds=s.sort((function(e){return e.ratio}));var d={root:r,rootMargin:u,threshold:this.thresholds.map((function(e){return e.ratio})),ALLOW_CACHED_SCHEDULER:a};this.usingNativeIo=!!l&&!!aa.IntersectionObserver;var h=this.usingNativeIo?aa.IntersectionObserver:Aa;this.observer=new h((function(e){return n.internalCallback(e)}),d),this.onTabHidden=this._onTabHidden.bind(this),this.onWindowClosed=this._onWindowClosed.bind(this),this.onTabShown=this._onTabShown.bind(this),aa.hasDOM&&(ka("beforeunload",this.onWindowClosed),ka("hide",this.onTabHidden),ka("show",this.onTabShown),c&&(this.paused="visible"!==aa.document.visibilityState))}e.prototype._onWindowClosed=function(){this.onTabHidden()},e.prototype.setAllHidden=function(){for(var e=Object.keys(this.recordStore),t=0;t<e.length;t++)this.handleRecordExiting(this.recordStore[e[t]]);this.flushQueuedEntries()},e.prototype._onTabHidden=function(){this.paused=!0,this.setAllHidden()},e.prototype.generateObserverTimestamp=function(){return this.usingNativeIo?Math.floor(performance.now()):Date.now()},e.prototype._onTabShown=function(){this.paused=!1;for(var e=Object.keys(this.recordStore),t=performance.now(),n=this.generateObserverTimestamp(),i=0;i<e.length;i++){var r=this.recordStore[e[i]].lastSeenEntry;if(r){var o=r.intersectionRatio,s=r.boundingClientRect,a=r.rootBounds,c=r.intersectionRect,l=r.isIntersecting,u=r.target;this.handleObserverEntry({intersectionRatio:o,boundingClientRect:s,time:n,highResTime:t,isIntersecting:l,rootBounds:a,intersectionRect:c,target:u})}}},e.prototype.internalCallback=function(e){e.forEach(this.handleObserverEntry.bind(this))},e.prototype.flushQueuedEntries=function(){this.queuedEntries.length>0&&(this.callback(this.queuedEntries),this.queuedEntries=[])},e.prototype.generateSpanielEntry=function(e,t){var n=e.intersectionRatio,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.isIntersecting,a=e.time,c=e.target,l=this.recordStore[c.__spanielId],u=this.usingNativeIo?Math.floor((aa.performance.timeOrigin||aa.performance.timing.navigationStart)+a):a,d=this.usingNativeIo?a:e.highResTime;if(!d)throw new Error("Missing intersection entry timestamp");return{intersectionRatio:n,isIntersecting:s,unixTime:u,time:u,highResTime:d,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:c,duration:0,visibleTime:s?u:-1,entering:!1,payload:l.payload,label:t.threshold.label,threshold:t.threshold}},e.prototype.handleRecordExiting=function(e){var t=this,n=Date.now(),i=performance.now();e.thresholdStates.forEach((function(r){var o=e.lastSeenEntry&&e.lastSeenEntry.boundingClientRect;t.handleThresholdExiting({intersectionRatio:-1,isIntersecting:!1,unixTime:n,time:n,highResTime:i,payload:e.payload,label:r.threshold.label,threshold:r.threshold,entering:!1,rootBounds:xa,boundingClientRect:o||xa,intersectionRect:xa,visibleTime:r.lastVisible.unixTime,duration:Ys(i,r.lastVisible.highResTime),target:e.target},r),r.lastSatisfied=!1,r.visible=!1,r.lastEntry=null}))},e.prototype.handleThresholdExiting=function(e,t){var n=e.highResTime,i=!!t.threshold.time;t.lastSatisfied&&(!i||i&&t.visible)&&(e.duration=Ys(n,t.lastVisible.highResTime),e.visibleTime=t.lastVisible.unixTime,e.entering=!1,t.visible=!1,this.queuedEntries.push(e)),clearTimeout(t.timeoutId)},e.prototype.handleObserverEntry=function(e){var t=this,n=e.target,i=this.recordStore[n.__spanielId];i&&(i.lastSeenEntry=e,this.paused||(i.thresholdStates.forEach((function(n){var i=!!n.threshold.time,r=t.generateSpanielEntry(e,n),o=e.intersectionRatio>=n.threshold.ratio,s="boolean"==typeof r.isIntersecting?r.isIntersecting:Xs(e),a=o&&s;if(a!=n.lastSatisfied){if(a)if(r.entering=!0,n.lastVisible={highResTime:r.highResTime,unixTime:r.unixTime},i){var c=Number(setTimeout((function(){n.visible=!0,r.duration=Ys(performance.now(),n.lastVisible.highResTime),r.visibleTime=n.lastVisible.unixTime,t.callback([r])}),n.threshold.time));n.timeoutId=c}else n.visible=!0,r.duration=Date.now()-n.lastVisible.unixTime,t.queuedEntries.push(r);else t.handleThresholdExiting(r,n);n.lastEntry=e,n.lastSatisfied=a}})),this.flushQueuedEntries()))},e.prototype.disconnect=function(){this.setAllHidden(),this.observer.disconnect(),this.recordStore={}},e.prototype.destroy=function(){this.disconnect(),aa.hasDOM&&(Ca("beforeunload",this.onWindowClosed),Ca("hide",this.onTabHidden),Ca("show",this.onTabShown))},e.prototype.unobserve=function(e){var t=this,n=this.recordStore[e.__spanielId];n&&(delete this.recordStore[e.__spanielId],this.observer.unobserve(e),La((function(){t.handleRecordExiting(n),t.flushQueuedEntries()})))},e.prototype.observe=function(e,t){var n=e,i=n.__spanielId=n.__spanielId||ga();return this.recordStore[i]={target:n,payload:t,lastSeenEntry:null,thresholdStates:this.thresholds.map((function(e){return{lastSatisfied:!1,lastEntry:null,threshold:e,visible:!1,lastVisible:{unixTime:0,highResTime:-1}}}))},this.observer.observe(n),i}}();aa.IntersectionObserver&&aa.IntersectionObserver;const Na="show-more-less";".".concat(Na,"__list"),".".concat(Na,"__more-button"),".".concat(Na,"__less-button"),"".concat(Na,"__list--hide-after"),"".concat(Na,"__button--hide");const Ma="accordion-item__trigger";".".concat(Ma);const Da=350,Pa="sticky-header--disabled",Ba="body--sticky-header-disabled";class Fa{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.querySelector(".sticky-header"),{marginApplied:t=!0,disableUnderMinimumViewportHeight:n=!1,minimumViewportHeight:i=Da}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("A header element is required to instantiate a StickyHeader");if(!e.querySelector("nav"))throw Error("The header must contain a 'nav' element in order to instantiate a StickyHeader");let r=8;if(cs()){const t=e.querySelector(".search-bar");t&&(r=t.getBoundingClientRect().height)}return this.stickyHeader=e,this.stickyElementOptions={exposeStickyState:!0,isBottom:!1,marginApplied:t,scrollThreshold:r},n&&i>0?this.setupDisableUnderMinimumViewportHeight(i):this.instantiateStickyElement(),this.stickyElement}instantiateStickyElement(){this.stickyElement=new Qo(this.stickyHeader,this.stickyElementOptions)}setupDisableUnderMinimumViewportHeight(e){const t="(min-height: ".concat(e,"px)"),n=window.matchMedia(t);n.addEventListener("change",this.handleMediaQueryChange.bind(this)),this.handleMediaQueryChange(n)}handleMediaQueryChange(e){var t;e.matches?(this.stickyHeader.classList.remove(Pa),document.body.classList.remove(Ba),this.stickyElement?this.stickyElement.reactivate():this.instantiateStickyElement()):(this.stickyHeader.classList.add(Pa),document.body.classList.add(Ba),null===(t=this.stickyElement)||void 0===t||t.deactivate())}}var Ua;!function(e){e.ProductName="productName",e.UntrackedResponseCodes="untrackedResponseCodes",e.TrackedResponseCodes="trackedResponseCodes",e.ClientSensorGroupName="clientSensorGroupName"}(Ua||(Ua={}));new Set(Object.values(Ua));Error;var Ha;!function(e){e.ProductName="productName",e.CustomTrackingId="customTrackingId",e.ClientSensorGroupName="clientSensorGroupName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes",e.DegradationKeyOverrides="degradationKeyOverrides"}(Ha||(Ha={})),new Set(Object.values(Ha));class qa{constructor(){let{typeaheadApiBaseUrl:e,stickyHeaderOptions:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=document.querySelector(".search-bar");n&&(this.searchBar=new Cs(n,{typeaheadApiBaseUrl:e}));const i=document.querySelector(".language-selector");i&&(this.languageSelector=new z(i));document.querySelector(".sticky-header")&&new Fa(void 0,t),document.querySelector(".member-nav-menu")&&new X}}const ja="filter-values-container__filter-value";".".concat(ja," input"),".".concat(ja," input[type=radio]:checked");function Wa(e){return t=>t.type&&t.type.toLowerCase()===e.toLowerCase()}Wa("action"),Wa("openpage"),Wa("openlink");const za="badgesreceived";class Ga{constructor(){let{badgeSel:e="[data-badge-without-count-source]",badgeCountSel:t="[data-badge-source]",cacheBustHrefSel:n='[data-update-cache-bust-url="true"]'}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._counts={},this.badgeCountEls=document.querySelectorAll(t),this.badgeWithoutCountEls=document.querySelectorAll(e),this.cacheBustHrefEls=document.querySelectorAll(n),this.feedLastUpdatedTimeInDom=Wo("feedLastUpdatedTime")}resetBadges(){Zi(this.badgeCountEls),Zi(this.badgeWithoutCountEls)}getBadges(){const e=this.feedLastUpdatedTimeInDom||"";return j(e?k(Is,"feedQueryAfterTime",e):Is).then((t=>{const n=JSON.parse(t.responseText);L(window,za,{feedsCount:n.feedsCount}),this._counts=n;const i=er();return"messaging"===i&&(this._counts.messagingCount=0),"feed"===i||e||(this._counts.feedsCount=2),this._counts.feedsCount=this._counts.feedsCount>=2?1:0,this._counts.lastUpdatedAt=(new Date).getTime(),this._updateCacheBustUrl(this._counts.feedsCount>0),this._renderBadges(),this})).catch((()=>{L(window,za,{feedsCount:0})}))}_renderBadges(){this.badgeCountEls.forEach((e=>{this._setBadgeCount(e,this._counts[e.dataset.badgeSource])})),this.badgeWithoutCountEls.forEach((e=>{this._setBadge(e,this._counts[e.dataset.badgeWithoutCountSource])}))}_setBadgeCount(e,t){if(!e)return;const n=e.innerHTML;null==n&&t>0?(e.textContent=t,Yi(e)):t!==n&&(t>0?(e.textContent=t,Yi(e),e.classList.toggle("singular",t<=1)):Ji(e))}_setBadge(e,t){e&&(t>0?(Yi(e),e.classList.add("badge-with-no-count")):Ji(e))}_updateCacheBustUrl(e){Wo("isSWCacheEnabled")&&this.cacheBustHrefEls&&this.cacheBustHrefEls.forEach((t=>{t.href=no(e?k(t.href,"pwa","noCache"):R(t.href))}))}}!function(){let e}();new RegExp('^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$');const Ka=Object.freeze({APPRECIATION:"APPRECIATION",ASSENT:"ASSENT",CELEBRATION:"CELEBRATION",EMPATHY:"EMPATHY",ENTERTAINMENT:"ENTERTAINMENT",INSPIRATION:"INSPIRATION",INTEREST:"INTEREST",LIKE:"LIKE",MAYBE:"MAYBE",PRAISE:"PRAISE",UNKNOWN:"UNKNOWN",USEFULNESS:"USEFULNESS"});Object.values(Ka);function Va(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qa(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xa(e,t,n){return t&&Qa(e.prototype,t),n&&Qa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ja(e)}function Ya(e,t){return Ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ya(e,t)}function Za(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Ja(e);if(t){var r=Ja(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Za(this,n)}}function ec(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}(e,t)||nc(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tc(e){return function(e){if(Array.isArray(e))return ic(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nc(e,t){if(e){if("string"==typeof e)return ic(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ic(e,t):void 0}}function ic(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var rc="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",oc=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",sc=["b","del","em","i","s","strong","sub","sup"],ac=sc.concat(["a","abbr","address","area","article","aside","audio","bdi","bdo","big","blockquote","br","button","center","cite","code","datalist","dd","details","dfn","div","dl","dt","fieldset","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","img","ins","kbd","label","legend","li","map","mark","marquee","nav","nobr","ol","p","pre","q","rp","rt","ruby","samp","section","small","source","span","strike","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","video","wbr"]),cc=[rc,"alt|checked|selected|colgroup|cols|colspan|disabled|height|hidden|maxlength|method|multiple|name|placeholder|readonly|rel|required|rows|rowspan|spellcheck|target|title|width","border|caption|color|controls|coords|hreflang|label|lang|loop|marginheight|marginwidth|preload|reversed|type|usemap|clear|headers|ismap|start|datetime|accept|max|min|size|step|style|cellspacing|cellpadding|attributionsrc"].join("|"),lc="href|src",uc="data:image/(?:gif|jpg|jpeg|png);base64,",dc="https?|ftp|mailto|invalid",hc=Xa((function e(){Va(this,e)}));function pc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var fc=function(){var e=/[&<>"'\u0000\\=]/g,t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"};return function(n){return null==n?null:n.toString().replace(e,(function(e){return function(e){return e in t}(e)?t[e]:e}))}}(),mc=function(){var e,t="undefined"!=typeof document?document.createElement("div"):null,n=/&(?:([a-z0-9]+)|#x([\da-f]{1,6})|#(\d{1,8}));/gi,i={nbsp:" ",lt:"<",gt:">",amp:"&",quot:'"'};function r(e){if(function(e){return pc(i,e)}(e))return i[e];if(!t)return e;t.innerHTML="&".concat(e,";");var n=t[oc];return i[e]=n,n}return e="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"�"},function(t){return null==t?null:(t+"").replace(n,(function(t,n,i,o){return n?r(n):i||o?e(parseInt(i||o,i?16:10)||65533):"�"}))}}();function gc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";if("undefined"!=typeof window&&window&&window.jet&&"error"===t.toLowerCase())try{throw new Error(e)}catch(e){try{window.jet.error(e)}catch(e){}}"undefined"!=typeof console&&"function"==typeof console[t]&&console[t](e)}function vc(e){return/[<&]/.test(e)}var yc="[ \t\r\n]*",bc="[ \t\r\n]+";function Ec(e){e=Array.isArray(e)?e:[e];var t,n,i,r=0,o="<(?!/?";return o+="(?:",e.forEach((function(e,s){t=e.tags||ac,n=e.attrs||cc,i=e.checkUrlAttrs||!1,0!==s&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=yc,o+="|"+bc,o+="(?:(?:",o+="(?:".concat(n,")(?:=([\"'])[^'\"<>]*\\").concat(++r,")?"),i&&(o+="|(?:".concat(lc,")=([\"'])(?:(?:").concat(dc,")(?::|&#(?:58|x3a);)|(?:").concat(uc,")|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\").concat(++r)),o+=")"+yc+")+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function wc(e){return Ec({tags:e=e||ac,checkUrlAttrs:!0})}function _c(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n&&n.length>0?!wc(n).test(e):i?!_c.R_UNSAFE_CUSTOM_ELEMENT.test(e):!_c.R_UNSAFE_HTML.test(e)}function Tc(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}_c.R_UNSAFE_HTML=wc(),_c.R_UNSAFE_CUSTOM_ELEMENT=function(){var e={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"};return Ec([{tags:ac,checkUrlAttrs:!0},{tags:[e.tag],attrs:[rc,e.attrs].join("|"),checkUrlAttrs:!1}])}();var Sc={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]},kc=/<([\w:]+)/;function Cc(e,t){var n,i,r,o,s,a=t.createDocumentFragment(),c=[];for(r=0,s=e.length;r<s;r++)if(i=e[r])if("string"==typeof i){n=n||a.appendChild(t.createElement("div"));var l=ec(kc.exec(i)||["",""],2)[1];if(void 0!==l){var u=l.toLowerCase(),d=u in Sc&&Sc[u]||Sc._default;for(Ac(n,d[1]+i+d[2]),o=d[0];o--;)n&&n.lastChild&&n.lastChild.nodeType===Node.ELEMENT_NODE&&(n=n.lastChild);c.push.apply(c,tc(Array.from(n.childNodes))),(n=a.firstChild)&&(n.textContent="")}}else i instanceof Node&&c.push(i);for(a.textContent="",i=c[r=0];i;)a.appendChild(i),i=c[++r];return a}function Ic(e,t,n){e=e.toString();var i=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){if(pc(n,i))return n[i];if(pc(t,i)){var r=t[i],o="string"==typeof r;if(!o&&!(r instanceof hc)&&!("number"==typeof r))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");return r?(r=o?"".concat(fc(r)):r.toString(),n[i]=r,r):e}return e}))}(e,t):e,r=e;return vc(i)&&!_c(i,n)&&(i=Tc(i),gc("Content contains tags or attributes that are not allowed:\nContent: "+r,"error")),i}var Lc=Ic,Rc=Ic;function Ac(e,t,n){var i=Ic(t,n);return i&&vc(i)?e.innerHTML=i:i&&(e[oc]=i),i}var Oc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ya(e,t)}(n,e);var t=$a(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Va(this,n),(i=t.call(this)).options=r,i.tags=i.options.allowTags?i.options.allowTags.flat():[],i.str=e,i}return Xa(n,[{key:"toString",value:function(){var e=this.str,t=this.strValue,n=e;return void 0!==t?t:(_c(e,{allowTags:this.tags,hasCustomElementMarkup:this.options.hasCustomElementMarkup})||(n=e,e=Tc(e),gc("UnsafeString contains tags or attributes that are not allowed.\nString: "+n,"error")),this.strValue=e,e)}}]),n}(hc);var xc=/ /g,Nc=/[\s\u0000<>"]|%00/,Mc=/\\/,Dc=/([.]|%2e){2}/i,Pc=new RegExp("^(?:HTTPS?|https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png|webp|bmp|tiff))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])");function Bc(e){var t,n="invalid://";if("string"!=typeof e)return gc("jSecure Warning: url must be a string","error"),n;if((t=e.trim()).indexOf(" ")>-1&&(gc("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(xc,"+")),!Pc.test(t))return gc("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(Nc.test(t))return gc("jSecure Error: not valid url character found in url: "+e,"error"),n;var i,r=t.split("?")[0],o=!1;if(r){try{if(i=decodeURI(r),Dc.test(i))return gc("jSecure Error: malicious data found in url path: "+r,"error"),n}catch(e){o=!0}if(o)return gc("jSecure Error: malformed url path detected: "+r),n;if(Mc.test(r)||Dc.test(r))return gc("jSecure Error: malicious data found in url path: "+r,"error"),n}return e}var Fc={redirect:function(e){window&&(window.location.href=e)}};var Uc={ALLOWED_TAGS:ac,FORMATTING_TAGS:sc,htmlEncode:fc,htmlUnencode:mc,log:gc,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r,o="",s=n.length;return e&&e.forEach((function(e,t){o+=e,t<s&&(r=n[t],o+=r instanceof Oc?r:fc(r))})),"".concat(Rc(o))},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=Cc([e],t);else{if(!Array.isArray(e))return e;n=Cc(e,t)}return Array.from(n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:Lc,reEncode:function(e){return fc(mc(e))},_redirector:Fc,redirect:function(e){var t=Bc(e);t===e&&Fc.redirect(t)},sanitizeHTML:Rc,sanitizeUrl:Bc,setElementContent:Ac,unsafe:function(e){return e},UnsafeString:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this instanceof e||console.warn("Calling 'UnsafeString' without the 'new' keword is deprecated"),new Oc(t,n)}};const Hc='[data-js-module-id="guest-input"]',qc="input-error",jc="hidden",Wc="notify",zc="error",Gc="requestOtpGenerationLoginBackToEntry",Kc="requestOtpGenerationLoginErrorToast",Vc="requestOtpGenerationLoginImproperEmail",Qc="requestOtpGenerationLoginNotifyToast",Xc="requestOtpGenerationLoginProperEmail",Jc="requestOtpGenerationLoginResubmit",Yc="requestOtpGenerationLoginSubmit",Zc="requestOtpGenerationLoginView";new class{constructor(){if(new qa,this.otpGenerationUrl=Wo("otp-generation-url-path"),this.otpLinkResult=Wo("otp-link-result"),this.sessionKey=Wo("session-key"),this.emailInputEl=document.getElementById("otp_email_entry"),this.emailInputValue="",this.emailSentSubheader=document.getElementById("i18n-otp-sent-subhead").innerHTML,this.usernameMsgEl=document.querySelector("".concat('[data-js-module-id="guest-input__message"]','[for="otp_email_entry"]')),this.usernameMsgEl&&this.usernameMsgEl.classList.add(jc),this.emailSubmitButton=document.querySelector(".otp-email-entry__submit-btn"),this.emailReSubmitButton=document.querySelector(".otp-email-sent__submit-btn"),this.emailSentBackButton=document.querySelector(".otp-email-sent__back-btn"),this.checkElementsExist(),this.otpLinkResult)if(this.emailInputEl.value=this.sessionKey,this.emailInputValue=this.sessionKey,"PASS"===this.otpLinkResult){document.getElementById("i18n-otp-sent-subhead").innerHTML=this.emailSentSubheader.replace("{:email}",this.emailInputValue),this.showOtpModal(!0),this.triggerToast(Wc)}else this.triggerToast(zc);this.attachEventListeners(),this.fireRequestOtpGenerationTrackingEvent(Zc)}attachEventListeners(){this.emailSubmitButton&&this.emailSubmitButton.addEventListener("click",(()=>{this.emailInputValue=this.emailInputEl.value,this.fireRequestOtpGenerationTrackingEvent(Yc),this.emailValidate(this.emailInputValue)?(this.fireRequestOtpGenerationTrackingEvent(Xc),this.emailInputEl.closest(Hc).classList.remove(qc),this.usernameMsgEl.classList.add(jc),this.sendOrResendOtp()):(this.fireRequestOtpGenerationTrackingEvent(Vc),this.emailInputEl.closest(Hc).classList.add(qc),this.usernameMsgEl.classList.remove(jc),this.usernameMsgEl.innerText=Wo("i18n-email-empty"),this.emailInputEl.focus())})),this.emailReSubmitButton&&this.emailReSubmitButton.addEventListener("click",(()=>{this.sendOrResendOtp(),this.fireRequestOtpGenerationTrackingEvent(Jc)})),this.emailSentBackButton&&this.emailSentBackButton.addEventListener("click",(()=>{this.showOtpModal(!1),this.fireRequestOtpGenerationTrackingEvent(Gc)}))}triggerToast(e){var t;let n;e===zc?(n=Wo("i18n-otp-failure-message"),this.fireRequestOtpGenerationTrackingEvent(Kc)):e===Wc&&(n=Wo("i18n-otp-info-message"),this.fireRequestOtpGenerationTrackingEvent(Qc));let i=null===(t=n)||void 0===t?void 0:t.str;if(i){i=i.replace("{:email}",this.emailInputValue);(new qo).trigger(e,i)}}showOtpModal(e){const t=document.querySelector(".otp-email-form"),n=document.querySelector(".otp-email-sent");e?(t.classList.add("hidden"),n.classList.remove("hidden")):(t.classList.remove("hidden"),n.classList.add("hidden"))}async sendOrResendOtp(){try{const e=await fetch(this.otpGenerationUrl,{method:"POST",credentials:"same-origin",body:this.prepareBody(),headers:{accept:"application/json","X-Requested-With":"XMLHttpRequest"}});if(e.ok){if("PASS"===(await e.json()).otpLinkResult){document.getElementById("i18n-otp-sent-subhead").innerHTML=this.emailSentSubheader.replace("{:email}",this.emailInputValue),this.showOtpModal(!0),this.triggerToast(Wc)}else this.triggerToast(zc)}else if(401===e.status){const t=await e.json();"CHALLENGE"===t.otpLinkResult?window.location.replace(Uc.sanitizeUrl(t.challengeURL)):this.triggerToast(zc)}else this.triggerToast(zc)}catch(e){console.log(e),this.triggerToast(zc)}}emailValidate(e){if(e){return new RegExp(/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i).test(e)}return!1}prepareBody(){const e=new FormData;return e.append("csrfToken",document.getElementsByName("csrfToken")[0].value),e.append("resendUrl",this.otpGenerationUrl),e.append("parentPageKey",Wo("page-key")),e.append("trk","guest_ssr-login_request-otp-generation"),e.append("session_key",this.emailInputValue),e}async fireRequestOtpGenerationTrackingEvent(e){const t=await window.ingraphTracking;null==t||t.fireCounterIngraphMetric({metricsType:e})}checkElementsExist(){if(!this.otpGenerationUrl)throw new Error("Missing otpGenerationUrlPath parameter");if(!this.emailInputEl)throw new Error("Missing email input element");if(!this.usernameMsgEl)throw new Error("Missing username error message element");if(!this.emailSubmitButton)throw new Error("Missing email submit button");if(!this.emailReSubmitButton)throw new Error("Missing email resubmit button");if(!this.emailSentBackButton)throw new Error("Missing back button for email sent form")}}})();