/* Auto generated, hash = 6vkkpzn4romwu4849yly9ryf4 */ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&& e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){(function(r,i){var o,a,s;function u(e){return(u="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)}s=function(){function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,o=void 0,a=void 0,s=function(e,t){m[n]=e,m[n+1]=t,2===(n+=2)&&(a?a(v):T())},c="undefined"!=typeof window?window:void 0,l=c||{},d=l.MutationObserver||l.WebKitMutationObserver, f="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(v,1)}}var m=new Array(1E3);function v(){for(var e=0;e"'\u0000\\=]/g,s={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;","\x00":"\ufffd","\\":"\x26#92;","\x3d":"\x26#61;"},function(e){return null==e?null:e.toString().replace(u,function(e){return s[e]})}),l=function(){var e,n,r=/&(?:([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:"\u00a0", lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"'};return n="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"\ufffd"},function(o){return null==o?null:(o+"").replace(r,function(r,o,a,s){return o?(u=o,i.hasOwnProperty(u)?i[u]:(e.innerHTML="\x26"+u+";",c=e[t],i[u]=c,c)):a||s?n(parseInt(a||s,a?16:10)||65533):"\ufffd";var u,c})}}(),d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function f(e){return/[<&]/.test(e)} var h,p=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,r=e.length;n]*>|[<>'"&\\]/g,"")}function b(e,t,n){if(null==e)return null;e=e.toString();var r=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,function(e,r){var i,a=e;if(n.hasOwnProperty(r))return n[r]; if(t.hasOwnProperty(r)){if(!((i="string"==typeof(a=t[r]))||a instanceof o||"number"==typeof a))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");a=i?c(a):a.toString()}return n[r]=a,a})}(e,t):e,i=e;return f(r)&&!g(r,n)&&(r=y(r),a("Content contains non-whitelisted tags or attributes:\nContent: "+i,"error")),r}function E(e,t){for(var n=+t.length,r=0,i=e.length;r1?t-1:0),r=1;r"]|%00/,O=/\\/,_=/([.]|%2e){2}/i,x=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 P(e){var t=void 0;if("string"!=typeof e)return a("jSecure Warning: url must be a string","error"),"invalid://";if((t=e.trim()).indexOf(" ")>-1&&(a("jSecure Warning: url should not contain spaces: "+ e,"warn"),t=t.replace(R,"+")),!x.test(t))return a("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),"invalid://";if(L.test(t))return a("jSecure Error: not valid url character found in url: "+e,"error"),"invalid://";var n=t.split("?")[0],r=void 0,i=!1;try{r=decodeURI(n)}catch(e){i=!0}return i?(a("jSecure Error: malformed url path detected: "+n),"invalid://"):O.test(n)||_.test(n)||_.test(r)?(a("jSecure Error: malicious data found in url path: "+ n,"error"),"invalid://"):e}var D={redirect:function(e){window&&(window.location.href=e)}};return{ALLOWED_TAGS:r,FORMATTING_TAGS:n,htmlEncode:c,htmlUnencode:l,log:a,mk:N,parseHTML:S,parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:k,reEncode:function(e){return c(l(e))},_redirector:D,redirect:function(e){var t=P(e);t===e&&D.redirect(t)},sanitizeHTML:I,sanitizeUrl:P,setElementContent:A,text:function(e){return a("jSecure.text() is deprecated. Please use jSecure.htmlEncode().", "warn"),c(e)},unsafe:function(e){return e},UnsafeString:M}},"object"===a(t)&&void 0!==e?e.exports=o():void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){var r,i,o;function a(e){return(a="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)}o=function(){var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen, r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,o=Object.freeze,s=Object.seal,u=Object.create,c="undefined"!=typeof Reflect&&Reflect,l=c.apply,d=c.construct;l||(l=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),s||(s=function(e){return e}),d||(d=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);t1?n-1:0),i=1;i/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),q=s(/^aria-[\-\w]+$/),j=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=s(/^(?:\w+script|data):/i),z=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype? "symbol":a(e)};function V(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:G(),n=function(t){return e(t)};if(n.version="2.2.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,u=t.Node,c=t.Element,l=t.NodeFilter,d=t.NamedNodeMap,f=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap: d,C=t.Text,Q=t.Comment,J=t.DOMParser,Y=t.trustedTypes,Z=c.prototype,$=I(Z,"cloneNode"),ee=I(Z,"nextSibling"),te=I(Z,"childNodes"),ne=I(Z,"parentNode");if("function"==typeof s){var re=i.createElement("template");re.content&&re.content.ownerDocument&&(i=re.content.ownerDocument)}var ie=X(Y,r),oe=ie&&He?ie.createHTML(""):"",ae=i,se=ae.implementation,ue=ae.createNodeIterator,ce=ae.getElementsByTagName,le=ae.createDocumentFragment,de=r.importNode,fe={};try{fe=k(i).documentMode?i.documentMode:{}}catch(e){}var he= {};n.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var pe=F,me=U,ve=B,ge=q,ye=W,be=z,Ee=j,Te=null,we=S({},[].concat(V(A),V(M),V(N),V(L),V(_))),Ce=null,Se=S({},[].concat(V(x),V(P),V(D),V(H))),ke=null,Ie=null,Ae=!0,Me=!0,Ne=!1,Re=!1,Le=!1,Oe=!1,_e=!1,xe=!1,Pe=!1,De=!0,He=!1,Fe=!0,Ue=!0,Be=!1,qe={},je=S({},["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"]),We=null,ze=S({},["audio","video","img","source","image","track"]),Ke=null,Ve=S({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ge=null,Xe=i.createElement("form"),Qe=function(e){Ge&&Ge===e||(e&&"object"===(void 0===e?"undefined":K(e))||(e={}),e=k(e),Te="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):we,Ce="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):Se,Ke="ADD_URI_SAFE_ATTR"in e?S(k(Ve),e.ADD_URI_SAFE_ATTR): Ve,We="ADD_DATA_URI_TAGS"in e?S(k(ze),e.ADD_DATA_URI_TAGS):ze,ke="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},Ie="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},qe="USE_PROFILES"in e&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,Me=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,De=!1!==e.RETURN_DOM_IMPORT,He=e.RETURN_TRUSTED_TYPE||!1,_e=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Ue=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE|| !1,Ee=e.ALLOWED_URI_REGEXP||Ee,Re&&(Me=!1),Pe&&(xe=!0),qe&&(Te=S({},[].concat(V(_))),Ce=[],!0===qe.html&&(S(Te,A),S(Ce,x)),!0===qe.svg&&(S(Te,M),S(Ce,P),S(Ce,H)),!0===qe.svgFilters&&(S(Te,N),S(Ce,P),S(Ce,H)),!0===qe.mathMl&&(S(Te,L),S(Ce,D),S(Ce,H))),e.ADD_TAGS&&(Te===we&&(Te=k(Te)),S(Te,e.ADD_TAGS)),e.ADD_ATTR&&(Ce===Se&&(Ce=k(Ce)),S(Ce,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(Ke,e.ADD_URI_SAFE_ATTR),Ue&&(Te["#text"]=!0),Le&&S(Te,["html","head","body"]),Te.table&&(S(Te,["tbody"]),delete ke.tbody),o&& o(e),Ge=e)},Je=S({},["mi","mo","mn","ms","mtext"]),Ye=S({},["foreignobject","desc","title","annotation-xml"]),Ze=S({},M);S(Ze,N),S(Ze,R);var $e=S({},L);S($e,O);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var n=v(e.tagName),r=v(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||Je[r]): Boolean(Ze[n]);if(e.namespaceURI===et)return t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&Ye[r]:Boolean($e[n]);if(e.namespaceURI===nt){if(t.namespaceURI===tt&&!Ye[r])return!1;if(t.namespaceURI===et&&!Je[r])return!1;var i=S({},["title","style","font","a","script"]);return!$e[n]&&(i[n]||!Ze[n])}return!1},it=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ot=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e), from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ce[e])if(xe||Pe)try{it(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},at=function(e){var t=void 0,n=void 0;if(_e)e="\x3cremove\x3e\x3c/remove\x3e"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var o=ie?ie.createHTML(e):e;try{t=(new J).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){var a=(t=se.createHTMLDocument("")).body;a.parentNode.removeChild(a.parentNode.firstElementChild),a.outerHTML= o}return e&&n&&t.body.insertBefore(i.createTextNode(n),t.body.childNodes[0]||null),ce.call(t,Le?"html":"body")[0]},st=function(e){return ue.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,function(){return l.FILTER_ACCEPT},!1)},ut=function(e){return!(e instanceof C||e instanceof Q||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof f&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"== typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ct=function(e){return"object"===(void 0===u?"undefined":K(u))?e instanceof u:e&&"object"===(void 0===e?"undefined":K(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},lt=function(e,t,r){he[e]&&h(he[e],function(e){e.call(n,t,r,Ge)})},dt=function(e){var t=void 0;if(lt("beforeSanitizeElements",e,null),ut(e))return it(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return it(e),!0;var r=v(e.nodeName);if(lt("uponSanitizeElement",e,{tagName:r, allowedTags:Te}),!ct(e.firstElementChild)&&(!ct(e.content)||!ct(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return it(e),!0;if(!Te[r]||ke[r]){if(Ue&&!je[r]){var i=ne(e),o=te(e);if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore($(o[a],!0),ee(e))}return it(e),!0}return e instanceof c&&!rt(e)?(it(e),!0):"noscript"!==r&&"noembed"!==r||!T(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=y(t,pe," "),t=y(t,me," "),e.textContent!==t&&(m(n.removed, {element:e.cloneNode()}),e.textContent=t)),lt("afterSanitizeElements",e,null),!1):(it(e),!0)},ft=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in i||n in Xe))return!1;if(Me&&T(ve,t));else if(Ae&&T(ge,t));else{if(!Ce[t]||Ie[t])return!1;if(Ke[t]);else if(T(Ee,y(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==b(n,"data:")||!We[e])if(Ne&&!T(ye,y(n,be,"")));else if(n)return!1}return!0},ht=function(e){var t=void 0,r=void 0,i=void 0,o=void 0;lt("beforeSanitizeAttributes", e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce};for(o=a.length;o--;){var u=t=a[o],c=u.name,l=u.namespaceURI;if(r=E(t.value),i=v(c),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,lt("uponSanitizeAttribute",e,s),r=s.attrValue,!s.forceKeepAttr&&(ot(c,e),s.keepAttr))if(T(/\/>/i,r))ot(c,e);else{Re&&(r=y(r,pe," "),r=y(r,me," "));var d=e.nodeName.toLowerCase();if(ft(d,i,r))try{l?e.setAttributeNS(l,c,r):e.setAttribute(c,r),p(n.removed)}catch(e){}}}lt("afterSanitizeAttributes", e,null)}},pt=function e(t){var n=void 0,r=st(t);for(lt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)lt("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof a&&e(n.content),ht(n));lt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,i){var o=void 0,s=void 0,c=void 0,l=void 0,d=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!ct(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting"); }if(!n.isSupported){if("object"===K(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ct(e))return t.toStaticHTML(e.outerHTML)}return e}if(Oe||Qe(i),n.removed=[],"string"==typeof e&&(Be=!1),Be);else if(e instanceof u)1===(s=(o=at("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?o=s:o.appendChild(s);else{if(!xe&&!Re&&!Le&&-1===e.indexOf("\x3c"))return ie&&He?ie.createHTML(e):e;if(!(o=at(e)))return xe? null:oe}o&&_e&&it(o.firstChild);for(var f=st(Be?e:o);c=f.nextNode();)3===c.nodeType&&c===l||dt(c)||(c.content instanceof a&&pt(c.content),ht(c),l=c);if(l=null,Be)return e;if(xe){if(Pe)for(d=le.call(o.ownerDocument);o.firstChild;)d.appendChild(o.firstChild);else d=o;return De&&(d=de.call(r,d,!0)),d}var h=Le?o.outerHTML:o.innerHTML;return Re&&(h=y(h,pe," "),h=y(h,me," ")),ie&&He?ie.createHTML(h):h},n.setConfig=function(e){Qe(e),Oe=!0},n.clearConfig=function(){Ge=null,Oe=!1},n.isValidAttribute=function(e, t,n){Ge||Qe({});var r=v(e),i=v(t);return ft(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(he[e]=he[e]||[],m(he[e],t))},n.removeHook=function(e){he[e]&&p(he[e])},n.removeHooks=function(e){he[e]&&(he[e]=[])},n.removeAllHooks=function(){he={}},n}()},"object"===a(t)&&void 0!==e?e.exports=o():void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t){!function(e){if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,o="ArrayBuffer"in e;d.prototype.append=function(e,t){e=u(e),t=c(t);var n=this.map[e];n||(n=[],this.map[e]=n),n.push(t)},d.prototype.delete=function(e){delete this.map[u(e)]},d.prototype.get=function(e){var t=this.map[u(e)];return t?t[0]:null},d.prototype.getAll=function(e){return this.map[u(e)]||[]},d.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},d.prototype.set=function(e,t){this.map[u(e)]=[c(t)]},d.prototype.forEach= function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},d.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),l(e)},d.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),l(e)},d.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),l(e)},n&&(d.prototype[Symbol.iterator]=d.prototype.entries);var a=["DELETE","GET","HEAD","OPTIONS", "POST","PUT"];v.prototype.clone=function(){return new v(this)},m.call(v.prototype),m.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var s=[301,302,303,307,308];b.redirect=function(e,t){if(-1===s.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})}, e.Headers=d,e.Request=v,e.Response=b,e.fetch=function(e,t){return new Promise(function(n,i){var o;o=v.prototype.isPrototypeOf(e)&&!t?e:new v(e,t);var a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:y(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},t="response"in a?a.response:a.responseText;n(new b(t,e))},a.onerror=function(){i(new TypeError("Network request failed"))}, a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&r&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!= typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,n){e.onload=function(){t(e.result)}, e.onerror=function(){n(e.error)}})}function p(e){var t=new FileReader;return t.readAsArrayBuffer(e),h(t)}function m(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!o||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type"); }else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset\x3dUTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset\x3dUTF-8"))},r?(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob"); return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(p)},this.text=function(){var e,t,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,(t=new FileReader).readAsText(e),h(t);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=f(this);return e||Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(g)}),this.json= function(){return this.text().then(JSON.parse)},this}function v(e,t){var n,r,i=(t=t||{}).body;if(v.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(n=t.method||this.method|| "GET",r=n.toUpperCase(),a.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(e){var t=new FormData;return e.trim().split("\x26").forEach(function(e){if(e){var n=e.split("\x3d"),r=n.shift().replace(/\+/g," "),i=n.join("\x3d").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function y(e){var t=new d;return(e.getAllResponseHeaders()|| "").trim().split("\n").forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function b(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof d?t.headers:new d(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined"); }function a(){throw new Error("clearTimeout has not been defined");}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&& h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d1)for(var n=1;n>0),v=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,g=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],y=[],b=[],E="",T=r.documentElement,w=y.indexOf||function(e){for(var t=this.length;t--&&this[t]!== e;);return t},C=i.prototype,S=C.hasOwnProperty,k=C.isPrototypeOf,I=i.defineProperty,A=[],M=i.getOwnPropertyDescriptor,N=i.getOwnPropertyNames,R=i.getPrototypeOf,L=i.setPrototypeOf,O=!!i.__proto__,_=e.customElements,x=!/^force/.test(t.type)&&!!(_&&_.define&&_.get&&_.whenDefined),P=i.create||i,D=e.Map||function(){var e,t=[],n=[];return{get:function(e){return n[w.call(t,e)]},set:function(r,i){(e=w.call(t,r))<0?n[t.push(r)-1]=i:n[e]=i}}},H=e.Promise||function(e){var t=[],n=!1,r={catch:function(){return r}, then:function(e){return t.push(e),n&&setTimeout(i,1),r}};function i(e){for(n=!0;t.length;)t.shift()(e)}return e(i),r},F=!1,U=P(null),B=P(null),q=new D,j=function(e){return e.toLowerCase()},W=i.create||function e(t){return t?(e.prototype=t,new e):this},z=L||(O?function(e,t){return e.__proto__=t,e}:N&&M?function(){function e(e,t){for(var n,r=N(t),i=0,o=r.length;i1)&&Le(this)}}}),X(a,"attributeChangedCallback",{value:function(e){-1=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e;},f:i}}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,a=!0,s=!1;return{s:function(){n=n.call(e)}, n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o;}}}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}function f(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0,n=(S[e[t+0]]+S[e[t+1]]+S[e[t+2]]+S[e[t+3]]+"-"+S[e[t+4]]+S[e[t+5]]+"-"+S[e[t+6]]+S[e[t+7]]+"-"+S[e[t+8]]+S[e[t+9]]+"-"+S[e[t+10]]+S[e[t+11]]+S[e[t+12]]+S[e[t+13]]+S[e[t+14]]+S[e[t+15]]).toLowerCase();if(!C(n))throw TypeError("Stringified UUID is invalid");return n}function A(e){if(!C(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}function M(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e)); for(var t=[],n=0;n>>9<<4)+1}function R(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function L(e,t,n,r,i,o){return R((a=R(R(t,e),R(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function O(e,t,n,r,i,o,a){return L(t&n|~t&r,e,t,i,o,a)}function _(e,t,n,r,i,o,a){return L(t&r|n&~r,e,t,i,o,a)}function x(e,t,n,r,i,o,a){return L(t^n^r,e,t,i,o,a)}function P(e,t,n,r,i,o,a){return L(n^(t|~r),e,t,i,o,a)}function D(e,t,n){var r=(e=e||{}).random||(e.rng||T)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i= 0;i<16;++i)t[n+i]=r[i];return t}return I(r)}function H(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function F(e,t){return e<>>32-t}M("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,a=parseInt(r.charAt(o>>>4&15)+r.charAt(15& o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>0;b=y,y=g,g=F(v,30)>>>0,v=m,m=w}n[0]=n[0]+m>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>> 16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});var U=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var B=("undefined"!=typeof FastBoot?FastBoot.require:require)("crypto");if(B){var q=new Uint8Array(256),j=q.length;U={rng:function(){return j>q.length-16&&(B.randomFillSync(q),j=0),q.slice(j,j+=16)}}}}"object"===("undefined"== typeof crypto?"undefined":y(crypto))&&crypto.randomUUID;function W(){return D(U,new Array(16),0)}function z(e){return m(e).map(function(e){return String.fromCharCode(e)}).join("")}function K(){return z(W())}var V=/^[a-zA-Z0-9/+]+[=]+$/;function G(){return function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=[],i=0,o=e.length,a=o%3,s=o-a;i>>18&63)),r.push(n.charAt(t>>>12&63)),r.push(n.charAt(t>>>6&63)), r.push(n.charAt(63&t)),i+=3;switch(a){case 2:t=e[i]<<16,t|=e[i+1]<<8,r.push(n.charAt(t>>>18&63)),r.push(n.charAt(t>>>12&63)),r.push(n.charAt(t>>>6&63)),r.push("\x3d");break;case 1:t=e[i]<<16,r.push(n.charAt(t>>>18&63)),r.push(n.charAt(t>>>12&63)),r.push("\x3d"),r.push("\x3d")}return r.join("")}(W())}function X(e,t){return{pageUrn:J(e),trackingId:t||G()}}function Q(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function J(e){return"urn:li:page:".concat(e)}function Y(e){var t=decodeURIComponent(e).split(";"); if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}function Z(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}new RegExp("[?\x26]lipi\x3d([^\x26#]*)"),new RegExp("[?\x26]licu\x3d([^\x26#]*)");function $(e,t){return void 0!==t.allSettled?t.allSettled(e):function(e){return new Promise(function(t){var n=new Set,r=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map(function(e){return e.then(function(){return r(e)}).catch(function(){return r(e)})})})}(e)} function ee(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}function te(e,t){if("undefined"!=typeof window&&window.indexedDB){var n="sequenceNumber",r=window.indexedDB.open(n);return new Promise(function(i,o){r.onupgradeneeded=function(){var e=r.result;e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onsuccess=function(){var a=r.result,s=a.transaction(n,"readwrite"),u=s.objectStore(n),c=u.get(1);c.onsuccess=function(){var n=c.result;if(n){var r,a=null!==(r= n.sequenceNumber)&&void 0!==r?r:0;if("read"===e)return i(a);if(!("update"===e&&void 0!==t&&t>a))return i(null);var s=u.put({sequenceNumber:t},1);s.onsuccess=function(){return i(null)},s.onerror=function(){o(s.error)}}else{var l=u.add({sequenceNumber:0});l.onsuccess=function(){return i(0)},l.onerror=function(){o(l.error)}}},c.onerror=function(){return a.close(),o(new Error("Error: get sequence number from indexedDB ".concat(String(c.error))))},s.oncomplete=function(){return a.close()}},r.onerror=function(){return i(null)}})}return Promise.resolve(null)} function ne(e,t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])}function re(e,t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)}var ie,oe,ae=(ie=new Map,oe=new Map,{on:function(e,t){ne(ie,e,t)},before:function(e,t){ne(oe,e,t)},off:function(e,t){re(ie,e,t)},offBefore:function(e,t){re(oe,e,t)},emit:function(e,t){(oe.get(e)||[]).concat(ie.get(e)||[]).slice().map(function(e){e(t)})},clear:function(){oe.clear(),ie.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var se=function(e){"pagehide"!== e.type&&"hidden"!==document.visibilityState||ae.emit("internal:hide",e)};document.addEventListener("visibilitychange",se),window.addEventListener("pagehide",se)}var ue=Uint8Array,ce=Uint16Array,le=Uint32Array,de=new ue([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]),fe=new ue([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]),he=new ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pe=function(e,t){for(var n=new ce(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&Ee)<<1;Te=(61680&(Te=(52428&Te)>>>2|(13107&Te)<<2))>>>4|(3855&Te)<<4,be[Ee]=((65280&Te)>>>8|(255&Te)<<8)>>>1}var we=function(e,t,n){for(var r=e.length,i=0,o=new ce(t);i>>u]=c}else for(a=new ce(r),i=0;i>>15-e[i]);return a},Ce=new ue(288);for(Ee=0;Ee<144;++Ee)Ce[Ee]=8;for(Ee=144;Ee<256;++Ee)Ce[Ee]=9;for(Ee=256;Ee<280;++Ee)Ce[Ee]=7;for(Ee=280;Ee<288;++Ee)Ce[Ee]=8;var Se=new ue(32);for(Ee=0;Ee<32;++Ee)Se[Ee]=5;var ke=we(Ce,9,0),Ie=we(Se,5,0),Ae=function(e){return(e+7)/8|0},Me=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|= n>>>8},Ne=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Re=function(e,t){for(var n=[],r=0;rf&&(f=o[r].s);var h=new ce(f+1),p=Le(n[l-1],h,0);if(p>t){r=0;var m=0,v=p-t,g=1<t))break;m+=g-(1<>>=v;m>0;){var b=o[r].s;h[b]=0&&m;--r){var E=o[r].s;h[E]==t&&(--h[E],++m)}p=t}return[new ue(h),p]},Le=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},Oe=function(e){for(var t=e.length;t&&!e[--t];);for(var n= new ce(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]},_e=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o4&&!I[he[M-1]];--M);var N,R,L,O,_=c+5<<3,x=_e(i,Ce)+_e(o,Se)+a,P=_e(i,f)+_e(o,m)+a+14+3*M+_e(C,I)+(2*C[16]+3*C[17]+7*C[18]);if(_<=x&&_<=P)return xe(t,l,e.subarray(u,u+c));if(Me(t,l,1+(P15&&(Me(t,l,U[S]>>>5&127),l+=U[S]>>>12)}}}else N=ke,R=Ce,L=Ie,O=Se;for(S=0;S255){B=r[S]>>>18&31,Ne(t,l,N[B+257]),l+=R[B+257],B>7&&(Me(t,l,r[S]>>>23&31),l+=de[B]);var q=31&r[S];Ne(t,l,L[q]),l+=O[q],q>3&&(Ne(t,l,r[S]>>>5&8191),l+=fe[q])}else Ne(t,l,N[r[S]]), l+=R[r[S]];return Ne(t,l,N[256]),l+R[256]},De=new le([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),He=new ue(0),Fe=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),Ue=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Be(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r>>8;e=n},d:function(){return~e}}}(),r=e.length;n.p(e);var i,o,a,s=(i=e,o= t,a=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8,function(e,t,n,r,i,o){var a=e.length,s=new ue(r+a+5*(1+Math.ceil(a/7E3))+i),u=s.subarray(r,s.length-i),c=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var d=l+65535;d>=a&&(u[c>>3]=o),c=xe(u,c+1,e.subarray(l,d))}else{for(var f=De[t-1],h=f>>>13,p=8191&f,m=(1<7E3||I>24576)&&O>423){c=Pe(e,u,0,T,w,C,k,I,M,l-M,c),I=S=k=0,M=l;for(var _=0;_<286;++_)w[_]=0;for(_=0;_<30;++_)C[_]=0}var x=2,P=0,D=p,H=R-L&32767;if(O>2&&N==E(l-H))for(var F=Math.min(h,O)-1,U=Math.min(32767,l),B=Math.min(258,O);H<=U&&--D&&R!=L;){if(e[l+x]==e[l+x-H]){for(var q=0;qx){if(x=q,P=H,q>F)break;var j=Math.min(H,q-2),W=0;for(_=0;_W&&(W=K,L=z)}}}H+= (R=L)-(L=v[R])+32768&32767}if(P){T[I++]=268435456|ge[x]<<18|ye[P];var V=31&ge[x],G=31&ye[P];k+=de[V]+fe[G],++w[257+V],++C[G],A=l+x,++S}else T[I++]=e[l],++w[e[l]]}}c=Pe(e,u,o,T,w,C,k,I,M,l-M,c),!o&&7&c&&(c=xe(u,c+1,He))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new (2==e.BYTES_PER_ELEMENT?ce:4==e.BYTES_PER_ELEMENT?le:ue)(n-t);return r.set(e.subarray(t,n)),r}(s,0,r+Ae(c)+i)}(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))): 12+o.mem,a,8,!0)),u=s.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&&Ue(e,4,Math.floor(new Date(t.mtime||Date.now())/1E3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(s,t),Ue(s,u-8,n.d()),Ue(s,u-4,r),s}var qe="undefined"!=typeof TextDecoder&&new TextDecoder;try{qe.decode(He,{stream:!0})}catch(Rn){}function je(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function We(){try{return je()&& "keepalive"in new Request("")}catch(e){return!1}}function ze(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var r=new XMLHttpRequest;if(r.open("POST",e,!0),r.withCredentials=!0,n.headers)for(var i=0,o=Object.keys(n.headers);i2&&void 0!==arguments[2]?arguments[2]:"key",r=arguments.length>3?arguments[3]:void 0,i=indexedDB.open(e);i.onupgradeneeded=function(){try{i.result.createObjectStore(t, {keyPath:n})}catch(e){null==r||r.onError(e)}};var o=new Promise(function(e,t){i.onsuccess=function(){var t=i.result;t.onversionchange=function(){return t.close()},e(t),null==r||r.onSuccess()},i.onerror=function(){t(i.error),null==r||r.onError(i.error)}});return function(e,n){return o.then(function(r){return n(r.transaction(t,e).objectStore(t))})}}function Ze(){return Ge||(Ge=Ye("idb-queue","default")),Ge}function $e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1E3,batchEvictionNumber:300}, n=0,r=null;return e.openKeyCursor().onsuccess=function(){var i=this.result;i&&n++0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1E3,batchEvictionNumber:300},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze();return t("readwrite",function(t){return $e(t,e)})}var tt=!1;function nt(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]:Ze();return n("readwrite",function(n){return n.put(e),Je(n.count()).then(function(e){if(!(e<=t.maxNumber))return $e(n,t)})}).catch(function(e){if(e&&"QuotaExceededError"===e.name)return et(t,n)})}function rt(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]:Ze();return tt?Promise.resolve():nt(e, t,n)}function it(e,t,n){return t("readwrite",function(t){var r=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(r.push(t.value),t.delete(),(e<0||r.length 0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze();return ot(e,t,"next")}function st(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze();return ot(e,t,"prev")}function ut(){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,r=arguments.length>3?arguments[3]:void 0;return!t||n<1|| (e[t]=JSON.stringify({attempt:n,errorCode:r})),e}function ct(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function lt(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function dt(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{var n=function n(){requestIdleCallback(function(r){r.timeRemaining()> t.timeRemaining||r.didTimeout?e():n()},{timeout:t.timeout})};n()}}function ft(e,t){var n=0;return{throttledFn:function(){var r=Date.now();r-n>t&&(ct(function(){return"[throttle] Run fn() at "+String(r)}),e(),n=r)},resetThrottle:function(){n=0}}}var ht=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d(this,e),p(this,"config",void 0),p(this,"compress",void 0),p(this,"throttleControl",void 0),p(this,"withStore",void 0),p(this,"disablePersistence",!1),this.config= t,this.compress=r;var i=t.measureIDB;i&&performance.mark(i.createStartMark),this.withStore=Ye(t.idbName,"beacons","timestamp",{onSuccess:function(){i&&performance.measure(i.createSuccessMeasure,i.createStartMark)},onError:function(){i&&performance.measure(i.createFailMeasure,i.createStartMark),n.disablePersistence=!0}}),this.throttleControl=ft(this.replayEntries.bind(this),t.throttleWait)}return h(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push", value:function(e){var t=this;if(!this.disablePersistence){var n=function(){ct(function(){return"Persisting to DB "+e.url}),rt(e,t.config,t.withStore).then(function(){t.throttleControl.resetThrottle(),ct(function(){return"push completed"})}).catch(function(){t.disablePersistence=!0,lt(function(){return"push failed"})})};this.config.useIdle?dt(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]:Ze();return tt=!0,e("readwrite",function(e){return e.clear(),Je(e.transaction).finally(function(){return tt=!1})})}(this.withStore).catch(function(){e.disablePersistence=!0,lt(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([]):at(t,this.withStore).catch(function(){return e.disablePersistence=!0,lt(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([]):st(t,this.withStore).catch(function(){return e.disablePersistence=!0,lt(function(){return"peekBack failed"}),[]})}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){ct(function(){return"Replaying entry: shift from store"}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&& void 0!==arguments[1]?arguments[1]:Ze();return it(e,t,"next")}(1,e.withStore).then(function(t){if(t.length>0){var n,r,i=t[0],o=i.url,a=i.body,s=i.headers,u=i.timestamp,c=i.statusCode,l=i.attemptCount;return ct(function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(l)}),null===(n=(r=e.config).onBeforeRetry)||void 0===n||n.call(r,a),Qe(o,a,ut(s,e.config.headerName,l,c),e.compress).then(function(t){if("unknown"===t.type||"success"===t.type){var n,r;null===(n=(r=e.config).onResult)|| void 0===n||n.call(r,t,a),e.replayEntries()}else{var i,s,d,f,h,p;if(l+1>e.config.attemptLimit)return ct(function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:u,statusCode:c},null,2)}),t.drop=!0,void(null===(i=(s=e.config).onResult)||void 0===i||i.call(s,t,a));if("network"===t.type||e.config.statusCodes.includes(t.statusCode))return t.drop=!1,null===(d=(f=e.config).onResult)||void 0===d||d.call(f,t,a),ct(function(){return"Replaying the entry failed, pushing back to IDB: "+ JSON.stringify({url:o,timestamp:u,statusCode:c},null,2)}),rt({url:o,body:a,timestamp:u,statusCode:c,attemptCount:l+1},e.config,e.withStore);t.drop=!0,null===(h=(p=e.config).onResult)||void 0===h||h.call(p,t,a)}})}}).catch(function(t){e.disablePersistence=!0,t&&t.message&<(function(){return"Replay entry failed: ".concat(t.message)})})};this.config.useIdle?dt(t):t()}}}]),e}(),pt=function(){function e(){d(this,e)}return h(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}(),mt=function(){function e(t,n){d(this,e),p(this,"queue",void 0),p(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new ht(t,n.compress):new pt}return h(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}();p(mt,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var vt=[502,504],gt=[429,503],yt=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4]; d(this,e),p(this,"url",void 0),p(this,"body",void 0),p(this,"config",void 0),p(this,"persistenceConfig",void 0),p(this,"compress",void 0),p(this,"timestamp",void 0),p(this,"isClearQueuePending",!1),p(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=r,this.persistenceConfig=i,this.compress=a,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return h(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 Qe(e.url,e.body,t,e.compress)},n,t).finally(function(){ct(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,r){var i=this,o=this.getAttemptCount(t)-1;return e(ut(n,this.config.headerName, o,r)).then(function(r){var o,a,s,u;if(r.drop=!1,"unknown"===r.type||"success"===r.type)i.isClearQueuePending||i.persistenceConfig.disabled||i.persistenceConfig.db.notifyQueue(),s=r;else if(ct(function(){return"retry rejected "+JSON.stringify(r)}),i.shouldPersist(t,r))i.persistenceConfig.db.pushToQueue({url:i.url,body:i.body,headers:n,statusCode:r.statusCode,timestamp:i.timestamp,attemptCount:i.getAttemptCount(t)}),s={type:"persisted",drop:!1,statusCode:r.statusCode};else{if(t>0&&i.isRetryableError(r)){var c, l;null===(c=(l=i.config).onIntermediateResult)||void 0===c||c.call(l,r,i.body);var d=i.config.calculateRetryDelay(i.getAttemptCount(t),t);return ct(function(){return"in memory retry in ".concat(d,"ms")}),(u=d,new Promise(function(e){return setTimeout(e,u)})).then(function(){return i.retry(e,t-1,n,r.statusCode)})}(s=r).drop=!0}return null===(o=(a=i.config).onIntermediateResult)||void 0===o||o.call(a,s,i.body),s})}},{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 bt(e,t,n,r,i){"control"!==r&&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&&We()&&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 a,s,u=null!==(a=e.retryConfig.inMemory)&&void 0!==a?a:{attemptLimit:4,statusCodes:[502,504]},c=null!==(s=e.retryConfig.persist)&&void 0!==s?s:{attemptLimit:3,statusCodes:[429,503],maxNumber:1E3,batchEvictionNumber:300,throttleWait:3E5},l={compress:n,inMemoryRetry:{onIntermediateResult:null== i?void 0:i.onIntermediateResult,attemptLimit:u.attemptLimit,statusCodes:u.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==i?void 0:i.onBeforeRetry,onResult:null==i?void 0:i.onResult,idbName:"beacons",attemptLimit:c.attemptLimit,statusCodes:c.statusCodes,maxNumber:c.maxNumber,batchEvictionNumber:c.batchEvictionNumber,throttleWait:c.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),r=Object.assign({attemptLimit:0,statusCodes:vt,calculateRetryDelay:function(e,t){return 2E3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var i=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:gt,maxNumber:1E3,batchEvictionNumber:300, throttleWait:3E5},t.persistenceRetry);i.headerName=i.headerName||r.headerName,e=new mt(i,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(i,o,a){var s;return je()?(new yt(i,o,r,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(s=t.persistenceRetry)||void 0===s?void 0:s.statusCodes)||gt},n)).send(a):Promise.resolve({type:"unknown",drop:!0})},database:e}}(l),f=d.beacon,h=d.database;return e.retryBeacon={shouldRetry:!0,beacon:f,database:h}, "enabled"===r?(e.retryBeacon.shouldRetry=!1,!l.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?h.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 h.clearQueue()}},function(){return h.clearQueue()}).then(function(){e.retryBeacon.shouldRetry=!0}).catch(function(e){ae.emit("internal:error",{tags:["core-web-tracking:retry:idb"],reason:e})}):(e.retryBeacon.shouldRetry=!0, Promise.resolve())):void 0}).catch(function(e){ae.emit("internal:error",{tags:["core-web-tracking:retry:setup"],reason:e})})}var Et=function(){function e(t){d(this,e),p(this,"host",void 0),this.host=t}return h(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&&bt(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){ae.emit("internal:error",{tags:["core-web-tracking:retry:logout"],reason:e})})}},{key:"sendPayload",value:function(e,t,n,r){var i,o=this.getRetryTreatment();We()&&"control"!==o&&null!==(i=this.host.retryBeacon)&&void 0!==i&&i.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,r)}},{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){ae.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]:{},r=arguments.length>3?arguments[3]:void 0;if(!Array.isArray(t)||t.length>0){var i="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;i||!je()||"undefined"==typeof Promise?ze(e,JSON.stringify(t), {headers:n}):Qe(e,JSON.stringify(t),n,this.shouldCompressPayload()).then(function(e){null==r||r.onResult(e,t)},function(){})}}},{key:"getRetryTreatment",value:function(){var e,t,n;if(!this.host.retryConfig)return"control";var r=this.host.retryConfig.lixKey;return r?null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,r))&&void 0!==e?e:"control":"enabled"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression}}]),e}(),Tt="undefined"!=typeof window&& "undefined"!=typeof document,wt=/JSESSIONID="?([^";]+)"?/,Ct="",St=0;function kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1E4:t,r=e.regex,i=void 0===r?wt:r;if(!Ct||Date.now()-St>n){var o=Tt&&document.cookie.match(i);Ct=o&&o[1]||"",St=Date.now()}return Ct}var It=function(){function e(t){d(this,e),p(this,"networkTransporter",void 0),p(this,"inactive",void 0),p(this,"mpName",void 0),p(this,"endpoint",void 0),p(this,"debug",void 0),this.networkTransporter= new Et(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=Mt;break;case "https://www.linkedin-ei.com/li/track/validate":n=!0,t=At;break;case "https://www.linkedin-ei.com/li/track":t=At;break;default:n=!0,t=At}return{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return h(e,[{key:"fireFragment",value:function(e){if(!this.inactive){var t={"content-type":"application/json; charset\x3dUTF-8","x-li-track":JSON.stringify({mpName:this.mpName}), "csrf-token":kt(),"x-restli-protocol-version":"2.0.0"},n={fragmentEvent:e,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,n,t)}}}]),e}(),At="https://www.linkedin-ei.com/trackingMonitoring/?action\x3dsaveClientFragment",Mt="https://www.linkedin.com/trackingMonitoring/?action\x3dsaveClientFragment";function Nt(e){return"string"==typeof e}function Rt(e){return Nt(e)?e:e.topicName||e.eventName}function Lt(e){return Nt(e)?e:e.eventName}var Ot,_t,xt,Pt=function(){function e(t){var n, r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,e),p(this,"host",void 0),p(this,"cmoTransporter",void 0),p(this,"clientMonitoringInstanceId",K()),p(this,"currentContext",Ft()),p(this,"appState",{}),p(this,"estimatedFragmentSize",0),p(this,"fragmentSizeLimit",void 0),p(this,"activeFragmentEvent",void 0),p(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=r.cmoTransporter||new It(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)|| 10240,this.activeFragmentEvent=Ht(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return h(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,r=l(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.instanceId=== e)return void t(i)}}catch(e){r.e(e)}finally{r.f()}var o=this.getEventHeaders(),a=o.header,s=o.requestHeader,u={header:Object.assign(a,{memberId:-1}),requestHeader:s,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(u),this.activeFragmentEvent.stats.previousInstanceEventStats.push(u)}}, {key:"logFailedEvent",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),a=o.header,s=o.requestHeader,u={header:Object.assign(a,{memberId:-1}),requestHeader:s,instanceId:i,instanceEventNumber:r,reason:e,rawError:n,eventName:Lt(t),eventTopic:Rt(t)};this.estimatedFragmentSize+=JSON.stringify(u).length,i===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(u):this.findPreviousInstanceStat(i,function(e){e.failures.push(u)}), 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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.fragmentIsFull()){this.debounceTimer=void 0;var t=this.getEventHeaders(),n=t.header,r=t.requestHeader, i=this.activeFragmentEvent;i.header=n,i.requestHeader=r,this.cmoTransporter.fireFragment(i),this.estimatedFragmentSize=0,this.activeFragmentEvent=Ht(this.clientMonitoringInstanceId,i.fragmentNumber+1,i.firstEventNumber+i.stats.eventsGenerated,!1,t)}}},{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= Ut(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=Ut(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 Dt(e){return Ot|| (Ot=new Pt(e)),{getCurrentInstanceId:function(){return Ot.getCurrentInstanceId()},logEventGenerated:function(e){return Ot.logEventGenerated(e)},logEventReadyToSend:function(e){Ot.logEventReadyToSend(e)},logEventSent:function(e){Ot.logEventSent(e)},logPersistedEventSent:function(e,t){Ot.logEventSent(t,e)},logNetworkResponseCode:function(e){Ot.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=Ot)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e, t,n,r){Ot.logFailedEvent(e,t,n,r)},logPersistedFailedEvent:function(e,t,n,r,i){Ot.logFailedEvent(t,n,r,i,e)},flush:function(){Ot.flush()},destroy:function(){Ot=void 0},isDestroyed:function(){return void 0===Ot},setCurrentContext:function(e){Ot.setCurrentContext(e)},updateAppState:function(e){Ot.updateAppState(e)}}}function Ht(e,t,n,r,i){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:r,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:i.requestHeader,header:i.header}}function Ft(){return{pageKey:"unknown",pageInstance:X("unknown")}}function Ut(e){return Array.isArray(e)?z(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(V)}(e)? atob(e):z(function(e){return A(e)}(e))}(xt=_t||(_t={})).NONE="NONE",xt.UNKNOWN_EXECUTION_ERROR="UNKNOWN_EXECUTION_ERROR",xt.MISSING_REQUIRED_PROPERTIES="MISSING_REQUIRED_PROPERITES",xt.STORAGE_WRITE_FAILURE="STORAGE_WRITE_FAILURE",xt.RETRIES_EXCEEDED="RETRIES_EXCEEDED",xt.EVENT_EVICTED_FROM_STORAGE="EVENT_EVICTED_FROM_STORAGE",xt.STORAGE_UNAVAILABLE="STORAGE_UNAVAILABLE",xt.SERIALIZATION_FAILURE="SERIALIZATION_FAILURE";var Bt="PageViewEvent",qt=function(){function e(t){var n=this;d(this,e),p(this, "host",void 0),p(this,"queue",void 0),p(this,"preContextQueue",void 0),p(this,"debounceTimer",void 0),p(this,"unloadHandlers",void 0),p(this,"maxQueueSize",void 0),p(this,"flushDebounceTime",void 0),p(this,"trackingEventListeners",[]),p(this,"onHideHandler",function(){n.forceFlush()}),p(this,"networkTransporter",void 0),p(this,"clientMonitoringConn",void 0),p(this,"clientSequenceNumberCounter",void 0),p(this,"isTimerRunning",void 0),p(this,"enableSequenceNumberLix",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,ae.on("internal:hide",this.onHideHandler),this.networkTransporter=new Et(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=Dt(t)),this.enableSequenceNumberLix=this.isLixEnabled("tracking.data-loss-web.sequence-number"),this.enableSequenceNumberLix&&(this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(), this.isTimerRunning=!1)}return h(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var r;if(t&&!t.isDestroyed())try{if(r=JSON.parse(n),!Array.isArray(r)||0===r.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&r.forEach(function(n){var r,i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"), "drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", ");t.logFailedEvent(_t.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},s,null!==(r=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==r?r:-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 r=n[0].eventBody.header.clientMonitoringInstanceId,i=n.length;t.logPersistedEventSent(r,i)}catch(e){}}, onResult:function(e,n){var r;if(t)try{if(r=JSON.parse(n),!Array.isArray(r)||0===r.length||!r[0].eventBody.header.clientMonitoringInstanceId)return;var i=r[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(i,e.statusCode),!0===e.drop&&r.forEach(function(n){var r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", "); t.logPersistedFailedEvent(i,_t.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},s,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(Rt(e.id)));var n,r=this.host,i=r.api.Promise,o=r.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(),i.resolve(!0)):(this.flush(!0),i.resolve(!0))):(this.preContextQueue.push(t),i.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,ae.off("internal:hide",this.onHideHandler)}},{key:"forceFlush",value:function(){var e=this;this.populatePreContextQueue({pageInstance:X("unknown"),pageKey:"unknown"}).forEach(function(t){return e.queue.push(t)}),this.flush(!0)}},{key:"isLixEnabled",value:function(e){var t, n;return"enabled"===(null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,e))}},{key:"getSequenceNumberFromIDB",value:function(){var e=this;te("read").then(function(t){e.clientSequenceNumberCounter=t||0}).catch(function(e){ae.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-read"],reason:e})})}},{key:"updateSequenceNumberToIDB",value:function(){te("update",this.clientSequenceNumberCounter).catch(function(e){ae.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-update"], reason:e})})}},{key:"updateSequenceNumberOnExit",value:function(){var e=this;"undefined"!=typeof window&&"undefined"!=typeof document&&window.addEventListener("beforeunload",function t(){e.updateSequenceNumberToIDB(),window.removeEventListener("beforeunload",t)})}},{key:"prepareCompleteEnvelopeQueue",value:function(e){var t=this,n=e.meta.context=Z(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,n){var r=this.host,i=r.appId,o=r.api,a={eventBody:t,eventInfo:"string"==typeof e?{appId:i,eventName:e,topicName:e}:o.assign({appId:i},e)};return n.length>0&&this.host.api.assign(a,{clientBreadcrumbs:n}),a}},{key:"getBreadcrumbs",value:function(e){return e.clientBreadcrumbs||[]}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,r=n.appVersion,i=n.locale,o=n.api,a=o.location,s=o.document,u=o.assign,c=e.meta.context,l=c.pageKey,d=c.pageInstance, f=function(e){return"string"==typeof e?e===Bt:e.eventName===Bt}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||l,h=null;"string"!=typeof i&&null!==this.host.locale||(h=i);var p={interfaceLocale:h,pageKey:f,path:a.pathname+a.search,referer:s.referrer},m={pageInstance:d,time:e.meta.time,version:r};"number"==typeof this.clientSequenceNumberCounter&&u(m,{clientGlobalSequenceNumber:this.clientSequenceNumberCounter});var v={header:u(m,e.meta.header||{}),requestHeader:u(p,e.meta.requestHeader|| {})},g=e.meta.clientMonitoringInstanceId,y=e.meta.clientMonitoringInstanceEventNumber;return g&&u(v.header,{clientMonitoringInstanceId:g,clientMonitoringInstanceEventNumber:y}),u(e.body,v)}},{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(){t.forceFlush()},{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.enableSequenceNumberLix&&"undefined"!=typeof window&&!1===this.isTimerRunning&&(this.isTimerRunning=!0,setInterval(function(){e.updateSequenceNumberToIDB()},5E3)),this.queue=[];var n,r,i=[],o=[];t.forEach(function(t){var n=e.getGenericEventBody(t),r=e.getBreadcrumbs(t),a=e.envelop(t.id,n,r);e.trigger(a,t.meta);var s=a.eventInfo.eventName;"LixTreatmentsEvent"=== s||"JavaScriptErrorEvent"===s?i.push(a):o.push(a),e.enableSequenceNumberLix&&"number"==typeof e.clientSequenceNumberCounter&&e.clientSequenceNumberCounter++}),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(i.length+o.length),r=this.clientMonitoringConn,n={onResult:function(e,t){r&&!r.isDestroyed()&&(e.statusCode&&r.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach(function(t){var n=t.eventInfo.eventName,i=t.eventInfo.topicName||n,o="rawError"in e? e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(o)].join(", ");null==r||r.logFailedEvent(_t.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:i},a,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)}))}}),this.networkTransporter.sendPayloadFireForget(this.host.endpoint,i,void 0,n),this.networkTransporter.sendPayload(this.host.endpoint,o,void 0,n))}}}]),e}();var jt,Wt=function(){function e(t,n){d(this, e),this.clientBreadcrumbType=t,this.id=n}return h(e,[{key:"builder",get:function(){return function(){var e={},t=new Proxy({},{get:function(n,r){return"build"===r?function(){return e}:function(n){return e[r.toString()]=n,t}}});return t}().id(this.id).clientBreadcrumbType(this.clientBreadcrumbType)}}],[{key:"toPointer",value:function(e){return{id:e.id,type:e.clientBreadcrumbType}}}]),e}();function zt(e){if(!e)return{};var t=e.trk,n=!1,r=e.licu&&decodeURIComponent(e.licu);e.external_control&&(r="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)), n=!0);var i=e.lipi&&Y(e.lipi),o=i&&{pageInstance:i,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var a=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(a),trackingId:e.external_page_instance},pageKey:a},n=!0}var s=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 s&&((o=o||{}).applicationInstance= s),{fromExternalApp:n||!!s,previousApplicationInstance:s,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:r}}function Kt(e){return"retryConfig"in e.host}!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION"}(jt||(jt={}));!function(){function e(t,n){var r,i;if(d(this,e),p(this,"transporter",void 0),p(this,"delegate",void 0),p(this,"currentContext",void 0),p(this,"appState",void 0),p(this,"previousAppContext", void 0),p(this,"customTransporters",void 0),p(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 a=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[o]=new qt(this.transporter.host.api.assign(a,n.customTransporterHosts[o]))}"enabled"===(null===(r=(i=t.host).__getLixTreatment)|| void 0===r?void 0:r.call(i,"pemberly.tracking.monitoring"))&&t.host.clientMonitoringConfig&&!t.host.inactive&&"location"in t.host.api&&(this.clientMonitoringConn=Dt(t.host))}h(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){Kt(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=Kt(this.transporter)?this.transporter.clearPersistedEventsOnLogout(): null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return Z(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]:{},r=this.navMetaFromSeed(e,zt(t));if(this.setCurrentContext(r.to),!n.suppressEventsFiring)return this.fireNavEvents(r)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext= Z(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(Z(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,r,i){return this.fireEvent("ControlInteractionEvent",function(n){var o=Q(n.pageKey,e),a={controlTrackingId:r,controlUrn:o,interactionType:t};return i&&i(o),a},{context:n})}},{key:"fireEvent",value:function(e, t,n,r){if(!t){var i=Rt(e),o=void 0===t?"undefined":null===t?"null":y(t),a='Firing tracking event "'.concat(i,'" with invalid body, you fired "').concat(o,'"');if(this.clientMonitoringConn){var s=this.clientMonitoringConn.logEventGenerated(i);this.clientMonitoringConn.logFailedEvent(_t.MISSING_REQUIRED_PROPERTIES,e,a,s)}throw new Error(a);}var u=r||[];if(u.length>0){var c=u.map(function(e){return Wt.toPointer(e)});this.host.api.assign(t,{clientBreadcrumbPointers:c})}var l=u.length>0?this.generateEnvelopeWithBreadcrumbs(e, t,n,u):this.generateEnvelope(e,t,n);return this.fireEnvelope(l)}},{key:"generateEnvelopeWithBreadcrumbs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=this.generateEnvelope(e,t,n),o=r.length>0?this.addBreadcrumbsToEnvelope(i,r):i;return o}},{key:"addBreadcrumbsToEnvelope",value:function(e,t){var n=t.map(function(e){var t=e;return delete t.clientBreadcrumbType,t});return this.host.api.assign(e,{clientBreadcrumbs:n}), e}},{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(Nt(e.id)){var r=e.id;e.id={eventName:r,topicName:r,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var i=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(i){var o=i.meta.transporterKey,a=o?this.customTransporters[o]:this.transporter;if(!a&&o){var s=Rt(i.id),u="Could not find custom transporter: ".concat(o); if(this.clientMonitoringConn){var c=this.clientMonitoringConn.logEventGenerated(s);this.clientMonitoringConn.logFailedEvent(_t.UNKNOWN_EXECUTION_ERROR,i.id,u,c)}throw new Error(u);}return a.fireEvent(i)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return X(e,t)}},{key:"firePVE",value:function(e,t,n){var r={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},i=this.host.api.assign(r,t),o=this.generateEnvelope("PageViewEvent", i,{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),ae.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 Q((t||this.currentContext||{pageKey:"unknown"}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,r){var i={controlTrackingId:r,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",i,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,r=e.from;return{previousPageInstance:r&&r.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 r=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:r,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,r=e.from,i=e.navEventId,o=this.generateEnvelope(i,t);o.meta.requestHeader.pageKey=n.pageKey;var a=r&&r.applicationInstance;return a&&(o.meta.header.clientApplicationInstance=a),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]:{},r={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&Z(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:r}}}])}();function Vt(e){return e.split("").reduce(function(e,t){return(e<<5)-e+t.charCodeAt(0)|0},0)}!function(){function e(t,n){var r,i=this;d(this,e),p(this,"core",void 0), p(this,"protocol",void 0),p(this,"throttleKeySet",new Set),p(this,"config",void 0),p(this,"reportTransporterError",function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),i.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!==(r=null==n?void 0:n.throttleTime)&&void 0!==r?r:100},ae.on("internal:error",this.reportTransporterError)} h(e,[{key:"reportError",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callTreeId,a=void 0===o?"":o,s=i.responseHeaders,u=void 0===s?{}:s,c=e.message,l=e.name,d=e.stack,f=void 0===d?"":d,h=e.fileName,p=void 0===h?"":h,m=e.lineNumber,v=void 0===m?0:m,g=e.columnNumber,y=void 0===g?0:g,b=this.core.host,E=b.appId,T=b.appVersion,w=b.service,C=b.serviceInstance,S=b.treeID,k=void 0===S?"":S,I=b.api, A=I.Promise,M=I.location,N=M.host,R=M.pathname,L=M.search,O=M.hash,_=void 0===O?"":O;if(u){t={};var x=new Map;Object.keys(u).forEach(function(e){x.set(e.toLowerCase(),u[e])}),t.callTreeId=x.get("x-li-uuid"),t.microsoftEdgeReference=x.get("x-msedge-ref"),t.pointOfPresenceId=x.get("x-li-pop"),t.fabric=x.get("x-li-fabric")}var P=function(){return n.core.fireEvent("JavaScriptErrorEvent",function(e){return{appId:E,e:{c:y,l:v,m:c,s:f,t:l,u:p},h:_,l:n.protocol,o:N,p:R,pageKey:e.pageKey,q:L,service:w,serviceInstance:C, serviceVersion:T,t:r,trackingID:e.pageInstance.trackingId,treeID:k,callTreeId:a,responseTraceHeaders:t}})};if(this.config.throttleTime<0)return P();var D=Vt(l+c+f+r.join("")+a);return this.throttleKeySet.has(D)?A.resolve(!1):(this.throttleKeySet.add(D),setTimeout(function(){return n.throttleKeySet.delete(D)},this.config.throttleTime),P())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),ae.off("internal:error",this.reportTransporterError)}}])}(); var Gt,Xt,Qt,Jt=function(){function e(){d(this,e),p(this,"userTimingEntries",[]),p(this,"longTasks",[]),p(this,"resourceTimingEntries",[]),p(this,"cdnData",void 0)}return h(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(Zt),cdnData:this.cdnData}}}]),e}(),Yt=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function Zt(e){return Yt.reduce(function(t,n){var r=e[n];return void 0!== r&&(t[n]=r),t},{})}function $t(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};Xt=Object.assign(Object.assign({},n),t),Qt=function(e,t){return e.nodeType===Node.DOCUMENT_NODE? e:e===t.root?e.ownerDocument:e}(Xt.root,n);var r=en(e,Gt.All,function(){return en(e,Gt.Two,function(){return en(e,Gt.One)})});if(r){var i=ln(function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},i=[];if(t.length>2&&t.length>Xt.optimizedMinLength)for(var o=1;oXt.maxNumberOfTries)return i;r.counter+=1;var a=m(t);a.splice(o,1);var s=nn(a);if(r.visited.has(s))return i;on(a)&&dn(a,n)&&(i.push(a),r.visited.set(s,!0),i=i.concat(e(a, n,r)))}return i}(r,e));return i.length>0&&(r=i[0]),nn(r)}throw new Error("Selector was not found.");}function en(e,t,n){for(var r=null,i=[],o=e,a=0,s=function(){var e=un(function(e){var t=e.getAttribute("id");return t&&Xt.idName(t)?{name:"#"+gn(t,{isIdentifier:!0}),penalty:0}:null}(o))||un.apply(void 0,m(function(e){return Array.from(e.attributes).filter(function(e){return Xt.attr(e.name,e.value)}).map(function(e){return{name:"["+gn(e.name,{isIdentifier:!0})+'\x3d"'+gn(e.value)+'"]',penalty:.5}})}(o)))|| un.apply(void 0,m(function(e){return Array.from(e.classList).filter(Xt.className).map(function(e){return{name:"."+gn(e,{isIdentifier:!0}),penalty:1}})}(o)))||un(function(e){var t=e.tagName.toLowerCase();return Xt.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],s=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(o);if(t===Gt.All)s&&(e=e.concat(e.filter(sn).map(function(e){return an(e, s)})));else if(t===Gt.Two)e=e.slice(0,1),s&&(e=e.concat(e.filter(sn).map(function(e){return an(e,s)})));else if(t===Gt.One){var u=c(e=e.slice(0,1),1)[0];s&&sn(u)&&(e=[an(u,s)])}var d,f=l(e);try{for(f.s();!(d=f.n()).done;)d.value.level=a}catch(e){f.e(e)}finally{f.f()}if(i.push(e),i.length>=Xt.seedMinLength&&(r=tn(i,n)))return"break";o=o.parentElement,a++};o&&o!==Xt.root.parentElement&&"break"!==s(););return r||(r=tn(i,n)),r}function tn(e,t){var n=ln(function e(t){var n=arguments.length>1&&void 0!== arguments[1]?arguments[1]:[];if(t.length>0){var r,i=[],o=l(t[0]);try{for(o.s();!(r=o.n()).done;){var a=r.value;i=i.concat(e(t.slice(1,t.length),n.concat(a)))}}catch(t){o.e(t)}finally{o.f()}return i}return[n]}(e));if(n.length>Xt.threshold)return t?t():null;var r,i=l(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(on(o))return o}}catch(e){i.e(e)}finally{i.f()}return null}function nn(e){for(var t=e[0],n=t.name,r=1;r0?r:null}function cn(e){return null!=e}function ln(e){return Array.from(e).sort(function(e,t){return rn(e)-rn(t)})}function dn(e,t){return Qt.querySelector(nn(e))===t}!function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(Gt||(Gt={}));var fn,hn=/[ -,\.\/:-@\[-\^`\{-~]/,pn=/[ -,\.\/:-@\[\]\^`\{-~]/,mn=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,vn={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1}; function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},vn),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var r="double"==n.quotes?'"':"'",i=n.isIdentifier,o=e.charAt(0),a="",s=0,u=e.length;s126){if(l>=55296&&l<=56319&&s1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n, r=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(r+n)}return Date.now()}function bn(e){var t=e||performance;return Math.round(t.now())}function En(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return $t(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=En(e.parentElement||void 0);return"".concat(t," \x3e nodeType(").concat(e.nodeType,")")}function Tn(e,t,n){var r=[];return e&&"function"==typeof e.getEntriesByType&& (t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach(function(e){r.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})}),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach(function(e){r.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})}),n&&(e.clearMeasures(),e.clearMarks())),r}function wn(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}var Cn,Sn=function(){function e(t){d(this,e),p(this,"hostApis", void 0),p(this,"hostnameProperties",void 0),p(this,"usedHostnames",void 0),p(this,"abortController",void 0),p(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 h(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return ee(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,r=n.AbortController,i=n.Promise,o=$(ee(this.pendingPromises),i),a=setTimeout(function(){t.abortController.abort(),t.abortController=new r},e);return o.then(function(){return clearTimeout(a),t.getPresentData()})}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,r,i=this.hostApis.assign,o=(n=e.name,r=this.hostApis.document, (fn=fn||r.createElement("a")).href=n,fn.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var a=this.fetchCdnFromUrl(e.name).then(function(e){var n=i({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(a),n});this.pendingPromises.add(a)}}}},{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,r,i){d(this,e),p(this,"hostApis",void 0),p(this,"statics",void 0),p(this,"options",void 0),p(this,"allowTimingOrigin",void 0),p(this,"collectResourceTimings", void 0),p(this,"collectCdnData",void 0),p(this,"perfObserver",void 0),p(this,"renderTimings",new Map),p(this,"urlToTreeId",new Map),p(this,"cdnDataProvider",void 0),p(this,"observables",new Jt),this.hostApis=t,this.statics=n,this.options=r,this.allowTimingOrigin=i,this.collectResourceTimings=r["enable-rs-timing"],this.collectCdnData=r["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Sn(t))}return h(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e, t){return(fn=fn||t.createElement("a")).href=e,fn.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:yn(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||yn(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;null===(e=this.perfObserver)||void 0===e||e.disconnect(),this.reset()}},{key:"collect",value:function(e){var t=this,n=e.isInitial,r=e.immediate,i=this.collectSynchronousData(n);if(r)return i;var o=this.collectAsynchronousData();return"then"in o?o.then(function(e){return(0, t.hostApis.assign)(i,e),i}):i}},{key:"reset",value:function(){var e;this.observables.reset(),null===(e=this.cdnDataProvider)||void 0===e||e.clearUsedHostnames()}},{key:"collectSynchronousData",value:function(e){var t=this.hostApis,n=t.assign,r=t.PerformanceObserver,i=Object.create(null);return this.statics.pageLoadMode=e?"INITIAL":"PARTIAL",r||(this.observables.userTimingEntries=Tn(this.hostApis.performance,this.options,!0),this.collectResourceTimings&&this.processNewResourceTimings()),this.observables.attachTreeIds(this.urlToTreeId), this.urlToTreeId.clear(),n(i,this.observables.getData(),this.snapshot,this.statics),e&&n(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 r=e.timing,i=e.navigation;return r&&i?(t.navigationTimingApi=!0,In.forEach(function(e){e in r&&(t[e]=r[e])}),t.navigationType=i.type,t.redirectCount=i.redirectCount):t.navigationTimingApi=!1,t}(this.hostApis.performance)),n(i,this.collectAsynchronousData(!0)),i}},{key:"collectAsynchronousData",value:function(e){var t=this,n={cdnData:[],usedCDN:this.extractUsedCDN([])};if(e){if(this.collectCdnData){var r=this.cdnDataProvider.getPresentData(); n.cdnData=r,n.usedCDN=this.extractUsedCDN(r)}return n}var i=[];return this.collectCdnData&&i.push(this.cdnDataProvider.getDataWhenReady(this.options["async-plugins-timeout"]).then(function(e){n.cdnData=e,n.usedCDN=t.extractUsedCDN(e)})),i.length>0?$(i,Promise).then(function(){return n}):n}},{key:"setupPerformanceObserver",value:function(e){var t=this;this.perfObserver=new e(function(e){e.getEntries().forEach(function(e){var n=e.entryType,r=e.name,i=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e): "mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:r,startTime:i,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:r,startTime:i,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:r,startTime:i})})}),this.observables.userTimingEntries=Tn(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{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:wn(this.renderTimings),networkInformationMetrics:An(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),In=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart", "connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function An(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"}(Cn||(Cn={}));var Mn=(p(r={},"web-ui-framework","EMBER"),p(r,"app-id","linkedin.rum.tracking"),p(r,"app-version","unknown"),p(r,"is-single-page-app",!0),p(r,"user-timing-mark-enabled",!1), p(r,"user-timing-measure-enabled",!0),p(r,"beacon-source","apps"),p(r,"enable-rs-timing",!0),p(r,"enable-cdn-tracking",!1),p(r,"async-plugins-timeout",5E3),p(r,"beacon-timeout",3E4),p(r,"enable-memory-measurement",!1),p(r,"pageKeyPrefix",""),r),Nn=function(){function e(t,n,r){d(this,e),p(this,"featureName",void 0),p(this,"trackingCore",void 0),p(this,"rumConfig",void 0),p(this,"observing",!1),p(this,"basePageTreeId",void 0),p(this,"startPageInstance",void 0),p(this,"startMemory",void 0),p(this,"reportTimeouts", []),this.featureName=t,this.trackingCore=n,this.rumConfig=r}return h(e,[{key:"startObserving",value:function(){var t,n=this,r=this.getMemory();r&&!this.observing&&(this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance)||X("unknown"),this.startMemory=r,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:bn(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]}}),r=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(r<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(r)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();p(Nn,"checkpoints",[1,3,10,30,90,180,300]);var Rn,Ln,On,_n,xn,Pn=h(function e(t,n,r){d(this,e),p(this, "webUIFramework",void 0),p(this,"timeSource",void 0),p(this,"isSinglePageApp",void 0),p(this,"appRenderMode",void 0),p(this,"isAppRenderFailed",void 0),p(this,"pageLoadMode","INITIAL"),p(this,"isSSL",void 0),p(this,"treeId",void 0),p(this,"isFromServiceWorker",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:"=== r.api.location.protocol?1:0,this.treeId=r.treeID,this.isFromServiceWorker=r.isFromServiceWorker}),Dn=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)}},Hn=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){}},Fn=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Un=function(e){addEventListener("pageshow",function(t){t.persisted&&e(t)},!0)},Bn=function(e,t,n){var r;return function(i){t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},qn=-1,jn= function(){return"hidden"===document.visibilityState?0:1/0},Wn=function(){Fn(function(e){var t=e.timeStamp;qn=t},!0)},zn=function(){return qn<0&&(qn=jn(),Wn(),Un(function(){setTimeout(function(){qn=jn(),Wn()},0)})),{get firstHiddenTime(){return qn}}},Kn=!1,Vn=-1,Gn=function(e,t){Kn||(function(e,t){var n,r=zn(),i=Dn("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime-1&&e(t)},i=Dn("CLS",0),o=0,a=[],s=function(e){if(!e.hadRecentInput){var t=a[0],r=a[a.length-1];o&&e.startTime-r.startTime<1E3&&e.startTime-t.startTime<5E3?(o+=e.value,a.push(e)): (o=e.value,a=[e]),o>i.value&&(i.value=o,i.entries=a,n())}},u=Hn("layout-shift",s);u&&(n=Bn(r,i,t),Fn(function(){u.takeRecords().map(s),n(!0)}),Un(function(){o=0,Vn=-1,i=Dn("CLS",0),n=Bn(r,i,t)}))},Xn={passive:!0,capture:!0},Qn=new Date,Jn=function(e,t){Rn||(Rn=t,Ln=e,On=new Date,$n(removeEventListener),Yn())},Yn=function(){if(Ln>=0&&Ln1E12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Jn(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Xn),removeEventListener("pointercancel",r,Xn)};addEventListener("pointerup",n,Xn),addEventListener("pointercancel",r,Xn)}(t,e):Jn(t,e)}},$n=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,Zn,Xn)})},er=function(e,t){var n, r=zn(),i=Dn("FID"),o=function(e){e.startTime0&&(n=i[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),sr=!1,ur=[],cr={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function lr(){var e=!0===window.__test__resetWebVitalsState;if(!sr||e){e&&(ur=[]),rr.forEach(dr);var t=Symbol(); xn=t,[nr,er,Gn].forEach(function(e){return e(fr.bind(null,t),!0)}),[nr,er,Gn].forEach(function(e){return e(hr.bind(null,t))}),sr=!0}}function dr(e){or[e]={name:e,value:-1,updateHistory:[]};var t=cr[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(or[e].value=-2)}function fr(e,t){if(e===xn){var n=or[t.name],r=bn();n&&(n.updateHistory.push({time:r,data:t}),n.value=t.value),ur.forEach(function(e){return e(t, r,!1)})}}function hr(e,t){e===xn&&ur.forEach(function(e){return e(t,bn(),!0)})}var pr=function(){function e(t,n){d(this,e),p(this,"basePageTreeId",void 0),p(this,"basePageKey",void 0),p(this,"observing",!1),p(this,"appContextMap",new Map),p(this,"rumConfig",void 0),p(this,"trackingCore",void 0),this.trackingCore=t,this.rumConfig=n}return h(e,[{key:"startObserving",value:function(){var e,t,n=this;lr(),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",rr.forEach(function(e){var t;-2===(null===(t=or[e])||void 0===t?void 0:t.value)&&n.reportMetric(e)}),t=this.onMetricUpdate.bind(this),ur.push(t))}},{key:"stopObserving",value:function(){this.observing=!1}},{key:"onMetricUpdate",value:function(e,t,n){var r;this.observing&&(n?this.reportMetric(e.name):this.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(r=this.trackingCore.getCurrentContext())|| void 0===r?void 0:r.pageKey}))}},{key:"reportMetric",value:function(e){var t=or[e],n={name:ir[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var r=or[e];if(r){var i=function(e,t,n,r,i){var o={basePageTreeId:e,basePageKey:t,basePageUrl:ar},a=null;switch(n.name){case "LCP":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var r=e.updateHistory[e.updateHistory.length-1],i=r.data.entries,o=i[i.length-1],a={pageKey:(null===(n=t.get(r.time))||void 0===n?void 0:n.pageKey)|| "_unknown",element:En(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(a.url=o.url),a}(n,r);break;case "FID":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var r=e.updateHistory[e.updateHistory.length-1],i=r.data.entries,o=i[i.length-1];return{pageKey:(null===(n=t.get(r.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:En(o.target)}}(n, r);break;case "CLS":a=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 r=n.reduce(function(e,t){return e&&e.value>t.value?e:t}),i=e.updateHistory.find(function(e){return e.data.entries.includes(r)}),o=null;r&&r.sources&&r.sources.length&&(o=r.sources.reduce(function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t}));var a,s=t.get(i.time); return o&&s?{shiftCount:n.length,"largestShift.value":r.value,"largestShift.hadRecentInput":r.hadRecentInput,"largestShift.largestSource.node":En(null===(a=o)||void 0===a?void 0:a.node),"largestShift.pageKey":s.pageKey||"_unknown","largestShift.url":s.url,"largestShift.startTime":Math.round(r.startTime)}:null}(n,r)}if(a){var s={};return i(s,o,a),s}return o}(this.basePageTreeId,this.basePageKey,r,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach(function(n){var r= e[n];t[n]="string"==typeof r?r:JSON.stringify(r)}),t}(i)}var o={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},o)}}]),e}(),mr=(function(){function e(t,n,r){var i,o;d(this,e),p(this,"core",void 0),p(this,"config",void 0),p(this,"collector",void 0),p(this,"boomerangStart",-1),p(this,"webVitalsObserver",void 0),p(this,"appMemoryObserver",void 0),p(this,"pageMemoryObserver", void 0),p(this,"liveTokens",new Set),p(this,"stateWM",new WeakMap),p(this,"activeToken",void 0),p(this,"isInitial",void 0),p(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),this.core=r,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(r.host.api.assign({},Mn),n);var a="enabled"===(null===(i=(o=this.core.host).__getLixTreatment)||void 0===i?void 0:i.call(o,"pemberly.tracking.time-origin-epoch-time"));this.collector=new kn(r.host.api,new Pn(t,this.config, r.host),this.config,a),this.collector.startObserving(),ae.before("internal:hide",this.beforeHideHandlerBound)}h(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,r;this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(), this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var i,o=Object.create(null),a="enabled"===(null===(e=(t=this.core.host).__getLixTreatment)||void 0===e?void 0:e.call(t,"pemberly.tracking.time-origin-epoch-time"));return this.activeToken=o,this.liveTokens.add(o),this.stateWM.set(o,{isInitial:this.isInitial,startTime:yn(this.core.host.api.performance,a)}),(this.config["enable-memory-measurement"]||"enabled"===(null===(n=(r=this.core.host).__getLixTreatment)||void 0===n? void 0:n.call(r,"pemberly.tracking.rum-memory-measurement")))&&(null===(i=this.pageMemoryObserver)||void 0===i||i.stopObserving(),this.pageMemoryObserver=new Nn("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new Nn("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),o}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new pr(this.core, this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;if(e&&this.activeToken&&this.activeToken===e){var a=this.stateWM.get(e),s="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time")),u=yn(this.core.host.api.performance,s);a.endProps={renderCompleteTime:u,isImpactedByHiddenWindow:i, rumKey:o};var c=this.activeToken;a.fireRumEventTimeout=setTimeout(function(){var e=r.collector.collect({isInitial:a.isInitial});"then"in e?e.then(function(e){r.fireRumEvent(e,c)}):r.fireRumEvent(e,c)},this.config["beacon-timeout"]),this.activeToken=void 0}else ae.emit("internal:error",{tags:["core-web-tracking:rum:end"],reason:new Error("RUM end: rum token passed is invalid")})}},{key:"destroy",value:function(){var e,t,n;ae.offBefore("internal:hide",this.beforeHideHandlerBound),this.activeToken&& this.abort(this.activeToken),this.flushEndedSessions(),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()}},{key:"abort",value:function(e){var t;if(!e||this.activeToken!==e)throw new Error("RUM abort: rum token passed is invalid");if(null!==(t=this.stateWM.get(e))&&void 0!==t&&t.endProps)throw new Error("RUM abort: Can't abort a session that was already ended"); this.activeToken=void 0,this.stateWM.delete(e),this.liveTokens.delete(e)}},{key:"flushEndedSessions",value:function(){var e=this;this.liveTokens.forEach(function(t){var n=e.stateWM.get(t);if(n.endProps){var r=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(r,t)}})}},{key:"fireRumEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,r=this.stateWM.get(t),i=r.startTime,o=r.endProps;if(o){var a=o.renderCompleteTime,s=o.isImpactedByHiddenWindow,u= o.rumKey,c=this.boomerangStart=e.navigationStart||this.boomerangStart,l=e.navigationStart||i,d=a-l,f=this.config["app-version"];this.core.fireEvent({appId:this.config["app-id"],eventName:"RealUserMonitoringEvent"},function(t){return n({pageKey:u||t.pageKey,isImpactedByHiddenWindow:s,appVersion:f,timeDone:d,navigationStart:l,boomerangStart:c,renderCompleteTime:a},e)}),r.fireRumEventTimeout&&clearTimeout(r.fireRumEventTimeout),this.liveTokens.delete(t),this.stateWM.delete(t)}else this.abort(t)}}},{key:"beforeHideHandler", value:function(){this.flushEndedSessions()}}])}(),"undefined"!=typeof window&&"undefined"!=typeof performance),vr="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");!function(){function e(t,n){d(this,e),p(this,"featureKey",void 0),p(this,"productName",void 0),p(this,"endPageInstance",void 0),p(this,"startPageInstance",void 0),p(this,"isCanceled",!1),p(this,"featureIdentifier",void 0),p(this,"name",void 0),p(this,"startTime",void 0),p(this,"duration",void 0),p(this,"marks", []),p(this,"spanStarts",new Map),p(this,"spans",[]),p(this,"isSpanContainer",!1),p(this,"basePageTreeId",void 0),p(this,"isClosed",!1),this.featureKey=t,this.productName=n;var r=n?"::".concat(n):"";this.featureIdentifier="".concat(t).concat(r),this.name=t}h(e,[{key:"start",value:function(e){this.startPageInstance=e,mr&&(this.startTime=bn(),vr&&performance.mark("LI:".concat(this.featureIdentifier,"-start")))}},{key:"mark",value:function(e){mr&&(this.marks.push({name:e,startTime:bn()}),vr&&(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){mr&&(this.spanStarts.set(e,bn()),vr&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(mr&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:bn()- n}),vr&&(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,mr&&(this.duration=bn()-this.startTime,vr&&!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(mr){var e={name:this.featureKey,startTime:this.startTime,duration:this.isSpanContainer?-1:this.duration,basePageTreeId:this.basePageTreeId,startPageInstance:this.startPageInstance||X("unknown"),marks:this.marks,spans:this.spans}; return this.productName&&(e.productName=this.productName),e}}},{key:"check",value:function(){if(mr){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=0&&n.item(t)!==r;);while(t<0&&(r=r.parentElement));return r}),!ArrayBuffer.prototype.slice){var wr=function(e,t){return(e= 0|e||0)<0?Math.max(e+t,0):Math.min(e,t)};ArrayBuffer.prototype.slice=function(e,t){var n=this.byteLength,r=wr(e,n),i=n;if(void 0!==t&&(i=wr(t,n)),r>i)return new ArrayBuffer(0);var o=i-r,a=new ArrayBuffer(o),s=new Uint8Array(a),u=new Uint8Array(this,r,o);return s.set(u),a}}if("classList"in document.createElement("_")){var Cr=document.createElement("_");if(Cr.classList.toggle("c1",!0),!Cr.classList.contains("c1")){var Sr=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:Sr.call(this,e)}}}var kr=Function.bind.call(Function.call,Array.prototype.reduce),Ir=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),Ar=Function.bind.call(Function.call,Array.prototype.concat),Mr=Reflect.ownKeys;Object.values||(Object.values=function(e){return kr(Mr(e),function(t,n){return Ar(t,"string"==typeof n&&Ir(e,n)?[e[n]]:[])},[])}),window.addEventListener("load",function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&& arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n?n.querySelector("#"+e):document.getElementById(e);if(r){var i=r.firstChild.nodeValue;return t&&r.parentNode.removeChild(r),i&&JSON.parse(i)}}("isIOSDeepLinkFixEnabled"),t=document.querySelector(".ios.safari");e&&t&&Tr()}),window.requestIdleCallback||(window.requestIdleCallback=function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)})}]);