/*! For license information please see cccb61f55ca59f.js.LICENSE.txt */ (self.bxpChunk=self.bxpChunk||[]).push([[7250],{38031:(e,t,r)=>{"use strict";r.d(t,{n:()=>i});const n="fedramp-moderate";function i(){var e,t;const r=globalThis,i=r.MICROS_PERIMETER||r.UNSAFE_ATL_CONTEXT_BOUNDARY;if(i)return i===n;const s=null===(e=r.location)||void 0===e||null===(t=e.hostname)||void 0===t?void 0:t.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return!!s&&s.length>0}},75977:(e,t,r)=>{"use strict";r.d(t,{t:()=>d,G:()=>u});const n={LayoutShift:"layout-shift",LongTask:"longtask"},i=50;var s=r(4942);class o{constructor(e=1e3){(0,s.Z)(this,"buffer",[]),(0,s.Z)(this,"full",!1),this.maxLength=e}push(e){(this.full||this.maxLength===this.buffer.length)&&(this.full=!0,this.buffer.shift()),this.buffer.push(e)}getAll(){return this.buffer}}const a={[n.LongTask]:new o,[n.LayoutShift]:new o};let c=null;function l(){return"function"!=typeof PerformanceObserver?null:(null!==c||(c=new PerformanceObserver((e=>{e.getEntries().forEach((e=>{e.entryType===n.LayoutShift&&a[n.LayoutShift].push(e),e.entryType===n.LongTask&&a[n.LongTask].push(e)}))}))),c)}function u(){var e,t;null===(e=l())||void 0===e||e.observe({type:n.LayoutShift,buffered:!0}),null===(t=l())||void 0===t||t.observe({type:n.LongTask,buffered:!0})}function d({start:e,stop:t}){const r=function(e,t,r){return r.getAll().filter((r=>r.startTime<=t&&r.duration>i&&(r.startTime>=e||r.startTime+r.duration>=e||r.startTime<=e&&r.startTime+r.duration>=t))).reduce(((r,n)=>{const s=n.startTime+n.duration,o=Math.max(n.startTime+i,e),a=Math.min(s,t),c=Math.max(a-o,0);return r.observed+=n.duration-i,r.total+=c,r}),{total:0,observed:0})}(e,t,a[n.LongTask]),s=function(e,t,r){const n=r.getAll().filter((r=>r.startTime>=e&&r.startTime<=t)),i=[];let s=null;for(const e of n){const{startTime:t}=e,r=e.startTime+e.duration,n=e.value;null===s||t-s.endTime>1e3||r-s.startTime>5e3?(s={startTime:t,endTime:r,score:n},i.push(s)):(s.endTime=r,s.score+=n)}const o=i.reduce(((e,t)=>t.score>e?t.score:e),0);return Math.round(1e4*o)/1e4}(e,t,a[n.LayoutShift]);return{"metric:tbt":Math.round(r.total),"metric:tbt:observed":Math.round(r.observed),"metric:cls":s}}},58240:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function(e){return 0!==e&&(1===e||Math.random()*e<=1)}},65711:(e,t,r)=>{"use strict";let n;function i(e){n=e}function s(){return n}function o(e,t){try{if(!n)return 0;const{killswitch:r,rates:i,rules:s,kind:o,autoGeneratedRate:a}=n;if(null!=r&&r.includes(e))return 0;if(null!=i&&null!=i[e])return i[e];if(null!=s)for(let t=0;tu,IO:()=>i,MK:()=>o,g6:()=>l,iE:()=>s,sc:()=>d,tJ:()=>h,x2:()=>a,xe:()=>c})},20629:(e,t,r)=>{"use strict";r.d(t,{Gs:()=>h,T$:()=>l,Z3:()=>d,sA:()=>u});var n=r(4942),i=r(30690),s=r(182);const o=[];let a=(e,t)=>{o.push({interactionId:e,data:t})};function c(){o.length=0}function l(e){!function(e){for(const{interactionId:t,data:r}of o)e(t,r);c(),a=e}(e)}function u(e,t,r=performance.now()){t.ufoName&&(t.end=r,function(e,t){a(e,t)}(e,t),c())}const d=new class{constructor(){(0,n.Z)(this,"vcObserver",null)}initialize(e){return null===this.vcObserver&&(this.vcObserver=new s.D({...e,isPostInteraction:!0})),this}start({startTime:e}){var t;null===(t=this.vcObserver)||void 0===t||t.start({startTime:e})}};async function h(e){if(d.vcObserver){var t,r;const n="ufo-experimental",s=await d.vcObserver.getVCResult({start:e.start,stop:e.end,tti:null===(t=e.apdex)||void 0===t||null===(r=t[0])||void 0===r?void 0:r.stopTime,isEventAborted:!!e.abortReason,prefix:n,vc:e.vc}),o=null==s?void 0:s["metrics:vc"];if(!o||null==s||!s[`${n}:vc:clean`])return s;const a=(0,i.o)(e.start,e.end);return e.abortReason||"visible"!==a?s:{...s,"metric:experimental:vc90":o[90]}}return null}},99306:(e,t,r)=>{"use strict";r.d(t,{G6:()=>s,aU:()=>i,uO:()=>o});const n={context:null};function i(e,t){var r,i,s;r=e.replace(/-/g,""),i=Array.from(new Array(16),(()=>Math.floor(16*Math.random()).toString(16))).join(""),s=t,n.context={traceId:r,spanId:i,type:s}}function s(){return n.context||void 0}function o(){n.context=null}},30690:(e,t,r)=>{"use strict";r.d(t,{i:()=>h,o:()=>p});var n=r(39728);const i=[];let s,o=!1;function a(){return"visibilityState"in document?"hidden"===document.visibilityState:document.hidden}const c=50;let l=0;function u(e,t){i[l]={time:null!=t?t:performance.now(),hidden:e},l=(l+1)%c,s=e}function d(){const e=a();e?(s||u(e),s=!0):(s&&u(e),s=!1)}function h(){o||(u(a(),0),(0,n.ak)(window,{type:"pageshow",listener:d}),(0,n.ak)(window,{type:"pagehide",listener:d}),(0,n.ak)(document,{type:"visibilitychange",listener:d}),o=!0)}function p(e,t){if(0===i.length)return"visible";const r=i.length;let n="mixed",s=l,o=l;for(let n=0;n{"use strict";r.d(t,{B5:()=>o,Qe:()=>i,ZP:()=>s});var n=r(67294);const i={current:null},s=(0,n.createContext)(i),o=()=>i},65438:(e,t,r)=>{"use strict";r.d(t,{JG:()=>G,vj:()=>H,kT:()=>K,hz:()=>C,Hc:()=>A,Sj:()=>N,eA:()=>M,lH:()=>P,cV:()=>W,u_:()=>L,gB:()=>q,ui:()=>Q,I_:()=>k,pK:()=>_,uJ:()=>X,oH:()=>g,OB:()=>D,xz:()=>Y,lE:()=>U,LZ:()=>F,qX:()=>$,v3:()=>T});var n=r(55877),i=r(58240),s=r(65711),o=r(20629),a=r(99306);const c=new Map,l=new Map;var u=r(81687),d=r(55537);const h=new Map;var p=r(4942),m=r(182);const f={name:void 0,isAborted:void 0},g=new class{constructor(){(0,p.Z)(this,"lastInteractionFinish",null),(0,p.Z)(this,"reactProfilerTimings",[]),(0,p.Z)(this,"sinkTimeoutId",null),(0,p.Z)(this,"vcObserver",null),(0,p.Z)(this,"vcObserverSSRConfig",null),(0,p.Z)(this,"sinkHandlerFn",(()=>{}))}initializeVCObserver(e){null===this.vcObserver&&(this.vcObserver=new m.D({...e,isPostInteraction:!0}))}startVCObserver({startTime:e}){var t;null===(t=this.vcObserver)||void 0===t||t.start({startTime:e})}setVCObserverSSRConfig(e){this.vcObserverSSRConfig=e}setLastInteractionFinishVCResult(e){this.lastInteractionFinishVCResult=e}sinkHandler(e){this.sinkHandlerFn=e}reset(){this.lastInteractionFinish=null,this.reactProfilerTimings=[],null!=this.sinkTimeoutId&&(clearTimeout(this.sinkTimeoutId),this.sinkTimeoutId=null),this.setVCObserverSSRConfig(null)}hasData(){var e;return(null===(e=this.reactProfilerTimings)||void 0===e?void 0:e.length)>0}async sendPostInteractionLog(){var e,t,r,n,i,o;if(!this.hasData()||!this.lastInteractionFinish||!this.sinkHandlerFn)return this.reset(),void(null!==(n=(0,s.iE)())&&void 0!==n&&null!==(i=n.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&(null===(o=this.vcObserver)||void 0===o||o.stop()));const a=await(null===(e=this.vcObserver)||void 0===e?void 0:e.getVCResult({start:this.lastInteractionFinish.start,stop:performance.now(),tti:-1,isEventAborted:!!this.lastInteractionFinish.abortReason,prefix:"ufo",...this.vcObserverSSRConfig}));var c;null!==(t=(0,s.iE)())&&void 0!==t&&null!==(r=t.experimentalInteractionMetrics)&&void 0!==r&&r.enabled&&(null===(c=this.vcObserver)||void 0===c||c.stop()),this.sinkHandlerFn({lastInteractionFinish:this.lastInteractionFinish,reactProfilerTimings:this.reactProfilerTimings,postInteractionFinishVCResult:a,lastInteractionFinishVCResult:this.lastInteractionFinishVCResult}),this.reset()}onInteractionComplete({ufoName:e,start:t,end:r,id:n,abortReason:i,abortedByInteractionName:o,routeName:a,type:c,experimentalTTAI:l,experimentalVC90:u}){var d;this.lastInteractionFinish={ufoName:e,start:t,end:r,id:n,abortReason:i,abortedByInteractionName:o,routeName:a,type:c,experimentalTTAI:l,experimentalVC90:u};const h=(null===(d=(0,s.iE)())||void 0===d?void 0:d.timeWindowForLateMutationsInMilliseconds)||3e3;this.sinkTimeoutId=window.setTimeout((async()=>{await this.sendPostInteractionLog()}),h)}addProfilerTimings(e,t,r,n,i,s){null!=this.lastInteractionFinish&&this.reactProfilerTimings.push({type:t,actualDuration:r,baseDuration:n,startTime:i,commitTime:s,labelStack:e})}},v=[],y=new Map,b=6e4,w=15e3,E=[];function _(){const e=(0,u.B5)();if(e.current)return h.get(e.current)}function O(){var e;return(null===(e=(0,s.iE)())||void 0===e?void 0:e.enableAdditionalPerformanceMarks)||window.__REACT_UFO_ENABLE_PERF_TRACING||!1}function I(e,t){var r;const n=[...null!=e?e:[]];return t&&n.push({name:t}),null===(r=n.map((e=>e.name)))||void 0===r?void 0:r.join("/")}function S(e){h.delete(e)}function T(e,t=e){const r=_();!r||"page_load"!==r.type&&"transition"!==r.type||(r.ufoName=e,r.routeName=t)}function C(e,t,r){const n=h.get(e);null!=n&&Object.keys(r).forEach((e=>{n.customData.push({labelStack:t,data:{[e]:r[e]}})}))}function A(e,t,r){const n=h.get(e);if(null!=n&&(n.customTimings.push({labelStack:t,data:r}),O()))for(const[e,n]of Object.entries(r)){const{startTime:r,endTime:i}=n;try{performance.measure(`🛸 ${I(t,e)} [custom_timing]`,{start:r,end:i})}catch(e){}}}function P(e,t,r,n,i=performance.now()){const s=h.get(e);null!=s&&s.marks.push({type:t,name:r,labelStack:n,time:i}),O()&&performance.mark(`🛸 ${I(n,r)} [${t}]`,{startTime:i})}function k(e,t,r,n,i,s=performance.now(),o){const a=h.get(e);if(null!=a&&(a.spans.push({type:t,name:r,labelStack:n,start:i,end:s,size:o}),O()))try{performance.measure(`🛸 ${I(n,r)} [${t}]`,{start:i,end:s})}catch(e){}}function x(e,t,r,n){var i;null!==(i=window.__CRITERION__)&&void 0!==i&&i.addUFOHold&&window.__CRITERION__.addUFOHold(e,I(t),r,n)}function R(e){var t;null!==(t=window.__CRITERION__)&&void 0!==t&&t.removeUFOHold&&window.__CRITERION__.removeUFOHold(e)}function N(e,t,r,i){const o=h.get(e),a=(0,n.v4)();if(null!=o){var c,l;const n=performance.now(),u={labelStack:t,name:r,start:n};return null!==(c=(0,s.iE)())&&void 0!==c&&null!==(l=c.experimentalInteractionMetrics)&&void 0!==l&&l.enabled&&i&&o.holdExpActive.set(a,{...u,start:n}),i||o.holdActive.set(a,{...u,start:n}),x(a,t,r,n),()=>{const i=performance.now();if(O())try{performance.measure(`🛸 ${I(t,r)} [hold]`,{start:n,end:i})}catch(e){}R(a);const s=h.get(e),c=o.holdActive.get(a),l=o.holdExpActive.get(a);null!=s&&(null!=c&&(s.holdInfo.push({...c,end:i}),o.holdActive.delete(a)),null!=l&&(s.holdExpInfo.push({...l,end:i}),o.holdExpActive.delete(a)))}}return()=>{}}function M(e,t,r,n,i){const s=h.get(e);if(null!=s){const e=performance.now();s.holdActive.set(n,{labelStack:t,name:r,start:e,ignoreOnSubmit:i}),x(n,t,r,e)}return()=>{}}function D(e,t){const r=h.get(e);if(null!=r){const n=performance.now(),i=h.get(e),s=r.holdActive.get(t);null!=i&&null!=s&&(i.holdInfo.push({...s,end:n}),r.holdActive.delete(t),R(t))}}function L(e,t,r,n,i,o,a){var c,l;if(O())try{performance.measure(`🛸 ${I(t)} [react-profiler] ${r}`,{start:o,duration:n})}catch(e){}const u=h.get(e);null!=u?u.reactProfilerTimings.push({labelStack:t,type:r,actualDuration:n,baseDuration:i,startTime:o,commitTime:a}):null!==(c=(0,s.iE)())&&void 0!==c&&null!==(l=c.postInteractionLog)&&void 0!==l&&l.enabled&&g.addProfilerTimings(t,r,n,i,o,a)}function j(e,t){v.push({id:e,data:t})}let Z=j;function V(e,t,r=performance.now()){var n,i,o,c;t.end=r;try{performance.measure(`🛸 [${t.type}] ${t.ufoName} [ttai]`,{start:t.start,end:t.end})}catch(e){}if(t.featureFlags&&(t.featureFlags.during=Object.fromEntries(l)),(0,a.uO)(),t.cleanupCallbacks.reverse().forEach((e=>{e()})),null!==(n=(0,s.iE)())&&void 0!==n&&null!==(i=n.vc)&&void 0!==i&&i.stopVCAtInteractionFinish&&(t.vc=(0,d.h)().getVCRawData()),null!==(o=(0,s.iE)())&&void 0!==o&&null!==(c=o.experimentalInteractionMetrics)&&void 0!==c&&c.enabled||S(e),f.name=t.ufoName||"unknown",f.isAborted=null!=t.abortReason,t.ufoName&&Z(e,t),O()){const e=new Map;t.reactProfilerTimings.forEach((t=>{const r=null==(n=t.labelStack)||null===(i=n.map((e=>"segmentId"in e?`${e.name}:${e.segmentId}`:`${e.name}`)))||void 0===i?void 0:i.join("/");var n,i;if(r){var s,o,a;const n=null!==(s=e.get(r))&&void 0!==s?s:{labelStack:t.labelStack};n.start=t.startTime<(null!==(o=n.start)&&void 0!==o?o:Number.MAX_SAFE_INTEGER)?t.startTime:n.start,n.end=t.commitTime>(null!==(a=n.end)&&void 0!==a?a:Number.MIN_SAFE_INTEGER)?t.commitTime:n.end,e.set(r,n)}}));try{for(const[,{labelStack:t,start:r,end:n}]of e.entries())performance.measure(`🛸 ${I(t)} [segment_ttai]`,{start:r,end:n})}catch(e){}}try{window.dispatchEvent(new CustomEvent("UFO_FINISH_INTERACTION",{detail:t}))}catch(e){}}function U(e){Z===j&&(Z=e,v.forEach((t=>{e(t.id,t.data)})),v.length=0)}function F(e){g.sinkHandler(e)}let B=!1;function $(e,t){const r=h.get(e);if(null!=r){const a=0===r.holdActive.size,c=0===r.holdExpActive.size,l=async()=>{var t,n,i,a;if(null!==(t=(0,s.iE)())&&void 0!==t&&null!==(n=t.postInteractionLog)&&void 0!==n&&n.enabled){var c,l;let e,t;if(null!==(c=(0,s.iE)())&&void 0!==c&&null!==(l=c.experimentalInteractionMetrics)&&void 0!==l&&l.enabled){var u;e=null===(u=await(0,o.Gs)(r))||void 0===u?void 0:u["metric:experimental:vc90"];const{start:n,end:i}=r;t=r.abortReason?void 0:Math.round(i-n)}g.onInteractionComplete({...r,experimentalTTAI:t,experimentalVC90:e})}null!==(i=(0,s.iE)())&&void 0!==i&&null!==(a=i.experimentalInteractionMetrics)&&void 0!==a&&a.enabled&&S(e),B=!1};var n,i;a&&(B||(V(e,r,t),B=!0),c&&(null!==(n=(0,s.iE)())&&void 0!==n&&null!==(i=n.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&(0,o.sA)(e,r,t),l()))}}function z(e){e.cancelCallbacks.reverse().forEach((e=>{e()}))}function G(e,t){const r=h.get(e);var n,i;null!=r&&(z(r),r.abortReason=t,V(e,r),null!==(n=(0,s.iE)())&&void 0!==n&&null!==(i=n.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&((0,o.sA)(e,r),S(e)))}function H(e,t){const r=h.get(e);var n,i;null!=r&&(z(r),r.abortReason="new_interaction",r.abortedByInteractionName=t,V(e,r),null!==(n=(0,s.iE)())&&void 0!==n&&null!==(i=n.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&((0,o.sA)(e,r),S(e)))}function W(e,t,r,n,a,u,p,m=null){var v,w;null!==(v=(0,s.iE)())&&void 0!==v&&null!==(w=v.postInteractionLog)&&void 0!==w&&w.enabled&&g.reset();let _=n,O=b;const I=setTimeout((()=>{G(e,"timeout")}),b),S=(0,i.Z)((0,s.g6)("feature_flag_access")),T={id:e,start:n,end:0,ufoName:t,type:r,previousInteractionName:f.name,isPreviousInteractionAborted:!0===f.isAborted,marks:[],customData:[],customTimings:[],spans:[],requestInfo:[],reactProfilerTimings:[],holdInfo:[],holdExpInfo:[],holdActive:new Map,holdExpActive:new Map,measureStart:performance.now(),rate:a,cancelCallbacks:[],metaData:{},errors:[],apdex:[],labelStack:u,routeName:null!=p?p:t,featureFlags:S?{prior:Object.fromEntries(c),during:{}}:void 0,knownSegments:[],cleanupCallbacks:[],awaitReactProfilerCount:0,redirects:[],timerID:I,changeTimeout:function(t){const r=performance.now();if(O-(r-_){G(e,"timeout")}),t);O=t,_=r,this.timerID=n},trace:m};S&&l.clear(),h.set(e,T);const C={onAdd(e){T.knownSegments.push(e)},onRemove(){}};var A,P;!function(e){E.push(e);for(const t of y.values())e.onAdd(t)}(C),T.cleanupCallbacks.push((()=>{!function(e){const t=E.findIndex((t=>t===e));-1!==t&&E.splice(t,1)}(C)})),T.cleanupCallbacks.push((()=>{clearTimeout(T.timerID)})),(0,s.A5)().includes(t)&&M(e,[],t,t,!0),"transition"===r&&((0,d.h)().start({startTime:n}),g.startVCObserver({startTime:n}),null!==(A=(0,s.iE)())&&void 0!==A&&null!==(P=A.experimentalInteractionMetrics)&&void 0!==P&&P.enabled&&o.Z3.start({startTime:n}))}function K(e,t){const r=h.get(e);if(null!=r){r.apdex.push(t);try{var n;performance.measure(`🛸 ${t.key} [bm3_tti]`,{start:null!==(n=t.startTime)&&void 0!==n?n:r.start,end:t.stopTime})}catch(e){}"page_load"!==r.type&&"transition"!==r.type||(r.changeTimeout(w),D(e,r.ufoName))}}function q(e,t,r){const n=h.get(e);null!=n&&n.requestInfo.push({labelStack:t,...r})}function J(e){return e.map((e=>{return(t=e)&&"string"==typeof t.name&&"string"==typeof t.segmentId?`${e.name}_${e.segmentId}`:e.name;var t})).join("|")}function Q(e){const t=J(e);if(!y.get(t)){const r={labelStack:e};y.set(t,r),E.forEach((e=>{e.onAdd(r)}))}}function Y(e){const t=J(e),r=y.get(t);r&&(y.delete(JSON.stringify(e)),E.forEach((e=>{e.onRemove(r)})))}const X=[]},98028:(e,t,r)=>{"use strict";r.d(t,{i:()=>c,j:()=>a});var n=r(65711);const i=["operationName","operation","q"];function s(e){try{if("string"!=typeof e)return e;const t=new URL(e),r=new URLSearchParams(t.search),s=function(){const e=(0,n.iE)();return(null==e?void 0:e.allowedResourcesParams)||i}();for(const[e]of r)s.includes(e)||t.searchParams.delete(e);return t.toString()}catch(t){return e}}let o={mapResources:e=>e,sanitiseEndpoints:e=>s(e)};function a(e){const t={mapResources:e.mapResources,sanitiseEndpoints:t=>{const r=e.sanitiseEndpoints(t);return r?s(r):r}};o=t}function c(){return o}},85810:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n={current:null}},52131:(e,t,r)=>{"use strict";r.d(t,{Gw:()=>l,Jr:()=>c,MI:()=>u,jQ:()=>o,k_:()=>a});const n="/",i="ssr";let s;function o(e){s=e}function a(){var e;if(null===(e=s)||void 0===e||!e.getTimings)return{};const t=s.getTimings();return t?Object.entries(t).reduce(((e,t)=>{var r;return function(e){return!(!e||"object"!=typeof e||e.startTime<0||e.duration<0)}(t[1])&&(e[(r=t[0],"total"===r?i:`${i}${n}${r}`)]=function(e){return{startTime:Math.round(e.startTime),duration:Math.round(e.duration)}}(t[1])),e}),{}):{}}function c(){var e;return!(null===(e=s)||void 0===e||!e.getDoneMark())}function l(){var e,t;return null!==(e=null===(t=s)||void 0===t?void 0:t.getDoneMark())&&void 0!==e?e:void 0}function u(){var e;if(null!==(e=s)&&void 0!==e&&e.getFeatureFlags)try{var t;return null!==(t=s.getFeatureFlags())&&void 0!==t?t:void 0}catch(e){}}},55537:(e,t,r)=>{"use strict";r.d(t,{h:()=>D});var n=r(68968),i=r(65711);class s{start(e){}stop(){}getVCRawData(){return null}getVCResult(e){return Promise.resolve({"ufo:vc:noop":!0})}setSSRElement(e){}setReactRootRenderStart(e){}setReactRootRenderStop(e){}}var o=r(182),a=r(4942);class c{constructor(){(0,a.Z)(this,"unorderedEntries",[]),(0,a.Z)(this,"sortedEntriesCache",new Map),this.unorderedEntries=[]}push(e){this.unorderedEntries.push(e),this.sortedEntriesCache.clear()}getCacheKey(e,t){return`${null!=e?e:"null"}_${null!=t?t:"null"}`}getOrderedEntries({start:e,stop:t}){var r;const n=this.getCacheKey(e,t),i=null===(r=this.sortedEntriesCache.get(n))||void 0===r?void 0:r.deref();if(i)return i;const s=this.unorderedEntries.filter((r=>r.time>=(null!=e?e:0)&&r.time<=(null!=t?t:performance.now()))).sort(((e,t)=>e.time-t.time));return this.sortedEntriesCache.set(n,new WeakRef(s)),s}clear(){this.unorderedEntries=[],this.sortedEntriesCache.clear()}}const l=new WeakMap,u=function e(t,r){if(!(r instanceof HTMLElement))return"error";const n=l.get(r);if(n)return n;const i=r.localName,s=e=>{if("function"!=typeof encodeURIComponent)return"";try{return encodeURIComponent(e)}catch(e){return"malformed_value"}},o=(e,t="")=>{if(r&&"function"!=typeof r.getAttribute)return"";const n=r.getAttribute(e);return n?`${t}[${e}="${s(n)}"]`:""},a=!1!==t.dataVC?o("data-vc"):"",c=t.id&&r.id?`#${s(r.id)}`:"",u=t.testId?o("data-testid")||o("data-test-id"):"",d=t.role?o("role"):"",h=Array.from(r.classList).map(s).join("."),p=t.className&&h?`.${h}`:"",m=[c,u,d].filter(Boolean).join(""),f=a||m;if(!f&&!p)return`${r.parentElement?e(t,r.parentElement):"unknown"} > ${i}`;const g=`${i}${f||p}`;return l.set(r,g),g},d=async function(){if("scheduler"in globalThis&&"yield"in globalThis.scheduler)return void await scheduler.yield();let e=()=>{};const t=new Promise((t=>{e=t}));setTimeout(e,0),await t};class h{constructor(e,t=1){this.scaleFactor=t,this.colorCounter=1,this.colorTimeMap=new Map;const r=Math.max(e.width,1),n=Math.max(e.height,1);this.scaledWidth=Math.max(Math.ceil(r*t),1),this.scaledHeight=Math.max(Math.ceil(n*t),1),this.scaleX=this.scaledWidth/r,this.scaleY=this.scaledHeight/n,this.canvas=document.createElement("canvas"),this.canvas.width=this.scaledWidth,this.canvas.height=this.scaledHeight;const i=this.canvas.getContext("2d",{alpha:!1,willReadFrequently:!0,colorSpace:"srgb"});if(!i)throw new Error("Could not get canvas context");this.ctx=i,this.ctx.globalCompositeOperation="source-over",this.clear()}getScaledDimensions(){return{width:this.scaledWidth,height:this.scaledHeight}}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)}generateColor(){return p(this.colorCounter++%16777215)}drawRect(e,t){const r=this.generateColor();if(this.colorTimeMap.set(r,t),this.ctx.fillStyle=r,1===this.scaleFactor)return this.ctx.fillRect(e.x,e.y,e.width,e.height);const n=e.x*this.scaleX,i=e.y*this.scaleY,s=e.width*this.scaleX,o=e.height*this.scaleY;this.ctx.fillRect(Math.floor(n),Math.ceil(i),Math.max(s,1),Math.max(o,1))}async getPixelCounts(){const e=this.ctx.getImageData(0,0,this.canvas.width,this.canvas.height),t=this.colorTimeMap.size,r=await async function(e,t,r){const n=e.data,i=new Uint32Array(r);for(let e=0;e16777215)throw new Error("Input number must be between 0 and 16777215 (inclusive).");return`rgb(${e>>16&255}, ${e>>8&255}, ${255&e})`}const m=async function(e){return await async function({viewport:e,orderedEntries:t,percentiles:r,startTime:i}){const s=new h(e,(0,n.fg)("platform_ufo_canvas_heatmap_full_precision")?1:.25),o=new Map;for(const e of t){if(!("rect"in e.data))continue;const t=e.data.rect,r=e.data.elementName;s.drawRect(t,e.time),o.has(e.time)||o.set(e.time,new Set),o.get(e.time).add(r)}const a=await s.getPixelCounts(),c=s.getScaledDimensions();return function(e,t,r,n,i){const s={};let o=0;const a=r.sort(((e,t)=>e-t)),c=Array.from(e.entries()).sort((([e],[t])=>Number(e)-Number(t)));let l=0,u=new Set;for(const[e,r]of c){o+=r;const c=o/n*100;(t.get(e)||new Set).forEach((e=>u.add(e)));let d=!1;for(;l=a[l];)s[`${a[l]}`]={t:Math.round(Number(e-i)),e:Array.from(u)},l++,d=!0;if(d&&u.clear(),l>=a.length)break}let d={t:0,e:[]};for(let e=0;ethis.isEntryIncluded(e))),o=this.isVCClean(s);if(!o)return{revision:this.revisionNo,"metric:vc90":null,clean:!1};const a=await m({viewport:{width:g(),height:f()},startTime:e,stopTime:t,orderedEntries:s,percentiles:[25,50,75,80,85,90,95,98,99]});return{revision:this.revisionNo,vcDetails:null!=a?a:void 0,clean:o,"metric:vc90":null!==(n=null==a||null===(i=a[90])||void 0===i?void 0:i.t)&&void 0!==n?n:null}}}const y=["wheel","scroll","keydown","resize"],b=["mutation:child-element","mutation:element","mutation:attribute","layout-shift","window:event"],w=["data-drop-target-for-element","draggable"];class E extends v{constructor(){super("fy25.03")}isEntryIncluded(e){if(!b.includes(e.type))return!1;if("mutation:attribute"===e.type){const t=e.data.attributeName;return!(!t||w.includes(t))}return!(function(e){if(e){const t="string"==typeof e.elementName;if(void 0!==e.rect&&t)return!0}return!1}(e.data)&&!e.data.visible)}isVCClean(e){return!e.some((e=>{if("window:event"===e.type){const t=e.data;if(y.includes(t.eventType))return!0}return!1}))}}var _=r(71781),O=r(45204);function I(e){return"number"!=typeof window.devicePixelRatio||1===window.devicePixelRatio?e:new DOMRect(e.x/window.devicePixelRatio,e.y/window.devicePixelRatio,e.width/window.devicePixelRatio,e.height/window.devicePixelRatio)}class S{constructor({onChange:e}){this.mapVisibleNodeRects=new WeakMap,this.intersectionObserver=function({onEntry:e,onObserved:t}){if(!window||"function"!=typeof window.IntersectionObserver)return null;const r=new WeakMap,n=new IntersectionObserver((i=>{const s=[],o=performance.now();i.forEach((t=>{var i;if(!(t.target instanceof HTMLElement&&function(e){return e.isIntersecting&&e.intersectionRect.width>0&&e.intersectionRect.height>0}(t)))return;let o=null,a=null;const c=r.get(t.target);if("function"==typeof c){const e=c({target:t.target,rect:t.intersectionRect});e?"string"==typeof e?o=e:(o=e.type,a=e.mutationData):o="unknown"}else"string"==typeof c&&(o=c);e({target:t.target,rect:t.intersectionRect,time:t.time,type:null!==(i=o)&&void 0!==i?i:"unknown",mutationData:a}),s.push(new WeakRef(t.target)),r.delete(t.target),n.unobserve(t.target)})),null==t||t({time:o,elements:s})}));return{disconnect:()=>{n.disconnect()},unobserve:e=>{n.unobserve(e)},watchAndTag:(e,t)=>{r.set(e,t),n.observe(e)}}}({onEntry:({target:t,rect:r,time:n,type:i,mutationData:s})=>{if(!t)return;const o=function(e){if(!(e instanceof HTMLElement))return!0;try{return e.checkVisibility({visibilityProperty:!0,contentVisibilityAuto:!0,opacityProperty:!0})}catch(e){return!0}}(t),a=this.mapVisibleNodeRects.get(t);this.mapVisibleNodeRects.set(t,r),e({time:n,type:i,elementRef:new WeakRef(t),visible:o,rect:r,previousRect:a,mutationData:s})}}),this.mutationObserver=function({onAttributeMutation:e,onChildListMutation:t,onMutationFinished:r}){return window&&"function"==typeof window.IntersectionObserver?new MutationObserver((n=>{const i=[],s=[],o=[];for(const t of n)if(t.target instanceof HTMLElement)if("attributes"!==t.type){var a,c;"childList"===t.type&&((null!==(a=t.addedNodes)&&void 0!==a?a:[]).forEach((e=>{e instanceof HTMLElement&&i.push(e)})),(null!==(c=t.removedNodes)&&void 0!==c?c:[]).forEach((e=>{e instanceof HTMLElement&&s.push(e)}))),o.push(t.target)}else{var l,u;(null!==(l=t.oldValue)&&void 0!==l?l:void 0)!==(t.attributeName?t.target.getAttribute(t.attributeName):void 0)&&e({target:t.target,attributeName:null!==(u=t.attributeName)&&void 0!==u?u:"unknown"})}t({addedNodes:i,removedNodes:s}),null==r||r({targets:o})})):null}({onChildListMutation:({addedNodes:e,removedNodes:t})=>{var r;const n=null!==(r=null==t?void 0:t.map((e=>this.mapVisibleNodeRects.get(e))))&&void 0!==r?r:[];e.forEach((e=>{var r,i,s;t.find((t=>t.isEqualNode(e)))?null===(i=this.intersectionObserver)||void 0===i||i.watchAndTag(e,"mutation:remount"):(0,_.T)(e)?null===(s=this.intersectionObserver)||void 0===s||s.watchAndTag(e,"mutation:media"):null===(r=this.intersectionObserver)||void 0===r||r.watchAndTag(e,(({rect:e})=>n.some((t=>{return n=e,!(!(r=t)||!n)&&r.width===n.width&&r.height===n.height&&r.x===n.x&&r.y===n.y;var r,n}))?"mutation:element-replacement":"mutation:element"))}))},onAttributeMutation:({target:e,attributeName:t})=>{var r;null===(r=this.intersectionObserver)||void 0===r||r.watchAndTag(e,(({target:e,rect:r})=>{if((0,_.T)(e))return{type:"mutation:media",mutationData:{attributeName:t}};if((0,O.Z)({target:e,attributeName:t,type:"attributes"}))return{type:"mutation:attribute:non-visual-style",mutationData:{attributeName:t}};const n=this.mapVisibleNodeRects.get(e);return n&&(s=n,(i=r)&&s&&i.width===s.width&&i.height===s.height)?{type:"mutation:attribute:no-layout-shift",mutationData:{attributeName:t}}:{type:"mutation:attribute",mutationData:{attributeName:t}};var i,s}))}}),this.performanceObserver=function({onLayoutShift:e}){return window&&"function"==typeof window.PerformanceObserver?new PerformanceObserver((t=>{for(const r of t.getEntries())if("layout-shift"===r.entryType){const t=r.sources.reduceRight(((e,t)=>(e.push({rect:I(t.currentRect),previousRect:I(t.previousRect),node:t.node}),e)),[]);e({time:r.startTime,changedRects:t})}})):null}({onLayoutShift:({time:t,changedRects:r})=>{for(const n of r){const r=n.node;r&&e({time:t,elementRef:new WeakRef(r),visible:!0,rect:n.rect,previousRect:n.previousRect,type:"layout-shift"})}}})}start(){var e,t;null===(e=this.mutationObserver)||void 0===e||e.observe(document.body,{attributeOldValue:!0,attributes:!0,childList:!0,subtree:!0}),null===(t=this.performanceObserver)||void 0===t||t.observe({type:"layout-shift",buffered:!0,durationThreshold:30})}stop(){var e,t,r;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),null===(r=this.performanceObserver)||void 0===r||r.disconnect()}}var T=r(39728);class C{constructor(e){(0,a.Z)(this,"unbindFns",[]),this.onEvent=e.onEvent}bindEvent(e){const t=(0,T.ak)(window,{type:e,listener:t=>{t.isTrusted&&this.onEvent({time:t.timeStamp,type:e,event:t})},options:{passive:!0,once:!0}});this.unbindFns.push(t)}start(){this.bindEvent("wheel"),this.bindEvent("scroll"),this.bindEvent("keydown"),this.bindEvent("resize")}stop(){this.unbindFns.forEach((e=>{e()})),this.unbindFns=[]}}const A={id:!1,testId:!0,role:!1,className:!1,dataVC:!0};class P{constructor(e){var t;(0,a.Z)(this,"viewportObserver",null),(0,a.Z)(this,"windowEventObserver",null),this.entriesTimeline=new c,this.selectorConfig=null!==(t=e.selectorConfig)&&void 0!==t?t:A,this.viewportObserver=new S({onChange:e=>{const{time:t,type:r,elementRef:n,visible:i,rect:s,previousRect:o,mutationData:a}=e;let c="unknown";const l=n.deref();l&&(c=this.getElementName(l)),this.entriesTimeline.push({time:t,type:r,data:{elementName:c,rect:s,previousRect:o,visible:i,attributeName:null==a?void 0:a.attributeName}})}}),this.windowEventObserver=new C({onEvent:({time:e,type:t})=>{this.entriesTimeline.push({time:e,type:"window:event",data:{eventType:t}})}})}start({startTime:e}){var t,r;null===(t=this.viewportObserver)||void 0===t||t.start(),null===(r=this.windowEventObserver)||void 0===r||r.start(),this.entriesTimeline.clear()}stop(){var e,t;null===(e=this.viewportObserver)||void 0===e||e.stop(),null===(t=this.windowEventObserver)||void 0===t||t.stop()}async getVCResult(e){const{start:t,stop:r}=e,n=[],i=new E,s=this.entriesTimeline.getOrderedEntries({start:t,stop:r}),o=await i.calculate({orderedEntries:s,startTime:t,stopTime:r});return o&&n.push(o),n}getElementName(e){return u(this.selectorConfig,e)}}var k,x;class R{constructor(e={}){var t,r;this.newVCObserver=null,((0,n.fg)("platform_ufo_vc_observer_new")||(null===(t=(0,i.iE)())||void 0===t||null===(r=t.vc)||void 0===r?void 0:r.enableVCObserverNew))&&(this.newVCObserver=new P({selectorConfig:e.selectorConfig})),this.oldVCObserver=new o.D(e)}start(e){var t,r;null===(t=this.oldVCObserver)||void 0===t||t.start(e),null===(r=this.newVCObserver)||void 0===r||r.start({startTime:e.startTime})}stop(){var e,t;null===(e=this.oldVCObserver)||void 0===e||e.stop(),null===(t=this.newVCObserver)||void 0===t||t.stop()}getVCRawData(){var e,t;return null!==(e=null===(t=this.oldVCObserver)||void 0===t?void 0:t.getVCRawData())&&void 0!==e?e:null}async getVCResult(e){var t,r,i;const s=await(null===(t=this.oldVCObserver)||void 0===t?void 0:t.getVCResult(e)),o=await(null===(r=this.newVCObserver)||void 0===r?void 0:r.getVCResult({start:e.start,stop:(0,n.fg)("platform_ufo_vc_ttai_on_paint")?e.stop:performance.now()}));return s&&!o?s:{...null!=s?s:{},"ufo:vc:rev":[...null!==(i=null==s?void 0:s["ufo:vc:rev"])&&void 0!==i?i:[],...null!=o?o:[]]}}setSSRElement(e){var t;null===(t=this.oldVCObserver)||void 0===t||t.setSSRElement(e)}setReactRootRenderStart(e){var t;null===(t=this.oldVCObserver)||void 0===t||t.setReactRootRenderStart(e||performance.now())}setReactRootRenderStop(e){var t;null===(t=this.oldVCObserver)||void 0===t||t.setReactRootRenderStop(e||performance.now())}}let N=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.__SERVER__),M=void 0!=={}&&Boolean((null===(k={})||void 0===k||null===(x=k.env)||void 0===x?void 0:x.REACT_SSR)||!1);function D(e={}){if(!globalThis.__vcObserver){const t=!(!M&&!N&&"function"==typeof(null===globalThis||void 0===globalThis?void 0:globalThis.WeakRef)&&"function"==typeof(null===globalThis||void 0===globalThis?void 0:globalThis.MutationObserver)&&"function"==typeof(null===globalThis||void 0===globalThis?void 0:globalThis.IntersectionObserver)&&"function"==typeof(null===globalThis||void 0===globalThis?void 0:globalThis.PerformanceObserver));globalThis.__vcObserver=t?new s:new R(e)}return globalThis.__vcObserver}},182:(e,t,r)=>{"use strict";r.d(t,{D:()=>R});var n=r(4942),i=r(68968),s=r(39728);const o="wheel",a="keydown",c="resize";function l(e=window.document){let t;try{t=e.documentElement.clientWidth||0}catch(e){t=0}return Math.max(t,window.innerWidth||0)}function u(e=window.document){let t;try{t=e.documentElement.clientHeight||0}catch(e){t=0}return Math.max(t,window.innerHeight||0)}var d=r(30690);class h{constructor(){(0,n.Z)(this,"types",[]),(0,n.Z)(this,"filters",[]),(0,n.Z)(this,"removedFilters",[]),(0,n.Z)(this,"__combinedTypes",[]),(0,n.Z)(this,"__combinedFilters",[])}VCCalculationMethod(e){return{VC:{},VCBox:{}}}filterComponentsLog({componentsLog:e}){return e}mergeConfig(){this.__combinedTypes=[...this.types,...(null==this?void 0:this.__combinedTypes)||[]];const e=0===this.removedFilters.length?this.__combinedFilters:this.__combinedFilters.filter((e=>!this.removedFilters.includes(e.name)));this.__combinedFilters=[...this.filters,...e]}classifyUpdate({element:e,type:t,tags:r,ignoreReason:n}){return!!this.__combinedTypes.includes(t)&&this.__combinedFilters.every((({filter:e,name:i})=>e({type:t,tags:r,ignoreReason:n})))}}const p=["image","ssr-hydration","editor-lazy-node-view"];class m extends h{VCCalculationMethod({VCParts:e,entries:t,totalPainted:r,componentsLog:n}){const i={},s={};return t.reduce(((t=0,o)=>{let a=o[1]/r+t;const c=o[0],l=Math.round(o[1]/r*100),u=Math.round(100*t);return a=(l+u)/100,e.forEach((e=>{var t;(null===i[e]||void 0===i[e])&&a>=e/100&&(i[e]=c,s[e]=new Set,null===(t=n[c])||void 0===t||t.forEach((t=>{var r;return null===(r=s[e])||void 0===r?void 0:r.add(t.targetName)})))})),a}),0),{VC:i,VCBox:s}}constructor(){super(),(0,n.Z)(this,"revision","fy25.01"),(0,n.Z)(this,"types",["html","text"]),(0,n.Z)(this,"filters",[{name:"default-ignore-reasons",filter:({type:e,ignoreReason:t})=>!t||!p.includes(t)}]),this.mergeConfig()}}const f=new m,g=new class extends m{filterComponentsLog({componentsLog:e,ttai:t}){const r={};return Object.entries(e).forEach((([e,n])=>{const i=Number(e);Math.ceil(t)>=i&&(r[i]=n)})),r}constructor(){super(),(0,n.Z)(this,"revision","fy25.02"),(0,n.Z)(this,"types",["attr"]),(0,n.Z)(this,"filters",[{name:"not-visible",filter:({type:e,ignoreReason:t})=>!(null!=t&&t.includes("not-visible"))&&"non-visual-style"!==t}]),(0,n.Z)(this,"removedFilters",[]),this.mergeConfig()}};function v(){return(0,i.fg)("platform_ufo_disable_ttvc_v1")?[{name:"fy25.02",classifier:g}]:[{name:"fy25.01",classifier:f},{name:"fy25.02",classifier:g}]}const y=["25","50","75","80","85","90","95","98","99"],b=Array.from({length:0});function w(e,t){if(!(t&&e&&e.VC&&e.VCBox))return{};const r={},{VC:n,VCBox:i}=e;for(const e of y)r[e]={t:n[e],e:i[e]||b};return r}class E{constructor({viewport:e,revisions:t,arraySize:r,devToolsEnabled:i}){(0,n.Z)(this,"arraySize",{w:200,h:200}),(0,n.Z)(this,"mapPixelsToHeatmap",((e,t,r,n)=>{const{w:i,h:s}=this.viewport,o=Math.floor(e/i*this.arraySize.w),a=Math.floor(t/s*this.arraySize.h),c=Math.ceil((e+r)/i*this.arraySize.w),l=Math.ceil((t+n)/s*this.arraySize.h);return{l:Math.max(0,o),t:Math.max(0,a),r:Math.min(this.arraySize.w,c),b:Math.min(this.arraySize.h,l)}})),(0,n.Z)(this,"getElementRatio",(e=>{const{r:t,l:r,b:n,t:i}=e;return(t-r)*(n-i)/(this.arraySize.w*this.arraySize.h)})),this.viewport=e,this.revisions=t,r&&(this.arraySize=r),this.heatmaps=new Array(t.length),this.componentsLogs=new Array(t.length),this.vcRatios=new Array(t.length),this.devToolsEnabled=i||!1,t.forEach((({},e)=>{this.heatmaps[e]=this.getCleanHeatmap(),this.componentsLogs[e]={},this.vcRatios[e]={}}))}handleUpdate({time:e,type:t,classification:r,intersectionRect:n,element:i,targetName:s,ignoreReason:o,onError:a,attributeName:c,oldValue:l,newValue:u}){const d=this.mapPixelsToHeatmap(n.left,n.top,n.width,n.height),h=this.applyChangesToHeatMap(d,e,r);!0!==h&&a(h);const p=this.getElementRatio(d);this.revisions.forEach(((t,a)=>{r[a]&&(this.vcRatios[a][s]=p),this.componentsLogs[a][e]||(this.componentsLogs[a][e]=[]),this.componentsLogs[a][e].push({__debug__element:this.devToolsEnabled?new WeakRef(i):null,intersectionRect:n,targetName:s,ignoreReason:o,attributeName:c,oldValue:l,newValue:u})}))}getData(){return{heatmaps:this.heatmaps}}getPayloadShapedData(e){const t=(0,d.o)(e.interactionStart,e.ttai),r=this.processData(e);return this.revisions.map(((n,i)=>{var s;const o={};return e.VCParts.forEach((e=>{o[e]={t:r[i].VC[e]||0,e:Array.from(r[i].VCBox[e]||[])}})),{revision:n.name,vcDetails:o,clean:e.clean,"metric:vc90":e.clean&&!e.isEventAborted&&"visible"===t?null==o||null===(s=o[90])||void 0===s?void 0:s.t:null}}))}processData({VCParts:e,VCCalculationMethods:t,filterComponentsLog:r,ttai:n,ssr:i=0}){return this.heatmaps.map(((s,o)=>{const a={};let c=0,l=this.componentsLogs[o];if(0!==i){var u;const e={__debug__element:new WeakRef(null===(u=window.document)||void 0===u?void 0:u.body),intersectionRect:{top:0,left:0,right:0,bottom:0,x:0,y:0,width:this.viewport.w,height:this.viewport.h,toJSON:()=>({})},targetName:"SSR"};l[i]||(l[i]=[]),l[i].push(e)}for(let e=0;e[parseInt(e[0],10),e[1]])).sort(((e,t)=>e[0]>t[0]?1:-1));l=r[o]({componentsLog:l,ttai:n});const{VC:h,VCBox:p}=t[o]({VCParts:e,componentsLog:l,entries:d,totalPainted:c}),m=d.reduce(((e,[t,r],n)=>{var i,s;const o=r+((null===(i=e.abs[n-1])||void 0===i?void 0:i[1])||0),a=Math.round(o/c*1e3)/10,u=null===(s=l[t])||void 0===s?void 0:s.map((e=>e.targetName));return e.abs.push([t,o]),e.rel.push({time:t,vc:a,elements:u}),e}),{abs:[],rel:[]});return{VC:h,VCBox:p,VCEntries:m,totalPainted:c}}))}applyChangesToHeatMap(e,t,r){const{l:n,t:i,r:s,b:o}=e,a=r.length;for(let e=i;e{t[e]=null})),t}}var _=r(65711),O=r(71781);const I="editorLnvPlaceholder",S="editorLnvPlaceholderReplace";class T{constructor(){(0,n.Z)(this,"placeholders",new Map),(0,n.Z)(this,"getSizeCallbacks",new Map),(0,n.Z)(this,"isAddedPlaceholderMatchingSizeCallbacks",new Map),(0,n.Z)(this,"isAddedReplaceMatchingSizeCallbacks",new Map),(0,n.Z)(this,"intersectionObserverCallback",(({target:e,boundingClientRect:t})=>{var r,n;if(this.intersectionObserver.unobserve(e),!(e instanceof HTMLElement))return;const i=null===(r=e.dataset)||void 0===r?void 0:r[I];if(i&&this.getSizeCallbacks.has(i)){const e=this.getSizeCallbacks.get(i);if(this.getSizeCallbacks.delete(i),!e)return;return void e({x:t.x,y:t.y,width:t.width,height:t.height})}if(i&&this.isAddedPlaceholderMatchingSizeCallbacks.has(i)){const e=this.isAddedPlaceholderMatchingSizeCallbacks.get(i);if(this.isAddedPlaceholderMatchingSizeCallbacks.delete(i),!e)return;const r=this.placeholders.get(i);return r?void e(this.areRectsSameSize(r,t)):void e(!1)}const s=null===(n=e.dataset)||void 0===n?void 0:n[S];if(s&&this.isAddedReplaceMatchingSizeCallbacks.has(s)){const e=this.isAddedReplaceMatchingSizeCallbacks.get(s);if(this.isAddedReplaceMatchingSizeCallbacks.delete(s),!e)return;const r=this.placeholders.get(s);return r?(this.placeholders.delete(s),void e(this.areRectsSameSize(r,t))):void e(!1)}})),this.intersectionObserver=new IntersectionObserver((e=>e.filter((e=>e.intersectionRatio>0)).forEach(this.intersectionObserverCallback)))}shouldHandleAddedNode(e){var t,r;return(null===(t=e.dataset)||void 0===t?void 0:t[I])||(null===(r=e.dataset)||void 0===r?void 0:r[S])}handleAddedNode(e){var t,r;const n=null===(t=e.dataset)||void 0===t?void 0:t[I];if(n)return this.handleAddedPlaceholderNode(e,n);const i=null===(r=e.dataset)||void 0===r?void 0:r[S];return i?this.handleAddedReplaceNode(e,i):Promise.resolve({shouldIgnore:!1})}clear(){this.placeholders.clear(),this.intersectionObserver.disconnect()}handleAddedPlaceholderNode(e,t){return this.isExistingPlaceholder(t)?this.isAddedPlaceholderMatchingSize(e,t).then((e=>({shouldIgnore:e}))):this.registerPlaceholder(e,t).then((()=>({shouldIgnore:!1})))}handleAddedReplaceNode(e,t){return this.isExistingPlaceholder(t)?this.isAddedReplaceMatchingSize(e,t).then((e=>({shouldIgnore:e}))):Promise.resolve({shouldIgnore:!1})}isExistingPlaceholder(e){return this.placeholders.has(e)}registerPlaceholder(e,t){return this.getSize(e,t).then((e=>{this.placeholders.set(t,e)}))}getSize(e,t){return new Promise((r=>{this.getSizeCallbacks.set(t,r),this.intersectionObserver.observe(e)}))}isAddedPlaceholderMatchingSize(e,t){return new Promise((r=>{this.isAddedPlaceholderMatchingSizeCallbacks.set(t,r),this.intersectionObserver.observe(e)}))}isAddedReplaceMatchingSize(e,t){return new Promise((r=>{this.isAddedReplaceMatchingSizeCallbacks.set(t,r),this.intersectionObserver.observe(e)}))}areRectsSameSize(e,t){return Math.abs(e.width-t.width)<1&&Math.abs(e.height-t.height)<1}}var C=r(45204);class A{constructor(){if((0,n.Z)(this,"staticPlaceholders",new Map),(0,n.Z)(this,"callbacks",new Map),(0,n.Z)(this,"getSizeCallbacks",new Map),(0,n.Z)(this,"reactValidateCallbacks",new Map),(0,n.Z)(this,"EQUALITY_THRESHOLD",1),(0,n.Z)(this,"intersectionObserverCallback",(({target:e,boundingClientRect:t})=>{var r;if(null===(r=this.intersectionObserver)||void 0===r||r.unobserve(e),!(e instanceof HTMLElement))return;const n=e.dataset.ssrPlaceholder||"";if(n){if(this.staticPlaceholders.has(n)&&this.callbacks.has(n)){const r=this.callbacks.get(n);if(!r)return;const i=this.staticPlaceholders.get(n),s=this.hasSameSizePosition(i,t);s||this.isDummyRect(i)?r(s):requestAnimationFrame((()=>{const t=e.getBoundingClientRect(),n=this.hasSameSizePosition(i,t);r(n)})),this.callbacks.delete(n)}}else{const r=e.dataset.ssrPlaceholderReplace||"",i=this.reactValidateCallbacks.get(r);if(!i)return;const s=this.staticPlaceholders.get(r),o=this.hasSameSizePosition(s,t);o||this.isDummyRect(s)?i(o):requestAnimationFrame((()=>{const t=e.getBoundingClientRect(),r=this.hasSameSizePosition(s,t);i(r)})),this.staticPlaceholders.delete(n),this.reactValidateCallbacks.delete(n)}})),"function"==typeof IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver((e=>e.filter((e=>e.intersectionRatio>0)).forEach(this.intersectionObserverCallback)))),window.document)try{document.querySelectorAll("[data-ssr-placeholder]").forEach((e=>{var t;if(e instanceof HTMLElement&&null!=e&&null!==(t=e.dataset)&&void 0!==t&&t.ssrPlaceholder){var r,n;let t=-1,i=-1,s=-1,o=-1;const a=null===(r=window.__SSR_PLACEHOLDERS_DIMENSIONS__)||void 0===r?void 0:r[e.dataset.ssrPlaceholder];a&&(t=a.width,i=a.height,s=a.x,o=a.y),this.staticPlaceholders.set(e.dataset.ssrPlaceholder,{width:t,height:i,x:s,y:o}),null===(n=this.intersectionObserver)||void 0===n||n.observe(e)}}))}catch(e){}finally{delete window.__SSR_PLACEHOLDERS_DIMENSIONS__}}clear(){this.staticPlaceholders=new Map,this.callbacks=new Map,this.getSizeCallbacks=new Map,this.reactValidateCallbacks=new Map}isPlaceholder(e){return Boolean(e.dataset.ssrPlaceholder)}isPlaceholderReplacement(e){return Boolean(e.dataset.ssrPlaceholderReplace)}isPlaceholderIgnored(e){return"ssrPlaceholderIgnored"in e.dataset}findNearestPlaceholderContainerIfIgnored(e){if(!this.isPlaceholderIgnored(e))return e;let t=e.parentElement,r=0;for(;t&&r<10;){if(this.isPlaceholder(t)||this.isPlaceholderReplacement(t))return t;t=t.parentElement,r++}return e}checkIfExistedAndSizeMatching(e){const t=(e=this.findNearestPlaceholderContainerIfIgnored(e)).dataset.ssrPlaceholder||"";return new Promise((r=>{var n;this.staticPlaceholders.has(t)?(this.callbacks.set(t,r),null===(n=this.intersectionObserver)||void 0===n||n.observe(e)):r(!1)}))}getSize(e){return new Promise((t=>{var r;this.getSizeCallbacks.set(e.dataset.ssrPlaceholder||"",t),null===(r=this.intersectionObserver)||void 0===r||r.observe(e)}))}validateReactComponentMatchToPlaceholder(e){const t=(e=this.findNearestPlaceholderContainerIfIgnored(e)).dataset.ssrPlaceholderReplace||"";return new Promise((r=>{var n;this.staticPlaceholders.has(t)?(this.reactValidateCallbacks.set(t,r),null===(n=this.intersectionObserver)||void 0===n||n.observe(e)):r(!1)}))}hasSameSizePosition(e,t){return e&&Math.abs(e.x-t.x){this.callbacks.add(e)})),(0,n.Z)(this,"observeElement",((e,t,r,n,s,o=null,a=null)=>{var c;null===(c=this.intersectionObserver)||void 0===c||c.observe(e),(0,i.fg)("platform_ufo_log_attr_mutation_values")?this.observedMutations.set(e,{mutation:t,ignoreReason:n,type:r,attributeName:s,oldValue:o,newValue:a}):this.observedMutations.set(e,{mutation:t,ignoreReason:n,type:r})})),this.selectorConfig={...this.selectorConfig,...e.selectorConfig},this.intersectionObserver=this.getIntersectionObserver(),this.mutationObserver=this.getMutationObserver(),this.ssrPlaceholderHandler=new A,this.editorLnvHandler=new T}isBrowserSupported(){return"function"==typeof window.IntersectionObserver&&"function"==typeof window.MutationObserver}observe(){var e;this.totalTime=0,this.ssr={state:1,reactRootElement:null,renderStart:-1,renderStop:-1},null===(e=this.mutationObserver)||void 0===e||e.observe(document.body,{attributeFilter:["hidden","style","src","class"],attributeOldValue:!0,attributes:!0,childList:!0,subtree:!0})}disconnect(){var e,t;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.observedMutations=new WeakMap,this.elementsInView=new Set,this.callbacks=new Set,this.ssr.reactRootElement=null,this.ssrPlaceholderHandler.clear(),this.editorLnvHandler.clear()}getTotalTime(){return this.totalTime}setReactRootElement(e){this.ssr.reactRootElement=e}setReactRootRenderStart(e=performance.now()){this.ssr.renderStart=e,this.ssr.state=2}setReactRootRenderStop(e=performance.now()){this.ssr.renderStop=e}getMutationObserver(){if(!this.isBrowserSupported())return null;const e=(0,_.tJ)();return new MutationObserver((t=>{this.measureStart(),t.forEach((t=>{t.timestamp=void 0===t.timestamp?performance.now():t.timestamp;let r="";if(2===this.ssr.state&&t.timestamp>this.ssr.renderStart&&t.target===this.ssr.reactRootElement&&(this.ssr.state=3,-1===this.ssr.renderStop&&(this.ssr.renderStop=t.timestamp+500),r="ssr-hydration"),3===this.ssr.state&&t.timestamp>this.ssr.renderStart&&t.target===this.ssr.reactRootElement&&(t.timestamp<=this.ssr.renderStop?r="ssr-hydration":this.ssr.state=1),"childList"===t.type)t.addedNodes.forEach((n=>{if((0,O.T)(n)&&(r="image"),n instanceof HTMLElement){if(this.ssrPlaceholderHandler.isPlaceholder(n)||this.ssrPlaceholderHandler.isPlaceholderIgnored(n))return void this.ssrPlaceholderHandler.checkIfExistedAndSizeMatching(n).then((e=>{!1===e&&this.observeElement(n,t,"html",r)}));if(this.ssrPlaceholderHandler.isPlaceholderReplacement(n)||this.ssrPlaceholderHandler.isPlaceholderIgnored(n))return void this.ssrPlaceholderHandler.validateReactComponentMatchToPlaceholder(n).then((e=>{!1===e&&this.observeElement(n,t,"html",r)}));if(e&&this.editorLnvHandler.shouldHandleAddedNode(n))return void this.editorLnvHandler.handleAddedNode(n).then((({shouldIgnore:e})=>{this.observeElement(n,t,"html",e?"editor-lazy-node-view":r)}));this.observeElement(n,t,"html",r)}n instanceof Text&&null!=n.parentElement&&this.observeElement(n.parentElement,t,"text",r)})),t.removedNodes.forEach((e=>{var t;e instanceof Element&&(this.elementsInView.delete(e),null===(t=this.intersectionObserver)||void 0===t||t.unobserve(e))}));else if("attributes"===t.type&&t.target instanceof HTMLElement){var n;const e=t.attributeName,i=null!==(n=t.oldValue)&&void 0!==n?n:void 0,s=e?t.target.getAttribute(e):void 0;i!==s&&((0,C.Z)(t)&&(r="non-visual-style"),(0,O.T)(t.target)&&(r="image"),this.observeElement(t.target,t,"attr",r,e,i,s))}}))}))}getElementName(e){try{const t=e.localName,r=e.getAttribute("data-vc"),n=this.selectorConfig.dataVC&&r?`[data-vc="${r}"]`:"",i=this.selectorConfig.id&&e.id?`#${e.id}`:"";let s=this.selectorConfig.testId?e.getAttribute("data-testid")||e.getAttribute("data-test-id"):"";s=s?`[testid=${s}]`:"";let o=this.selectorConfig.role?e.getAttribute("role"):"";o=o?`[role=${o}]`:"";let a=this.selectorConfig.className?Array.from(e.classList).join("."):"";a=""===a?"":`.${a}`;const c=n||[i,s,o].join("");let l="";return l=""===c&&""===a?`${e.parentElement?this.getElementName(e.parentElement):"unknown"} > ${t}`:[t,c||a].join(""),l}catch(e){return"error"}}getIntersectionObserver(){return this.isBrowserSupported()?new IntersectionObserver((e=>{this.measureStart(),e.forEach((({isIntersecting:e,intersectionRect:t,target:r})=>{const n=this.observedMutations.get(r);if(this.observedMutations.delete(r),e&&t.width>0&&t.height>0){if(!(r instanceof HTMLElement))return;if(null==n||!n.mutation)return;(function(e){return!e||"function"!=typeof e.checkVisibility||e.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0})})(r)||(n.ignoreReason="not-visible"),this.callbacks.forEach((e=>{let i;try{i=this.getElementName(r)}catch(e){i="error"}e(n.mutation.timestamp||performance.now(),t,i,r,n.type,n.ignoreReason,n.attributeName,n.oldValue,n.newValue)})),this.elementsInView.add(r)}else this.elementsInView.delete(r)})),this.measureStop()})):null}measureStart(){this._startMeasureTimestamp=performance.now()}measureStop(){-1!==this._startMeasureTimestamp&&(this.totalTime+=performance.now()-this._startMeasureTimestamp,this._startMeasureTimestamp=-1)}}const k="scroll",x="error";class R{constructor(e){(0,n.Z)(this,"abortReason",{reason:null,info:"",timestamp:-1,blocking:!1}),(0,n.Z)(this,"outOfBoundaryInfo",""),(0,n.Z)(this,"viewport",{w:0,h:0}),(0,n.Z)(this,"arraySize",0),(0,n.Z)(this,"multiHeatmap",null),(0,n.Z)(this,"componentsLog",{}),(0,n.Z)(this,"vcRatios",{}),(0,n.Z)(this,"active",!1),(0,n.Z)(this,"totalTime",0),(0,n.Z)(this,"startTime",0),(0,n.Z)(this,"_startMeasureTimestamp",-1),(0,n.Z)(this,"ssr",{reactRendered:-1}),(0,n.Z)(this,"unbind",[]),(0,n.Z)(this,"getAbortReasonInfo",(()=>{if(null===this.abortReason.reason)return null;const e=""!==this.abortReason.info?` ${this.abortReason.info}`:"";return`${this.abortReason.reason}${e}`})),(0,n.Z)(this,"getVCRawData",(()=>{if(this.measureStart(),!this.active)return this.measureStop(),null;this.stop();const e=this.getAbortReasonInfo();return this.measureStop(),{abortReasonInfo:e,abortReason:{...this.abortReason},heatmap:this.heatmap,heatmapNext:this.heatmapNext,multiHeatmap:this.multiHeatmap,outOfBoundaryInfo:this.outOfBoundaryInfo,totalTime:Math.round(this.totalTime+this.observers.getTotalTime()),componentsLog:{...this.componentsLog},viewport:{...this.viewport},oldDomUpdatesEnabled:this.oldDomUpdatesEnabled,devToolsEnabled:this.devToolsEnabled,ratios:this.vcRatios}})),(0,n.Z)(this,"getVCResult",(async({start:e,stop:t,tti:r,prefix:n,ssr:s,vc:o,isEventAborted:a})=>{const c=performance.now(),l=void 0!==n&&""!==n?`${n}:`:"",u=void 0!==o?o:this.getVCRawData();if(null===u)return{};const{abortReason:h,abortReasonInfo:p,heatmap:m,heatmapNext:f,outOfBoundaryInfo:g,totalTime:b,componentsLog:E,viewport:_,devToolsEnabled:O,ratios:I,multiHeatmap:S}=u;if(null!==p&&h.blocking){try{O&&!this.isPostInteraction&&(window.__vcNotAvailableReason=p)}catch(e){}return{[`${l}vc:state`]:!1,[`${l}vc:abort:reason`]:p,[`${l}vc:abort:timestamp`]:h.timestamp}}const T=(0,i.fg)("platform_ufo_disable_ttvc_v1"),C=T?{VC:{},VCBox:{},VCEntries:{abs:[],rel:[],speedIndex:-1},totalPainted:-1}:R.calculateVC({heatmap:m,ssr:s,componentsLog:{...E},viewport:_}),{VC:A,VCBox:P,VCEntries:k,totalPainted:x}=C,N={};Object.entries(this.componentsLog).forEach((([e,r])=>{const n=Number(e);t>n&&(N[n]=r)}));const M=R.calculateVC({heatmap:f,ssr:s,componentsLog:N,viewport:_});try{this.isPostInteraction||R.VCParts.forEach((t=>{if(T){const r=M.VC[t];null!=r&&(performance.measure(`VC${t}`,{start:e,duration:r}),performance.measure(`VC_Next${t}`,{start:e,duration:r}))}else{const r=A[t];null!=r&&performance.measure(`VC${t}`,{start:e,duration:r});const n=M.VC[t];null!=n&&performance.measure(`VC_Next${t}`,{start:e,duration:n})}}))}catch(e){}const D=g?{[`${l}vc:oob`]:g}:{},L=performance.now();try{if(!this.isPostInteraction&&O){const n=T?void 0:{entries:k.rel,log:E,metrics:{75:A[75],80:A[80],85:A[85],90:A[90],95:A[95],98:A[98],99:A[99],tti:r,ttai:t-e},start:e,stop:t,heatmap:m,ratios:I},i={entries:M.VCEntries.rel,log:E,metrics:{75:M.VC[75],80:M.VC[80],85:M.VC[85],90:M.VC[90],95:M.VC[95],98:M.VC[98],99:M.VC[99],tti:r,ttai:t-e},start:e,stop:t,heatmap:f,ratios:I};T?(window.__vc=i,window.__vcNext=i):(window.__vc=n,window.__vcNext=i),window.dispatchEvent(new CustomEvent("vcReady",{detail:{log:(j=E,Object.fromEntries(Object.entries(j).map((([e,t])=>[Number(e),t.map((e=>{const{__debug__element:t,...r}=e;return r}))])))),entries:T?M.VCEntries.rel:k.rel}}))}}catch(e){}var j;const Z=!p,V=function({fullPrefix:e,interaction:t,isVCClean:r,isEventAborted:n,multiHeatmap:s,ssr:o,calculatedVC:a,calculatedVCNext:c}){if(!(0,i.fg)("platform_ufo_vc_observer_new"))return s?{[`${e}vc:rev`]:null==s?void 0:s.getPayloadShapedData({VCParts:y.map((e=>parseInt(e))),VCCalculationMethods:v().map((({classifier:e})=>e.VCCalculationMethod)),filterComponentsLog:v().map((({classifier:e})=>e.filterComponentsLog)),isEventAborted:n,interactionStart:t.start,ttai:t.end,ssr:o,clean:r})}:null;const l=(0,d.o)(t.start,t.end),u=r&&!n&&"visible"===l,h={revision:"fy25.02",clean:r,"metric:vc90":u?c.VC[90]:null,vcDetails:w(c,u)};return(0,i.fg)("platform_ufo_disable_ttvc_v1")?{[`${e}vc:rev`]:[h]}:{[`${e}vc:rev`]:[{revision:"fy25.01",clean:r,"metric:vc90":u?a.VC[90]:null,vcDetails:w(a,u)},h]}}({fullPrefix:l,interaction:{start:e,end:t},isVCClean:Z,multiHeatmap:S,ssr:s,calculatedVC:{VC:A,VCBox:P},calculatedVCNext:{VC:M.VC,VCBox:M.VCBox},isEventAborted:a}),U=(0,i.fg)("ufo-calc-speed-index"),F={"ufo:speedIndex":T?M.VCEntries.speedIndex:k.speedIndex,"ufo:next:speedIndex":M.VCEntries.speedIndex};return T?{[`${l}vc:size`]:_,[`${l}vc:time`]:Math.round(b+(L-c)),[`${l}vc:ratios`]:I,...D,[`${l}vc:ignored`]:this.getIgnoredElements(E),...V,...U?F:{}}:{"metrics:vc":A,[`${l}vc:state`]:!0,[`${l}vc:clean`]:Z,[`${l}vc:dom`]:P,[`${l}vc:updates`]:(0,i.fg)("platform_ufo_vc_observer_new")?void 0:k.rel.slice(0,50),[`${l}vc:size`]:_,[`${l}vc:time`]:Math.round(b+(L-c)),[`${l}vc:total`]:x,[`${l}vc:ratios`]:I,...D,[`${l}vc:next`]:M.VC,[`${l}vc:next:updates`]:(0,i.fg)("platform_ufo_vc_observer_new")?void 0:M.VCEntries.rel.slice(0,50),[`${l}vc:next:dom`]:M.VCBox,[`${l}vc:ignored`]:this.getIgnoredElements(E),...V,...U?F:{}}})),(0,n.Z)(this,"handleUpdate",((e,t,r,n,s,o,a,c,l)=>{this.measureStart(),this.legacyHandleUpdate(e,t,r,n,s,o,a,c,l),(0,i.fg)("platform_ufo_vc_observer_new")||this.onViewportChangeDetected({timestamp:e,intersectionRect:t,targetName:r,element:n,type:s,ignoreReason:o,attributeName:a,oldValue:c,newValue:l}),this.measureStop()})),(0,n.Z)(this,"legacyHandleUpdate",((e,t,r,n,s,o,a,c,l)=>{if(null===this.abortReason.reason||!1===this.abortReason.blocking){const u=Math.round(e-this.startTime),d=this.mapPixelsToHeatmap(t.left,t.top,t.width,t.height);this.vcRatios[r]=this.getElementRatio(d),o||this.applyChangesToHeatMap(d,u,this.heatmapNext),(0,i.fg)("platform_ufo_disable_ttvc_v1")||o&&"not-visible"!==o||"attr"===s||this.applyChangesToHeatMap(d,u,this.heatmap),this.componentsLog[u]||(this.componentsLog[u]=[]),this.componentsLog[u].push({__debug__element:this.devToolsEnabled?new WeakRef(n):null,type:s,intersectionRect:t,targetName:r,ignoreReason:o,attributeName:a,oldValue:c,newValue:l})}})),(0,n.Z)(this,"onViewportChangeDetected",(({element:e,type:t,ignoreReason:r,timestamp:n,targetName:i,intersectionRect:s,attributeName:o,oldValue:a,newValue:c})=>{if(null===this.multiHeatmap)return;const l=Math.round(n-this.startTime),u=v().map((n=>n.classifier.classifyUpdate({element:e,type:t,ignoreReason:r})),[]);this.multiHeatmap.handleUpdate({time:l,targetName:i,intersectionRect:s,type:t,element:e,classification:u,onError:e=>{this.setAbortReason(x,e.time,e.error)},attributeName:o,oldValue:a,newValue:c})})),(0,n.Z)(this,"mapPixelsToHeatmap",((e,t,r,n)=>{const{w:i,h:s}=this.viewport,o=Math.floor(e/i*this.arraySize),a=Math.floor(t/s*this.arraySize),c=Math.ceil((e+r)/i*this.arraySize),l=Math.ceil((t+n)/s*this.arraySize);if(""===this.outOfBoundaryInfo){let i="";c>this.arraySize&&(i+=` r ${c} ! ${e} ${r}`),l>this.arraySize&&(i+=` r ${c} ! ${t} ${n}`),this.outOfBoundaryInfo=i}return{l:Math.max(0,o),t:Math.max(0,a),r:Math.min(this.arraySize,c),b:Math.min(this.arraySize,l)}})),(0,n.Z)(this,"getElementRatio",(e=>{const{r:t,l:r,b:n,t:i}=e;return(t-r)*(n-i)/(this.arraySize*this.arraySize)})),(0,n.Z)(this,"abortReasonCallback",((e,t)=>{switch(e){case"wheel":this.setAbortReason(k,t);break;case"keydown":this.setAbortReason("keypress",t);break;case"resize":this.setAbortReason("resize",t)}})),(0,n.Z)(this,"attachAbortListeners",(()=>{var e;this.detachAbortListeners();let t=function(e,t,r){const n=(0,s.ak)(e,{type:o,listener:e=>{r(o,e.timeStamp)},options:{passive:!0,once:!0}}),i=(0,s.ak)(e,{type:a,listener:e=>{r(a,e.timeStamp)},options:{once:!0}}),d=(0,s.ak)(e,{type:c,listener:e=>{l()===t.w&&u()===t.h||(r(c,e.timeStamp),d())}});return[n,i,d]}(window,this.viewport,this.abortReasonCallback);var r;null!==(e=window)&&void 0!==e&&e.__SSR_ABORT_LISTENERS__&&(Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach((([e,t])=>{t&&this.abortReasonCallback(e,t)})),t=t.concat(window.__SSR_ABORT_LISTENERS__.unbinds),null===(r=window)||void 0===r||delete r.__SSR_ABORT_LISTENERS__),this.unbind=t})),this.arraySize=e.heatmapSize||200,this.devToolsEnabled=e.devToolsEnabled||!1,this.oldDomUpdatesEnabled=e.oldDomUpdates||!1,this.observers=new P({selectorConfig:e.selectorConfig||{id:!1,testId:!1,role:!1,className:!0,dataVC:!0}}),this.heatmap=(0,i.fg)("platform_ufo_disable_ttvc_v1")?[]:this.getCleanHeatmap(),this.heatmapNext=this.getCleanHeatmap(),this.multiHeatmap=new E({viewport:this.viewport,revisions:v(),devToolsEnabled:this.devToolsEnabled}),this.isPostInteraction=e.isPostInteraction||!1}start({startTime:e}){this.active=!0,this.observers.isBrowserSupported()?(this.setViewportSize(),this.resetState(),this.startTime=e,this.attachAbortListeners(),this.observers.subscribeResults(this.handleUpdate),this.observers.observe()):this.setAbortReason("not-supported",e)}stop(){this.observers.disconnect(),this.detachAbortListeners()}getIgnoredElements(e){return Object.values(e).flat().filter((({ignoreReason:e})=>Boolean(e))).map((({targetName:e,ignoreReason:t})=>({targetName:e,ignoreReason:t})))}static calculateVC({heatmap:e,ssr:t=0,componentsLog:r,viewport:n}){const s={};let o=0;if(0!==t){var a;const e={__debug__element:new WeakRef(null===(a=window.document)||void 0===a?void 0:a.body),intersectionRect:{top:0,left:0,right:0,bottom:0,x:0,y:0,width:n.w,height:n.h,toJSON:()=>({})},targetName:"SSR"};r[t]||(r[t]=[]),r[t].push(e)}e.forEach((e=>{e.forEach((e=>{const r=Math.floor(0===e&&0!==t?t:e);o+=0!==r?1:0,0!==r&&(s[r]=s[r]?s[r]+1:1)}))}));const c=Object.entries(s).map((e=>[parseInt(e[0],10),e[1]])).sort(((e,t)=>e[0]>t[0]?1:-1)),l=R.makeVCReturnObj(),u=R.makeVCReturnObj(),d=(0,i.fg)("ufo-calc-speed-index");c.reduce(((e=0,t)=>{let n=t[1]/o+e;const i=Math.round(t[1]/o*100),s=Math.round(100*e);n=(i+s)/100;const a=t[0];return R.VCParts.forEach((e=>{const t=parseInt(e,10);var i;(null===l[e]||void 0===l[e])&&n>=t/100&&(l[e]=a,u[e]=[...new Set(null===(i=r[a])||void 0===i?void 0:i.filter((e=>!e.ignoreReason)).map((e=>e.targetName)))])})),n}),0);const h=c.reduce(((e,[t,n],i)=>{var s,a,c,l;const u=n+((null===(s=e.abs[i-1])||void 0===s?void 0:s[1])||0),h=Math.round(u/o*1e3)/10,p=[...new Set(null===(a=r[t])||void 0===a?void 0:a.filter((e=>!e.ignoreReason)).map((e=>e.targetName)))],m=(h-(null!==(c=null===(l=e.rel[i-1])||void 0===l?void 0:l.vc)&&void 0!==c?c:0))/100;if(d){const r=t*m;e.speedIndex+=r}return e.abs.push([t,u]),e.rel.push({time:t,vc:h,elements:p}),e}),{abs:[],rel:[],speedIndex:0});return h.speedIndex=Math.round(h.speedIndex),{VC:l,VCBox:u,VCEntries:h,totalPainted:o}}setSSRElement(e){this.observers.setReactRootElement(e)}setReactRootRenderStart(e=performance.now()){this.observers.setReactRootRenderStart(e)}setReactRootRenderStop(e=performance.now()){this.observers.setReactRootRenderStop(e)}setAbortReason(e,t,r=""){null!==this.abortReason.reason&&!1!==this.abortReason.blocking||(this.abortReason.reason=e,this.abortReason.info=r,this.abortReason.timestamp=t,this.abortReason.blocking=e!==k,this.abortReason.blocking&&this.detachAbortListeners())}resetState(){this.abortReason={reason:null,info:"",timestamp:-1,blocking:!1},this.detachAbortListeners(),this.heatmap=(0,i.fg)("platform_ufo_disable_ttvc_v1")?[]:this.getCleanHeatmap(),this.heatmapNext=this.getCleanHeatmap(),this.multiHeatmap=new E({viewport:this.viewport,revisions:v(),devToolsEnabled:this.devToolsEnabled}),this.totalTime=0,this.componentsLog={},this.vcRatios={}}getCleanHeatmap(){return Array(this.arraySize).fill("").map((()=>Array(this.arraySize).fill(0)))}setViewportSize(){this.viewport.w=l(),this.viewport.h=u()}applyChangesToHeatMap(e,t,r){const{l:n,t:i,r:s,b:o}=e,a=r;for(let e=i;e{e[t]=null})),e}detachAbortListeners(){this.unbind.forEach((e=>e())),this.unbind=[]}measureStart(){this._startMeasureTimestamp=performance.now()}measureStop(){-1!==this._startMeasureTimestamp&&(this.totalTime+=performance.now()-this._startMeasureTimestamp,this._startMeasureTimestamp=-1)}}(0,n.Z)(R,"VCParts",["25","50","75","80","85","90","95","98","99"])},71781:(e,t,r)=>{"use strict";r.d(t,{T:()=>i}),r(67294);const n="data-media-vc-wrapper";function i(e){for(;e;){if(e instanceof Element&&e.hasAttribute(n))return!0;e=e.parentNode}return!1}},45204:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=function({target:e,attributeName:t}){return e instanceof Element&&("class"===t||"style"===t)&&"true"===e.getAttribute("data-vc-nvs")}},68968:(e,t,r)=>{"use strict";r.d(t,{fg:()=>G});var n=r(4942),i=r(90250),s=r(56387);const o="@all-features";class a{constructor(){(0,n.Z)(this,"eventToValue",new Map),this.emitter=new s.EventEmitter2}onGateUpdated(e,t,r,n){const i=r(e,{...n,fireGateExposure:!1});void 0===this.eventToValue.get(t)&&this.eventToValue.set(t,i);const s=()=>{const i=r(e,{...n,fireGateExposure:!1});this.eventToValue.get(t)!==i&&(this.eventToValue.set(t,i),t(i))};return this.emitter.on(e,s),()=>{this.emitter.off(e,s)}}onExperimentValueUpdated(e,t,r,n,i,s){const o=`${e}.${t}`,a=i(e,t,r,{...s,fireExperimentExposure:!1});void 0===this.eventToValue.get(n)&&this.eventToValue.set(n,a);const c=()=>{const o=i(e,t,r,{...s,fireExperimentExposure:!1});this.eventToValue.get(n)!==o&&(this.eventToValue.set(n,o),n(o))};return this.emitter.on(o,c),()=>{this.emitter.off(o,c)}}onAnyUpdated(e){return this.emitter.on(o,e),()=>{this.emitter.off(o,e)}}anyUpdated(){this.emitter.emit(o),this.emitter.eventNames().filter((e=>e!==o)).forEach((e=>{this.emitter.emit(e)}))}}var c=r(38031);let l=function(e){return e.Error="Error",e.LocalOverride="LocalOverride",e.Unrecognized="Unrecognized",e.Uninitialized="Uninitialized",e.NetworkNotModified="NetworkNotModified",e.Network="Network",e.InvalidBootstrap="InvalidBootstrap",e.Bootstrap="Bootstrap",e.Cache="Cache",e.Unknown="Unknown",e}({}),u=function(e){return e.Development="development",e.Staging="staging",e.Production="production",e}({}),d=function(e){return e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e}({});const h=e=>({perimeter:(0,c.n)()?d.FEDRAMP_MODERATE:d.COMMERCIAL,...e}),p=(e,t)=>{if(!e&&!t)return!0;if(!e||!t)return!1;const r=Object.entries(e),n=Object.entries(t);if(r.length!==n.length)return!1;const i=([e],[t])=>e.localeCompare(t);r.sort(i),n.sort(i);for(let e=0;e{const r={customIDs:e,custom:t};return e.atlassianAccountId&&(r.userID=e.atlassianAccountId),r},f=Object.entries(l).map((([e,t])=>[e.toLowerCase(),t])),g=e=>{var t,r,n;const i=e.reason.toLowerCase();return{reason:null!==(t=null===(r=f.find((([e])=>i.includes(e))))||void 0===r?void 0:r[1])&&void 0!==t?t:l.Unknown,time:null!==(n=e.receivedAt)&&void 0!==n?n:Date.now()}};class v{static fromExperiment(e){var t,r;const n=new v(e.name,e.value,e.ruleID,g(e.details),null===(t=e.__evaluation)||void 0===t?void 0:t.secondary_exposures,null!==(r=e.groupName)&&void 0!==r?r:void 0);return n.experiment=e,n}constructor(e,t,r,n,i=[],s="",o=null){this.value=t,this._name=e,this._ruleID=r,this._secondaryExposures=i,this._allocatedExperimentName=s,this._evaluationDetails=n,this._onDefaultValueFallback=o}get(e,t,r){var n;const i=this.getValue(e,t);if(null==i)return t;const s=Array.isArray(t)?"array":typeof t,o=Array.isArray(i)?"array":typeof i;var a;return r?r(i)?(this.fireExposure(e),i):(null===(a=this._onDefaultValueFallback)||void 0===a||a.call(this,this,e,s,o),t):null==t||s===o?(this.fireExposure(e),i):(null===(n=this._onDefaultValueFallback)||void 0===n||n.call(this,this,e,s,o),t)}getValue(e,t){return null==e?this.value:(null==t&&(t=null),null==this.value[e]?t:(this.fireExposure(e),this.value[e]))}fireExposure(e){this.experiment&&this.experiment.get(e)}}class y{static fromLayer(e){var t,r,n,i;return new y(e.name,e.__value,e.ruleID,g(e.details),((t,r)=>e.get(r)),null===(t=e.__evaluation)||void 0===t?void 0:t.secondary_exposures,null===(r=e.__evaluation)||void 0===r?void 0:r.undelegated_secondary_exposures,null===(n=e.__evaluation)||void 0===n?void 0:n.allocated_experiment_name,null===(i=e.__evaluation)||void 0===i?void 0:i.explicit_parameters)}constructor(e,t,r,n,i=null,s=[],o=[],a="",c=[]){this._logParameterFunction=i,this._name=e,this._value=JSON.parse(JSON.stringify(null!=t?t:{})),this._ruleID=null!=r?r:"",this._evaluationDetails=n,this._secondaryExposures=s,this._undelegatedSecondaryExposures=o,this._allocatedExperimentName=a,this._explicitParameters=c}get(e,t,r){const n=this._value[e];if(null==n)return t;const i=()=>(this._logLayerParameterExposure(e),n);return r?r(n)?i():t:null==t||typeof n==typeof t&&Array.isArray(t)===Array.isArray(n)?i():t}getValue(e,t){null==t&&(t=null);const r=this._value[e];return null!=r&&this._logLayerParameterExposure(e),null!=r?r:t}_logLayerParameterExposure(e){var t;null===(t=this._logParameterFunction)||void 0===t||t.call(this,this,e)}}const b="4.25.0";class w extends Error{constructor(e){super(e)}}class E{static async fetchClientSdk(e){const{targetApp:t}=e,r=`/api/v2/frontend/clientSdkKey/${t}`;try{return await this.fetchRequest(r,"GET",e)}catch(e){if(e instanceof Error)throw e;throw Error("Failed to retrieve client sdk key")}}static async fetchExperimentValues(e,t,r){const n={identifiers:t,customAttributes:r,targetApp:e.targetApp};try{return await this.fetchRequest("/api/v2/frontend/experimentValues","POST",e,n)}catch(e){if(e instanceof Error)throw e;throw Error("Failed to retrieve experiment values")}}static async handleResponseError(e){if(!e.ok){const t=await e.text();throw new w(`Non 2xx response status received, status: ${e.status}, body: ${JSON.stringify(t)}`)}if(204===e.status)throw new w("Unexpected 204 response")}static async extractResponseBody(e){const t=await e.text();return JSON.parse(t)}static getBaseUrl(e,t=!1,r){if(t)return"/gateway/api/flags";if(r===d.FEDRAMP_MODERATE)switch(e){case u.Production:return"https://api.atlassian-us-gov-mod.com/flags";case u.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw new Error(`Invalid environment "${e}" for "${r}" perimeter`)}else{if(r!==d.COMMERCIAL)throw new Error(`Invalid perimeter "${r}"`);switch(e){case u.Development:return"https://api.dev.atlassian.com/flags";case u.Staging:return"https://api.stg.atlassian.com/flags";default:return"https://api.atlassian.com/flags"}}}static async fetchRequest(e,t,r,n){const i=E.getBaseUrl(r.environment,r.useGatewayURL,r.perimeter),s=r.fetchTimeoutMs||5e3;let o;if(AbortSignal.timeout)o=AbortSignal.timeout(s);else if(AbortController){const e=new AbortController;o=e.signal,setTimeout((()=>e.abort()),s)}const a=await fetch(`${i}${e}`,{method:t,headers:{"Content-Type":"application/json","X-Client-Name":"feature-gate-js-client","X-Client-Version":b,"X-API-KEY":r.apiKey},signal:o,...n&&{body:JSON.stringify(n)}});return await this.handleResponseError(a),await this.extractResponseBody(a)}}class _ extends i.DataAdapterCore{constructor(){super("NoFetchDataAdapter","nofetch"),(0,n.Z)(this,"bootstrapResult",null)}setBootstrapData(e){this.bootstrapResult=e?{source:"Bootstrap",data:JSON.stringify(e),receivedAt:Date.now(),stableID:i.StableID.get(this._getSdkKey()),fullUserHash:null}:null}async prefetchData(e,t){}async getDataAsync(e,t,r){return this.bootstrapResult&&{...this.bootstrapResult,fullUserHash:(0,i._getFullUserHash)(t)}}getDataSync(e){return this.bootstrapResult&&{...this.bootstrapResult,fullUserHash:(0,i._getFullUserHash)(e)}}async _fetchFromNetwork(e,t,r){return null}_getCacheKey(e){const t=(0,i._getStorageKey)(this._getSdkKey(),e);return`${i.DataAdapterCachePrefix}.${this._cacheSuffix}.${t}`}_isCachedResultValidFor204(e,t){return!1}setDataLegacy(e,t){super.setData(e,t)}toJSON(){const e={...this};return delete e._options,delete e._inMemoryCache,delete e.bootstrapResult,e}}var O=r(13328);const I="LocalOverride:Recognized",S="STATSIG_OVERRIDES";class T{constructor(){this._overrides={gates:{},configs:{},layers:{}}}parseStoredOverrides(e){try{const e=window.localStorage.getItem(S);return e?JSON.parse(e):{gates:{},configs:{},layers:{}}}catch{return{gates:{},configs:{},layers:{}}}}mergeOverrides(...e){const t={gates:{},configs:{},layers:{}};for(const r of e){for(const[e,n]of Object.entries(r.gates))t.gates[e]=n;for(const[e,n]of Object.entries(r.configs))t.configs[e]=n;for(const[e,n]of Object.entries(r.layers))t.layers[e]=n}return t}initFromStoredOverrides(){this._overrides=this.mergeOverrides(this.parseStoredOverrides("STATSIG_JS_LITE_LOCAL_OVERRIDES"),this.parseStoredOverrides(S))}saveOverrides(){window.localStorage.setItem(S,JSON.stringify(this._overrides))}getOverrides(){return Object.fromEntries(Object.entries(this._overrides).map((([e,t])=>{const r={};for(const[e,n]of Object.entries(t))Object.prototype.hasOwnProperty.call(t,(0,O._DJB2)(e))&&(r[e]=n);return[e,r]})))}setOverrides(e){const t={gates:{},configs:{},layers:{},...e};for(const e of Object.values(t))for(const[t,r]of Object.entries(e)){const n=(0,O._DJB2)(t);Object.prototype.hasOwnProperty.call(e,n)||(e[n]=r)}this._overrides=t,this.saveOverrides()}overrideGate(e,t){this._overrides.gates[e]=t,this._overrides.gates[(0,O._DJB2)(e)]=t,this.saveOverrides()}removeGateOverride(e){delete this._overrides.gates[e],delete this._overrides.gates[(0,O._DJB2)(e)],this.saveOverrides()}getGateOverride(e,t){var r;const n=null!==(r=this._overrides.gates[e.name])&&void 0!==r?r:this._overrides.gates[(0,O._DJB2)(e.name)];return null==n?null:{...e,value:n,details:{...e.details,reason:I}}}overrideDynamicConfig(e,t){this._overrides.configs[e]=t,this._overrides.configs[(0,O._DJB2)(e)]=t,this.saveOverrides()}removeDynamicConfigOverride(e){delete this._overrides.configs[e],delete this._overrides.configs[(0,O._DJB2)(e)],this.saveOverrides()}getDynamicConfigOverride(e,t){return this._getConfigOverride(e,this._overrides.configs)}overrideExperiment(e,t){this._overrides.configs[e]=t,this._overrides.configs[(0,O._DJB2)(e)]=t,this.saveOverrides()}removeExperimentOverride(e){delete this._overrides.configs[e],delete this._overrides.configs[(0,O._DJB2)(e)],this.saveOverrides()}getExperimentOverride(e,t){return this._getConfigOverride(e,this._overrides.configs)}overrideLayer(e,t){this._overrides.layers[e]=t,this._overrides.layers[(0,O._DJB2)(e)]=t,this.saveOverrides()}removeLayerOverride(e){delete this._overrides.layers[e],delete this._overrides.layers[(0,O._DJB2)(e)],this.saveOverrides()}removeAllOverrides(){this._overrides={gates:{},configs:{},layers:{}},window.localStorage.removeItem(S)}getLayerOverride(e,t){var r;const n=null!==(r=this._overrides.layers[e.name])&&void 0!==r?r:this._overrides.layers[(0,O._DJB2)(e.name)];return null==n?null:{...e,__value:n,get:(0,O._makeTypedGet)(e.name,n),details:{...e.details,reason:I}}}_getConfigOverride(e,t){var r;const n=null!==(r=t[e.name])&&void 0!==r?r:t[(0,O._DJB2)(e.name)];return null==n?null:{...e,value:n,get:(0,O._makeTypedGet)(e.name,n),details:{...e.details,reason:I}}}}const C="client-default-key";var A;class P{static isGateExists(e){return this.client.isGateExist(e)}static isExperimentExists(e){return this.client.isExperimentExist(e)}}A=P,(0,n.Z)(P,"client",new class{constructor(){(0,n.Z)(this,"initPromise",null),(0,n.Z)(this,"initCompleted",!1),(0,n.Z)(this,"initWithDefaults",!1),(0,n.Z)(this,"hasCheckGateErrorOccurred",!1),(0,n.Z)(this,"hasGetExperimentErrorOccurred",!1),(0,n.Z)(this,"hasGetExperimentValueErrorOccurred",!1),(0,n.Z)(this,"hasGetLayerErrorOccurred",!1),(0,n.Z)(this,"hasGetLayerValueErrorOccurred",!1),(0,n.Z)(this,"subscriptions",new a),(0,n.Z)(this,"dataAdapter",new _),(0,n.Z)(this,"overrideAdapter",new T),(0,n.Z)(this,"statsigValuesUpdated",(()=>{this.user&&this.statsigClient.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0}),this.subscriptions.anyUpdated()}))}async initialize(e,t,r){const n=h(e);if(this.initPromise)return p(n,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),this.initPromise;const i=performance.now();return this.initOptions=n,this.initPromise=this.init(n,t,r).then((()=>{this.initCompleted=!0,this.initWithDefaults=!0})).finally((()=>{const e=performance.now()-i;this.fireClientEvent(i,e,"initialize",this.initCompleted,n.apiKey)})),this.initPromise}async initializeWithProvider(e,t,r,n){const i=h(e);if(this.initPromise)return p(i,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),this.initPromise;const s=performance.now();return this.initOptions=i,this.provider=t,this.provider.setClientVersion(b),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback),this.initPromise=this.initWithProvider(i,t,r,n).then((()=>{this.initCompleted=!0,this.initWithDefaults=!0})).finally((()=>{const e=performance.now()-s;this.fireClientEvent(s,e,"initializeWithProvider",this.initCompleted,t.getApiKey?t.getApiKey():void 0)})),this.initPromise}applyUpdateCallback(e){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(e.experimentValues),this.dataAdapter.setData(JSON.stringify(e.experimentValues)),this.statsigValuesUpdated())}catch(e){console.warn("Error when attempting to apply update",e)}}fireClientEvent(e,t,r,n,i=void 0){var s;null===(s=this.initOptions.analyticsWebClient)||void 0===s||s.then((s=>{const o={targetApp:this.initOptions.targetApp,clientVersion:b,success:n,startTime:e,totalTime:t,...i&&{apiKey:i}};s.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:o,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})})).catch((e=>{this.initOptions.environment!==u.Production&&console.error("Analytics web client promise did not resolve",e)}))}async initializeFromValues(e,t,r,n={}){const i=h(e);if(this.initPromise)return p(i,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),this.initPromise;Object.prototype.hasOwnProperty.call(n,"has_updates")||(n.has_updates=!0);const s=performance.now();return this.initOptions=i,this.initPromise=this.initFromValues(i,t,r,n).then((()=>{this.initCompleted=!0,this.initWithDefaults=!0})).finally((()=>{const e=performance.now()-s;this.fireClientEvent(s,e,"initializeFromValues",this.initCompleted)})),this.initPromise}assertInitialized(e){if(!e)throw new Error("Client must be initialized before using this method")}async updateUser(e,t,r){this.assertInitialized(this.statsigClient);const n=h(e);await this.updateUserUsingInitializeValuesProducer((()=>E.fetchExperimentValues(n,t,r).then((({experimentValues:e,customAttributes:t})=>({experimentValues:e,customAttributesFromFetch:t})))),t,r)}async updateUserWithProvider(e,t){if(this.assertInitialized(this.statsigClient),!this.provider)throw new Error("Cannot update user using provider as the client was not initialised with a provider");await this.provider.setProfile(this.initOptions,e,t),await this.updateUserUsingInitializeValuesProducer((()=>this.provider.getExperimentValues()),e,t)}async updateUserWithValues(e,t,r={}){this.assertInitialized(this.statsigClient),await this.updateUserUsingInitializeValuesProducer((()=>Promise.resolve({experimentValues:r,customAttributesFromFetch:t})),e,t)}initializeCalled(){return null!=this.initPromise}initializeCompleted(){return this.initCompleted}checkGate(e,t={}){try{this.assertInitialized(this.statsigClient);const{fireGateExposure:r=!0}=t;return this.statsigClient.checkGate(e,{disableExposureLog:!r})}catch(t){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:e,error:t}),this.hasCheckGateErrorOccurred=!0),!1}}isGateExist(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getFeatureGate(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error(`Error occurred when trying to check FeatureGate: ${e}`),!0}}isExperimentExist(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getExperiment(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error(`Error occurred when trying to check Experiment: ${e}`),!0}}manuallyLogGateExposure(e){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(e)}getExperiment(e,t={}){try{this.assertInitialized(this.statsigClient);const{fireExperimentExposure:r=!0}=t;return v.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!r}))}catch(t){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:e,error:t}),this.hasGetExperimentErrorOccurred=!0),new v(e,{},"",{time:Date.now(),reason:l.Error})}}getExperimentValue(e,t,r,n={}){const i=this.getExperiment(e,n);try{const{typeGuard:e}=n;return i.get(t,r,e)}catch(t){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),this.hasGetExperimentValueErrorOccurred=!0),r}}manuallyLogExperimentExposure(e){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(e)}manuallyLogLayerExposure(e,t){var r;this.assertInitialized(this.statsigClient),null===(r=this.statsigClient.getLayer(e))||void 0===r||r.get(t)}shutdownStatsig(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}overrideGate(e,t){this.assertInitialized(this.statsigClient),this.overrideAdapter.overrideGate(e,t),this.user&&this.statsigClient.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0}),this.statsigValuesUpdated()}clearGateOverride(e){this.assertInitialized(this.statsigClient),this.overrideAdapter.removeGateOverride(e),this.statsigValuesUpdated()}overrideConfig(e,t){this.assertInitialized(this.statsigClient),this.overrideAdapter.overrideDynamicConfig(e,t),this.statsigValuesUpdated()}clearConfigOverride(e){this.assertInitialized(this.statsigClient),this.overrideAdapter.removeDynamicConfigOverride(e),this.statsigValuesUpdated()}setOverrides(e){this.assertInitialized(this.statsigClient),this.overrideAdapter.setOverrides(e),this.statsigValuesUpdated()}getOverrides(){return this.assertInitialized(this.statsigClient),this.overrideAdapter.getOverrides()}clearAllOverrides(){this.assertInitialized(this.statsigClient),this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}isCurrentUser(e,t){return p(this.currentIdentifiers,e)&&p(this.currentAttributes,t)}onGateUpdated(e,t,r={}){return this.subscriptions.onGateUpdated(e,(n=>{const{fireGateExposure:i=!0}=r;i&&this.manuallyLogGateExposure(e);try{t(n)}catch(t){console.warn(`Error calling callback for gate ${e} with value ${n}`,t)}}),this.checkGate.bind(this),r)}onExperimentValueUpdated(e,t,r,n,i={}){return this.subscriptions.onExperimentValueUpdated(e,t,r,(t=>{const{fireExperimentExposure:r=!0}=i;r&&this.manuallyLogExperimentExposure(e);try{n(t)}catch(r){console.warn(`Error calling callback for experiment ${e} with value ${t}`,r)}}),this.getExperimentValue.bind(this),i)}onAnyUpdated(e){return this.subscriptions.onAnyUpdated(e)}async init(e,t,r){const n={...e};let i,s;try{const o=E.fetchClientSdk(e).then((e=>n.sdkKey=e.clientSdkKey)),a=E.fetchExperimentValues(e,t,r),[,c]=await Promise.all([o,a]);i=c.experimentValues,s=c.customAttributes}catch(e){throw e instanceof Error&&console.error(`Error occurred when trying to fetch the Feature Gates client values, error: ${null==e?void 0:e.message}`),console.warn("Initialising Statsig client without values"),await this.initFromValues(n,t,r),e}return this.initFromValues(n,t,s,i)}async initWithProvider(e,t,r,n){const i={...e,disableCurrentPageLogging:!0};let s,o;try{await t.setProfile(e,r,n);const a=t.getClientSdkKey().then((e=>i.sdkKey=e)),c=t.getExperimentValues(),[,l]=await Promise.all([a,c]);s=l.experimentValues,o=l.customAttributesFromFetch}catch(e){throw e instanceof Error&&console.error(`Error occurred when trying to fetch the Feature Gates client values, error: ${null==e?void 0:e.message}`),console.warn("Initialising Statsig client without values"),await this.initFromValues(i,r,n),e}return this.initFromValues(i,r,o,s)}async initFromValues(e,t,r,n={}){var s;this.overrideAdapter.initFromStoredOverrides(),this.user=m(t,r),this.currentIdentifiers=t,this.currentAttributes=r;const o=(e=>{const{api:t,disableCurrentPageLogging:r,loggingIntervalMillis:n,loggingBufferMaxSize:i,localMode:s,eventLoggingApi:o,eventLoggingApiForRetries:a,disableLocalStorage:c,ignoreWindowUndefined:l,disableAllLogging:u,initTimeoutMs:d,disableNetworkKeepalive:h,overrideStableID:p,disableErrorLogging:m,disableAutoMetricsLogging:f,...g}=e;return{...g,networkConfig:{api:t,logEventUrl:o?o+"rgstr":void 0,logEventFallbackUrls:a?[a]:void 0,preventAllNetworkTraffic:s||!l&&"undefined"==typeof window},includeCurrentPageUrlWithEvents:!r,loggingIntervalMs:n,loggingBufferMaxSize:i,disableStorage:c,disableLogging:u}})(e);o.sdkKey||(o.sdkKey=C),null!==(s=o.networkConfig)&&void 0!==s&&s.logEventUrl||(o.networkConfig={...o.networkConfig,logEventUrl:"https://xp.atlassian.com/v1/rgstr"}),o.perimeter===d.FEDRAMP_MODERATE&&(o.disableLogging=!0);const{sdkKey:a,environment:c,updateUserCompletionCallback:l,perimeter:u,...h}=o,p={...h,environment:{tier:c},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter};try{this.statsigClient=new i.StatsigClient(a,this.user,p),this.dataAdapter.setBootstrapData(n),await this.statsigClient.initializeAsync()}catch(e){throw e instanceof Error&&console.error(`Error occurred when trying to initialise the Statsig client, error: ${null==e?void 0:e.message}`),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new i.StatsigClient(C,this.user,p),this.dataAdapter.setBootstrapData(),await this.statsigClient.initializeAsync(),this.initWithDefaults=!0,e}}async updateUserUsingInitializeValuesProducer(e,t,r){if(this.assertInitialized(this.statsigClient),!this.initPromise)throw new Error("The client must be initialized before you can update the user.");if(this.isCurrentUser(t,r))return this.initPromise;const n=this.initPromise;try{await this.initPromise}catch(e){}const i=e(),s=this.updateStatsigClientUser(i,t,r);return this.initPromise=s.catch((async()=>{this.initPromise=n,this.provider&&await this.provider.setProfile(this.initOptions,this.currentIdentifiers,this.currentAttributes)})),s}async updateStatsigClientUser(e,t,r){var n,i;let s,o;this.assertInitialized(this.statsigClient);try{s=await e,o=m(t,s.customAttributesFromFetch)}catch(e){var a,c;const t=e instanceof Error?e.message:JSON.stringify(e);throw null===(a=(c=this.initOptions).updateUserCompletionCallback)||void 0===a||a.call(c,!1,t),e}let l=!0,u=null;try{this.dataAdapter.setBootstrapData(s.experimentValues),this.user=o,await this.statsigClient.updateUserAsync(this.user)}catch(e){l=!1,u=String(e)}if(null===(n=this.initOptions)||void 0===n||null===(i=n.updateUserCompletionCallback)||void 0===i||i.call(n,l,u),!l)throw new Error("Failed to update user. An unexpected error occured.");this.currentIdentifiers=t,this.currentAttributes=r,this.subscriptions.anyUpdated()}getPackageVersion(){return b}getLayer(e,t={}){try{this.assertInitialized(this.statsigClient);const{fireLayerExposure:r=!0}=t;return y.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!r}))}catch(t){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:e,error:t}),this.hasGetLayerErrorOccurred=!0),y.fromLayer((0,i._makeLayer)(e,{reason:"Error"},null))}}getLayerValue(e,t,r,n={}){const i=this.getLayer(e,n);try{const{typeGuard:e}=n;return i.get(t,r,e)}catch(t){return this.hasGetLayerValueErrorOccurred||(console.warn({msg:"An error has occurred getting the layer value. Only the first occurrence of this error is logged.",layerName:e,defaultValue:r,options:n,error:t}),this.hasGetLayerValueErrorOccurred=!0),r}}}),(0,n.Z)(P,"hasCheckGateErrorOccurred",!1),(0,n.Z)(P,"hasGetExperimentValueErrorOccurred",!1),(0,n.Z)(P,"checkGate",((e,t)=>{try{if(window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getFeatureFlagOverride){const t=window.__CRITERION__.getFeatureFlagOverride(e);if(void 0!==t)return t}}catch(t){A.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate from criterion override. Only the first occurrence of this error is logged.",gateName:e,error:t}),A.hasCheckGateErrorOccurred=!0)}return A.client.checkGate(e,t)})),(0,n.Z)(P,"getExperimentValue",((e,t,r,n)=>{try{if("undefined"!=typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getExperimentValueOverride){const r=window.__CRITERION__.getExperimentValueOverride(e,t);if(null!=r)return r}}catch(t){return A.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value from criterion override. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:n,error:t}),A.hasGetExperimentValueErrorOccurred=!0),r}return A.client.getExperimentValue(e,t,r,n)})),(0,n.Z)(P,"initializeCalled",A.client.initializeCalled.bind(A.client)),(0,n.Z)(P,"initializeCompleted",A.client.initializeCompleted.bind(A.client)),(0,n.Z)(P,"initialize",A.client.initialize.bind(A.client)),(0,n.Z)(P,"initializeWithProvider",A.client.initializeWithProvider.bind(A.client)),(0,n.Z)(P,"initializeFromValues",A.client.initializeFromValues.bind(A.client)),(0,n.Z)(P,"manuallyLogGateExposure",A.client.manuallyLogGateExposure.bind(A.client)),(0,n.Z)(P,"getExperiment",A.client.getExperiment.bind(A.client)),(0,n.Z)(P,"manuallyLogExperimentExposure",A.client.manuallyLogExperimentExposure.bind(A.client)),(0,n.Z)(P,"manuallyLogLayerExposure",A.client.manuallyLogLayerExposure.bind(A.client)),(0,n.Z)(P,"shutdownStatsig",A.client.shutdownStatsig.bind(A.client)),(0,n.Z)(P,"overrideGate",A.client.overrideGate.bind(A.client)),(0,n.Z)(P,"clearGateOverride",A.client.clearGateOverride.bind(A.client)),(0,n.Z)(P,"overrideConfig",A.client.overrideConfig.bind(A.client)),(0,n.Z)(P,"clearConfigOverride",A.client.clearConfigOverride.bind(A.client)),(0,n.Z)(P,"setOverrides",A.client.setOverrides.bind(A.client)),(0,n.Z)(P,"getOverrides",A.client.getOverrides.bind(A.client)),(0,n.Z)(P,"clearAllOverrides",A.client.clearAllOverrides.bind(A.client)),(0,n.Z)(P,"isCurrentUser",A.client.isCurrentUser.bind(A.client)),(0,n.Z)(P,"onGateUpdated",A.client.onGateUpdated.bind(A.client)),(0,n.Z)(P,"onExperimentValueUpdated",A.client.onExperimentValueUpdated.bind(A.client)),(0,n.Z)(P,"onAnyUpdated",A.client.onAnyUpdated.bind(A.client)),(0,n.Z)(P,"updateUser",A.client.updateUser.bind(A.client)),(0,n.Z)(P,"updateUserWithProvider",A.client.updateUserWithProvider.bind(A.client)),(0,n.Z)(P,"updateUserWithValues",A.client.updateUserWithValues.bind(A.client)),(0,n.Z)(P,"getPackageVersion",A.client.getPackageVersion.bind(A.client)),(0,n.Z)(P,"getLayer",A.client.getLayer.bind(A.client)),(0,n.Z)(P,"getLayerValue",A.client.getLayerValue.bind(A.client));let k=P;if("undefined"!=typeof window)if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=P;else{var x,R;k=window.__FEATUREGATES_JS__;const e=(null===(x=k)||void 0===x||null===(R=x.getPackageVersion)||void 0===R?void 0:R.call(x))||"4.10.0 or earlier";if(e!==b){const t=`Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ${e} when module version ${b} was loading.`;console.warn(t)}}const N=k;var M,D,L,j;const Z=!(void 0!==(null===globalThis||void 0===globalThis||null===(M=globalThis.process)||void 0===M||null===(D=M.env)||void 0===D?void 0:D.JEST_WORKER_ID))&&"production"!==(null===globalThis||void 0===globalThis||null===(L=globalThis.process)||void 0===L||null===(j=L.env)||void 0===j?void 0:j.NODE_ENV),V=(...e)=>{Z&&console.debug(...e)},U="@atlaskit/platform-feature-flags",F="__PLATFORM_FEATURE_FLAGS__",B=void 0!=={}&&void 0!=={},$=!!B&&"true"==={}.ENABLE_PLATFORM_FF||!!B&&"true"==={}.STORYBOOK_ENABLE_PLATFORM_FF,z="undefined"!=typeof window?window:globalThis;function G(e){return function(e){if($)return V('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',U,e),!0;try{var t,r,n;if(void 0===(null===(t=z[F])||void 0===t?void 0:t.booleanResolver)||null===(null===(r=z[F])||void 0===r?void 0:r.booleanResolver))return N.checkGate(e);const i=null===(n=z[F])||void 0===n?void 0:n.booleanResolver(e);return"boolean"!=typeof i?(console.warn(`${e} resolved to a non-boolean value, returning false for safety`),!1):i}catch(e){return!1}}(e)}z[F]=z[F]||{booleanResolver:void 0}},18395:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var r=t.type,n=t.listener,i=t.options;return e.addEventListener(r,n,i),function(){e.removeEventListener(r,n,i)}}},39728:(e,t,r)=>{"use strict";t.ak=void 0;var n=r(70133);Object.defineProperty(t,"ak",{enumerable:!0,get:function(){return n.bind}});r(18395)},12919:(e,t)=>{"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0>>1,i=e[n];if(!(0>>1;ns(c,r))ls(u,c)?(e[n]=u,e[l]=r,n=l):(e[n]=c,e[a]=r,n=a);else{if(!(ls(u,r)))break e;e[n]=u,e[l]=r,n=l}}}return t}function s(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var l=[],u=[],d=1,h=null,p=3,m=!1,f=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,r(l,t)}t=n(u)}}function E(e){if(g=!1,w(e),!f)if(null!==n(l))f=!0,N(_);else{var t=n(u);null!==t&&M(E,t.startTime-e)}}function _(e,r){f=!1,g&&(g=!1,y(T),T=-1),m=!0;var s=p;try{for(w(r),h=n(l);null!==h&&(!(h.expirationTime>r)||e&&!P());){var o=h.callback;if("function"==typeof o){h.callback=null,p=h.priorityLevel;var a=o(h.expirationTime<=r);r=t.unstable_now(),"function"==typeof a?h.callback=a:h===n(l)&&i(l),w(r)}else i(l);h=n(l)}if(null!==h)var c=!0;else{var d=n(u);null!==d&&M(E,d.startTime-r),c=!1}return c}finally{h=null,p=s,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var O,I=!1,S=null,T=-1,C=5,A=-1;function P(){return!(t.unstable_now()-Ae||125o?(e.sortIndex=s,r(u,e),null===n(l)&&e===n(u)&&(g?(y(T),T=-1):g=!0,M(E,s-o))):(e.sortIndex=a,r(l,e),f||m||(f=!0,N(_))),e},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},87376:(e,t,r)=>{"use strict";e.exports=r(12919)},28595:(e,t,r)=>{"use strict";var n=r(28336);e.exports=function e(t,r){return void 0===r&&(r=!0),t&&"object"==typeof t?function(t,r){return Object.keys(t).forEach((function(n){t[n]=e(t[n],r)})),t}(t,r):Array.isArray(t)?function(t,r){return t.forEach((function(n,i){t[i]=e(n,r)})),t}(t,r):n.is(t,r)?n.parse(t):t}},28336:(e,t)=>{"use strict";var r=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(e){var t=[1,5,6,7,11,12],n=r.exec(e),i=0;if(!n)return new Date(e);for(var s,o=0;s=t[o];o++)n[s]=parseInt(n[s],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?i=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(i=60*n[11]+n[12],"+"===n[10]&&(i=0-i));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+i,n[7],n[8]);return new Date(a)},t.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&r.test(e)}},86031:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},s=function(){function e(){}return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},e}();t.default=s,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(2))&&n.__esModule?n:{default:n},s=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=i.default.find((function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.isMobile=function(){return this.test(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i)},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.parse=function(){return this.parseBrowser(),this},t.getResult=function(){return Object.assign({},this.parsedResult)},e}();t.default=s,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&r[1]||""},o=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},a=/version\/(\d+(\.?_?\d+)+)/i,c=function(e,t){void 0===e&&(e=[]);for(var r,i=n(e);!(r=i()).done;){var o=r.value,a=s(o,t);if(a)return a}return null},l=[{test:[/googlebot/i],describe:function(e){return{name:"Googlebot",version:c([/googlebot\/(\d+(\.\d+))/i,a],e)}}},{test:[/opera/i],describe:function(e){return{name:"Opera",version:c([a,/(?:opera)[\s/](\d+(\.?_?\d+)+)/i],e)}}},{test:[/opr\/|opios/i],describe:function(e){return{name:"Opera",version:c([/(?:opr|opios)[\s/](\S+)/i,a],e)}}},{test:[/SamsungBrowser/i],describe:function(e){return{name:"Samsung Internet for Android",version:c([a,/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i],e)}}},{test:[/Whale/i],describe:function(e){return{name:"NAVER Whale Browser",version:c([a,/(?:whale)[\s/](\d+(?:\.\d+)+)/i],e)}}},{test:[/coast/i],describe:function(e){return{name:"Opera Coast",version:c([a,/(?:coast)[\s/](\d+(\.?_?\d+)+)/i],e)}}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){return{name:"Opera Touch",version:c([/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,a],e)}}},{test:[/msie|trident/i],describe:function(e){return{name:"Internet Explorer",version:c([/(?:msie |rv:)(\d+(\.?_?\d+)+)/i],e)}}},{test:[/\sedg\//i],describe:function(e){return{name:"Microsoft Edge",version:c([/\sedg\/(\d+(\.?_?\d+)+)/i],e)}}},{test:[/edg([ea]|ios)/i],describe:function(e){return{name:"Microsoft Edge",version:o(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e)}}},{test:[/vivaldi/i],describe:function(e){return{name:"Vivaldi",version:c([/vivaldi\/(\d+(\.?_?\d+)+)/i],e)}}},{test:[/tizen/i],describe:function(e){return{name:"Tizen",version:c([/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,a],e)}}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){return{name:"Firefox",version:c([/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i],e)}}},{test:[/electron/i],describe:function(e){return{name:"Electron",version:c([/(?:electron)\/(\d+(\.?_?\d+)+)/i],e)}}},{test:[/chromium/i],describe:function(e){return{name:"Chromium",version:c([/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,a],e)}}},{test:[/chrome|crios|crmo/i],describe:function(e){return{name:"Chrome",version:c([/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i],e)}}},{test:[/GSA/i],describe:function(e){return{name:"Google Search",version:c([/(?:GSA)\/(\d+(\.?_?\d+)+)/i],e)}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){return{name:"Android Browser",version:c([a],e)}}},{test:[/safari|applewebkit/i],describe:function(e){return{name:"Safari",version:c([a],e)}}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:s(t,e),version:o(t,e)}}}];t.default=l,e.exports=t.default}])},24262:(e,t,r)=>{"use strict";function n(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}r.d(t,{Z:()=>n})},13882:(e,t,r)=>{"use strict";function n(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}r.d(t,{Z:()=>n})},27003:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(19013),i=r(24262),s=r(13882);function o(e){(0,s.Z)(1,arguments);var t=(0,n.Z)(e);return t.setHours(0,0,0,0),t}var a=864e5;function c(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function l(e,t){(0,s.Z)(2,arguments);var r=(0,n.Z)(e),l=(0,n.Z)(t),u=c(r,l),d=Math.abs(function(e,t){(0,s.Z)(2,arguments);var r=o(e),n=o(t),c=r.getTime()-(0,i.Z)(r),l=n.getTime()-(0,i.Z)(n);return Math.round((c-l)/a)}(r,l));r.setDate(r.getDate()-u*d);var h=u*(d-Number(c(r,l)===-u));return 0===h?0:h}},19013:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(71002),i=r(13882);function s(e){(0,i.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,n.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},44020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function i(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function s(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(r)||[],n=1;n{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),s=0;s{var n,i,s;void 0===(i="function"==typeof(n=s=function(){function e(){for(var e=0,t={};e{"use strict";r.d(t,{Z:()=>s});var n=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function i(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";const n=r(70610),i=r(44020),s=r(80500),o=r(92806),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?i(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const i="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!i&&u(r,e).includes(e.arrayFormatSeparator);r=s?u(r,e):r;const o=i||s?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=o};case"bracket-separator":return(t,r,n)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(n[t]=r?u(r,e):r);const s=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],s):n[t]=s};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const i of e.split("&")){if(""===i)continue;let[e,o]=s(t.decode?i.replace(/\+/g," "):i,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:u(o,t),r(u(e,t),o,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=m(r[e],t);else n[e]=m(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const i=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",i,"]"].join("")]:[...r,[l(t,e),"[",l(i,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[l(r,e),t,l(i,e)].join("")]:[[n,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),i={};for(const t of Object.keys(e))r(t)||(i[t]=e[t]);const s=Object.keys(i);return!1!==t.sort&&s.sort(t.sort),s.map((r=>{const i=e[r];return void 0===i?"":null===i?l(r,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":i.reduce(n(r),[]).join("&"):l(r,t)+"="+l(i,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=h(e.url).split("?")[0]||"",i=t.extract(e.url),s=t.parse(i,{sort:!1}),o=Object.assign(s,e.query);let c=t.stringify(o,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[a]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:i,query:s,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:i,query:o(s,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const i=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,i,n)}},57129:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,s,o=[];for(s in"string"!=typeof t&&(t="?"),e)if(r.call(e,s)){if((n=e[s])||null!=n&&!isNaN(n)||(n=""),s=i(s),n=i(n),null===s||null===n)continue;o.push(s+"="+n)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,i={};t=r.exec(e);){var s=n(t[1]),o=n(t[2]);null===s||null===o||s in i||(i[s]=o)}return i}},47418:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},41352:(e,t,r)=>{"use strict";r.d(t,{Z:()=>lr});var n=r(4942),i=r(71171),s=r.n(i),o=r(35768);class a{constructor(){(0,n.Z)(this,"_bindEventListeners",(()=>{document.addEventListener(this._visibilityChange,this._handleVisibilityChange,!1)})),(0,n.Z)(this,"_handleVisibilityChange",(()=>{const e=document[this._hidden];this._isHidden=e,this._callbacks.forEach((t=>t(e)))})),this._isHidden=!1,this._callbacks=new Map,this._hidden=void 0,this._visibilityChange=void 0,"undefined"!=typeof document&&(void 0!==document.hidden?(this._isHidden=document.hidden,this._hidden="hidden",this._visibilityChange="visibilitychange"):void 0!==document.msHidden?(this._isHidden=document.msHidden,this._hidden="msHidden",this._visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this._isHidden=document.webkitHidden,this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"),void 0!==document.addEventListener&&void 0!==this._hidden&&this._bindEventListeners())}addCallback(e,t){if("string"!=typeof e)throw new Error("Invalid name, must be string");if("function"!=typeof t)throw new Error("Invalid callback, must be function");this._callbacks.set(e,t)}removeCallback(e){this._callbacks.has(e)&&this._callbacks.delete(e)}getIsHidden(){return this._isHidden}}class c{constructor(){this._performance=window.performance}clearMarks(...e){this._performance&&this._performance.clearMarks&&this._performance.clearMarks(...e)}mark(...e){this._performance&&this._performance.mark&&this._performance.mark(...e)}getEntriesByName(...e){return this._performance&&this._performance.getEntriesByName?this._performance.getEntriesByName(...e):[]}getTimeOrigin(){return this._performance&&(this._performance.timeOrigin||this._performance.timing)?this._performance.timeOrigin||this._performance.timing.navigationStart:0}now(){return this._performance&&this._performance.now?this._performance.now():Date.now?Date.now():+new Date}isAvailable(){return!!(this._performance&&this._performance.clearMarks&&this._performance.mark&&this._performance.getEntriesByName&&this._performance.timing)}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;tt?`${e}.${t}`:e)),(0,n.Z)(this,"_getEventTimingByName",(e=>{const t=this._performance.getEntriesByName(e);return t[t.length-1]})),(0,n.Z)(this,"_getApdexFields",(e=>{const t=this._getApdexTimings(e),r=this._calculateApdex({duration:t.duration,threshold:e.threshold});return u(u({},t),{},{apdex:r})})),(0,n.Z)(this,"_getApdexTimings",(e=>{const t=this._getEventKey(e),r=`${t}-start`,n=e.startTime||this._getStartTime(e,r),i=e.stopTime||this._getStopTime();return this._cleanApdexState(t),{startTime:n,stopTime:i,duration:i-n}})),(0,n.Z)(this,"_getStartTime",((e,t)=>{let r;const n=this._performance.getTimeOrigin();return r=e.type===o.jM.INITIAL_LOAD?n:n+this._getEventTimingByName(t).startTime,r})),(0,n.Z)(this,"_getStopTime",(()=>this._performance.getTimeOrigin()+this._performance.now())),(0,n.Z)(this,"_cleanApdexState",(e=>{this._performance.clearMarks(`${e}-start`),this._performance.clearMarks(`${e}-stop`),this._startedEvents.delete(e)})),(0,n.Z)(this,"_getVisibilityFields",(e=>{let t;if(e.type===o.jM.INITIAL_LOAD)t=!this._wasPreviouslyHidden;else if(e.type===o.jM.TRANSITION){const r=this._getEventKey(e);t=this._isActiveEvents.get(r)}return(e.startTime||e.stopTime)&&(t=!this._pageVisibility.getIsHidden()),{isActiveTab:t}})),(0,n.Z)(this,"_calculateApdex",(({duration:e,threshold:t=this._threshold})=>{let r;return r=e<=t?1:e<=4*t?.5:0,r})),(0,n.Z)(this,"_validateStartEvent",(e=>{if(!e)throw new Error('Missing "event" in Apdex start event');if(!e.task)throw new Error('Missing "task" in Apdex start event');if("string"!=typeof e.task)throw new Error('Invalid "task" in Apdex start event');if(e.taskId&&"string"!=typeof e.taskId)throw new Error('Invalid "taskId" in Apdex start event')})),(0,n.Z)(this,"_validateStopEvent",(e=>{if(!e)throw new Error('Missing "event" in Apdex stop event');if(!e.task)throw new Error('Missing "task" in Apdex stop event');if("string"!=typeof e.task)throw new Error('Invalid "task" in Apdex stop event');if(e.taskId&&"string"!=typeof e.taskId)throw new Error('Invalid "taskId" in Apdex stop event');if(!e.type)throw new Error('Missing "type" in Apdex stop event');if(e.type&&!(0,o.P9)(o.jM,e.type))throw new Error('Invalid "type" in Apdex stop event');if(e.threshold&&"number"!=typeof e.threshold)throw new Error('Invalid "threshold" in Apdex stop event');if(!e.startTime&&e.type===o.jM.TRANSITION){const t=this._getEventKey(e);if(!this._startedEvents.has(t))throw new Error(`Apdex event transition "${t}" was not started`)}if(e.startTime&&!("number"==typeof e.startTime&&e.startTime>=0))throw new Error('Invalid "startTime" in Apdex stop event');if(e.stopTime&&"number"!=typeof e.stopTime)throw new Error('Invalid "stopTime" in Apdex stop event');if(e.stopTime<=e.startTime)throw new Error('"stopTime" should be greater than "startTime" in Apdex stop event')})),(0,n.Z)(this,"_shouldSendEvent",(e=>!!e&&"number"==typeof e.apdex)),(0,n.Z)(this,"_sendEvent",((e,t)=>{this._shouldSendEvent(e)&&this._onEvent({source:"ui",action:"readyForUser",actionSubject:"ui",attributes:u(u({},e.additionalAttributes),{},{task:e.task,taskId:e.taskId,type:e.type,threshold:e.threshold||this._threshold,apdex:e.apdex,startTime:e.startTime,stopTime:e.stopTime,duration:e.duration,isActiveTab:e.isActiveTab})},t)})),!e)throw new Error("Missing onEvent callback");if("function"!=typeof e)throw new Error("Invalid onEvent, must be function");if(!(t instanceof a))throw new Error("Invalid pageVisibility, must be PageVisibility class");this._startedEvents=new Map,this._performance=new c,this._onEvent=e,this._threshold=1e3,this._wasPreviouslyHidden=t.getIsHidden(),this._isActiveEvents=new Map,this._pageVisibility=t,this._pageVisibility.addCallback("apdexEvent",(e=>{this.onVisibilityChange(!e)}))}start(e){if(this._validateStartEvent(e),!this._performance.isAvailable())return;const t=this._getEventKey(e),r=`${t}-start`;this._startedEvents.set(t,!0),this._isActiveEvents.set(t,!this._pageVisibility.getIsHidden()),this._performance.clearMarks(r),this._performance.mark(r)}getStart(e){if(this._validateStartEvent(e),!this._performance.isAvailable())return;const t=`${this._getEventKey(e)}-start`;return this._getEventTimingByName(t)}stop(e,t){if(this._validateStopEvent(e),!this._performance.isAvailable())return;const r=this._getApdexFields(e),n=this._getVisibilityFields(e);this._sendEvent(u(u(u({},e),r),n),t)}onVisibilityChange(e){e||(this._wasPreviouslyHidden=!0,Array.from(this._isActiveEvents.keys()).forEach((e=>this._isActiveEvents.set(e,!1))))}}const h=(e,t)=>()=>{if((e=>"function"==typeof e)(e))try{return e()}catch(e){return void console.error(`${t} - ${e instanceof Error?e.message:String(e)}`)}return e};var p=r(87263);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t0}function T(e,t){return S(t)?{[e]:t}:void 0}function C(e){if(S(e)){const t=function(e){const t={};return Object.keys(e).forEach((r=>{const n=e[r];t[r]={id:n.id,type:n.type}})),t}(e);return T("containers",t)}}function A(e,t){return f({containerType:e.containerType,containerId:e.containerId,source:e.source,objectType:e.objectType,objectId:e.objectId,actionSubject:e.actionSubject,action:e.action,actionSubjectId:e.actionSubjectId,attributes:e.attributes,nonPrivacySafeAttributes:e.nonPrivacySafeAttributes,tags:e.tags,highPriority:e.highPriority,eventType:t},C(e.containers))}function P(e){return`${e.actionSubject} ${e.action}`}function k(e,t,r,n,i,s,o,a,c,l,u,d,h){const p=I(e,function(e){const{env:t,product:r,subproduct:n,version:i,origin:s,platform:o}=e;return{env:t,product:r,subproduct:n,version:i,origin:s,platform:o}}(n)),m=g(t),O=y(c),S=b(u),T=v(r),C=A(n,i);return f(f(f(f(f(f(f(f(f({},p),m),O),T),C),_(n)),{},{tabId:s,sessionId:o,taskSessions:a,pageLoadId:l},S),w(d)),E(h))}const x=(e,t)=>Object.keys(e).reduce(((r,n)=>(r[t(e[n],n,e)]=e[n],r)),{}),R=(e,t)=>Object.keys(e).filter((e=>t.indexOf(e)<0)).reduce(((t,r)=>(t[r]=e[r],t)),{}),N=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(e.prototype!==t.prototype)return!1;const r=Object.keys(e);return r.length===Object.keys(t).length&&r.every((r=>N(e[r],t[r])))},M=(e,t)=>e.reduce(((e,r,n,i)=>(e[t(r,n,i)?0:1].push(r),e)),[[],[]]);var D=r(2619);class L{constructor(e,t){if((0,n.Z)(this,"canCompress",(e=>{try{return e&&(0,D.v7)(e.eventType)&&this.predicate(e)}catch(e){return!1}})),(0,n.Z)(this,"compress",(e=>{const[t,r]=M(e,(e=>this.canCompress(e))),n=this.compressFn(t);if(!n)throw new Error("No events were returned from the compression function");return n.forEach((e=>{(0,D.WS)(e.eventType),(0,D.wC)(e)})),n.concat(r)})),"function"!=typeof e)throw new Error("Invalid predicate, must be a function that accepts an event and returns a boolean");if("function"!=typeof t)throw new Error("Invalid compressFn, must be a function that both accepts and returns an array of events");this.predicate=e,this.compressFn=t}}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;tthis.compressionRules.some((t=>t.canCompress(e))))),(0,n.Z)(this,"compress",(e=>this.createGroups(e).reduce(((e,t)=>{const r=this.compressGroup(t);return e.concat(r)}),[]))),(0,n.Z)(this,"createGroups",(e=>e.reduce(((e,t)=>{const r=this.compressionRules.find((e=>e.canCompress(t)));let n;if(r){const e=A(t,t.eventType);n=R(t,Object.keys(e))}const i=e.find((e=>r===e.compressor&&N(n,e.contextFields)));return i?i.events.push(t):e.push({contextFields:n,compressor:r,events:[t]}),e}),[]))),(0,n.Z)(this,"compressGroup",(e=>{if(!e.compressor)return e.events;try{return e.compressor.compress(e.events).map((t=>Z(Z({},t),e.contextFields)))}catch(t){return console.warn(`Failed to compress some analytics events. Error: ${t.message}. Sending ${e.events.length} uncompressed events instead`),e.events}})),!Array.isArray(e))throw new Error("Event compressors must be constructed with an array of CompressionRules");if(!e.every((e=>e instanceof L)))throw new Error("Event compressors can only be constructed with instances of CompressionRule");this.compressionRules=e}}class U{constructor(e,t){(0,n.Z)(this,"push",((e,t,r,n)=>{this.eventArgs.push({identifier:e,builtEvent:t,context:r,userInfo:n})})),(0,n.Z)(this,"size",(()=>this.eventArgs.length)),(0,n.Z)(this,"startFlush",(()=>{try{this.eventArgs=this.compressEventArgs(this.eventArgs)}catch(e){console.warn(`Failed to perform compression on the delayed analytics events. Error: ${e.message}. Sending ${this.eventArgs.length} uncompressed events instead`)}this.flushNextBatch()})),(0,n.Z)(this,"cancelFlush",(()=>{this.flushBatchTimeout&&(clearTimeout(this.flushBatchTimeout),this.flushBatchTimeout=null)})),(0,n.Z)(this,"flushNextBatch",(()=>{this.eventArgs.splice(0,7).forEach((e=>this.processFn(e.identifier,e.builtEvent,e.context,e.userInfo))),this.eventArgs.length>0?this.flushBatchTimeout=setTimeout((()=>this.flushNextBatch()),100):this.flushBatchTimeout=null})),(0,n.Z)(this,"compressEventArgs",(e=>{const[t,r]=M(e,(e=>this.compressor.canCompress(e.builtEvent))),n=t.reduce(((e,t)=>{const r=e.find((e=>N(e.userInfo,t.userInfo)&&N(e.context,t.context)));return r?r.eventArgs.push(t):e.push({userInfo:t.userInfo,context:t.context,eventArgs:[t]}),e}),[]).reduce(((e,t)=>{try{const r=t.eventArgs.map((e=>e.builtEvent)),n=this.compressor.compress(r).map((e=>({identifier:P(e),builtEvent:e,userInfo:t.userInfo,context:t.context})));return e.concat(n)}catch(e){return console.warn(`Failed to compress some analytics events. Error: ${e.message}. Sending ${t.eventArgs.length} uncompressed events instead`),t.eventArgs}}),[]);return r.forEach((e=>n.push(e))),n})),this.processFn=e,this.flushBatchTimeout=null,this.eventArgs=[],this.compressor=new V(t)}}let F=function(e){return e.TIMEOUT="timeout",e.MANUAL="manual",e}({});class B{constructor(e,t){(0,n.Z)(this,"push",((e,t,r,n)=>{this.delayQueue.push(e,t,r,n)})),(0,n.Z)(this,"startLowPriorityEventDelay",((e=1e4,t)=>{if(Number.isNaN(e)||e<=0)throw new Error(`Invalid timeout period: ${e}, must be a number greater than 0`);this.delayTimeout&&clearTimeout(this.delayTimeout);const r=e?Math.min(e,3e4):3e4;this.delayCallback=t,this.delayTimeout=setTimeout((()=>this.stopLowPriorityEventDelay(F.TIMEOUT)),r),this.delayQueue.cancelFlush(),this.isDelaying=!0})),(0,n.Z)(this,"stopLowPriorityEventDelay",((e=F.MANUAL)=>{var t;this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=void 0),this.delayQueue.startFlush(),this.isDelaying=!1,null===(t=this.delayCallback)||void 0===t||t.call(this,e),this.delayCallback=void 0})),(0,n.Z)(this,"isDelayingLowPriorityEvents",(()=>this.isDelaying)),this.isDelaying=!1,this.delayQueue=new U(e,t)}}let $=function(e){return e.IN_PROGRESS="inProgress",e.QUEUE="queue",e.RECLAIM_START="reclaimStart",e.RECLAIM_END="reclaimEnd",e.ACK="ack",e}({}),z=function(e){return e[e.RECLAIM_TIMEOUT=1e4]="RECLAIM_TIMEOUT",e[e.RECLAIM_WAIT=500]="RECLAIM_WAIT",e[e.RECLAIM_WAIT_THRESHOLD=2e3]="RECLAIM_WAIT_THRESHOLD",e}({});const G=(e,t)=>({[$.ACK]:`${e}.${t}.${$.ACK}`,[$.QUEUE]:`${e}.${t}.${$.QUEUE}`,[$.IN_PROGRESS]:`${e}.${t}.${$.IN_PROGRESS}`,[$.RECLAIM_START]:`${e}.${t}.${$.RECLAIM_START}`,[$.RECLAIM_END]:`${e}.${t}.${$.RECLAIM_END}`}),H=Object.values($);function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;tnew Promise((t=>{setTimeout(t,e)})),J=e=>{localStorage.removeItem(e.queue),localStorage.removeItem(e.inProgress),localStorage.removeItem(e.reclaimEnd),localStorage.removeItem(e.reclaimStart),localStorage.removeItem(e.ack)},Q=async(e,t)=>{if("string"!=typeof e||0===e.length)return{fullReclaims:0,partialReclaims:0,failedReclaims:0};const r=s()(),n=(e=>{try{return Object.keys(localStorage).filter((t=>t.startsWith(e))).map((e=>e.split("."))).filter((t=>{if(3===t.length&&t[0]===e&&t[2]===$.ACK)try{const e=localStorage.getItem(t.join("."));if(e){const t=parseInt(e);return z.RECLAIM_TIMEOUT+te[1]))}catch(e){}return[]})(e),i=n.map((n=>(async(e,t)=>{const{ack:r,reclaimStart:n,reclaimEnd:i}=e.storageKeys,s=Date.now();if(localStorage.setItem(n,e.reclaimProcessId),localStorage.setItem(r,s.toString()),await q(z.RECLAIM_WAIT),Date.now()>s+z.RECLAIM_WAIT_THRESHOLD||localStorage.getItem(n)!==e.reclaimProcessId)throw new Error("Took to long to callback, reclaim abandonded. After reclaimStart.");if(localStorage.setItem(i,e.reclaimProcessId),await q(z.RECLAIM_WAIT),Date.now()>s+z.RECLAIM_WAIT_THRESHOLD||localStorage.getItem(n)!==e.reclaimProcessId||localStorage.getItem(i)!==e.reclaimProcessId)throw new Error("Took to long to callback, reclaim abandonded. After reclaimEnd.");return(async(e,t)=>{const{queue:r,inProgress:n}=e.storageKeys,i=JSON.parse(localStorage.getItem(r)||"[]"),s=JSON.parse(localStorage.getItem(n)||"{}"),o=[...i,...Object.entries(s).map((([e,t])=>K(K({},t),{},{attemptNumber:t.attemptNumber+1,id:e})))];if(o.length>0){const i=await t(o);if("successful"===i.status)J(e.storageKeys);else if("partial"===i.status){const e=o.filter((e=>!i.acceptedItemIds.includes(e.id)));return localStorage.removeItem(n),localStorage.setItem(r,JSON.stringify(e)),{fullReclaim:!1}}}else J(e.storageKeys);return{fullReclaim:!0}})(e,t)})({queuePrefix:e,reclaimProcessId:r,storageKeys:G(e,n)},t))),o=await Promise.allSettled(i),a=o.filter((e=>"rejected"===e.status)),c=o.filter((e=>"fulfilled"===e.status)).map((e=>e.value)),l=c.filter((e=>e.fullReclaim)),u=c.filter((e=>!e.fullReclaim));return{failedReclaims:a.length,partialReclaims:u.length,fullReclaims:l.length}},Y="namespace-timeAdded",X="analytics-resilience",ee="timeToBeProcessedAfter",te="timeAdded",re="retryAttempts";let ne=function(e){return e.INDEXEDDB="indexeddb",e.MEMORY="memory",e}({}),ie=function(e){return e.IGNORE="ignore",e.ABANDON="abandon",e.EVICT="evict",e}({});class se extends Error{constructor(){super("window.indexeddb is undefined."),Object.setPrototypeOf(this,se.prototype),this.name="NoIndexedDbError"}}const oe="AbandonWriteError";class ae extends Error{constructor(e){super(`Event Limit reached. Abandoning write to: ${e}`),Object.setPrototypeOf(this,ae.prototype),this.name=oe}}const ce="CallbackProcessingError";class le extends Error{constructor(e){super(`Error thrown while processing events in callback: ${e&&"object"==typeof e&&"toString"in e&&"function"==typeof e.toString&&e.toString()||"string"==typeof e&&e||"Argument passed to CallbackProcessingError was not an Error or string."}`),Object.setPrototypeOf(this,le.prototype),this.name=ce}}const ue="InvalidPolicyError";class de extends Error{constructor(e,t){super(`Method '${t}' cannot be called with policy '${e}'.`),this.name=ue}}const he=e=>{if(e&&"object"==typeof e&&"name"in e){const t=e;return"string"==typeof t.name&&(t.name===oe||t.name===ce||t.name===ue)}return!1};var pe=r(45987);const me=(e,t,{id:r,retryAttempts:n,timeToProcessOffset:i})=>({item:e,id:r||s()(),retryAttempts:n||0,timeToBeProcessedAfter:Date.now()+(i||0),namespace:t,timeAdded:Date.now()}),fe=e=>({logger:e.logger||console,useMemory:e.useMemory||!1,maxAttempts:e.maxAttempts||10,maxEventLimit:e.maxEventLimit||5e3}),ge=e=>new Promise(((t,r)=>{e.onsuccess=e=>{t(e)},e.onerror=e=>{r(e)}})),ve=(e,t)=>{try{"function"==typeof e.commit&&e.commit()}catch(e){throw t.error("Failed to force commit transaction:",e),e}return(e=>new Promise(((t,r)=>{e.oncomplete=()=>{t()},e.onerror=e=>{r(e)},e.onabort=e=>{r(e)}})))(e)},ye=(e,t)=>{e.onerror=e=>{t.warn("Error thrown from request:",e)}};class be{constructor(e,t,r,i){if((0,n.Z)(this,"deleteOldestNEvents",(async(e,t)=>{var r;const n=e.index(Y),i=IDBKeyRange.bound([this.namespace,0],[this.namespace,Date.now()]),s=n.getAllKeys(i,t),o=await ge(s),a=null==o||null===(r=o.target)||void 0===r?void 0:r.result;if(a&&Array.isArray(a)&&a.length>0)try{const t=a.map((t=>this.deleteItemHandler(e,t)));await Promise.all(t)}catch(e){throw this.logger.warn("Failed to delete items from indexeddb.",e),e}})),!(e>0))throw Error("Event Limit has to be set higher than 1");this.eventLimit=e,this.namespace=t,this.logger=r,this.deleteItemHandler=i}async insertItems(e,t,r=ie.ABANDON){const n=[...t];let i=0;switch(r){case ie.ABANDON:await this.throwIfNotEnoughSpace(e,t.length);break;case ie.EVICT:i=await this.evictIfNotEnoughSpace(e,t.length);break;case ie.IGNORE:await this.calculateHowManyEventsWeCanAdd(e,n)}const s=n.map((t=>ge(e.add(t))));return await Promise.all(s),await ve(e.transaction,this.logger),{items:n,numberOfEvictedItems:i}}async throwIfNotEnoughSpace(e,t){const r=await this.calculateFreeSpace(e);if(rnew Promise((async(e,t)=>{if("undefined"!=typeof window){const r=window.setTimeout((()=>{this.logger.warn("IndexedDB timed out."),t(new se)}),15e3),n=window.indexedDB.open("analytics-web-client",1);n.onupgradeneeded=e=>{if(0!==e.oldVersion)throw new Error("We cannot upgrade the database. Do not do this.");const t=n.result.createObjectStore(X,{keyPath:"id"});t.createIndex(ee,ee,{unique:!1}),t.createIndex(re,re,{unique:!1}),t.createIndex(te,te,{unique:!1}),t.createIndex(Y,["namespace","timeAdded"],{unique:!1})};try{return await ge(n),e(n.result)}catch(e){this.logger.warn("IndexedDB failed to initialise.",e),t(new se)}finally{window.clearTimeout(r)}}else this.logger.warn("IndexedDB failed to initialise. No 'window' object."),t(new se)})))),(0,n.Z)(this,"addItem",(async(e,t={},r=ie.ABANDON)=>{const{logger:n,namespace:i}=this,s=me(e,i,t),{objectStore:o}=await this.getObjectStoreAndTransaction("readwrite");if(r===ie.IGNORE)throw new de(r,"IndexedDbConnector#addItem");try{if(!s.namespace||0===s.namespace.length||"string"!=typeof s.namespace)throw new Error("Namespace not specified");const e=await this.globalEventLimitGuard.insertItems(o,[s],r);if(1===e.items.length)return{item:e.items[0],numberOfEvictedItems:e.numberOfEvictedItems};throw new Error(`Incorrect number of items added. Expected: 1, got: ${e.items.length}`)}catch(e){if(he(e))throw e;throw n.log("Failed to add item to table",e),new Error("Request to add item to table failed")}})),(0,n.Z)(this,"bulkAddItem",(async(e,t=ie.ABANDON)=>{const{logger:r,namespace:n}=this,i=e.map((e=>{let{item:t}=e,r=(0,pe.Z)(e,we);return me(t,n,r)})),{objectStore:s}=await this.getObjectStoreAndTransaction("readwrite");try{return await this.globalEventLimitGuard.insertItems(s,i,t)}catch(e){if(he(e))throw e;throw r.log("Failed to add item to table",e),new Error("Request to add item to table failed")}})),(0,n.Z)(this,"getItems",(async(e=7)=>{const t=e>0?e:7,{logger:r}=this,i=this.options.maxAttempts,{transaction:s,objectStore:o}=await this.getObjectStoreAndTransaction("readwrite"),a=o.index(ee),c=IDBKeyRange.upperBound(Date.now()),l=a.openCursor(c),u=await new Promise((async(e,s)=>{const o=[];let a=0;l.onerror=e=>{r.error("Failed to open cursor:",e),s("Failed to open cursor")},l.onsuccess=s=>{const c=s.target.result;if(c){const s=function(e){for(var t=1;t=i){++a;const e=c.delete();ye(e,r)}else{const e=c.update(l);ye(e,r)}o.length{const{transaction:t,objectStore:r}=await this.getObjectStoreAndTransaction("readwrite");try{const n=e.map((e=>this.deleteItem(r,e)));await ve(t,this.logger),await Promise.all(n)}catch(e){throw this.logger.warn("Failed to delete items from indexeddb.",e),e}})),(0,n.Z)(this,"getItemCount",(async()=>{const{transaction:e,objectStore:t}=await this.getObjectStoreAndTransaction("readonly"),r=t.index(ee),n=IDBKeyRange.upperBound(Date.now()),i=r.count(n),s=await ge(i);return await ve(e,this.logger),s.target.result})),(0,n.Z)(this,"processItems",(async(e,t=7)=>{const r=await this.getItems(t),{items:n}=r,i=(0,pe.Z)(r,Ee);try{const t=await e(n,i),r=n.map((e=>e.id));return await this.deleteItems(r),t}catch(e){throw new le(e)}})),(0,n.Z)(this,"deleteItem",(async(e,t)=>{const{logger:r}=this;try{await ge(e.delete(t))}catch(e){throw r.error("Failed to delete item:",t,e),e}})),(0,n.Z)(this,"getObjectStoreAndTransaction",(async e=>{const t=(await this.db).transaction(X,e),r=t.objectStore(X);return{transaction:t,objectStore:r}})),this.options=fe(t),this.namespace=e,this.logger=this.options.logger,!window.indexedDB)throw new se;this.db=this.startDB(),this.db.catch((()=>{})),this.globalEventLimitGuard=new be(this.options.maxEventLimit,this.namespace,this.logger,this.deleteItem)}storeType(){return ne.INDEXEDDB}}class Ie{constructor(e,t){if((0,n.Z)(this,"insertItemsToMemoryStore",((e,t)=>{switch(t){case ie.ABANDON:return this.handleAbandonIfLimitWillExceedPolicy(e);case ie.EVICT:return Promise.resolve(this.handleEvictOldestIfLimitExceededPolicy(e));case ie.IGNORE:return this.handleAddAsManyAsPossible(e)}})),!(e>0))throw Error("Event Limit has to be set higher than 1");this.eventLimit=e,this.memoryItemHandlers=t}async handleAbandonIfLimitWillExceedPolicy(e){if(await this.memoryItemHandlers.getItemCount()+e.length>this.eventLimit)throw new ae(ne.MEMORY);return this.memoryItemHandlers.addItems(e),{items:e,numberOfEvictedItems:0}}handleEvictOldestIfLimitExceededPolicy(e){return this.memoryItemHandlers.addItems(e),{items:e,numberOfEvictedItems:this.memoryItemHandlers.evictEventsIfNeeded(this.eventLimit)}}async handleAddAsManyAsPossible(e){const t=this.eventLimit-await this.memoryItemHandlers.getItemCount(),r=t>e.length?e:e.slice(0,t);return this.memoryItemHandlers.addItems(r),{items:r,numberOfEvictedItems:0}}}const Se=["item"],Te=["items"];function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ae(e){for(var t=1;t{let{item:t}=e,r=(0,pe.Z)(e,Se);return me(t,this.namespace,r)}));return this.bulkAddItemWrapperType(r,t)}bulkAddItemWrapperType(e,t=ie.ABANDON){return Promise.resolve(this.globalEventLimitGuard.insertItemsToMemoryStore(e,t))}getItems(e=7){return Promise.resolve(this.synchronousGetItems(e))}synchronousGetItems(e=7){const t=e>0?e:7,r=Date.now(),n=[],i=[];for(let e of this.memoryStore)if(e.timeToBeProcessedAfter<=r&&(n.push(Ae({},e)),e.timeToBeProcessedAfter+=6e4,e.retryAttempts+=1,e.retryAttempts>=this.options.maxAttempts&&i.push(e)),n.length>=t)break;return i.forEach((e=>{const t=this.memoryStore.indexOf(e);this.memoryStore.splice(t,1)})),{items:n,numberOfDeletedItems:i.length}}deleteItems(e){return this.memoryStore=this.memoryStore.filter((t=>!e.includes(t.id))),Promise.resolve(void 0)}getItemCount(){const e=Date.now(),t=this.memoryStore.filter((t=>t.timeToBeProcessedAfter<=e)).length;return Promise.resolve(t)}async processItems(e,t){const r=this.synchronousGetItems(t),{items:n}=r,i=(0,pe.Z)(r,Te),s=n.map((e=>e.id));try{const t=await e(n,i);return await this.deleteItems(s),t}catch(e){throw new le(e)}}storeType(){return ne.MEMORY}addItems(e){this.memoryStore.push(...e),this.memoryStore.sort((function(e,t){return e.timeAdded-t.timeAdded}))}evictEventsIfNeeded(e){const t=this.memoryStore.length;if(t>e){const r=t-e;return this.memoryStore.splice(0,r),r}return 0}}let ke=function(e){return e.INDEXEDDB="indexeddb",e.MEMORY="memory",e}({}),xe=function(e){return e[e.ONLINE=0]="ONLINE",e[e.OFFLINE=1]="OFFLINE",e}({});class Re{constructor(){(0,n.Z)(this,"itemsDiscardedByRetry",0),(0,n.Z)(this,"eventCount",0),(0,n.Z)(this,"itemsDiscardedByOverflow",0),(0,n.Z)(this,"resilienceMechanism",ke.INDEXEDDB),(0,n.Z)(this,"localstorageNumberOfQueuesPurged",0),(0,n.Z)(this,"localstorageNumberOfFullReclaims",0),(0,n.Z)(this,"localstorageNumberOfPartialReclaims",0),(0,n.Z)(this,"localstorageNumberOfFailedReclaims",0)}addToItemsDiscardedByRetryCounter(e=1){this.itemsDiscardedByRetry+=e}addToEventCount(){this.eventCount++}addToItemsDiscardedByOverflowCounter(e=1){this.itemsDiscardedByOverflow+=e}setResilienceMechanism(e){this.resilienceMechanism=e}addToReclaimMetrics(e){this.localstorageNumberOfFullReclaims+=e.fullReclaims,this.localstorageNumberOfPartialReclaims+=e.partialReclaims,this.localstorageNumberOfFailedReclaims+=e.failedReclaims}addToPurgedQueuesMetrics(e){this.localstorageNumberOfQueuesPurged+=e}subtractFromMetrics(e){this.itemsDiscardedByRetry=this.subtractFromCount(this.itemsDiscardedByRetry,e.itemsDiscardedByRetry),this.eventCount=this.subtractFromCount(this.eventCount,e.eventCount),this.itemsDiscardedByOverflow=this.subtractFromCount(this.itemsDiscardedByOverflow,e.itemsDiscardedByOverflow),this.localstorageNumberOfFullReclaims=this.subtractFromCount(this.localstorageNumberOfFullReclaims,e.fullReclaims),this.localstorageNumberOfPartialReclaims=this.subtractFromCount(this.localstorageNumberOfPartialReclaims,e.partialReclaims),this.localstorageNumberOfFailedReclaims=this.subtractFromCount(this.localstorageNumberOfFailedReclaims,e.failedReclaims),this.localstorageNumberOfQueuesPurged=this.subtractFromCount(this.localstorageNumberOfQueuesPurged,e.localstorageQueuesPurged)}subtractFromCount(e,t){return Math.max(e-(t||0),0)}getMetricsPayload(){return{itemsDiscardedByRetry:this.itemsDiscardedByRetry,eventCount:this.eventCount,itemsDiscardedByOverflow:this.itemsDiscardedByOverflow,resilienceMechanism:this.resilienceMechanism,localstorageQueuesPurged:this.localstorageNumberOfQueuesPurged,fullReclaims:this.localstorageNumberOfFullReclaims,partialReclaims:this.localstorageNumberOfPartialReclaims,failedReclaims:this.localstorageNumberOfFailedReclaims}}}let Ne=null;const Me=()=>(Ne||(Ne=new Re),Ne);class De{constructor(e){"undefined"!=typeof window&&(window.addEventListener("offline",(()=>e(xe.OFFLINE))),window.addEventListener("online",(()=>e(xe.ONLINE))))}getNetworkStatus(){return window.navigator.onLine?xe.ONLINE:xe.OFFLINE}}let Le=function(e){return e.IDLE="idle",e.RUNNING="running",e.COMPLETED="completed",e.TIMED_OUT="timedOut",e}({}),je=function(e){return e.EXECUTE="execute",e.COMPLETE="complete",e.TIMEOUT="timeout",e}({});class Ze{constructor(e){if((0,n.Z)(this,"timeoutHandle",void 0),(0,n.Z)(this,"callbackStatus",Le.IDLE),!(e>0))throw new Error("CallbackWithTimeout requires timeout period higher than 0");this.timeoutPeriod=e}transitionCallbackStatus(e,t){switch(e){case Le.IDLE:case Le.TIMED_OUT:case Le.COMPLETED:t===je.EXECUTE&&(this.callbackStatus=Le.RUNNING);break;case Le.RUNNING:switch(t){case je.COMPLETE:this.callbackStatus=Le.COMPLETED;break;case je.TIMEOUT:this.callbackStatus=Le.TIMED_OUT}break;default:this.callbackStatus=e}}executeCallbackWithTimeout(e,t,r){"undefined"!=typeof window&&(this.transitionCallbackStatus(this.callbackStatus,je.EXECUTE),this.timeoutHandle=window.setTimeout((()=>{this.transitionCallbackStatus(this.callbackStatus,je.TIMEOUT),r()}),this.timeoutPeriod),e((e=>{this.cancelTimeout(),this.getCallbackStatus()!==Le.TIMED_OUT&&(this.transitionCallbackStatus(this.callbackStatus,je.COMPLETE),t(e))})))}getCallbackStatus(){return this.callbackStatus}cancelTimeout(){"undefined"!=typeof window&&this.timeoutPeriod>0&&this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0)}}let Ve=function(e){return e[e.NOOP=0]="NOOP",e[e.SUCCESS=1]="SUCCESS",e[e.ERROR=2]="ERROR",e}({});let Ue=function(e){return e[e.NONE=0]="NONE",e[e.IMMEDIATE=1]="IMMEDIATE",e[e.WAIT=2]="WAIT",e}({});class Fe{constructor(e,t){(0,n.Z)(this,"schedule",(({immediate:e}={immediate:!1})=>{"undefined"!=typeof window&&(this.operationInFlight?e?this.queuedSchedule=Ue.IMMEDIATE:this.queuedSchedule!==Ue.IMMEDIATE&&(this.queuedSchedule=Ue.WAIT):(e||this.options.waitInterval<=0)&&0===this.failureCount?(this.clearTimeout(),this.run()):this.failureCount>0&&null===this.scheduledTimeout?this.scheduledTimeout=window.setTimeout(this.run,this.calculateBackoff()):null===this.scheduledTimeout&&(this.scheduledTimeout=window.setTimeout(this.run,this.options.waitInterval)))})),(0,n.Z)(this,"stop",(()=>{this.clearTimeout(),this.queuedSchedule=Ue.NONE})),(0,n.Z)(this,"getFailureCount",(()=>this.failureCount)),(0,n.Z)(this,"getCallbackStatus",(()=>this.callbackTimer.getCallbackStatus())),(0,n.Z)(this,"clearTimeout",(()=>{"undefined"!=typeof window&&null!==this.scheduledTimeout&&(window.clearTimeout(this.scheduledTimeout),this.scheduledTimeout=null)})),(0,n.Z)(this,"run",(()=>{this.operationInFlight=!0,this.clearTimeout();try{this.callbackTimer.executeCallbackWithTimeout(this.callback,this.done,(()=>this.done(Ve.ERROR)))}catch(e){this.done(e)}})),(0,n.Z)(this,"done",(e=>{this.operationInFlight=!1,e===Ve.ERROR||this.callbackTimer.getCallbackStatus()===Le.TIMED_OUT?(this.failureCount++,this.clearTimeout()):e===Ve.SUCCESS&&(this.failureCount=0),this.processQueuedSchedule()})),(0,n.Z)(this,"processQueuedSchedule",(()=>{if(this.queuedSchedule!==Ue.NONE){const e=this.queuedSchedule===Ue.IMMEDIATE;this.queuedSchedule=Ue.NONE,this.schedule({immediate:e})}else this.failureCount>0&&this.schedule()})),(0,n.Z)(this,"calculateBackoff",(()=>{const{minRetryDelay:e,maxRetryDelay:t,backoffFactor:r,backoffJitterPercentage:n}=this.options;let i=e*r**this.failureCount;if(n){const e=Math.random(),t=Math.floor(e*n*i);Math.floor(10*e)<5?i-=t:i+=t}return Number(Math.min(i,t).toPrecision(1))})),this.options={minRetryDelay:e.minRetryDelay||1e3,maxRetryDelay:e.maxRetryDelay||3e4,backoffFactor:e.backoffFactor||2,backoffJitterPercentage:e.backoffJitterPercentage||0,waitInterval:void 0!==e.waitInterval?e.waitInterval:500,callbackTimeoutPeriod:e.callbackTimeoutPeriod||5e3},this.scheduledTimeout=null,this.failureCount=0,this.callback=t,this.operationInFlight=!1,this.queuedSchedule=Ue.NONE,this.callbackTimer=new Ze(this.options.callbackTimeoutPeriod)}}function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $e(e){for(var t=1;tthis.resilience.addItem(e,t,r)))}bulkAddItem(e,t=ie.ABANDON){return this.runOrFailOver((()=>this.resilience.bulkAddItem(e,t)))}getItems(e){return this.runOrFailOver((()=>this.resilience.getItems(e)))}deleteItems(e){return this.runOrFailOver((()=>this.resilience.deleteItems(e)))}getItemCount(){return this.runOrFailOver((()=>this.resilience.getItemCount()))}processItems(e,t){return this.runOrFailOver((()=>this.resilience.processItems(e,t)))}storeType(){return this.resilience.storeType()}async runOrFailOver(e){try{return await e()}catch(t){if(he(t))throw t;return this.resilience.storeType()===ne.INDEXEDDB&&await this.failOver(),e()}}async failOver(){const e=this.resilience,t=new Pe(this.namespace,this.options);this.resilience=t;try{const{items:r}=await e.getItems(this.options.maxEventLimit);if(r.length>0){const n=(await t.bulkAddItemWrapperType(r,ie.IGNORE)).items.map((e=>e.id));await e.deleteItems(n)}}catch(e){this.options.logger.warn("Unexpected error from ResilienceDb, switching to MemoryDb")}}}(t,{logger:n,maxAttempts:null==r?void 0:r.maxAttempts,maxEventLimit:null==r?void 0:r.maxItems}),this.options=this.buildOptions(r),this.scheduler=new Fe($e($e({},this.options),{},{waitInterval:null!=r&&r.flushBeforeUnload?0:this.options.flushWaitMs}),this.scheduleCallback.bind(this)),this.longPollingScheduler=new Fe($e($e({},Ge),{},{waitInterval:Ge.flushWaitMs}),this.scheduleLongCallBack.bind(this)),this.metricsCollector=Me(),this.networkStatus=new De((e=>{e===xe.OFFLINE?this.scheduler.stop():this.checkEventCountAndReschedule()}))}start(e){this.batchFlushCallback=e,this.longPollingScheduler.schedule()}stop(){this.scheduler.stop(),this.longPollingScheduler.stop()}async addItem(e){const t=JSON.parse(JSON.stringify(e)),{numberOfEvictedItems:r}=await this.resilience.addItem(t,{},ie.EVICT);this.scheduler.schedule(),this.metricsCollector.addToEventCount(),r>0&&this.metricsCollector.addToItemsDiscardedByOverflowCounter(r)}getGlobalRetryCount(){return this.scheduler.getFailureCount()}async scheduleCallback(e){if(this.networkStatus.getNetworkStatus()!==xe.OFFLINE)try{e(await this.resilience.processItems(this.flush.bind(this),this.options.batchFlushSize))}catch(t){if(t.name===ce)return void e(Ve.ERROR)}finally{await this.checkEventCountAndReschedule()}else e(Ve.NOOP)}async checkEventCountAndReschedule(){const e=await this.resilience.getItemCount();e>0&&this.scheduler.schedule({immediate:e>=this.options.batchFlushSize})}async scheduleLongCallBack(e){const t=(e=>{if("string"!=typeof e||0===e.length)return 0;try{const t=Object.keys(localStorage).filter((t=>t&&t.startsWith(`${e}.`)||!1)).map((e=>e.split("."))).filter((e=>3===e.length&&H.includes(e[2]))).reduce(((e,t)=>{const[,r,n]=t;return void 0===e[r]&&(e[r]={}),e[r][n]=!0,e}),{}),r=Object.keys(t).filter((e=>!0!==t[e][$.ACK]));return r.forEach((t=>{const{queue:r,inProgress:n,reclaimStart:i,reclaimEnd:s}=G(e,t);localStorage.removeItem(n),localStorage.removeItem(r),localStorage.removeItem(i),localStorage.removeItem(s)})),r.length}catch(e){}return 0})(this.queuePrefix);this.metricsCollector.addToPurgedQueuesMetrics(t);const r=await Q(this.queuePrefix,(async e=>{const t=e.map((e=>({item:e.item,retryAttempts:e.attemptNumber,id:e.id}))),{items:r}=await this.resilience.bulkAddItem(t,ie.IGNORE);return r.length===t.length?{status:"successful"}:{status:"partial",acceptedItemIds:r.map((e=>e.id))}}));this.metricsCollector.addToReclaimMetrics(r),await this.checkEventCountAndReschedule(),e(Ve.SUCCESS),this.longPollingScheduler.schedule()}flush(e,t){this.metricsCollector.setResilienceMechanism(this.resilience.storeType());const{batchFlushCallback:r}=this;if(!r)throw new Error("batchFlushCallback has not been set. Call PullBatchableQueue#start first.");return new Promise(((n,i)=>{if(e.length<=0)return void n(Ve.NOOP);const s=e.map((e=>{const t=e.item;return e.retryAttempts>0&&t.msg&&(t.msg._metadata||(t.msg._metadata={}),t.msg._metadata.failedAttempts=e.retryAttempts),t}));r(s,(e=>{e?(t.numberOfDeletedItems>0&&this.metricsCollector.addToItemsDiscardedByRetryCounter(t.numberOfDeletedItems),i(e)):n(Ve.SUCCESS)}))}))}buildOptions(e){return{backoffFactor:(null==e?void 0:e.backoffFactor)||2,backoffJitterPercentage:void 0!==(null==e?void 0:e.backoffJitterPercentage)?e.backoffJitterPercentage:.2,batchFlushSize:(null==e?void 0:e.batchFlushSize)||7,flushBeforeUnload:(null==e?void 0:e.flushBeforeUnload)||false,flushWaitMs:(null==e?void 0:e.flushWaitMs)||500,maxItems:(null==e?void 0:e.maxItems)||1e3,maxAttempts:(null==e?void 0:e.maxAttempts)||10,maxRetryDelay:(null==e?void 0:e.maxRetryDelay)||3e4,minRetryDelay:(null==e?void 0:e.minRetryDelay)||1e3}}}let We=function(e){return e.IDENTIFY="identify",e.PAGE="page",e.TRACK="track",e}({});function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t{if(e.abortController)return e.abortController;if(e.timeout){const t=new AbortController;return setTimeout((()=>{t.abort()}),e.timeout),t}},Xe=(0,Je.Z)((e=>new URL(e).origin===location.origin?{}:{mode:"cors",credentials:"include"}));var et=r(27003),tt=r(36808),rt=r.n(tt);let nt=function(e){return e.AWC_TLD_TEST="AWC_TLD_TEST",e.AWC_ANALYTICS_DEBUG="AWC_ANALYTICS_DEBUG",e.AJS_ANONYMOUS_ID="AJS_ANONYMOUS_ID",e}({});class it{constructor(e,t){this.key=e,this.options=t}getAttributes(){return this.options}getKey(){return this.key}}const st={[nt.AWC_TLD_TEST]:new it("__awc_tld_test__",{expires:365,secure:"https:"===window.location.protocol,path:"/"}),[nt.AWC_ANALYTICS_DEBUG]:new it("atlassian_analytics_debug",{expires:365,secure:"https:"===window.location.protocol,path:"/"}),[nt.AJS_ANONYMOUS_ID]:new it("ajs_anonymous_id",{expires:365,secure:"https:"===window.location.protocol,path:"/"})},ot=new class{constructor(){(0,n.Z)(this,"_data",{}),(0,n.Z)(this,"length",0),(0,n.Z)(this,"setItem",((e,t)=>(this._data[e]=t,this.length=Object.keys(this._data).length,t))),(0,n.Z)(this,"getItem",(e=>e in this._data?this._data[e]:null)),(0,n.Z)(this,"removeItem",(e=>(e in this._data&&delete this._data[e],this.length=Object.keys(this._data).length,null))),(0,n.Z)(this,"clear",(()=>{this._data={},this.length=0})),(0,n.Z)(this,"key",(e=>Object.keys(this._data)[e]))}},at="awcInMemoryStorageFallback";function ct(e){const t="test_value";if(!e)return!1;try{const r="awc.storage.support";e.setItem(r,t);const n=e.getItem(r);return e.removeItem(r),n===t}catch(e){return!1}}class lt{constructor(e,t={}){(0,n.Z)(this,"getStore",(()=>this._store)),(0,n.Z)(this,"getItem",(e=>this._store.getItem(this.createKey(e)))),(0,n.Z)(this,"removeItem",(e=>this._store.removeItem(this.createKey(e)))),(0,n.Z)(this,"setItem",((e,t)=>{try{this._store.setItem(this.createKey(e),t)}catch(r){(function(e){let t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(r)&&(this.swapToInMemory(),this._store.setItem(this.createKey(e),t))}})),(0,n.Z)(this,"swapToInMemory",(()=>{if(this._store===ot||"undefined"==typeof window)return;const e=Object.keys(this._store||{});let t;ct(window[at])?t=window[at]:(t=ot,window[at]||(window[at]=ot)),e.forEach((e=>{if(0===e.indexOf(this.getPrefix())){const r=this._store.getItem(e);r&&t.setItem(e,r)}})),this._store=t})),(0,n.Z)(this,"clear",(()=>this._store.clear())),(0,n.Z)(this,"key",(e=>this._store.key(e))),(0,n.Z)(this,"getPrefix",(()=>this._prefix)),(0,n.Z)(this,"createKey",(e=>this._prefix?`${this.getPrefix()}.${e}`:e)),this.options=t;const r=[];(void 0===t.useStoragePrefix||t.useStoragePrefix)&&r.push("awc"),t.envPrefix&&t.envPrefix!==o.gq.PROD&&r.push(t.envPrefix),this._prefix=r.join("-"),ct(e)?this._store=e:this.swapToInMemory()}}const ut=class extends lt{constructor(e){let t;try{t=window.localStorage||ot}catch(e){t=ot}super(t,e)}};class dt{constructor(){this.safeStorage=new ut({useStoragePrefix:!1})}set(e,t){return this.safeStorage.setItem(e,t),t}get(e){return this.safeStorage.getItem(e)||void 0}remove(e){this.safeStorage.removeItem(e)}}const ht=st.AWC_TLD_TEST.getKey(),pt="tld_test",mt=(0,Je.Z)((()=>{if("undefined"==typeof location)return"";const{hostname:e}=location,t=e.split(".");for(let e=1;e<=t.length;e++){const r=`.${t.slice(-1*e).join(".")}`;if(rt().set(ht,pt,{domain:r}),rt().get(ht)===pt)return rt().remove(ht,{domain:r}),r}return e}));function ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t!e&&!("file:"===location.protocol||"chrome-extension:"===location.protocol))(e)?rt():new dt}set(e,t,r){if(st[e])return this.cookieLike.set(st[e].getKey(),t,gt(gt({},st[e].getAttributes()),{},{domain:mt()},r));console.warn(`Unknown cookie key ${e} provided, not set.`)}get(e){if(st[e])return this.cookieLike.get(st[e].getKey());console.warn(`Unknown cookie key ${e} provided, not fetched.`)}remove(e,t){st[e]?this.cookieLike.remove(st[e].getKey(),gt({},t)):console.warn(`Unknown cookie key ${e} provided, not removed.`)}}const yt="SAFE",bt="UNSAFE",wt="LOCAL_STORAGE";class Et{constructor(e){this.store=new ut({useStoragePrefix:!1}),this.cookie=new vt(e)}getUserId(){return this.userId||null}setUserId(e){this.userId=e}getAnonymousId(e){return this.getAnonymousIdFromLocalStorageAndUpdateCookieIfStale()||this.getAnonymousIdFromCookieAndUpdateLocalStorage()||this.generateNewAnonymousId(e)}setAnonymousId(e){const t=JSON.stringify(e);return this.cookie.set(nt.AJS_ANONYMOUS_ID,t),this.lastAnonymousIdCookieUpdate=Date.now(),this.store.setItem(st.AJS_ANONYMOUS_ID.getKey(),t)}getAnonymousIdFromStorage(e){const t=e===wt?this.store.getItem(st.AJS_ANONYMOUS_ID.getKey()):this.cookie.get(nt.AJS_ANONYMOUS_ID);if(t){const e={type:bt,anonymousId:t};try{const r=JSON.parse(t);return r&&"string"==typeof r?{type:yt,anonymousId:r}:e}catch(t){return e}}return{type:"NOT_FOUND"}}getAnonymousIdFromLocalStorageAndUpdateCookieIfStale(){const e=this.getAnonymousIdFromStorage(wt);let t=!1;switch((!this.lastAnonymousIdCookieUpdate||(0,et.Z)(new Date,new Date(this.lastAnonymousIdCookieUpdate))>=7)&&(t=!0),e.type){case yt:return t&&this.setAnonymousId(e.anonymousId),e.anonymousId;case bt:return e.anonymousId;default:return null}}getAnonymousIdFromCookieAndUpdateLocalStorage(){const e=this.getAnonymousIdFromStorage("COOKIE");switch(e.type){case yt:case bt:return this.store.setItem(st.AJS_ANONYMOUS_ID.getKey(),JSON.stringify(e.anonymousId)),e.anonymousId;default:return null}}generateNewAnonymousId(e=s()){const t=e();return this.setAnonymousId(t),t}}var _t=r(28595),Ot=r.n(_t);function It(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function St(e){for(var t=1;t{const t=Ct(e);return Ot()(t)},Ct=e=>{if(null===e||"object"!=typeof e)return e;const t={};return Object.keys(e).forEach((r=>{const n=At(e,r);void 0!==n&&(Array.isArray(n)?t[r]=n.map((e=>Ct(e))):t[r]="object"==typeof n&&null!==n?Ct(n):n)})),t},At=(e,t)=>e[t];function Pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t{const r=this.resilienceQueue.getGlobalRetryCount(),i=this.metrics.getMetricsPayload(),s=kt(kt({},i),{},{httpRetryCount:r});for(let e in s)0===s[e]&&delete s[e];const o=await this.attachXIDs(e),a=(new Date).toISOString(),c={batch:o.map((e=>(e.msg.sentAt=a,e.msg))),sentAt:a,metadata:s};try{const e=await(async e=>{var t;const r=null===(t=Ye(e))||void 0===t?void 0:t.signal,i=Xe(e.url),s=await fetch(e.url,function(e){for(var t=1;t=500&&s.status<600)throw new Error(`HTTP Error ${s.status} (${s.statusText})`);return s})({url:this.gasv3BatchUrl,batch:c,timeout:this.options.requestTimeout});this.metrics.subtractFromMetrics(i),t(null,e)}catch(e){t(e,null)}})),this.options=kt(kt({},e),{},{requestTimeout:e.requestTimeout||1e4,retryQueueOptions:e.retryQueueOptions||{},logger:e.logger||console,disableCookiePersistence:e.disableCookiePersistence||!1}),this.user=new Et(null===(t=this.options)||void 0===t?void 0:t.disableCookiePersistence),this.xidPromiseCallback=e.xidPromiseGetter(),this.gasv3BatchUrl=`${e.apiHostProtocol}://${e.apiHost}/batch`,this.metrics=Me(),this.resilienceQueue=((e,t,r,n)=>new He(e,t,r||{},n))(e.retryQueuePrefix,e.product,this.options.retryQueueOptions,this.options.logger),this.resilienceQueue.start(this.sendEvents)}getUser(){return this.user}async track(e,t,r,n){const i=kt(kt({},this.buildBaseEvent(r,We.TRACK,t)),{},{type:We.TRACK,properties:Tt(t),event:e}),s=kt(kt({},i),{},{messageId:this.createMessageId()}),o=this.packageEvent(s);await this.resilienceQueue.addItem(o),n&&n()}async page(e,t,r,n){const i=kt(kt({},this.buildBaseEvent(r,We.PAGE,t)),{},{type:We.PAGE,properties:Tt(t),name:e}),s=kt(kt({},i),{},{messageId:this.createMessageId()}),o=this.packageEvent(s);await this.resilienceQueue.addItem(o),n&&n()}async identify(e,t,r,n){const i=kt(kt({},this.buildBaseEvent(r,We.IDENTIFY,t)),{},{type:We.IDENTIFY,traits:Tt(t)}),s=kt(kt({},i),{},{messageId:this.createMessageId()}),o=this.packageEvent(s);await this.resilienceQueue.addItem(o),n&&n()}buildBaseEvent(e,t,r){const n=(e=>St(St({},e.context),{},{userAgent:navigator.userAgent}))(Tt(e));return{context:n,timestamp:(new Date).toISOString(),type:t,userId:this.user.getUserId(),anonymousId:r.anonymousId||this.user.getAnonymousId()}}createMessageId(){return`ajs-${s()()}`}packageEvent(e){const{apiHost:t,apiHostProtocol:r}=this.options;return{headers:{"Content-Type":"text/plain"},msg:e,url:`${r}://${t}/${e.type.charAt(0)}`}}async attachXIDs(e){return this.xidPromiseCallback?async function(e,t){try{const r=await t;return e.map((e=>function(e,t){if(!(t&&t instanceof Function))return e;if(e.msg.type===We.PAGE||e.msg.type===We.TRACK){const r=t();r&&Array.isArray(r)&&(e.msg.properties=qe(qe({},e.msg.properties),{},{xid:r}))}else if(e.msg.traits&&e.msg.type===We.IDENTIFY){const r=t();r&&Array.isArray(r)&&(e.msg.traits=qe(qe({},e.msg.traits),{},{xid:r}))}return e}(e,r)))}catch(t){return e}}(e,this.xidPromiseCallback):Promise.resolve(e)}}var Rt=r(17563);const Nt=e=>window.history.replaceState({},"",e),Mt=(e,t=Nt)=>{const r=window.location.href,n=window.location.hash,i=""!==n?r.replace(n,""):r,{url:s,query:o}=(0,Rt.parseUrl)(i),a=(c=o,l=e,Object.keys(c).filter((e=>l(c[e],e))).reduce(((e,t)=>(e[t]=c[t],e)),{}));var c,l;if(Object.keys(a).length>0){const r=((e,t)=>Object.keys(e).filter((r=>!t(e[r],r))).reduce(((t,r)=>(t[r]=e[r],t)),{}))(o,e);Object.keys(r).length>0?t(`${s}?${(0,Rt.stringify)(r)}${n}`):t(`${s}${n}`)}return a};class Dt{constructor(){(0,n.Z)(this,"handleOriginParameters",((e,t)=>{const r=Object.keys(e);if(!(r.length>0))throw new Error("Empty parameter mapping provided");const n=r.filter((e=>Object.values(o.W5).indexOf(e)<0));if(n.length>0)throw new Error(`Invalid Origin Tracing Parameter(s) supplied: ${n.join()}!`);const i=Mt(((e,t)=>r.indexOf(t)>=0),t);return Object.keys(i).map((t=>({[t]:e[t](i[t])}))).reduce(((e,t)=>Object.assign(e,t)),{})})),this._originStore={}}}const Lt="/gateway/api/gasv3/api/v1";function jt({useStargate:e,env:t,useLegacyUrl:r,perimeter:n,envOverride:i}){return n===o.T_.FEDRAMP_MODERATE?(({useStargate:e,env:t,useLegacyUrl:r,envOverride:n})=>{if(t===o.gq.LOCAL||t===o.gq.DEV)throw Error("No LOCAL or DEV environments for FedRAMP.");if(t===o.gq.PROD&&n)throw Error("Cannot override to FedRAMP Sandbox for Prod.");return e?r?t===o.gq.PROD?"api.atlassian-us-gov-mod.com/gasv3/api/v1":(e=>e&&e===o.r.FEDRAMP_MODERATE_SANDBOX?"api-private.atlassian-fex.com/gasv3/api/v1":"api.stg.atlassian-us-gov-mod.com/gasv3/api/v1")(n):window.location.host+Lt:t===o.gq.PROD?"as.atlassian-us-gov-mod.com/api/v1":(e=>e&&e===o.r.FEDRAMP_MODERATE_SANDBOX?"as.atlassian-fex.com/api/v1":"as.staging.atl-paas-us-gov-mod.net/api/v1")(n)})({useStargate:e,env:t,useLegacyUrl:r,envOverride:i}):(({useStargate:e,env:t,useLegacyUrl:r})=>e?r?t===o.gq.PROD?"api-private.atlassian.com/gasv3/api/v1":"api-private.stg.atlassian.com/gasv3/api/v1":window.location.host+Lt:t===o.gq.PROD?"as.atlassian.com/api/v1":"as.staging.atl-paas.net/api/v1")({useStargate:e,env:t,useLegacyUrl:r})}const Zt="session.id",Vt="session.expiry",Ut=/^\d+$/,Ft=()=>{};class Bt{constructor(e={}){(0,n.Z)(this,"_generateNewSessionId",(()=>{const e=Date.now().toString();return this._safeLocalStorage.setItem(Zt,e),this._onNewSessionStarted&&this._onNewSessionStarted(),e})),(0,n.Z)(this,"_updateSessionExpiry",(()=>{const e=Date.now()+this._sessionExpiryTime;return this._safeLocalStorage.setItem(Vt,e.toString()),e})),(0,n.Z)(this,"_debouncedUpdateSessionExpiry",(e=>{const{_updateSessionExpiry:t}=this;if(e{t()}),this._sessionExpiryDebounce)})),this._sessionExpiryTime=e.sessionExpiryTime||18e5,this._sessionExpiryDebounce=e.sessionExpiryDebounce||5e3,this._sessionExpiryDebounceThresholdPercentage=e.sessionExpiryDebounceThresholdPercentage||.9,this._onNewSessionStarted=e.onNewSessionStarted?e.onNewSessionStarted:Ft,this._safeLocalStorage=new ut}getCurrentSessionId(){const e=this._safeLocalStorage.getItem(Zt),t=parseInt(this._safeLocalStorage.getItem(Vt)||"0",10)||0;return this._debouncedUpdateSessionExpiry(t),!e||t<=Date.now()||Number.isNaN(t)?this._generateNewSessionId():Ut.test(e)?e:this._generateNewSessionId()}}const $t=class extends lt{constructor(e){let t;try{t=window.sessionStorage||ot}catch(e){t=ot}super(t,e)}},zt="tab.id";class Gt{constructor(){(0,n.Z)(this,"_generateNewTabId",(()=>{const e=s()();return this._safeSessionStorage.setItem(zt,e),e})),this._safeSessionStorage=new $t}getCurrentTabId(){let e=this._safeSessionStorage.getItem(zt);return e||(e=this._generateNewTabId()),e}}function Ht(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;tnull===this._safeSessionStorage.getItem(Kt)||null===this._safeSessionStorage.getItem(qt)||parseInt(this._safeSessionStorage.getItem(qt)||"0",10)t.split(Jt)[1])),(0,n.Z)(this,"_isTaskSessionQueryParam",((e,t)=>t.startsWith(Jt))),(0,n.Z)(this,"getAllTaskSessions",(()=>{try{return JSON.parse(this._safeSessionStorage.getItem(Kt)||"")}catch(e){return{}}})),(0,n.Z)(this,"_writeToSessionStorage",(e=>{try{this._safeSessionStorage.setItem(Kt,JSON.stringify(e))}catch(e){}})),(0,n.Z)(this,"_appendTaskSessions",(e=>{const t=this.getAllTaskSessions(),r=null===t?e:Object.assign(t,e);this._writeToSessionStorage(r)})),(0,n.Z)(this,"_safelyRemoveKey",((e,t)=>null===e?{}:(delete e[t],e))),(0,n.Z)(this,"createTaskSession",(e=>{const t=s()(),r={};return r[e]=t,this._appendTaskSessions(r),t})),(0,n.Z)(this,"createTaskSessionWithProvidedId",((e,t)=>{if("string"!=typeof t)throw new TypeError("invalid taskSessionId, must be string");const r={};r[e]=t,this._appendTaskSessions(r)})),(0,n.Z)(this,"completeTaskSession",(e=>{const t=this.getAllTaskSessions(),r=this._safelyRemoveKey(t,e);this._writeToSessionStorage(r)})),(0,n.Z)(this,"formatTaskSessionQueryString",(({uri:e,includedTaskSessions:t})=>{const{url:r,query:n}=(0,Rt.parseUrl)(e),i=this.getAllTaskSessions(),s=t?(a=i,t.reduce(((e,t)=>(t in a&&(e[t]=a[t]),e)),{})):R(i,Object.values(o.W5));var a;if(0===Object.keys(s).length)return e;const c=Wt(Wt({},x(s,((e,t)=>Jt+t))),n);return`${r}?${(0,Rt.stringify)(c)}`})),(0,n.Z)(this,"stripQueryParameters",(()=>{const e=x(Mt(this._isTaskSessionQueryParam),this._removeTaskSessionPrefix);this._appendTaskSessions(e)}));const e=Date.now();this._safeSessionStorage=new $t;try{this._taskSessionsNotRecentlyInitialised(e)&&(this._writeToSessionStorage({}),this._safeSessionStorage.setItem(qt,e.toString()))}catch(e){}}}const Yt=st.AWC_ANALYTICS_DEBUG.getKey(),Xt="synthetic",er=["embeddedProduct"];function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rr(e){for(var t=1;t{this._startInterval(),this._bindEventListeners()})),(0,n.Z)(this,"stop",(()=>{this._stopInterval(),this._unbindEventListeners()})),(0,n.Z)(this,"resetTimers",(()=>{this._intervalId&&(this.stop(),this.start())})),(0,n.Z)(this,"_bindEventListeners",(()=>{"undefined"!=typeof window&&(window.addEventListener("focus",this._focusListener),window.addEventListener("blur",this._blurListener))})),(0,n.Z)(this,"_unbindEventListeners",(()=>{"undefined"!=typeof window&&(window.removeEventListener("focus",this._focusListener),window.removeEventListener("blur",this._blurListener))})),(0,n.Z)(this,"_startInterval",(()=>{clearInterval(this._intervalId),this._intervalId=setInterval(this._handleInterval,this._delay)})),(0,n.Z)(this,"_stopInterval",(()=>{this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)})),(0,n.Z)(this,"_getProductKey",((e,t)=>{let r=e;return t&&(r+=`-${t}`),r})),(0,n.Z)(this,"_getLastSentTimestamp",((e,t,r)=>(((this._parseLocalStorageData()||{})[r]||{})[t]||{})[e]||null)),(0,n.Z)(this,"_parseLocalStorageData",(()=>{const e=this._safeLocalStorage.getItem(this._storageKey);try{return JSON.parse(e||"")}catch(e){return this._safeLocalStorage.removeItem(this._storageKey),null}})),(0,n.Z)(this,"_setLastSentTimestamp",((e,t,r)=>{const n=this._parseLocalStorageData()||{},i=n[r]||{},s=i[t]||{};s[e]=Date.now(),i[t]=s,n[r]=i,this._safeLocalStorage.setItem(this._storageKey,JSON.stringify(n))})),(0,n.Z)(this,"_shouldSendEvent",((e,t,r,n)=>!!document.hasFocus()&&(!(t!==o.ox.NONE&&!r||!n)&&Date.now()-this._getLastSentTimestamp(e,r,n)>this._throttle))),(0,n.Z)(this,"_handleInterval",(()=>{const e=this._getContext(),{embeddedProduct:t}=e,r=(0,pe.Z)(e,er);this._sendEvent(this._product,r),t&&this._sendEvent(t,r,!0)})),(0,n.Z)(this,"_sendEvent",((e,t,r=!1)=>{const{subproduct:n,tenantIdType:i,tenantId:s,userId:o,lastScreenEvent:a,attributes:c}=t,l=this._getProductKey(e,n);if(this._shouldSendEvent(l,i,s,o)){this._setLastSentTimestamp(l,s,o);const t=this._createEvent(e,n,r,a,c);this._onEvent(t)}})),(0,n.Z)(this,"_createEvent",((e,t,r,n,i)=>{const s={product:e,source:"ui",action:"viewed",actionSubject:"ui",attributes:i};return r&&(s.subproduct=null,s.version=null,s.attributes=rr(rr({},s.attributes),{},{embeddedInEnv:this._productInfo.env,embeddedInProduct:this._productInfo.product,embeddedInSubproduct:t,embeddedInVersion:this._productInfo.version,embeddedInOrigin:this._productInfo.origin,embeddedInPlatform:this._productInfo.platform})),n&&(s.attributes=rr(rr({},s.attributes),{},{lastScreenEvent:{name:n.name,attributes:n.attributes}})),s})),!e)throw new Error("Missing productInfo");if(!e.product)throw new Error("Missing productInfo.product");if(!t)throw new Error("Missing getContext callback");if("function"!=typeof t)throw new Error("Invalid getContext, must be function");if(!r)throw new Error("Missing onEvent callback");if("function"!=typeof r)throw new Error("Invalid onEvent, must be function");this._productInfo=e,this._product=e.product,this._getContext=t,this._onEvent=r,this._delay=i.delay||2e3,this._throttle=i.throttle||36e5,this._storageKey=i.storageKey||"ui.viewed.last.sent",this._safeLocalStorage=new ut({envPrefix:this._productInfo.env}),this._focusListener=()=>{this._startInterval()},this._blurListener=()=>{this._stopInterval()}}}function ir(e,t){return e&&"function"==typeof e?()=>{e(t)}:null}let sr=function(e){return e.XC="xc",e.UID="uid",e}({});function or(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;tnull==e||e)),(0,n.Z)(this,"_endsWith",((e,t)=>-1!==e.indexOf(t,e.length-t.length))),(0,n.Z)(this,"_changeInternalUserId",((e,t)=>{this.eventProcessor.getUser().setUserId(e),t&&t!==this.eventProcessor.getUser().getAnonymousId()&&this.eventProcessor.getUser().setAnonymousId(t)})),(0,n.Z)(this,"_createSubproductGetter",(e=>h(e,"Cannot get subproduct from the callback. Proceeding without it."))),(0,n.Z)(this,"_createEmbeddedProductGetter",(e=>h(e,"Cannot get embeddedProduct from the callback. Proceeding without it."))),(0,n.Z)(this,"_getLastScreenEvent",(()=>{try{return JSON.parse(this._safeSessionStorage.getItem(cr)||"")}catch(e){return this._safeSessionStorage.removeItem(cr),null}})),(0,n.Z)(this,"_setLastScreenEvent",(e=>{this._safeSessionStorage.setItem(cr,JSON.stringify({name:e.name,attributes:e.attributes}))})),(0,n.Z)(this,"_shouldEventBeDelayed",(e=>{if(!e.tags||-1===e.tags.indexOf("measurement"))return!1;const t=!1!==e.highPriority;return this.eventDelayQueue.isDelayingLowPriorityEvents()&&!t})),(0,n.Z)(this,"_fireEvent",((e,t,r,n)=>{switch(t.eventType){case o.a7.UI:case o.a7.OPERATIONAL:case o.a7.TRACK:return this.eventProcessor.track(e,t,r,n);case o.a7.SCREEN:return this.eventProcessor.page(e,t,r,n);case o.a7.IDENTIFY:return this.eventProcessor.identify(e,t,r,n);default:throw new Error(`No handler has been defined for events of type ${t.eventType}`)}})),(0,n.Z)(this,"_fireDelayedEvent",((e,t,r,n)=>{try{this._changeInternalUserId(n.userId,n.anonymousId),t.tags=[...t.tags||[],"sentWithDelay"],this._fireEvent(e,t,r,void 0)}finally{this._changeInternalUserId(this._userInfo.userId,this._userInfo.anonymousId)}})),(0,n.Z)(this,"_delayEvent",((e,t,r,n,i)=>{this.eventDelayQueue.push(e,t,r,n),i&&i()})),(0,n.Z)(this,"_processEvent",((e,t,r,n)=>(this._testingCache.saveEvent(t),this._shouldEventBeDelayed(t)?(this._delayEvent(e,t,r,this._userInfo,n),Promise.resolve()):this._fireEvent(e,t,r,n)))),(0,n.Z)(this,"setEmbeddedProduct",(e=>{this._productInfo.embeddedProduct=this._createEmbeddedProductGetter(e),this.resetUIViewedTimers()})),(0,n.Z)(this,"clearEmbeddedProduct",(()=>{this._productInfo.embeddedProduct=this._createEmbeddedProductGetter(null)})),(0,n.Z)(this,"setSubproduct",(e=>{this._productInfo.subproduct=this._createSubproductGetter(e),this.resetUIViewedTimers()})),(0,n.Z)(this,"setOriginTracingHandlers",(e=>{const t=this.originTracing.handleOriginParameters(e,this._historyReplaceFn);Object.keys(t).forEach((e=>{void 0!==t[e].taskSessionId&&this.task.createTaskSessionWithProvidedId(e,t[e].taskSessionId)}));const r={};return Object.keys(t).forEach((e=>{t[e].originTracingAttributes?r[e]=t[e].originTracingAttributes:console.warn(`Handling method for origin parameter ${e} has not returned any attributes`)})),Object.keys(t).length>0?this.sendOperationalEvent({action:"landed",actionSubject:"origin",source:"webClient",attributes:{originTracesLanded:r}},(()=>{})):Promise.resolve()})),(0,n.Z)(this,"setTenantInfo",((e,t)=>{if(!e)throw new Error("Missing tenantIdType");if(e!==o.ox.NONE&&!t)throw new Error("Missing tenantId");if(!(0,o.P9)(o.ox,e))throw new Error(`Invalid tenantIdType '${e}', must be an tenantType: [${(0,o.TT)(o.ox)}]`);this._tenantInfo={tenantIdType:e,tenantId:t}})),(0,n.Z)(this,"clearTenantInfo",(()=>{this._tenantInfo={}})),(0,n.Z)(this,"setOrgInfo",(e=>{if(!e)throw new Error("Missing orgId");this._orgInfo={orgId:e}})),(0,n.Z)(this,"clearOrgInfo",(()=>{this._orgInfo={}})),(0,n.Z)(this,"setWorkspaceInfo",(e=>{if(!e)throw new Error("Missing workspaceId");this._workspaceInfo={workspaceId:e}})),(0,n.Z)(this,"clearWorkspaceInfo",(()=>{this._workspaceInfo={}})),(0,n.Z)(this,"setUserInfo",((e,t)=>{(0,D.wT)(e,t),this._changeInternalUserId(t),this._userInfo={userIdType:e,userId:t,anonymousId:this.eventProcessor.getUser().getAnonymousId()}})),(0,n.Z)(this,"clearUserInfo",(()=>{this._changeInternalUserId(void 0),this._userInfo={anonymousId:this.eventProcessor.getUser().getAnonymousId()}})),(0,n.Z)(this,"setAlias",((e,t)=>{if(!e)throw new Error("Missing aliasType");if(!(0,o.P9)(o.kB,e))throw new Error(`Invalid aliasType '${e}', must be an aliasType: [${(0,o.TT)(o.kB)}]`);this._aliases[e]=t})),(0,n.Z)(this,"clearAlias",(()=>{this._aliases={}})),(0,n.Z)(this,"setGroup",((e,t)=>{if(!e)throw new Error("Missing groupType");if(!(0,o.P9)(o.kW,e))throw new Error(`Invalid groupType '${e}', must be an groupType: [${(0,o.TT)(o.kW)}]`);this._groups[e]=t})),(0,n.Z)(this,"clearGroup",(()=>{this._groups={}})),(0,n.Z)(this,"getAnonymousId",(()=>this._userInfo.anonymousId)),(0,n.Z)(this,"setUIViewedAttributes",(e=>{if(!e)throw new Error("Missing uiViewedAttributes");if("object"!=typeof e||Array.isArray(e))throw new Error("Invalid uiViewedAttributes type, should be a non array object");this._uiViewedAttributes=ar({},e)})),(0,n.Z)(this,"getUIViewedAttributes",(()=>this._uiViewedAttributes)),(0,n.Z)(this,"clearUIViewedAttributes",(()=>{this._uiViewedAttributes={}})),(0,n.Z)(this,"sendIdentifyEvent",((e,t,r)=>{this.setUserInfo(e,t);const n={userIdType:e,eventType:o.a7.IDENTIFY};return this._processEvent(t,n,this._context,r)})),(0,n.Z)(this,"sendPageEvent",((e,t)=>this.sendScreenEvent(e,t))),(0,n.Z)(this,"sendScreenEvent",((e,t,r)=>{let n,i,s,a;"object"==typeof e?(n=e.name,i=e.attributes,s=e.containers,a=e.tags):(n=e,i=r),(0,D.iO)(n),(0,D.OW)(s);const c=ar({name:n},function(e,t,r,n,i,s,a,c,l,u,d,h,p,m,O,S){const A=I(e),P=g(t),k=v(r),x=y(u),R=b(h),N={title:"",path:"",url:"",referrer:"",search:"",eventType:o.a7.SCREEN};return f(f(f(f(f(f(f(f(f(f(f(f({},A),P),k),x),N),function(e){return T("attributes",e)}(n)),function(e){return T("nonPrivacySafeAttributes",e)}(i)),C(m)),_(p)),{},{tags:s,tabId:a,sessionId:c,taskSessions:l,pageLoadId:d},R),w(O)),E(S))}(this._productInfo,this._tenantInfo,this._userInfo,i,e.nonPrivacySafeAttributes,a,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this.task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,e,s,this._aliases,this._groups));return this._setLastScreenEvent(c),this._processEvent(n,c,this._context,ir(t,c))})),(0,n.Z)(this,"sendTrackEvent",((e,t)=>{(0,D.TE)(e);const r=k(this._productInfo,this._tenantInfo,this._userInfo,e,o.a7.TRACK,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this.task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(P(e),r,this._context,ir(t,r))})),(0,n.Z)(this,"sendUIEvent",((e,t)=>{(0,D.M0)(e);const r=k(this._productInfo,this._tenantInfo,this._userInfo,e,o.a7.UI,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this.task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(P(e),r,this._context,ir(t,r))})),(0,n.Z)(this,"sendOperationalEvent",((e,t)=>{(0,D.AE)(e);const r=k(this._productInfo,this._tenantInfo,this._userInfo,e,o.a7.OPERATIONAL,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this.task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(P(e),r,this._context,ir(t,r))})),(0,n.Z)(this,"startUIViewedEvent",(e=>{this.stopUIViewedEvent(),this._uiViewedEvent=new nr(this._productInfo,(()=>({embeddedProduct:this._productInfo.embeddedProduct(),subproduct:this._productInfo.subproduct(),tenantIdType:this._tenantInfo.tenantIdType,tenantId:this._tenantInfo.tenantId,userId:this._userInfo.userId,lastScreenEvent:this._getLastScreenEvent(),attributes:this._uiViewedAttributes})),(t=>this.sendUIEvent(t,e))),this._uiViewedEvent.start()})),(0,n.Z)(this,"stopUIViewedEvent",(()=>{this._uiViewedEvent&&(this._uiViewedEvent.stop(),this._uiViewedEvent=null)})),(0,n.Z)(this,"resetUIViewedTimers",(()=>{this._uiViewedEvent&&this._uiViewedEvent.resetTimers()})),(0,n.Z)(this,"startApdexEvent",(e=>{this._apdexEvent.start(e)})),(0,n.Z)(this,"getApdexStart",(e=>this._apdexEvent.getStart(e))),(0,n.Z)(this,"stopApdexEvent",((e,t)=>{this._apdexEvent.stop(e,t)})),(0,n.Z)(this,"startLowPriorityEventDelay",((e,t)=>{this.eventDelayQueue.startLowPriorityEventDelay(e,t)})),(0,n.Z)(this,"stopLowPriorityEventDelay",(()=>{this.eventDelayQueue.stopLowPriorityEventDelay()})),(0,n.Z)(this,"onEvent",((e,t)=>{if(!t)throw new Error("Missing analyticsData");if(!t.eventType)throw new Error("Missing analyticsData.eventType");if(t.eventType===o.a7.TRACK)return this.sendTrackEvent(t);if(t.eventType===o.a7.UI)return this.sendUIEvent(t);if(t.eventType===o.a7.OPERATIONAL)return this.sendOperationalEvent(t);if(t.eventType===o.a7.SCREEN)return this.sendScreenEvent(t.name,null,t.attributes);if(t.eventType===o.a7.IDENTIFY)return this.sendIdentifyEvent(t.userIdType,t.userId);throw new Error(`Invalid analyticsData.eventType '${t.eventType}', must be an eventType: [${(0,o.TT)(o.a7)}]`)})),!e)throw new Error("Missing productInfo");if(!e.env)throw new Error("Missing productInfo.env");if(!e.product)throw new Error("Missing productInfo.product");if(!(0,o.P9)(o.gq,e.env))throw new Error(`Invalid productInfo.env '${e.env}', must be an envType: [${(0,o.TT)(o.gq)}]`);if(e.perimeter&&!(0,o.P9)(o.T_,e.perimeter))throw new Error(`Invalid productInfo.perimeter '${e.perimeter}', must be an perimeterType: [${(0,o.TT)(o.T_)}]`);if(e.origin){if(!(0,o.P9)(o.mO,e.origin))throw new Error(`Invalid productInfo.origin '${e.origin}', must be an originType: [${(0,o.TT)(o.mO)}]`)}else e.origin=o.mO.WEB;e.platform?(0,D.Ct)(e):e.platform=e.origin===o.mO.WEB?o.qZ.WEB:o.qZ.DESKTOP,this.logger=t.logger||console,this._productInfo=ar(ar({},e),{},{subproduct:this._createSubproductGetter(e.subproduct),embeddedProduct:this._createEmbeddedProductGetter(e.embeddedProduct)}),this._tenantInfo={},this._orgInfo={},this._uiViewedAttributes={},this._context=function(e){const t=window.screen||{};return{context:{locale:e.locale,screen:{width:t.width,height:t.height,density:window.devicePixelRatio},library:{name:"analytics.js",version:"4.23.0"}}}}(this._productInfo),this._safeSessionStorage=new $t;const r=this._useStargate(t.useStargate),i=t.apiHost||jt({useStargate:r,env:e.env,useLegacyUrl:t.useLegacyUrl,perimeter:e.perimeter,envOverride:e.envOverride}),c=t.apiHostProtocol||"https",l={maxRetryDelay:6e4,minRetryDelay:t.minRetryDelay||1e3,backoffFactor:2,flushWaitMs:t.flushWaitInterval,flushBeforeUnload:t.flushBeforeUnload},u=`awc-${e.env}`,p=t.disableCookiePersistence||!1;this.eventProcessor=new xt({apiHost:i,apiHostProtocol:c,product:e.product,retryQueuePrefix:u,retryQueueOptions:l,xidPromiseGetter:()=>((e,t)=>{if(e&&t&&"function"==typeof t){const e=()=>new Promise((e=>{setTimeout((()=>e((()=>[{type:sr.XC,state:"TIMEOUT"},{type:sr.UID,state:"TIMEOUT"}]))),5e3)})),r=()=>t().catch((()=>()=>[{type:sr.XC,state:"UNKNOWN"},{type:sr.UID,state:"UNKNOWN"}]));return Promise.race([r(),e()])}})(t.xidConsent,t.xidPromiseFn),logger:this.logger,disableCookiePersistence:p}),this._userInfo={anonymousId:this.eventProcessor.getUser().getAnonymousId(null==t?void 0:t.customAnonymousIdGenerator)},this._pageVisibility=new a,this._tabTracking=new Gt,this._sessionTracking=new Bt({sessionExpiryTime:t.sessionExpiryTime,onNewSessionStarted:t.onNewSessionStarted}),this.task=new Qt,this.originTracing=new Dt,this._apdexEvent=new d(this.sendOperationalEvent,this._pageVisibility),this._historyReplaceFn="function"==typeof t.historyReplaceFn?t.historyReplaceFn:Nt,this.eventDelayQueue=new B(this._fireDelayedEvent,t.delayQueueCompressors||[]),this._testingCache=new class{constructor(){(0,n.Z)(this,"_bind",(()=>{"undefined"==typeof window||window.testAnalytics||(window.testAnalytics={eventCache:[],events:()=>window.testAnalytics.eventCache,clear:()=>{window.testAnalytics.eventCache=[];try{localStorage.removeItem("awc.ui.viewed.last.sent"),localStorage.removeItem("awc-staging.ui.viewed.last.sent"),localStorage.removeItem("awc-dev.ui.viewed.last.sent"),localStorage.removeItem("awc-local.ui.viewed.last.sent")}catch(e){}}})})),(0,n.Z)(this,"_cache",(e=>{"undefined"!=typeof window&&(window.testAnalytics.eventCache.length>=100&&(window.testAnalytics.eventCache=window.testAnalytics.eventCache.slice(1,window.testAnalytics.eventCache.length)),window.testAnalytics.eventCache.push(e))})),(0,n.Z)(this,"_shouldCacheEvent",(()=>this._isDebugCookieEnabled)),(0,n.Z)(this,"saveEvent",(e=>{e&&this._shouldCacheEvent()&&(window.testAnalytics||this._bind(),e.tags instanceof Array?e.tags.push(Xt):e.tags=[Xt],this._cache(e))})),this._isDebugCookieEnabled=(()=>{try{return JSON.parse(rt().get(Yt)||"false")}catch(e){rt().remove(Yt)}return!1})(),this._isDebugCookieEnabled&&this._bind()}},this._pageLoadId=s()(),this._workspaceInfo={},this._aliases={},this._groups={}}}},35768:(e,t,r)=>{"use strict";r.d(t,{AW:()=>c,Nw:()=>u,P9:()=>m,TT:()=>p,T_:()=>f,W5:()=>h,a7:()=>i,gq:()=>n,jM:()=>l,kB:()=>g,kW:()=>v,mO:()=>o,ox:()=>a,qZ:()=>s,r:()=>y,uB:()=>d});let n=function(e){return e.LOCAL="local",e.DEV="dev",e.STAGING="staging",e.PROD="prod",e}({}),i=function(e){return e.TRACK="track",e.UI="ui",e.OPERATIONAL="operational",e.SCREEN="screen",e.IDENTIFY="identify",e}({}),s=function(e){return e.MAC="mac",e.LINUX="linux",e.WINDOWS="windows",e.DESKTOP="desktop",e.WEB="web",e.MOBILE_WEB="mobileWeb",e}({}),o=function(e){return e.DESKTOP="desktop",e.WEB="web",e}({}),a=function(e){return e.CLOUD_ID="cloudId",e.ORG_ID="orgId",e.OPSGENIE_CUSTOMER_ID="opsgenieCustomerId",e.HALP_TEAM_ID="halpTeamId",e.TRANSACTION_ACCOUNT_ID="transactionAccountId",e.TRELLO_WORKSPACE_ID="trelloWorkspaceId",e.NONE="none",e}({}),c=function(e){return e.ATLASSIAN_ACCOUNT="atlassianAccount",e.HASHED_EMAIL="hashedEmail",e.TRELLO="trello",e.OPSGENIE="opsgenie",e.HALP="halp",e}({}),l=function(e){return e.TRANSITION="transition",e.INITIAL_LOAD="initialLoad",e}({});const u=Object.freeze([s.DESKTOP,s.MAC,s.LINUX,s.WINDOWS]),d=Object.freeze([s.WEB,s.MOBILE_WEB]);let h=function(e){return e.ATL_ORIGIN="atlOrigin",e}({});function p(e){return Object.values(e)}function m(e,t){return Object.values(e).indexOf(t)>-1}let f=function(e){return e.C5="c5",e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e.FEDRAMP_HIGH="fedramp-high",e}({}),g=function(e){return{}}(),v=function(e){return e.TRANSACTION_ACCOUNT_ID="transactionAccountId",e}({}),y=function(e){return e.FEDRAMP_MODERATE_SANDBOX="fedramp-moderate-sandbox",e}({})},2619:(e,t,r)=>{"use strict";r.d(t,{AE:()=>m,Ct:()=>g,M0:()=>p,OW:()=>o,TE:()=>d,WS:()=>c,iO:()=>u,v7:()=>a,wC:()=>l,wT:()=>f,xL:()=>h});var n=r(35768),i=r(87263);const s=Object.freeze([n.a7.OPERATIONAL,n.a7.TRACK,n.a7.UI]);function o(e){if(e){if(e&&e.constructor!==Object)throw new Error("properties.containers must be an Object");Object.values(e).forEach((e=>function(e){if(!(0,i.P)(e))throw new Error("properties.containers must be an Object");if(!("id"in e))throw new Error("properties.containers is missing field 'id'");if("string"!=typeof e.id)throw new Error("properties.containers.id must be of type String");if("type"in e&&"string"!=typeof e.type)throw new Error("properties.containers.type must be of type String")}(e)))}}function a(e){switch(e){case n.a7.OPERATIONAL:case n.a7.TRACK:case n.a7.UI:return!0;default:return!1}}function c(e){if(!a(e))throw new Error(`Invalid action event type: ${e}, must be one of: [${s}]`);return!0}function l(e){if(!e)throw new Error("Missing event");if(!e.source)throw new Error("Missing event.source");if(!e.actionSubject)throw new Error("Missing event.actionSubject");if(!e.action)throw new Error("Missing event.action");o(e.containers)}function u(e){if(!e)throw new Error("Missing name")}function d(e){l(e)}function h(e){if(!e)throw new Error("Missing event");if(!e.source)throw new Error("Missing event.source");if(!e.actionSubject)throw new Error("Missing event.actionSubject")}function p(e){l(e)}function m(e){l(e)}function f(e,t){if(!e)throw new Error("Missing userIdType");if(!t)throw new Error("Missing userId");if(!(0,n.P9)(n.AW,e))throw new Error(`Invalid userIdType '${e}', must be an userType: [${(0,n.TT)(n.AW)}]`)}function g(e){if(!(0,n.P9)(n.qZ,e.platform))throw new Error(`Invalid productInfo.platform '${e.platform}', must be a platformType: [${(0,n.TT)(n.qZ)}]`);if(e.origin===n.mO.DESKTOP&&!(0,n.P9)(n.Nw,e.platform))throw new Error(`Invalid productInfo.platform '${e.platform}', must be one of [mac, linux, windows]`);if(e.origin===n.mO.WEB&&!(0,n.P9)(n.uB,e.platform))throw new Error(`Invalid productInfo.platform '${e.platform}', must be one of [web, mobileWeb]`)}},87263:(e,t,r)=>{"use strict";function n(e){return 1==(null!==(t=e)&&"object"==typeof t&&!1===Array.isArray(t))&&"[object Object]"===Object.prototype.toString.call(e);var t}function i(e){if(!1===n(e))return!1;const t=e.constructor;if("function"!=typeof t)return!1;const r=t.prototype;return!1!==n(r)&&"isPrototypeOf"in r}r.d(t,{P:()=>i})},80500:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},70610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},19086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getSSRTimings:()=>qe,getSSRTotal:()=>Ke,initUFO:()=>Ye,ssrConfig:()=>Je});var n=r(4942);let i=function(e){return e.Load="load",e.Experience="experience",e.Operation="operation",e}({}),s=function(e){return e.PageLoad="page-load",e.PageSegmentLoad="page-segment-load",e.InlineResult="inline-result",e.Custom="custom",e}({});const o=new class{constructor(){(0,n.Z)(this,"started",!1),(0,n.Z)(this,"observers",[]),(0,n.Z)(this,"broadcast",(()=>{this.observers.forEach((e=>e())),this.observers=[]}))}start(){this.started||(this.started=!0,document.addEventListener("visibilitychange",this.broadcast),"undefined"!=typeof window&&window.addEventListener("pagehide",this.broadcast))}subscribe(e){this.observers.push(e)}unsubscribe(e){this.observers=this.observers.filter((t=>t!==e))}};class a{constructor(){(0,n.Z)(this,"enabled",!1)}log(...e){this.enabled&&console.log(a.UFOprefix,...e)}warn(...e){this.enabled&&console.warn(a.UFOprefix,...e)}enable(){this.enabled=!0}disable(){this.enabled=!1}}(0,n.Z)(a,"UFOprefix","[ufo🛸]");const c=new a,l=(...e)=>{c.log(...e)},u=(...e)=>{c.warn(...e)};let d=function(e){return e[e.EXPERIENCE_PAYLOAD=0]="EXPERIENCE_PAYLOAD",e[e.SUBSCRIBE=1]="SUBSCRIBE",e[e.UNSUBSCRIBE=2]="UNSUBSCRIBE",e}({}),h=function(e){return e.VISIBLE="visible",e.HIDDEN="hidden",e.MIXED="mixed",e}({});const p="__SUBSCRIBE_ALL__";let m=function(e){return e.RealUser="real-user",e.Synthetic="synthetic",e}({});class f{constructor(){(0,n.Z)(this,"__buffer_only__",!1),(0,n.Z)(this,"subscribers",{})}push(e){l("EVENT STREAM push",e.type,e.payload),e.type===d.EXPERIENCE_PAYLOAD&&this.publish(e.payload),e.type===d.SUBSCRIBE&&this.subscribe(e.payload.experienceId,e.payload.callback),e.type===d.UNSUBSCRIBE&&this.unsubscribe(e.payload.experienceId,e.payload.callback)}publish(e){var t;this.subscribers[p]&&this.subscribers[p].forEach((t=>{t(e)})),null===(t=this.subscribers[e.id])||void 0===t||t.forEach((t=>{t(e)}))}subscribe(e,t){l("EVENT STREAM subscribe",e),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t)}unsubscribe(e,t){const r=this.subscribers[e].findIndex((e=>e===t));-1!==r&&this.subscribers[e].splice(r,1)}}const g=e=>e.performanceType===s.PageLoad&&!0===e.initial,v=()=>{const e=performance.getEntriesByType("navigation");if(0===e.length)return null;const t=e[0];return{"metrics:navigation":{redirectStart:Math.round(t.redirectStart),redirectEnd:Math.round(t.redirectEnd),fetchStart:Math.round(t.fetchStart),domainLookupStart:Math.round(t.domainLookupStart),domainLookupEnd:Math.round(t.domainLookupEnd),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),secureConnectionStart:Math.round(t.secureConnectionStart),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),encodedBodySize:Math.round(t.encodedBodySize),decodedBodySize:Math.round(t.decodedBodySize),transferSize:Math.round(t.transferSize),redirectCount:t.redirectCount,type:t.type,unloadEventEnd:Math.round(t.unloadEventEnd),unloadEventStart:Math.round(t.unloadEventStart),workerStart:Math.round(t.workerStart)}}},y=(e,t)=>{const r=e.performanceType===s.PageLoad&&e.explicitTimings||null,n=(e=>{if(!e.timings)return null;const t=(e=>(e.timings||[]).reduce(((t,r)=>{const n=e.metrics.marks.find((e=>e.name===r.startMark));if(r.startMark&&!n)return t;const i=e.metrics.marks.find((e=>e.name===r.endMark));if(r.endMark&&!i)return t;if(null===e.metrics.startTime||null===e.metrics.endTime)return null;const s=Math.round((n?n.time:e.metrics.startTime)-e.metrics.startTime),o=Math.round((i?i.time:e.metrics.endTime)-e.metrics.startTime-s);return t[`${r.key}`]={startTime:s,duration:o},t}),{}))(e);return 0===Object.keys(t).length?null:t})(e),i=g(e)?(e=>{if(null==e||!e.getTimings)return null;const t=e.getTimings();if(!t)return null;const r=Object.entries(t).reduce(((e,t)=>{var r;return(e=>!(!e||"object"!=typeof e||e.startTime<0||e.duration<0))(t[1])&&(e[(r=t[0],"total"===r?"ssr":`ssr/${r}`)]=(e=>({startTime:Math.round(e.startTime),duration:Math.round(e.duration)}))(t[1])),e}),{});return r&&0!==Object.keys(r).length?r:null})(t):null,o=(r||n||i)&&{...r,...n,...i};return o&&0!==Object.keys(o).length?{"timings:app":o}:null},b=()=>"undefined"!=typeof window&&window?window:void 0,w=()=>{const{performance:e}=b()||{};return e},E=(e,t,r=w()||void 0)=>{if(!t)return null;const n={},i={};if(null==r||r.getEntriesByType("mark").forEach((r=>{const s=t.mapPerformanceMark(r.name);if(!s||null===e.result.startTime)return;const{type:o,name:a}=s;"start"===o&&r.startTime>=e.result.startTime?n[a]=r:"end"===o&&n[a]&&(i[a]={startTime:Math.round(n[a].startTime-e.result.startTime),duration:Math.round(r.startTime-n[a].startTime)},delete n[a])})),null!=t&&t.additionalTimings&&null!==e.result.startTime){const r=t.additionalTimings(e.result.startTime);r&&Object.entries(r).forEach((([e,t])=>{i[e]=t}))}return 0===Object.keys(i).length?null:{"timings:bundleEval":i}},_={timings:[],maxSize:1e3,observer:null,transformResource:e=>({name:e.name,initiatorType:e.initiatorType,transferSize:e.transferSize,startTime:Math.round(e.startTime),duration:Math.round(e.duration),fetchStart:Math.round(e.fetchStart||0),workerStart:Math.round(e.workerStart||0),responseStart:Math.round(e.responseStart||0)}),start:(e=w(),t=(()=>{const{PerformanceObserver:e}=b()||{};return e})())=>{var r;if(!t||!e||void 0===t)return;if(_.observer)return void c.warn("Observer is already running");const n=null===(r=e.getEntriesByType)||void 0===r?void 0:r.call(e,"resource");n&&(_.timings=n.map((e=>_.transformResource(e)))),_.observer=new t(_.addTimings),_.observer.observe({entryTypes:["resource"]})},stop:()=>{_.observer&&(_.observer.disconnect(),_.observer=null),_.timings=[]},addTimings:e=>{const t=e.getEntries().map((e=>_.transformResource(e))),r=_.timings.length+t.length;if(r>_.maxSize){const e=r-_.maxSize;_.timings.splice(0,e)}_.timings.push(...t)}},O=["script","link"],I=["fetch","xmlhttprequest"],S="network",T=(e,t)=>!(0===t.responseStart&&t.startTime>t.responseStart),C=e=>void 0!==e?{size:e}:null,A=(e,t,r=T)=>{const{name:n,duration:i,transferSize:s,initiatorType:o,responseStart:a}=e,c=Math.round(a-t);if(!((e,t,r,n)=>!O.includes(t)||e.includes("localhost")||!!b()&&e.includes(window.location.hostname)||n(e,r))(n,o,e,r))return{};if(O.includes(o)){const e=((e,t,r)=>O.includes(e)?void 0!==r&&0!==r||0!==t?0===r&&t>0?"disk":void 0===r?null:S:"memory":S)(o,i,s);return e?e!==S?{transferType:e}:{ttfb:c,transferType:e,...C(s)}:{ttfb:c,...C(s)}}return{ttfb:c,...C(s)}},P=(e,t,r=w()||void 0)=>{if(null===e.result.startTime||null==t||!t.sanitiseEndpoints)return null;const n=((e,t=w())=>{if(!PerformanceObserver||!_.observer){const r=null==t?void 0:t.getEntriesByType("resource");return r?r.filter((t=>t.startTime>=e)):null}return _.timings.filter((t=>t.startTime>=e))})(e.result.startTime,r);if(null==n||!n.length)return null;const i={},{xhrFilter:s}=t,o=s?["script","link","fetch","xmlhttprequest"]:["script","link","fetch"];return n.forEach((r=>{if(!o.includes(r.initiatorType))return;const{name:n,startTime:a,duration:c,workerStart:l,fetchStart:u,initiatorType:d}=r;if(!n||null===e.result.startTime)return;if("xmlhttprequest"===d&&(void 0===s||!1===s(n)))return;const h=I.includes(d)?t.sanitiseEndpoints(n):t.mapResources(n);h&&!i[h]&&(i[h]={startTime:Math.round(a-e.result.startTime),duration:Math.round(c),workerStart:Math.max(Math.round(l-e.result.startTime),0),fetchStart:Math.max(Math.round(u-e.result.startTime),0),type:d,...A(r,e.result.startTime,t.hasTimingHeaders)})})),{"timings:resource":i}},k=(e,t,r)=>{var n;let i={};if(null!==(n=e.performanceConfig)&&void 0!==n&&n.histogram?i=e.performanceConfig.histogram:null!=t&&t.histogram&&(i=t.histogram),i){const t=i[e.performanceType];switch(e.performanceType){case s.PageLoad:case s.PageSegmentLoad:const e=void 0!==r&&!0===r?"initial":"transition";return t?{"metric:tti:histogramBuckets":t[e].tti,"metric:fmp:histogramBuckets":t[e].fmp}:{};case s.InlineResult:return t?{"metric:result:histogramBuckets":t.result,"metric:response:histogramBuckets":t.response}:{};case s.Custom:return t?{"metric:duration:histogramBuckets":t.duration}:{}}}},x=(e,t,r)=>{switch(e.performanceType){case s.PageLoad:case s.PageSegmentLoad:return((e,t,r)=>{var n;if(null===e.metrics.endTime||null===e.metrics.startTime)return null;const i=(null===(n=e.metrics.marks.find((e=>"fmp"===e.name)))||void 0===n?void 0:n.time)||g(e)&&(null==t?void 0:t.getDoneMark()),s=e.metrics.endTime-e.metrics.startTime,o="number"==typeof i?i-e.metrics.startTime:s;return{"metric:tti":Math.round(s),"metric:fmp":Math.round(o),...k(e,r)}})(e,t,r);case s.InlineResult:return((e,t)=>{if(null===e.metrics.endTime||null===e.metrics.startTime)return null;const r=e.metrics.marks.find((e=>"inline-response"===e.name)),n=e.metrics.endTime-e.metrics.startTime,i=r?r.time-e.metrics.startTime:n;return{"metric:result":Math.round(n),"metric:response":Math.round(i),...k(e,t)}})(e,r);case s.Custom:return((e,t)=>{if(null===e.metrics.endTime||null===e.metrics.startTime)return null;const r=e.metrics.endTime-e.metrics.startTime;return{"metric:duration":Math.round(r),...k(e,t)}})(e,r)}},R=(e,t,r,n,i)=>({...x(e,t,i),...P(e,n),...E(e,r),...y(e,t),...g(e)?v():null}),N=e=>{var t;return{"experience:pageVisible":null!==(t=e.pageVisibleState)&&void 0!==t?t:document.hidden?h.HIDDEN:h.VISIBLE}},M=e=>{const t={"app:web:version":e.version.web};return e.version.ssr&&(t["app:ssr:version"]=e.version.ssr),t};var D=r(86031),L=r.n(D),j=r(30845);const Z=(0,j.Z)((()=>{var e,t;if(!L().getParser)return null;const r=L().getParser((null===(e=b())||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)||"");return{"event:browser:name":r.getBrowserName(),"event:browser:version":r.getBrowserVersion()}})),V=(0,j.Z)((()=>navigator.hardwareConcurrency?{"event:cpus":navigator.hardwareConcurrency}:null)),U=(e,t,r)=>{const n=[...t,...r.featureFlags||[]];if(0===n.length)return null;const i=[];return n.reduce(((t,r)=>{const n=e.getValue(r);return null!=n&&t.push([r,n]),t}),i),{featureFlags:Object.fromEntries(i)}},F=(0,j.Z)((()=>navigator.deviceMemory?{"event:memory":navigator.deviceMemory}:null)),B=e=>{if(null==e||!e.getFeatureFlags)return null;try{const t=e.getFeatureFlags();if(t)return{"ssr:featureFlags":t}}catch(e){}return null},$=e=>null!=e&&e.getDoneMark()?{"ssr:success":!0}:null,z={route:"",setRoute(e){this.route=e},getRoute(){return this.route}},G="unknown",H={schemaVersion:G,id:G,uuid:G,state:{id:G},result:{startTime:0,duration:0,success:!1},type:i.Experience,category:G,performanceType:s.Custom,metadata:{},explicitTimings:{},metrics:{startTime:0,endTime:0,marks:[]},platform:null,children:[],pageVisibleState:h.MIXED,isSSROutputAsFMP:!1,timings:[],featureFlags:[]},W=new class{constructor(){var e,t;(0,n.Z)(this,"gasv3",null),(0,n.Z)(this,"product",""),(0,n.Z)(this,"region",G),(0,n.Z)(this,"hostname",(null===(e=b())||void 0===e||null===(t=e.location)||void 0===t?void 0:t.hostname)||""),(0,n.Z)(this,"tenantType",m.RealUser),(0,n.Z)(this,"app",{version:{web:G}}),(0,n.Z)(this,"performanceConfig",{}),(0,n.Z)(this,"buffer",[]),(0,n.Z)(this,"featureFlagClient",null),(0,n.Z)(this,"featureFlags",[]),(0,n.Z)(this,"ssr",null),(0,n.Z)(this,"resourceTimings",null),(0,n.Z)(this,"bundleEvalTimings",null),(0,n.Z)(this,"route",z),(0,n.Z)(this,"plugins",null),(0,n.Z)(this,"allowlist",(()=>!0)),(0,n.Z)(this,"getPluginsMetrics",(e=>{const t={};return this.plugins&&this.plugins.forEach((r=>{const n=r({...e});null!==n&&"object"==typeof n&&Object.entries(n).forEach((([e,r])=>{t[`${this.product}:${e}`]=r}))})),t}))}publish(e){var t,r;const n=(null===(t=w())||void 0===t?void 0:t.now())||0,i=this.getExperienceKey(e);if(!this.allowlist(i,e))return void u(`experience ${i} does not meet requirements of allowlist`);const s={...H,...e},o={actionSubject:"experience",action:"measured",source:"measured",tags:["observability"],attributes:{properties:{"event:source":{name:"ufo/web",version:s.schemaVersion},"event:schema":"0.1.7","event:product":this.product,"event:region":this.region,"event:hostname":this.hostname,"event:route":this.route.getRoute(),...Z(),...V(),...F(),...navigator.connection?{"event:network:effectiveType":navigator.connection.effectiveType,"event:network:rtt":navigator.connection.rtt,"event:network:downlink":navigator.connection.downlink}:null,...(a=this.app,a.framework?{"app:framework:name":a.framework.name,"app:framework:version":a.framework.version}:null),...M(this.app),"experience:name":s.id,"experience:key":i,"experience:status":s.state.id,"experience:duration":s.result.duration,...null!==s.result.startTime?{"experience:startTime":s.result.startTime}:null,...s.uuid?{"experience:spanId":s.uuid}:null,...this.tenantType!==m.RealUser?{"event:tenantType":this.tenantType}:null,...this.mapMetadataToPayload(s.metadata),...this.extractPageLoadData(s),...N(s),...g(s)&&$(this.ssr),...g(s)&&B(this.ssr),...this.featureFlagClient&&U(this.featureFlagClient,this.featureFlags,s)},performance:this.getPerformanceMetrics(s),task:s.id}};var a;const c=(null===(r=w())||void 0===r?void 0:r.now())||0;o.attributes.performance.payloadTime=c-n,this.gasv3?this.gasv3.sendOperationalEvent(o):this.buffer.push(o),l("PAYLOAD:",JSON.stringify(o,null,2))}setGlobalEventStream(){if(!((()=>{if(!globalThis.__UFO_GLOBAL_EVENT_STREAM__){const e=(()=>{const e=[];return{__buffer_only__:!0,push:t=>{e.length<250&&e.push(t)},getStream:()=>e}})();globalThis.__UFO_GLOBAL_EVENT_STREAM__=e}return globalThis.__UFO_GLOBAL_EVENT_STREAM__})()instanceof f)){const e=new f;e.push({type:d.SUBSCRIBE,payload:{experienceId:"__SUBSCRIBE_ALL__",callback:this.publish.bind(this)}}),(e=>{var t,r;!globalThis.__UFO_GLOBAL_EVENT_STREAM__||null!==(t=globalThis.__UFO_GLOBAL_EVENT_STREAM__)&&void 0!==t&&t.__buffer_only__?(null!==(r=globalThis.__UFO_GLOBAL_EVENT_STREAM__)&&void 0!==r&&r.__buffer_only__&&globalThis.__UFO_GLOBAL_EVENT_STREAM__.getStream().forEach(e.push.bind(e)),globalThis.__UFO_GLOBAL_EVENT_STREAM__=e):u("Global Event Stream already initialised. Ignoring new event stream setup")})(e)}}setRoute(e){this.route.setRoute(e)}setup(e){o.start(),_.start(),this.product||(this.product=e.product||""),e.allowlist&&(this.allowlist=e.allowlist),e.tenantType&&(this.tenantType=e.tenantType),e.hostname&&(this.hostname=e.hostname),e.region&&(this.region=e.region),e.app&&(this.app=e.app),e.featureFlagClient&&(this.featureFlagClient=e.featureFlagClient),e.featureFlags&&(this.featureFlags=e.featureFlags),e.ssr&&(this.ssr=e.ssr),e.bundleEvalTimings&&(this.bundleEvalTimings=e.bundleEvalTimings),e.resourceTimings&&(this.resourceTimings=e.resourceTimings),e.performanceConfig&&(this.performanceConfig=e.performanceConfig),e.plugins&&(this.plugins=e.plugins),this.setGlobalEventStream(),this.gasv3||(this.gasv3=e.gasv3,this.buffer.forEach(this.gasv3.sendOperationalEvent))}mapMetadataToPayload(e){const t={};return Object.entries(e).forEach((([e,r])=>{void 0!==r&&(t[`custom:${e}`]=r)})),t}extractPageLoadData(e){return"initial"in e?{"experience:pageLoadType":e.initial?"initial":"transition"}:{}}getPrefix(e){return null!==e.platform?"platform":this.product}getExperienceKey(e){const t=[this.getPrefix(e),"fe",e.type];return e.platform&&t.push(e.platform.component),t.push(e.id),t.join(".")}getExperiencePerformanceKey(e){const t=[this.getPrefix(e),"fe",e.performanceType];return e.platform&&t.push(e.platform.component),t.push(e.id),t.join(".")}getExperiencePerformanceType(e){return e.performanceType}getPerformanceMetrics(e){return{"event:key":this.getExperiencePerformanceKey(e),"event:type":this.getExperiencePerformanceType(e),...R(e,this.ssr,this.bundleEvalTimings,this.resourceTimings,this.performanceConfig),...this.getPluginsMetrics(e)}}};var K=r(68968),q=r(75977),J=r(65711),Q=r(20629),Y=r(30690),X=r(65438),ee=r(55537),te=r(87376);const re=function(e){"undefined"!=typeof window&&"function"==typeof window.requestIdleCallback&&(0,K.fg)("ufo_payload_use_idle_callback")?window.requestIdleCallback(e):(0,te.unstable_scheduleCallback)(te.unstable_IdlePriority,e)};let ne=!1;function ie(e,t){(0,X.lE)((function(r,n){re((function(){t.createPayloads(r,n).then((t=>{const r=globalThis.__ufo_devtool_onUfoPayload;null==t||t.forEach((t=>{"function"==typeof r&&(null==r||r(t)),e.sendOperationalEvent(t)}))})).catch((e=>{throw e}))}))}))}function se(e,t){(0,Q.T$)((function(r,n){re((function(){t.createExperimentalMetricsPayload(r,n).then((t=>{if(t){if((0,K.fg)("enable_ufo_devtools_api_for_extra_events")){const e=globalThis.__ufo_devtool_onUfoPayload;"function"==typeof e&&(null==e||e(t))}e.sendOperationalEvent(t)}}))}))}))}function oe(e,t){(0,X.LZ)((r=>{re((()=>{const n=t(r);if(n){if((0,K.fg)("enable_ufo_devtools_api_for_extra_events")){const e=globalThis.__ufo_devtool_onUfoPayload;"function"==typeof e&&(null==e||e(n))}e.sendOperationalEvent(n)}}))}))}function ae(e,t){var n;if(!ne){if((0,J.IO)(t),null!==(n=t.vc)&&void 0!==n&&n.enabled){var i;const e={heatmapSize:t.vc.heatmapSize,oldDomUpdates:t.vc.oldDomUpdates,devToolsEnabled:t.vc.devToolsEnabled,selectorConfig:t.vc.selectorConfig};(0,ee.h)(e).start({startTime:0}),X.oH.initializeVCObserver(e),X.oH.startVCObserver({startTime:0}),null!=t&&null!==(i=t.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&Q.Z3.initialize(e).start({startTime:0})}(0,Y.i)(),(0,q.G)(),ne=!0,Promise.all([e,r.e(843).then(r.bind(r,87735)),r.e(8167).then(r.bind(r,3099))]).then((([e,r,n])=>{if(e.getAnalyticsWebClientPromise)e.getAnalyticsWebClientPromise().then((e=>{var i,s;const o=e.getInstance();ie(o,r),null!=t&&null!==(i=t.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&se(o,r),null!==(s=t.postInteractionLog)&&void 0!==s&&s.enabled&&oe(o,n.default)}));else if(e.sendOperationalEvent){var i,s;ie(e,r),null!=t&&null!==(i=t.experimentalInteractionMetrics)&&void 0!==i&&i.enabled&&se(e,r),null!==(s=t.postInteractionLog)&&void 0!==s&&s.enabled&&oe(e,n.default)}}))}}var ce=r(98028),le=r(55877),ue=r(58240),de=r(99306),he=r(81687),pe=r(85810);const me="awaiting_pageload_name",fe=function(e,t=e){const r=(0,X.pK)();if(r&&!e)return;pe.Z.current=t||null;const n=e?(0,J.MK)(e,"page_load"):1,i=(0,ue.Z)(n);if(i&&!r){const r=(0,le.v4)();he.Qe.current=r,(0,X.cV)(r,e||"","page_load",0,n,null,t,(0,de.G6)()),e||(0,X.eA)(r,[],me,me,!0)}else!i&&r&&"page_load"===r.type?(0,X.JG)(r.id,"excluded_by_sampling"):e&&r&&!r.ufoName&&"page_load"===r.type&&((0,X.v3)(e,t),(0,X.OB)(r.id,me))};var ge,ve,ye=r(41352),be=r(35768),we=r(68332),Ee=function(){switch(we.Z.getEnvironment()){case"production":case"staging":return!0;default:return!1}},_e=function(){switch(we.Z.getEnvironment()){case"staging":return be.gq.STAGING;case"dev":return be.gq.DEV;default:return be.gq.PROD}},Oe=(null!==(ge=r(61174).Z.getCookie("__aid_user_id"))&&void 0!==ge?ge:"").replace(/"/g,""),Ie=function(){var e,t;return ve||(e=_e(),t=new ye.Z({env:e,product:"marketing",version:"1.0.0",locale:"en-us"},{useStargate:Ee(),enableNewEventSender:!0}),Oe?t.setUserInfo(be.AW.ATLASSIAN_ACCOUNT,Oe):t.clearUserInfo(),ve=t),ve},Se=r(67294),Te=r(84564),Ce=r.n(Te);function Ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r")},mapResources:function(e){var t,r,n,i;return Pe(e)?null!==(t=function(e){var t,r,n,i=(t=/\/([\w.\-,:]*?)(?:,-|\/batch\.)/.exec(e)||[],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s,o,a=[],c=!0,l=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return a}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],s=1===(n=function(e){var t,r,n;return null!==(t=null===(r=e.split("#")[0])||void 0===r||null===(n=r.split("?")[0])||void 0===n?void 0:n.split("/").pop())&&void 0!==t?t:""}(e).split(".")).length?n[0]:[n[0],n[n.length-1]].join(".");return i?"wrm/".concat(i,"/").concat(s):s}(e))&&void 0!==t?t:null:null!==(n=function(e){var t,r,n;return null!==(t=null===(r=e.split("#")[0])||void 0===r||null===(n=r.split("?")[0])||void 0===n?void 0:n.split("/").pop())&&void 0!==t?t:""}(e),r=1===(i=n.split(".")).length?i[0]:[i[0],i[i.length-1]].join("."))&&void 0!==r?r:null},hasTimingHeaders:function(e){return Pe(e)}};const xe=["script","link"],Re="network",Ne="memory",Me="disk";function De(e){return De="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},De(e)}function Le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t0?Me:void 0===a?null:Re:Ne:Re),l="link"===e.initiatorType;"disk"!==c&&"memory"!==c||(t+=1,l&&(r+=1)),null!==c&&(n+=1,l&&(i+=1))}const e={};return n>0&&(e.cacheHitRatio=t/n),i>0&&(e.preloadCacheHitRatio=r/i),e}catch(e){return{}}var s,o,a}({start:i})),{},{"app:framework:name":"react","app:framework:version":Se.version})),r}var Ue=r(52131),Fe=r(28784);function Be(e){return Be="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},Be(e)}function $e(){$e=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var s=t&&t.prototype instanceof h?t:h,o=Object.create(s.prototype),a=new S(i||[]);return n(o,"_invoke",{value:E(e,r,a)}),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function p(){}function m(){}var f={};c(f,s,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(T([])));v&&v!==t&&r.call(v,s)&&(f=v);var y=m.prototype=h.prototype=Object.create(f);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(n,s,o,a){var c=u(e[n],e,s);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==Be(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,o,a)}),(function(e){i("throw",e,o,a)})):t.resolve(d).then((function(e){l.value=e,o(l)}),(function(e){return i("throw",e,o,a)}))}a(c.arg)}var s;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return s=s?s.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(i,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw s;return{value:void 0,done:!0}}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var a=_(o,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function _(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var a=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(a&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function ze(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Be(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Be(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e,t,r,n,i,s,o){try{var a=e[s](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}var He=!1;function We(e){try{return{custom:Ve(e)}}catch(e){return{}}}var Ke=function(){try{return(window.SSR_totalMetrics||{}).duration||0}catch(e){return console.warn("Error getting SSR total",e),0}},qe=function(){try{return window.SSR_detailMetrics||{}}catch(e){return console.warn("Error getting SSR timings",e),{}}},Je={getDoneMark:Ke,getTimings:qe,getFeatureFlags:function(){return null}},Qe=function(){try{var e=window.performance.getEntriesByType("paint").find((function(e){return"first-contentful-paint"===e.name}));return(null==e?void 0:e.startTime)||0}catch(e){return console.warn("Error getting first contentful paint",e),0}};function Ye(){return Xe.apply(this,arguments)}function Xe(){var e;return e=$e().mark((function e(){var t,r,n,i,o,a,c,l;return $e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ie(),W.setup({featureFlagClient:{getValue:function(){return!0}},product:"marketing",gasv3:r,app:{version:{web:"1.0.0"},framework:{name:"react",version:Se.version}},tenantType:m.RealUser,resourceTimings:{mapResources:function(e){return e},sanitiseEndpoints:function(e){return e}},performanceConfig:{histogram:(t={},ze(t,s.PageLoad,{initial:{fmp:"1000_2000_3000_4000",tti:"1000_2000_3000_4000"},transition:{fmp:"1000_2000",tti:"1000_2000"}}),ze(t,s.PageSegmentLoad,{initial:{fmp:"1000_2000",tti:"1000_2000"},transition:{fmp:"1000_2000",tti:"1000_2000"}}),ze(t,s.InlineResult,{result:"1000_2000",response:"1000_2000"}),ze(t,s.Custom,{duration:"1000_2000"}),t)}}),He||!r){e.next=17;break}if((0,ce.j)(ke),i={ssr:{getSSRDoneTime:Qe},product:"marketing",region:"unknown",enableCompleteUsingDoubleRAF:!0,enableBetterPageVisibilityApi:!0,additionalPayloadData:We,kind:{page_load:1,transition:1,hover:0,legacy:1,typing:0,press:1},capability:{feature_flag_access:100,react_profiler:1},namePrefix:"magnolia.",segmentPrefix:"magnolia.",typingMethod:"timeout",removeInteractionsUFOPrefixes:!0,removePageSegmentsUFOPrefixes:!1,vc:{enabled:!0,heatmapSize:200,oldDomUpdates:!1,devToolsEnabled:!0,selectorConfig:{id:!1,role:!0,className:!0,testId:!0}}},(0,ce.j)(ke),(0,Ue.jQ)(Je),ae(Promise.resolve(Ie()),i),o=null===(n=window.performance.getEntriesByType("navigation")[0])||void 0===n?void 0:n.responseStatus,a=["end-bsm-now","software/statuspage","software/jira/service-management/free","company/careers/all-jobs","software/confluence/set-knowledge-free","company/careers","software/compass","legal/privacy-policy","software/jira/service-management/powered-by","company/contact","software/rovo"],200!==o){e.next=17;break}return c="all",e.next=14,Fe.Z.utils.featureGate.checkGate("gwp-enable-magnolia-experience-per-route");case 14:e.sent&&((l=window.location.pathname.replace(/^\/wac(\/)?/,"")).startsWith("/")&&(l=l.replace("/","")),a.includes(l)&&(c=(u=l).length?(["/ja/","/fr/","/de/","/es/","/br/","/zh/","/ko/","/ru/","/pl/","/it/","/nl/","/fi/","/hu/","/ro/","/cs/"].includes(u)&&u.replace(/\/ja|\/fr|\/de|\/es|\/br|\/zh|\/ko|\/ru|\/pl|\/it|\/nl|\/fi|\/hu|\/ro|\/cs/,""),u.replace(/^\//,"").replace(/\//g,"-").toLowerCase()):"home")),fe(c);case 17:He=!0;case 18:case"end":return e.stop()}var u}),e)})),Xe=function(){var t=this,r=arguments;return new Promise((function(n,i){var s=e.apply(t,r);function o(e){Ge(s,n,i,o,a,"next",e)}function a(e){Ge(s,n,i,o,a,"throw",e)}o(void 0)}))},Xe.apply(this,arguments)}"loading"!==document.readyState?Ye():window.addEventListener("DOMContentLoaded",(function(){return Ye}))},84564:(e,t,r)=>{"use strict";var n=r(47418),i=r(57129),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(s,"")}var h=[["#","hash"],["?","query"],function(e,t){return f(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function m(e){"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?r.g=self:r.g={};var t,n=r.g.location||{},i={},s=typeof(e=e||n);if("blob:"===e.protocol)i=new v(unescape(e.pathname),{});else if("string"===s)for(t in i=new v(e,{}),p)delete i[t];else if("object"===s){for(t in e)t in p||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=a.test(e.href))}return i}function f(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=d(e)).replace(o,""),t=t||{};var r,n=l.exec(e),i=n[1]?n[1].toLowerCase():"",s=!!n[2],a=!!n[3],c=0;return s?a?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):a?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===i?c>=2&&(r=r.slice(2)):f(i)?r=n[4]:i?s&&(r=r.slice(2)):c>=2&&f(t.protocol)&&(r=n[4]),{protocol:i,slashes:s||f(i),slashesCount:c,rest:r}}function v(e,t,r){if(e=(e=d(e)).replace(o,""),!(this instanceof v))return new v(e,t,r);var s,a,c,l,p,y,b=h.slice(),w=typeof t,E=this,_=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=i.parse),s=!(a=g(e||"",t=m(t))).protocol&&!a.slashes,E.slashes=a.slashes||s&&t.slashes,E.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!f(E.protocol)))&&(b[3]=[/(.*)/,"pathname"]);_{var n=r(23570),i=r(71171),s=i;s.v1=n,s.v4=i,e.exports=s},45327:e=>{for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);e.exports=function(e,r){var n=r||0,i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},85217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}},23570:(e,t,r)=>{var n,i,s=r(85217),o=r(45327),a=0,c=0;e.exports=function(e,t,r){var l=t&&r||0,u=t||[],d=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var p=s();null==d&&(d=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=i=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:c+1,g=m-a+(f-c)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||m>a)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=m,c=f,i=h;var v=(1e4*(268435455&(m+=122192928e5))+f)%4294967296;u[l++]=v>>>24&255,u[l++]=v>>>16&255,u[l++]=v>>>8&255,u[l++]=255&v;var y=m/4294967296*1e4&268435455;u[l++]=y>>>8&255,u[l++]=255&y,u[l++]=y>>>24&15|16,u[l++]=y>>>16&255,u[l++]=h>>>8|128,u[l++]=255&h;for(var b=0;b<6;++b)u[l+b]=d[b];return t||o(u)}},71171:(e,t,r)=>{var n=r(85217),i=r(45327);e.exports=function(e,t,r){var s=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;++a)t[s+a]=o[a];return t||i(o)}},45987:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(63366);function i(e,t){if(null==e)return{};var r,i,s=(0,n.Z)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i{"use strict";function n(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}r.d(t,{Z:()=>n})}}]); //# sourceMappingURL=/static/master/9671/assets/build/js/chunks/cccb61f55ca59f.js.map