/*! For license information please see module.js.LICENSE.txt */ /* [create-plugin] version: 6.7.5 */ /* [create-plugin] plugin: grafana-metricsdrilldown-app@1.0.29 */ define(["i18next","@grafana/runtime","rxjs","module","@emotion/css","react-dom","@emotion/react","react-router","@grafana/ui","react","@grafana/data","lodash"],(e,t,i,n,r,s,o,a,l,u,c,h)=>(()=>{var d,p,f,m,g={211:t=>{"use strict";t.exports=e},3357:(e,t,i)=>{"use strict";const n=i(23642);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},3853:(e,t,i)=>{"use strict";const n=i(23642);e.exports=(e,t,i)=>(e=new n(e,i),t=new n(t,i),e.intersects(t,i))},5946:(e,t,i)=>{"use strict";i.d(t,{$0:()=>O,AY:()=>y,Hp:()=>c,IP:()=>h,LE:()=>v,MB:()=>n,NY:()=>r,Nm:()=>$,bE:()=>u,d_:()=>s,fY:()=>l,jQ:()=>a,k8:()=>p,mz:()=>w,rT:()=>o,tS:()=>b,tv:()=>g,w2:()=>f,wQ:()=>m,wi:()=>E,y6:()=>d});const n="en-US",r="fr-FR",s="es-ES",o="de-DE",a="pt-BR",l="zh-Hans",u="it-IT",c="ja-JP",h="id-ID",d="ko-KR",p="ru-RU",f="cs-CZ",m="nl-NL",g="hu-HU",v="pt-PT",b="pl-PL",O="sv-SE",w="tr-TR",y="zh-Hant",$=n,E="pseudo"},5974:(e,t,i)=>{"use strict";const n=i(81053);e.exports=(e,t)=>{const i=n(e,t);return i&&i.prerelease.length?i.prerelease:null}},8386:(e,t,i)=>{"use strict";const n=i(23642);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},8624:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>n(e,t,i)>=0},8819:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>n(e,t,i)>0},11528:(e,t,i)=>{"use strict";i.d(t,{U1:()=>x});var n=i(32103);class r{constructor(e,t,i,n,r,s,o,a,l,u=0,c){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=r,this.score=s,this.buffer=o,this.bufferBase=a,this.curContext=l,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let n=e.parser.context;return new r(e,[],t,i,i,0,[],0,n?new s(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=65535&e,{parser:r}=this.p,s=this.reducePos=2e3&&!(null===(t=this.p.parser.nodeSet.types[n])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(n,l)}storeNode(e,t,i,n=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[n-4]&&e.buffer[n-1]>-1){if(t==i)return;if(e.buffer[n-2]>=t)return void(e.buffer[n-2]=i)}}if(r&&this.pos!=i){let r=this.buffer.length;if(r>0&&0!=this.buffer[r-4]){let e=!1;for(let t=r;t>0&&this.buffer[t-2]>i;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,n>4&&(n-=4)}this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=i,this.buffer[r+3]=n}else this.buffer.push(e,t,i,n)}shift(e,t,i,n){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=n,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,n,4);else{let r=e,{parser:s}=this.p;(n>this.pos||t<=s.maxNode)&&(this.pos=n,s.stateFlag(r,1)||(this.reducePos=n)),this.pushState(r,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,n,4)}}apply(e,t,i,n){65536&e?this.reduce(e):this.shift(e,t,i,n)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new o(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==i)return!1;if(!(65536&i))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let n,r=0;r1&t&&e==n)||i.push(t[e],n)}t=i}let i=[];for(let e=0;e>19,n=65535&t,r=this.stack.length-3*i;if(r<0||e.getGoto(this.stack[r],n,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(n,r)=>{if(!t.includes(n))return t.push(n),e.allActions(n,t=>{if(393216&t);else if(65536&t){let i=(t>>19)-r;if(i>1){let n=65535&t,r=this.stack.length-3*i;if(r>=0&&e.getGoto(this.stack[r],n,!1)>=0)return i<<19|65536|n}}else{let e=i(t,r+1);if(null!=e)return e}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class s{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class o{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,i=e>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}}class a{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new a(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new a(this.stack,this.pos,this.index)}}function l(e,t=Uint16Array){if("string"!=typeof e)return e;let i=null;for(let n=0,r=0;n=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,i=!0),s+=r,i)break;s*=46}i?i[r++]=s:i=new t(s)}return i}class u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const c=new u;class h{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=c,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(n==this.ranges.length-1)return null;let e=this.ranges[++n];r+=e.from-i.to,i=e}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,i,n=this.chunkOff+e;if(n>=0&&n=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=c,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}}class d{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;p(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}d.prototype.contextual=d.prototype.fallback=d.prototype.extend=!1;d.prototype.fallback=d.prototype.extend=!1;function p(e,t,i,n,r,s){let o=0,a=1<0){let i=e[n];if(l.allows(i)&&(-1==t.token.value||t.token.value==i||m(i,t.token.value,r,s))){t.acceptToken(i);break}}let n=t.next,u=0,c=e[o+2];if(!(t.next<0&&c>u&&65535==e[i+3*c-3])){for(;u>1,s=i+r+(r<<1),a=e[s],l=e[s+1]||65536;if(n=l)){o=e[s+2],t.advance();continue e}u=r+1}}break}o=e[i+3*c-1]}}function f(e,t,i){for(let n,r=t;65535!=(n=e[r]);r++)if(n==i)return r-t;return-1}function m(e,t,i,n){let r=f(i,n,t);return r<0||f(i,n,e)t)&&!r.type.isError)return i<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(i<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return i<0?0:e.length}}class O{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?b(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?b(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(s instanceof n.PH){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}}class w{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new u)}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:r}=n,s=n.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,a=0;for(let n=0;nu.end+25&&(a=Math.max(u.lookAhead,a)),0!=u.value)){let n=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(i=u,t>n))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),i||e.pos!=this.stream.end||(i=new u,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new u,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:t}=i.p;for(let n=0;n=0&&i.p.parser.dialect.allows(r>>1)){1&r?e.extended=r>>1:e.value=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let t=0;t4*e.bufferLength?new O(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,i=this.stacks,n=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[e]=i;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)r.push(o);else{if(this.advanceStack(o,r,i))continue;{e||(e=[],t=[]),e.push(o);let i=this.tokens.getMainToken(o);t.push(i.value,i.end)}}break}}if(!r.length){let t=e&&function(e){let t=null;for(let i of e){let e=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=e&&i.pos>e)&&i.p.parser.stateFlag(i.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,r);if(i)return this.stackToTree(i.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort((e,t)=>t.score-e.score);r.length>e;)r.pop();r.some(e=>e.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let e=0;e500&&n.buffer.length>500){if(!((t.score-n.score||t.buffer.length-n.buffer.length)>0)){r.splice(e--,1);continue e}r.splice(i--,1)}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let e=1;ethis.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,i=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?s.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(n.uY.contextHash)||0)==i))return e.useNode(o,r),!0;if(!(o instanceof n.PH)||0==o.children.length||o.positions[0]>0)break;let a=o.children[0];if(!(a instanceof n.PH&&0==o.positions[0]))break;o=a}}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let n=0;nr?t.push(c):i.push(c)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return $(e,t),!0}}runRecovery(e,t,i){let n=null,r=!1;for(let s=0;s ":"";if(o.deadEnd){if(r)continue;if(r=!0,o.restart(),this.advanceFully(o,i))continue}let c=o.split(),h=u;for(let e=0;c.forceReduce()&&e<10;e++){if(this.advanceFully(c,i))break;g&&(h=this.stackID(c)+" -> ")}for(let e of o.recoverByInsert(a))this.advanceFully(e,i);this.stream.end>o.pos?(l==o.pos&&(l++,a=0),o.recoverByDelete(a,l),$(o,i)):(!n||n.scoree.topRules[t][1]),r=[];for(let e=0;e=0)s(n,e,t[i++]);else{let r=t[i+-n];for(let o=-n;o>0;o--)s(t[i++],e,r);i++}}}this.nodeSet=new n.fI(t.map((t,s)=>n.Z6.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:r[s],top:i.indexOf(s)>-1,error:0==s,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=n.cF;let o=l(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new d(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new y(this,e,t,i);for(let r of this.wrappers)n=r(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let r=n[t+1];;){let t=n[r++],s=1&t,o=n[r++];if(s&&i)return o;for(let i=r+(t>>1);r0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let i=this.stateSlot(e,1);null==n;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=S(this.data,i+2)}n=t(S(this.data,i+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=S(this.data,i+2)}if(!(1&this.data[i+2])){let e=this.data[i+1];t.some((t,i)=>1&i&&t==e)||t.push(this.data[i],e)}}return t}configure(e){let t=Object.assign(Object.create(x.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(e=>e.from==t);return i?i.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,n)=>{let r=e.specializers.find(e=>e.from==i.external);if(!r)return i;let s=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[n]=k(s),s})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let n of e.split(" ")){let e=t.indexOf(n);e>=0&&(i[e]=!0)}let n=null;for(let e=0;ee.external(i,n)<<1|t}return e.get}},14110:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t,i,r,s)=>{"string"==typeof i&&(s=r,r=i,i=void 0);try{return new n(e instanceof n?e.version:e,i).inc(t,r,s).version}catch(e){return null}}},15123:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t)=>new n(e,t).major},17352:(e,t,i)=>{"use strict";var n;i.d(t,{n1:()=>kn,Js:()=>Rn,gu:()=>In}),function(e){e.EXCEPTION="exception",e.LOG="log",e.MEASUREMENT="measurement",e.TRACE="trace",e.EVENT="event"}(n||(n={}));const r={[n.EXCEPTION]:"exceptions",[n.LOG]:"logs",[n.MEASUREMENT]:"measurements",[n.TRACE]:"traces",[n.EVENT]:"events"};function s(e,t){return typeof e===t}function o(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function a(e,t){try{return e instanceof t}catch(e){return!1}}const l=e=>s(e,"null"),u=e=>s(e,"string"),c=e=>s(e,"number")&&!isNaN(e)||s(e,"bigint"),h=e=>s(e,"boolean"),d=e=>!l(e)&&s(e,"object"),p=e=>s(e,"function"),f=e=>o(e,"Array"),m="undefined"!=typeof Event,g="undefined"!=typeof Error,v=e=>g&&a(e,Error);function b(e){return null==e||(f(e)||u(e)?0===e.length:!!d(e)&&0===Object.keys(e).length)}function O(e={}){return JSON.stringify(null!=e?e:{},function(){const e=new WeakSet;return function(t,i){if(d(i)&&null!==i){if(e.has(i))return null;e.add(i)}return i}}())}function w(e={}){const t={};for(const[i,n]of Object.entries(e))t[i]=d(n)&&null!==n?O(n):String(n);return t}function y(){return Date.now()}function $(){return(new Date).toISOString()}function E(e){return new Date(e).toISOString()}function x(e,t){if(e===t)return!0;if(s(e,"number")&&isNaN(e))return s(t,"number")&&isNaN(t);const i=f(e),n=f(t);if(i!==n)return!1;if(i&&n){const i=e.length;if(i!==t.length)return!1;for(let n=i;0!==n--;)if(!x(e[n],t[n]))return!1;return!0}const r=d(e),o=d(t);if(r!==o)return!1;if(e&&t&&r&&o){const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(let e of i)if(!n.includes(e))return!1;for(let n of i)if(!x(e[n],t[n]))return!1;return!0}return!1}class S{constructor(){this.subscribers=[]}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>this.unsubscribe(e)}}unsubscribe(e){this.subscribers=this.subscribers.filter(t=>t!==e)}notify(e){this.subscribers.forEach(t=>t(e))}first(){const e=new S,t=t=>{e.notify(t),i.unsubscribe()},i=this.subscribe(t),n=e.unsubscribe.bind(e);return this.withUnsubscribeOverride(e,n,t)}takeWhile(e){const t=new S,i=n=>{e(n)?t.notify(n):t.unsubscribe(i)};this.subscribe(i);const n=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,n,i)}filter(e){const t=new S,i=i=>{e(i)&&t.notify(i)};this.subscribe(i);const n=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,n,i)}merge(...e){const t=new S,i=[];e.forEach(e=>{const n=e.subscribe(e=>{t.notify(e)});i.push(n)});const n=t.unsubscribeAll.bind(t);return t.unsubscribe=()=>{i.forEach(e=>e.unsubscribe()),n()},t}withUnsubscribeOverride(e,t,i){return e.unsubscribe=e=>{t(e),this.unsubscribe(i)},e}unsubscribeAll(){this.subscribers=[]}}const k="faroApiCall",P="user_action_start",T={Normal:"normal",Critical:"critical"};var A;!function(e){e[e.Started=0]="Started",e[e.Halted=1]="Halted",e[e.Cancelled=2]="Cancelled",e[e.Ended=3]="Ended"}(A||(A={}));const I="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function R(e=10){return Array.from(Array(e)).map(()=>I[Math.floor(59*Math.random())]).join("")}class N{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if(p(e))for(const t of this.buffer)e(t);this.buffer.length=0}size(){return this.buffer.length}}class _ extends S{constructor({name:e,parentId:t,trigger:i,transports:n,attributes:r,trackUserActionsExcludeItem:s,importance:o=T.Normal,pushEvent:a}){super(),this.name=e,this.attributes=r,this.id=R(),this.trigger=i,this.parentId=null!=t?t:this.id,this.trackUserActionsExcludeItem=s,this.importance=o,this._pushEvent=a,this._itemBuffer=new N,this._transports=n,this._state=A.Started,this._start()}addItem(e){return this._state===A.Started&&(this._itemBuffer.addItem(e),!0)}_start(){this._state=A.Started,this._state===A.Started&&(this.startTime=y())}halt(){this._state===A.Started&&(this._state=A.Halted,this.notify(this._state))}cancel(){this._state===A.Started&&this._itemBuffer.flushBuffer(),this._state=A.Cancelled,this.notify(this._state)}end(){if(this._state===A.Cancelled)return;const e=y(),t=e-this.startTime;this._state=A.Ended,this._itemBuffer.flushBuffer(e=>{if(function(e,t){return(null==t?void 0:t(e))||e.type===n.MEASUREMENT&&"web-vitals"===e.payload.type}(e,this.trackUserActionsExcludeItem))return void this._transports.execute(e);const t=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{action:{parentId:this.id,name:this.name}})});this._transports.execute(t)}),this._state=A.Ended,this.notify(this._state),this._pushEvent("faro.user.action",Object.assign({userActionName:this.name,userActionStartTime:this.startTime.toString(),userActionEndTime:e.toString(),userActionDuration:t.toString(),userActionTrigger:this.trigger,userActionImportance:this.importance},w(this.attributes)),void 0,{timestampOverwriteMs:this.startTime,customPayloadTransformer:e=>(e.action={id:this.id,name:this.name},e)})}getState(){return this._state}}const L=new S;function C(e,t){if(!e)return!1;return(null==e?void 0:e.getState())===A.Started&&(e.addItem(t),!0)}const Q="Error",X=e=>e.map(e=>d(e)?O(e):String(e)).join(" ");let D;function j({internalLogger:e,config:t,metas:i,transports:r,tracesApi:s,userActionsApi:o}){var a;e.debug("Initializing exceptions API");let c=null;D=null!==(a=t.parseStacktrace)&&void 0!==a?a:D;const h=t=>{e.debug("Changing stacktrace parser"),D=null!=t?t:D},{ignoreErrors:p=[],preserveOriginalError:m}=t;return h(t.parseStacktrace),{changeStacktraceParser:h,getStacktraceParser:()=>D,pushError:(a,{skipDedupe:h,stackFrames:g,type:y,context:S,spanContext:k,timestampOverwriteMs:P,originalError:T}={})=>{if(!function(e,t){const{message:i,name:n,stack:r}=t;return s=e,o=i+" "+n+" "+r,s.some(e=>u(e)?o.includes(e):!!o.match(e));var s,o}(p,null!=T?T:a))try{const u=w(Object.assign(Object.assign({},function(e){let t=e.cause;v(t)?t=e.cause.toString():null!==t&&(d(e.cause)||f(e.cause))?t=O(e.cause):null!=t&&(t=e.cause.toString());return null==t?{}:{cause:t}}(null!=T?T:a)),null!=S?S:{})),p={meta:i.value,payload:Object.assign(Object.assign({type:y||a.name||Q,value:a.message,timestamp:P?E(P):$(),trace:k?{trace_id:k.traceId,span_id:k.spanId}:s.getTraceContext()},b(u)?{}:{context:u}),m?{originalError:T}:{}),type:n.EXCEPTION};(null==(g=null!=g?g:a.stack?null==D?void 0:D(a).frames:void 0)?void 0:g.length)&&(p.payload.stacktrace={frames:g});const A={type:p.payload.type,value:p.payload.value,stackTrace:p.payload.stacktrace,context:p.payload.context};if(!h&&t.dedupe&&!l(c)&&x(A,c))return void e.debug("Skipping error push because it is the same as the last one\n",p.payload);c=A,e.debug("Pushing exception\n",p),C(o.getActiveUserAction(),p)||r.execute(p)}catch(t){e.error("Error pushing event",t)}}}}var U=i(69205);const M=e=>e.map(e=>{try{return String(e)}catch(e){return""}}).join(" ");function z(e,t,i,r,s){t.debug("Initializing API");let o=null;const a=function({transports:e,internalLogger:t,config:i,pushEvent:n}){var r;const s=null===(r=i.userActionsInstrumentation)||void 0===r?void 0:r.excludeItem;let o;const a=()=>o,l={startUserAction:(i,r,l)=>{if(void 0===a()){const t=new _({name:i,transports:e,attributes:r,trigger:(null==l?void 0:l.triggerName)||k,importance:(null==l?void 0:l.importance)||T.Normal,trackUserActionsExcludeItem:s,pushEvent:n});return t.filter(e=>[A.Ended,A.Cancelled].includes(e)).first().subscribe(()=>{o=void 0}),L.notify({type:P,userAction:t}),o=t,o}t.error("Attempted to create a new user action while one is already running. This is not possible.")},getActiveUserAction:a};return l}({transports:s,config:i,internalLogger:t,pushEvent:(e,i,n,r)=>{o?o(e,i,n,r):t.warn("pushEventImpl is not initialized. Event dropped:",{name:e,attributes:i,domain:n,options:r})}}),c=function(e,t,i,r,s){let o;return t.debug("Initializing traces API"),{getOTEL:()=>o,getTraceContext:()=>{const e=null==o?void 0:o.trace.getSpanContext(o.context.active());return e?{trace_id:e.traceId,span_id:e.spanId}:void 0},initOTEL:(e,i)=>{t.debug("Initializing OpenTelemetry"),o={trace:e,context:i}},isOTELInitialized:()=>!!o,pushTraces:e=>{try{const i={type:n.TRACE,payload:e,meta:r.value};t.debug("Pushing trace\n",i),s.execute(i)}catch(e){t.error("Error pushing trace\n",e)}}}}(0,t,0,r,s),h={unpatchedConsole:e,internalLogger:t,userActionsApi:a,config:i,metas:r,transports:s,tracesApi:c},d=function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:s,userActionsApi:o}){let a=null;return{pushEvent:(u,c,h,{skipDedupe:d,spanContext:p,timestampOverwriteMs:f,customPayloadTransformer:m=e=>e}={})=>{try{const g=w(c),v={meta:i.value,payload:m({name:u,domain:null!=h?h:t.eventDomain,attributes:b(g)?void 0:g,timestamp:f?E(f):$(),trace:p?{trace_id:p.traceId,span_id:p.spanId}:s.getTraceContext()}),type:n.EVENT},O={name:v.payload.name,attributes:v.payload.attributes,domain:v.payload.domain};if(!d&&t.dedupe&&!l(a)&&x(O,a))return void e.debug("Skipping event push because it is the same as the last one\n",v.payload);a=O,e.debug("Pushing event\n",v),C(o.getActiveUserAction(),v)||r.execute(v)}catch(t){e.error("Error pushing event",t)}}}}(h);return o=d.pushEvent,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),j(h)),function({internalLogger:e,metas:t}){let i,n,r,s;e.debug("Initializing meta API");const o=e=>{n&&t.remove(n),n={user:e},t.add(n)},a=(e,n)=>{var r;const s=null==n?void 0:n.overrides,o=s?{overrides:Object.assign(Object.assign({},null===(r=null==i?void 0:i.session)||void 0===r?void 0:r.overrides),s)}:{};i&&t.remove(i),i={session:Object.assign(Object.assign({},b(e)?void 0:e),o)},t.add(i)},l=()=>t.value.session,c=()=>t.value.page;return{setUser:o,resetUser:o,setSession:a,resetSession:a,getSession:l,setView:(e,i)=>{var n;if((null==i?void 0:i.overrides)&&a(l(),{overrides:i.overrides}),(null===(n=null==r?void 0:r.view)||void 0===n?void 0:n.name)===(null==e?void 0:e.name))return;const s=r;r={view:e},t.add(r),s&&t.remove(s)},getView:()=>t.value.view,setPage:e=>{var i;const n=u(e)?Object.assign(Object.assign({},null!==(i=null==s?void 0:s.page)&&void 0!==i?i:c()),{id:e}):e;s&&t.remove(s),s={page:n},t.add(s)},getPage:c}}(h)),function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:s,userActionsApi:o}){var a;e.debug("Initializing logs API");let u=null;const c=null!==(a=t.logArgsSerializer)&&void 0!==a?a:M;return{pushLog:(a,{context:h,level:d,skipDedupe:p,spanContext:f,timestampOverwriteMs:m}={})=>{try{const g=w(h),v={type:n.LOG,payload:{message:c(a),level:null!=d?d:U.Ic,context:b(g)?void 0:g,timestamp:m?E(m):$(),trace:f?{trace_id:f.traceId,span_id:f.spanId}:s.getTraceContext()},meta:i.value},O={message:v.payload.message,level:v.payload.level,context:v.payload.context};if(!p&&t.dedupe&&!l(u)&&x(O,u))return void e.debug("Skipping log push because it is the same as the last one\n",v.payload);u=O,e.debug("Pushing log\n",v),C(o.getActiveUserAction(),v)||r.execute(v)}catch(t){e.error("Error pushing log\n",t)}}}}(h)),function({internalLogger:e,config:t,metas:i,transports:r,tracesApi:s,userActionsApi:o}){e.debug("Initializing measurements API");let a=null;return{pushMeasurement:(u,{skipDedupe:c,context:h,spanContext:d,timestampOverwriteMs:p}={})=>{try{const f=w(h),m={type:n.MEASUREMENT,payload:Object.assign(Object.assign({},u),{trace:d?{trace_id:d.traceId,span_id:d.spanId}:s.getTraceContext(),timestamp:p?E(p):$(),context:b(f)?void 0:f}),meta:i.value},g={type:m.payload.type,values:m.payload.values,context:m.payload.context};if(!c&&t.dedupe&&!l(a)&&x(g,a))return void e.debug("Skipping measurement push because it is the same as the last one\n",m.payload);a=g,e.debug("Pushing measurement\n",m),C(o.getActiveUserAction(),m)||r.execute(m)}catch(t){e.error("Error pushing measurement\n",t)}}}}(h)),d),a)}function F(){}var q;!function(e){e[e.OFF=0]="OFF",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.VERBOSE=4]="VERBOSE"}(q||(q={}));const H={debug:F,error:F,info:F,prefix:"Faro",warn:F},B=q.ERROR,V=Object.assign({},console);function G(e=V,t=B){const i=H;return t>q.OFF&&(i.error=t>=q.ERROR?function(...t){e.error(`${i.prefix}\n`,...t)}:F,i.warn=t>=q.WARN?function(...t){e.warn(`${i.prefix}\n`,...t)}:F,i.info=t>=q.INFO?function(...t){e.info(`${i.prefix}\n`,...t)}:F,i.debug=t>=q.VERBOSE?function(...t){e.debug(`${i.prefix}\n`,...t)}:F),i}let Y=H;function W(e,t){return Y=G(e,t.internalLoggerLevel),Y}const Z="undefined"!=typeof globalThis?globalThis:void 0!==i.g?i.g:"undefined"!=typeof self?self:void 0;const K="2.2.0";const J="_faroInternal";let ee={};function te(e,t,i,n,r,s,o){return t.debug("Initializing Faro"),ee={api:s,config:i,instrumentations:o,internalLogger:t,metas:n,pause:r.pause,transports:r,unpatchedConsole:e,unpause:r.unpause},function(e){e.config.isolate?e.internalLogger.debug("Skipping registering internal Faro instance on global object"):(e.internalLogger.debug("Registering internal Faro instance on global object"),Object.defineProperty(Z,J,{configurable:!1,enumerable:!1,writable:!1,value:e}))}(ee),function(e){if(e.config.preventGlobalExposure)e.internalLogger.debug("Skipping registering public Faro instance in the global scope");else{if(e.internalLogger.debug(`Registering public faro reference in the global scope using "${e.config.globalObjectKey}" key`),e.config.globalObjectKey in Z)return void e.internalLogger.warn(`Skipping global registration due to key "${e.config.globalObjectKey}" being used already. Please set "globalObjectKey" to something else or set "preventGlobalExposure" to "true"`);Object.defineProperty(Z,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}(ee),ee}class ie{constructor(e,t){var i,n;this.signalBuffer=[],this.itemLimit=null!==(i=null==t?void 0:t.itemLimit)&&void 0!==i?i:50,this.sendTimeout=null!==(n=null==t?void 0:t.sendTimeout)&&void 0!==n?n:250,this.paused=(null==t?void 0:t.paused)||!1,this.sendFn=e,this.flushInterval=-1,this.paused||this.start(),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.flush()})}addItem(e){this.paused||(this.signalBuffer.push(e),this.signalBuffer.length>=this.itemLimit&&this.flush())}start(){this.paused=!1,this.sendTimeout>0&&(this.flushInterval=window.setInterval(()=>this.flush(),this.sendTimeout))}pause(){this.paused=!0,clearInterval(this.flushInterval)}groupItems(e){const t=new Map;return e.forEach(e=>{const i=JSON.stringify(e.meta);let n=t.get(i);n=void 0===n?[e]:[...n,e],t.set(i,n)}),Array.from(t.values())}flush(){if(this.paused||0===this.signalBuffer.length)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}function ne(e,t,i,n){var r;t.debug("Initializing transports");const s=[];let o=i.paused,a=[];const l=e=>{let t=e;for(const e of a){const n=t.map(e).filter(Boolean);if(0===n.length)return[];t=re(n,i)}return t},u=e=>{const i=l(e);if(0!==i.length)for(const e of s)t.debug(`Transporting item using ${e.name}\n`,i),e.isBatched()&&e.send(i)};let c;(null===(r=i.batching)||void 0===r?void 0:r.enabled)&&(c=new ie(u,{sendTimeout:i.batching.sendTimeout,itemLimit:i.batching.itemLimit,paused:o}));return{add:(...r)=>{t.debug("Adding transports"),r.forEach(r=>{t.debug(`Adding "${r.name}" transport`);s.some(e=>e===r)?t.warn(`Transport ${r.name} is already added`):(r.unpatchedConsole=e,r.internalLogger=t,r.config=i,r.metas=n,s.push(r))})},addBeforeSendHooks:(...e)=>{t.debug("Adding beforeSendHooks\n",a),e.forEach(e=>{e&&a.push(e)})},getBeforeSendHooks:()=>[...a],execute:e=>{var n;o||((null===(n=i.batching)||void 0===n?void 0:n.enabled)&&(null==c||c.addItem(e)),(e=>{var n,r;if((null===(n=i.batching)||void 0===n?void 0:n.enabled)&&s.every(e=>e.isBatched()))return;const[o]=l([e]);if(void 0!==o)for(const e of s)t.debug(`Transporting item using ${e.name}\n`,o),e.isBatched()?(null===(r=i.batching)||void 0===r?void 0:r.enabled)||e.send([o]):e.send(o)})(e))},isPaused:()=>o,pause:()=>{t.debug("Pausing transports"),null==c||c.pause(),o=!0},remove:(...e)=>{t.debug("Removing transports"),e.forEach(e=>{t.debug(`Removing "${e.name}" transport`);const i=s.indexOf(e);-1!==i?s.splice(i,1):t.warn(`Transport "${e.name}" is not added`)})},removeBeforeSendHooks:(...e)=>{a.filter(t=>!e.includes(t))},get transports(){return[...s]},unpause:()=>{t.debug("Unpausing transports"),null==c||c.start(),o=!1}}}function re(e,t){if(t.preserveOriginalError)for(const t of e)t.type===n.EXCEPTION&&delete t.payload.originalError;return e}let se=V;function oe(e){var t;return se=null!==(t=e.unpatchedConsole)&&void 0!==t?t:se,se}function ae(e){const t=oe(e),i=W(t,e);if(J in Z&&!e.isolate)return void i.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');i.debug("Initializing");const n=function(e,t){let i=[],n=[];const r=()=>i.reduce((e,t)=>Object.assign(e,p(t)?t():t),{}),s=()=>{if(n.length){const e=r();n.forEach(t=>t(e))}};return{add:(...e)=>{t.debug("Adding metas\n",e),i.push(...e),s()},remove:(...e)=>{t.debug("Removing metas\n",e),i=i.filter(t=>!e.includes(t)),s()},addListener:e=>{t.debug("Adding metas listener\n",e),n.push(e)},removeListener:e=>{t.debug("Removing metas listener\n",e),n=n.filter(t=>t!==e)},get value(){return r()}}}(0,i),r=ne(t,i,e,n),s=z(t,i,e,n,r),o=function(e,t,i,n,r,s){t.debug("Initializing instrumentations");const o=[];return{add:(...a)=>{t.debug("Adding instrumentations"),a.forEach(a=>{t.debug(`Adding "${a.name}" instrumentation`),o.some(e=>e.name===a.name)?t.warn(`Instrumentation ${a.name} is already added`):(a.unpatchedConsole=e,a.internalLogger=t,a.config=i,a.metas=n,a.transports=r,a.api=s,o.push(a),a.initialize())})},get instrumentations(){return[...o]},remove:(...e)=>{t.debug("Removing instrumentations"),e.forEach(e=>{var i,n;t.debug(`Removing "${e.name}" instrumentation`);const r=o.reduce((t,i,n)=>null===t&&i.name===e.name?n:null,null);null!==r?(null===(n=(i=o[r]).destroy)||void 0===n||n.call(i),o.splice(r,1)):t.warn(`Instrumentation "${e.name}" is not added`)})}}}(t,i,e,n,r,s),a=te(t,i,e,n,r,s,o);return function(e){var t,i;const n={sdk:{version:K},app:{bundleId:e.config.app.name&&(r=e.config.app.name,null==Z?void 0:Z[`__faroBundleId_${r}`])}};var r;const s=null===(t=e.config.sessionTracking)||void 0===t?void 0:t.session;s&&e.api.setSession(s),e.config.app&&(n.app=Object.assign(Object.assign({},e.config.app),n.app)),e.config.user&&(n.user=e.config.user),e.config.view&&(n.view=e.config.view),e.metas.add(n,...null!==(i=e.config.metas)&&void 0!==i?i:[])}(a),function(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend)}(a),function(e){e.instrumentations.add(...e.config.instrumentations)}(a),a}const le="faro",ue={enabled:!0,sendTimeout:250,itemLimit:50},ce="browser",he="\n",de="eval",pe="?",fe="@",me=/^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ge=/\((\S*)(?::(\d+))(?::(\d+))\)/,ve="eval",be="address at ",Oe=be.length,we=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ye=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$e=" > eval",Ee="safari-extension",xe="safari-web-extension",Se=/Minified React error #\d+;/i;function ke(e,t,i,n){const r={filename:e||document.location.href,function:t||pe};return void 0!==i&&(r.lineno=i),void 0!==n&&(r.colno=n),r}function Pe(e,t){const i=null==e?void 0:e.includes(Ee),n=!i&&(null==e?void 0:e.includes(xe));return i||n?[(null==e?void 0:e.includes(fe))?e.split(fe)[0]:e,i?`${Ee}:${t}`:`${xe}:${t}`]:[e,t]}function Te(e){let t=[];e.stacktrace?t=e.stacktrace.split(he).filter((e,t)=>t%2==0):e.stack&&(t=e.stack.split(he));const i=t.reduce((t,i,n)=>{let r,s,o,a,l;if(r=me.exec(i)){if(s=r[1],o=r[2],a=r[3],l=r[4],null==o?void 0:o.startsWith(ve)){const e=ge.exec(o);e&&(o=e[1],a=e[2],l=e[3])}o=(null==o?void 0:o.startsWith(be))?o.substring(Oe):o,[s,o]=Pe(s,o)}else if(r=we.exec(i)){if(s=r[1],o=r[3],a=r[4],l=r[5],o&&o.includes($e)){const e=ye.exec(o);e&&(s=s||de,o=e[1],a=e[2])}else 0===n&&!l&&c(e.columnNumber)&&(l=String(e.columnNumber+1));[s,o]=Pe(s,o)}return(o||s)&&t.push(ke(o,s,a?Number(a):void 0,l?Number(l):void 0)),t},[]);return Se.test(e.message)?i.slice(1):i}function Ae(e){return{frames:Te(e)}}const Ie="com.grafana.faro.session",Re=9e5,Ne={enabled:!0,persistent:!1,maxSessionPersistenceTime:Re},_e="data-faro-user-action-name";var Le=i(69174);const Ce="unknown",Qe=()=>{const e=new Le.UAParser,{name:t,version:i}=e.getBrowser(),{name:n,version:r}=e.getOS(),s=e.getUA(),o=navigator.language,a=navigator.userAgent.includes("Mobi"),l=function(){if(!t||!i)return;if("userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands;return}();return{browser:{name:null!=t?t:Ce,version:null!=i?i:Ce,os:`${null!=n?n:Ce} ${null!=r?r:Ce}`,userAgent:null!=s?s:Ce,language:null!=o?o:Ce,mobile:a,brands:null!=l?l:Ce,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},Xe=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};let De,je;function Ue({generatePageId:e,initialPageMeta:t}={}){return()=>{const i=location.href;return p(e)&&De!==i&&(De=i,je=e(location)),{page:Object.assign(Object.assign({url:i},je?{id:je}:{}),t)}}}class Me{constructor(){this.unpatchedConsole=V,this.internalLogger=H,this.config={},this.metas={}}logDebug(...e){this.internalLogger.debug(`${this.name}\n`,...e)}logInfo(...e){this.internalLogger.info(`${this.name}\n`,...e)}logWarn(...e){this.internalLogger.warn(`${this.name}\n`,...e)}logError(...e){this.internalLogger.error(`${this.name}\n`,...e)}}class ze extends Me{isBatched(){return!1}getIgnoreUrls(){return[]}}function Fe(e,t){var i,n;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};const r=null===(i=e.resourceSpans)||void 0===i?void 0:i[0];if(void 0===r)return e;const s=(null==r?void 0:r.scopeSpans)||[],o=(null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},r),{scopeSpans:[...s,...o]})]})}function qe(e,t){let i,n=!1;const r=()=>{null!=i?(e(...i),i=null,setTimeout(r,t)):n=!1};return(...s)=>{n?i=s:(e(...s),n=!0,setTimeout(r,t))}}const He="sessionStorage",Be="localStorage";function Ve(e){var t;try{let t;t=window[e];const i="__faro_storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(i){return null===(t=ee.internalLogger)||void 0===t||t.info(`Web storage of type ${e} is not available. Reason: ${i}`),!1}}function Ge(e,t){return Je(t)?window[t].getItem(e):null}function Ye(e,t,i){if(Je(i))try{window[i].setItem(e,t)}catch(e){}}function We(e,t){Je(t)&&window[t].removeItem(e)}const Ze=Ve(Be),Ke=Ve(He);function Je(e){return e===Be?Ze:e===He&&Ke}const et="session_start",tt="session_resume",it="service_name_override";function nt(){var e,t,i;const n=ee.config.sessionTracking;let r=null!==(i=null!==(t=null===(e=null==n?void 0:n.sampler)||void 0===e?void 0:e.call(n,{metas:ee.metas.value}))&&void 0!==t?t:null==n?void 0:n.samplingRate)&&void 0!==i?i:1;if("number"!=typeof r){r=0}return Math.random()this.updateUserSession(),1e3),this.updateUserSession=ot({fetchUserSession:ut.fetchUserSession,storeUserSession:ut.storeUserSession}),this.init()}static removeUserSession(){We(Ie,ut.storageTypeLocal)}static storeUserSession(e){Ye(Ie,O(e),ut.storageTypeLocal)}static fetchUserSession(){const e=Ge(Ie,ut.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),ee.metas.addListener(lt({fetchUserSession:ut.fetchUserSession,storeUserSession:ut.storeUserSession}))}}ut.storageTypeLocal=Be;class ct{constructor(){this.updateSession=qe(()=>this.updateUserSession(),1e3),this.updateUserSession=ot({fetchUserSession:ct.fetchUserSession,storeUserSession:ct.storeUserSession}),this.init()}static removeUserSession(){We(Ie,ct.storageTypeSession)}static storeUserSession(e){Ye(Ie,O(e),ct.storageTypeSession)}static fetchUserSession(){const e=Ge(Ie,ct.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&this.updateSession()}),ee.metas.addListener(lt({fetchUserSession:ct.fetchUserSession,storeUserSession:ct.storeUserSession}))}}function ht(e){return(null==e?void 0:e.persistent)?ut:ct}ct.storageTypeSession=He;var dt=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})},pt=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);rDate.now(),this.promiseBuffer=function(e){const{size:t,concurrency:i}=e,n=[];let r=0;const s=()=>{if(r{r--,s(),t(e)},e=>{r--,s(),i(e)})}};return{add:e=>{if(n.length+r>=t)throw new Error("Task buffer full");return new Promise((t,i)=>{n.push({producer:e,resolve:t,reject:i}),s()})}}}({size:null!==(n=e.bufferSize)&&void 0!==n?n:30,concurrency:null!==(r=e.concurrency)&&void 0!==r?r:5})}send(e){return dt(this,void 0,void 0,function*(){try{if(this.disabledUntil>new Date(this.getNow()))return this.logWarn(`Dropping transport item due to too many requests. Backoff until ${this.disabledUntil}`),Promise.resolve();yield this.promiseBuffer.add(()=>{const t=JSON.stringify(function(e){let t={meta:{}};return void 0!==e[0]&&(t.meta=e[0].meta),e.forEach(e=>{switch(e.type){case n.LOG:case n.EVENT:case n.EXCEPTION:case n.MEASUREMENT:{const i=r[e.type],n=t[i];t=Object.assign(Object.assign({},t),{[i]:void 0===n?[e.payload]:[...n,e.payload]});break}case n.TRACE:t=Object.assign(Object.assign({},t),{traces:Fe(t.traces,e.payload.resourceSpans)})}}),t}(e)),{url:i,requestOptions:s,apiKey:o}=this.options,a=null!=s?s:{},{headers:l={}}=a,u=pt(a,["headers"]);let c;const h=this.metas.value.session;null!=h&&(c=h.id);const d={};for(const[e,t]of Object.entries(l))d[e]="function"==typeof t?t():t;return fetch(i,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},d),o?{"x-api-key":o}:{}),c?{"x-faro-session-id":c}:{}),body:t,keepalive:t.length<=6e4},null!=u?u:{})).then(e=>dt(this,void 0,void 0,function*(){if(202===e.status){"invalid"===e.headers.get("X-Faro-Session-Status")&&this.extendFaroSession(this.config,this.logDebug)}return 429===e.status&&(this.disabledUntil=this.getRetryAfterDate(e),this.logWarn(`Too many requests, backing off until ${this.disabledUntil}`)),e.text().catch(F),e})).catch(e=>{this.logError("Failed sending payload to the receiver\n",JSON.parse(t),e)})})}catch(e){this.logError(e)}})}getIgnoreUrls(){var e;return[this.options.url].concat(null!==(e=this.config.ignoreUrls)&&void 0!==e?e:[])}isBatched(){return!0}getRetryAfterDate(e){const t=this.getNow(),i=e.headers.get("Retry-After");if(i){const e=Number(i);if(!isNaN(e))return new Date(1e3*e+t);const n=Date.parse(i);if(!isNaN(n))return new Date(n)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){const i="Session expired",n=e.sessionTracking;if(null==n?void 0:n.enabled){const{fetchUserSession:e,storeUserSession:r}=ht(n);ot({fetchUserSession:e,storeUserSession:r})({forceSessionExtend:!0}),t(`${i} created new session.`)}else t(`${i}.`)}}class mt extends Me{constructor(){super(...arguments),this.api={},this.transports={}}}const gt="http-request-start",vt="http-request-end";let bt,Ot;function wt(){return bt||(bt=new S),Ot||(Ot=new MutationObserver((e,t)=>{bt.notify({type:"dom-mutation"})}),Ot.observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0})),bt}function yt(e=""){return ee.transports.transports.flatMap(e=>e.getIgnoreUrls()).some(t=>e&&null!=e.match(t))}const $t="fetch",Et="xhr";let xt,St,kt,Pt=!1;function Tt(){if(xt)return xt;function e(e){xt.notify({type:gt,request:e})}function t(e){xt.notify({type:vt,request:e})}return xt=new S,Pt||(!function({onRequestEnd:e,onRequestStart:t}){kt||(kt=window.fetch);window.fetch=function(){var i,n;const r=null!==(i=u(s=arguments[0])?s:s instanceof URL?s.href:!b(s)&&p(null==s?void 0:s.toString)?s.toString():void 0)&&void 0!==i?i:"";var s;const o=yt(r),a=(null!==(n=arguments[1])&&void 0!==n?n:{}).method,l=R();return o||t({url:r,method:a,requestId:l,apiType:$t}),kt.apply(this,arguments).then(t=>(o||e({url:r,method:a,requestId:l,apiType:$t}),t)).catch(t=>{throw o||e({url:r,method:a,requestId:l,apiType:$t}),t})}}({onRequestStart:e,onRequestEnd:t}),function({onRequestStart:e,onRequestEnd:t}){St||(St=XMLHttpRequest.prototype.open);XMLHttpRequest.prototype.open=function(){const i=arguments[1],n=yt(i),r=arguments[0],s=R();this.addEventListener("loadstart",function(){n||e({url:i,method:r,requestId:s,apiType:Et})}),this.addEventListener("load",function(){n||t({url:i,method:r,requestId:s,apiType:Et})}),this.addEventListener("error",function(){n||t({url:i,method:r,requestId:s,apiType:Et})}),this.addEventListener("abort",function(){n||t({url:i,method:r,requestId:s,apiType:Et})}),St.apply(this,arguments)}}({onRequestStart:e,onRequestEnd:t}),Pt=!0),xt}const At="com.grafana.faro.lastNavigationId",It="resource",Rt=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function Nt(e=[]){for(const t of e)if("traceparent"===t.name){if(!Rt.test(t.description))continue;const[,e,i]=t.description.split("-");if(null!=e&&null!=i)return{traceId:e,spanId:i};break}}function _t(e,t={}){for(const[i,n]of Object.entries(t)){const t=e[i];return null!=t&&(f(n)?n.includes(t):t===n)}return!0}function Lt(e){const{connectEnd:t,connectStart:i,decodedBodySize:n,domainLookupEnd:r,domainLookupStart:s,duration:o,encodedBodySize:a,fetchStart:l,initiatorType:u,name:c,nextHopProtocol:h,redirectEnd:d,redirectStart:p,renderBlockingStatus:f,requestStart:m,responseEnd:g,responseStart:v,responseStatus:b,secureConnectionStart:O,transferSize:w,workerStart:y}=e;return{name:c,duration:Qt(o),tcpHandshakeTime:Qt(t-i),dnsLookupTime:Qt(r-s),tlsNegotiationTime:Qt(t-O),responseStatus:Qt(b),redirectTime:Qt(d-p),requestTime:Qt(v-m),responseTime:Qt(g-v),fetchTime:Qt(g-l),serviceWorkerTime:Qt(l-y),decodedBodySize:Qt(n),encodedBodySize:Qt(a),cacheHitStatus:function(){let e="fullLoad";0===w?n>0&&(e="cache"):null!=b?304===b&&(e="conditionalFetch"):a>0&&w0?e:0).toString():e.toString()}const Xt={initiatorType:["xmlhttprequest","fetch"]};var Dt=function(e,t,i,n){return new(i||(i=Promise))(function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};const jt=new S;class Ut extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=K}initialize(){"PerformanceObserver"in window?function(e){if("complete"===document.readyState)e();else{const t=()=>{"complete"===document.readyState&&(e(),document.removeEventListener("readystatechange",t))};document.addEventListener("readystatechange",t)}}(()=>Dt(this,void 0,void 0,function*(){const e=this.api.pushEvent,{faroNavigationId:t}=yield function(e){let t;const i=new Promise(e=>{t=e});return new PerformanceObserver(i=>{var n;const[r]=i.getEntries();if(null==r||yt(r.name))return;const s=r.toJSON();let o=Nt(null==s?void 0:s.serverTiming);const a=null!==(n=Ge(At,He))&&void 0!==n?n:Ce,l=Object.assign(Object.assign({},Ct(s)),{faroNavigationId:R(),faroPreviousNavigationId:a});Ye(At,l.faroNavigationId,He),e("faro.performance.navigation",l,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+s.startTime}),t(l)}).observe({type:"navigation",buffered:!0}),i}(e);null!=t&&function(e,t,i){const n=ee.config.trackResources;new PerformanceObserver(r=>{const s=r.getEntries();for(const r of s){if(yt(r.name))continue;null==i||i.notify({type:It});const s=r.toJSON();let o=Nt(null==s?void 0:s.serverTiming);if(null==n&&_t(s,Xt)||n){const i=Object.assign(Object.assign({},Lt(s)),{faroNavigationId:e,faroResourceId:R()});t("faro.performance.resource",i,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+s.startTime})}}}).observe({type:It,buffered:!0})}(t,e,jt)})):this.logDebug("performance observer not supported. Disable performance instrumentation.")}}let Mt,zt,Ft=!1;function qt(e){return e.type===vt}class Ht{constructor(e){this.userAction=e,this.http=Tt(),this.dom=wt(),this.perf=(Mt||(Mt=new S),Ft||(zt=jt.subscribe(e=>{e.type===It&&Mt.notify({type:"resource-entry"})}),Ft=!0),Mt),this.isValid=!1,this.runningRequests=new Map}attach(){this.allMonitorsSub=(new S).merge(this.http,this.dom,this.perf).takeWhile(()=>[A.Started,A.Halted].includes(this.userAction.getState())).filter(e=>!!(this.userAction.getState()!==A.Halted||qt(e)&&this.runningRequests.has(e.request.requestId))).subscribe(e=>{(function(e){return e.type===gt})(e)&&this.runningRequests.set(e.request.requestId,e.request),qt(e)&&this.runningRequests.delete(e.request.requestId),qt(e)?this.userAction.getState()===A.Halted&&0===this.runningRequests.size&&this.endAction():(this.isValid||(this.isValid=!0),this.scheduleFollowUp())}),this.stateSub=this.userAction.filter(e=>[A.Ended,A.Cancelled].includes(e)).first().subscribe(()=>this.cleanup()),this.scheduleFollowUp()}scheduleFollowUp(){this.clearTimer(this.followUpTid),this.followUpTid=setTimeout(()=>{this.userAction.getState()===A.Started&&this.runningRequests.size>0?this.haltAction():this.isValid?this.endAction():this.cancelAction()},100)}haltAction(){this.userAction.getState()===A.Started&&(this.userAction.halt(),this.startHaltTimeout())}startHaltTimeout(){var e,t,i;this.clearTimer(this.haltTid),this.haltTid=(e=this.haltTid,t=()=>{this.userAction.getState()===A.Halted&&this.endAction()},i=1e4,e&&clearTimeout(e),setTimeout(()=>{t()},i))}endAction(){this.userAction.end(),this.cleanup()}cancelAction(){this.userAction.cancel(),this.cleanup()}cleanup(){var e,t;this.clearTimer(this.followUpTid),this.clearTimer(this.haltTid),null===(e=this.allMonitorsSub)||void 0===e||e.unsubscribe(),null===(t=this.stateSub)||void 0===t||t.unsubscribe(),this.allMonitorsSub=void 0,this.stateSub=void 0,this.runningRequests.clear()}clearTimer(e){e&&clearTimeout(e)}}function Bt(e){const{api:t,config:i}=e;function n(e){new Ht(e).attach()}return{processUserEvent:function(e){var r,s;const o=function(e,t){const i=function(e){const t=e.split("data-")[1],i=null==t?void 0:t.replace(/-(.)/g,(e,t)=>t.toUpperCase());return null==i?void 0:i.replace(/-/g,"")}(t),n=e.dataset;for(const e in n)if(e===i)return n[e];return}(e.target,null!==(s=null===(r=i.userActionsInstrumentation)||void 0===r?void 0:r.dataAttributeName)&&void 0!==s?s:"faroUserActionName");if(!o)return;const a=t.startUserAction(o,{},{triggerName:e.type});a&&n(a)},processUserActionStarted:n}}class Vt extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=K}initialize(){const{processUserEvent:e,processUserActionStarted:t}=Bt(ee);window.addEventListener("pointerdown",e),window.addEventListener("keydown",t=>{[" ","Enter"].includes(t.key)&&e(t)}),this._userActionSub=L.subscribe(({type:e,userAction:i})=>{"user_action_start"===e&&t(i)})}destroy(){var e;null===(e=this._userActionSub)||void 0===e||e.unsubscribe()}}const Gt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function Yt(e){let t,i,n,r,s=[];if((e=>o(e,"ErrorEvent"))(e)&&e.error)t=e.error.message,i=e.error.name,s=Te(e.error);else if((n=(e=>o(e,"DOMError"))(e))||(e=>o(e,"DOMException"))(e)){const{name:r,message:s}=e;i=null!=r?r:n?"DOMError":"DOMException",t=s?`${i}: ${s}`:i}else v(e)?(t=e.message,s=Te(e)):(d(e)||(r=(e=>m&&a(e,Event))(e)))&&(i=r?e.constructor.name:void 0,t=`Non-Error exception captured with keys: ${Object.keys(e)}`);return[t,i,s]}function Wt(e){const[t,i,n,r,s]=e;let o,a,l=[];const c=u(t),h=ke(i,"?",n,r);return s||!c?([o,a,l]=Yt(null!=s?s:t),0===l.length&&(l=[h])):c&&([o,a]=function(e){var t,i;const n=e.match(Gt),r=null!==(t=null==n?void 0:n[1])&&void 0!==t?t:Q;return[null!==(i=null==n?void 0:n[2])&&void 0!==i?i:e,r]}(t),l=[h]),{value:o,type:a,stackFrames:l}}function Zt(e,t){return v(e[0])?Wt(e):{value:t(e)}}const Kt=[];function Jt(e){const t=t=>{var i,n;let r,s,o=t;o.reason?o=t.reason:(null===(i=t.detail)||void 0===i?void 0:i.reason)&&(o=null===(n=t.detail)||void 0===n?void 0:n.reason);let a=[];(e=>!d(e)&&!p(e))(o)?(r=`Non-Error promise rejection captured with value: ${String(o)}`,s="UnhandledRejection"):[r,s,a]=Yt(o),r&&e.pushError(new Error(r),{type:s,stackFrames:a})};window.addEventListener("unhandledrejection",t),Kt.push(t)}class ei extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=K}initialize(){this.logDebug("Initializing"),function(e){const t=window.onerror;window.onerror=(...i)=>{try{const{value:t,type:n,stackFrames:r}=Wt(i),s=i[4];if(t){const i={type:n,stackFrames:r};null!=s&&(i.originalError=s),e.pushError(new Error(t),i)}}finally{null==t||t.apply(window,i)}}}(this.api),Jt(this.api)}}class ti{t;o=0;i=[];u(e){if(e.hadRecentInput)return;const t=this.i[0],i=this.i.at(-1);this.o&&t&&i&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),this.t?.(e)}}const ii=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart{if("loading"===document.readyState)return"loading";{const t=ii();if(t){if(e{const t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},si=e=>{let t="";try{for(;9!==e?.nodeType;){const i=e,n=i.id?"#"+i.id:[ri(i),...Array.from(i.classList).sort()].join(".");if(t.length+n.length>99)return t||n;if(t=t?n+">"+t:n,i.id)break;e=i.parentNode}}catch{}return t},oi=new WeakMap;function ai(e,t){return oi.get(e)||oi.set(e,new t),oi.get(e)}let li=-1;const ui=()=>li,ci=e=>{addEventListener("pageshow",t=>{t.persisted&&(li=t.timeStamp,e(t))},!0)},hi=(e,t,i,n)=>{let r,s;return o=>{t.value>=0&&(o||n)&&(s=t.value-(r??0),(s||void 0===r)&&(r=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,i),e(t)))}},di=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},pi=()=>{const e=ii();return e?.activationStart??0},fi=(e,t=-1)=>{const i=ii();let n="navigate";return ui()>=0?n="back-forward-cache":i&&(document.prerendering||pi()>0?n="prerender":document.wasDiscarded?n="restore":i.type&&(n=i.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},mi=(e,t,i={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return n.observe({type:e,buffered:!0,...i}),n}}catch{}},gi=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let vi=-1;const bi=new Set,Oi=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,wi=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of bi)e();isFinite(vi)||(vi="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",wi,!0))}},yi=()=>{if(vi<0){const e=pi(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;vi=t??Oi(),addEventListener("visibilitychange",wi,!0),addEventListener("prerenderingchange",wi,!0),ci(()=>{setTimeout(()=>{vi=Oi()})})}return{get firstHiddenTime(){return vi},onHidden(e){bi.add(e)}}},$i=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Ei=[1800,3e3],xi=(e,t={})=>{$i(()=>{const i=yi();let n,r=fi("FCP");const s=mi("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime{r=fi("FCP"),n=hi(e,r,Ei,t.reportAllChanges),di(()=>{r.value=performance.now()-i.timeStamp,n(!0)})}))})},Si=[.1,.25],ki=e=>e.find(e=>1===e.node?.nodeType)||e[0];let Pi=0,Ti=1/0,Ai=0;const Ii=e=>{for(const t of e)t.interactionId&&(Ti=Math.min(Ti,t.interactionId),Ai=Math.max(Ai,t.interactionId),Pi=Ai?(Ai-Ti)/7+1:0)};let Ri;const Ni=()=>Ri?Pi:performance.interactionCount??0;let _i=0;class Li{l=[];h=new Map;m;p;v(){_i=Ni(),this.l.length=0,this.h.clear()}M(){const e=Math.min(this.l.length-1,Math.floor((Ni()-_i)/50));return this.l[e]}u(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.l.at(-1);let i=this.h.get(e.interactionId);if(i||this.l.length<10||e.duration>t.T){if(i?e.duration>i.T?(i.entries=[e],i.T=e.duration):e.duration===i.T&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(i={id:e.interactionId,entries:[e],T:e.duration},this.h.set(i.id,i),this.l.push(i)),this.l.sort((e,t)=>t.T-e.T),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.h.delete(t.id)}this.p?.(i)}}}const Ci=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=gi(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},Qi=[200,500],Xi=(e,t={})=>{const i=ai(t=Object.assign({},t),Li);let n=[],r=[],s=0;const o=new WeakMap,a=new WeakMap;let l=!1;const u=()=>{l||(Ci(c),l=!0)},c=()=>{const e=i.l.map(e=>o.get(e.entries[0])),t=r.length-50;r=r.filter((i,n)=>n>=t||e.includes(i));const a=new Set;for(const e of r){const t=h(e.startTime,e.processingEnd);for(const e of t)a.add(e)}const u=n.length-1-50;n=n.filter((e,t)=>e.startTime>s&&t>u||a.has(e)),l=!1};i.m=e=>{const t=e.startTime+e.duration;let i;s=Math.max(s,e.processingEnd);for(let n=r.length-1;n>=0;n--){const s=r[n];if(Math.abs(t-s.renderTime)<=8){i=s,i.startTime=Math.min(e.startTime,i.startTime),i.processingStart=Math.min(e.processingStart,i.processingStart),i.processingEnd=Math.max(e.processingEnd,i.processingEnd),i.entries.push(e);break}}i||(i={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:t,entries:[e]},r.push(i)),(e.interactionId||"first-input"===e.entryType)&&o.set(e,i),u()},i.p=e=>{if(!a.get(e)){const i=e.entries[0].target;if(i){const n=t.generateTarget?.(i)??si(i);a.set(e,n)}}};const h=(e,t)=>{const i=[];for(const r of n)if(!(r.startTime+r.durationt)break;i.push(r)}return i},d=e=>{const t=e.entries[0],n=o.get(t),r=t.processingStart,s=Math.max(t.startTime+t.duration,r),l=Math.min(n.processingEnd,s),u=n.entries.sort((e,t)=>e.processingStart-t.processingStart),c=h(t.startTime,l),d=i.h.get(t.interactionId),p={interactionTarget:a.get(d),interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:s,processedEventEntries:u,longAnimationFrameEntries:c,inputDelay:r-t.startTime,processingDuration:l-r,presentationDelay:s-l,loadState:ni(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(e=>{if(!e.longAnimationFrameEntries?.length)return;const t=e.interactionTime,i=e.inputDelay,n=e.processingDuration;let r,s,o=0,a=0,l=0,u=0;for(const l of e.longAnimationFrameEntries){a=a+l.startTime+l.duration-l.styleAndLayoutStart;for(const e of l.scripts){const l=e.startTime+e.duration;if(lu&&(s=e.startTime=t+i+n?"presentation-delay":"processing-duration",r=e,u=c)}}const c=e.longAnimationFrameEntries.at(-1),h=c?c.startTime+c.duration:0;h>=t+i+n&&(l=e.nextPaintTime-h),r&&s&&(e.longestScript={entry:r,subpart:s,intersectingDuration:u}),e.totalScriptDuration=o,e.totalStyleAndLayoutDuration=a,e.totalPaintDuration=l,e.totalUnattributedDuration=e.nextPaintTime-t-o-a-l})(p),Object.assign(e,{attribution:p})};mi("long-animation-frame",e=>{n=n.concat(e),u()}),((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const i=yi();$i(()=>{"interactionCount"in performance||Ri||(Ri=mi("event",Ii,{type:"event",buffered:!0,durationThreshold:0}));let n,r=fi("INP");const s=ai(t,Li),o=e=>{Ci(()=>{for(const t of e)s.u(t);const t=s.M();t&&t.T!==r.value&&(r.value=t.T,r.entries=t.entries,n())})},a=mi("event",o,{durationThreshold:t.durationThreshold??40});n=hi(e,r,Qi,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),i.onHidden(()=>{o(a.takeRecords()),n(!0)}),ci(()=>{s.v(),r=fi("INP"),n=hi(e,r,Qi,t.reportAllChanges)}))})})(t=>{const i=d(t);e(i)},t)};class Di{m;u(e){this.m?.(e)}}const ji=[2500,4e3],Ui=[800,1800],Mi=e=>{document.prerendering?$i(()=>Mi(e)):"complete"!==document.readyState?addEventListener("load",()=>Mi(e),!0):setTimeout(e)},zi="load_state",Fi="time_to_first_byte";class qi{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;((e,t={})=>{const i=ai(t=Object.assign({},t),ti),n=new WeakMap;i.t=e=>{if(e?.sources?.length){const i=ki(e.sources),r=i?.node;if(r){const e=t.generateTarget?.(r)??si(r);n.set(i,e)}}},((e,t={})=>{const i=yi();xi(gi(()=>{let n,r=fi("CLS",0);const s=ai(t,ti),o=e=>{for(const t of e)s.u(t);s.o>r.value&&(r.value=s.o,r.entries=s.i,n())},a=mi("layout-shift",o);a&&(n=hi(e,r,Si,t.reportAllChanges),i.onHidden(()=>{o(a.takeRecords()),n(!0)}),ci(()=>{s.o=0,r=fi("CLS",0),n=hi(e,r,Si,t.reportAllChanges),di(()=>n())}),setTimeout(n))}))})(t=>{const i=(e=>{let t={};if(e.entries.length){const i=e.entries.reduce((e,t)=>e.value>t.value?e:t);if(i?.sources?.length){const e=ki(i.sources);e&&(t={largestShiftTarget:n.get(e),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:e,largestShiftEntry:i,loadState:ni(i.startTime)})}}return Object.assign(e,{attribution:t})})(t);e(i)},t)})(e=>{const{loadState:t,largestShiftValue:i,largestShiftTime:n,largestShiftTarget:r}=e.attribution,s=this.buildInitialValues(e);this.addIfPresent(s,"largest_shift_value",i),this.addIfPresent(s,"largest_shift_time",n);const o=this.buildInitialContext(e);this.addIfPresent(o,zi,t),this.addIfPresent(o,"largest_shift_target",r),this.pushMeasurement(s,o)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFCP(){var e;((e,t={})=>{xi(t=>{const i=(e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:ni(ui())};if(e.entries.length){const i=ii(),n=e.entries.at(-1);if(i){const r=i.activationStart||0,s=Math.max(0,i.responseStart-r);t={timeToFirstByte:s,firstByteToFCP:e.value-s,loadState:ni(e.entries[0].startTime),navigationEntry:i,fcpEntry:n}}}return Object.assign(e,{attribution:t})})(t);e(i)},t)})(e=>{const{firstByteToFCP:t,timeToFirstByte:i,loadState:n}=e.attribution,r=this.buildInitialValues(e);this.addIfPresent(r,"first_byte_to_fcp",t),this.addIfPresent(r,Fi,i);const s=this.buildInitialContext(e);this.addIfPresent(s,zi,n),this.pushMeasurement(r,s)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureINP(){var e;Xi(e=>{const{interactionTime:t,presentationDelay:i,inputDelay:n,processingDuration:r,nextPaintTime:s,loadState:o,interactionTarget:a,interactionType:l}=e.attribution,u=this.buildInitialValues(e);this.addIfPresent(u,"interaction_time",t),this.addIfPresent(u,"presentation_delay",i),this.addIfPresent(u,"input_delay",n),this.addIfPresent(u,"processing_duration",r),this.addIfPresent(u,"next_paint_time",s);const c=this.buildInitialContext(e);this.addIfPresent(c,zi,o),this.addIfPresent(c,"interaction_target",a),this.addIfPresent(c,"interaction_type",l),this.pushMeasurement(u,c)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureLCP(){var e;((e,t={})=>{const i=ai(t=Object.assign({},t),Di),n=new WeakMap;i.m=e=>{const i=e.element;if(i){const r=t.generateTarget?.(i)??si(i);n.set(e,r)}},((e,t={})=>{$i(()=>{const i=yi();let n,r=fi("LCP");const s=ai(t,Di),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s.u(t),t.startTime{o(a.takeRecords()),a.disconnect(),n(!0)}),s=e=>{e.isTrusted&&(Ci(i),removeEventListener(e.type,s,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,s,{capture:!0});ci(i=>{r=fi("LCP"),n=hi(e,r,ji,t.reportAllChanges),di(()=>{r.value=performance.now()-i.timeStamp,n(!0)})})}})})(t=>{const i=(e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){const i=ii();if(i){const r=i.activationStart||0,s=e.entries.at(-1),o=s.url&&performance.getEntriesByType("resource").filter(e=>e.name===s.url)[0],a=Math.max(0,i.responseStart-r),l=Math.max(a,o?(o.requestStart||o.startTime)-r:0),u=Math.min(e.value,Math.max(l,o?o.responseEnd-r:0));t={target:n.get(s),timeToFirstByte:a,resourceLoadDelay:l-a,resourceLoadDuration:u-l,elementRenderDelay:e.value-u,navigationEntry:i,lcpEntry:s},s.url&&(t.url=s.url),o&&(t.lcpResourceEntry=o)}}return Object.assign(e,{attribution:t})})(t);e(i)},t)})(e=>{const{elementRenderDelay:t,resourceLoadDelay:i,resourceLoadDuration:n,timeToFirstByte:r,target:s}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"element_render_delay",t),this.addIfPresent(o,"resource_load_delay",i),this.addIfPresent(o,"resource_load_duration",n),this.addIfPresent(o,Fi,r);const a=this.buildInitialContext(e);this.addIfPresent(a,"element",s),this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureTTFB(){var e;((e,t={})=>{((e,t={})=>{let i=fi("TTFB"),n=hi(e,i,Ui,t.reportAllChanges);Mi(()=>{const r=ii();r&&(i.value=Math.max(r.responseStart-pi(),0),i.entries=[r],n(!0),ci(()=>{i=fi("TTFB",0),n=hi(e,i,Ui,t.reportAllChanges),n(!0)}))})})(t=>{const i=(e=>{let t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){const i=e.entries[0],n=i.activationStart||0,r=Math.max((i.workerStart||i.fetchStart)-n,0),s=Math.max(i.domainLookupStart-n,0),o=Math.max(i.connectStart-n,0),a=Math.max(i.connectEnd-n,0);t={waitingDuration:r,cacheDuration:s-r,dnsDuration:o-s,connectionDuration:a-o,requestDuration:e.value-a,navigationEntry:i}}return Object.assign(e,{attribution:t})})(t);e(i)},t)})(e=>{const{dnsDuration:t,connectionDuration:i,requestDuration:n,waitingDuration:r,cacheDuration:s}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"dns_duration",t),this.addIfPresent(o,"connection_duration",i),this.addIfPresent(o,"request_duration",n),this.addIfPresent(o,"waiting_duration",r),this.addIfPresent(o,"cache_duration",s);const a=this.buildInitialContext(e);this.pushMeasurement(o,a)},{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}buildInitialValues(e){const t=e.name.toLowerCase();return{[t]:e.value,delta:e.delta}}buildInitialContext(e){var t;const i=null!==(t=Ge(At,He))&&void 0!==t?t:Ce;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:i}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,i){i&&(e[t]=i)}}class Hi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=K}initialize(){this.logDebug("Initializing");new qi(this.api.pushMeasurement,this.config.webVitalsInstrumentation).initialize()}}class Bi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=K}sendSessionStartEvent(e){var t,i;const n=e.session;if(n&&n.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(i=n.attributes)||void 0===i?void 0:i.previousSession))return this.api.pushEvent("session_extend",{},void 0,{skipDedupe:!0}),void(this.notifiedSession=n);this.notifiedSession=n,this.api.pushEvent(et,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var i,n,r,s,o,a;let l,u,c=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&c){const e=y();c.lastActivity{var t,n,r;i();const s=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(s&&"true"===(null==s?void 0:s.isSampled)){let t=JSON.parse(JSON.stringify(e));const i=null===(n=t.meta.session)||void 0===n?void 0:n.attributes;return null==i||delete i.isSampled,0===Object.keys(null!=i?i:{}).length&&(null===(r=t.meta.session)||void 0===r||delete r.attributes),t}return null})}initialize(){this.logDebug("init session instrumentation");const e=this.config.sessionTracking;if(null==e?void 0:e.enabled){const t=ht(e);this.registerBeforeSendHook(t);const{initialSession:i,lifecycleType:n}=this.createInitialSession(t,e);t.storeUserSession(i);const r=i.sessionMeta;this.notifiedSession=r,this.api.setSession(r),n===et&&this.api.pushEvent(et,{},void 0,{skipDedupe:!0}),n===tt&&this.api.pushEvent(tt,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}class Vi extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=K}sendViewChangedEvent(e){var t,i,n,r;const s=e.view;s&&s.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent("view_changed",{fromView:null!==(n=null===(i=this.notifiedView)||void 0===i?void 0:i.name)&&void 0!==n?n:Ce,toView:null!==(r=s.name)&&void 0!==r?r:Ce},void 0,{skipDedupe:!0}),this.notifiedView=s)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class Gi extends S{constructor(e,t){var i,n,r,s;super(),this._tracking=!1,this.eventsObservable=e,this._options={inactivityMs:null!==(i=null==t?void 0:t.inactivityMs)&&void 0!==i?i:100,drainTimeoutMs:null!==(n=null==t?void 0:t.drainTimeoutMs)&&void 0!==n?n:1e4,isOperationStart:null!==(r=null==t?void 0:t.isOperationStart)&&void 0!==r?r:()=>{},isOperationEnd:null!==(s=null==t?void 0:t.isOperationEnd)&&void 0!==s?s:()=>{}},this._initialize()}_initialize(){this.eventsObservable.filter(()=>this._tracking).subscribe(e=>{var t,i,n;this._lastEventTime=Date.now(),null===(t=this._currentEvents)||void 0===t||t.push(e);const r=this._options.isOperationStart(e);r&&(null===(i=this._activeOperations)||void 0===i||i.set(r,!0));const s=this._options.isOperationEnd(e);s&&(null===(n=this._activeOperations)||void 0===n||n.delete(s)),this._scheduleInactivityCheck()})}startTracking(){this._tracking||(this._tracking=!0,this._startTime=Date.now(),this._lastEventTime=Date.now(),this.notify({message:"tracking-started"}),this._currentEvents=[],this._activeOperations=new Map,this._scheduleInactivityCheck())}stopTracking(){this._tracking=!1,this._clearTimer(this._inactivityTid),this._clearTimer(this._drainTid);let e=0;e=this.hasActiveOperations()?Date.now()-this._startTime:this._lastEventTime?this._lastEventTime-this._startTime:0,this.notify({message:"tracking-ended",events:this._currentEvents,duration:e})}_scheduleInactivityCheck(){this._inactivityTid=Yi(this._inactivityTid,()=>{this.hasActiveOperations()?this._startDrainTimeout():this.stopTracking()},this._options.inactivityMs)}_startDrainTimeout(){this._drainTid=Yi(this._drainTid,()=>{this.stopTracking()},this._options.drainTimeoutMs)}hasActiveOperations(){return!!this._activeOperations&&this._activeOperations.size>0}_clearTimer(e){e&&clearTimeout(e)}}function Yi(e,t,i){return e&&clearTimeout(e),e=setTimeout(()=>{t()},i)}let Wi;const Zi=new Set,Ki=new Map;let Ji,en,tn,nn,rn,sn,on,an,ln,un=!1;class cn extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-navigation",this.version=K}initialize(){const e=Tt(),t=wt(),i=function(){function e(e,t){const i=null!=t?t:location.href;i!==en&&(Ji.notify({type:"url-change",from:en,to:i,trigger:e}),en=i)}if(Ji||(Ji=new S,en=location.href),!un)if("navigation"in window&&"NavigateEvent"in window){on=t=>{try{const i=null==t?void 0:t.destination;(null==i?void 0:i.sameDocument)&&"string"==typeof i.url&&e("navigate",i.url)}catch(e){}},window.navigation.addEventListener("navigate",on);const t=window.NavigateEvent;t&&t.prototype&&"function"==typeof t.prototype.intercept&&(an||(an=t.prototype.intercept),t.prototype.intercept=function(t){try{const t=!!(null==this?void 0:this.canIntercept),i=null==this?void 0:this.destination;t&&i&&!1===i.sameDocument&&"string"==typeof i.url&&e("navigate-intercept",i.url)}catch(e){}return an.call(this,t)}),un=!0}else tn||(tn=window.history.pushState),window.history.pushState=function(...t){const i=tn.apply(window.history,t);return e("pushState"),i},nn||(nn=window.history.replaceState),window.history.replaceState=function(...t){const i=nn.apply(window.history,t);return e("replaceState"),i},rn=()=>e("popstate"),sn=()=>e("hashchange"),window.addEventListener("popstate",rn),window.addEventListener("hashchange",sn),un=!0;return Ji}(),n=(r=["pointerdown","keydown"],Wi||(Wi=new S),r.forEach(e=>{if(!Zi.has(e)){const t=()=>{Wi.notify({type:"interaction",name:e})};window.addEventListener(e,t),Zi.add(e),Ki.set(e,t)}}),Wi);var r;const s=new Gi((new S).merge(e,t,i),{inactivityMs:100,drainTimeoutMs:1e4,isOperationStart:e=>function(e){return e.type===gt}(e)?e.request.requestId:void 0,isOperationEnd:e=>function(e){return e.type===vt}(e)?e.request.requestId:void 0});s.filter(e=>"tracking-ended"===e.message).subscribe(e=>{var t,i,n;if((null===(t=e.events)||void 0===t?void 0:t.some(e=>"url-change"===e.type))&&(null===(i=e.events)||void 0===i?void 0:i.some(e=>"dom-mutation"===e.type))){const t=null===(n=e.events)||void 0===n?void 0:n.find(e=>"url-change"===e.type);ee.api.pushEvent("faro.navigation",{fromUrl:null==t?void 0:t.from,toUrl:null==t?void 0:t.to,sameDocument:String(!0),duration:e.duration})}}),n.subscribe(()=>{s.startTracking()})}}class hn extends mt{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=K}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){const t={blockedURI:e.blockedURI,columnNumber:e.columnNumber,disposition:e.disposition,documentURI:e.documentURI,effectiveDirective:e.effectiveDirective,lineNumber:e.lineNumber,originalPolicy:e.originalPolicy,referrer:e.referrer,sample:e.sample,sourceFile:e.sourceFile,statusCode:e.statusCode,violatedDirective:e.violatedDirective};this.api.pushEvent("securitypolicyviolation",w(t))}}let dn=!1;class pn extends mt{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=K,this.errorSerializer=M}initialize(){var e,t;const i=this.config.consoleInstrumentation,n=(null==i?void 0:i.serializeErrors)||!!(null==i?void 0:i.errorSerializer);this.errorSerializer=n?null!==(e=null==i?void 0:i.errorSerializer)&&void 0!==e?e:X:M;const r=null!==(t=null==i?void 0:i.disabledLevels)&&void 0!==t?t:pn.defaultDisabledLevels,s=function(e){if(ln||(ln=new S),!dn){const t=null!=e?e:V;U.HT.forEach(e=>{console[e]=(...i)=>{var n;ln.notify({type:"console",level:e,args:i}),null===(n=t[e])||void 0===n||n.apply(console,i)}}),dn=!0}return ln}(this.unpatchedConsole);this.subscription=s.subscribe(({level:e,args:t})=>{if(!r.includes(e))try{if(e!==U.$b.ERROR||(null==i?void 0:i.consoleErrorAsLog))if(e===U.$b.ERROR&&(null==i?void 0:i.consoleErrorAsLog)){const{value:i,type:n,stackFrames:r}=Zt(t,this.errorSerializer);this.api.pushLog(i?[pn.consoleErrorPrefix+i]:t,{level:e,context:{value:null!=i?i:"",type:null!=n?n:"",stackFrames:(null==r?void 0:r.length)?X(r):""}})}else this.api.pushLog(t,{level:e});else{const{value:e,type:i,stackFrames:n}=Zt(t,this.errorSerializer);if(e&&!i&&!n)return void this.api.pushError(new Error(pn.consoleErrorPrefix+e));this.api.pushError(new Error(pn.consoleErrorPrefix+e),{type:i,stackFrames:n})}}catch(e){this.logError(e)}})}destroy(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.subscription=void 0}}function fn(e={}){const t=[new Vt,new ei,new Hi,new Bi,new Vi,new cn];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new Ut),!1!==e.enableContentSecurityPolicyInstrumentation&&t.push(new hn),!1!==e.captureConsole&&t.push(new pn),t}pn.defaultDisabledLevels=[U.$b.DEBUG,U.$b.TRACE,U.$b.LOG],pn.consoleErrorPrefix="console.error: ";var mn=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r!("@grafana/faro-web-sdk:instrumentation-navigation"===e.name&&!n))}function vn(e){var t,i;const{page:n,generatePageId:r}=null!==(t=null==e?void 0:e.pageTracking)&&void 0!==t?t:{},s=[Qe,Ue({generatePageId:r,initialPageMeta:n}),...null!==(i=e.metas)&&void 0!==i?i:[]];return d(null===window||void 0===window?void 0:window.k6)?[...s,Xe]:s}function bn({trackGeolocation:e,sessionTracking:t}){var i;const n={};return h(e)&&(n.geoLocationTrackingEnabled=e),b(n)?{}:{session:Object.assign(Object.assign({},null!==(i=null==t?void 0:t.session)&&void 0!==i?i:{}),{overrides:n})}}function On(e){const t=function(e){var t,i,n,r,s;const o=[],a=G(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&a.error('if "transports" is defined, "url" and "apiKey" should not be defined'),o.push(...e.transports)):e.url?o.push(new ft({url:e.url,apiKey:e.apiKey})):a.error('either "url" or "transports" must be defined');const{dedupe:l=!0,eventDomain:u=ce,globalObjectKey:c=le,instrumentations:h=fn(),internalLoggerLevel:d=B,isolate:p=!1,logArgsSerializer:f=M,metas:m=vn(e),paused:g=!1,preventGlobalExposure:v=!1,unpatchedConsole:b=V,url:O,experimental:w}=e,y=mn(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArgsSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","url","experimental"]),$=null!==(t=null==w?void 0:w.trackNavigation)&&void 0!==t&&t,E={dataAttributeName:null!==(n=null===(i=e.userActionsInstrumentation)||void 0===i?void 0:i.dataAttributeName)&&void 0!==n?n:_e,excludeItem:null===(r=e.userActionsInstrumentation)||void 0===r?void 0:r.excludeItem};return Object.assign(Object.assign({},y),{batching:Object.assign(Object.assign({},ue),e.batching),dedupe:l,globalObjectKey:c,instrumentations:gn(h,e),internalLoggerLevel:d,isolate:p,logArgsSerializer:f,metas:m,parseStacktrace:Ae,paused:g,preventGlobalExposure:v,transports:o,unpatchedConsole:b,eventDomain:u,ignoreUrls:[...null!==(s=e.ignoreUrls)&&void 0!==s?s:[],...O?[O]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},Ne),e.sessionTracking),bn({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),userActionsInstrumentation:E,experimental:{trackNavigation:$}})}(e);if(t)return ae(t)}var wn=i(18531),yn=i(29778);const $n=new Map([["dev",{environment:"dev",appName:"grafana-metricsdrilldown-app-dev",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/8c57b32175ba39d35dfaccee7cd793c7"}],["ops",{environment:"ops",appName:"grafana-metricsdrilldown-app-ops",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/d65ab91eb9c5e8c51b474d9313ba28f4"}],["prod",{environment:"prod",appName:"grafana-metricsdrilldown-app-prod",faroUrl:"https://faro-collector-ops-eu-south-0.grafana-ops.net/collect/0f4f1bbc97c9e2db4fa85ef75a559885"}]]);var En=i(84558),xn=i(40313);let Sn=null;const kn=()=>Sn,Pn=e=>Sn=e,Tn=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Non-Error exception captured with keys","Failed sending payload to the receiver"],An=new Set(Tn),In=e=>An.has(e);function Rn(){if(kn())return;const e=function(){const e=(0,yn.u)();if(e&&$n.has(e))return $n.get(e)}();if(!e)return;const{environment:t,faroUrl:i,appName:n}=e,{apps:r,bootData:s}=wn.config,o=r[xn.s].version,a=s.user.email;Pn(On({url:i,app:{name:n,release:o,version:En.t,environment:t},user:{email:a},ignoreErrors:Tn,instrumentations:[...fn({captureConsole:!1})],isolate:!0,beforeSend:e=>{var t,i;return(null!==(i=null===(t=e.meta.page)||void 0===t?void 0:t.url)&&void 0!==i?i:"").includes(xn.G)?e:null}}))}},18531:e=>{"use strict";e.exports=t},19619:(e,t,i)=>{"use strict";const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=i(91305),o=i(66971),a=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],h=t.t={};let d=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[p,r]],m=(e,t,i)=>{const n=(e=>{for(const[t,i]of f)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e})(t),r=d++;o(e,r,t),h[e]=r,u[r]=t,c[r]=n,a[r]=new RegExp(t,i?"g":void 0),l[r]=new RegExp(n,i?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[h.PRERELEASEIDENTIFIER]}(?:\\.${u[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${u[h.BUILDIDENTIFIER]}(?:\\.${u[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[h.MAINVERSION]}${u[h.PRERELEASE]}?${u[h.BUILD]}?`),m("FULL",`^${u[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[h.MAINVERSIONLOOSE]}${u[h.PRERELEASELOOSE]}?${u[h.BUILD]}?`),m("LOOSE",`^${u[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:${u[h.PRERELEASE]})?${u[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:${u[h.PRERELEASELOOSE]})?${u[h.BUILD]}?)?)?`),m("XRANGE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[h.COERCEPLAIN]+`(?:${u[h.PRERELEASE]})?`+`(?:${u[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",u[h.COERCE],!0),m("COERCERTLFULL",u[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[h.LONECARET]}${u[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[h.LONECARET]}${u[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[h.GTLT]}\\s*(${u[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]}|${u[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[h.XRANGEPLAIN]})\\s+-\\s+(${u[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},20444:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>n(e,t,i)<0},23009:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t,i)=>new n(e,i).compare(new n(t,i))},23642:(e,t,i)=>{"use strict";const n=/\s+/g;class r{constructor(e,t){if(t=o(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!v(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,i=s.get(t);if(i)return i;const n=this.options.loose,r=n?c[h.HYPHENRANGELOOSE]:c[h.HYPHENRANGE];e=e.replace(r,I(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(c[h.COMPARATORTRIM],d),l("comparator trim",e),e=e.replace(c[h.TILDETRIM],p),l("tilde trim",e),e=e.replace(c[h.CARETTRIM],f),l("caret trim",e);let o=e.split(" ").map(e=>w(e,this.options)).join(" ").split(/\s+/).map(e=>A(e,this.options));n&&(o=o.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[h.COMPARATORLOOSE])))),l("range list",o);const u=new Map,b=o.map(e=>new a(e,this.options));for(const e of b){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const O=[...u.values()];return s.set(t,O),O}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(i=>O(i,t)&&e.set.some(e=>O(e,t)&&i.every(i=>e.every(e=>i.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,b=e=>""===e.value,O=(e,t)=>{let i=!0;const n=e.slice();let r=n.pop();for(;i&&n.length;)i=n.every(e=>r.intersects(e,t)),r=n.pop();return i},w=(e,t)=>(e=e.replace(c[h.BUILD],""),l("comp",e,t),e=x(e,t),l("caret",e),e=$(e,t),l("tildes",e),e=k(e,t),l("xrange",e),e=T(e,t),l("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{const i=t.loose?c[h.TILDELOOSE]:c[h.TILDE];return e.replace(i,(t,i,n,r,s)=>{let o;return l("tilde",e,t,i,n,r,s),y(i)?o="":y(n)?o=`>=${i}.0.0 <${+i+1}.0.0-0`:y(r)?o=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:s?(l("replaceTilde pr",s),o=`>=${i}.${n}.${r}-${s} <${i}.${+n+1}.0-0`):o=`>=${i}.${n}.${r} <${i}.${+n+1}.0-0`,l("tilde return",o),o})},x=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(" "),S=(e,t)=>{l("caret",e,t);const i=t.loose?c[h.CARETLOOSE]:c[h.CARET],n=t.includePrerelease?"-0":"";return e.replace(i,(t,i,r,s,o)=>{let a;return l("caret",e,t,i,r,s,o),y(i)?a="":y(r)?a=`>=${i}.0.0${n} <${+i+1}.0.0-0`:y(s)?a="0"===i?`>=${i}.${r}.0${n} <${i}.${+r+1}.0-0`:`>=${i}.${r}.0${n} <${+i+1}.0.0-0`:o?(l("replaceCaret pr",o),a="0"===i?"0"===r?`>=${i}.${r}.${s}-${o} <${i}.${r}.${+s+1}-0`:`>=${i}.${r}.${s}-${o} <${i}.${+r+1}.0-0`:`>=${i}.${r}.${s}-${o} <${+i+1}.0.0-0`):(l("no pr"),a="0"===i?"0"===r?`>=${i}.${r}.${s}${n} <${i}.${r}.${+s+1}-0`:`>=${i}.${r}.${s}${n} <${i}.${+r+1}.0-0`:`>=${i}.${r}.${s} <${+i+1}.0.0-0`),l("caret return",a),a})},k=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>P(e,t)).join(" ")),P=(e,t)=>{e=e.trim();const i=t.loose?c[h.XRANGELOOSE]:c[h.XRANGE];return e.replace(i,(i,n,r,s,o,a)=>{l("xRange",e,i,n,r,s,o,a);const u=y(r),c=u||y(s),h=c||y(o),d=h;return"="===n&&d&&(n=""),a=t.includePrerelease?"-0":"",u?i=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(c&&(s=0),o=0,">"===n?(n=">=",c?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",c?r=+r+1:s=+s+1),"<"===n&&(a="-0"),i=`${n+r}.${s}.${o}${a}`):c?i=`>=${r}.0.0${a} <${+r+1}.0.0-0`:h&&(i=`>=${r}.${s}.0${a} <${r}.${+s+1}.0-0`),l("xRange return",i),i})},T=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[h.STAR],"")),A=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?h.GTE0PRE:h.GTE0],"")),I=e=>(t,i,n,r,s,o,a,l,u,c,h,d)=>`${i=y(n)?"":y(r)?`>=${n}.0.0${e?"-0":""}`:y(s)?`>=${n}.${r}.0${e?"-0":""}`:o?`>=${i}`:`>=${i}${e?"-0":""}`} ${l=y(u)?"":y(c)?`<${+u+1}.0.0-0`:y(h)?`<${u}.${+c+1}.0-0`:d?`<=${u}.${c}.${h}-${d}`:e?`<${u}.${c}.${+h+1}-0`:`<=${l}`}`.trim(),R=(e,t,i)=>{for(let i=0;i0){const n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},25026:(e,t,i)=>{"use strict";const n=i(34606),r=i(79042),s=i(8819),o=i(8624),a=i(20444),l=i(25097);e.exports=(e,t,i,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e===i;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e!==i;case"":case"=":case"==":return n(e,i,u);case"!=":return r(e,i,u);case">":return s(e,i,u);case">=":return o(e,i,u);case"<":return a(e,i,u);case"<=":return l(e,i,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},25097:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>n(e,t,i)<=0},28236:(e,t,i)=>{"use strict";const n=i(19619),r=i(91305),s=i(36599),o=i(84488),a=i(81053),l=i(64792),u=i(38995),c=i(14110),h=i(44907),d=i(15123),p=i(58167),f=i(30032),m=i(5974),g=i(23009),v=i(76609),b=i(76462),O=i(46940),w=i(31340),y=i(36684),$=i(8819),E=i(20444),x=i(34606),S=i(79042),k=i(8624),P=i(25097),T=i(25026),A=i(74525),I=i(95919),R=i(23642),N=i(55607),_=i(8386),L=i(51077),C=i(57079),Q=i(53926),X=i(3357),D=i(84340),j=i(67480),U=i(29057),M=i(3853),z=i(44832),F=i(79877);e.exports={parse:a,valid:l,clean:u,inc:c,diff:h,major:d,minor:p,patch:f,prerelease:m,compare:g,rcompare:v,compareLoose:b,compareBuild:O,sort:w,rsort:y,gt:$,lt:E,eq:x,neq:S,gte:k,lte:P,cmp:T,coerce:A,Comparator:I,Range:R,satisfies:N,toComparators:_,maxSatisfying:L,minSatisfying:C,minVersion:Q,validRange:X,outside:D,gtr:j,ltr:U,intersects:M,simplifyRange:z,subset:F,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},29057:(e,t,i)=>{"use strict";const n=i(84340);e.exports=(e,t,i)=>n(e,t,"<",i)},29778:(e,t,i)=>{"use strict";i.d(t,{u:()=>r});const n=[{regExp:/localhost/,environment:"local"},{regExp:/grafana-dev\.net/,environment:"dev"},{regExp:/grafana-ops\.net/,environment:"ops"},{regExp:/grafana\.net/,environment:"prod"}];function r(){var e,t;if(!(null===(t=window)||void 0===t||null===(e=t.location)||void 0===e?void 0:e.host))return null;const i=n.find(({regExp:e})=>e.test(window.location.host));return i?i.environment:null}},30032:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t)=>new n(e,t).patch},30056:e=>{"use strict";const t=Object.freeze({loose:!0}),i=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:i},31269:e=>{"use strict";e.exports=i},31340:(e,t,i)=>{"use strict";const n=i(46940);e.exports=(e,t)=>e.sort((e,i)=>n(e,i,t))},32103:(e,t,i)=>{"use strict";i.d(t,{PH:()=>f,Qj:()=>p,Z6:()=>u,cF:()=>n,fI:()=>c,iX:()=>N,uY:()=>o});const n=1024;let r=0;class s{constructor(e,t){this.from=e,this.to=t}}class o{constructor(e={}){this.id=r++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=u.match(e)),t=>{let i=e(t);return void 0===i?null:[this,i]}}}o.closedBy=new o({deserialize:e=>e.split(" ")}),o.openedBy=new o({deserialize:e=>e.split(" ")}),o.group=new o({deserialize:e=>e.split(" ")}),o.isolate=new o({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),o.contextHash=new o({perNode:!0}),o.lookAhead=new o({perNode:!0}),o.mounted=new o({perNode:!0});class a{constructor(e,t,i,n=!1){this.tree=e,this.overlay=t,this.parser=i,this.bracketed=n}static get(e){return e&&e.props&&e.props[o.mounted.id]}}const l=Object.create(null);class u{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):l,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),n=new u(e.name||"",t,e.id,i);if(e.props)for(let i of e.props)if(Array.isArray(i)||(i=i(n)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[i[0].id]=i[1]}return n}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(o.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return e=>{for(let i=e.prop(o.group),n=-1;n<(i?i.length:0);n++){let r=t[n<0?e.name:i[n]];if(r)return r}}}}u.none=new u("",Object.create(null),0,8);class c{constructor(e){this.types=e;for(let t=0;t=t){let o=new w(s.tree,s.overlay[0].from+e.from,-1,e);(r||(r=[n])).push(b(o,t,i,!1))}}return r?S(r):n}(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:r=this.length}=e,s=e.mode||0,o=(s&p.IncludeAnonymous)>0;for(let e=this.cursor(s|p.IncludeAnonymous);;){let s=!1;if(e.from<=r&&e.to>=n&&(!o&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;s=!0}for(;s&&i&&(o||!e.type.isAnonymous)&&i(e),!e.nextSibling();){if(!e.parent())return;s=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:R(u.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,i)=>new f(this.type,e,t,i,this.propValues),e.makeTree||((e,t,i)=>new f(u.none,e,t,i)))}static build(e){return function(e){var t;let{buffer:i,nodeSet:r,maxBufferLength:s=n,reused:a=[],minRepeatType:l=r.types.length}=e,u=Array.isArray(i)?new m(i,i.length):i,c=r.types,h=0,d=0;function p(e,t,i,n,o,f){let{id:m,start:E,end:x,size:S}=u,k=d,P=h;if(S<0){if(u.next(),-1==S){let t=a[m];return i.push(t),void n.push(E-e)}if(-3==S)return void(h=m);if(-4==S)return void(d=m);throw new RangeError(`Unrecognized record size: ${S}`)}let T,A,I=c[m],N=E-e;if(x-E<=s&&(A=y(u.pos-t,o))){let t=new Uint16Array(A.size-A.skip),i=u.pos-A.size,n=t.length;for(;u.pos>i;)n=$(A.start,t,n);T=new g(t,x-A.start,r),N=A.start-e}else{let e=u.pos-S;u.next();let t=[],i=[],n=m>=l?m:-1,r=0,o=x;for(;u.pos>e;)n>=0&&u.id==n&&u.size>=0?(u.end<=o-s&&(O(t,i,E,r,u.end,o,n,k,P),r=t.length,o=u.end),u.next()):f>2500?v(E,e,t,i):p(E,e,t,i,n,f+1);if(n>=0&&r>0&&r-1&&r>0){let e=b(I,P);T=R(I,t,i,0,t.length,0,x-E,e,e)}else T=w(I,t,i,x-E,k-x,P)}i.push(T),n.push(N)}function v(e,t,i,n){let o=[],a=0,l=-1;for(;u.pos>t;){let{id:e,start:t,end:i,size:n}=u;if(n>4)u.next();else{if(l>-1&&t=0;e-=3)t[i++]=o[e],t[i++]=o[e+1]-s,t[i++]=o[e+2]-s,t[i++]=i;i.push(new g(t,o[2]-s,r)),n.push(s-e)}}function b(e,t){return(i,n,r)=>{let s,a,l=0,u=i.length-1;if(u>=0&&(s=i[u])instanceof f){if(!u&&s.type==e&&s.length==r)return s;(a=s.prop(o.lookAhead))&&(l=n[u]+s.length+a)}return w(e,i,n,r,l,t)}}function O(e,t,i,n,s,o,a,l,u){let c=[],h=[];for(;e.length>n;)c.push(e.pop()),h.push(t.pop()+i-s);e.push(w(r.types[a],c,h,o-s,l-o,u)),t.push(s-i)}function w(e,t,i,n,r,s,a){if(s){let e=[o.contextHash,s];a=a?[e].concat(a):[e]}if(r>25){let e=[o.lookAhead,r];a=a?[e].concat(a):[e]}return new f(e,t,i,n,a)}function y(e,t){let i=u.fork(),n=0,r=0,o=0,a=i.end-s,c={size:0,start:0,skip:0};e:for(let s=i.pos-e;i.pos>s;){let e=i.size;if(i.id==t&&e>=0){c.size=n,c.start=r,c.skip=o,o+=4,n+=4,i.next();continue}let u=i.pos-e;if(e<0||u=l?4:0,d=i.start;for(i.next();i.pos>u;){if(i.size<0){if(-3!=i.size&&-4!=i.size)break e;h+=4}else i.id>=l&&(h+=4);i.next()}r=d,n+=e,o+=h}return(t<0||n==e)&&(c.size=n,c.start=r,c.skip=o),c.size>4?c:void 0}function $(e,t,i){let{id:n,start:r,end:s,size:o}=u;if(u.next(),o>=0&&n4){let n=u.pos-(o-4);for(;u.pos>n;)i=$(e,t,i)}t[--i]=a,t[--i]=s-e,t[--i]=r-e,t[--i]=n}else-3==o?h=n:-4==o&&(d=n);return i}let E=[],x=[];for(;u.pos>0;)p(e.start||0,e.bufferStart||0,E,x,-1,0);let S=null!==(t=e.length)&&void 0!==t?t:E.length?x[0]+E[0].length:0;return new f(c[e.topID],E.reverse(),x.reverse(),S)}(e)}}f.empty=new f(u.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class g{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return u.none}toString(){let e=[];for(let t=0;t0));a=s[a+3]);return o}slice(e,t,i){let n=this.buffer,r=new Uint16Array(t-e),s=0;for(let o=e,a=0;o=t&&it;case 1:return i<=t&&n>t;case 2:return n>t;case 4:return!0}}function b(e,t,i,n){for(var r;e.from==e.to||(i<1?e.from>=t:e.from>t)||(i>-1?e.to<=t:e.to0?l.length:-1;e!=c;e+=t){let c=l[e],h=u[e]+o.from;if(r&p.EnterBracketed&&c instanceof f&&null===(null===(s=a.get(c))||void 0===s?void 0:s.overlay)&&(h>=i||h+c.length<=i)||v(n,i,h,h+c.length))if(c instanceof g){if(r&p.ExcludeBuffers)continue;let s=c.findChild(0,c.buffer.length,t,i-h,n);if(s>-1)return new x(new E(o,c,e,h),null,s)}else if(r&p.IncludeAnonymous||!c.type.isAnonymous||T(c)){let s;if(!(r&p.IgnoreMounts)&&(s=a.get(c))&&!s.overlay)return new w(s.tree,h,e,o);let l=new w(c,h,e,o);return r&p.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?c.children.length-1:0,t,i,n,r)}}if(r&p.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,i=0){let n;if(!(i&p.IgnoreOverlays)&&(n=a.get(this._tree))&&n.overlay){let r=e-this.from,s=i&p.EnterBracketed&&n.bracketed;for(let{from:e,to:i}of n.overlay)if((t>0||s?e<=r:e=r:i>r))return new w(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function y(e,t,i,n){let r=e.cursor(),s=[];if(!r.firstChild())return s;if(null!=i)for(let e=!1;!e;)if(e=r.type.is(i),!r.nextSibling())return s;for(;;){if(null!=n&&r.type.is(n))return s;if(r.type.is(t)&&s.push(r.node),!r.nextSibling())return null==n?s:[]}}function $(e,t,i=t.length-1){for(let n=e;i>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(t[i]&&t[i]!=n.name)return!1;i--}}return!0}class E{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}}class x extends O{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new x(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,i=0){if(i&p.ExcludeBuffers)return null;let{buffer:n}=this.context,r=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new x(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new x(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new x(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,r=i.buffer[this.index+3];if(r>n){let s=i.buffer[this.index+1];e.push(i.slice(n,r,s)),t.push(0)}return new f(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function S(e){if(!e.length)return null;let t=0,i=e[0];for(let n=1;ni.from||r.to0){if(this.index-1)for(let n=t+e,r=e<0?-1:i._tree.children.length;n!=r;n+=e){let e=i._tree.children[n];if(this.mode&p.IncludeAnonymous||e instanceof g||!e.type.isAnonymous||T(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==n){if(n==this.index)return s;t=s,i=r+1;break e}n=this.stack[--r]}for(let e=i;e=0;r--){if(r<0)return $(this._tree,e,n);let s=i[t.buffer[this.stack[r]]];if(!s.isAnonymous){if(e[n]&&e[n]!=s.name)return!1;n--}}return!0}}function T(e){return e.children.some(e=>e instanceof g||!e.type.isAnonymous||T(e))}const A=new WeakMap;function I(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;let i=A.get(t);if(null==i){i=1;for(let n of t.children){if(n.type!=e||!(n instanceof f)){i=1;break}i+=I(e,n)}A.set(t,i)}return i}function R(e,t,i,n,r,s,o,a,l){let u=0;for(let i=n;i=c)break;f+=t}if(u==r+1){if(f>c){let e=i[r];t(e.children,e.positions,0,e.children.length,n[r]+a);continue}h.push(i[r])}else{let t=n[u-1]+i[u-1].length-p;h.push(R(e,i,n,r,u,p,t,null,l))}d.push(p+a-s)}}(t,i,n,r,0),(a||l)(h,d,o)}class N{startParse(e,t,i){return"string"==typeof e&&(e=new _(e)),i=i?i.length?i.map(e=>new s(e.from,e.to)):[new s(0,0)]:[new s(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let e=n.advance();if(e)return e}}}class _{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new o({perNode:!0})},34606:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>0===n(e,t,i)},36599:(e,t,i)=>{"use strict";const n=i(66971),{MAX_LENGTH:r,MAX_SAFE_INTEGER:s}=i(91305),{safeRe:o,t:a}=i(19619),l=i(30056),{compareIdentifiers:u}=i(84488);class c{constructor(e,t){if(t=l(t),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&te.major?1:this.minore.minor?1:this.patche.patch?1:0}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const i=this.prerelease[t],r=e.prerelease[t];if(n("prerelease compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return u(i,r)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{const i=this.build[t],r=e.build[t];if(n("build compare",t,i,r),void 0===i&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===i)return-1;if(i!==r)return u(i,r)}while(++t)}inc(e,t,i){if(e.startsWith("pre")){if(!t&&!1===i)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?o[a.PRERELEASELOOSE]:o[a.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(i)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===i)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===i&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},36684:(e,t,i)=>{"use strict";const n=i(46940);e.exports=(e,t)=>e.sort((e,i)=>n(i,e,t))},37768:(e,t,i)=>{"use strict";i.d(t,{x6:()=>te,wR:()=>Z,t:()=>ee});var n=i(86106),r=i(211);const{slice:s,forEach:o}=[];let a=!1;try{document.cookie,a=!0}catch(e){}const l=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];a||l.splice(1,1);var u=i(85959),c=i(69715),h=i.n(c),d=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function p(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},i=e.match(/<\/?([^\s]+?)[/\s>]/);if(i&&(t.name=i[1],(h()[i[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.name.startsWith("!--"))){var n=e.indexOf("--\x3e");return{type:"comment",comment:-1!==n?e.slice(4,n):""}}for(var r=new RegExp(d),s=null;null!==(s=r.exec(e));)if(s[0].trim())if(s[1]){var o=s[1].trim(),a=[o,""];o.indexOf("=")>-1&&(a=o.split("=")),t.attrs[a[0]]=a[1],r.lastIndex--}else s[2]&&(t.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return t}var f=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,m=/^\s*$/,g=Object.create(null);function v(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(e){var t=[];for(var i in e)t.push(i+'="'+e[i]+'"');return t.length?" "+t.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(v,"")+"";case"comment":return e+"\x3c!--"+t.comment+"--\x3e"}}var b={parse:function(e,t){t||(t={}),t.components||(t.components=g);var i,n=[],r=[],s=-1,o=!1;if(0!==e.indexOf("<")){var a=e.indexOf("<");n.push({type:"text",content:-1===a?e:e.substring(0,a)})}return e.replace(f,function(a,l){if(o){if(a!=="")return;o=!1}var u,c="/"!==a.charAt(1),h=a.startsWith("\x3c!--"),d=l+a.length,f=e.charAt(d);if(h){var g=p(a);return s<0?(n.push(g),n):((u=r[s]).children.push(g),n)}if(c&&(s++,"tag"===(i=p(a)).type&&t.components[i.name]&&(i.type="component",o=!0),i.voidElement||o||!f||"<"===f||i.children.push({type:"text",content:e.slice(d,e.indexOf("<",d))}),0===s&&n.push(i),(u=r[s-1])&&u.children.push(i),r[s]=i),(!c||i.voidElement)&&(s>-1&&(i.voidElement||i.name===a.slice(2,-1))&&(s--,i=-1===s?n:r[s]),!o&&"<"!==f&&f)){u=-1===s?n:r[s].children;var v=e.indexOf("<",d),b=e.slice(d,-1===v?void 0:v);m.test(b)&&(b=" "),(v>-1&&s+u.length>=0||" "!==b)&&u.push({type:"text",content:b})}}),n},stringify:function(e){return e.reduce(function(e,t){return e+v("",t)},"")}};const O=b,w=(e,t,i,n)=>{const r=[i,{code:t,...n||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);E(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},y={},$=(e,t,i,n)=>{E(i)&&y[i]||(E(i)&&(y[i]=new Date),w(e,t,i,n))},E=e=>"string"==typeof e,x=e=>"object"==typeof e&&null!==e,S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,k={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},P=e=>k[e];let T={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(S,P)};const A=(e={})=>{T={...T,...e}},I=()=>T;let R;const N=e=>{R=e},_=()=>R,L=(e,t)=>{if(!e)return!1;const i=e.props?.children??e.children;return t?i.length>0:!!i},C=e=>{if(!e)return[];const t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?Q(t):t},Q=e=>Array.isArray(e)?e:[e],X=(e,t,i,n)=>{if(!e)return"";let r="";const s=Q(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((e,s)=>{if(E(e))r+=`${e}`;else{if((0,u.isValidElement)(e)){const{props:a,type:l}=e,u=Object.keys(a).length,c=o.indexOf(l)>-1,h=a.children;if(!h&&c&&!u)return void(r+=`<${l}/>`);if(!h&&(!c||u)||a.i18nIsDynamicList)return void(r+=`<${s}>`);if(c&&1===u&&E(h))return void(r+=`<${l}>${h}`);const d=X(h,t,i,n);return void(r+=`<${s}>${d}`)}if(null!==e){if(x(e)){const{format:t,...s}=e,o=Object.keys(s);if(1===o.length){const e=t?`${o[0]}, ${t}`:o[0];return void(r+=`{{${e}}}`)}return void w(i,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:n,child:e})}w(i,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:n,child:e})}else w(i,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:n})}}),r},D=(e,t,i,n,r,s,o)=>{if(""===i)return[];const a=r.transKeepBasicHtmlNodesFor||[],l=i&&new RegExp(a.map(e=>`<${e}`).join("|")).test(i);if(!(e||t||l||o))return[i];const c=t??{},h=e=>{Q(e).forEach(e=>{E(e)||(L(e)?h(C(e)):x(e)&&!(0,u.isValidElement)(e)&&Object.assign(c,e))})};h(e);const d=O.parse(`<0>${i}`),p={...c,...s},f=(e,t,i)=>{const n=C(e),r=g(n,t.children,i);return(e=>Array.isArray(e)&&e.every(u.isValidElement))(n)&&0===r.length||e.props?.i18nIsDynamicList?n:r},m=(e,t,i,n,r)=>{e.dummy?(e.children=t,i.push((0,u.cloneElement)(e,{key:n},r?void 0:t))):i.push(...u.Children.map([e],e=>{const i={...e.props};return delete i.i18nIsDynamicList,(0,u.createElement)(e.type,{...i,key:n,ref:e.props.ref??e.ref},r?null:t)}))},g=(e,i,s)=>{const c=Q(e);return Q(i).reduce((e,i,h)=>{const d=i.children?.[0]?.content&&n.services.interpolator.interpolate(i.children[0].content,p,n.language);if("tag"===i.type){let o=c[parseInt(i.name,10)];!o&&t&&(o=t[i.name]),1!==s.length||o||(o=s[0][i.name]),o||(o={});const v=0!==Object.keys(i.attrs).length?((e,t)=>{const i={...t};return i.props=Object.assign(e.props,t.props),i})({props:i.attrs},o):o,b=(0,u.isValidElement)(v),O=b&&L(i,!0)&&!i.voidElement,w=l&&x(v)&&v.dummy&&!b,y=x(t)&&Object.hasOwnProperty.call(t,i.name);if(E(v)){const t=n.services.interpolator.interpolate(v,p,n.language);e.push(t)}else if(L(v)||O){const t=f(v,i,s);m(v,t,e,h)}else if(w){const t=g(c,i.children,s);m(v,t,e,h)}else if(Number.isNaN(parseFloat(i.name)))if(y){const t=f(v,i,s);m(v,t,e,h,i.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(i.name)>-1)if(i.voidElement)e.push((0,u.createElement)(i.name,{key:`${i.name}-${h}`}));else{const t=g(c,i.children,s);e.push((0,u.createElement)(i.name,{key:`${i.name}-${h}`},t))}else if(i.voidElement)e.push(`<${i.name} />`);else{const t=g(c,i.children,s);e.push(`<${i.name}>${t}`)}else if(x(v)&&!b){const t=i.children[0]?d:null;t&&e.push(t)}else m(v,d,e,h,1!==i.children.length||!d)}else if("text"===i.type){const t=r.transWrapTextNodes,s=o?r.unescape(n.services.interpolator.interpolate(i.content,p,n.language)):n.services.interpolator.interpolate(i.content,p,n.language);t?e.push((0,u.createElement)(t,{key:`${i.name}-${h}`},s)):e.push(s)}return e},[])},v=g([{dummy:!0,children:e||[]}],d,Q(e||[]));return C(v[0])},j=(e,t,i)=>{const n=e.key||t,r=(0,u.cloneElement)(e,{key:n});if(!r.props||!r.props.children||i.indexOf(`${t}/>`)<0&&i.indexOf(`${t} />`)<0)return r;return(0,u.createElement)(function(){return(0,u.createElement)(u.Fragment,null,r)},{key:n})},U=(e,t,i,n)=>e?Array.isArray(e)?((e,t)=>e.map((e,i)=>j(e,i,t)))(e,t):x(e)?((e,t)=>{const i={};return Object.keys(e).forEach(n=>{Object.assign(i,{[n]:j(e[n],n,t)})}),i})(e,t):($(i,"TRANS_INVALID_COMPONENTS",' "components" prop expects an object or array',{i18nKey:n}),null):null,M=e=>!!x(e)&&(!Array.isArray(e)&&Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0));const z={type:"3rdParty",init(e){A(e.options.react),N(e)}},F=(0,u.createContext)();function q({children:e,count:t,parent:i,i18nKey:n,context:r,tOptions:s={},values:o,defaults:a,components:l,ns:c,i18n:h,t:d,shouldUnescape:p,...f}){const{i18n:m,defaultNS:g}=(0,u.useContext)(F)||{},v=h||m||_(),b=d||v?.t.bind(v);return function({children:e,count:t,parent:i,i18nKey:n,context:r,tOptions:s={},values:o,defaults:a,components:l,ns:c,i18n:h,t:d,shouldUnescape:p,...f}){const m=h||_();if(!m)return $(m,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:n}),e;const g=d||m.t.bind(m)||(e=>e),v={...I(),...m.options?.react};let b=c||g.ns||m.options?.defaultNS;b=E(b)?[b]:b||["translation"];const O=X(e,v,m,n),w=a||O||v.transEmptyNodeValue||n,{hashTransKey:y}=v,x=n||(y?y(O||w):O||w);m.options?.interpolation?.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables});const S=o||void 0!==t&&!m.options?.interpolation?.alwaysFormat||!e?s.interpolation:{interpolation:{...s.interpolation,prefix:"#$?",suffix:"?$#"}},k={...s,context:r||s.context,count:t,...o,...S,defaultValue:w,ns:b},P=x?g(x,k):w,T=U(l,P,m,n);let A=T||e,R=null;M(T)&&(R=T,A=e);const N=D(A,R,P,m,v,k,p),L=i??v.defaultTransParent;return L?(0,u.createElement)(L,f,N):N}({children:e,count:t,parent:i,i18nKey:n,context:r,tOptions:s,values:o,defaults:a,components:l,ns:c||b?.ns||g||v?.options?.defaultNS,i18n:v,t:d,shouldUnescape:p,...f})}var H=i(5946);let B,V;i(46280).Y,H.wi;function G({id:e,ns:t}={}){if(e)return B=K().getFixedT(null,e),void(V=t=>(0,n.jsx)(q,{shouldUnescape:!0,ns:e,...t}));B=K().t,V=e=>(0,n.jsx)(q,{shouldUnescape:!0,ns:t,...e})}async function Y(e,t,i){if(!(null==i?void 0:i.length))return;const n=t===H.wi?H.Nm:t;return Promise.all(i.map(async t=>{try{const i=await t(n);!function(e,t,i){K().addResourceBundle(e,t,i,!0,!1)}(n,e,i)}catch(t){console.error(`Error loading resources for namespace ${e} and language: ${n}`,t)}}))}function W(){var e;if((null==(e=K().options)?void 0:e.resources)&&"object"==typeof K().options.resources)return;const t=K().use(z).init({resources:{},returnEmptyString:!1,lng:H.Nm});return G(),t}async function Z(e,t){await W(),function(){var e,t;if(null==(t=null==(e=_())?void 0:e.options)?void 0:t.react)return;A({}),N(K())}();const i=J();return G({id:e}),await Y(e,i,t),{language:i}}function K(){const e=r;return e&&e.default?e.default:e}function J(){var e;return(null==(e=K())?void 0:e.resolvedLanguage)||H.Nm}const ee=(e,t,i)=>(W(),B||(console.warn("t() was called before i18n was initialized. This is probably caused by calling t() in the root module scope, instead of lazily on render"),B=K().t),B(e,t,i));function te(e){W();const t=null!=V?V:q;return(0,n.jsx)(t,{shouldUnescape:!0,...e})}},37846:(e,t,i)=>{"use strict";i.d(t,{UO:()=>u,aQ:()=>h,tS:()=>f});var n=i(18531),r=i(90903);function s(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}function o(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var o=e.apply(t,i);function a(e){s(o,n,r,a,l,"next",e)}function l(e){s(o,n,r,a,l,"throw",e)}a(void 0)})}}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}const l=3e3,u=3..toFixed(0),c=/^grafana-[0-9a-z]+prometheus-datasource$/;function h(e){return"object"==typeof e&&null!==e&&"type"in e&&"string"==typeof e.type&&("prometheus"===e.type||c.test(e.type))&&"uid"in e&&"string"==typeof e.uid}class d{getHealthyDataSources(e,t=15){return o(function*(){const i=this.cache.get(e);if(null==i?void 0:i.length)return i;let n=this.pendingRequests.get(e);n||(n=this.fetchHealthyDataSources(e,t).finally(()=>{this.pendingRequests.delete(e)}),this.pendingRequests.set(e,n));const r=yield n;return this.cache.set(e,r),r}).call(this)}fetchHealthyDataSources(e,t){return o(function*(){const i=[...(0,n.getDataSourceSrv)().getList({logs:!0,type:e,filter:e=>"grafana"!==e.uid})].sort((e,t)=>e.isDefault&&!t.isDefault?-1:!e.isDefault&&t.isDefault?1:0).slice(0,t),s=[],a=[];return yield Promise.all(i.map(e=>o(function*(){try{const t=yield this.performHealthCheckWithTimeout(e.uid);"OK"===(null==t?void 0:t.status)?s.push(e):"TIMEOUT"!==(null==t?void 0:t.status)&&a.push(e)}catch(t){a.push(e)}}).call(this))),a.length>0&&r.v.warn(`Found ${a.length} unhealthy ${e} data sources: ${a.map(e=>e.name).join(", ")}`),s}).call(this)}performHealthCheckWithTimeout(e){return o(function*(){const t=new AbortController,i=setTimeout(()=>{t.abort()},l);try{const r=yield(0,n.getBackendSrv)().get(`/api/datasources/uid/${e}/health`,void 0,void 0,{showSuccessAlert:!1,showErrorAlert:!1,abortSignal:t.signal});return clearTimeout(i),r}catch(e){if(clearTimeout(i),e instanceof DOMException&&"AbortError"===e.name)return{status:"TIMEOUT"};throw e}})()}constructor(){a(this,"pendingRequests",new Map),a(this,"cache",new Map)}}let p;function f(){return p||(p=new d),p}},38995:(e,t,i)=>{"use strict";const n=i(81053);e.exports=(e,t)=>{const i=n(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null}},40313:(e,t,i)=>{"use strict";i.d(t,{G:()=>s,s:()=>r});var n=i(62533);const r=n.id,s=`/a/${n.id}`},41308:e=>{"use strict";e.exports=n},44832:(e,t,i)=>{"use strict";const n=i(55607),r=i(23009);e.exports=(e,t,i)=>{const s=[];let o=null,a=null;const l=e.sort((e,t)=>r(e,t,i));for(const e of l){n(e,t,i)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const c=u.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return c.length{"use strict";const n=i(81053);e.exports=(e,t)=>{const i=n(e,null,!0),r=n(t,null,!0),s=i.compare(r);if(0===s)return null;const o=s>0,a=o?i:r,l=o?r:i,u=!!a.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(a))return l.minor&&!l.patch?"minor":"patch"}const c=u?"pre":"";return i.major!==r.major?c+"major":i.minor!==r.minor?c+"minor":i.patch!==r.patch?c+"patch":"prerelease"}},46089:e=>{"use strict";e.exports=r},46280:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r});var n=i(5946);const r=[{code:n.MB,name:"English"},{code:n.NY,name:"Français"},{code:n.d_,name:"Español"},{code:n.rT,name:"Deutsch"},{code:n.fY,name:"中文(简体)"},{code:n.jQ,name:"Português Brasileiro"},{code:n.AY,name:"中文(繁體)"},{code:n.bE,name:"Italiano"},{code:n.Hp,name:"日本語"},{code:n.IP,name:"Bahasa Indonesia"},{code:n.y6,name:"한국어"},{code:n.k8,name:"Русский"},{code:n.w2,name:"Čeština"},{code:n.wQ,name:"Nederlands"},{code:n.tv,name:"Magyar"},{code:n.LE,name:"Português"},{code:n.tS,name:"Polski"},{code:n.$0,name:"Svenska"},{code:n.mz,name:"Türkçe"}]},46940:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t,i)=>{const r=new n(e,i),s=new n(t,i);return r.compare(s)||r.compareBuild(s)}},48398:e=>{"use strict";e.exports=s},51077:(e,t,i)=>{"use strict";const n=i(36599),r=i(23642);e.exports=(e,t,i)=>{let s=null,o=null,a=null;try{a=new r(t,i)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new n(s,i)))}),s}},53926:(e,t,i)=>{"use strict";const n=i(36599),r=i(23642),s=i(8819);e.exports=(e,t)=>{e=new r(e,t);let i=new n("0.0.0");if(e.test(i))return i;if(i=new n("0.0.0-0"),e.test(i))return i;i=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),!o||i&&!s(i,o)||(i=o)}return i&&e.test(i)?i:null}},55607:(e,t,i)=>{"use strict";const n=i(23642);e.exports=(e,t,i)=>{try{t=new n(t,i)}catch(e){return!1}return t.test(e)}},57079:(e,t,i)=>{"use strict";const n=i(36599),r=i(23642);e.exports=(e,t,i)=>{let s=null,o=null,a=null;try{a=new r(t,i)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new n(s,i)))}),s}},58167:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t)=>new n(e,t).minor},62533:e=>{"use strict";e.exports=JSON.parse('{"id":"grafana-metricsdrilldown-app"}')},64792:(e,t,i)=>{"use strict";const n=i(81053);e.exports=(e,t)=>{const i=n(e,t);return i?i.version:null}},66971:e=>{"use strict";const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},67480:(e,t,i)=>{"use strict";const n=i(84340);e.exports=(e,t,i)=>n(e,t,">",i)},69174:function(e,t,i){var n;!function(r,s){"use strict";var o="function",a="undefined",l="object",u="string",c="major",h="model",d="name",p="type",f="vendor",m="version",g="architecture",v="console",b="mobile",O="tablet",w="smarttv",y="wearable",$="embedded",E="Amazon",x="Apple",S="ASUS",k="BlackBerry",P="Browser",T="Chrome",A="Firefox",I="Google",R="Honor",N="Huawei",_="LG",L="Microsoft",C="Motorola",Q="Nvidia",X="OnePlus",D="Opera",j="OPPO",U="Samsung",M="Sharp",z="Sony",F="Xiaomi",q="Zebra",H="Facebook",B="Chromium OS",V="Mac OS",G=" Browser",Y=function(e){for(var t={},i=0;i0?2===a.length?typeof a[1]==o?this[a[0]]=a[1].call(this,c):this[a[0]]=a[1]:3===a.length?typeof a[1]!==o||a[1].exec&&a[1].test?this[a[0]]=c?c.replace(a[1],a[2]):s:this[a[0]]=c?a[1].call(this,c,a[2]):s:4===a.length&&(this[a[0]]=c?a[3].call(this,c.replace(a[1],a[2])):s):this[a]=c||s;h+=2}},ee=function(e,t){for(var i in t)if(typeof t[i]===l&&t[i].length>0){for(var n=0;n2&&(e[h]="iPad",e[p]=O),e},this.getEngine=function(){var e={};return e[d]=s,e[m]=s,J.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[d]=s,e[m]=s,J.call(e,n,w.os),y&&!e[d]&&v&&v.platform&&"Unknown"!=v.platform&&(e[d]=v.platform.replace(/chrome os/i,B).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===u&&e.length>500?K(e,500):e,this},this.setUA(n),this};ne.VERSION="1.0.41",ne.BROWSER=Y([d,m,c]),ne.CPU=Y([g]),ne.DEVICE=Y([h,f,p,v,b,w,O,y,$]),ne.ENGINE=ne.OS=Y([d,m]),typeof t!==a?(e.exports&&(t=e.exports=ne),t.UAParser=ne):i.amdO?(n=function(){return ne}.call(t,i,t,e))===s||(e.exports=n):typeof r!==a&&(r.UAParser=ne);var re=typeof r!==a&&(r.jQuery||r.Zepto);if(re&&!re.ua){var se=new ne;re.ua=se.getResult(),re.ua.get=function(){return se.getUA()},re.ua.set=function(e){se.setUA(e);var t=se.getResult();for(var i in t)re.ua[i]=t[i]}}}("object"==typeof window?window:this)},69205:(e,t,i)=>{"use strict";var n;i.d(t,{$b:()=>n,HT:()=>s,Ic:()=>r}),function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.LOG="log",e.WARN="warn",e.ERROR="error"}(n||(n={}));const r=n.LOG,s=[n.TRACE,n.DEBUG,n.INFO,n.LOG,n.WARN,n.ERROR]},69715:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},72635:e=>{"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},73055:(e,t,i)=>{"use strict";i.d(t,{K3:()=>_});var n=i(11528),r=i(32103);let s=0;class o{constructor(e,t,i,n){this.name=e,this.set=t,this.base=i,this.modified=n,this.id=s++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i="string"==typeof e?e:"?";if(e instanceof o&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let n=new o(i,[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new l(e);return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let a=0;class l{constructor(e){this.name=e,this.instances=[],this.id=a++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(i=>{return i.base==e&&(n=t,r=i.modified,n.length==r.length&&n.every((e,t)=>e==r[t]));var n,r});if(i)return i;let n=[],r=new o(e.name,n,e,t);for(let e of t)e.instances.push(r);let s=function(e){let t=[[]];for(let i=0;it.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of s)n.push(l.get(t,e));return r}}const u=new r.uY;class c{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depthP[e.toLowerCase()]||-1,A={avg:8,atan2:7,bottomk:9,count:10,count_values:11,group:12,max:13,min:14,quantile:15,limitk:16,limit_ratio:17,stddev:18,stdvar:19,sum:20,topk:21,by:22,without:23,and:24,or:25,unless:26,start:27,end:28,smoothed:29,anchored:30},I=(e,t)=>A[e.toLowerCase()]||-1,R=function(e){let t=Object.create(null);for(let i in e){let n=e[i];Array.isArray(n)||(n=[n]);for(let e of i.split(" "))if(e){let i=[],r=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){r=1;break}let n=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!n)throw new RangeError("Invalid path: "+e);if(i.push("*"==n[0]?"":'"'==n[0][0]?JSON.parse(n[0]):n[0]),t+=n[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){r=0;break}if("/"!=o)throw new RangeError("Invalid path: "+e);s=e.slice(t)}let o=i.length-1,a=i[o];if(!a)throw new RangeError("Invalid path: "+e);let l=new c(n,r,o>0?i.slice(0,o):null);t[a]=l.sort(t[a])}}return u.add(t)}({LineComment:k.comment,LabelName:k.labelName,StringLiteral:k.string,NumberDurationLiteral:k.number,NumberDurationLiteralInDurationContext:k.number,Identifier:k.variableName,"Abs Absent AbsentOverTime Acos Acosh Asin Asinh Atan Atanh AvgOverTime Ceil Changes Clamp ClampMax ClampMin Cos Cosh CountOverTime DaysInMonth DayOfMonth DayOfWeek DayOfYear Deg Delta Deriv Exp Floor HistogramAvg HistogramCount HistogramFraction HistogramQuantile HistogramSum DoubleExponentialSmoothing Hour Idelta Increase Irate LabelReplace LabelJoin LastOverTime Ln Log10 Log2 MaxOverTime MinOverTime Minute Month Pi PredictLinear PresentOverTime QuantileOverTime Rad Rate Resets Round Scalar Sgn Sin Sinh Sort SortDesc SortByLabel SortByLabelDesc Sqrt StddevOverTime StdvarOverTime SumOverTime Tan Tanh Time Timestamp Vector Year":k.function(k.variableName),"Avg Bottomk Count Count_values Group LimitK LimitRatio Max Min Quantile Stddev Stdvar Sum Topk":k.operatorKeyword,"By Without Bool On Ignoring GroupLeft GroupRight Offset Start End Smoothed Anchored":k.modifier,"And Unless Or":k.logicOperator,"Sub Add Mul Mod Div Atan2 Eql Neq Lte Lss Gte Gtr EqlRegex EqlSingle NeqRegex Pow At":k.operator,UnaryOp:k.arithmeticOperator,"( )":k.paren,"[ ]":k.squareBracket,"{ }":k.brace,"⚠":k.invalid}),N={__proto__:null,absent_over_time:353,absent:355,abs:357,acos:359,acosh:361,asin:363,asinh:365,atan:367,atanh:369,avg_over_time:371,ceil:373,changes:375,clamp:377,clamp_max:379,clamp_min:381,cos:383,cosh:385,count_over_time:387,days_in_month:389,day_of_month:391,day_of_week:393,day_of_year:395,deg:397,delta:399,deriv:401,exp:403,first_over_time:405,floor:407,histogram_count:409,histogram_fraction:411,histogram_quantile:413,histogram_stddev:415,histogram_stdvar:417,histogram_sum:419,histogram_avg:421,double_exponential_smoothing:423,hour:425,idelta:427,increase:429,info:431,irate:433,label_replace:435,label_join:437,last_over_time:439,ln:441,log10:443,log2:445,mad_over_time:447,max_over_time:449,min_over_time:451,ts_of_first_over_time:453,ts_of_max_over_time:455,ts_of_min_over_time:457,ts_of_last_over_time:459,minute:461,month:463,pi:465,predict_linear:467,present_over_time:469,quantile_over_time:471,rad:473,rate:475,resets:477,round:479,scalar:481,sgn:483,sin:485,sinh:487,sort:489,sort_desc:491,sort_by_label:493,sort_by_label_desc:495,sqrt:497,stddev_over_time:499,stdvar_over_time:501,sum_over_time:503,tan:505,tanh:507,timestamp:509,time:511,vector:513,year:515},_=n.U1.deserialize({version:14,states:":^OYQPOOO(TQPOOOOQO'#DO'#DOO(YQPO'#C}Q(eQQOOOOQO'#Dg'#DgO(`QPO'#DfOOQO'#Fa'#FaO)xQPO'#FhOYQPO'#FeOYQPO'#FgO0|QSO'#FjO1XQQO'#FiOOQO'#Fi'#FiOOQO'#F}'#F}OOQO'#Dh'#DhOOQO'#Dj'#DjOOQO'#Dk'#DkOOQO'#Dl'#DlOOQO'#Dm'#DmOOQO'#Dn'#DnOOQO'#Do'#DoOOQO'#Dp'#DpOOQO'#Dq'#DqOOQO'#Dr'#DrOOQO'#Ds'#DsOOQO'#Dt'#DtOOQO'#Du'#DuOOQO'#Dv'#DvOOQO'#Dw'#DwOOQO'#Dx'#DxOOQO'#Dy'#DyOOQO'#Dz'#DzOOQO'#D{'#D{OOQO'#D|'#D|OOQO'#D}'#D}OOQO'#EO'#EOOOQO'#EP'#EPOOQO'#EQ'#EQOOQO'#ER'#EROOQO'#ES'#ESOOQO'#ET'#ETOOQO'#EU'#EUOOQO'#EV'#EVOOQO'#EW'#EWOOQO'#EX'#EXOOQO'#EY'#EYOOQO'#EZ'#EZOOQO'#E['#E[OOQO'#E]'#E]OOQO'#E^'#E^OOQO'#E_'#E_OOQO'#E`'#E`OOQO'#Ea'#EaOOQO'#Eb'#EbOOQO'#Ec'#EcOOQO'#Ed'#EdOOQO'#Ee'#EeOOQO'#Ef'#EfOOQO'#Eg'#EgOOQO'#Eh'#EhOOQO'#Ei'#EiOOQO'#Ej'#EjOOQO'#Ek'#EkOOQO'#El'#ElOOQO'#Em'#EmOOQO'#En'#EnOOQO'#Eo'#EoOOQO'#Ep'#EpOOQO'#Eq'#EqOOQO'#Er'#ErOOQO'#Es'#EsOOQO'#Et'#EtOOQO'#Eu'#EuOOQO'#Ev'#EvOOQO'#Ew'#EwOOQO'#Ex'#ExOOQO'#Ey'#EyOOQO'#Ez'#EzOOQO'#E{'#E{OOQO'#E|'#E|OOQO'#E}'#E}OOQO'#FO'#FOOOQO'#FP'#FPOOQO'#FQ'#FQOOQO'#FR'#FROOQO'#FS'#FSOOQO'#FT'#FTOOQO'#FU'#FUOOQO'#FV'#FVOOQO'#FW'#FWOOQO'#FX'#FXOOQO'#FY'#FYOOQO'#FZ'#FZOOQO'#F['#F[OOQO'#F]'#F]OOQO'#F^'#F^QOQPOOO2xQPO'#DPO2}QPO'#DUO(`QPO,59iO3UQQO,59iO4xQPO,59qO4xQPO,59qO4xQPO,59qO4xQPO,59qO4xQPO,59qO;|QPO,5;yO;|QPO,5;|OOQO,5;},5;}OOQO,5kQPO'#FkO>yQPO,5T(e)<<1,external:T},{term:59,get:(e,t)=>I(e)<<1|1,external:I,extend:!0},{term:59,get:e=>N[e]||-1}],tokenPrec:0})},74525:(e,t,i)=>{"use strict";const n=i(36599),r=i(81053),{safeRe:s,t:o}=i(19619);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let i=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[o.COERCERTLFULL]:s[o.COERCERTL];let r;for(;(r=n.exec(e))&&(!i||i.index+i[0].length!==e.length);)i&&r.index+r[0].length===i.index+i[0].length||(i=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}else i=e.match(t.includePrerelease?s[o.COERCEFULL]:s[o.COERCE]);if(null===i)return null;const a=i[2],l=i[3]||"0",u=i[4]||"0",c=t.includePrerelease&&i[5]?`-${i[5]}`:"",h=t.includePrerelease&&i[6]?`+${i[6]}`:"";return r(`${a}.${l}.${u}${c}${h}`,t)}},75752:(e,t,i)=>{"use strict";i.d(t,{M:()=>r,W:()=>o});var n=i(73055);function r(e){const t=n.K3.parse(e),i=new Set,r=t.cursor();do{if(r.type.is("VectorSelector")&&r.firstChild()){do{r.type.is("Identifier")&&s(e,r,i)}while(r.nextSibling());r.parent()}}while(r.next());return Array.from(i)}function s(e,t,i){const n=e.slice(t.from,t.to);n&&i.add(n)}function o(e,t){if("UnquotedLabelMatcher"!==e.name)return null;let i="",n="",r="";for(let s=e.node.firstChild;s;s=s.nextSibling)"LabelName"===s.type.name?i=t.slice(s.from,s.to):"MatchOp"===s.type.name?n=t.slice(s.from,s.to):"StringLiteral"===s.type.name&&(r=t.slice(s.from+1,s.to-1));return i&&n?{label:i,op:n,value:r}:null}},76217:(e,t,i)=>{"use strict";i.d(t,{I8:()=>$,kY:()=>E,e6:()=>w,Rk:()=>y,PQ:()=>O,Ge:()=>m,$9:()=>v});var n=i(87781),r=i(18531);function s(e=[],t){if(!t.multi&&!t.includeAll)return function(e){if("string"!=typeof e)return e;if(r.config.featureToggles.prometheusSpecialCharsInLabelValues)return/^\w+(=|!=|=~|!~)".*"$/.test(e)?e:e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return e.replace(/\\/g,"\\\\").replace(/'/g,"\\\\'")}(e);if("string"==typeof e)return o(e);const i=e.map(e=>o(e));return 1===i.length?i[0]:"("+i.join("|")+")"}function o(e){return"string"!=typeof e?e:r.config.featureToggles.prometheusSpecialCharsInLabelValues?e.replace(/\\/g,"\\\\\\\\").replace(/"/g,'\\\\\\"').replace(/[$^*{}\[\]\'+?.()|]/g,"\\\\$&"):e.replace(/\\/g,"\\\\\\\\").replace(/[$^*{}\[\]+?.()|]/g,"\\\\$&")}var a=i(73055),l=i(40313),u=i(98928),c=i(90903);const h=new RegExp("([a-zA-Z_]\\w*)(>|<|!~|=~|!=|=)(.+)");var d=i(75752);const p="Grafana Metrics Drilldown",f="|",m=[{title:`Open in ${p}`,description:`Open current query in the ${p} view`,category:"metrics-drilldown",icon:"gf-prometheus",path:y(u.b.Drilldown),targets:[n.PluginExtensionPoints.DashboardPanelMenu,n.PluginExtensionPoints.ExploreToolbarAction,n.PluginExtensionPoints.AlertingRuleQueryEditor,"grafana-assistant-app/navigateToDrilldown/v1"],configure:function(e){if(void 0===e)return;if("pluginId"in e&&"timeseries"!==e.pluginId)return;if(!e.targets.filter(x).length)return;return{path:g(e)||y(u.b.Drilldown)}}},{targets:["grafana-metricsdrilldown-app/grafana-assistant-app/navigateToDrilldown/v0-alpha"],title:"Navigate to metrics drilldown",description:"Build a url path to the metrics drilldown",path:y(u.b.Drilldown),configure:e=>{if(void 0===e)return;const{navigateToMetrics:t,datasource_uid:i,label_filters:n,metric:r,start:s,end:o}=e,a=function(e){if(!e)return[];return e.map(e=>{const t=function(e){const[,t,i,n]=e.match(h)||[,"","",""];return{key:t.trim(),value:n.replace(/['" ]/g,""),operator:i.trim()}}(e);return{label:t.key,op:t.operator,value:t.value}})}(n),l=O(i,a,r,s,o),c=t?w(l):void 0;return{path:y(u.b.Drilldown,c)}}}];function g(e){var t;if(void 0===e)return null;if("pluginId"in e&&"timeseries"!==e.pluginId)return null;const i=e.targets.filter(x);if(!i.length)return null;const n=i[0],o=(0,r.getTemplateSrv)(),a=o.replace(null===(t=n.datasource)||void 0===t?void 0:t.uid,e.scopedVars);if(!n.expr)return y(u.b.Drilldown);const l=o.replace(n.expr,e.scopedVars,s);try{const{metric:t,labels:i,hasErrors:n,errors:r}=v(l);n&&c.v.warn(`PromQL query has parsing errors: ${r.join(", ")}`);const s="timeRange"in e&&"object"==typeof e.timeRange&&null!=e.timeRange&&"from"in e.timeRange&&"to"in e.timeRange?e.timeRange:void 0,o=w(O(a,i,t,null==s?void 0:s.from,null==s?void 0:s.to));return y(u.b.Drilldown,o)}catch(e){return c.v.error(new Error(`[Metrics Drilldown] Error parsing PromQL query: ${e}`)),y(u.b.Drilldown)}}function v(e){const t=a.K3.parse(e);let i="";const n=[];let r=!1;const s=[];return t.iterate({enter:t=>{var o;if(t.type.isError||"⚠"===t.name){r=!0;const i=e.slice(t.from,t.to),n=i?`Parse error at position ${t.from}-${t.to}: "${i}"`:`Parse error at position ${t.from}`;s.push(n)}i||"Identifier"!==t.name||"VectorSelector"!==(null===(o=t.node.parent)||void 0===o?void 0:o.type.name)||(i=e.slice(t.from,t.to));const a=(0,d.W)(t,e);a&&n.push(a)}}),{metric:i,labels:n,hasErrors:r,errors:s}}function b(e){return[$.Filters,`${e.label}${f}${e.op}${f}${S(e.value)}`]}function O(e,t,i,n,r){return{datasource_uid:e,label_filters:null!=t?t:[],metric:i,start:n,end:r}}function w(e){const{metric:t,start:i,end:n,datasource_uid:r,label_filters:s}=e,o=null!=s?s:[];return E([[$.Metric,t],[$.TimeRangeFrom,i],[$.TimeRangeTo,n],[$.DatasourceId,r],...o.map(b)])}function y(e,t){const i=t?`?${t.toString()}`:"";return`${l.G}/${e}${i}`}const $={TimeRangeFrom:"from",TimeRangeTo:"to",Metric:"metric",DatasourceId:"var-ds",Filters:"var-filters"};function E(e,t){const i=new URLSearchParams(null==t?void 0:t.toString());return e.forEach(([e,t])=>{t&&i.append(e,t)}),i}function x(e){const{datasource:t}=e;return"prometheus"===(null==t?void 0:t.type)}function S(e){return null==e?"":/\|/g[Symbol.replace](e,"__gfp__")}},76462:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t)=>n(e,t,!0)},76609:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>n(t,e,i)},79042:(e,t,i)=>{"use strict";const n=i(23009);e.exports=(e,t,i)=>0!==n(e,t,i)},79089:e=>{"use strict";e.exports=o},79877:(e,t,i)=>{"use strict";const n=i(23642),r=i(95919),{ANY:s}=r,o=i(55607),a=i(23009),l=[new r(">=0.0.0-0")],u=[new r(">=0.0.0")],c=(e,t,i)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=i.includePrerelease?l:u}if(1===t.length&&t[0].semver===s){if(i.includePrerelease)return!0;t=u}const n=new Set;let r,c,p,f,m,g,v;for(const t of e)">"===t.operator||">="===t.operator?r=h(r,t,i):"<"===t.operator||"<="===t.operator?c=d(c,t,i):n.add(t.semver);if(n.size>1)return null;if(r&&c){if(p=a(r.semver,c.semver,i),p>0)return null;if(0===p&&(">="!==r.operator||"<="!==c.operator))return null}for(const e of n){if(r&&!o(e,String(r),i))return null;if(c&&!o(e,String(c),i))return null;for(const n of t)if(!o(e,String(n),i))return!1;return!0}let b=!(!c||i.includePrerelease||!c.semver.prerelease.length)&&c.semver,O=!(!r||i.includePrerelease||!r.semver.prerelease.length)&&r.semver;b&&1===b.prerelease.length&&"<"===c.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(v=v||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,r)if(O&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===O.major&&e.semver.minor===O.minor&&e.semver.patch===O.patch&&(O=!1),">"===e.operator||">="===e.operator){if(f=h(r,e,i),f===e&&f!==r)return!1}else if(">="===r.operator&&!o(r.semver,String(e),i))return!1;if(c)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(m=d(c,e,i),m===e&&m!==c)return!1}else if("<="===c.operator&&!o(c.semver,String(e),i))return!1;if(!e.operator&&(c||r)&&0!==p)return!1}return!(r&&g&&!c&&0!==p)&&(!(c&&v&&!r&&0!==p)&&(!O&&!b))},h=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,i={})=>{if(e===t)return!0;e=new n(e,i),t=new n(t,i);let r=!1;e:for(const n of e.set){for(const e of t.set){const t=c(n,e,i);if(r=r||null!==t,t)continue e}if(r)return!1}return!0}},81053:(e,t,i)=>{"use strict";const n=i(36599);e.exports=(e,t,i=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!i)return null;throw e}}},81159:e=>{"use strict";e.exports=a},82007:e=>{"use strict";e.exports=l},84340:(e,t,i)=>{"use strict";const n=i(36599),r=i(95919),{ANY:s}=r,o=i(23642),a=i(55607),l=i(8819),u=i(20444),c=i(25097),h=i(8624);e.exports=(e,t,i,d)=>{let p,f,m,g,v;switch(e=new n(e,d),t=new o(t,d),i){case">":p=l,f=c,m=u,g=">",v=">=";break;case"<":p=u,f=h,m=l,g="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let i=0;i{e.semver===s&&(e=new r(">=0.0.0")),o=o||e,a=a||e,p(e.semver,o.semver,d)?o=e:m(e.semver,a.semver,d)&&(a=e)}),o.operator===g||o.operator===v)return!1;if((!a.operator||a.operator===g)&&f(e,a.semver))return!1;if(a.operator===v&&m(e,a.semver))return!1}return!0}},84488:e=>{"use strict";const t=/^[0-9]+$/,i=(e,i)=>{if("number"==typeof e&&"number"==typeof i)return e===i?0:ei(t,e)}},84558:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});const n="a14d3ded2a5f776294083afe263bf36491136be2"},85959:e=>{"use strict";e.exports=u},86106:(e,t,i)=>{"use strict";e.exports=i(95538)},87781:e=>{"use strict";e.exports=c},90903:(e,t,i)=>{"use strict";i.d(t,{v:()=>p});var n=i(69205),r=i(17352),s=i(29778);function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t,i){if(!t.has(e))throw new TypeError("attempted to "+i+" private field on non-instance");return t.get(e)}function l(e,t,i){return function(e,t,i){if(t.set)t.set.call(e,i);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=i}}(e,a(e,t,"set"),i),i}function u(e,t,i){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return i}var c=new WeakMap,h=new WeakSet;function d(e,t){var i;"prod"!==function(e,t){return t.get?t.get.call(e):t.value}(i=this,a(i,c,"get"))&&console[e](...t)}const p=new class{trace(){var e;u(this,h,d).call(this,"trace",[]),null===(e=(0,r.n1)())||void 0===e||e.api.pushLog([],{level:n.$b.TRACE})}debug(...e){var t;u(this,h,d).call(this,"debug",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:n.$b.DEBUG})}info(...e){var t;u(this,h,d).call(this,"info",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:n.$b.INFO})}log(...e){var t;u(this,h,d).call(this,"log",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:n.$b.LOG})}warn(...e){var t;u(this,h,d).call(this,"warn",e),null===(t=(0,r.n1)())||void 0===t||t.api.pushLog(e,{level:n.$b.WARN})}error(e,t){var i;u(this,h,d).call(this,"error",[e]),t&&u(this,h,d).call(this,"error",["Error context",t]),null===(i=(0,r.n1)())||void 0===i||i.api.pushError(e,{context:t})}constructor(){var e,t;o(e=this,t=h),t.add(e),function(e,t,i){o(e,t),t.set(e,i)}(this,c,{writable:!0,value:void 0}),l(this,c,(0,s.u)())}}},91305:e=>{"use strict";const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},93241:e=>{"use strict";e.exports=h},95538:(e,t,i)=>{"use strict";var n=i(85959),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,i){var n,s={},u=null,c=null;for(n in void 0!==i&&(u=""+i),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,n)&&!l.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===s[n]&&(s[n]=t[n]);return{$$typeof:r,type:e,key:u,ref:c,props:s,_owner:a.current}}t.jsx=u},95919:(e,t,i)=>{"use strict";const n=Symbol("SemVer ANY");class r{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new c(i[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new h(e.value,t).test(this.value):""===e.operator?""===e.value||new h(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=r;const s=i(30056),{safeRe:o,t:a}=i(19619),l=i(25026),u=i(66971),c=i(36599),h=i(23642)},98928:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n={Trail:"trail",Drilldown:"drilldown"}}},v={};function b(e){var t=v[e];if(void 0!==t)return t.exports;var i=v[e]={id:e,loaded:!1,exports:{}};return g[e].call(i.exports,i,i.exports,b),i.loaded=!0,i.exports}b.m=g,b.amdO={},b.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return b.d(t,{a:t}),t},p=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);b.r(i);var n={};d=d||[null,p({}),p([]),p(p)];for(var r=2&t&&e;("object"==typeof r||"function"==typeof r)&&!~d.indexOf(r);r=p(r))Object.getOwnPropertyNames(r).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,b.d(i,n),i},b.d=(e,t)=>{for(var i in t)b.o(t,i)&&!b.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((t,i)=>(b.f[i](e,t),t),[])),b.u=e=>e+".js?_cache="+{27:"823d6280e3781b8c6d71",73:"6f804af5cfbabb36ed61",90:"695b198a612160b65a0f",120:"70315fe5c8d70ca9513a",222:"4d035532ffa2ed07da05",259:"9cb040ed2dfa43228d57",261:"4123d772f847e7a0b4b2",266:"e9eae954cb25e154a6d9",273:"609bd8c7a5bc78301ad4",349:"5d85556f9165f6488351",379:"fe7b8cca99c88780f2d1",395:"c1d83ab29f2935f7526a",417:"9ae9927b010bf99264cc",425:"61c3b3fb06bb9060b6af",472:"f75cea513234ae3bbbaa",497:"09742e024d17c5f199c9",500:"47ac642be8c4049ade21",555:"2dff8e5aeff4775cd7d6",603:"c58a341ba2bcbd5bb331",605:"284f70950e783358db3c",612:"2c1b0efc59fea8994a81",623:"8b3a7e3b6001f82a11ba",624:"ef7df003930cb15ca103",769:"a1a0c236d3c8d58e735d",818:"3c4205cb66e863b090ad",826:"6f9b8d76a30c277d710d",899:"651647977333f8d3b018",904:"aa60b9b7f4f280cb17bb",913:"7114f8bc77d7e100d586",944:"df5f6f145f86d251bb90",951:"1f4c27731190b1ebf8b9",981:"57094b2c06a6e084ae41"}[e],b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f={},m="grafana-metricsdrilldown-app:",b.l=(e,t,i,n)=>{if(f[e])f[e].push(t);else{var r,s;if(void 0!==i)for(var o=document.getElementsByTagName("script"),a=0;a{r.onerror=r.onload=null,clearTimeout(c);var n=f[e];if(delete f[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach(e=>e(i)),t)return t(i)},c=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),s&&document.head.appendChild(r)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),b.p="public/plugins/grafana-metricsdrilldown-app/",b.sriHashes={27:"sha256-j+9Zpq4cR0gIHy88sAKxmlyid9OxAmzacmzwvLanTVg=",73:"sha256-yBWbm6uSZ+yd1AFf+vV69cFVwSyFa7eH7Bjrmxf9brs=",90:"sha256-QhEg4dGTCSbauzOhT9XBPsIDrA8b3UR0V6atixtmjGU=",120:"sha256-m0fDy7EnPJZV9by0BncVjPdbjq80WveneL4cl8LDNOg=",222:"sha256-+sYpV218v7ojeDQZXmZF/ha4X0nTo0MFLjhkO/54pUQ=",259:"sha256-NPgbwKpfsZSVh67gqEK3me920nz1iyEJC1zsu6XAxyY=",261:"sha256-UrXpCyM/2i78yFKw6MGbScX1En/+efpXflwmwe5ce1w=",266:"sha256-/4aYsOS9yDlGGOVb0LPbEMAbunqvXXvG6A7j2oJNUAI=",273:"sha256-Q+eV9BVBatpP1L6WWkzrHhPPulGa4bcoTmA1//FuY8U=",349:"sha256-xK/WyNCVkxeeLpJDMFghLiYNSjIKqah+I5F++5vxYAQ=",379:"sha256-6k50/pBaJq9lzP3t+ws1EVFW4R9hp4hW539hsqCuuE8=",395:"sha256-u3XBqSaRQwwxhLRK0qmEHx9JLnISkxk+h5ZJcVkz9K4=",417:"sha256-KQqhkE6610gO8t+YB6mxCbAcDGjfd75uAruIkuelgf8=",425:"sha256-0wiq/HsmTlp1UT4sdufH8l0ZOk6X/FS4Rvo/74WArII=",472:"sha256-0RGXk3S7FCcFshFu3KwABZLddCPbVBHKtji9lMtLrUo=",497:"sha256-NJf5G9REGlnGTe4VTdgANJEQlf1zPcpN2Ztg+/JqkIE=",500:"sha256-ZXdyG/b1pgCtVF0wjJ6xiytmW7laMJrSZ7yLC4+UM20=",555:"sha256-YFv+M868lP/BAK/ywjOm2iCufLNWMjltDtYzJy5SiZs=",603:"sha256-ybfBsUqJhP1vA18AUkOlfKFnEYX3JVLMfKOlB/fvRLU=",605:"sha256-sV33Kh2XTFqL707MSnn51FVXhbebdoRlFnNj8vBWt+Q=",612:"sha256-nO3UEuM8t8EOM1WONPXzcuAKYu+vCB/3BMYTFUTdxnU=",623:"sha256-AHCGD+vK3NWJ3GPLgXnPAdZw9kO4vUWOZ1mlrWyIXWg=",624:"sha256-TXQq4Y5Dz5B7VGJDkS8/aD4lRoffIF1SPZCIUA7NilA=",769:"sha256-oUynQrISIorCXFD69ZWJAaKRw6eHpvfIiWd7LJOZNWg=",818:"sha256-OoD98KgY70bYm/F0spGSdsjAfWaj5hBwVh6g1KZcoGI=",826:"sha256-o5EUdyNxEmR5y1lu7gTOOVHGgpdYo9Sekg615kkHZVo=",899:"sha256-z7D6KV2Nnjw0M+yDgMw69k00qtYtZgazyv4VE0LdFq8=",904:"sha256-gg/UtJ7M+MjFyxoIOtGQK6StZuXBz85/E+gobynDbrY=",913:"sha256-CMJLDeAFGUOe7LhYAUznaBXLEuazqpbcl0r+78EoH7Y=",944:"sha256-UJnc9UAG2o+9o2gsA7o3A9XAXmilL/3qBt61CDVEUoM=",951:"sha256-1xXsPvYGbH3af0nlLKa7xjxlyBfD4jPDwqIP2YIhMqo=",981:"sha256-lbTQci2a8/nJE6rkU9JrZJkkj/ups2+nfxc9y7TBxyw="},(()=>{b.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={231:0};b.f.j=(t,i)=>{var n=b.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise((i,r)=>n=e[t]=[i,r]);i.push(n[2]=r);var s=b.p+b.u(t),o=new Error;b.l(s,i=>{if(b.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",o.name="ChunkLoadError",o.type=r,o.request=s,n[1](o)}},"chunk-"+t,t)}};var t=(t,i)=>{var n,r,[s,o,a]=i,l=0;if(s.some(t=>0!==e[t])){for(n in o)b.o(o,n)&&(b.m[n]=o[n]);if(a)a(b)}for(t&&t(i);l{"use strict";b.r(O),b.d(O,{plugin:()=>I});var e=b(41308),t=b.n(e);b.p=t()&&t().uri?t().uri.slice(0,t().uri.lastIndexOf("/")+1):"public/plugins/grafana-metricsdrilldown-app/";var i=b(87781),n=b(18531),r=b(82007),s=b(85959),o=b.n(s),a=b(28236),l=b(37768);function u(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}const c=(0,s.lazy)(()=>{return(e=function*(){const{initPluginTranslations:e}=yield b.e(605).then(b.bind(b,9605)),{loadResources:t}=yield b.e(904).then(b.bind(b,28904));return yield e("grafana-scenes",[t]),Promise.all([b.e(904),b.e(944),b.e(500),b.e(73),b.e(818)]).then(b.bind(b,46818))},function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function o(e){u(s,n,r,o,a,"next",e)}function a(e){u(s,n,r,o,a,"throw",e)}o(void 0)})})();var e});var h=b(62533);const d={id:`${h.id}/label-breakdown-component/v1`,title:"Label Breakdown",description:"A metrics label breakdown view from the Metrics Drilldown app.",component:e=>o().createElement(s.Suspense,{fallback:o().createElement("div",null,o().createElement(l.x6,{i18nKey:"lazy-loading.fallback"},"Loading..."))},o().createElement(c,e))};function p(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}const f=(0,s.lazy)(()=>{return(e=function*(){const{initPluginTranslations:e}=yield b.e(605).then(b.bind(b,9605)),{loadResources:t}=yield b.e(904).then(b.bind(b,28904));return yield e("grafana-scenes",[t]),Promise.all([b.e(904),b.e(944),b.e(500),b.e(73),b.e(222)]).then(b.bind(b,45222))},function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function o(e){p(s,n,r,o,a,"next",e)}function a(e){p(s,n,r,o,a,"throw",e)}o(void 0)})})();var e}),m={id:`${h.id}/mini-breakdown-component/v1`,title:"Mini Label Breakdown Navigation",description:"A mini metrics label breakdown view from the Metrics Drilldown app used for navigation.",component:e=>o().createElement(s.Suspense,{fallback:o().createElement("div",null,o().createElement(l.x6,{i18nKey:"lazy-loading.fallback"},"Loading..."))},o().createElement(f,e))};function g(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}const v=(0,s.lazy)(()=>{return(e=function*(){const{initPluginTranslations:e}=yield b.e(605).then(b.bind(b,9605)),{loadResources:t}=yield b.e(904).then(b.bind(b,28904));return yield e("grafana-scenes",[t]),Promise.all([b.e(904),b.e(944),b.e(500),b.e(73),b.e(913)]).then(b.bind(b,32913))},function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function o(e){g(s,n,r,o,a,"next",e)}function a(e){g(s,n,r,o,a,"throw",e)}o(void 0)})})();var e}),w=[d,m,{id:`${h.id}/knowledge-graph-insight-metrics/v1`,title:"Knowledge Graph Source Metrics",description:"Explore the underlying metrics related to a Knowledge Graph insight",component:e=>o().createElement(s.Suspense,{fallback:o().createElement("div",null,o().createElement(l.x6,{i18nKey:"lazy-loading.fallback"},"Loading..."))},o().createElement(v,e))}];var y=b(76217),$=b(98928),E=b(37846);function x(e,t=$.b.Drilldown){const i=(0,y.kY)([[y.I8.DatasourceId,e]]);return(0,y.Rk)(t,i)}const S="Browse metrics in Grafana Metrics Drilldown",k=[{title:"Open in Metrics Drilldown",description:S,targets:[i.PluginExtensionPoints.DataSourceConfigActions,i.PluginExtensionPoints.DataSourceConfigStatus],icon:"drilldown",category:"metrics-drilldown",path:(0,y.Rk)($.b.Drilldown),configure:e=>{var t,i;if((null==e||null===(t=e.dataSource)||void 0===t?void 0:t.type)&&(null==e||null===(i=e.dataSource)||void 0===i?void 0:i.uid)&&(0,E.aQ)(e.dataSource))return{path:x(e.dataSource.uid),description:S}}}];var P=b(90903);function T(e,t,i,n,r,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,r)}const A=(0,s.lazy)(()=>{return(e=function*(){var e;const{initPluginTranslations:t}=yield b.e(605).then(b.bind(b,9605)),{loadResources:i}=yield b.e(904).then(b.bind(b,28904));yield t("grafana-scenes",[i]);const{loadResources:r}=yield b.e(90).then(b.bind(b,27090)),s=(0,a.lt)((null===n.config||void 0===n.config||null===(e=n.config.buildInfo)||void 0===e?void 0:e.version)||"0.0.0","12.1.0")?[r]:[];yield t(h.id,s);const{wasmSupported:o}=yield Promise.all([b.e(904),b.e(944),b.e(500),b.e(73)]).then(b.bind(b,21015)),{default:l}=yield b.e(944).then(b.bind(b,54944));if(o())try{yield l()}catch(e){P.v.error(e,{message:"Error while initializing outlier detection"})}else P.v.warn("WASM not supported, outlier detection will not work");return Promise.all([b.e(904),b.e(944),b.e(500),b.e(769),b.e(73),b.e(603)]).then(b.bind(b,77603))},function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function o(e){T(s,n,r,o,a,"next",e)}function a(e){T(s,n,r,o,a,"throw",e)}o(void 0)})})();var e}),I=(new i.AppPlugin).setRootPage(e=>o().createElement(s.Suspense,{fallback:o().createElement(r.LoadingPlaceholder,{text:""})},o().createElement(A,e)));for(const e of[...y.Ge,...k])I.addLink(e);for(const e of w)I.exposeComponent(e)})(),O})()); //# sourceMappingURL=module.js.map